@makeswift/runtime 0.0.0-e89d176 → 0.0.0-ef05bba
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/api.js +1 -0
- package/box-model.js +1 -0
- package/components.js +1 -0
- package/dist/actions.cjs.js +88 -16
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +79 -16
- package/dist/actions.es.js.map +1 -1
- package/dist/api.cjs.js +6 -0
- package/dist/api.cjs.js.map +1 -0
- package/dist/api.es.js +2 -0
- package/dist/api.es.js.map +1 -0
- 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/box-models.cjs.js +27 -157
- package/dist/box-models.cjs.js.map +1 -1
- package/dist/box-models.es.js +30 -160
- package/dist/box-models.es.js.map +1 -1
- package/dist/components.cjs.js +53 -19946
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +25 -19911
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +146 -0
- package/dist/constants.cjs.js.map +1 -0
- package/dist/constants.es.js +145 -0
- package/dist/constants.es.js.map +1 -0
- package/dist/descriptors.cjs.js +30 -0
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js +1 -1
- package/dist/descriptors.es.js.map +1 -1
- package/dist/instances.cjs.js +89 -0
- package/dist/instances.cjs.js.map +1 -0
- package/dist/instances.es.js +87 -0
- package/dist/instances.es.js.map +1 -0
- package/dist/main.cjs.js +4 -0
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +1 -1
- package/dist/next.cjs.js +168 -0
- package/dist/next.cjs.js.map +1 -0
- package/dist/next.es.js +157 -0
- package/dist/next.es.js.map +1 -0
- package/dist/prop-controllers.cjs.js +2 -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-builder-preview.cjs.js +257 -4111
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +258 -4116
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react.cjs.js +22 -0
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.cjs2.js +5777 -539
- package/dist/react.cjs2.js.map +1 -1
- package/dist/react.es.js +22 -0
- package/dist/react.es.js.map +1 -1
- package/dist/react.es2.js +5723 -540
- package/dist/react.es2.js.map +1 -1
- package/dist/types/api/constants.d.ts +4 -0
- package/dist/types/api/constants.d.ts.map +1 -0
- package/dist/types/api/generated/graphql.d.ts +61 -0
- package/dist/types/api/generated/graphql.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +3 -0
- package/dist/types/api/index.d.ts.map +1 -0
- package/dist/types/api/react.d.ts +6 -0
- package/dist/types/api/react.d.ts.map +1 -0
- package/dist/types/api/types.d.ts +4 -0
- package/dist/types/api/types.d.ts.map +1 -0
- package/dist/types/components/builtin/Box/Box.d.ts +5 -2
- package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
- package/dist/types/components/builtin/Box/index.d.ts +1 -1
- package/dist/types/components/builtin/Box/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Button/Button.d.ts +5 -2
- package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
- package/dist/types/components/builtin/Button/index.d.ts +1 -1
- package/dist/types/components/builtin/Button/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Carousel/Carousel.d.ts +5 -2
- package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
- package/dist/types/components/builtin/Carousel/index.d.ts +1 -1
- package/dist/types/components/builtin/Carousel/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Countdown/Countdown.d.ts +5 -2
- package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
- package/dist/types/components/builtin/Countdown/index.d.ts +1 -1
- package/dist/types/components/builtin/Countdown/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Divider/Divider.d.ts +5 -2
- package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -1
- package/dist/types/components/builtin/Divider/index.d.ts +1 -1
- package/dist/types/components/builtin/Divider/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Embed/Embed.d.ts +5 -2
- package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
- package/dist/types/components/builtin/Embed/index.d.ts +1 -1
- package/dist/types/components/builtin/Embed/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Image/Image.d.ts +5 -2
- package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/components/builtin/Image/index.d.ts +1 -1
- package/dist/types/components/builtin/Image/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/Navigation.d.ts +5 -2
- package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/index.d.ts +1 -1
- package/dist/types/components/builtin/Navigation/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Root/Root.d.ts +5 -2
- package/dist/types/components/builtin/Root/Root.d.ts.map +1 -1
- package/dist/types/components/builtin/Root/index.d.ts +1 -1
- package/dist/types/components/builtin/Root/index.d.ts.map +1 -1
- package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts +5 -2
- package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
- package/dist/types/components/builtin/SocialLinks/index.d.ts +1 -1
- package/dist/types/components/builtin/SocialLinks/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Text/Text.d.ts +19 -0
- package/dist/types/components/builtin/Text/Text.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts +24 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/hooks/useTypographyMark.d.ts +25 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/hooks/useTypographyMark.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts +13 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/index.d.ts +5 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesBlocks.d.ts +3 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesBlocks.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesMarks.d.ts +3 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesMarks.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Inlines.d.ts +3 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Inlines.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Link.d.ts +3 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Link.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/index.d.ts +2 -0
- package/dist/types/components/builtin/Text/index.d.ts.map +1 -0
- package/dist/types/components/builtin/index.d.ts +5 -1
- package/dist/types/components/builtin/index.d.ts.map +1 -1
- package/dist/types/components/hooks/useBackgrounds.d.ts.map +1 -1
- package/dist/types/components/hooks/useBorder.d.ts.map +1 -1
- package/dist/types/components/hooks/useBoxShadow.d.ts.map +1 -1
- package/dist/types/components/hooks/useColor.d.ts.map +1 -1
- package/dist/types/components/hooks/useFile.d.ts.map +1 -1
- package/dist/types/components/hooks/usePage.d.ts.map +1 -1
- package/dist/types/components/hooks/useTypography.d.ts +24 -0
- package/dist/types/components/hooks/useTypography.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/utils/devices.d.ts +1 -0
- package/dist/types/components/utils/devices.d.ts.map +1 -1
- package/dist/types/components/utils/queries.d.ts +6 -4
- package/dist/types/components/utils/queries.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/next.d.ts +20 -0
- package/dist/types/next.d.ts.map +1 -0
- package/dist/types/prop-controllers/descriptors.d.ts +1 -1
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/prop-controllers/index.d.ts +2 -0
- package/dist/types/prop-controllers/index.d.ts.map +1 -1
- package/dist/types/prop-controllers/instances.d.ts +63 -4
- package/dist/types/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/runtimes/react.d.ts +13 -7
- package/dist/types/runtimes/react.d.ts.map +1 -1
- package/dist/types/state/actions.d.ts +107 -13
- package/dist/types/state/actions.d.ts.map +1 -1
- package/dist/types/state/modules/box-models.d.ts +5 -5
- package/dist/types/state/modules/box-models.d.ts.map +1 -1
- package/dist/types/state/modules/prop-controller-handles.d.ts +4 -8
- package/dist/types/state/modules/prop-controller-handles.d.ts.map +1 -1
- package/dist/types/state/react-builder-preview.d.ts +5 -1
- package/dist/types/state/react-builder-preview.d.ts.map +1 -1
- package/dist/types/state/react-page.d.ts +1 -0
- package/dist/types/state/react-page.d.ts.map +1 -1
- package/dist/types/utils/coalesce.d.ts +3 -0
- package/dist/types/utils/coalesce.d.ts.map +1 -0
- package/dist/types/utils/constants.d.ts +6 -0
- package/dist/types/utils/constants.d.ts.map +1 -0
- package/dist/types/utils/intersection.d.ts +4 -0
- package/dist/types/utils/intersection.d.ts.map +1 -0
- package/dist/types/utils/keys.d.ts +5 -0
- package/dist/types/utils/keys.d.ts.map +1 -0
- package/dist/types/utils/shallowMerge.d.ts +2 -0
- package/dist/types/utils/shallowMerge.d.ts.map +1 -0
- package/next.js +1 -0
- package/package.json +48 -23
- package/prop-controllers.js +1 -0
- package/react.js +1 -0
- package/dist/types/components/BackgroundsContainer/components/BackgroundVideo/index.d.ts +0 -11
- package/dist/types/components/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +0 -1
- package/dist/types/components/BackgroundsContainer/components/Backgrounds/index.d.ts +0 -8
- package/dist/types/components/BackgroundsContainer/components/Backgrounds/index.d.ts.map +0 -1
- package/dist/types/components/BackgroundsContainer/components/Parallax/index.d.ts +0 -11
- package/dist/types/components/BackgroundsContainer/components/Parallax/index.d.ts.map +0 -1
- package/dist/types/components/BackgroundsContainer/index.d.ts +0 -11
- package/dist/types/components/BackgroundsContainer/index.d.ts.map +0 -1
- package/dist/types/components/Box/Box.d.ts +0 -30
- package/dist/types/components/Box/Box.d.ts.map +0 -1
- package/dist/types/components/Box/animations.d.ts +0 -69
- package/dist/types/components/Box/animations.d.ts.map +0 -1
- package/dist/types/components/Box/components/Placeholder/index.d.ts +0 -7
- package/dist/types/components/Box/components/Placeholder/index.d.ts.map +0 -1
- package/dist/types/components/Box/index.d.ts +0 -3
- package/dist/types/components/Box/index.d.ts.map +0 -1
- package/dist/types/components/Carousel/Carousel.d.ts +0 -25
- package/dist/types/components/Carousel/Carousel.d.ts.map +0 -1
- package/dist/types/components/Carousel/index.d.ts +0 -2
- package/dist/types/components/Carousel/index.d.ts.map +0 -1
- package/dist/types/components/Countdown/Countdown.d.ts +0 -24
- package/dist/types/components/Countdown/Countdown.d.ts.map +0 -1
- package/dist/types/components/Countdown/index.d.ts +0 -2
- package/dist/types/components/Countdown/index.d.ts.map +0 -1
- package/dist/types/components/Divider/Divider.d.ts +0 -14
- package/dist/types/components/Divider/Divider.d.ts.map +0 -1
- package/dist/types/components/Divider/index.d.ts +0 -2
- package/dist/types/components/Divider/index.d.ts.map +0 -1
- package/dist/types/components/Embed/Embed.d.ts +0 -11
- package/dist/types/components/Embed/Embed.d.ts.map +0 -1
- package/dist/types/components/Embed/index.d.ts +0 -2
- package/dist/types/components/Embed/index.d.ts.map +0 -1
- package/dist/types/components/Image/Image.d.ts +0 -26
- package/dist/types/components/Image/Image.d.ts.map +0 -1
- package/dist/types/components/Image/index.d.ts +0 -2
- package/dist/types/components/Image/index.d.ts.map +0 -1
- package/dist/types/components/Link/index.d.ts +0 -9
- package/dist/types/components/Link/index.d.ts.map +0 -1
- package/dist/types/components/RichText/index.d.ts +0 -5
- package/dist/types/components/RichText/index.d.ts.map +0 -1
- package/dist/types/components/Root/Root.d.ts +0 -11
- package/dist/types/components/Root/Root.d.ts.map +0 -1
- package/dist/types/components/Root/components/Placeholder/index.d.ts +0 -5
- package/dist/types/components/Root/components/Placeholder/index.d.ts.map +0 -1
- package/dist/types/components/Root/index.d.ts +0 -2
- package/dist/types/components/Root/index.d.ts.map +0 -1
package/api.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/api.cjs')
|
package/box-model.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/box-model.cjs')
|
package/components.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/components.cjs')
|
package/dist/actions.cjs.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const ActionTypes = {
|
|
3
|
+
INIT: "INIT",
|
|
4
|
+
CLEAN_UP: "CLEAN_UP",
|
|
3
5
|
CHANGE_DOCUMENT: "CHANGE_DOCUMENT",
|
|
4
6
|
REGISTER_COMPONENT: "REGISTER_COMPONENT",
|
|
5
7
|
UNREGISTER_COMPONENT: "UNREGISTER_COMPONENT",
|
|
@@ -7,13 +9,27 @@ const ActionTypes = {
|
|
|
7
9
|
UNREGISTER_REACT_COMPONENT: "UNREGISTER_REACT_COMPONENT",
|
|
8
10
|
MOUNT_COMPONENT: "MOUNT_COMPONENT",
|
|
9
11
|
UNMOUNT_COMPONENT: "UNMOUNT_COMPONENT",
|
|
10
|
-
|
|
12
|
+
REGISTER_COMPONENT_HANDLE: "REGISTER_COMPONENT_HANDLE",
|
|
13
|
+
UNREGISTER_COMPONENT_HANDLE: "UNREGISTER_COMPONENT_HANDLE",
|
|
11
14
|
REGISTER_MEASURABLE: "REGISTER_MEASURABLE",
|
|
12
15
|
UNREGISTER_MEASURABLE: "UNREGISTER_MEASURABLE",
|
|
13
16
|
CHANGE_ELEMENT_BOX_MODELS: "CHANGE_ELEMENT_BOX_MODELS",
|
|
14
17
|
CHANGE_DOCUMENT_ELEMENT_SIZE: "CHANGE_DOCUMENT_ELEMENT_SIZE",
|
|
15
|
-
CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: "CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP"
|
|
18
|
+
CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: "CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP",
|
|
19
|
+
REGISTER_PROP_CONTROLLERS_HANDLE: "REGISTER_PROP_CONTROLLERS_HANDLE",
|
|
20
|
+
UNREGISTER_PROP_CONTROLLERS_HANDLE: "UNREGISTER_PROP_CONTROLLERS_HANDLE",
|
|
21
|
+
REGISTER_PROP_CONTROLLERS: "REGISTER_PROP_CONTROLLERS",
|
|
22
|
+
UNREGISTER_PROP_CONTROLLERS: "UNREGISTER_PROP_CONTROLLERS",
|
|
23
|
+
MESSAGE_HOST_PROP_CONTROLLER: "MESSAGE_HOST_PROP_CONTROLLER",
|
|
24
|
+
MESSAGE_BUILDER_PROP_CONTROLLER: "MESSAGE_BUILDER_PROP_CONTROLLER",
|
|
25
|
+
CHANGE_API_RESOURCE: "CHANGE_API_RESOURCE"
|
|
16
26
|
};
|
|
27
|
+
function init() {
|
|
28
|
+
return { type: ActionTypes.INIT };
|
|
29
|
+
}
|
|
30
|
+
function cleanUp() {
|
|
31
|
+
return { type: ActionTypes.CLEAN_UP };
|
|
32
|
+
}
|
|
17
33
|
function changeDocument(documentKey, operation) {
|
|
18
34
|
return { type: ActionTypes.CHANGE_DOCUMENT, payload: { documentKey, operation } };
|
|
19
35
|
}
|
|
@@ -48,28 +64,45 @@ function registerReactComponentEffect(type, component) {
|
|
|
48
64
|
};
|
|
49
65
|
};
|
|
50
66
|
}
|
|
51
|
-
function mountComponent(elementKey) {
|
|
52
|
-
return { type: ActionTypes.MOUNT_COMPONENT, payload: { elementKey } };
|
|
67
|
+
function mountComponent(documentKey, elementKey) {
|
|
68
|
+
return { type: ActionTypes.MOUNT_COMPONENT, payload: { documentKey, elementKey } };
|
|
53
69
|
}
|
|
54
|
-
function unmountComponent(elementKey) {
|
|
55
|
-
return { type: ActionTypes.UNMOUNT_COMPONENT, payload: { elementKey } };
|
|
70
|
+
function unmountComponent(documentKey, elementKey) {
|
|
71
|
+
return { type: ActionTypes.UNMOUNT_COMPONENT, payload: { documentKey, elementKey } };
|
|
56
72
|
}
|
|
57
|
-
function mountComponentEffect(elementKey) {
|
|
73
|
+
function mountComponentEffect(documentKey, elementKey) {
|
|
58
74
|
return (dispatch) => {
|
|
59
|
-
dispatch(mountComponent(elementKey));
|
|
75
|
+
dispatch(mountComponent(documentKey, elementKey));
|
|
60
76
|
return () => {
|
|
61
|
-
dispatch(unmountComponent(elementKey));
|
|
77
|
+
dispatch(unmountComponent(documentKey, elementKey));
|
|
62
78
|
};
|
|
63
79
|
};
|
|
64
80
|
}
|
|
65
|
-
function
|
|
66
|
-
return {
|
|
81
|
+
function registerComponentHandle(documentKey, elementKey, componentHandle) {
|
|
82
|
+
return {
|
|
83
|
+
type: ActionTypes.REGISTER_COMPONENT_HANDLE,
|
|
84
|
+
payload: { documentKey, elementKey, componentHandle }
|
|
85
|
+
};
|
|
67
86
|
}
|
|
68
|
-
function
|
|
69
|
-
return { type: ActionTypes.
|
|
87
|
+
function unregisterComponentHandle(documentKey, elementKey) {
|
|
88
|
+
return { type: ActionTypes.UNREGISTER_COMPONENT_HANDLE, payload: { documentKey, elementKey } };
|
|
70
89
|
}
|
|
71
|
-
function
|
|
72
|
-
return
|
|
90
|
+
function registerComponentHandleEffect(documentKey, elementKey, componentHandle) {
|
|
91
|
+
return (dispatch) => {
|
|
92
|
+
dispatch(registerComponentHandle(documentKey, elementKey, componentHandle));
|
|
93
|
+
return () => {
|
|
94
|
+
dispatch(unregisterComponentHandle(documentKey, elementKey));
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function registerMeasurable(documentKey, elementKey, measurable) {
|
|
99
|
+
return { type: ActionTypes.REGISTER_MEASURABLE, payload: { documentKey, elementKey, measurable } };
|
|
100
|
+
}
|
|
101
|
+
function unregisterMeasurable(documentKey, elementKey) {
|
|
102
|
+
return { type: ActionTypes.UNREGISTER_MEASURABLE, payload: { documentKey, elementKey } };
|
|
103
|
+
}
|
|
104
|
+
function changeElementBoxModels(changedElementBoxModels) {
|
|
105
|
+
return { type: ActionTypes.CHANGE_ELEMENT_BOX_MODELS, payload: { changedElementBoxModels } };
|
|
73
106
|
}
|
|
74
107
|
function changeDocumentElementSize(size) {
|
|
75
108
|
return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE, payload: { size } };
|
|
@@ -77,15 +110,54 @@ function changeDocumentElementSize(size) {
|
|
|
77
110
|
function changeDocumentElementScrollTop(scrollTop) {
|
|
78
111
|
return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP, payload: { scrollTop } };
|
|
79
112
|
}
|
|
113
|
+
function registerPropControllersHandle(documentKey, elementKey, handle) {
|
|
114
|
+
return {
|
|
115
|
+
type: ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE,
|
|
116
|
+
payload: { documentKey, elementKey, handle }
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function registerPropControllers(documentKey, elementKey, propControllers) {
|
|
120
|
+
return {
|
|
121
|
+
type: ActionTypes.REGISTER_PROP_CONTROLLERS,
|
|
122
|
+
payload: { documentKey, elementKey, propControllers }
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function unregisterPropControllers(documentKey, elementKey) {
|
|
126
|
+
return { type: ActionTypes.UNREGISTER_PROP_CONTROLLERS, payload: { documentKey, elementKey } };
|
|
127
|
+
}
|
|
128
|
+
function messageHostPropController(documentKey, elementKey, propName, message) {
|
|
129
|
+
return {
|
|
130
|
+
type: ActionTypes.MESSAGE_HOST_PROP_CONTROLLER,
|
|
131
|
+
payload: { documentKey, elementKey, propName, message }
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function messageBuilderPropController(documentKey, elementKey, propName, message) {
|
|
135
|
+
return {
|
|
136
|
+
type: ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER,
|
|
137
|
+
payload: { documentKey, elementKey, propName, message }
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function changeApiResource(resource) {
|
|
141
|
+
return { type: ActionTypes.CHANGE_API_RESOURCE, payload: { resource } };
|
|
142
|
+
}
|
|
80
143
|
exports.ActionTypes = ActionTypes;
|
|
81
|
-
exports.
|
|
144
|
+
exports.changeApiResource = changeApiResource;
|
|
82
145
|
exports.changeDocument = changeDocument;
|
|
83
146
|
exports.changeDocumentElementScrollTop = changeDocumentElementScrollTop;
|
|
84
147
|
exports.changeDocumentElementSize = changeDocumentElementSize;
|
|
148
|
+
exports.changeElementBoxModels = changeElementBoxModels;
|
|
149
|
+
exports.cleanUp = cleanUp;
|
|
150
|
+
exports.init = init;
|
|
151
|
+
exports.messageBuilderPropController = messageBuilderPropController;
|
|
152
|
+
exports.messageHostPropController = messageHostPropController;
|
|
85
153
|
exports.mountComponentEffect = mountComponentEffect;
|
|
86
154
|
exports.registerComponent = registerComponent;
|
|
87
155
|
exports.registerComponentEffect = registerComponentEffect;
|
|
156
|
+
exports.registerComponentHandleEffect = registerComponentHandleEffect;
|
|
88
157
|
exports.registerMeasurable = registerMeasurable;
|
|
158
|
+
exports.registerPropControllers = registerPropControllers;
|
|
159
|
+
exports.registerPropControllersHandle = registerPropControllersHandle;
|
|
89
160
|
exports.registerReactComponentEffect = registerReactComponentEffect;
|
|
90
161
|
exports.unregisterMeasurable = unregisterMeasurable;
|
|
162
|
+
exports.unregisterPropControllers = unregisterPropControllers;
|
|
91
163
|
//# sourceMappingURL=actions.cjs.js.map
|
package/dist/actions.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.cjs.js","sources":["../src/state/actions.ts"],"sourcesContent":["import type { Operation } from 'ot-json0'\n\nimport type { ComponentType } from './modules/react-components'\nimport type { Measurable, BoxModel } from './modules/box-models'\nimport type { ThunkAction } from 'redux-thunk'\nimport { ComponentMeta } from './modules/components-meta'\nimport { PropControllerDescriptor } from '../prop-controllers'\nimport type { Size } from './react-builder-preview'\n\nexport const ActionTypes = {\n CHANGE_DOCUMENT: 'CHANGE_DOCUMENT',\n\n REGISTER_COMPONENT: 'REGISTER_COMPONENT',\n UNREGISTER_COMPONENT: 'UNREGISTER_COMPONENT',\n\n REGISTER_REACT_COMPONENT: 'REGISTER_REACT_COMPONENT',\n UNREGISTER_REACT_COMPONENT: 'UNREGISTER_REACT_COMPONENT',\n\n MOUNT_COMPONENT: 'MOUNT_COMPONENT',\n UNMOUNT_COMPONENT: 'UNMOUNT_COMPONENT',\n\n CHANGE_COMPONENT_HANDLE: 'CHANGE_COMPONENT_HANDLE',\n\n REGISTER_MEASURABLE: 'REGISTER_MEASURABLE',\n UNREGISTER_MEASURABLE: 'UNREGISTER_MEASURABLE',\n\n CHANGE_ELEMENT_BOX_MODELS: 'CHANGE_ELEMENT_BOX_MODELS',\n\n CHANGE_DOCUMENT_ELEMENT_SIZE: 'CHANGE_DOCUMENT_ELEMENT_SIZE',\n CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: 'CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP',\n} as const\n\ntype ChangeDocumentAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT\n payload: { documentKey: string; operation: Operation }\n}\n\ntype RegisterComponentAction = {\n type: typeof ActionTypes.REGISTER_COMPONENT\n payload: {\n type: string\n meta: ComponentMeta\n propControllerDescriptors: Record<string, PropControllerDescriptor>\n }\n}\n\ntype UnregisterComponentAction = {\n type: typeof ActionTypes.UNREGISTER_COMPONENT\n payload: { type: string }\n}\n\ntype RegisterReactComponentAction = {\n type: typeof ActionTypes.REGISTER_REACT_COMPONENT\n payload: { type: string; component: ComponentType }\n}\n\ntype UnregisterReactComponentAction = {\n type: typeof ActionTypes.UNREGISTER_REACT_COMPONENT\n payload: { type: string }\n}\n\ntype MountComponentAction = {\n type: typeof ActionTypes.MOUNT_COMPONENT\n payload: { elementKey: string }\n}\n\ntype UnmountComponentAction = {\n type: typeof ActionTypes.UNMOUNT_COMPONENT\n payload: { elementKey: string }\n}\n\ntype ChangeComponentHandleAction = {\n type: typeof ActionTypes.CHANGE_COMPONENT_HANDLE\n payload: { elementKey: string; componentHandle: unknown }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof ActionTypes.REGISTER_MEASURABLE\n payload: { elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof ActionTypes.UNREGISTER_MEASURABLE\n payload: { elementKey: string }\n}\n\ntype ChangeElementBoxModelsAction = {\n type: typeof ActionTypes.CHANGE_ELEMENT_BOX_MODELS\n payload: { changedElementBoxModels: Map<string, BoxModel | null> }\n}\n\ntype ChangeDocumentElementSizeAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE\n payload: { size: Size }\n}\n\ntype ChangeDocumentElementScrollTopAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP\n payload: { scrollTop: number }\n}\n\nexport type Action =\n | ChangeDocumentAction\n | RegisterComponentAction\n | UnregisterComponentAction\n | RegisterReactComponentAction\n | UnregisterReactComponentAction\n | MountComponentAction\n | UnmountComponentAction\n | ChangeComponentHandleAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | ChangeElementBoxModelsAction\n | ChangeDocumentElementSizeAction\n | ChangeDocumentElementScrollTopAction\n\nexport function changeDocument(documentKey: string, operation: Operation): ChangeDocumentAction {\n return { type: ActionTypes.CHANGE_DOCUMENT, payload: { documentKey, operation } }\n}\n\nexport function registerComponent(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): RegisterComponentAction {\n return {\n type: ActionTypes.REGISTER_COMPONENT,\n payload: { type, meta, propControllerDescriptors },\n }\n}\n\nexport function unregisterComponent(type: string): UnregisterComponentAction {\n return { type: ActionTypes.UNREGISTER_COMPONENT, payload: { type } }\n}\n\nexport function registerComponentEffect(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerComponent(type, meta, propControllerDescriptors))\n\n return () => {\n dispatch(unregisterComponent(type))\n }\n }\n}\n\nfunction registerReactComponent(\n type: string,\n component: ComponentType,\n): RegisterReactComponentAction {\n return { type: ActionTypes.REGISTER_REACT_COMPONENT, payload: { type, component } }\n}\n\nfunction unregisterReactComponent(type: string): UnregisterReactComponentAction {\n return { type: ActionTypes.UNREGISTER_REACT_COMPONENT, payload: { type } }\n}\n\nexport function registerReactComponentEffect(\n type: string,\n component: ComponentType,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerReactComponent(type, component))\n\n return () => {\n dispatch(unregisterReactComponent(type))\n }\n }\n}\n\nexport function mountComponent(elementKey: string): MountComponentAction {\n return { type: ActionTypes.MOUNT_COMPONENT, payload: { elementKey } }\n}\n\nexport function unmountComponent(elementKey: string): UnmountComponentAction {\n return { type: ActionTypes.UNMOUNT_COMPONENT, payload: { elementKey } }\n}\n\nexport function mountComponentEffect(\n elementKey: string,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(mountComponent(elementKey))\n\n return () => {\n dispatch(unmountComponent(elementKey))\n }\n }\n}\n\nexport function changeComponentHandle(\n elementKey: string,\n componentHandle: unknown,\n): ChangeComponentHandleAction {\n return { type: ActionTypes.CHANGE_COMPONENT_HANDLE, payload: { elementKey, componentHandle } }\n}\n\nexport function registerMeasurable(\n elementKey: string,\n measurable: Measurable,\n): RegisterMeasurableAction {\n return { type: ActionTypes.REGISTER_MEASURABLE, payload: { elementKey, measurable } }\n}\n\nexport function unregisterMeasurable(elementKey: string): UnregisterMeasurableAction {\n return { type: ActionTypes.UNREGISTER_MEASURABLE, payload: { elementKey } }\n}\n\nexport function registerMeasurableEffect(\n elementKey: string,\n measurable: Measurable,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerMeasurable(elementKey, measurable))\n\n return () => {\n dispatch(unregisterMeasurable(elementKey))\n }\n }\n}\n\nexport function changeElementBoxModels(\n changedElementBoxModels: Map<string, BoxModel | null>,\n): ChangeElementBoxModelsAction {\n return { type: ActionTypes.CHANGE_ELEMENT_BOX_MODELS, payload: { changedElementBoxModels } }\n}\n\nexport function changeDocumentElementSize(size: Size): ChangeDocumentElementSizeAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE, payload: { size } }\n}\n\nexport function changeDocumentElementScrollTop(\n scrollTop: number,\n): ChangeDocumentElementScrollTopAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP, payload: { scrollTop } }\n}\n"],"names":[],"mappings":";MASa,cAAc;AAAA,EACzB,iBAAiB;AAAA,EAEjB,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EAEtB,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAE5B,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EAEnB,yBAAyB;AAAA,EAEzB,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EAEvB,2BAA2B;AAAA,EAE3B,8BAA8B;AAAA,EAC9B,oCAAoC;AAAA;wBAuFP,aAAqB,WAA4C;SACvF,EAAE,MAAM,YAAY,iBAAiB,SAAS,EAAE,aAAa;AAAA;2BAIpE,MACA,MACA,2BACyB;SAClB;AAAA,IACL,MAAM,YAAY;AAAA,IAClB,SAAS,EAAE,MAAM,MAAM;AAAA;AAAA;6BAIS,MAAyC;SACpE,EAAE,MAAM,YAAY,sBAAsB,SAAS,EAAE;AAAA;iCAI5D,MACA,MACA,2BACmD;SAC5C,cAAY;aACR,kBAAkB,MAAM,MAAM;WAEhC,MAAM;eACF,oBAAoB;AAAA;AAAA;AAAA;AAKnC,gCACE,MACA,WAC8B;SACvB,EAAE,MAAM,YAAY,0BAA0B,SAAS,EAAE,MAAM;AAAA;AAGxE,kCAAkC,MAA8C;SACvE,EAAE,MAAM,YAAY,4BAA4B,SAAS,EAAE;AAAA;sCAIlE,MACA,WACmD;SAC5C,cAAY;aACR,uBAAuB,MAAM;WAE/B,MAAM;eACF,yBAAyB;AAAA;AAAA;AAAA;wBAKT,YAA0C;SAChE,EAAE,MAAM,YAAY,iBAAiB,SAAS,EAAE;AAAA;0BAGxB,YAA4C;SACpE,EAAE,MAAM,YAAY,mBAAmB,SAAS,EAAE;AAAA;8BAIzD,YACmD;SAC5C,cAAY;aACR,eAAe;WAEjB,MAAM;eACF,iBAAiB;AAAA;AAAA;AAAA;+BAM9B,YACA,iBAC6B;SACtB,EAAE,MAAM,YAAY,yBAAyB,SAAS,EAAE,YAAY;AAAA;4BAI3E,YACA,YAC0B;SACnB,EAAE,MAAM,YAAY,qBAAqB,SAAS,EAAE,YAAY;AAAA;8BAGpC,YAAgD;SAC5E,EAAE,MAAM,YAAY,uBAAuB,SAAS,EAAE;AAAA;mCAsBrB,MAA6C;SAC9E,EAAE,MAAM,YAAY,8BAA8B,SAAS,EAAE;AAAA;wCAIpE,WACsC;SAC/B,EAAE,MAAM,YAAY,oCAAoC,SAAS,EAAE;AAAA;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"actions.cjs.js","sources":["../src/state/actions.ts"],"sourcesContent":["import type { Operation } from 'ot-json0'\n\nimport type { ComponentType } from './modules/react-components'\nimport type { Measurable, BoxModel } from './modules/box-models'\nimport type { ThunkAction } from 'redux-thunk'\nimport { ComponentMeta } from './modules/components-meta'\nimport { PropControllerDescriptor } from '../prop-controllers'\nimport type { Size } from './react-builder-preview'\nimport type { PropControllersHandle } from './modules/prop-controller-handles'\nimport type { PropController, PropControllerMessage } from '../prop-controllers/instances'\nimport type { APIResource } from '../api/types'\n\nexport const ActionTypes = {\n INIT: 'INIT',\n CLEAN_UP: 'CLEAN_UP',\n\n CHANGE_DOCUMENT: 'CHANGE_DOCUMENT',\n\n REGISTER_COMPONENT: 'REGISTER_COMPONENT',\n UNREGISTER_COMPONENT: 'UNREGISTER_COMPONENT',\n\n REGISTER_REACT_COMPONENT: 'REGISTER_REACT_COMPONENT',\n UNREGISTER_REACT_COMPONENT: 'UNREGISTER_REACT_COMPONENT',\n\n MOUNT_COMPONENT: 'MOUNT_COMPONENT',\n UNMOUNT_COMPONENT: 'UNMOUNT_COMPONENT',\n\n REGISTER_COMPONENT_HANDLE: 'REGISTER_COMPONENT_HANDLE',\n UNREGISTER_COMPONENT_HANDLE: 'UNREGISTER_COMPONENT_HANDLE',\n\n REGISTER_MEASURABLE: 'REGISTER_MEASURABLE',\n UNREGISTER_MEASURABLE: 'UNREGISTER_MEASURABLE',\n\n CHANGE_ELEMENT_BOX_MODELS: 'CHANGE_ELEMENT_BOX_MODELS',\n\n CHANGE_DOCUMENT_ELEMENT_SIZE: 'CHANGE_DOCUMENT_ELEMENT_SIZE',\n CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: 'CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP',\n\n REGISTER_PROP_CONTROLLERS_HANDLE: 'REGISTER_PROP_CONTROLLERS_HANDLE',\n UNREGISTER_PROP_CONTROLLERS_HANDLE: 'UNREGISTER_PROP_CONTROLLERS_HANDLE',\n REGISTER_PROP_CONTROLLERS: 'REGISTER_PROP_CONTROLLERS',\n UNREGISTER_PROP_CONTROLLERS: 'UNREGISTER_PROP_CONTROLLERS',\n MESSAGE_HOST_PROP_CONTROLLER: 'MESSAGE_HOST_PROP_CONTROLLER',\n MESSAGE_BUILDER_PROP_CONTROLLER: 'MESSAGE_BUILDER_PROP_CONTROLLER',\n\n CHANGE_API_RESOURCE: 'CHANGE_API_RESOURCE',\n} as const\n\ntype InitAction = { type: typeof ActionTypes.INIT }\n\ntype CleanUpAction = { type: typeof ActionTypes.CLEAN_UP }\n\ntype ChangeDocumentAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT\n payload: { documentKey: string; operation: Operation }\n}\n\ntype RegisterComponentAction = {\n type: typeof ActionTypes.REGISTER_COMPONENT\n payload: {\n type: string\n meta: ComponentMeta\n propControllerDescriptors: Record<string, PropControllerDescriptor>\n }\n}\n\ntype UnregisterComponentAction = {\n type: typeof ActionTypes.UNREGISTER_COMPONENT\n payload: { type: string }\n}\n\ntype RegisterReactComponentAction = {\n type: typeof ActionTypes.REGISTER_REACT_COMPONENT\n payload: { type: string; component: ComponentType }\n}\n\ntype UnregisterReactComponentAction = {\n type: typeof ActionTypes.UNREGISTER_REACT_COMPONENT\n payload: { type: string }\n}\n\ntype MountComponentAction = {\n type: typeof ActionTypes.MOUNT_COMPONENT\n payload: { documentKey: string; elementKey: string }\n}\n\ntype UnmountComponentAction = {\n type: typeof ActionTypes.UNMOUNT_COMPONENT\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterComponentHandleAction = {\n type: typeof ActionTypes.REGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string; componentHandle: unknown }\n}\n\ntype UnregisterComponentHandleAction = {\n type: typeof ActionTypes.UNREGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof ActionTypes.REGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof ActionTypes.UNREGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype ChangeElementBoxModelsAction = {\n type: typeof ActionTypes.CHANGE_ELEMENT_BOX_MODELS\n payload: { changedElementBoxModels: Map<string, Map<string, BoxModel | null>> }\n}\n\ntype ChangeDocumentElementSizeAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE\n payload: { size: Size }\n}\n\ntype ChangeDocumentElementScrollTopAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP\n payload: { scrollTop: number }\n}\n\ntype RegisterPropControllersHandleAction = {\n type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string; handle: PropControllersHandle }\n}\n\ntype UnregisterPropControllersHandleAction = {\n type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersAction = {\n type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS\n payload: {\n documentKey: string\n elementKey: string\n propControllers: Record<string, PropController>\n }\n}\n\ntype UnregisterPropControllersAction = {\n type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS\n payload: { documentKey: string; elementKey: string }\n}\n\ntype MessageHostPropControllerAction<T = PropControllerMessage> = {\n type: typeof ActionTypes.MESSAGE_HOST_PROP_CONTROLLER\n payload: { documentKey: string; elementKey: string; propName: string; message: T }\n}\n\ntype MessageBuilderPropControllerAction<T = PropControllerMessage> = {\n type: typeof ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER\n payload: { documentKey: string; elementKey: string; propName: string; message: T }\n}\n\ntype ChangeAPIResourceAction = {\n type: typeof ActionTypes.CHANGE_API_RESOURCE\n payload: { resource: APIResource }\n}\n\nexport type Action =\n | InitAction\n | CleanUpAction\n | ChangeDocumentAction\n | RegisterComponentAction\n | UnregisterComponentAction\n | RegisterReactComponentAction\n | UnregisterReactComponentAction\n | MountComponentAction\n | UnmountComponentAction\n | RegisterComponentHandleAction\n | UnregisterComponentHandleAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | ChangeElementBoxModelsAction\n | ChangeDocumentElementSizeAction\n | ChangeDocumentElementScrollTopAction\n | RegisterPropControllersHandleAction\n | UnregisterPropControllersHandleAction\n | RegisterPropControllersAction\n | UnregisterPropControllersAction\n | MessageHostPropControllerAction\n | MessageBuilderPropControllerAction\n | ChangeAPIResourceAction\n\nexport function init(): InitAction {\n return { type: ActionTypes.INIT }\n}\n\nexport function cleanUp(): CleanUpAction {\n return { type: ActionTypes.CLEAN_UP }\n}\n\nexport function changeDocument(documentKey: string, operation: Operation): ChangeDocumentAction {\n return { type: ActionTypes.CHANGE_DOCUMENT, payload: { documentKey, operation } }\n}\n\nexport function registerComponent(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): RegisterComponentAction {\n return {\n type: ActionTypes.REGISTER_COMPONENT,\n payload: { type, meta, propControllerDescriptors },\n }\n}\n\nexport function unregisterComponent(type: string): UnregisterComponentAction {\n return { type: ActionTypes.UNREGISTER_COMPONENT, payload: { type } }\n}\n\nexport function registerComponentEffect(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerComponent(type, meta, propControllerDescriptors))\n\n return () => {\n dispatch(unregisterComponent(type))\n }\n }\n}\n\nfunction registerReactComponent(\n type: string,\n component: ComponentType,\n): RegisterReactComponentAction {\n return { type: ActionTypes.REGISTER_REACT_COMPONENT, payload: { type, component } }\n}\n\nfunction unregisterReactComponent(type: string): UnregisterReactComponentAction {\n return { type: ActionTypes.UNREGISTER_REACT_COMPONENT, payload: { type } }\n}\n\nexport function registerReactComponentEffect(\n type: string,\n component: ComponentType,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerReactComponent(type, component))\n\n return () => {\n dispatch(unregisterReactComponent(type))\n }\n }\n}\n\nexport function mountComponent(documentKey: string, elementKey: string): MountComponentAction {\n return { type: ActionTypes.MOUNT_COMPONENT, payload: { documentKey, elementKey } }\n}\n\nexport function unmountComponent(documentKey: string, elementKey: string): UnmountComponentAction {\n return { type: ActionTypes.UNMOUNT_COMPONENT, payload: { documentKey, elementKey } }\n}\n\nexport function mountComponentEffect(\n documentKey: string,\n elementKey: string,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(mountComponent(documentKey, elementKey))\n\n return () => {\n dispatch(unmountComponent(documentKey, elementKey))\n }\n }\n}\n\nfunction registerComponentHandle(\n documentKey: string,\n elementKey: string,\n componentHandle: unknown,\n): RegisterComponentHandleAction {\n return {\n type: ActionTypes.REGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey, componentHandle },\n }\n}\n\nfunction unregisterComponentHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterComponentHandleAction {\n return { type: ActionTypes.UNREGISTER_COMPONENT_HANDLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerComponentHandleEffect(\n documentKey: string,\n elementKey: string,\n componentHandle: unknown,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerComponentHandle(documentKey, elementKey, componentHandle))\n\n return () => {\n dispatch(unregisterComponentHandle(documentKey, elementKey))\n }\n }\n}\n\nexport function registerMeasurable(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): RegisterMeasurableAction {\n return { type: ActionTypes.REGISTER_MEASURABLE, payload: { documentKey, elementKey, measurable } }\n}\n\nexport function unregisterMeasurable(\n documentKey: string,\n elementKey: string,\n): UnregisterMeasurableAction {\n return { type: ActionTypes.UNREGISTER_MEASURABLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerMeasurableEffect(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerMeasurable(documentKey, elementKey, measurable))\n\n return () => {\n dispatch(unregisterMeasurable(documentKey, elementKey))\n }\n }\n}\n\nexport function changeElementBoxModels(\n changedElementBoxModels: Map<string, Map<string, BoxModel | null>>,\n): ChangeElementBoxModelsAction {\n return { type: ActionTypes.CHANGE_ELEMENT_BOX_MODELS, payload: { changedElementBoxModels } }\n}\n\nexport function changeDocumentElementSize(size: Size): ChangeDocumentElementSizeAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE, payload: { size } }\n}\n\nexport function changeDocumentElementScrollTop(\n scrollTop: number,\n): ChangeDocumentElementScrollTopAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP, payload: { scrollTop } }\n}\n\nexport function registerPropControllersHandle(\n documentKey: string,\n elementKey: string,\n handle: PropControllersHandle,\n): RegisterPropControllersHandleAction {\n return {\n type: ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey, handle },\n }\n}\n\nexport function unregisterPropControllersHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersHandleAction {\n return {\n type: ActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerPropControllers(\n documentKey: string,\n elementKey: string,\n propControllers: Record<string, PropController>,\n): RegisterPropControllersAction {\n return {\n type: ActionTypes.REGISTER_PROP_CONTROLLERS,\n payload: { documentKey, elementKey, propControllers },\n }\n}\n\nexport function unregisterPropControllers(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersAction {\n return { type: ActionTypes.UNREGISTER_PROP_CONTROLLERS, payload: { documentKey, elementKey } }\n}\n\nexport function messageHostPropController<T>(\n documentKey: string,\n elementKey: string,\n propName: string,\n message: T,\n): MessageHostPropControllerAction<T> {\n return {\n type: ActionTypes.MESSAGE_HOST_PROP_CONTROLLER,\n payload: { documentKey, elementKey, propName, message },\n }\n}\n\nexport function messageBuilderPropController<T>(\n documentKey: string,\n elementKey: string,\n propName: string,\n message: T,\n): MessageBuilderPropControllerAction<T> {\n return {\n type: ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER,\n payload: { documentKey, elementKey, propName, message },\n }\n}\n\nexport function changeApiResource(resource: APIResource): ChangeAPIResourceAction {\n return { type: ActionTypes.CHANGE_API_RESOURCE, payload: { resource } }\n}\n"],"names":[],"mappings":"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"}
|
package/dist/actions.es.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
const ActionTypes = {
|
|
2
|
+
INIT: "INIT",
|
|
3
|
+
CLEAN_UP: "CLEAN_UP",
|
|
2
4
|
CHANGE_DOCUMENT: "CHANGE_DOCUMENT",
|
|
3
5
|
REGISTER_COMPONENT: "REGISTER_COMPONENT",
|
|
4
6
|
UNREGISTER_COMPONENT: "UNREGISTER_COMPONENT",
|
|
@@ -6,13 +8,27 @@ const ActionTypes = {
|
|
|
6
8
|
UNREGISTER_REACT_COMPONENT: "UNREGISTER_REACT_COMPONENT",
|
|
7
9
|
MOUNT_COMPONENT: "MOUNT_COMPONENT",
|
|
8
10
|
UNMOUNT_COMPONENT: "UNMOUNT_COMPONENT",
|
|
9
|
-
|
|
11
|
+
REGISTER_COMPONENT_HANDLE: "REGISTER_COMPONENT_HANDLE",
|
|
12
|
+
UNREGISTER_COMPONENT_HANDLE: "UNREGISTER_COMPONENT_HANDLE",
|
|
10
13
|
REGISTER_MEASURABLE: "REGISTER_MEASURABLE",
|
|
11
14
|
UNREGISTER_MEASURABLE: "UNREGISTER_MEASURABLE",
|
|
12
15
|
CHANGE_ELEMENT_BOX_MODELS: "CHANGE_ELEMENT_BOX_MODELS",
|
|
13
16
|
CHANGE_DOCUMENT_ELEMENT_SIZE: "CHANGE_DOCUMENT_ELEMENT_SIZE",
|
|
14
|
-
CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: "CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP"
|
|
17
|
+
CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: "CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP",
|
|
18
|
+
REGISTER_PROP_CONTROLLERS_HANDLE: "REGISTER_PROP_CONTROLLERS_HANDLE",
|
|
19
|
+
UNREGISTER_PROP_CONTROLLERS_HANDLE: "UNREGISTER_PROP_CONTROLLERS_HANDLE",
|
|
20
|
+
REGISTER_PROP_CONTROLLERS: "REGISTER_PROP_CONTROLLERS",
|
|
21
|
+
UNREGISTER_PROP_CONTROLLERS: "UNREGISTER_PROP_CONTROLLERS",
|
|
22
|
+
MESSAGE_HOST_PROP_CONTROLLER: "MESSAGE_HOST_PROP_CONTROLLER",
|
|
23
|
+
MESSAGE_BUILDER_PROP_CONTROLLER: "MESSAGE_BUILDER_PROP_CONTROLLER",
|
|
24
|
+
CHANGE_API_RESOURCE: "CHANGE_API_RESOURCE"
|
|
15
25
|
};
|
|
26
|
+
function init() {
|
|
27
|
+
return { type: ActionTypes.INIT };
|
|
28
|
+
}
|
|
29
|
+
function cleanUp() {
|
|
30
|
+
return { type: ActionTypes.CLEAN_UP };
|
|
31
|
+
}
|
|
16
32
|
function changeDocument(documentKey, operation) {
|
|
17
33
|
return { type: ActionTypes.CHANGE_DOCUMENT, payload: { documentKey, operation } };
|
|
18
34
|
}
|
|
@@ -47,28 +63,45 @@ function registerReactComponentEffect(type, component) {
|
|
|
47
63
|
};
|
|
48
64
|
};
|
|
49
65
|
}
|
|
50
|
-
function mountComponent(elementKey) {
|
|
51
|
-
return { type: ActionTypes.MOUNT_COMPONENT, payload: { elementKey } };
|
|
66
|
+
function mountComponent(documentKey, elementKey) {
|
|
67
|
+
return { type: ActionTypes.MOUNT_COMPONENT, payload: { documentKey, elementKey } };
|
|
52
68
|
}
|
|
53
|
-
function unmountComponent(elementKey) {
|
|
54
|
-
return { type: ActionTypes.UNMOUNT_COMPONENT, payload: { elementKey } };
|
|
69
|
+
function unmountComponent(documentKey, elementKey) {
|
|
70
|
+
return { type: ActionTypes.UNMOUNT_COMPONENT, payload: { documentKey, elementKey } };
|
|
55
71
|
}
|
|
56
|
-
function mountComponentEffect(elementKey) {
|
|
72
|
+
function mountComponentEffect(documentKey, elementKey) {
|
|
57
73
|
return (dispatch) => {
|
|
58
|
-
dispatch(mountComponent(elementKey));
|
|
74
|
+
dispatch(mountComponent(documentKey, elementKey));
|
|
59
75
|
return () => {
|
|
60
|
-
dispatch(unmountComponent(elementKey));
|
|
76
|
+
dispatch(unmountComponent(documentKey, elementKey));
|
|
61
77
|
};
|
|
62
78
|
};
|
|
63
79
|
}
|
|
64
|
-
function
|
|
65
|
-
return {
|
|
80
|
+
function registerComponentHandle(documentKey, elementKey, componentHandle) {
|
|
81
|
+
return {
|
|
82
|
+
type: ActionTypes.REGISTER_COMPONENT_HANDLE,
|
|
83
|
+
payload: { documentKey, elementKey, componentHandle }
|
|
84
|
+
};
|
|
66
85
|
}
|
|
67
|
-
function
|
|
68
|
-
return { type: ActionTypes.
|
|
86
|
+
function unregisterComponentHandle(documentKey, elementKey) {
|
|
87
|
+
return { type: ActionTypes.UNREGISTER_COMPONENT_HANDLE, payload: { documentKey, elementKey } };
|
|
69
88
|
}
|
|
70
|
-
function
|
|
71
|
-
return
|
|
89
|
+
function registerComponentHandleEffect(documentKey, elementKey, componentHandle) {
|
|
90
|
+
return (dispatch) => {
|
|
91
|
+
dispatch(registerComponentHandle(documentKey, elementKey, componentHandle));
|
|
92
|
+
return () => {
|
|
93
|
+
dispatch(unregisterComponentHandle(documentKey, elementKey));
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function registerMeasurable(documentKey, elementKey, measurable) {
|
|
98
|
+
return { type: ActionTypes.REGISTER_MEASURABLE, payload: { documentKey, elementKey, measurable } };
|
|
99
|
+
}
|
|
100
|
+
function unregisterMeasurable(documentKey, elementKey) {
|
|
101
|
+
return { type: ActionTypes.UNREGISTER_MEASURABLE, payload: { documentKey, elementKey } };
|
|
102
|
+
}
|
|
103
|
+
function changeElementBoxModels(changedElementBoxModels) {
|
|
104
|
+
return { type: ActionTypes.CHANGE_ELEMENT_BOX_MODELS, payload: { changedElementBoxModels } };
|
|
72
105
|
}
|
|
73
106
|
function changeDocumentElementSize(size) {
|
|
74
107
|
return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE, payload: { size } };
|
|
@@ -76,5 +109,35 @@ function changeDocumentElementSize(size) {
|
|
|
76
109
|
function changeDocumentElementScrollTop(scrollTop) {
|
|
77
110
|
return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP, payload: { scrollTop } };
|
|
78
111
|
}
|
|
79
|
-
|
|
112
|
+
function registerPropControllersHandle(documentKey, elementKey, handle) {
|
|
113
|
+
return {
|
|
114
|
+
type: ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE,
|
|
115
|
+
payload: { documentKey, elementKey, handle }
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function registerPropControllers(documentKey, elementKey, propControllers) {
|
|
119
|
+
return {
|
|
120
|
+
type: ActionTypes.REGISTER_PROP_CONTROLLERS,
|
|
121
|
+
payload: { documentKey, elementKey, propControllers }
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function unregisterPropControllers(documentKey, elementKey) {
|
|
125
|
+
return { type: ActionTypes.UNREGISTER_PROP_CONTROLLERS, payload: { documentKey, elementKey } };
|
|
126
|
+
}
|
|
127
|
+
function messageHostPropController(documentKey, elementKey, propName, message) {
|
|
128
|
+
return {
|
|
129
|
+
type: ActionTypes.MESSAGE_HOST_PROP_CONTROLLER,
|
|
130
|
+
payload: { documentKey, elementKey, propName, message }
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function messageBuilderPropController(documentKey, elementKey, propName, message) {
|
|
134
|
+
return {
|
|
135
|
+
type: ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER,
|
|
136
|
+
payload: { documentKey, elementKey, propName, message }
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function changeApiResource(resource) {
|
|
140
|
+
return { type: ActionTypes.CHANGE_API_RESOURCE, payload: { resource } };
|
|
141
|
+
}
|
|
142
|
+
export { ActionTypes as A, changeDocumentElementScrollTop as a, cleanUp as b, changeDocument as c, changeApiResource as d, mountComponentEffect as e, registerComponentEffect as f, registerReactComponentEffect as g, changeElementBoxModels as h, init as i, changeDocumentElementSize as j, registerComponent as k, registerMeasurable as l, messageHostPropController as m, unregisterPropControllers as n, registerPropControllersHandle as o, registerPropControllers as p, messageBuilderPropController as q, registerComponentHandleEffect as r, unregisterMeasurable as u };
|
|
80
143
|
//# sourceMappingURL=actions.es.js.map
|
package/dist/actions.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.es.js","sources":["../src/state/actions.ts"],"sourcesContent":["import type { Operation } from 'ot-json0'\n\nimport type { ComponentType } from './modules/react-components'\nimport type { Measurable, BoxModel } from './modules/box-models'\nimport type { ThunkAction } from 'redux-thunk'\nimport { ComponentMeta } from './modules/components-meta'\nimport { PropControllerDescriptor } from '../prop-controllers'\nimport type { Size } from './react-builder-preview'\n\nexport const ActionTypes = {\n CHANGE_DOCUMENT: 'CHANGE_DOCUMENT',\n\n REGISTER_COMPONENT: 'REGISTER_COMPONENT',\n UNREGISTER_COMPONENT: 'UNREGISTER_COMPONENT',\n\n REGISTER_REACT_COMPONENT: 'REGISTER_REACT_COMPONENT',\n UNREGISTER_REACT_COMPONENT: 'UNREGISTER_REACT_COMPONENT',\n\n MOUNT_COMPONENT: 'MOUNT_COMPONENT',\n UNMOUNT_COMPONENT: 'UNMOUNT_COMPONENT',\n\n CHANGE_COMPONENT_HANDLE: 'CHANGE_COMPONENT_HANDLE',\n\n REGISTER_MEASURABLE: 'REGISTER_MEASURABLE',\n UNREGISTER_MEASURABLE: 'UNREGISTER_MEASURABLE',\n\n CHANGE_ELEMENT_BOX_MODELS: 'CHANGE_ELEMENT_BOX_MODELS',\n\n CHANGE_DOCUMENT_ELEMENT_SIZE: 'CHANGE_DOCUMENT_ELEMENT_SIZE',\n CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: 'CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP',\n} as const\n\ntype ChangeDocumentAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT\n payload: { documentKey: string; operation: Operation }\n}\n\ntype RegisterComponentAction = {\n type: typeof ActionTypes.REGISTER_COMPONENT\n payload: {\n type: string\n meta: ComponentMeta\n propControllerDescriptors: Record<string, PropControllerDescriptor>\n }\n}\n\ntype UnregisterComponentAction = {\n type: typeof ActionTypes.UNREGISTER_COMPONENT\n payload: { type: string }\n}\n\ntype RegisterReactComponentAction = {\n type: typeof ActionTypes.REGISTER_REACT_COMPONENT\n payload: { type: string; component: ComponentType }\n}\n\ntype UnregisterReactComponentAction = {\n type: typeof ActionTypes.UNREGISTER_REACT_COMPONENT\n payload: { type: string }\n}\n\ntype MountComponentAction = {\n type: typeof ActionTypes.MOUNT_COMPONENT\n payload: { elementKey: string }\n}\n\ntype UnmountComponentAction = {\n type: typeof ActionTypes.UNMOUNT_COMPONENT\n payload: { elementKey: string }\n}\n\ntype ChangeComponentHandleAction = {\n type: typeof ActionTypes.CHANGE_COMPONENT_HANDLE\n payload: { elementKey: string; componentHandle: unknown }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof ActionTypes.REGISTER_MEASURABLE\n payload: { elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof ActionTypes.UNREGISTER_MEASURABLE\n payload: { elementKey: string }\n}\n\ntype ChangeElementBoxModelsAction = {\n type: typeof ActionTypes.CHANGE_ELEMENT_BOX_MODELS\n payload: { changedElementBoxModels: Map<string, BoxModel | null> }\n}\n\ntype ChangeDocumentElementSizeAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE\n payload: { size: Size }\n}\n\ntype ChangeDocumentElementScrollTopAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP\n payload: { scrollTop: number }\n}\n\nexport type Action =\n | ChangeDocumentAction\n | RegisterComponentAction\n | UnregisterComponentAction\n | RegisterReactComponentAction\n | UnregisterReactComponentAction\n | MountComponentAction\n | UnmountComponentAction\n | ChangeComponentHandleAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | ChangeElementBoxModelsAction\n | ChangeDocumentElementSizeAction\n | ChangeDocumentElementScrollTopAction\n\nexport function changeDocument(documentKey: string, operation: Operation): ChangeDocumentAction {\n return { type: ActionTypes.CHANGE_DOCUMENT, payload: { documentKey, operation } }\n}\n\nexport function registerComponent(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): RegisterComponentAction {\n return {\n type: ActionTypes.REGISTER_COMPONENT,\n payload: { type, meta, propControllerDescriptors },\n }\n}\n\nexport function unregisterComponent(type: string): UnregisterComponentAction {\n return { type: ActionTypes.UNREGISTER_COMPONENT, payload: { type } }\n}\n\nexport function registerComponentEffect(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerComponent(type, meta, propControllerDescriptors))\n\n return () => {\n dispatch(unregisterComponent(type))\n }\n }\n}\n\nfunction registerReactComponent(\n type: string,\n component: ComponentType,\n): RegisterReactComponentAction {\n return { type: ActionTypes.REGISTER_REACT_COMPONENT, payload: { type, component } }\n}\n\nfunction unregisterReactComponent(type: string): UnregisterReactComponentAction {\n return { type: ActionTypes.UNREGISTER_REACT_COMPONENT, payload: { type } }\n}\n\nexport function registerReactComponentEffect(\n type: string,\n component: ComponentType,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerReactComponent(type, component))\n\n return () => {\n dispatch(unregisterReactComponent(type))\n }\n }\n}\n\nexport function mountComponent(elementKey: string): MountComponentAction {\n return { type: ActionTypes.MOUNT_COMPONENT, payload: { elementKey } }\n}\n\nexport function unmountComponent(elementKey: string): UnmountComponentAction {\n return { type: ActionTypes.UNMOUNT_COMPONENT, payload: { elementKey } }\n}\n\nexport function mountComponentEffect(\n elementKey: string,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(mountComponent(elementKey))\n\n return () => {\n dispatch(unmountComponent(elementKey))\n }\n }\n}\n\nexport function changeComponentHandle(\n elementKey: string,\n componentHandle: unknown,\n): ChangeComponentHandleAction {\n return { type: ActionTypes.CHANGE_COMPONENT_HANDLE, payload: { elementKey, componentHandle } }\n}\n\nexport function registerMeasurable(\n elementKey: string,\n measurable: Measurable,\n): RegisterMeasurableAction {\n return { type: ActionTypes.REGISTER_MEASURABLE, payload: { elementKey, measurable } }\n}\n\nexport function unregisterMeasurable(elementKey: string): UnregisterMeasurableAction {\n return { type: ActionTypes.UNREGISTER_MEASURABLE, payload: { elementKey } }\n}\n\nexport function registerMeasurableEffect(\n elementKey: string,\n measurable: Measurable,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerMeasurable(elementKey, measurable))\n\n return () => {\n dispatch(unregisterMeasurable(elementKey))\n }\n }\n}\n\nexport function changeElementBoxModels(\n changedElementBoxModels: Map<string, BoxModel | null>,\n): ChangeElementBoxModelsAction {\n return { type: ActionTypes.CHANGE_ELEMENT_BOX_MODELS, payload: { changedElementBoxModels } }\n}\n\nexport function changeDocumentElementSize(size: Size): ChangeDocumentElementSizeAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE, payload: { size } }\n}\n\nexport function changeDocumentElementScrollTop(\n scrollTop: number,\n): ChangeDocumentElementScrollTopAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP, payload: { scrollTop } }\n}\n"],"names":[],"mappings":"MASa,cAAc;AAAA,EACzB,iBAAiB;AAAA,EAEjB,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EAEtB,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAE5B,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EAEnB,yBAAyB;AAAA,EAEzB,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EAEvB,2BAA2B;AAAA,EAE3B,8BAA8B;AAAA,EAC9B,oCAAoC;AAAA;wBAuFP,aAAqB,WAA4C;SACvF,EAAE,MAAM,YAAY,iBAAiB,SAAS,EAAE,aAAa;AAAA;2BAIpE,MACA,MACA,2BACyB;SAClB;AAAA,IACL,MAAM,YAAY;AAAA,IAClB,SAAS,EAAE,MAAM,MAAM;AAAA;AAAA;6BAIS,MAAyC;SACpE,EAAE,MAAM,YAAY,sBAAsB,SAAS,EAAE;AAAA;iCAI5D,MACA,MACA,2BACmD;SAC5C,cAAY;aACR,kBAAkB,MAAM,MAAM;WAEhC,MAAM;eACF,oBAAoB;AAAA;AAAA;AAAA;AAKnC,gCACE,MACA,WAC8B;SACvB,EAAE,MAAM,YAAY,0BAA0B,SAAS,EAAE,MAAM;AAAA;AAGxE,kCAAkC,MAA8C;SACvE,EAAE,MAAM,YAAY,4BAA4B,SAAS,EAAE;AAAA;sCAIlE,MACA,WACmD;SAC5C,cAAY;aACR,uBAAuB,MAAM;WAE/B,MAAM;eACF,yBAAyB;AAAA;AAAA;AAAA;wBAKT,YAA0C;SAChE,EAAE,MAAM,YAAY,iBAAiB,SAAS,EAAE;AAAA;0BAGxB,YAA4C;SACpE,EAAE,MAAM,YAAY,mBAAmB,SAAS,EAAE;AAAA;8BAIzD,YACmD;SAC5C,cAAY;aACR,eAAe;WAEjB,MAAM;eACF,iBAAiB;AAAA;AAAA;AAAA;+BAM9B,YACA,iBAC6B;SACtB,EAAE,MAAM,YAAY,yBAAyB,SAAS,EAAE,YAAY;AAAA;4BAI3E,YACA,YAC0B;SACnB,EAAE,MAAM,YAAY,qBAAqB,SAAS,EAAE,YAAY;AAAA;8BAGpC,YAAgD;SAC5E,EAAE,MAAM,YAAY,uBAAuB,SAAS,EAAE;AAAA;mCAsBrB,MAA6C;SAC9E,EAAE,MAAM,YAAY,8BAA8B,SAAS,EAAE;AAAA;wCAIpE,WACsC;SAC/B,EAAE,MAAM,YAAY,oCAAoC,SAAS,EAAE;AAAA;;"}
|
|
1
|
+
{"version":3,"file":"actions.es.js","sources":["../src/state/actions.ts"],"sourcesContent":["import type { Operation } from 'ot-json0'\n\nimport type { ComponentType } from './modules/react-components'\nimport type { Measurable, BoxModel } from './modules/box-models'\nimport type { ThunkAction } from 'redux-thunk'\nimport { ComponentMeta } from './modules/components-meta'\nimport { PropControllerDescriptor } from '../prop-controllers'\nimport type { Size } from './react-builder-preview'\nimport type { PropControllersHandle } from './modules/prop-controller-handles'\nimport type { PropController, PropControllerMessage } from '../prop-controllers/instances'\nimport type { APIResource } from '../api/types'\n\nexport const ActionTypes = {\n INIT: 'INIT',\n CLEAN_UP: 'CLEAN_UP',\n\n CHANGE_DOCUMENT: 'CHANGE_DOCUMENT',\n\n REGISTER_COMPONENT: 'REGISTER_COMPONENT',\n UNREGISTER_COMPONENT: 'UNREGISTER_COMPONENT',\n\n REGISTER_REACT_COMPONENT: 'REGISTER_REACT_COMPONENT',\n UNREGISTER_REACT_COMPONENT: 'UNREGISTER_REACT_COMPONENT',\n\n MOUNT_COMPONENT: 'MOUNT_COMPONENT',\n UNMOUNT_COMPONENT: 'UNMOUNT_COMPONENT',\n\n REGISTER_COMPONENT_HANDLE: 'REGISTER_COMPONENT_HANDLE',\n UNREGISTER_COMPONENT_HANDLE: 'UNREGISTER_COMPONENT_HANDLE',\n\n REGISTER_MEASURABLE: 'REGISTER_MEASURABLE',\n UNREGISTER_MEASURABLE: 'UNREGISTER_MEASURABLE',\n\n CHANGE_ELEMENT_BOX_MODELS: 'CHANGE_ELEMENT_BOX_MODELS',\n\n CHANGE_DOCUMENT_ELEMENT_SIZE: 'CHANGE_DOCUMENT_ELEMENT_SIZE',\n CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: 'CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP',\n\n REGISTER_PROP_CONTROLLERS_HANDLE: 'REGISTER_PROP_CONTROLLERS_HANDLE',\n UNREGISTER_PROP_CONTROLLERS_HANDLE: 'UNREGISTER_PROP_CONTROLLERS_HANDLE',\n REGISTER_PROP_CONTROLLERS: 'REGISTER_PROP_CONTROLLERS',\n UNREGISTER_PROP_CONTROLLERS: 'UNREGISTER_PROP_CONTROLLERS',\n MESSAGE_HOST_PROP_CONTROLLER: 'MESSAGE_HOST_PROP_CONTROLLER',\n MESSAGE_BUILDER_PROP_CONTROLLER: 'MESSAGE_BUILDER_PROP_CONTROLLER',\n\n CHANGE_API_RESOURCE: 'CHANGE_API_RESOURCE',\n} as const\n\ntype InitAction = { type: typeof ActionTypes.INIT }\n\ntype CleanUpAction = { type: typeof ActionTypes.CLEAN_UP }\n\ntype ChangeDocumentAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT\n payload: { documentKey: string; operation: Operation }\n}\n\ntype RegisterComponentAction = {\n type: typeof ActionTypes.REGISTER_COMPONENT\n payload: {\n type: string\n meta: ComponentMeta\n propControllerDescriptors: Record<string, PropControllerDescriptor>\n }\n}\n\ntype UnregisterComponentAction = {\n type: typeof ActionTypes.UNREGISTER_COMPONENT\n payload: { type: string }\n}\n\ntype RegisterReactComponentAction = {\n type: typeof ActionTypes.REGISTER_REACT_COMPONENT\n payload: { type: string; component: ComponentType }\n}\n\ntype UnregisterReactComponentAction = {\n type: typeof ActionTypes.UNREGISTER_REACT_COMPONENT\n payload: { type: string }\n}\n\ntype MountComponentAction = {\n type: typeof ActionTypes.MOUNT_COMPONENT\n payload: { documentKey: string; elementKey: string }\n}\n\ntype UnmountComponentAction = {\n type: typeof ActionTypes.UNMOUNT_COMPONENT\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterComponentHandleAction = {\n type: typeof ActionTypes.REGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string; componentHandle: unknown }\n}\n\ntype UnregisterComponentHandleAction = {\n type: typeof ActionTypes.UNREGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof ActionTypes.REGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof ActionTypes.UNREGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype ChangeElementBoxModelsAction = {\n type: typeof ActionTypes.CHANGE_ELEMENT_BOX_MODELS\n payload: { changedElementBoxModels: Map<string, Map<string, BoxModel | null>> }\n}\n\ntype ChangeDocumentElementSizeAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE\n payload: { size: Size }\n}\n\ntype ChangeDocumentElementScrollTopAction = {\n type: typeof ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP\n payload: { scrollTop: number }\n}\n\ntype RegisterPropControllersHandleAction = {\n type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string; handle: PropControllersHandle }\n}\n\ntype UnregisterPropControllersHandleAction = {\n type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersAction = {\n type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS\n payload: {\n documentKey: string\n elementKey: string\n propControllers: Record<string, PropController>\n }\n}\n\ntype UnregisterPropControllersAction = {\n type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS\n payload: { documentKey: string; elementKey: string }\n}\n\ntype MessageHostPropControllerAction<T = PropControllerMessage> = {\n type: typeof ActionTypes.MESSAGE_HOST_PROP_CONTROLLER\n payload: { documentKey: string; elementKey: string; propName: string; message: T }\n}\n\ntype MessageBuilderPropControllerAction<T = PropControllerMessage> = {\n type: typeof ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER\n payload: { documentKey: string; elementKey: string; propName: string; message: T }\n}\n\ntype ChangeAPIResourceAction = {\n type: typeof ActionTypes.CHANGE_API_RESOURCE\n payload: { resource: APIResource }\n}\n\nexport type Action =\n | InitAction\n | CleanUpAction\n | ChangeDocumentAction\n | RegisterComponentAction\n | UnregisterComponentAction\n | RegisterReactComponentAction\n | UnregisterReactComponentAction\n | MountComponentAction\n | UnmountComponentAction\n | RegisterComponentHandleAction\n | UnregisterComponentHandleAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | ChangeElementBoxModelsAction\n | ChangeDocumentElementSizeAction\n | ChangeDocumentElementScrollTopAction\n | RegisterPropControllersHandleAction\n | UnregisterPropControllersHandleAction\n | RegisterPropControllersAction\n | UnregisterPropControllersAction\n | MessageHostPropControllerAction\n | MessageBuilderPropControllerAction\n | ChangeAPIResourceAction\n\nexport function init(): InitAction {\n return { type: ActionTypes.INIT }\n}\n\nexport function cleanUp(): CleanUpAction {\n return { type: ActionTypes.CLEAN_UP }\n}\n\nexport function changeDocument(documentKey: string, operation: Operation): ChangeDocumentAction {\n return { type: ActionTypes.CHANGE_DOCUMENT, payload: { documentKey, operation } }\n}\n\nexport function registerComponent(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): RegisterComponentAction {\n return {\n type: ActionTypes.REGISTER_COMPONENT,\n payload: { type, meta, propControllerDescriptors },\n }\n}\n\nexport function unregisterComponent(type: string): UnregisterComponentAction {\n return { type: ActionTypes.UNREGISTER_COMPONENT, payload: { type } }\n}\n\nexport function registerComponentEffect(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerComponent(type, meta, propControllerDescriptors))\n\n return () => {\n dispatch(unregisterComponent(type))\n }\n }\n}\n\nfunction registerReactComponent(\n type: string,\n component: ComponentType,\n): RegisterReactComponentAction {\n return { type: ActionTypes.REGISTER_REACT_COMPONENT, payload: { type, component } }\n}\n\nfunction unregisterReactComponent(type: string): UnregisterReactComponentAction {\n return { type: ActionTypes.UNREGISTER_REACT_COMPONENT, payload: { type } }\n}\n\nexport function registerReactComponentEffect(\n type: string,\n component: ComponentType,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerReactComponent(type, component))\n\n return () => {\n dispatch(unregisterReactComponent(type))\n }\n }\n}\n\nexport function mountComponent(documentKey: string, elementKey: string): MountComponentAction {\n return { type: ActionTypes.MOUNT_COMPONENT, payload: { documentKey, elementKey } }\n}\n\nexport function unmountComponent(documentKey: string, elementKey: string): UnmountComponentAction {\n return { type: ActionTypes.UNMOUNT_COMPONENT, payload: { documentKey, elementKey } }\n}\n\nexport function mountComponentEffect(\n documentKey: string,\n elementKey: string,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(mountComponent(documentKey, elementKey))\n\n return () => {\n dispatch(unmountComponent(documentKey, elementKey))\n }\n }\n}\n\nfunction registerComponentHandle(\n documentKey: string,\n elementKey: string,\n componentHandle: unknown,\n): RegisterComponentHandleAction {\n return {\n type: ActionTypes.REGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey, componentHandle },\n }\n}\n\nfunction unregisterComponentHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterComponentHandleAction {\n return { type: ActionTypes.UNREGISTER_COMPONENT_HANDLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerComponentHandleEffect(\n documentKey: string,\n elementKey: string,\n componentHandle: unknown,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerComponentHandle(documentKey, elementKey, componentHandle))\n\n return () => {\n dispatch(unregisterComponentHandle(documentKey, elementKey))\n }\n }\n}\n\nexport function registerMeasurable(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): RegisterMeasurableAction {\n return { type: ActionTypes.REGISTER_MEASURABLE, payload: { documentKey, elementKey, measurable } }\n}\n\nexport function unregisterMeasurable(\n documentKey: string,\n elementKey: string,\n): UnregisterMeasurableAction {\n return { type: ActionTypes.UNREGISTER_MEASURABLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerMeasurableEffect(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): ThunkAction<() => void, unknown, unknown, Action> {\n return dispatch => {\n dispatch(registerMeasurable(documentKey, elementKey, measurable))\n\n return () => {\n dispatch(unregisterMeasurable(documentKey, elementKey))\n }\n }\n}\n\nexport function changeElementBoxModels(\n changedElementBoxModels: Map<string, Map<string, BoxModel | null>>,\n): ChangeElementBoxModelsAction {\n return { type: ActionTypes.CHANGE_ELEMENT_BOX_MODELS, payload: { changedElementBoxModels } }\n}\n\nexport function changeDocumentElementSize(size: Size): ChangeDocumentElementSizeAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SIZE, payload: { size } }\n}\n\nexport function changeDocumentElementScrollTop(\n scrollTop: number,\n): ChangeDocumentElementScrollTopAction {\n return { type: ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP, payload: { scrollTop } }\n}\n\nexport function registerPropControllersHandle(\n documentKey: string,\n elementKey: string,\n handle: PropControllersHandle,\n): RegisterPropControllersHandleAction {\n return {\n type: ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey, handle },\n }\n}\n\nexport function unregisterPropControllersHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersHandleAction {\n return {\n type: ActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerPropControllers(\n documentKey: string,\n elementKey: string,\n propControllers: Record<string, PropController>,\n): RegisterPropControllersAction {\n return {\n type: ActionTypes.REGISTER_PROP_CONTROLLERS,\n payload: { documentKey, elementKey, propControllers },\n }\n}\n\nexport function unregisterPropControllers(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersAction {\n return { type: ActionTypes.UNREGISTER_PROP_CONTROLLERS, payload: { documentKey, elementKey } }\n}\n\nexport function messageHostPropController<T>(\n documentKey: string,\n elementKey: string,\n propName: string,\n message: T,\n): MessageHostPropControllerAction<T> {\n return {\n type: ActionTypes.MESSAGE_HOST_PROP_CONTROLLER,\n payload: { documentKey, elementKey, propName, message },\n }\n}\n\nexport function messageBuilderPropController<T>(\n documentKey: string,\n elementKey: string,\n propName: string,\n message: T,\n): MessageBuilderPropControllerAction<T> {\n return {\n type: ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER,\n payload: { documentKey, elementKey, propName, message },\n }\n}\n\nexport function changeApiResource(resource: APIResource): ChangeAPIResourceAction {\n return { type: ActionTypes.CHANGE_API_RESOURCE, payload: { resource } }\n}\n"],"names":[],"mappings":"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"}
|
package/dist/api.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/dist/api.es.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/box-model.cjs.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports[Symbol.toStringTag] = "Module";
|
|
4
4
|
var boxModels = require("./box-models.cjs.js");
|
|
5
|
+
require("css-box-model");
|
|
5
6
|
require("./actions.cjs.js");
|
|
6
7
|
exports.createBox = boxModels.createBox;
|
|
7
8
|
exports.getBox = boxModels.getBox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box-model.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"box-model.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/dist/box-model.es.js
CHANGED
package/dist/box-model.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box-model.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"box-model.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|