@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.
Files changed (96) hide show
  1. package/dist/cjs/api/react.js +256 -0
  2. package/dist/cjs/api/react.js.map +1 -0
  3. package/dist/cjs/api-handler/handlers/manifest.js +1 -1
  4. package/dist/cjs/client/index.js +3 -3
  5. package/dist/cjs/next/api-handler/config/app-router.js +10 -1
  6. package/dist/cjs/next/api-handler/config/app-router.js.map +1 -1
  7. package/dist/cjs/runtimes/react/components/LiveProvider.js +50 -0
  8. package/dist/cjs/runtimes/react/components/LiveProvider.js.map +1 -0
  9. package/dist/cjs/runtimes/react/components/PreviewProvider.js +63 -0
  10. package/dist/cjs/runtimes/react/components/PreviewProvider.js.map +1 -0
  11. package/dist/cjs/runtimes/react/components/hooks/use-builder-connection-ping.js +62 -0
  12. package/dist/cjs/runtimes/react/components/hooks/use-builder-connection-ping.js.map +1 -0
  13. package/dist/cjs/runtimes/react/hooks/use-is-preview.js +33 -0
  14. package/dist/cjs/runtimes/react/hooks/use-is-preview.js.map +1 -0
  15. package/dist/cjs/state/actions/internal.js +205 -0
  16. package/dist/cjs/state/actions/internal.js.map +1 -0
  17. package/dist/cjs/state/mixins/setup-teardown.js +35 -0
  18. package/dist/cjs/state/mixins/setup-teardown.js.map +1 -0
  19. package/dist/cjs/state/modules/box-models.js +127 -0
  20. package/dist/cjs/state/modules/box-models.js.map +1 -0
  21. package/dist/cjs/state/modules/element-imperative-handles.js +60 -0
  22. package/dist/cjs/state/modules/element-imperative-handles.js.map +1 -0
  23. package/dist/cjs/state/modules/is-preview.js +47 -0
  24. package/dist/cjs/state/modules/is-preview.js.map +1 -0
  25. package/dist/cjs/state/modules/pointer.js +47 -0
  26. package/dist/cjs/state/modules/pointer.js.map +1 -0
  27. package/dist/cjs/state/modules/read-write-documents.js +98 -0
  28. package/dist/cjs/state/modules/read-write-documents.js.map +1 -0
  29. package/dist/cjs/state/react-builder-preview.js +586 -0
  30. package/dist/cjs/state/react-builder-preview.js.map +1 -0
  31. package/dist/cjs/state/react-page.js +313 -0
  32. package/dist/cjs/state/react-page.js.map +1 -0
  33. package/dist/esm/api/react.js +223 -0
  34. package/dist/esm/api/react.js.map +1 -0
  35. package/dist/esm/api-handler/handlers/manifest.js +1 -1
  36. package/dist/esm/client/index.js +3 -3
  37. package/dist/esm/next/api-handler/config/app-router.js +10 -1
  38. package/dist/esm/next/api-handler/config/app-router.js.map +1 -1
  39. package/dist/esm/runtimes/react/components/LiveProvider.js +20 -0
  40. package/dist/esm/runtimes/react/components/LiveProvider.js.map +1 -0
  41. package/dist/esm/runtimes/react/components/PreviewProvider.js +33 -0
  42. package/dist/esm/runtimes/react/components/PreviewProvider.js.map +1 -0
  43. package/dist/esm/runtimes/react/components/hooks/use-builder-connection-ping.js +38 -0
  44. package/dist/esm/runtimes/react/components/hooks/use-builder-connection-ping.js.map +1 -0
  45. package/dist/esm/runtimes/react/hooks/use-is-preview.js +9 -0
  46. package/dist/esm/runtimes/react/hooks/use-is-preview.js.map +1 -0
  47. package/dist/esm/state/actions/internal.js +162 -0
  48. package/dist/esm/state/actions/internal.js.map +1 -0
  49. package/dist/esm/state/mixins/setup-teardown.js +11 -0
  50. package/dist/esm/state/mixins/setup-teardown.js.map +1 -0
  51. package/dist/esm/state/modules/box-models.js +98 -0
  52. package/dist/esm/state/modules/box-models.js.map +1 -0
  53. package/dist/esm/state/modules/element-imperative-handles.js +35 -0
  54. package/dist/esm/state/modules/element-imperative-handles.js.map +1 -0
  55. package/dist/esm/state/modules/is-preview.js +21 -0
  56. package/dist/esm/state/modules/is-preview.js.map +1 -0
  57. package/dist/esm/state/modules/pointer.js +22 -0
  58. package/dist/esm/state/modules/pointer.js.map +1 -0
  59. package/dist/esm/state/modules/read-write-documents.js +60 -0
  60. package/dist/esm/state/modules/read-write-documents.js.map +1 -0
  61. package/dist/esm/state/react-builder-preview.js +547 -0
  62. package/dist/esm/state/react-builder-preview.js.map +1 -0
  63. package/dist/esm/state/react-page.js +268 -0
  64. package/dist/esm/state/react-page.js.map +1 -0
  65. package/dist/types/api/react.d.ts +82 -0
  66. package/dist/types/api/react.d.ts.map +1 -0
  67. package/dist/types/next/api-handler/config/app-router.d.ts.map +1 -1
  68. package/dist/types/runtimes/react/components/LiveProvider.d.ts +3 -0
  69. package/dist/types/runtimes/react/components/LiveProvider.d.ts.map +1 -0
  70. package/dist/types/runtimes/react/components/PreviewProvider.d.ts +5 -0
  71. package/dist/types/runtimes/react/components/PreviewProvider.d.ts.map +1 -0
  72. package/dist/types/runtimes/react/components/hooks/use-builder-connection-ping.d.ts +4 -0
  73. package/dist/types/runtimes/react/components/hooks/use-builder-connection-ping.d.ts.map +1 -0
  74. package/dist/types/runtimes/react/hooks/use-is-preview.d.ts +2 -0
  75. package/dist/types/runtimes/react/hooks/use-is-preview.d.ts.map +1 -0
  76. package/dist/types/state/__tests__/react-page.test.d.ts +2 -0
  77. package/dist/types/state/__tests__/react-page.test.d.ts.map +1 -0
  78. package/dist/types/state/actions/internal.d.ts +181 -0
  79. package/dist/types/state/actions/internal.d.ts.map +1 -0
  80. package/dist/types/state/mixins/setup-teardown.d.ts +7 -0
  81. package/dist/types/state/mixins/setup-teardown.d.ts.map +1 -0
  82. package/dist/types/state/modules/box-models.d.ts +23 -0
  83. package/dist/types/state/modules/box-models.d.ts.map +1 -0
  84. package/dist/types/state/modules/element-imperative-handles.d.ts +7 -0
  85. package/dist/types/state/modules/element-imperative-handles.d.ts.map +1 -0
  86. package/dist/types/state/modules/is-preview.d.ts +6 -0
  87. package/dist/types/state/modules/is-preview.d.ts.map +1 -0
  88. package/dist/types/state/modules/pointer.d.ts +12 -0
  89. package/dist/types/state/modules/pointer.d.ts.map +1 -0
  90. package/dist/types/state/modules/read-write-documents.d.ts +14 -0
  91. package/dist/types/state/modules/read-write-documents.d.ts.map +1 -0
  92. package/dist/types/state/react-builder-preview.d.ts +108 -0
  93. package/dist/types/state/react-builder-preview.d.ts.map +1 -0
  94. package/dist/types/state/react-page.d.ts +149 -0
  95. package/dist/types/state/react-page.d.ts.map +1 -0
  96. package/package.json +3 -3
@@ -0,0 +1,181 @@
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
@@ -0,0 +1 @@
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,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,SAAS,EAAE,aAAa,GACvB,WAAW,CAAC,MAAM,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,CAQ3D;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,OAAO,GAAG,oBAAoB,CAEzE;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,oBAAoB,CAElF"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,23 @@
1
+ import { type BoxModel } from '@makeswift/controls';
2
+ import { CreateBoxArgs } from 'css-box-model';
3
+ import { type Action, type UnknownAction } from '../actions';
4
+ export type { BoxModel };
5
+ export declare function parse(rawString: string): number;
6
+ export declare function createBox(boxArgs: CreateBoxArgs): BoxModel;
7
+ export declare function getBox(element: Element): BoxModel;
8
+ export interface BoxModelHandle {
9
+ getBoxModel(): BoxModel | null;
10
+ }
11
+ export type Measurable = Element | BoxModelHandle;
12
+ export declare function isMeasurable(value: unknown): value is Measurable;
13
+ export declare function measure(measurable: Measurable): BoxModel | null;
14
+ export type State = {
15
+ measurables: Map<string, Map<string, Measurable>>;
16
+ boxModels: Map<string, Map<string, BoxModel>>;
17
+ };
18
+ export declare function getInitialState(): State;
19
+ export declare function getMeasurables(state: State): Map<string, Map<string, Measurable>>;
20
+ export declare function getBoxModels(state: State): Map<string, Map<string, BoxModel>>;
21
+ export declare function getBoxModel(state: State, documentKey: string, elementKey: string): BoxModel | null;
22
+ export declare function reducer(state: State | undefined, action: Action | UnknownAction): State;
23
+ //# sourceMappingURL=box-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box-models.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/box-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAEL,aAAa,EAGd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAA8B,MAAM,YAAY,CAAA;AAExF,YAAY,EAAE,QAAQ,EAAE,CAAA;AAExB,wBAAgB,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAI/C;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAE1D;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,CAEjD;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,IAAI,QAAQ,GAAG,IAAI,CAAA;CAC/B;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,cAAc,CAAA;AAEjD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAahE;AAED,wBAAgB,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,QAAQ,GAAG,IAAI,CAI/D;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;IACjD,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;CAC9C,CAAA;AAED,wBAAgB,eAAe,IAAI,KAAK,CAEvC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAEjF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAE7E;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,QAAQ,GAAG,IAAI,CAEjB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,YAAoB,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,SAoDvF"}
@@ -0,0 +1,7 @@
1
+ import { ElementImperativeHandle } from '../../runtimes/react/element-imperative-handle';
2
+ import { type Action, type UnknownAction } from '../actions';
3
+ type State = Map<string, Map<string, ElementImperativeHandle>>;
4
+ export declare function getElementImperativeHandles(state: State): Map<string, Map<string, ElementImperativeHandle>>;
5
+ export declare function reducer(state: State | undefined, action: Action | UnknownAction): State;
6
+ export {};
7
+ //# sourceMappingURL=element-imperative-handles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-imperative-handles.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/element-imperative-handles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAA;AACxF,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAA8B,MAAM,YAAY,CAAA;AAExF,KAAK,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAA;AAE9D,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,KAAK,GACX,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAEnD;AAMD,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,YAAoB,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,CA0B/F"}
@@ -0,0 +1,6 @@
1
+ import { type Action, type UnknownAction } from '../actions';
2
+ export type State = boolean;
3
+ export declare function getInitialState(isPreview?: boolean): State;
4
+ export declare function getIsPreview(state: State): boolean;
5
+ export declare function reducer(state: boolean | undefined, action: Action | UnknownAction): State;
6
+ //# sourceMappingURL=is-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-preview.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/is-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAiB,MAAM,YAAY,CAAA;AAE3E,MAAM,MAAM,KAAK,GAAG,OAAO,CAAA;AAE3B,wBAAgB,eAAe,CAAC,SAAS,UAAQ,GAAG,KAAK,CAExD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAElD;AAED,wBAAgB,OAAO,CAAC,KAAK,qBAAoB,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,CAOxF"}
@@ -0,0 +1,12 @@
1
+ import { type Action, type UnknownAction } from '../actions';
2
+ export type Point = {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ type State = {
7
+ pointer: Point | null;
8
+ };
9
+ export declare function getPointer(state: State): Point | null;
10
+ export declare function reducer(state: State | undefined, action: Action | UnknownAction): State;
11
+ export {};
12
+ //# sourceMappingURL=pointer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/pointer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAA8B,MAAM,YAAY,CAAA;AAExF,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE5C,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,KAAK,GAAG,IAAI,CAAA;CACtB,CAAA;AAMD,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAErD;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,YAAoB,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,CAU/F"}
@@ -0,0 +1,14 @@
1
+ import { type Operation } from 'ot-json0';
2
+ import * as ReadOnlyDocuments from './read-only-documents';
3
+ import { type Action, type UnknownAction } from '../actions';
4
+ export type { Document, Element, ElementData, ElementReference } from './read-only-documents';
5
+ export { isElementReference } from './read-only-documents';
6
+ export type { Operation };
7
+ export type State = ReadOnlyDocuments.State;
8
+ export declare function getInitialState({ documents, }?: {
9
+ documents?: ReadOnlyDocuments.Document[];
10
+ }): State;
11
+ export declare function getDocument(state: State, documentKey: string): ReadOnlyDocuments.Document | null;
12
+ export declare function getDocuments(state: State): ReadOnlyDocuments.State;
13
+ export declare function reducer(state: State | undefined, action: Action | UnknownAction): State;
14
+ //# sourceMappingURL=read-write-documents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-write-documents.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/read-write-documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAA;AAGzC,OAAO,KAAK,iBAAiB,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAA8B,MAAM,YAAY,CAAA;AAExF,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,YAAY,EAAE,SAAS,EAAE,CAAA;AAsBzB,MAAM,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAA;AAE3C,wBAAgB,eAAe,CAAC,EAC9B,SAAc,GACf,GAAE;IAAE,SAAS,CAAC,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAA;CAAO,GAAG,KAAK,CAE3D;AAMD,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,iBAAiB,CAAC,QAAQ,GAAG,IAAI,CAEhG;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAElE;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,YAAoB,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,CAyB/F"}
@@ -0,0 +1,108 @@
1
+ import { type Middleware, type ThunkAction, type ThunkDispatch } from '@reduxjs/toolkit';
2
+ import * as ElementTrees from './modules/element-trees';
3
+ import * as ReactComponents from './modules/react-components';
4
+ import * as BoxModels from './modules/box-models';
5
+ import * as ComponentsMeta from './modules/components-meta';
6
+ import * as PropControllers from './modules/prop-controllers';
7
+ import * as PropControllerHandles from './modules/prop-controller-handles';
8
+ import * as BuilderEditMode from './modules/builder-edit-mode';
9
+ import * as Pointer from './modules/pointer';
10
+ import * as Breakpoints from './modules/breakpoints';
11
+ import * as ReactPage from './react-page';
12
+ import { type Action } from './actions';
13
+ import { MakeswiftHostApiClient } from '../api/react';
14
+ import { ElementImperativeHandle } from '../runtimes/react/element-imperative-handle';
15
+ import { type BuilderAPIProxy } from './builder-api/proxy';
16
+ export type { Operation } from './modules/read-write-documents';
17
+ export type { BoxModelHandle } from './modules/box-models';
18
+ export { createBox, getBox, parse } from './modules/box-models';
19
+ export declare const reducer: import("@reduxjs/toolkit").Reducer<{
20
+ documents: import("./modules/read-only-documents").State;
21
+ elementTrees: ElementTrees.State;
22
+ reactComponents: ReactComponents.State;
23
+ boxModels: BoxModels.State;
24
+ componentsMeta: ComponentsMeta.State;
25
+ propControllers: PropControllers.DescriptorsByComponentType;
26
+ propControllerHandles: PropControllerHandles.State;
27
+ isInBuilder: boolean;
28
+ isPreview: boolean;
29
+ builderEditMode: BuilderEditMode.State;
30
+ pointer: {
31
+ pointer: Pointer.Point | null;
32
+ };
33
+ elementImperativeHandles: Map<string, Map<string, ElementImperativeHandle<Record<string, PropControllers.PropControllerDescriptor>>>>;
34
+ breakpoints: Breakpoints.Breakpoints;
35
+ }, Action | import("@reduxjs/toolkit").UnknownAction, Partial<{
36
+ documents: import("./modules/read-only-documents").State | undefined;
37
+ elementTrees: ElementTrees.State | undefined;
38
+ reactComponents: ReactComponents.State | undefined;
39
+ boxModels: BoxModels.State | undefined;
40
+ componentsMeta: ComponentsMeta.State | undefined;
41
+ propControllers: PropControllers.DescriptorsByComponentType | undefined;
42
+ propControllerHandles: PropControllerHandles.State | undefined;
43
+ isInBuilder: boolean | undefined;
44
+ isPreview: boolean | undefined;
45
+ builderEditMode: BuilderEditMode.State | undefined;
46
+ pointer: {
47
+ pointer: Pointer.Point | null;
48
+ } | undefined;
49
+ elementImperativeHandles: Map<string, Map<string, ElementImperativeHandle<Record<string, PropControllers.PropControllerDescriptor>>>> | undefined;
50
+ breakpoints: Breakpoints.Breakpoints | undefined;
51
+ }>>;
52
+ export type State = ReturnType<typeof reducer>;
53
+ export type Dispatch = ThunkDispatch<State, unknown, Action>;
54
+ export declare function startMeasuringElements(): ThunkAction<() => void, State, unknown, Action>;
55
+ export type Size = {
56
+ offsetWidth: number;
57
+ offsetHeight: number;
58
+ clientWidth: number;
59
+ clientHeight: number;
60
+ scrollWidth: number;
61
+ scrollHeight: number;
62
+ scrollTop: number;
63
+ scrollLeft: number;
64
+ };
65
+ export declare function initialize(builderProxy: BuilderAPIProxy): ThunkAction<() => void, State, unknown, Action>;
66
+ export declare function builderAPIMiddleware(builderProxy: BuilderAPIProxy): Middleware<Dispatch, State, Dispatch>;
67
+ export declare function propControllerHandlesMiddleware(): Middleware<Dispatch, State, Dispatch>;
68
+ export declare function configureStore({ preloadedState, client, builderProxy, }: {
69
+ preloadedState: Partial<State>;
70
+ client: MakeswiftHostApiClient;
71
+ builderProxy: BuilderAPIProxy;
72
+ }): import("@reduxjs/toolkit").EnhancedStore<{
73
+ documents: import("./modules/read-only-documents").State;
74
+ elementTrees: ElementTrees.State;
75
+ reactComponents: ReactComponents.State;
76
+ boxModels: BoxModels.State;
77
+ componentsMeta: ComponentsMeta.State;
78
+ propControllers: PropControllers.DescriptorsByComponentType;
79
+ propControllerHandles: PropControllerHandles.State;
80
+ isInBuilder: boolean;
81
+ isPreview: boolean;
82
+ builderEditMode: BuilderEditMode.State;
83
+ pointer: {
84
+ pointer: Pointer.Point | null;
85
+ };
86
+ elementImperativeHandles: Map<string, Map<string, ElementImperativeHandle<Record<string, PropControllers.PropControllerDescriptor>>>>;
87
+ breakpoints: Breakpoints.Breakpoints;
88
+ }, Action | import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("@reduxjs/toolkit").StoreEnhancer<{
89
+ dispatch: ThunkDispatch<{
90
+ documents: import("./modules/read-only-documents").State;
91
+ elementTrees: ElementTrees.State;
92
+ reactComponents: ReactComponents.State;
93
+ boxModels: BoxModels.State;
94
+ componentsMeta: ComponentsMeta.State;
95
+ propControllers: PropControllers.DescriptorsByComponentType;
96
+ propControllerHandles: PropControllerHandles.State;
97
+ isInBuilder: boolean;
98
+ isPreview: boolean;
99
+ builderEditMode: BuilderEditMode.State;
100
+ pointer: {
101
+ pointer: Pointer.Point | null;
102
+ };
103
+ elementImperativeHandles: Map<string, Map<string, ElementImperativeHandle<Record<string, PropControllers.PropControllerDescriptor>>>>;
104
+ breakpoints: Breakpoints.Breakpoints;
105
+ }, undefined, import("@reduxjs/toolkit").UnknownAction> & ReactPage.Dispatch & Dispatch;
106
+ }>, import("@reduxjs/toolkit").StoreEnhancer<import("./mixins/setup-teardown").SetupTeardownMixin>]>>;
107
+ export type Store = ReturnType<typeof configureStore>;
108
+ //# sourceMappingURL=react-builder-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-builder-preview.d.ts","sourceRoot":"","sources":["../../../src/state/react-builder-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAA;AAOzB,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,qBAAqB,MAAM,mCAAmC,CAAA;AAG1E,OAAO,KAAK,eAAe,MAAM,6BAA6B,CAAA;AAC9D,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAA;AAE5C,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAA;AAIpD,OAAO,KAAK,SAAS,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAA;AAcvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAA;AACrF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAG1D,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC/D,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE/D,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAclB,CAA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duxjs/toolkit';
2
+ import { type SerializableReplacementContext } from '@makeswift/controls';
3
+ import * as Documents from './modules/read-only-documents';
4
+ import * as ElementTrees from './modules/element-trees';
5
+ import * as ReactComponents from './modules/react-components';
6
+ import * as ComponentsMeta from './modules/components-meta';
7
+ import * as PropControllers from './modules/prop-controllers';
8
+ import * as PropControllerHandles from './modules/prop-controller-handles';
9
+ import * as BuilderEditMode from './modules/builder-edit-mode';
10
+ import * as Breakpoints from './modules/breakpoints';
11
+ import { type Action } from './actions';
12
+ export type { Data, Document, DocumentReference, Element, ElementData, ElementReference, } from './modules/read-only-documents';
13
+ export { createBaseDocument, createDocumentReference, getRootElement, isElementReference, } from './modules/read-only-documents';
14
+ export type { ComponentType } from './modules/react-components';
15
+ export type { ComponentMeta } from './modules/components-meta';
16
+ declare const reducer: import("@reduxjs/toolkit").Reducer<{
17
+ documents: Documents.State;
18
+ elementTrees: ElementTrees.State;
19
+ reactComponents: ReactComponents.State;
20
+ componentsMeta: ComponentsMeta.State;
21
+ propControllers: PropControllers.DescriptorsByComponentType;
22
+ propControllerHandles: PropControllerHandles.State;
23
+ isInBuilder: boolean;
24
+ isPreview: boolean;
25
+ builderEditMode: BuilderEditMode.State;
26
+ breakpoints: Breakpoints.Breakpoints;
27
+ }, Action | import("@reduxjs/toolkit").UnknownAction, Partial<{
28
+ documents: Documents.State | undefined;
29
+ elementTrees: ElementTrees.State | undefined;
30
+ reactComponents: ReactComponents.State | undefined;
31
+ componentsMeta: ComponentsMeta.State | undefined;
32
+ propControllers: PropControllers.DescriptorsByComponentType | undefined;
33
+ propControllerHandles: PropControllerHandles.State | undefined;
34
+ isInBuilder: boolean | undefined;
35
+ isPreview: boolean | undefined;
36
+ builderEditMode: BuilderEditMode.State | undefined;
37
+ breakpoints: Breakpoints.Breakpoints | undefined;
38
+ }>>;
39
+ export type State = ReturnType<typeof reducer>;
40
+ export type Dispatch = ThunkDispatch<State, unknown, Action>;
41
+ export declare function getDocument(state: State, documentKey: string): Documents.Document | null;
42
+ export declare function getElements(state: State, documentKey: string): ElementTrees.ElementTree['elements'];
43
+ export declare function getElementIds(state: State, documentKey: string): ElementTrees.ElementTree['elementIds'];
44
+ export declare function getReactComponent(state: State, type: string): ReactComponents.ComponentType | null;
45
+ export declare function getComponentMeta(state: State, type: string): ComponentsMeta.ComponentMeta | null;
46
+ export declare function getPropControllerDescriptors(state: State): PropControllers.State;
47
+ export declare function getComponentPropControllerDescriptors(state: State, componentType: string): PropControllers.DescriptorsByProp | null;
48
+ export declare function getPropControllers(state: State, documentKey: string, elementKey: string): Record<string, import("@makeswift/controls").ControlInstance<import("@makeswift/controls").ControlMessage<string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
49
+ [key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
50
+ } | null | undefined)[] | {
51
+ [key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
52
+ } | null | undefined)[] | {
53
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
54
+ } | null | undefined)[] | {
55
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
56
+ } | null | undefined)[] | {
57
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
58
+ } | null | undefined)[] | {
59
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
60
+ } | null | undefined)[] | {
61
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
62
+ } | null | undefined)[] | {
63
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
64
+ } | null | undefined)[] | {
65
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
66
+ } | null | undefined)[] | {
67
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
68
+ } | null | undefined)[] | {
69
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
70
+ } | null | undefined)[] | {
71
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
72
+ } | null | undefined>>> | null;
73
+ /**
74
+ * Returns all document keys sorted by depth, i.e., parent documents come before child documents.
75
+ */
76
+ export declare const getDocumentKeysSortedByDepth: (state: State) => string[];
77
+ export declare function getElement(state: State, documentKey: string, elementKey: string): Documents.Element | null;
78
+ export declare function getElementId(state: State, documentKey: string, elementKey: string): string | null;
79
+ export declare function getElementPropControllerDescriptors(state: State, documentKey: string, elementKey: string): Record<string, PropControllers.PropControllerDescriptor> | null;
80
+ export declare function copyElementTree(state: State, elementTree: Documents.ElementData, replacementContext: SerializableReplacementContext): {
81
+ type: string;
82
+ key: string;
83
+ props: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
84
+ [key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
85
+ } | null | undefined)[] | {
86
+ [key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
87
+ } | null | undefined)[] | {
88
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
89
+ } | null | undefined)[] | {
90
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
91
+ } | null | undefined)[] | {
92
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
93
+ } | null | undefined)[] | {
94
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
95
+ } | null | undefined)[] | {
96
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
97
+ } | null | undefined)[] | {
98
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
99
+ } | null | undefined)[] | {
100
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
101
+ } | null | undefined)[] | {
102
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
103
+ } | null | undefined)[] | {
104
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
105
+ } | null | undefined)[] | {
106
+ [key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined)[] | /*elided*/ any | null | undefined;
107
+ } | null | undefined>;
108
+ } | {
109
+ value: string;
110
+ type: "reference";
111
+ key: string;
112
+ };
113
+ export declare function mergeElement(state: State, baseElement: Documents.Element, overrideElement: Documents.Element): Documents.Element;
114
+ export declare function getIsInBuilder(state: State): boolean;
115
+ export declare function getIsPreview(state: State): boolean;
116
+ export declare function getBuilderEditMode(state: State): BuilderEditMode.State;
117
+ export declare function getBreakpoints(state: State): Breakpoints.State;
118
+ export declare function elementTreeMiddleware(): Middleware<Dispatch, State, Dispatch>;
119
+ export declare function configureStore({ name, preloadedState, breakpoints, }: {
120
+ name: string;
121
+ preloadedState: Partial<State> | null;
122
+ breakpoints?: Breakpoints.State;
123
+ }): import("@reduxjs/toolkit").EnhancedStore<{
124
+ documents: Documents.State;
125
+ elementTrees: ElementTrees.State;
126
+ reactComponents: ReactComponents.State;
127
+ componentsMeta: ComponentsMeta.State;
128
+ propControllers: PropControllers.DescriptorsByComponentType;
129
+ propControllerHandles: PropControllerHandles.State;
130
+ isInBuilder: boolean;
131
+ isPreview: boolean;
132
+ builderEditMode: BuilderEditMode.State;
133
+ breakpoints: Breakpoints.Breakpoints;
134
+ }, Action | import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("@reduxjs/toolkit").StoreEnhancer<{
135
+ dispatch: ThunkDispatch<{
136
+ documents: Documents.State;
137
+ elementTrees: ElementTrees.State;
138
+ reactComponents: ReactComponents.State;
139
+ componentsMeta: ComponentsMeta.State;
140
+ propControllers: PropControllers.DescriptorsByComponentType;
141
+ propControllerHandles: PropControllerHandles.State;
142
+ isInBuilder: boolean;
143
+ isPreview: boolean;
144
+ builderEditMode: BuilderEditMode.State;
145
+ breakpoints: Breakpoints.Breakpoints;
146
+ }, undefined, import("@reduxjs/toolkit").UnknownAction> & Dispatch;
147
+ }>, import("@reduxjs/toolkit").StoreEnhancer<import("./mixins/setup-teardown").SetupTeardownMixin>]>>;
148
+ export type Store = ReturnType<typeof configureStore>;
149
+ //# sourceMappingURL=react-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-page.d.ts","sourceRoot":"","sources":["../../../src/state/react-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,UAAU,EAChB,MAAM,kBAAkB,CAAA;AAIzB,OAAO,EAEL,KAAK,8BAA8B,EAMpC,MAAM,qBAAqB,CAAA;AAI5B,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAC1D,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAA;AACvD,OAAO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,EACZ,WAAW,EAAE,SAAS,CAAC,OAAO,EAC9B,eAAe,EAAE,SAAS,CAAC,OAAO,GACjC,SAAS,CAAC,OAAO,CAqCnB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAEpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAElD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe,CAAC,KAAK,CAEtE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,KAAK,CAE9D;AAED,wBAAgB,qBAAqB,IAAI,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CA0C7E;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,cAAc,EACd,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAA;IACrC,WAAW,CAAC,EAAE,WAAW,CAAC,KAAK,CAAA;CAChC;;;;;;;;;;;;;;;;;;;;;;;;sGAuBA;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makeswift/runtime",
3
- "version": "0.27.1",
3
+ "version": "0.27.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "url": "makeswift/makeswift",
@@ -239,8 +239,8 @@
239
239
  "uuid": "^9.0.0",
240
240
  "zod": "^3.21.4",
241
241
  "@makeswift/controls": "0.1.16",
242
- "@makeswift/next-plugin": "0.6.1",
243
- "@makeswift/prop-controllers": "0.4.10"
242
+ "@makeswift/prop-controllers": "0.4.10",
243
+ "@makeswift/next-plugin": "0.6.1"
244
244
  },
245
245
  "devDependencies": {
246
246
  "@emotion/jest": "^11.11.0",