@makeswift/runtime 0.27.2 → 0.27.4

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.
Files changed (95) hide show
  1. package/dist/cjs/api-handler/handlers/manifest.js +1 -1
  2. package/dist/cjs/client/index.js +3 -3
  3. package/dist/cjs/next/api-handler/config/pages-router.js +1 -1
  4. package/dist/cjs/next/api-handler/config/pages-router.js.map +1 -1
  5. package/dist/esm/api-handler/handlers/manifest.js +1 -1
  6. package/dist/esm/client/index.js +3 -3
  7. package/dist/esm/next/api-handler/config/pages-router.js +1 -1
  8. package/dist/esm/next/api-handler/config/pages-router.js.map +1 -1
  9. package/package.json +1 -1
  10. package/dist/cjs/api/react.js +0 -256
  11. package/dist/cjs/api/react.js.map +0 -1
  12. package/dist/cjs/runtimes/react/components/LiveProvider.js +0 -50
  13. package/dist/cjs/runtimes/react/components/LiveProvider.js.map +0 -1
  14. package/dist/cjs/runtimes/react/components/PreviewProvider.js +0 -63
  15. package/dist/cjs/runtimes/react/components/PreviewProvider.js.map +0 -1
  16. package/dist/cjs/runtimes/react/components/hooks/use-builder-connection-ping.js +0 -62
  17. package/dist/cjs/runtimes/react/components/hooks/use-builder-connection-ping.js.map +0 -1
  18. package/dist/cjs/runtimes/react/hooks/use-is-preview.js +0 -33
  19. package/dist/cjs/runtimes/react/hooks/use-is-preview.js.map +0 -1
  20. package/dist/cjs/state/actions/internal.js +0 -205
  21. package/dist/cjs/state/actions/internal.js.map +0 -1
  22. package/dist/cjs/state/mixins/setup-teardown.js +0 -35
  23. package/dist/cjs/state/mixins/setup-teardown.js.map +0 -1
  24. package/dist/cjs/state/modules/box-models.js +0 -127
  25. package/dist/cjs/state/modules/box-models.js.map +0 -1
  26. package/dist/cjs/state/modules/element-imperative-handles.js +0 -60
  27. package/dist/cjs/state/modules/element-imperative-handles.js.map +0 -1
  28. package/dist/cjs/state/modules/is-preview.js +0 -47
  29. package/dist/cjs/state/modules/is-preview.js.map +0 -1
  30. package/dist/cjs/state/modules/pointer.js +0 -47
  31. package/dist/cjs/state/modules/pointer.js.map +0 -1
  32. package/dist/cjs/state/modules/read-write-documents.js +0 -98
  33. package/dist/cjs/state/modules/read-write-documents.js.map +0 -1
  34. package/dist/cjs/state/react-builder-preview.js +0 -586
  35. package/dist/cjs/state/react-builder-preview.js.map +0 -1
  36. package/dist/cjs/state/react-page.js +0 -313
  37. package/dist/cjs/state/react-page.js.map +0 -1
  38. package/dist/esm/api/react.js +0 -223
  39. package/dist/esm/api/react.js.map +0 -1
  40. package/dist/esm/runtimes/react/components/LiveProvider.js +0 -20
  41. package/dist/esm/runtimes/react/components/LiveProvider.js.map +0 -1
  42. package/dist/esm/runtimes/react/components/PreviewProvider.js +0 -33
  43. package/dist/esm/runtimes/react/components/PreviewProvider.js.map +0 -1
  44. package/dist/esm/runtimes/react/components/hooks/use-builder-connection-ping.js +0 -38
  45. package/dist/esm/runtimes/react/components/hooks/use-builder-connection-ping.js.map +0 -1
  46. package/dist/esm/runtimes/react/hooks/use-is-preview.js +0 -9
  47. package/dist/esm/runtimes/react/hooks/use-is-preview.js.map +0 -1
  48. package/dist/esm/state/actions/internal.js +0 -162
  49. package/dist/esm/state/actions/internal.js.map +0 -1
  50. package/dist/esm/state/mixins/setup-teardown.js +0 -11
  51. package/dist/esm/state/mixins/setup-teardown.js.map +0 -1
  52. package/dist/esm/state/modules/box-models.js +0 -98
  53. package/dist/esm/state/modules/box-models.js.map +0 -1
  54. package/dist/esm/state/modules/element-imperative-handles.js +0 -35
  55. package/dist/esm/state/modules/element-imperative-handles.js.map +0 -1
  56. package/dist/esm/state/modules/is-preview.js +0 -21
  57. package/dist/esm/state/modules/is-preview.js.map +0 -1
  58. package/dist/esm/state/modules/pointer.js +0 -22
  59. package/dist/esm/state/modules/pointer.js.map +0 -1
  60. package/dist/esm/state/modules/read-write-documents.js +0 -60
  61. package/dist/esm/state/modules/read-write-documents.js.map +0 -1
  62. package/dist/esm/state/react-builder-preview.js +0 -547
  63. package/dist/esm/state/react-builder-preview.js.map +0 -1
  64. package/dist/esm/state/react-page.js +0 -268
  65. package/dist/esm/state/react-page.js.map +0 -1
  66. package/dist/types/api/react.d.ts +0 -82
  67. package/dist/types/api/react.d.ts.map +0 -1
  68. package/dist/types/runtimes/react/components/LiveProvider.d.ts +0 -3
  69. package/dist/types/runtimes/react/components/LiveProvider.d.ts.map +0 -1
  70. package/dist/types/runtimes/react/components/PreviewProvider.d.ts +0 -5
  71. package/dist/types/runtimes/react/components/PreviewProvider.d.ts.map +0 -1
  72. package/dist/types/runtimes/react/components/hooks/use-builder-connection-ping.d.ts +0 -4
  73. package/dist/types/runtimes/react/components/hooks/use-builder-connection-ping.d.ts.map +0 -1
  74. package/dist/types/runtimes/react/hooks/use-is-preview.d.ts +0 -2
  75. package/dist/types/runtimes/react/hooks/use-is-preview.d.ts.map +0 -1
  76. package/dist/types/state/__tests__/react-page.test.d.ts +0 -2
  77. package/dist/types/state/__tests__/react-page.test.d.ts.map +0 -1
  78. package/dist/types/state/actions/internal.d.ts +0 -181
  79. package/dist/types/state/actions/internal.d.ts.map +0 -1
  80. package/dist/types/state/mixins/setup-teardown.d.ts +0 -7
  81. package/dist/types/state/mixins/setup-teardown.d.ts.map +0 -1
  82. package/dist/types/state/modules/box-models.d.ts +0 -23
  83. package/dist/types/state/modules/box-models.d.ts.map +0 -1
  84. package/dist/types/state/modules/element-imperative-handles.d.ts +0 -7
  85. package/dist/types/state/modules/element-imperative-handles.d.ts.map +0 -1
  86. package/dist/types/state/modules/is-preview.d.ts +0 -6
  87. package/dist/types/state/modules/is-preview.d.ts.map +0 -1
  88. package/dist/types/state/modules/pointer.d.ts +0 -12
  89. package/dist/types/state/modules/pointer.d.ts.map +0 -1
  90. package/dist/types/state/modules/read-write-documents.d.ts +0 -14
  91. package/dist/types/state/modules/read-write-documents.d.ts.map +0 -1
  92. package/dist/types/state/react-builder-preview.d.ts +0 -108
  93. package/dist/types/state/react-builder-preview.d.ts.map +0 -1
  94. package/dist/types/state/react-page.d.ts +0 -149
  95. package/dist/types/state/react-page.d.ts.map +0 -1
@@ -1,268 +0,0 @@
1
- import {
2
- configureStore as configureReduxStore,
3
- combineReducers
4
- } from "@reduxjs/toolkit";
5
- import { createSelector } from "reselect";
6
- import {
7
- createReplacementContext,
8
- replaceResourceIfNeeded,
9
- ContextResource
10
- } from "@makeswift/controls";
11
- import { copy as copyFromControl, merge } from "../controls/control";
12
- import * as Documents from "./modules/read-only-documents";
13
- import * as ElementTrees from "./modules/element-trees";
14
- import * as ReactComponents from "./modules/react-components";
15
- import * as ComponentsMeta from "./modules/components-meta";
16
- import * as PropControllers from "./modules/prop-controllers";
17
- import * as PropControllerHandles from "./modules/prop-controller-handles";
18
- import * as IsInBuilder from "./modules/is-in-builder";
19
- import * as IsPreview from "./modules/is-preview";
20
- import * as BuilderEditMode from "./modules/builder-edit-mode";
21
- import * as Breakpoints from "./modules/breakpoints";
22
- import { ActionTypes } from "./actions";
23
- import { changeElementTree, createElementTree, deleteElementTree } from "./actions/internal";
24
- import { actionMiddleware, middlewareOptions, devToolsConfig } from "./toolkit";
25
- import { withSetupTeardown } from "./mixins/setup-teardown";
26
- import {
27
- createBaseDocument,
28
- createDocumentReference,
29
- getRootElement,
30
- isElementReference
31
- } from "./modules/read-only-documents";
32
- const reducer = combineReducers({
33
- documents: Documents.reducer,
34
- elementTrees: ElementTrees.reducer,
35
- reactComponents: ReactComponents.reducer,
36
- componentsMeta: ComponentsMeta.reducer,
37
- propControllers: PropControllers.reducer,
38
- propControllerHandles: PropControllerHandles.reducer,
39
- isInBuilder: IsInBuilder.reducer,
40
- isPreview: IsPreview.reducer,
41
- builderEditMode: BuilderEditMode.reducer,
42
- breakpoints: Breakpoints.reducer
43
- });
44
- function getDocumentsStateSlice(state) {
45
- return state.documents;
46
- }
47
- function getDocument(state, documentKey) {
48
- return Documents.getDocument(getDocumentsStateSlice(state), documentKey);
49
- }
50
- function getElementTreesSlice(state) {
51
- return state.elementTrees;
52
- }
53
- function getElements(state, documentKey) {
54
- return ElementTrees.getElements(getElementTreesSlice(state), documentKey);
55
- }
56
- function getElementIds(state, documentKey) {
57
- return ElementTrees.getElementIds(getElementTreesSlice(state), documentKey);
58
- }
59
- function getReactComponentsStateSlice(state) {
60
- return state.reactComponents;
61
- }
62
- function getReactComponent(state, type) {
63
- return ReactComponents.getReactComponent(getReactComponentsStateSlice(state), type);
64
- }
65
- function getComponentsMetaStateSlice(state) {
66
- return state.componentsMeta;
67
- }
68
- function getComponentMeta(state, type) {
69
- return ComponentsMeta.getComponentMeta(getComponentsMetaStateSlice(state), type);
70
- }
71
- function getPropControllersStateSlice(state) {
72
- return state.propControllers;
73
- }
74
- function getPropControllerDescriptors(state) {
75
- return PropControllers.getPropControllerDescriptors(getPropControllersStateSlice(state));
76
- }
77
- function getComponentPropControllerDescriptors(state, componentType) {
78
- return PropControllers.getComponentPropControllerDescriptors(
79
- getPropControllersStateSlice(state),
80
- componentType
81
- );
82
- }
83
- function getPropControllerHandlesStateSlice(state) {
84
- return state.propControllerHandles;
85
- }
86
- function getPropControllers(state, documentKey, elementKey) {
87
- return PropControllerHandles.getPropControllers(
88
- getPropControllerHandlesStateSlice(state),
89
- documentKey,
90
- elementKey
91
- );
92
- }
93
- const getDocumentKeysSortedByDepth = createSelector(
94
- [getDocumentsStateSlice, getElementTreesSlice],
95
- (documents, elementTrees) => {
96
- return [...documents.keys()].sort((a, b) => elementTrees.get(a)?.elements.has(b) ? -1 : 1);
97
- }
98
- );
99
- function getElement(state, documentKey, elementKey) {
100
- return ElementTrees.getElement(getElementTreesSlice(state), documentKey, elementKey);
101
- }
102
- function getElementId(state, documentKey, elementKey) {
103
- return ElementTrees.getElementId(getElementTreesSlice(state), documentKey, elementKey);
104
- }
105
- function getElementPropControllerDescriptors(state, documentKey, elementKey) {
106
- const element = getElement(state, documentKey, elementKey);
107
- if (element == null || Documents.isElementReference(element))
108
- return null;
109
- return getComponentPropControllerDescriptors(state, element.type);
110
- }
111
- function copyElementTree(state, elementTree, replacementContext) {
112
- function copyElementTreeNode(state2, replacementContext2) {
113
- return function(node) {
114
- const context = {
115
- replacementContext: replacementContext2,
116
- copyElement: copyElementTreeNode(state2, replacementContext2)
117
- };
118
- if (Documents.isElementReference(node)) {
119
- return {
120
- ...node,
121
- value: replaceResourceIfNeeded(ContextResource.GlobalElement, node.value, context)
122
- };
123
- }
124
- const descriptors = getComponentPropControllerDescriptors(state2, node.type);
125
- if (descriptors == null)
126
- return node;
127
- for (const [propKey, descriptor] of Object.entries(descriptors)) {
128
- node.props[propKey] = copyFromControl(descriptor, node.props[propKey], context);
129
- }
130
- return node;
131
- };
132
- }
133
- const copy = JSON.parse(JSON.stringify(elementTree));
134
- return copyElementTreeNode(state, createReplacementContext(replacementContext))(copy);
135
- }
136
- function mergeElement(state, baseElement, overrideElement) {
137
- if (baseElement.type !== overrideElement.type || baseElement.key !== overrideElement.key) {
138
- throw new Error(`Can't merge elements of different types or keys`);
139
- }
140
- if (Documents.isElementReference(overrideElement))
141
- return overrideElement;
142
- if (Documents.isElementReference(baseElement))
143
- return baseElement;
144
- const elementDescriptors = getPropControllerDescriptors(state);
145
- const descriptors = elementDescriptors.get(baseElement.type);
146
- if (descriptors == null) {
147
- throw new Error(
148
- `Can't merge element of type "${baseElement.type}" because it has no descriptors`
149
- );
150
- }
151
- const mergedProps = {};
152
- for (const propName of Object.keys(descriptors)) {
153
- const descriptor = descriptors[propName];
154
- const context = {
155
- mergeElement(base, override) {
156
- return mergeElement(state, base, override);
157
- }
158
- };
159
- mergedProps[propName] = merge(
160
- descriptor,
161
- baseElement.props[propName],
162
- overrideElement.props[propName],
163
- context
164
- );
165
- }
166
- return { ...baseElement, props: mergedProps };
167
- }
168
- function getIsInBuilder(state) {
169
- return state.isInBuilder;
170
- }
171
- function getIsPreview(state) {
172
- return IsPreview.getIsPreview(state.isPreview);
173
- }
174
- function getBuilderEditMode(state) {
175
- return state.builderEditMode;
176
- }
177
- function getBreakpoints(state) {
178
- return state.breakpoints;
179
- }
180
- function elementTreeMiddleware() {
181
- return actionMiddleware(({ dispatch, getState }) => (next) => {
182
- return (action) => {
183
- switch (action.type) {
184
- case ActionTypes.REGISTER_DOCUMENT:
185
- dispatch(
186
- createElementTree({
187
- document: action.payload.document,
188
- descriptors: getPropControllerDescriptors(getState())
189
- })
190
- );
191
- break;
192
- case ActionTypes.CHANGE_DOCUMENT: {
193
- const { documentKey, operation } = action.payload;
194
- const oldDocument = getDocument(getState(), documentKey);
195
- const result = next(action);
196
- const newDocument = getDocument(getState(), documentKey);
197
- if (oldDocument != null && newDocument != null && newDocument !== oldDocument) {
198
- dispatch(
199
- changeElementTree({
200
- oldDocument,
201
- newDocument,
202
- descriptors: getPropControllerDescriptors(getState()),
203
- operation
204
- })
205
- );
206
- }
207
- return result;
208
- }
209
- case ActionTypes.UNREGISTER_DOCUMENT:
210
- dispatch(deleteElementTree(action.payload));
211
- break;
212
- }
213
- return next(action);
214
- };
215
- });
216
- }
217
- function configureStore({
218
- name,
219
- preloadedState,
220
- breakpoints
221
- }) {
222
- return configureReduxStore({
223
- reducer,
224
- preloadedState: {
225
- ...preloadedState,
226
- breakpoints: Breakpoints.getInitialState(breakpoints ?? preloadedState?.breakpoints)
227
- },
228
- middleware: (getDefaultMiddleware) => getDefaultMiddleware(middlewareOptions).concat(elementTreeMiddleware()),
229
- enhancers: (getDefaultEnhancers) => getDefaultEnhancers().concat(
230
- withSetupTeardown(
231
- () => {
232
- },
233
- () => {
234
- }
235
- )
236
- ),
237
- devTools: devToolsConfig({
238
- name: `${name} (${(/* @__PURE__ */ new Date()).toISOString()})`
239
- })
240
- });
241
- }
242
- export {
243
- configureStore,
244
- copyElementTree,
245
- createBaseDocument,
246
- createDocumentReference,
247
- elementTreeMiddleware,
248
- getBreakpoints,
249
- getBuilderEditMode,
250
- getComponentMeta,
251
- getComponentPropControllerDescriptors,
252
- getDocument,
253
- getDocumentKeysSortedByDepth,
254
- getElement,
255
- getElementId,
256
- getElementIds,
257
- getElementPropControllerDescriptors,
258
- getElements,
259
- getIsInBuilder,
260
- getIsPreview,
261
- getPropControllerDescriptors,
262
- getPropControllers,
263
- getReactComponent,
264
- getRootElement,
265
- isElementReference,
266
- mergeElement
267
- };
268
- //# sourceMappingURL=react-page.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/state/react-page.ts"],"sourcesContent":["import {\n configureStore as configureReduxStore,\n combineReducers,\n type ThunkDispatch,\n type Middleware,\n} from '@reduxjs/toolkit'\n\nimport { createSelector } from 'reselect'\n\nimport {\n createReplacementContext,\n type SerializableReplacementContext,\n type ReplacementContext,\n type MergeContext,\n CopyContext,\n replaceResourceIfNeeded,\n ContextResource,\n} from '@makeswift/controls'\n\nimport { copy as copyFromControl, merge } from '../controls/control'\n\nimport * as Documents from './modules/read-only-documents'\nimport * as ElementTrees from './modules/element-trees'\nimport * as ReactComponents from './modules/react-components'\nimport * as ComponentsMeta from './modules/components-meta'\nimport * as PropControllers from './modules/prop-controllers'\nimport * as PropControllerHandles from './modules/prop-controller-handles'\nimport * as IsInBuilder from './modules/is-in-builder'\nimport * as IsPreview from './modules/is-preview'\nimport * as BuilderEditMode from './modules/builder-edit-mode'\nimport * as Breakpoints from './modules/breakpoints'\n\nimport { type Action, ActionTypes } from './actions'\nimport { changeElementTree, createElementTree, deleteElementTree } from './actions/internal'\n\nimport { actionMiddleware, middlewareOptions, devToolsConfig } from './toolkit'\n\nimport { withSetupTeardown } from './mixins/setup-teardown'\n\nexport type {\n Data,\n Document,\n DocumentReference,\n Element,\n ElementData,\n ElementReference,\n} from './modules/read-only-documents'\n\nexport {\n createBaseDocument,\n createDocumentReference,\n getRootElement,\n isElementReference,\n} from './modules/read-only-documents'\n\nexport type { ComponentType } from './modules/react-components'\nexport type { ComponentMeta } from './modules/components-meta'\n\nconst reducer = combineReducers({\n documents: Documents.reducer,\n elementTrees: ElementTrees.reducer,\n reactComponents: ReactComponents.reducer,\n componentsMeta: ComponentsMeta.reducer,\n propControllers: PropControllers.reducer,\n propControllerHandles: PropControllerHandles.reducer,\n isInBuilder: IsInBuilder.reducer,\n isPreview: IsPreview.reducer,\n builderEditMode: BuilderEditMode.reducer,\n breakpoints: Breakpoints.reducer,\n})\n\nexport type State = ReturnType<typeof reducer>\nexport type Dispatch = ThunkDispatch<State, unknown, Action>\n\nfunction getDocumentsStateSlice(state: State): Documents.State {\n return state.documents\n}\n\nexport function getDocument(state: State, documentKey: string): Documents.Document | null {\n return Documents.getDocument(getDocumentsStateSlice(state), documentKey)\n}\n\nfunction getElementTreesSlice(state: State): ElementTrees.State {\n return state.elementTrees\n}\n\nexport function getElements(\n state: State,\n documentKey: string,\n): ElementTrees.ElementTree['elements'] {\n return ElementTrees.getElements(getElementTreesSlice(state), documentKey)\n}\n\nexport function getElementIds(\n state: State,\n documentKey: string,\n): ElementTrees.ElementTree['elementIds'] {\n return ElementTrees.getElementIds(getElementTreesSlice(state), documentKey)\n}\n\nfunction getReactComponentsStateSlice(state: State): ReactComponents.State {\n return state.reactComponents\n}\n\nexport function getReactComponent(\n state: State,\n type: string,\n): ReactComponents.ComponentType | null {\n return ReactComponents.getReactComponent(getReactComponentsStateSlice(state), type)\n}\n\nfunction getComponentsMetaStateSlice(state: State): ComponentsMeta.State {\n return state.componentsMeta\n}\n\nexport function getComponentMeta(state: State, type: string): ComponentsMeta.ComponentMeta | null {\n return ComponentsMeta.getComponentMeta(getComponentsMetaStateSlice(state), type)\n}\n\nfunction getPropControllersStateSlice(state: State): PropControllers.State {\n return state.propControllers\n}\n\nexport function getPropControllerDescriptors(state: State): PropControllers.State {\n return PropControllers.getPropControllerDescriptors(getPropControllersStateSlice(state))\n}\n\nexport function getComponentPropControllerDescriptors(\n state: State,\n componentType: string,\n): PropControllers.DescriptorsByProp | null {\n return PropControllers.getComponentPropControllerDescriptors(\n getPropControllersStateSlice(state),\n componentType,\n )\n}\n\nfunction getPropControllerHandlesStateSlice(state: State): PropControllerHandles.State {\n return state.propControllerHandles\n}\n\nexport function getPropControllers(state: State, documentKey: string, elementKey: string) {\n return PropControllerHandles.getPropControllers(\n getPropControllerHandlesStateSlice(state),\n documentKey,\n elementKey,\n )\n}\n\n/**\n * Returns all document keys sorted by depth, i.e., parent documents come before child documents.\n */\nexport const getDocumentKeysSortedByDepth: (state: State) => string[] = createSelector(\n [getDocumentsStateSlice, getElementTreesSlice],\n (documents, elementTrees) => {\n return [...documents.keys()].sort((a, b) => (elementTrees.get(a)?.elements.has(b) ? -1 : 1))\n },\n)\n\nexport function getElement(\n state: State,\n documentKey: string,\n elementKey: string,\n): Documents.Element | null {\n return ElementTrees.getElement(getElementTreesSlice(state), documentKey, elementKey)\n}\n\nexport function getElementId(state: State, documentKey: string, elementKey: string): string | null {\n return ElementTrees.getElementId(getElementTreesSlice(state), documentKey, elementKey)\n}\n\nexport function getElementPropControllerDescriptors(\n state: State,\n documentKey: string,\n elementKey: string,\n): Record<string, PropControllers.PropControllerDescriptor> | null {\n const element = getElement(state, documentKey, elementKey)\n\n if (element == null || Documents.isElementReference(element)) return null\n\n return getComponentPropControllerDescriptors(state, element.type)\n}\n\nexport function copyElementTree(\n state: State,\n elementTree: Documents.ElementData,\n replacementContext: SerializableReplacementContext,\n) {\n /*\n * This is structured a bit weird.\n *\n * This is done so that we can pass a callable function into some of the copy functions\n * themselves, to enable mutual recursion.\n *\n * Consider the slot control. It has to iterate through its elements, and for each of them,\n * call some version of the below function.\n *\n * That is how the recursing through the tree happens.\n */\n function copyElementTreeNode(state: State, replacementContext: ReplacementContext) {\n return function (node: Documents.Element) {\n const context: CopyContext = {\n replacementContext,\n copyElement: copyElementTreeNode(state, replacementContext),\n }\n\n if (Documents.isElementReference(node)) {\n return {\n ...node,\n value: replaceResourceIfNeeded(ContextResource.GlobalElement, node.value, context),\n }\n }\n\n const descriptors = getComponentPropControllerDescriptors(state, node.type)\n\n if (descriptors == null) return node\n\n for (const [propKey, descriptor] of Object.entries(descriptors)) {\n node.props[propKey] = copyFromControl(descriptor, node.props[propKey], context)\n }\n\n return node\n }\n }\n\n const copy = JSON.parse(JSON.stringify(elementTree)) as Documents.ElementData\n\n return copyElementTreeNode(state, createReplacementContext(replacementContext))(copy)\n}\n\nexport function mergeElement(\n state: State,\n baseElement: Documents.Element,\n overrideElement: Documents.Element,\n): Documents.Element {\n if (baseElement.type !== overrideElement.type || baseElement.key !== overrideElement.key) {\n throw new Error(`Can't merge elements of different types or keys`)\n }\n\n if (Documents.isElementReference(overrideElement)) return overrideElement\n\n if (Documents.isElementReference(baseElement)) return baseElement\n\n const elementDescriptors = getPropControllerDescriptors(state)\n const descriptors = elementDescriptors.get(baseElement.type)\n\n if (descriptors == null) {\n throw new Error(\n `Can't merge element of type \"${baseElement.type}\" because it has no descriptors`,\n )\n }\n\n const mergedProps = {} as Record<string, Documents.Data>\n\n for (const propName of Object.keys(descriptors)) {\n const descriptor = descriptors[propName]\n const context: MergeContext = {\n mergeElement(base, override) {\n return mergeElement(state, base, override)\n },\n }\n\n mergedProps[propName] = merge(\n descriptor,\n baseElement.props[propName],\n overrideElement.props[propName],\n context,\n )\n }\n\n return { ...baseElement, props: mergedProps }\n}\n\nexport function getIsInBuilder(state: State): boolean {\n return state.isInBuilder\n}\n\nexport function getIsPreview(state: State): boolean {\n return IsPreview.getIsPreview(state.isPreview)\n}\n\nexport function getBuilderEditMode(state: State): BuilderEditMode.State {\n return state.builderEditMode\n}\n\nexport function getBreakpoints(state: State): Breakpoints.State {\n return state.breakpoints\n}\n\nexport function elementTreeMiddleware(): Middleware<Dispatch, State, Dispatch> {\n return actionMiddleware(({ dispatch, getState }) => next => {\n return action => {\n switch (action.type) {\n case ActionTypes.REGISTER_DOCUMENT:\n dispatch(\n createElementTree({\n document: action.payload.document,\n descriptors: getPropControllerDescriptors(getState()),\n }),\n )\n break\n\n case ActionTypes.CHANGE_DOCUMENT: {\n const { documentKey, operation } = action.payload\n\n const oldDocument = getDocument(getState(), documentKey)\n const result = next(action)\n const newDocument = getDocument(getState(), documentKey)\n\n if (oldDocument != null && newDocument != null && newDocument !== oldDocument) {\n dispatch(\n changeElementTree({\n oldDocument,\n newDocument,\n descriptors: getPropControllerDescriptors(getState()),\n operation,\n }),\n )\n }\n\n return result\n }\n\n case ActionTypes.UNREGISTER_DOCUMENT:\n dispatch(deleteElementTree(action.payload))\n break\n }\n\n return next(action)\n }\n })\n}\n\nexport function configureStore({\n name,\n preloadedState,\n breakpoints,\n}: {\n name: string\n preloadedState: Partial<State> | null\n breakpoints?: Breakpoints.State\n}) {\n return configureReduxStore({\n reducer,\n preloadedState: {\n ...preloadedState,\n breakpoints: Breakpoints.getInitialState(breakpoints ?? preloadedState?.breakpoints),\n },\n\n middleware: getDefaultMiddleware =>\n getDefaultMiddleware(middlewareOptions).concat(elementTreeMiddleware()),\n\n enhancers: getDefaultEnhancers =>\n getDefaultEnhancers().concat(\n withSetupTeardown(\n () => {},\n () => {},\n ),\n ),\n\n devTools: devToolsConfig({\n name: `${name} (${new Date().toISOString()})`,\n }),\n })\n}\n\nexport type Store = ReturnType<typeof configureStore>\n"],"mappings":"AAAA;AAAA,EACE,kBAAkB;AAAA,EAClB;AAAA,OAGK;AAEP,SAAS,sBAAsB;AAE/B;AAAA,EACE;AAAA,EAKA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,QAAQ,iBAAiB,aAAa;AAE/C,YAAY,eAAe;AAC3B,YAAY,kBAAkB;AAC9B,YAAY,qBAAqB;AACjC,YAAY,oBAAoB;AAChC,YAAY,qBAAqB;AACjC,YAAY,2BAA2B;AACvC,YAAY,iBAAiB;AAC7B,YAAY,eAAe;AAC3B,YAAY,qBAAqB;AACjC,YAAY,iBAAiB;AAE7B,SAAsB,mBAAmB;AACzC,SAAS,mBAAmB,mBAAmB,yBAAyB;AAExE,SAAS,kBAAkB,mBAAmB,sBAAsB;AAEpE,SAAS,yBAAyB;AAWlC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,MAAM,UAAU,gBAAgB;AAAA,EAC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IACF;AAAA,IAEF,UAAU,eAAe;AAAA,MACvB,MAAM,GAAG,IAAI,MAAK,oBAAI,KAAK,GAAE,YAAY,CAAC;AAAA,IAC5C,CAAC;AAAA,EACH,CAAC;AACH;","names":["state","replacementContext"]}
@@ -1,82 +0,0 @@
1
- import { type FetchableValue } from '@makeswift/controls';
2
- import * as MakeswiftApiClient from '../state/makeswift-api-client';
3
- import { APIResourceType, File, GlobalElement, LocalizedGlobalElement, Page, PagePathnameSlice, Site, Snippet, Swatch, Table, Typography } from './types';
4
- import { GraphQLClient } from './graphql/client';
5
- export type CacheData = MakeswiftApiClient.SerializedState;
6
- export declare const CacheData: {
7
- empty(): CacheData;
8
- };
9
- /**
10
- * NOTE(miguel): This "client" is used to fetch Makeswift API resources needed for the host. For
11
- * example, swatches, files, typographies, etc. Ideally it's internal to the runtime and is only
12
- * used by controls to transform API references to API resources.
13
- *
14
- * Moreover, its use should be reserved for the builder only, since for live pages all Makeswift
15
- * API resources should be embedded in the "page snapshot". In the builder, this client serves the
16
- * purpose of sending requests for API resources and keeping a cache so that changes that happen in
17
- * the builder, like modifying a swatch, can be sent via `postMessage` to the host and the cache can
18
- * immediately update the value and re-render.
19
- *
20
- * Furthermore, the API resources requested shouldn't be requested directly from the Makeswift API
21
- * as that would require those resources to not be authenticated since the requests come from the
22
- * browser when running the host. Instead, the requests should go to the host directly, at the
23
- * Makeswift API endpoint (i.g., `/api/makeswift/[...makeswift]` dynamic route) where the host's
24
- * API key can be used, securely, in the server. For this reason, this client should really be a
25
- * client of the host's API, not Makeswift's, intended to build and continuously maintain a realtime
26
- * snapshot for use in the builder, not the lives pages.
27
- */
28
- export declare class MakeswiftHostApiClient {
29
- graphqlClient: GraphQLClient;
30
- makeswiftApiClient: MakeswiftApiClient.Store;
31
- subscribe: MakeswiftApiClient.Store['subscribe'];
32
- fetch: MakeswiftApiClient.HttpFetch;
33
- constructor({ uri, fetch, cacheData, locale, }: {
34
- uri: string;
35
- fetch: MakeswiftApiClient.HttpFetch;
36
- cacheData?: CacheData;
37
- locale?: string;
38
- });
39
- readSwatch(swatchId: string): Swatch | null;
40
- fetchSwatch(swatchId: string): Promise<Swatch | null>;
41
- resolveSwatch(swatchId: string | undefined): FetchableValue<Swatch | null>;
42
- readFile(fileId: string): File | null;
43
- fetchFile(fileId: string): Promise<File | null>;
44
- resolveFile(fileId: string | undefined): FetchableValue<File | null>;
45
- readTypography(typographyId: string): Typography | null;
46
- fetchTypography(typographyId: string): Promise<Typography | null>;
47
- resolveTypography(typographyId: string | undefined): FetchableValue<Typography | null>;
48
- readGlobalElement(globalElementId: string): GlobalElement | null;
49
- fetchGlobalElement(globalElementId: string): Promise<GlobalElement | null>;
50
- readLocalizedGlobalElement({ globalElementId, locale, }: {
51
- globalElementId: string;
52
- locale: string;
53
- }): LocalizedGlobalElement | null;
54
- fetchLocalizedGlobalElement({ globalElementId, locale, }: {
55
- globalElementId: string;
56
- locale: string;
57
- }): Promise<LocalizedGlobalElement | null>;
58
- readPagePathnameSlice({ pageId, locale, }: {
59
- pageId: string;
60
- locale: string | null;
61
- }): PagePathnameSlice | null;
62
- fetchPagePathnameSlice({ pageId, locale, }: {
63
- pageId: string;
64
- locale: string | null;
65
- }): Promise<PagePathnameSlice | null>;
66
- resolvePagePathnameSlice({ pageId, locale, }: {
67
- pageId: string | undefined;
68
- locale: string | null;
69
- }): FetchableValue<PagePathnameSlice | null>;
70
- resolveResource<R>(type: APIResourceType, { id, read, fetch, }: {
71
- id: string | undefined;
72
- read: (id: string) => R | null;
73
- fetch: (id: string) => Promise<R | null>;
74
- }): FetchableValue<R | null>;
75
- readTable(tableId: string): Table | null;
76
- fetchTable(tableId: string): Promise<Table | null>;
77
- createTableRecord(tableId: string, columns: any): Promise<void>;
78
- readSite(siteId: string): Site | null;
79
- readPage(pageId: string): Page | null;
80
- readSnippet(snippetId: string): Snippet | null;
81
- }
82
- //# sourceMappingURL=react.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react.d.ts","source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AAE;QACD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;QAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KACtB,GAAG,cAAc,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAQ5C,eAAe,CAAC,CAAC,EACf,IAAI,EAAE,eAAe,EACrB,EACE,EAAE,EACF,IAAI,EACJ,KAAK,GACN,EAAE;QACD,EAAE,EAAE,MAAM,GAAG,SAAS,CAAA;QACtB,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,CAAC,GAAG,IAAI,CAAA;QAC9B,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;KACzC,GACA,cAAc,CAAC,CAAC,GAAG,IAAI,CAAC;IAc3B,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI;IAQlC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAMlD,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAOrE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQrC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQrC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI;CAO/C"}
@@ -1,3 +0,0 @@
1
- import { type PropsWithChildren, ReactNode } from 'react';
2
- export default function LiveProvider({ children }: PropsWithChildren): ReactNode;
3
- //# sourceMappingURL=LiveProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LiveProvider.d.ts","sourceRoot":"","sources":["../../../../../src/runtimes/react/components/LiveProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAW,SAAS,EAAE,MAAM,OAAO,CAAA;AAOlE,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,GAAG,SAAS,CAY/E"}
@@ -1,5 +0,0 @@
1
- import { type PropsWithChildren, ReactNode } from 'react';
2
- export default function PreviewProvider({ appOrigin, children, }: PropsWithChildren<{
3
- appOrigin: string;
4
- }>): ReactNode;
5
- //# sourceMappingURL=PreviewProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PreviewProvider.d.ts","sourceRoot":"","sources":["../../../../../src/runtimes/react/components/PreviewProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAsB,SAAS,EAAE,MAAM,OAAO,CAAA;AAS7E,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,SAAS,EACT,QAAQ,GACT,EAAE,iBAAiB,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAqBtD"}
@@ -1,4 +0,0 @@
1
- export declare function useBuilderConnectionPing({ appOrigin }: {
2
- appOrigin: string;
3
- }): void;
4
- //# sourceMappingURL=use-builder-connection-ping.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-builder-connection-ping.d.ts","sourceRoot":"","sources":["../../../../../../src/runtimes/react/components/hooks/use-builder-connection-ping.ts"],"names":[],"mappings":"AAMA,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,QAoC5E"}
@@ -1,2 +0,0 @@
1
- export declare function useIsPreview(): boolean;
2
- //# sourceMappingURL=use-is-preview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-is-preview.d.ts","sourceRoot":"","sources":["../../../../../src/runtimes/react/hooks/use-is-preview.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=react-page.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-page.test.d.ts","sourceRoot":"","sources":["../../../../src/state/__tests__/react-page.test.tsx"],"names":[],"mappings":""}
@@ -1,181 +0,0 @@
1
- import { type Operation } from 'ot-json0';
2
- import { type ThunkAction } from '@reduxjs/toolkit';
3
- import { ControlInstance } from '@makeswift/controls';
4
- import { ElementImperativeHandle } from '../../runtimes/react/element-imperative-handle';
5
- import { type APIResource, APIResourceType, APIResourceLocale } from '../../api/types';
6
- import { type Descriptor as PropControllerDescriptor } from '../../prop-controllers/descriptors';
7
- import { type Measurable } from '../modules/box-models';
8
- import { type ComponentMeta } from '../modules/components-meta';
9
- import { type PropControllersHandle } from '../modules/prop-controller-handles';
10
- import { type ComponentType } from '../modules/react-components';
11
- import { type DescriptorsByComponentType } from '../modules/prop-controllers';
12
- import { type DocumentPayload } from '../shared-api';
13
- import { type SerializedState as APIClientCache } from '../makeswift-api-client';
14
- export declare const InternalActionTypes: {
15
- readonly API_RESOURCE_FULFILLED: "API_RESOURCE_FULFILLED";
16
- readonly CREATE_ELEMENT_TREE: "CREATE_ELEMENT_TREE";
17
- readonly DELETE_ELEMENT_TREE: "DELETE_ELEMENT_TREE";
18
- readonly CHANGE_ELEMENT_TREE: "CHANGE_ELEMENT_TREE";
19
- readonly REGISTER_COMPONENT: "REGISTER_COMPONENT";
20
- readonly UNREGISTER_COMPONENT: "UNREGISTER_COMPONENT";
21
- readonly REGISTER_COMPONENT_HANDLE: "REGISTER_COMPONENT_HANDLE";
22
- readonly UNREGISTER_COMPONENT_HANDLE: "UNREGISTER_COMPONENT_HANDLE";
23
- readonly REGISTER_MEASURABLE: "REGISTER_MEASURABLE";
24
- readonly UNREGISTER_MEASURABLE: "UNREGISTER_MEASURABLE";
25
- readonly REGISTER_PROP_CONTROLLERS: "REGISTER_PROP_CONTROLLERS";
26
- readonly UNREGISTER_PROP_CONTROLLERS: "UNREGISTER_PROP_CONTROLLERS";
27
- readonly REGISTER_PROP_CONTROLLERS_HANDLE: "REGISTER_PROP_CONTROLLERS_HANDLE";
28
- readonly UNREGISTER_PROP_CONTROLLERS_HANDLE: "UNREGISTER_PROP_CONTROLLERS_HANDLE";
29
- readonly REGISTER_REACT_COMPONENT: "REGISTER_REACT_COMPONENT";
30
- readonly UNREGISTER_REACT_COMPONENT: "UNREGISTER_REACT_COMPONENT";
31
- readonly SET_IS_IN_BUILDER: "SET_IS_IN_BUILDER";
32
- readonly UPDATE_API_CLIENT_CACHE: "UPDATE_API_CLIENT_CACHE";
33
- };
34
- type APIResourceFulfilledAction = {
35
- type: typeof InternalActionTypes.API_RESOURCE_FULFILLED;
36
- payload: {
37
- resourceType: APIResourceType;
38
- resourceId: string;
39
- resource: APIResource | null;
40
- locale?: string | null;
41
- };
42
- };
43
- type CreateElementTreeAction = {
44
- type: typeof InternalActionTypes.CREATE_ELEMENT_TREE;
45
- payload: {
46
- document: DocumentPayload;
47
- descriptors: DescriptorsByComponentType;
48
- };
49
- };
50
- type DeleteElementTreeAction = {
51
- type: typeof InternalActionTypes.DELETE_ELEMENT_TREE;
52
- payload: {
53
- documentKey: string;
54
- };
55
- };
56
- type ChangeElementTreeAction = {
57
- type: typeof InternalActionTypes.CHANGE_ELEMENT_TREE;
58
- payload: {
59
- oldDocument: DocumentPayload;
60
- newDocument: DocumentPayload;
61
- descriptors: DescriptorsByComponentType;
62
- operation: Operation;
63
- };
64
- };
65
- export type RegisterComponentAction = {
66
- type: typeof InternalActionTypes.REGISTER_COMPONENT;
67
- payload: {
68
- type: string;
69
- meta: ComponentMeta;
70
- propControllerDescriptors: Record<string, PropControllerDescriptor>;
71
- };
72
- };
73
- export type UnregisterComponentAction = {
74
- type: typeof InternalActionTypes.UNREGISTER_COMPONENT;
75
- payload: {
76
- type: string;
77
- };
78
- };
79
- type RegisterComponentHandleAction = {
80
- type: typeof InternalActionTypes.REGISTER_COMPONENT_HANDLE;
81
- payload: {
82
- documentKey: string;
83
- elementKey: string;
84
- componentHandle: ElementImperativeHandle;
85
- };
86
- };
87
- type UnregisterComponentHandleAction = {
88
- type: typeof InternalActionTypes.UNREGISTER_COMPONENT_HANDLE;
89
- payload: {
90
- documentKey: string;
91
- elementKey: string;
92
- };
93
- };
94
- type RegisterMeasurableAction = {
95
- type: typeof InternalActionTypes.REGISTER_MEASURABLE;
96
- payload: {
97
- documentKey: string;
98
- elementKey: string;
99
- measurable: Measurable;
100
- };
101
- };
102
- type UnregisterMeasurableAction = {
103
- type: typeof InternalActionTypes.UNREGISTER_MEASURABLE;
104
- payload: {
105
- documentKey: string;
106
- elementKey: string;
107
- };
108
- };
109
- type RegisterPropControllersHandleAction = {
110
- type: typeof InternalActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE;
111
- payload: {
112
- documentKey: string;
113
- elementKey: string;
114
- handle: PropControllersHandle;
115
- };
116
- };
117
- type UnregisterPropControllersHandleAction = {
118
- type: typeof InternalActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE;
119
- payload: {
120
- documentKey: string;
121
- elementKey: string;
122
- };
123
- };
124
- type RegisterPropControllersAction = {
125
- type: typeof InternalActionTypes.REGISTER_PROP_CONTROLLERS;
126
- payload: {
127
- documentKey: string;
128
- elementKey: string;
129
- propControllers: Record<string, ControlInstance>;
130
- };
131
- };
132
- type UnregisterPropControllersAction = {
133
- type: typeof InternalActionTypes.UNREGISTER_PROP_CONTROLLERS;
134
- payload: {
135
- documentKey: string;
136
- elementKey: string;
137
- };
138
- };
139
- type RegisterReactComponentAction = {
140
- type: typeof InternalActionTypes.REGISTER_REACT_COMPONENT;
141
- payload: {
142
- type: string;
143
- component: ComponentType;
144
- };
145
- };
146
- type UnregisterReactComponentAction = {
147
- type: typeof InternalActionTypes.UNREGISTER_REACT_COMPONENT;
148
- payload: {
149
- type: string;
150
- };
151
- };
152
- type SetIsInBuilderAction = {
153
- type: typeof InternalActionTypes.SET_IS_IN_BUILDER;
154
- payload: boolean;
155
- };
156
- type UpdateAPIClientCache = {
157
- type: typeof InternalActionTypes.UPDATE_API_CLIENT_CACHE;
158
- payload: APIClientCache;
159
- };
160
- export type InternalAction = APIResourceFulfilledAction | CreateElementTreeAction | DeleteElementTreeAction | ChangeElementTreeAction | RegisterComponentAction | UnregisterComponentAction | RegisterComponentHandleAction | UnregisterComponentHandleAction | RegisterMeasurableAction | UnregisterMeasurableAction | RegisterPropControllersHandleAction | UnregisterPropControllersHandleAction | RegisterPropControllersAction | UnregisterPropControllersAction | RegisterReactComponentAction | UnregisterReactComponentAction | SetIsInBuilderAction | UpdateAPIClientCache;
161
- export declare function apiResourceFulfilled<T extends APIResourceType>(resourceType: T, resourceId: string, resource: APIResource | null, locale?: APIResourceLocale<T>): APIResourceFulfilledAction;
162
- export declare function createElementTree(payload: CreateElementTreeAction['payload']): CreateElementTreeAction;
163
- export declare function deleteElementTree(payload: DeleteElementTreeAction['payload']): DeleteElementTreeAction;
164
- export declare function changeElementTree(payload: ChangeElementTreeAction['payload']): ChangeElementTreeAction;
165
- export declare function registerComponent(type: string, meta: ComponentMeta, propControllerDescriptors: Record<string, PropControllerDescriptor>): RegisterComponentAction;
166
- export declare function unregisterComponent(type: string): UnregisterComponentAction;
167
- export declare function registerComponentEffect(type: string, meta: ComponentMeta, propControllerDescriptors: Record<string, PropControllerDescriptor>): ThunkAction<() => void, unknown, unknown, InternalAction>;
168
- export declare function registerComponentHandle(documentKey: string, elementKey: string, componentHandle: ElementImperativeHandle): RegisterComponentHandleAction;
169
- export declare function registerComponentHandleEffect(documentKey: string, elementKey: string, componentHandle: ElementImperativeHandle): ThunkAction<() => void, unknown, unknown, InternalAction>;
170
- export declare function registerMeasurable(documentKey: string, elementKey: string, measurable: Measurable): RegisterMeasurableAction;
171
- export declare function unregisterMeasurable(documentKey: string, elementKey: string): UnregisterMeasurableAction;
172
- export declare function registerMeasurableEffect(documentKey: string, elementKey: string, measurable: Measurable): ThunkAction<() => void, unknown, unknown, InternalAction>;
173
- export declare function registerPropControllersHandle(documentKey: string, elementKey: string, handle: PropControllersHandle): RegisterPropControllersHandleAction;
174
- export declare function unregisterPropControllersHandle(documentKey: string, elementKey: string): UnregisterPropControllersHandleAction;
175
- export declare function registerPropControllers(documentKey: string, elementKey: string, propControllers: Record<string, ControlInstance>): RegisterPropControllersAction;
176
- export declare function unregisterPropControllers(documentKey: string, elementKey: string): UnregisterPropControllersAction;
177
- export declare function registerReactComponentEffect(type: string, component: ComponentType): ThunkAction<() => void, unknown, unknown, InternalAction>;
178
- export declare function setIsInBuilder(isInBuilder: boolean): SetIsInBuilderAction;
179
- export declare function updateAPIClientCache(payload: APIClientCache): UpdateAPIClientCache;
180
- export {};
181
- //# sourceMappingURL=internal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../src/state/actions/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAA;AAExF,OAAO,EAAE,KAAK,WAAW,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACtF,OAAO,EAAE,KAAK,UAAU,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAA;AAEhG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC/E,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAE7E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,KAAK,eAAe,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ElF"}
@@ -1,7 +0,0 @@
1
- import { type StoreEnhancer } from '@reduxjs/toolkit';
2
- export interface SetupTeardownMixin {
3
- setup: () => void;
4
- teardown: () => void;
5
- }
6
- export declare function withSetupTeardown(setup: () => void, teardown: () => void): StoreEnhancer<SetupTeardownMixin>;
7
- //# sourceMappingURL=setup-teardown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup-teardown.d.ts","sourceRoot":"","sources":["../../../../src/state/mixins/setup-teardown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,IAAI,EACjB,QAAQ,EAAE,MAAM,IAAI,GACnB,aAAa,CAAC,kBAAkB,CAAC,CAMnC"}