@makeswift/runtime 0.27.1 → 0.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/react.js +256 -0
- package/dist/cjs/api/react.js.map +1 -0
- package/dist/cjs/api-handler/handlers/manifest.js +1 -1
- package/dist/cjs/client/index.js +3 -3
- package/dist/cjs/next/api-handler/config/app-router.js +10 -1
- package/dist/cjs/next/api-handler/config/app-router.js.map +1 -1
- package/dist/cjs/runtimes/react/components/LiveProvider.js +50 -0
- package/dist/cjs/runtimes/react/components/LiveProvider.js.map +1 -0
- package/dist/cjs/runtimes/react/components/PreviewProvider.js +63 -0
- package/dist/cjs/runtimes/react/components/PreviewProvider.js.map +1 -0
- package/dist/cjs/runtimes/react/components/hooks/use-builder-connection-ping.js +62 -0
- package/dist/cjs/runtimes/react/components/hooks/use-builder-connection-ping.js.map +1 -0
- package/dist/cjs/runtimes/react/hooks/use-is-preview.js +33 -0
- package/dist/cjs/runtimes/react/hooks/use-is-preview.js.map +1 -0
- package/dist/cjs/state/actions/internal.js +205 -0
- package/dist/cjs/state/actions/internal.js.map +1 -0
- package/dist/cjs/state/mixins/setup-teardown.js +35 -0
- package/dist/cjs/state/mixins/setup-teardown.js.map +1 -0
- package/dist/cjs/state/modules/box-models.js +127 -0
- package/dist/cjs/state/modules/box-models.js.map +1 -0
- package/dist/cjs/state/modules/element-imperative-handles.js +60 -0
- package/dist/cjs/state/modules/element-imperative-handles.js.map +1 -0
- package/dist/cjs/state/modules/is-preview.js +47 -0
- package/dist/cjs/state/modules/is-preview.js.map +1 -0
- package/dist/cjs/state/modules/pointer.js +47 -0
- package/dist/cjs/state/modules/pointer.js.map +1 -0
- package/dist/cjs/state/modules/read-write-documents.js +98 -0
- package/dist/cjs/state/modules/read-write-documents.js.map +1 -0
- package/dist/cjs/state/react-builder-preview.js +586 -0
- package/dist/cjs/state/react-builder-preview.js.map +1 -0
- package/dist/cjs/state/react-page.js +313 -0
- package/dist/cjs/state/react-page.js.map +1 -0
- package/dist/esm/api/react.js +223 -0
- package/dist/esm/api/react.js.map +1 -0
- package/dist/esm/api-handler/handlers/manifest.js +1 -1
- package/dist/esm/client/index.js +3 -3
- package/dist/esm/next/api-handler/config/app-router.js +10 -1
- package/dist/esm/next/api-handler/config/app-router.js.map +1 -1
- package/dist/esm/runtimes/react/components/LiveProvider.js +20 -0
- package/dist/esm/runtimes/react/components/LiveProvider.js.map +1 -0
- package/dist/esm/runtimes/react/components/PreviewProvider.js +33 -0
- package/dist/esm/runtimes/react/components/PreviewProvider.js.map +1 -0
- package/dist/esm/runtimes/react/components/hooks/use-builder-connection-ping.js +38 -0
- package/dist/esm/runtimes/react/components/hooks/use-builder-connection-ping.js.map +1 -0
- package/dist/esm/runtimes/react/hooks/use-is-preview.js +9 -0
- package/dist/esm/runtimes/react/hooks/use-is-preview.js.map +1 -0
- package/dist/esm/state/actions/internal.js +162 -0
- package/dist/esm/state/actions/internal.js.map +1 -0
- package/dist/esm/state/mixins/setup-teardown.js +11 -0
- package/dist/esm/state/mixins/setup-teardown.js.map +1 -0
- package/dist/esm/state/modules/box-models.js +98 -0
- package/dist/esm/state/modules/box-models.js.map +1 -0
- package/dist/esm/state/modules/element-imperative-handles.js +35 -0
- package/dist/esm/state/modules/element-imperative-handles.js.map +1 -0
- package/dist/esm/state/modules/is-preview.js +21 -0
- package/dist/esm/state/modules/is-preview.js.map +1 -0
- package/dist/esm/state/modules/pointer.js +22 -0
- package/dist/esm/state/modules/pointer.js.map +1 -0
- package/dist/esm/state/modules/read-write-documents.js +60 -0
- package/dist/esm/state/modules/read-write-documents.js.map +1 -0
- package/dist/esm/state/react-builder-preview.js +547 -0
- package/dist/esm/state/react-builder-preview.js.map +1 -0
- package/dist/esm/state/react-page.js +268 -0
- package/dist/esm/state/react-page.js.map +1 -0
- package/dist/types/api/react.d.ts +82 -0
- package/dist/types/api/react.d.ts.map +1 -0
- package/dist/types/next/api-handler/config/app-router.d.ts.map +1 -1
- package/dist/types/runtimes/react/components/LiveProvider.d.ts +3 -0
- package/dist/types/runtimes/react/components/LiveProvider.d.ts.map +1 -0
- package/dist/types/runtimes/react/components/PreviewProvider.d.ts +5 -0
- package/dist/types/runtimes/react/components/PreviewProvider.d.ts.map +1 -0
- package/dist/types/runtimes/react/components/hooks/use-builder-connection-ping.d.ts +4 -0
- package/dist/types/runtimes/react/components/hooks/use-builder-connection-ping.d.ts.map +1 -0
- package/dist/types/runtimes/react/hooks/use-is-preview.d.ts +2 -0
- package/dist/types/runtimes/react/hooks/use-is-preview.d.ts.map +1 -0
- package/dist/types/state/__tests__/react-page.test.d.ts +2 -0
- package/dist/types/state/__tests__/react-page.test.d.ts.map +1 -0
- package/dist/types/state/actions/internal.d.ts +181 -0
- package/dist/types/state/actions/internal.d.ts.map +1 -0
- package/dist/types/state/mixins/setup-teardown.d.ts +7 -0
- package/dist/types/state/mixins/setup-teardown.d.ts.map +1 -0
- package/dist/types/state/modules/box-models.d.ts +23 -0
- package/dist/types/state/modules/box-models.d.ts.map +1 -0
- package/dist/types/state/modules/element-imperative-handles.d.ts +7 -0
- package/dist/types/state/modules/element-imperative-handles.d.ts.map +1 -0
- package/dist/types/state/modules/is-preview.d.ts +6 -0
- package/dist/types/state/modules/is-preview.d.ts.map +1 -0
- package/dist/types/state/modules/pointer.d.ts +12 -0
- package/dist/types/state/modules/pointer.d.ts.map +1 -0
- package/dist/types/state/modules/read-write-documents.d.ts +14 -0
- package/dist/types/state/modules/read-write-documents.d.ts.map +1 -0
- package/dist/types/state/react-builder-preview.d.ts +108 -0
- package/dist/types/state/react-builder-preview.d.ts.map +1 -0
- package/dist/types/state/react-page.d.ts +149 -0
- package/dist/types/state/react-page.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var internal_exports = {};
|
|
20
|
+
__export(internal_exports, {
|
|
21
|
+
InternalActionTypes: () => InternalActionTypes,
|
|
22
|
+
apiResourceFulfilled: () => apiResourceFulfilled,
|
|
23
|
+
changeElementTree: () => changeElementTree,
|
|
24
|
+
createElementTree: () => createElementTree,
|
|
25
|
+
deleteElementTree: () => deleteElementTree,
|
|
26
|
+
registerComponent: () => registerComponent,
|
|
27
|
+
registerComponentEffect: () => registerComponentEffect,
|
|
28
|
+
registerComponentHandle: () => registerComponentHandle,
|
|
29
|
+
registerComponentHandleEffect: () => registerComponentHandleEffect,
|
|
30
|
+
registerMeasurable: () => registerMeasurable,
|
|
31
|
+
registerMeasurableEffect: () => registerMeasurableEffect,
|
|
32
|
+
registerPropControllers: () => registerPropControllers,
|
|
33
|
+
registerPropControllersHandle: () => registerPropControllersHandle,
|
|
34
|
+
registerReactComponentEffect: () => registerReactComponentEffect,
|
|
35
|
+
setIsInBuilder: () => setIsInBuilder,
|
|
36
|
+
unregisterComponent: () => unregisterComponent,
|
|
37
|
+
unregisterMeasurable: () => unregisterMeasurable,
|
|
38
|
+
unregisterPropControllers: () => unregisterPropControllers,
|
|
39
|
+
unregisterPropControllersHandle: () => unregisterPropControllersHandle,
|
|
40
|
+
updateAPIClientCache: () => updateAPIClientCache
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(internal_exports);
|
|
43
|
+
const InternalActionTypes = {
|
|
44
|
+
API_RESOURCE_FULFILLED: "API_RESOURCE_FULFILLED",
|
|
45
|
+
CREATE_ELEMENT_TREE: "CREATE_ELEMENT_TREE",
|
|
46
|
+
DELETE_ELEMENT_TREE: "DELETE_ELEMENT_TREE",
|
|
47
|
+
CHANGE_ELEMENT_TREE: "CHANGE_ELEMENT_TREE",
|
|
48
|
+
REGISTER_COMPONENT: "REGISTER_COMPONENT",
|
|
49
|
+
UNREGISTER_COMPONENT: "UNREGISTER_COMPONENT",
|
|
50
|
+
REGISTER_COMPONENT_HANDLE: "REGISTER_COMPONENT_HANDLE",
|
|
51
|
+
UNREGISTER_COMPONENT_HANDLE: "UNREGISTER_COMPONENT_HANDLE",
|
|
52
|
+
REGISTER_MEASURABLE: "REGISTER_MEASURABLE",
|
|
53
|
+
UNREGISTER_MEASURABLE: "UNREGISTER_MEASURABLE",
|
|
54
|
+
REGISTER_PROP_CONTROLLERS: "REGISTER_PROP_CONTROLLERS",
|
|
55
|
+
UNREGISTER_PROP_CONTROLLERS: "UNREGISTER_PROP_CONTROLLERS",
|
|
56
|
+
REGISTER_PROP_CONTROLLERS_HANDLE: "REGISTER_PROP_CONTROLLERS_HANDLE",
|
|
57
|
+
UNREGISTER_PROP_CONTROLLERS_HANDLE: "UNREGISTER_PROP_CONTROLLERS_HANDLE",
|
|
58
|
+
REGISTER_REACT_COMPONENT: "REGISTER_REACT_COMPONENT",
|
|
59
|
+
UNREGISTER_REACT_COMPONENT: "UNREGISTER_REACT_COMPONENT",
|
|
60
|
+
SET_IS_IN_BUILDER: "SET_IS_IN_BUILDER",
|
|
61
|
+
UPDATE_API_CLIENT_CACHE: "UPDATE_API_CLIENT_CACHE"
|
|
62
|
+
};
|
|
63
|
+
function apiResourceFulfilled(resourceType, resourceId, resource, locale) {
|
|
64
|
+
return {
|
|
65
|
+
type: InternalActionTypes.API_RESOURCE_FULFILLED,
|
|
66
|
+
payload: { resourceType, resourceId, resource, locale }
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function createElementTree(payload) {
|
|
70
|
+
return {
|
|
71
|
+
type: InternalActionTypes.CREATE_ELEMENT_TREE,
|
|
72
|
+
payload
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function deleteElementTree(payload) {
|
|
76
|
+
return { type: InternalActionTypes.DELETE_ELEMENT_TREE, payload };
|
|
77
|
+
}
|
|
78
|
+
function changeElementTree(payload) {
|
|
79
|
+
return {
|
|
80
|
+
type: InternalActionTypes.CHANGE_ELEMENT_TREE,
|
|
81
|
+
payload
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function registerComponent(type, meta, propControllerDescriptors) {
|
|
85
|
+
return {
|
|
86
|
+
type: InternalActionTypes.REGISTER_COMPONENT,
|
|
87
|
+
payload: { type, meta, propControllerDescriptors }
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function unregisterComponent(type) {
|
|
91
|
+
return { type: InternalActionTypes.UNREGISTER_COMPONENT, payload: { type } };
|
|
92
|
+
}
|
|
93
|
+
function registerComponentEffect(type, meta, propControllerDescriptors) {
|
|
94
|
+
return (dispatch) => {
|
|
95
|
+
dispatch(registerComponent(type, meta, propControllerDescriptors));
|
|
96
|
+
return () => {
|
|
97
|
+
dispatch(unregisterComponent(type));
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function registerComponentHandle(documentKey, elementKey, componentHandle) {
|
|
102
|
+
return {
|
|
103
|
+
type: InternalActionTypes.REGISTER_COMPONENT_HANDLE,
|
|
104
|
+
payload: { documentKey, elementKey, componentHandle }
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function unregisterComponentHandle(documentKey, elementKey) {
|
|
108
|
+
return {
|
|
109
|
+
type: InternalActionTypes.UNREGISTER_COMPONENT_HANDLE,
|
|
110
|
+
payload: { documentKey, elementKey }
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function registerComponentHandleEffect(documentKey, elementKey, componentHandle) {
|
|
114
|
+
return (dispatch) => {
|
|
115
|
+
dispatch(registerComponentHandle(documentKey, elementKey, componentHandle));
|
|
116
|
+
return () => {
|
|
117
|
+
dispatch(unregisterComponentHandle(documentKey, elementKey));
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function registerMeasurable(documentKey, elementKey, measurable) {
|
|
122
|
+
return {
|
|
123
|
+
type: InternalActionTypes.REGISTER_MEASURABLE,
|
|
124
|
+
payload: { documentKey, elementKey, measurable }
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function unregisterMeasurable(documentKey, elementKey) {
|
|
128
|
+
return { type: InternalActionTypes.UNREGISTER_MEASURABLE, payload: { documentKey, elementKey } };
|
|
129
|
+
}
|
|
130
|
+
function registerMeasurableEffect(documentKey, elementKey, measurable) {
|
|
131
|
+
return (dispatch) => {
|
|
132
|
+
dispatch(registerMeasurable(documentKey, elementKey, measurable));
|
|
133
|
+
return () => {
|
|
134
|
+
dispatch(unregisterMeasurable(documentKey, elementKey));
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function registerPropControllersHandle(documentKey, elementKey, handle) {
|
|
139
|
+
return {
|
|
140
|
+
type: InternalActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE,
|
|
141
|
+
payload: { documentKey, elementKey, handle }
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function unregisterPropControllersHandle(documentKey, elementKey) {
|
|
145
|
+
return {
|
|
146
|
+
type: InternalActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE,
|
|
147
|
+
payload: { documentKey, elementKey }
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function registerPropControllers(documentKey, elementKey, propControllers) {
|
|
151
|
+
return {
|
|
152
|
+
type: InternalActionTypes.REGISTER_PROP_CONTROLLERS,
|
|
153
|
+
payload: { documentKey, elementKey, propControllers }
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function unregisterPropControllers(documentKey, elementKey) {
|
|
157
|
+
return {
|
|
158
|
+
type: InternalActionTypes.UNREGISTER_PROP_CONTROLLERS,
|
|
159
|
+
payload: { documentKey, elementKey }
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function registerReactComponent(type, component) {
|
|
163
|
+
return { type: InternalActionTypes.REGISTER_REACT_COMPONENT, payload: { type, component } };
|
|
164
|
+
}
|
|
165
|
+
function unregisterReactComponent(type) {
|
|
166
|
+
return { type: InternalActionTypes.UNREGISTER_REACT_COMPONENT, payload: { type } };
|
|
167
|
+
}
|
|
168
|
+
function registerReactComponentEffect(type, component) {
|
|
169
|
+
return (dispatch) => {
|
|
170
|
+
dispatch(registerReactComponent(type, component));
|
|
171
|
+
return () => {
|
|
172
|
+
dispatch(unregisterReactComponent(type));
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function setIsInBuilder(isInBuilder) {
|
|
177
|
+
return { type: InternalActionTypes.SET_IS_IN_BUILDER, payload: isInBuilder };
|
|
178
|
+
}
|
|
179
|
+
function updateAPIClientCache(payload) {
|
|
180
|
+
return { type: InternalActionTypes.UPDATE_API_CLIENT_CACHE, payload };
|
|
181
|
+
}
|
|
182
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
183
|
+
0 && (module.exports = {
|
|
184
|
+
InternalActionTypes,
|
|
185
|
+
apiResourceFulfilled,
|
|
186
|
+
changeElementTree,
|
|
187
|
+
createElementTree,
|
|
188
|
+
deleteElementTree,
|
|
189
|
+
registerComponent,
|
|
190
|
+
registerComponentEffect,
|
|
191
|
+
registerComponentHandle,
|
|
192
|
+
registerComponentHandleEffect,
|
|
193
|
+
registerMeasurable,
|
|
194
|
+
registerMeasurableEffect,
|
|
195
|
+
registerPropControllers,
|
|
196
|
+
registerPropControllersHandle,
|
|
197
|
+
registerReactComponentEffect,
|
|
198
|
+
setIsInBuilder,
|
|
199
|
+
unregisterComponent,
|
|
200
|
+
unregisterMeasurable,
|
|
201
|
+
unregisterPropControllers,
|
|
202
|
+
unregisterPropControllersHandle,
|
|
203
|
+
updateAPIClientCache
|
|
204
|
+
});
|
|
205
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/state/actions/internal.ts"],"sourcesContent":["import { type Operation } from 'ot-json0'\nimport { type ThunkAction } from '@reduxjs/toolkit'\n\nimport { ControlInstance } from '@makeswift/controls'\n\nimport { ElementImperativeHandle } from '../../runtimes/react/element-imperative-handle'\n\nimport { type APIResource, APIResourceType, APIResourceLocale } from '../../api/types'\nimport { type Descriptor as PropControllerDescriptor } from '../../prop-controllers/descriptors'\n\nimport { type Measurable } from '../modules/box-models'\nimport { type ComponentMeta } from '../modules/components-meta'\nimport { type PropControllersHandle } from '../modules/prop-controller-handles'\nimport { type ComponentType } from '../modules/react-components'\nimport { type DescriptorsByComponentType } from '../modules/prop-controllers'\n\nimport { type DocumentPayload } from '../shared-api'\nimport { type SerializedState as APIClientCache } from '../makeswift-api-client'\n\nexport const InternalActionTypes = {\n API_RESOURCE_FULFILLED: 'API_RESOURCE_FULFILLED',\n\n CREATE_ELEMENT_TREE: 'CREATE_ELEMENT_TREE',\n DELETE_ELEMENT_TREE: 'DELETE_ELEMENT_TREE',\n CHANGE_ELEMENT_TREE: 'CHANGE_ELEMENT_TREE',\n\n REGISTER_COMPONENT: 'REGISTER_COMPONENT',\n UNREGISTER_COMPONENT: 'UNREGISTER_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 REGISTER_PROP_CONTROLLERS: 'REGISTER_PROP_CONTROLLERS',\n UNREGISTER_PROP_CONTROLLERS: 'UNREGISTER_PROP_CONTROLLERS',\n\n REGISTER_PROP_CONTROLLERS_HANDLE: 'REGISTER_PROP_CONTROLLERS_HANDLE',\n UNREGISTER_PROP_CONTROLLERS_HANDLE: 'UNREGISTER_PROP_CONTROLLERS_HANDLE',\n\n REGISTER_REACT_COMPONENT: 'REGISTER_REACT_COMPONENT',\n UNREGISTER_REACT_COMPONENT: 'UNREGISTER_REACT_COMPONENT',\n\n SET_IS_IN_BUILDER: 'SET_IS_IN_BUILDER',\n\n UPDATE_API_CLIENT_CACHE: 'UPDATE_API_CLIENT_CACHE',\n} as const\n\ntype APIResourceFulfilledAction = {\n type: typeof InternalActionTypes.API_RESOURCE_FULFILLED\n payload: {\n resourceType: APIResourceType\n resourceId: string\n resource: APIResource | null\n locale?: string | null\n }\n}\n\ntype CreateElementTreeAction = {\n type: typeof InternalActionTypes.CREATE_ELEMENT_TREE\n payload: { document: DocumentPayload; descriptors: DescriptorsByComponentType }\n}\n\ntype DeleteElementTreeAction = {\n type: typeof InternalActionTypes.DELETE_ELEMENT_TREE\n payload: { documentKey: string }\n}\n\ntype ChangeElementTreeAction = {\n type: typeof InternalActionTypes.CHANGE_ELEMENT_TREE\n payload: {\n oldDocument: DocumentPayload\n newDocument: DocumentPayload\n descriptors: DescriptorsByComponentType\n operation: Operation\n }\n}\n\nexport type RegisterComponentAction = {\n type: typeof InternalActionTypes.REGISTER_COMPONENT\n payload: {\n type: string\n meta: ComponentMeta\n propControllerDescriptors: Record<string, PropControllerDescriptor>\n }\n}\n\nexport type UnregisterComponentAction = {\n type: typeof InternalActionTypes.UNREGISTER_COMPONENT\n payload: { type: string }\n}\n\ntype RegisterComponentHandleAction = {\n type: typeof InternalActionTypes.REGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string; componentHandle: ElementImperativeHandle }\n}\n\ntype UnregisterComponentHandleAction = {\n type: typeof InternalActionTypes.UNREGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof InternalActionTypes.REGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof InternalActionTypes.UNREGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersHandleAction = {\n type: typeof InternalActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string; handle: PropControllersHandle }\n}\n\ntype UnregisterPropControllersHandleAction = {\n type: typeof InternalActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersAction = {\n type: typeof InternalActionTypes.REGISTER_PROP_CONTROLLERS\n payload: {\n documentKey: string\n elementKey: string\n propControllers: Record<string, ControlInstance>\n }\n}\n\ntype UnregisterPropControllersAction = {\n type: typeof InternalActionTypes.UNREGISTER_PROP_CONTROLLERS\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterReactComponentAction = {\n type: typeof InternalActionTypes.REGISTER_REACT_COMPONENT\n payload: { type: string; component: ComponentType }\n}\n\ntype UnregisterReactComponentAction = {\n type: typeof InternalActionTypes.UNREGISTER_REACT_COMPONENT\n payload: { type: string }\n}\n\ntype SetIsInBuilderAction = {\n type: typeof InternalActionTypes.SET_IS_IN_BUILDER\n payload: boolean\n}\n\ntype UpdateAPIClientCache = {\n type: typeof InternalActionTypes.UPDATE_API_CLIENT_CACHE\n payload: APIClientCache\n}\n\nexport type InternalAction =\n | APIResourceFulfilledAction\n | CreateElementTreeAction\n | DeleteElementTreeAction\n | ChangeElementTreeAction\n | RegisterComponentAction\n | UnregisterComponentAction\n | RegisterComponentHandleAction\n | UnregisterComponentHandleAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | RegisterPropControllersHandleAction\n | UnregisterPropControllersHandleAction\n | RegisterPropControllersAction\n | UnregisterPropControllersAction\n | RegisterReactComponentAction\n | UnregisterReactComponentAction\n | SetIsInBuilderAction\n | UpdateAPIClientCache\n\nexport function apiResourceFulfilled<T extends APIResourceType>(\n resourceType: T,\n resourceId: string,\n resource: APIResource | null,\n locale?: APIResourceLocale<T>,\n): APIResourceFulfilledAction {\n return {\n type: InternalActionTypes.API_RESOURCE_FULFILLED,\n payload: { resourceType, resourceId, resource, locale },\n }\n}\n\nexport function createElementTree(\n payload: CreateElementTreeAction['payload'],\n): CreateElementTreeAction {\n return {\n type: InternalActionTypes.CREATE_ELEMENT_TREE,\n payload,\n }\n}\n\nexport function deleteElementTree(\n payload: DeleteElementTreeAction['payload'],\n): DeleteElementTreeAction {\n return { type: InternalActionTypes.DELETE_ELEMENT_TREE, payload }\n}\n\nexport function changeElementTree(\n payload: ChangeElementTreeAction['payload'],\n): ChangeElementTreeAction {\n return {\n type: InternalActionTypes.CHANGE_ELEMENT_TREE,\n payload,\n }\n}\n\nexport function registerComponent(\n type: string,\n meta: ComponentMeta,\n propControllerDescriptors: Record<string, PropControllerDescriptor>,\n): RegisterComponentAction {\n return {\n type: InternalActionTypes.REGISTER_COMPONENT,\n payload: { type, meta, propControllerDescriptors },\n }\n}\n\nexport function unregisterComponent(type: string): UnregisterComponentAction {\n return { type: InternalActionTypes.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, InternalAction> {\n return dispatch => {\n dispatch(registerComponent(type, meta, propControllerDescriptors))\n\n return () => {\n dispatch(unregisterComponent(type))\n }\n }\n}\n\nexport function registerComponentHandle(\n documentKey: string,\n elementKey: string,\n componentHandle: ElementImperativeHandle,\n): RegisterComponentHandleAction {\n return {\n type: InternalActionTypes.REGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey, componentHandle },\n }\n}\n\nfunction unregisterComponentHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterComponentHandleAction {\n return {\n type: InternalActionTypes.UNREGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerComponentHandleEffect(\n documentKey: string,\n elementKey: string,\n componentHandle: ElementImperativeHandle,\n): ThunkAction<() => void, unknown, unknown, InternalAction> {\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 {\n type: InternalActionTypes.REGISTER_MEASURABLE,\n payload: { documentKey, elementKey, measurable },\n }\n}\n\nexport function unregisterMeasurable(\n documentKey: string,\n elementKey: string,\n): UnregisterMeasurableAction {\n return { type: InternalActionTypes.UNREGISTER_MEASURABLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerMeasurableEffect(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): ThunkAction<() => void, unknown, unknown, InternalAction> {\n return dispatch => {\n dispatch(registerMeasurable(documentKey, elementKey, measurable))\n\n return () => {\n dispatch(unregisterMeasurable(documentKey, elementKey))\n }\n }\n}\n\nexport function registerPropControllersHandle(\n documentKey: string,\n elementKey: string,\n handle: PropControllersHandle,\n): RegisterPropControllersHandleAction {\n return {\n type: InternalActionTypes.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: InternalActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerPropControllers(\n documentKey: string,\n elementKey: string,\n propControllers: Record<string, ControlInstance>,\n): RegisterPropControllersAction {\n return {\n type: InternalActionTypes.REGISTER_PROP_CONTROLLERS,\n payload: { documentKey, elementKey, propControllers },\n }\n}\n\nexport function unregisterPropControllers(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersAction {\n return {\n type: InternalActionTypes.UNREGISTER_PROP_CONTROLLERS,\n payload: { documentKey, elementKey },\n }\n}\n\nfunction registerReactComponent(\n type: string,\n component: ComponentType,\n): RegisterReactComponentAction {\n return { type: InternalActionTypes.REGISTER_REACT_COMPONENT, payload: { type, component } }\n}\n\nfunction unregisterReactComponent(type: string): UnregisterReactComponentAction {\n return { type: InternalActionTypes.UNREGISTER_REACT_COMPONENT, payload: { type } }\n}\n\nexport function registerReactComponentEffect(\n type: string,\n component: ComponentType,\n): ThunkAction<() => void, unknown, unknown, InternalAction> {\n return dispatch => {\n dispatch(registerReactComponent(type, component))\n\n return () => {\n dispatch(unregisterReactComponent(type))\n }\n }\n}\n\nexport function setIsInBuilder(isInBuilder: boolean): SetIsInBuilderAction {\n return { type: InternalActionTypes.SET_IS_IN_BUILDER, payload: isInBuilder }\n}\n\nexport function updateAPIClientCache(payload: APIClientCache): UpdateAPIClientCache {\n return { type: InternalActionTypes.UPDATE_API_CLIENT_CACHE, payload }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBO,MAAM,sBAAsB;AAAA,EACjC,wBAAwB;AAAA,EAExB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EAErB,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EAEtB,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAE7B,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EAEvB,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAE7B,kCAAkC;AAAA,EAClC,oCAAoC;AAAA,EAEpC,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAE5B,mBAAmB;AAAA,EAEnB,yBAAyB;AAC3B;AAkIO,SAAS,qBACd,cACA,YACA,UACA,QAC4B;AAC5B,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B,SAAS,EAAE,cAAc,YAAY,UAAU,OAAO;AAAA,EACxD;AACF;AAEO,SAAS,kBACd,SACyB;AACzB,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B;AAAA,EACF;AACF;AAEO,SAAS,kBACd,SACyB;AACzB,SAAO,EAAE,MAAM,oBAAoB,qBAAqB,QAAQ;AAClE;AAEO,SAAS,kBACd,SACyB;AACzB,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B;AAAA,EACF;AACF;AAEO,SAAS,kBACd,MACA,MACA,2BACyB;AACzB,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B,SAAS,EAAE,MAAM,MAAM,0BAA0B;AAAA,EACnD;AACF;AAEO,SAAS,oBAAoB,MAAyC;AAC3E,SAAO,EAAE,MAAM,oBAAoB,sBAAsB,SAAS,EAAE,KAAK,EAAE;AAC7E;AAEO,SAAS,wBACd,MACA,MACA,2BAC2D;AAC3D,SAAO,cAAY;AACjB,aAAS,kBAAkB,MAAM,MAAM,yBAAyB,CAAC;AAEjE,WAAO,MAAM;AACX,eAAS,oBAAoB,IAAI,CAAC;AAAA,IACpC;AAAA,EACF;AACF;AAEO,SAAS,wBACd,aACA,YACA,iBAC+B;AAC/B,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B,SAAS,EAAE,aAAa,YAAY,gBAAgB;AAAA,EACtD;AACF;AAEA,SAAS,0BACP,aACA,YACiC;AACjC,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B,SAAS,EAAE,aAAa,WAAW;AAAA,EACrC;AACF;AAEO,SAAS,8BACd,aACA,YACA,iBAC2D;AAC3D,SAAO,cAAY;AACjB,aAAS,wBAAwB,aAAa,YAAY,eAAe,CAAC;AAE1E,WAAO,MAAM;AACX,eAAS,0BAA0B,aAAa,UAAU,CAAC;AAAA,IAC7D;AAAA,EACF;AACF;AAEO,SAAS,mBACd,aACA,YACA,YAC0B;AAC1B,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B,SAAS,EAAE,aAAa,YAAY,WAAW;AAAA,EACjD;AACF;AAEO,SAAS,qBACd,aACA,YAC4B;AAC5B,SAAO,EAAE,MAAM,oBAAoB,uBAAuB,SAAS,EAAE,aAAa,WAAW,EAAE;AACjG;AAEO,SAAS,yBACd,aACA,YACA,YAC2D;AAC3D,SAAO,cAAY;AACjB,aAAS,mBAAmB,aAAa,YAAY,UAAU,CAAC;AAEhE,WAAO,MAAM;AACX,eAAS,qBAAqB,aAAa,UAAU,CAAC;AAAA,IACxD;AAAA,EACF;AACF;AAEO,SAAS,8BACd,aACA,YACA,QACqC;AACrC,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B,SAAS,EAAE,aAAa,YAAY,OAAO;AAAA,EAC7C;AACF;AAEO,SAAS,gCACd,aACA,YACuC;AACvC,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B,SAAS,EAAE,aAAa,WAAW;AAAA,EACrC;AACF;AAEO,SAAS,wBACd,aACA,YACA,iBAC+B;AAC/B,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B,SAAS,EAAE,aAAa,YAAY,gBAAgB;AAAA,EACtD;AACF;AAEO,SAAS,0BACd,aACA,YACiC;AACjC,SAAO;AAAA,IACL,MAAM,oBAAoB;AAAA,IAC1B,SAAS,EAAE,aAAa,WAAW;AAAA,EACrC;AACF;AAEA,SAAS,uBACP,MACA,WAC8B;AAC9B,SAAO,EAAE,MAAM,oBAAoB,0BAA0B,SAAS,EAAE,MAAM,UAAU,EAAE;AAC5F;AAEA,SAAS,yBAAyB,MAA8C;AAC9E,SAAO,EAAE,MAAM,oBAAoB,4BAA4B,SAAS,EAAE,KAAK,EAAE;AACnF;AAEO,SAAS,6BACd,MACA,WAC2D;AAC3D,SAAO,cAAY;AACjB,aAAS,uBAAuB,MAAM,SAAS,CAAC;AAEhD,WAAO,MAAM;AACX,eAAS,yBAAyB,IAAI,CAAC;AAAA,IACzC;AAAA,EACF;AACF;AAEO,SAAS,eAAe,aAA4C;AACzE,SAAO,EAAE,MAAM,oBAAoB,mBAAmB,SAAS,YAAY;AAC7E;AAEO,SAAS,qBAAqB,SAA+C;AAClF,SAAO,EAAE,MAAM,oBAAoB,yBAAyB,QAAQ;AACtE;","names":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var setup_teardown_exports = {};
|
|
20
|
+
__export(setup_teardown_exports, {
|
|
21
|
+
withSetupTeardown: () => withSetupTeardown
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(setup_teardown_exports);
|
|
24
|
+
function withSetupTeardown(setup, teardown) {
|
|
25
|
+
return (next) => (reducer, preloadedState) => ({
|
|
26
|
+
...next(reducer, preloadedState),
|
|
27
|
+
setup,
|
|
28
|
+
teardown
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
withSetupTeardown
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=setup-teardown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/state/mixins/setup-teardown.ts"],"sourcesContent":["import { type StoreEnhancer } from '@reduxjs/toolkit'\n\nexport interface SetupTeardownMixin {\n setup: () => void\n teardown: () => void\n}\n\nexport function withSetupTeardown(\n setup: () => void,\n teardown: () => void,\n): StoreEnhancer<SetupTeardownMixin> {\n return next => (reducer, preloadedState?) => ({\n ...next(reducer, preloadedState),\n setup,\n teardown,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,SAAS,kBACd,OACA,UACmC;AACnC,SAAO,UAAQ,CAAC,SAAS,oBAAqB;AAAA,IAC5C,GAAG,KAAK,SAAS,cAAc;AAAA,IAC/B;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var box_models_exports = {};
|
|
20
|
+
__export(box_models_exports, {
|
|
21
|
+
createBox: () => createBox,
|
|
22
|
+
getBox: () => getBox,
|
|
23
|
+
getBoxModel: () => getBoxModel,
|
|
24
|
+
getBoxModels: () => getBoxModels,
|
|
25
|
+
getInitialState: () => getInitialState,
|
|
26
|
+
getMeasurables: () => getMeasurables,
|
|
27
|
+
isMeasurable: () => isMeasurable,
|
|
28
|
+
measure: () => measure,
|
|
29
|
+
parse: () => parse,
|
|
30
|
+
reducer: () => reducer
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(box_models_exports);
|
|
33
|
+
var import_css_box_model = require("css-box-model");
|
|
34
|
+
var import_actions = require("../actions");
|
|
35
|
+
function parse(rawString) {
|
|
36
|
+
const value = Number(rawString.replace(/px$/, ""));
|
|
37
|
+
return Number.isFinite(value) ? value : 0;
|
|
38
|
+
}
|
|
39
|
+
function createBox(boxArgs) {
|
|
40
|
+
return (0, import_css_box_model.withScroll)((0, import_css_box_model.createBox)(boxArgs));
|
|
41
|
+
}
|
|
42
|
+
function getBox(element) {
|
|
43
|
+
return (0, import_css_box_model.withScroll)((0, import_css_box_model.getBox)(element));
|
|
44
|
+
}
|
|
45
|
+
function isMeasurable(value) {
|
|
46
|
+
if (value instanceof Element)
|
|
47
|
+
return true;
|
|
48
|
+
if (typeof value === "object" && value !== null && "getBoxModel" in value && typeof value.getBoxModel === "function") {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
function measure(measurable) {
|
|
54
|
+
if (measurable instanceof Element)
|
|
55
|
+
return getBox(measurable);
|
|
56
|
+
return measurable.getBoxModel();
|
|
57
|
+
}
|
|
58
|
+
function getInitialState() {
|
|
59
|
+
return { measurables: /* @__PURE__ */ new Map(), boxModels: /* @__PURE__ */ new Map() };
|
|
60
|
+
}
|
|
61
|
+
function getMeasurables(state) {
|
|
62
|
+
return state.measurables;
|
|
63
|
+
}
|
|
64
|
+
function getBoxModels(state) {
|
|
65
|
+
return state.boxModels;
|
|
66
|
+
}
|
|
67
|
+
function getBoxModel(state, documentKey, elementKey) {
|
|
68
|
+
return getBoxModels(state).get(documentKey)?.get(elementKey) ?? null;
|
|
69
|
+
}
|
|
70
|
+
function reducer(state = getInitialState(), action) {
|
|
71
|
+
if (!(0, import_actions.isKnownAction)(action))
|
|
72
|
+
return state;
|
|
73
|
+
switch (action.type) {
|
|
74
|
+
case import_actions.ActionTypes.REGISTER_MEASURABLE: {
|
|
75
|
+
const { documentKey, elementKey, measurable } = action.payload;
|
|
76
|
+
return {
|
|
77
|
+
...state,
|
|
78
|
+
measurables: new Map(state.measurables).set(
|
|
79
|
+
documentKey,
|
|
80
|
+
new Map(state.measurables.get(documentKey) ?? []).set(elementKey, measurable)
|
|
81
|
+
)
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
case import_actions.ActionTypes.UNREGISTER_MEASURABLE: {
|
|
85
|
+
const { documentKey, elementKey } = action.payload;
|
|
86
|
+
const nextMeasurables = new Map(state.measurables.get(documentKey) ?? []);
|
|
87
|
+
const deleted = nextMeasurables.delete(elementKey);
|
|
88
|
+
return deleted ? { ...state, measurables: new Map(state.measurables).set(documentKey, nextMeasurables) } : state;
|
|
89
|
+
}
|
|
90
|
+
case import_actions.ActionTypes.CHANGE_ELEMENT_BOX_MODELS: {
|
|
91
|
+
const { changedElementBoxModels } = action.payload;
|
|
92
|
+
if (changedElementBoxModels.size === 0)
|
|
93
|
+
return state;
|
|
94
|
+
const nextBoxModels = new Map(state.boxModels);
|
|
95
|
+
changedElementBoxModels.forEach((changedBoxModels, documentKey) => {
|
|
96
|
+
const nextDocumentBoxModels = new Map(nextBoxModels.get(documentKey) ?? []);
|
|
97
|
+
changedBoxModels.forEach((changedBoxModel, elementKey) => {
|
|
98
|
+
if (changedBoxModel == null)
|
|
99
|
+
nextDocumentBoxModels.delete(elementKey);
|
|
100
|
+
else
|
|
101
|
+
nextDocumentBoxModels.set(elementKey, changedBoxModel);
|
|
102
|
+
});
|
|
103
|
+
if (nextDocumentBoxModels.size > 0)
|
|
104
|
+
nextBoxModels.set(documentKey, nextDocumentBoxModels);
|
|
105
|
+
else
|
|
106
|
+
nextBoxModels.delete(documentKey);
|
|
107
|
+
});
|
|
108
|
+
return { ...state, boxModels: nextBoxModels };
|
|
109
|
+
}
|
|
110
|
+
default:
|
|
111
|
+
return state;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
115
|
+
0 && (module.exports = {
|
|
116
|
+
createBox,
|
|
117
|
+
getBox,
|
|
118
|
+
getBoxModel,
|
|
119
|
+
getBoxModels,
|
|
120
|
+
getInitialState,
|
|
121
|
+
getMeasurables,
|
|
122
|
+
isMeasurable,
|
|
123
|
+
measure,
|
|
124
|
+
parse,
|
|
125
|
+
reducer
|
|
126
|
+
});
|
|
127
|
+
//# sourceMappingURL=box-models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/state/modules/box-models.ts"],"sourcesContent":["import { type BoxModel } from '@makeswift/controls'\nimport {\n createBox as createBoxWithoutScroll,\n CreateBoxArgs,\n getBox as getBoxWithoutScroll,\n withScroll,\n} from 'css-box-model'\n\nimport { type Action, type UnknownAction, ActionTypes, isKnownAction } from '../actions'\n\nexport type { BoxModel }\n\nexport function parse(rawString: string): number {\n const value = Number(rawString.replace(/px$/, ''))\n\n return Number.isFinite(value) ? value : 0\n}\n\nexport function createBox(boxArgs: CreateBoxArgs): BoxModel {\n return withScroll(createBoxWithoutScroll(boxArgs))\n}\n\nexport function getBox(element: Element): BoxModel {\n return withScroll(getBoxWithoutScroll(element))\n}\n\nexport interface BoxModelHandle {\n getBoxModel(): BoxModel | null\n}\n\nexport type Measurable = Element | BoxModelHandle\n\nexport function isMeasurable(value: unknown): value is Measurable {\n if (value instanceof Element) return true\n\n if (\n typeof value === 'object' &&\n value !== null &&\n 'getBoxModel' in value &&\n typeof (value as { getBoxModel: unknown }).getBoxModel === 'function'\n ) {\n return true\n }\n\n return false\n}\n\nexport function measure(measurable: Measurable): BoxModel | null {\n if (measurable instanceof Element) return getBox(measurable)\n\n return measurable.getBoxModel()\n}\n\nexport type State = {\n measurables: Map<string, Map<string, Measurable>>\n boxModels: Map<string, Map<string, BoxModel>>\n}\n\nexport function getInitialState(): State {\n return { measurables: new Map(), boxModels: new Map() }\n}\n\nexport function getMeasurables(state: State): Map<string, Map<string, Measurable>> {\n return state.measurables\n}\n\nexport function getBoxModels(state: State): Map<string, Map<string, BoxModel>> {\n return state.boxModels\n}\n\nexport function getBoxModel(\n state: State,\n documentKey: string,\n elementKey: string,\n): BoxModel | null {\n return getBoxModels(state).get(documentKey)?.get(elementKey) ?? null\n}\n\nexport function reducer(state: State = getInitialState(), action: Action | UnknownAction) {\n if (!isKnownAction(action)) return state\n\n switch (action.type) {\n case ActionTypes.REGISTER_MEASURABLE: {\n const { documentKey, elementKey, measurable } = action.payload\n\n return {\n ...state,\n measurables: new Map(state.measurables).set(\n documentKey,\n new Map(state.measurables.get(documentKey) ?? []).set(elementKey, measurable),\n ),\n }\n }\n\n case ActionTypes.UNREGISTER_MEASURABLE: {\n const { documentKey, elementKey } = action.payload\n const nextMeasurables = new Map(state.measurables.get(documentKey) ?? [])\n\n const deleted = nextMeasurables.delete(elementKey)\n\n return deleted\n ? { ...state, measurables: new Map(state.measurables).set(documentKey, nextMeasurables) }\n : state\n }\n\n case ActionTypes.CHANGE_ELEMENT_BOX_MODELS: {\n const { changedElementBoxModels } = action.payload\n\n if (changedElementBoxModels.size === 0) return state\n\n const nextBoxModels = new Map(state.boxModels)\n\n changedElementBoxModels.forEach((changedBoxModels, documentKey) => {\n const nextDocumentBoxModels = new Map(nextBoxModels.get(documentKey) ?? [])\n\n changedBoxModels.forEach((changedBoxModel, elementKey) => {\n if (changedBoxModel == null) nextDocumentBoxModels.delete(elementKey)\n else nextDocumentBoxModels.set(elementKey, changedBoxModel)\n })\n\n if (nextDocumentBoxModels.size > 0) nextBoxModels.set(documentKey, nextDocumentBoxModels)\n else nextBoxModels.delete(documentKey)\n })\n\n return { ...state, boxModels: nextBoxModels }\n }\n\n default:\n return state\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,2BAKO;AAEP,qBAA4E;AAIrE,SAAS,MAAM,WAA2B;AAC/C,QAAM,QAAQ,OAAO,UAAU,QAAQ,OAAO,EAAE,CAAC;AAEjD,SAAO,OAAO,SAAS,KAAK,IAAI,QAAQ;AAC1C;AAEO,SAAS,UAAU,SAAkC;AAC1D,aAAO,qCAAW,qBAAAA,WAAuB,OAAO,CAAC;AACnD;AAEO,SAAS,OAAO,SAA4B;AACjD,aAAO,qCAAW,qBAAAC,QAAoB,OAAO,CAAC;AAChD;AAQO,SAAS,aAAa,OAAqC;AAChE,MAAI,iBAAiB;AAAS,WAAO;AAErC,MACE,OAAO,UAAU,YACjB,UAAU,QACV,iBAAiB,SACjB,OAAQ,MAAmC,gBAAgB,YAC3D;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAEO,SAAS,QAAQ,YAAyC;AAC/D,MAAI,sBAAsB;AAAS,WAAO,OAAO,UAAU;AAE3D,SAAO,WAAW,YAAY;AAChC;AAOO,SAAS,kBAAyB;AACvC,SAAO,EAAE,aAAa,oBAAI,IAAI,GAAG,WAAW,oBAAI,IAAI,EAAE;AACxD;AAEO,SAAS,eAAe,OAAoD;AACjF,SAAO,MAAM;AACf;AAEO,SAAS,aAAa,OAAkD;AAC7E,SAAO,MAAM;AACf;AAEO,SAAS,YACd,OACA,aACA,YACiB;AACjB,SAAO,aAAa,KAAK,EAAE,IAAI,WAAW,GAAG,IAAI,UAAU,KAAK;AAClE;AAEO,SAAS,QAAQ,QAAe,gBAAgB,GAAG,QAAgC;AACxF,MAAI,KAAC,8BAAc,MAAM;AAAG,WAAO;AAEnC,UAAQ,OAAO,MAAM;AAAA,IACnB,KAAK,2BAAY,qBAAqB;AACpC,YAAM,EAAE,aAAa,YAAY,WAAW,IAAI,OAAO;AAEvD,aAAO;AAAA,QACL,GAAG;AAAA,QACH,aAAa,IAAI,IAAI,MAAM,WAAW,EAAE;AAAA,UACtC;AAAA,UACA,IAAI,IAAI,MAAM,YAAY,IAAI,WAAW,KAAK,CAAC,CAAC,EAAE,IAAI,YAAY,UAAU;AAAA,QAC9E;AAAA,MACF;AAAA,IACF;AAAA,IAEA,KAAK,2BAAY,uBAAuB;AACtC,YAAM,EAAE,aAAa,WAAW,IAAI,OAAO;AAC3C,YAAM,kBAAkB,IAAI,IAAI,MAAM,YAAY,IAAI,WAAW,KAAK,CAAC,CAAC;AAExE,YAAM,UAAU,gBAAgB,OAAO,UAAU;AAEjD,aAAO,UACH,EAAE,GAAG,OAAO,aAAa,IAAI,IAAI,MAAM,WAAW,EAAE,IAAI,aAAa,eAAe,EAAE,IACtF;AAAA,IACN;AAAA,IAEA,KAAK,2BAAY,2BAA2B;AAC1C,YAAM,EAAE,wBAAwB,IAAI,OAAO;AAE3C,UAAI,wBAAwB,SAAS;AAAG,eAAO;AAE/C,YAAM,gBAAgB,IAAI,IAAI,MAAM,SAAS;AAE7C,8BAAwB,QAAQ,CAAC,kBAAkB,gBAAgB;AACjE,cAAM,wBAAwB,IAAI,IAAI,cAAc,IAAI,WAAW,KAAK,CAAC,CAAC;AAE1E,yBAAiB,QAAQ,CAAC,iBAAiB,eAAe;AACxD,cAAI,mBAAmB;AAAM,kCAAsB,OAAO,UAAU;AAAA;AAC/D,kCAAsB,IAAI,YAAY,eAAe;AAAA,QAC5D,CAAC;AAED,YAAI,sBAAsB,OAAO;AAAG,wBAAc,IAAI,aAAa,qBAAqB;AAAA;AACnF,wBAAc,OAAO,WAAW;AAAA,MACvC,CAAC;AAED,aAAO,EAAE,GAAG,OAAO,WAAW,cAAc;AAAA,IAC9C;AAAA,IAEA;AACE,aAAO;AAAA,EACX;AACF;","names":["createBoxWithoutScroll","getBoxWithoutScroll"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var element_imperative_handles_exports = {};
|
|
20
|
+
__export(element_imperative_handles_exports, {
|
|
21
|
+
getElementImperativeHandles: () => getElementImperativeHandles,
|
|
22
|
+
reducer: () => reducer
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(element_imperative_handles_exports);
|
|
25
|
+
var import_actions = require("../actions");
|
|
26
|
+
function getElementImperativeHandles(state) {
|
|
27
|
+
return state;
|
|
28
|
+
}
|
|
29
|
+
function getInitialState() {
|
|
30
|
+
return /* @__PURE__ */ new Map();
|
|
31
|
+
}
|
|
32
|
+
function reducer(state = getInitialState(), action) {
|
|
33
|
+
if (!(0, import_actions.isKnownAction)(action))
|
|
34
|
+
return state;
|
|
35
|
+
switch (action.type) {
|
|
36
|
+
case import_actions.ActionTypes.REGISTER_COMPONENT_HANDLE:
|
|
37
|
+
return new Map(state).set(
|
|
38
|
+
action.payload.documentKey,
|
|
39
|
+
new Map(new Map(state.get(action.payload.documentKey) ?? [])).set(
|
|
40
|
+
action.payload.elementKey,
|
|
41
|
+
action.payload.componentHandle
|
|
42
|
+
)
|
|
43
|
+
);
|
|
44
|
+
case import_actions.ActionTypes.UNREGISTER_COMPONENT_HANDLE: {
|
|
45
|
+
const byElementKey = new Map(state.get(action.payload.documentKey) ?? []);
|
|
46
|
+
const deleted = byElementKey.delete(action.payload.elementKey);
|
|
47
|
+
if (!deleted)
|
|
48
|
+
return state;
|
|
49
|
+
return new Map(state).set(action.payload.documentKey, byElementKey);
|
|
50
|
+
}
|
|
51
|
+
default:
|
|
52
|
+
return state;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
getElementImperativeHandles,
|
|
58
|
+
reducer
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=element-imperative-handles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/state/modules/element-imperative-handles.ts"],"sourcesContent":["import { ElementImperativeHandle } from '../../runtimes/react/element-imperative-handle'\nimport { type Action, type UnknownAction, ActionTypes, isKnownAction } from '../actions'\n\ntype State = Map<string, Map<string, ElementImperativeHandle>>\n\nexport function getElementImperativeHandles(\n state: State,\n): Map<string, Map<string, ElementImperativeHandle>> {\n return state\n}\n\nfunction getInitialState(): State {\n return new Map()\n}\n\nexport function reducer(state: State = getInitialState(), action: Action | UnknownAction): State {\n if (!isKnownAction(action)) return state\n\n switch (action.type) {\n case ActionTypes.REGISTER_COMPONENT_HANDLE:\n return new Map(state).set(\n action.payload.documentKey,\n new Map(new Map(state.get(action.payload.documentKey) ?? [])).set(\n action.payload.elementKey,\n action.payload.componentHandle,\n ),\n )\n\n case ActionTypes.UNREGISTER_COMPONENT_HANDLE: {\n const byElementKey = new Map(state.get(action.payload.documentKey) ?? [])\n\n const deleted = byElementKey.delete(action.payload.elementKey)\n\n if (!deleted) return state\n\n return new Map(state).set(action.payload.documentKey, byElementKey)\n }\n\n default:\n return state\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qBAA4E;AAIrE,SAAS,4BACd,OACmD;AACnD,SAAO;AACT;AAEA,SAAS,kBAAyB;AAChC,SAAO,oBAAI,IAAI;AACjB;AAEO,SAAS,QAAQ,QAAe,gBAAgB,GAAG,QAAuC;AAC/F,MAAI,KAAC,8BAAc,MAAM;AAAG,WAAO;AAEnC,UAAQ,OAAO,MAAM;AAAA,IACnB,KAAK,2BAAY;AACf,aAAO,IAAI,IAAI,KAAK,EAAE;AAAA,QACpB,OAAO,QAAQ;AAAA,QACf,IAAI,IAAI,IAAI,IAAI,MAAM,IAAI,OAAO,QAAQ,WAAW,KAAK,CAAC,CAAC,CAAC,EAAE;AAAA,UAC5D,OAAO,QAAQ;AAAA,UACf,OAAO,QAAQ;AAAA,QACjB;AAAA,MACF;AAAA,IAEF,KAAK,2BAAY,6BAA6B;AAC5C,YAAM,eAAe,IAAI,IAAI,MAAM,IAAI,OAAO,QAAQ,WAAW,KAAK,CAAC,CAAC;AAExE,YAAM,UAAU,aAAa,OAAO,OAAO,QAAQ,UAAU;AAE7D,UAAI,CAAC;AAAS,eAAO;AAErB,aAAO,IAAI,IAAI,KAAK,EAAE,IAAI,OAAO,QAAQ,aAAa,YAAY;AAAA,IACpE;AAAA,IAEA;AACE,aAAO;AAAA,EACX;AACF;","names":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var is_preview_exports = {};
|
|
20
|
+
__export(is_preview_exports, {
|
|
21
|
+
getInitialState: () => getInitialState,
|
|
22
|
+
getIsPreview: () => getIsPreview,
|
|
23
|
+
reducer: () => reducer
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(is_preview_exports);
|
|
26
|
+
var import_actions = require("../actions");
|
|
27
|
+
function getInitialState(isPreview = false) {
|
|
28
|
+
return isPreview;
|
|
29
|
+
}
|
|
30
|
+
function getIsPreview(state) {
|
|
31
|
+
return state;
|
|
32
|
+
}
|
|
33
|
+
function reducer(state = getInitialState(), action) {
|
|
34
|
+
if (!(0, import_actions.isKnownAction)(action))
|
|
35
|
+
return state;
|
|
36
|
+
switch (action.type) {
|
|
37
|
+
default:
|
|
38
|
+
return state;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
getInitialState,
|
|
44
|
+
getIsPreview,
|
|
45
|
+
reducer
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=is-preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/state/modules/is-preview.ts"],"sourcesContent":["import { type Action, type UnknownAction, isKnownAction } from '../actions'\n\nexport type State = boolean\n\nexport function getInitialState(isPreview = false): State {\n return isPreview\n}\n\nexport function getIsPreview(state: State): boolean {\n return state\n}\n\nexport function reducer(state = getInitialState(), action: Action | UnknownAction): State {\n if (!isKnownAction(action)) return state\n\n switch (action.type) {\n default:\n return state\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA+D;AAIxD,SAAS,gBAAgB,YAAY,OAAc;AACxD,SAAO;AACT;AAEO,SAAS,aAAa,OAAuB;AAClD,SAAO;AACT;AAEO,SAAS,QAAQ,QAAQ,gBAAgB,GAAG,QAAuC;AACxF,MAAI,KAAC,8BAAc,MAAM;AAAG,WAAO;AAEnC,UAAQ,OAAO,MAAM;AAAA,IACnB;AACE,aAAO;AAAA,EACX;AACF;","names":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var pointer_exports = {};
|
|
20
|
+
__export(pointer_exports, {
|
|
21
|
+
getPointer: () => getPointer,
|
|
22
|
+
reducer: () => reducer
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(pointer_exports);
|
|
25
|
+
var import_actions = require("../actions");
|
|
26
|
+
function getInitialState() {
|
|
27
|
+
return { pointer: null };
|
|
28
|
+
}
|
|
29
|
+
function getPointer(state) {
|
|
30
|
+
return state.pointer;
|
|
31
|
+
}
|
|
32
|
+
function reducer(state = getInitialState(), action) {
|
|
33
|
+
if (!(0, import_actions.isKnownAction)(action))
|
|
34
|
+
return state;
|
|
35
|
+
switch (action.type) {
|
|
36
|
+
case import_actions.ActionTypes.BUILDER_POINTER_MOVE:
|
|
37
|
+
return { ...state, pointer: action.payload.pointer };
|
|
38
|
+
default:
|
|
39
|
+
return state;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
getPointer,
|
|
45
|
+
reducer
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=pointer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/state/modules/pointer.ts"],"sourcesContent":["import { type Action, type UnknownAction, ActionTypes, isKnownAction } from '../actions'\n\nexport type Point = { x: number; y: number }\n\ntype State = {\n pointer: Point | null\n}\n\nfunction getInitialState(): State {\n return { pointer: null }\n}\n\nexport function getPointer(state: State): Point | null {\n return state.pointer\n}\n\nexport function reducer(state: State = getInitialState(), action: Action | UnknownAction): State {\n if (!isKnownAction(action)) return state\n\n switch (action.type) {\n case ActionTypes.BUILDER_POINTER_MOVE:\n return { ...state, pointer: action.payload.pointer }\n\n default:\n return state\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA4E;AAQ5E,SAAS,kBAAyB;AAChC,SAAO,EAAE,SAAS,KAAK;AACzB;AAEO,SAAS,WAAW,OAA4B;AACrD,SAAO,MAAM;AACf;AAEO,SAAS,QAAQ,QAAe,gBAAgB,GAAG,QAAuC;AAC/F,MAAI,KAAC,8BAAc,MAAM;AAAG,WAAO;AAEnC,UAAQ,OAAO,MAAM;AAAA,IACnB,KAAK,2BAAY;AACf,aAAO,EAAE,GAAG,OAAO,SAAS,OAAO,QAAQ,QAAQ;AAAA,IAErD;AACE,aAAO;AAAA,EACX;AACF;","names":[]}
|