@makeswift/runtime 0.28.8-canary.15 → 0.28.8-canary.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/graphql-api-client.js +1 -1
- package/dist/cjs/api/rest-api-client.js +1 -1
- package/dist/cjs/api-handler/handlers/manifest.js +1 -1
- package/dist/cjs/client/index.js +1 -1
- package/dist/cjs/state/actions/internal/read-write-actions.js +2 -0
- package/dist/cjs/state/actions/internal/read-write-actions.js.map +1 -1
- package/dist/cjs/state/middleware/read-write/prop-controller-handles.js +1 -0
- package/dist/cjs/state/middleware/read-write/prop-controller-handles.js.map +1 -1
- package/dist/esm/api/graphql-api-client.js +1 -1
- package/dist/esm/api/rest-api-client.js +1 -1
- package/dist/esm/api-handler/handlers/manifest.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/state/actions/internal/read-write-actions.js +1 -0
- package/dist/esm/state/actions/internal/read-write-actions.js.map +1 -1
- package/dist/esm/state/middleware/read-write/prop-controller-handles.js +3 -1
- package/dist/esm/state/middleware/read-write/prop-controller-handles.js.map +1 -1
- package/dist/types/state/actions/internal/read-write-actions.d.ts +1 -0
- package/dist/types/state/actions/internal/read-write-actions.d.ts.map +1 -1
- package/dist/types/state/middleware/read-write/__tests__/fixtures/operations.d.ts.map +1 -0
- package/dist/types/state/middleware/read-write/__tests__/fixtures/root-elements.d.ts.map +1 -0
- package/dist/types/state/middleware/read-write/__tests__/prop-controller-handles.test.d.ts +2 -0
- package/dist/types/state/middleware/read-write/__tests__/prop-controller-handles.test.d.ts.map +1 -0
- package/dist/types/state/middleware/read-write/__tests__/update-element-tree.test.d.ts +2 -0
- package/dist/types/state/middleware/read-write/__tests__/update-element-tree.test.d.ts.map +1 -0
- package/dist/types/state/middleware/read-write/prop-controller-handles.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/state/__tests__/fixtures/operations.d.ts.map +0 -1
- package/dist/types/state/__tests__/fixtures/root-elements.d.ts.map +0 -1
- package/dist/types/state/__tests__/react-builder-preview.test.d.ts +0 -2
- package/dist/types/state/__tests__/react-builder-preview.test.d.ts.map +0 -1
- /package/dist/types/state/{__tests__ → middleware/read-write/__tests__}/fixtures/operations.d.ts +0 -0
- /package/dist/types/state/{__tests__ → middleware/read-write/__tests__}/fixtures/root-elements.d.ts +0 -0
|
@@ -27,7 +27,7 @@ class MakeswiftGraphQLApiClient {
|
|
|
27
27
|
graphqlClient;
|
|
28
28
|
constructor({ endpoint }) {
|
|
29
29
|
this.graphqlClient = new import_client.GraphQLClient(endpoint, {
|
|
30
|
-
"makeswift-runtime-version": "0.28.8-canary.
|
|
30
|
+
"makeswift-runtime-version": "0.28.8-canary.16"
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
async createTableRecord(tableId, columns) {
|
|
@@ -147,7 +147,7 @@ class MakeswiftRestAPIClient {
|
|
|
147
147
|
const requestHeaders = new Headers({
|
|
148
148
|
"x-api-key": this.apiKey,
|
|
149
149
|
"makeswift-site-api-key": this.apiKey,
|
|
150
|
-
"makeswift-runtime-version": "0.28.8-canary.
|
|
150
|
+
"makeswift-runtime-version": "0.28.8-canary.16"
|
|
151
151
|
});
|
|
152
152
|
if (siteVersion?.token) {
|
|
153
153
|
requestUrl.searchParams.set("version", siteVersion.version);
|
|
@@ -28,7 +28,7 @@ async function manifestHandler(req, { apiKey, manifest }) {
|
|
|
28
28
|
return import_request_response.ApiResponse.json({ message: "Unauthorized" }, { status: 401 });
|
|
29
29
|
}
|
|
30
30
|
return import_request_response.ApiResponse.json({
|
|
31
|
-
version: "0.28.8-canary.
|
|
31
|
+
version: "0.28.8-canary.16",
|
|
32
32
|
interactionMode: true,
|
|
33
33
|
clientSideNavigation: false,
|
|
34
34
|
elementFromPoint: false,
|
package/dist/cjs/client/index.js
CHANGED
|
@@ -689,7 +689,7 @@ Received "${apiKey}" instead.`
|
|
|
689
689
|
headers: {
|
|
690
690
|
"x-api-key": this.apiKey,
|
|
691
691
|
"makeswift-site-api-key": this.apiKey,
|
|
692
|
-
"makeswift-runtime-version": "0.28.8-canary.
|
|
692
|
+
"makeswift-runtime-version": "0.28.8-canary.16",
|
|
693
693
|
"content-type": "application/json"
|
|
694
694
|
},
|
|
695
695
|
body: JSON.stringify({ token }),
|
|
@@ -26,6 +26,7 @@ __export(read_write_actions_exports, {
|
|
|
26
26
|
registerMeasurableEffect: () => registerMeasurableEffect,
|
|
27
27
|
registerPropControllers: () => registerPropControllers,
|
|
28
28
|
registerPropControllersHandle: () => registerPropControllersHandle,
|
|
29
|
+
unregisterComponentHandle: () => unregisterComponentHandle,
|
|
29
30
|
unregisterMeasurable: () => unregisterMeasurable,
|
|
30
31
|
unregisterPropControllers: () => unregisterPropControllers,
|
|
31
32
|
unregisterPropControllersHandle: () => unregisterPropControllersHandle,
|
|
@@ -116,6 +117,7 @@ function clearAPIClientCache() {
|
|
|
116
117
|
registerMeasurableEffect,
|
|
117
118
|
registerPropControllers,
|
|
118
119
|
registerPropControllersHandle,
|
|
120
|
+
unregisterComponentHandle,
|
|
119
121
|
unregisterMeasurable,
|
|
120
122
|
unregisterPropControllers,
|
|
121
123
|
unregisterPropControllersHandle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/state/actions/internal/read-write-actions.ts"],"sourcesContent":["import { type Operation } from 'ot-json0'\nimport { type ThunkAction } from '@reduxjs/toolkit'\n\nimport { ControlInstance } from '@makeswift/controls'\n\nimport { ElementImperativeHandle } from '../../../runtimes/react/element-imperative-handle'\n\nimport { type DescriptorsByComponentType } from '../../modules/prop-controller-descriptors'\nimport { type Measurable } from '../../modules/read-write/box-models'\nimport { type PropControllersHandle } from '../../modules/read-write/prop-controllers'\n\nimport { type DocumentPayload } from '../../shared-api'\nimport { type SerializedState as APIClientCache } from '../../api-client/state'\n\nimport { ReadWriteActionTypes } from './read-write-action-types'\n\ntype ChangeElementTreeAction = {\n type: typeof ReadWriteActionTypes.CHANGE_ELEMENT_TREE\n payload: {\n oldDocument: DocumentPayload\n newDocument: DocumentPayload\n descriptors: DescriptorsByComponentType\n operation: Operation\n }\n}\n\ntype RegisterComponentHandleAction = {\n type: typeof ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string; componentHandle: ElementImperativeHandle }\n}\n\ntype UnregisterComponentHandleAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersHandleAction = {\n type: typeof ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string; handle: PropControllersHandle }\n}\n\ntype UnregisterPropControllersHandleAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersAction = {\n type: typeof ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS\n payload: {\n documentKey: string\n elementKey: string\n propControllers: Record<string, ControlInstance>\n }\n}\n\ntype UnregisterPropControllersAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof ReadWriteActionTypes.REGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype UpdateAPIClientCache = {\n type: typeof ReadWriteActionTypes.UPDATE_API_CLIENT_CACHE\n payload: APIClientCache\n}\n\ntype ClearAPIClientCache = {\n type: typeof ReadWriteActionTypes.CLEAR_API_CLIENT_CACHE\n}\n\nexport type ReadWriteAction =\n | ChangeElementTreeAction\n | RegisterComponentHandleAction\n | UnregisterComponentHandleAction\n | RegisterPropControllersHandleAction\n | UnregisterPropControllersHandleAction\n | RegisterPropControllersAction\n | UnregisterPropControllersAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | UpdateAPIClientCache\n | ClearAPIClientCache\n\nexport function changeElementTree(\n payload: ChangeElementTreeAction['payload'],\n): ChangeElementTreeAction {\n return {\n type: ReadWriteActionTypes.CHANGE_ELEMENT_TREE,\n payload,\n }\n}\n\nexport function registerComponentHandle(\n documentKey: string,\n elementKey: string,\n componentHandle: ElementImperativeHandle,\n): RegisterComponentHandleAction {\n return {\n type: ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey, componentHandle },\n }\n}\n\
|
|
1
|
+
{"version":3,"sources":["../../../../../src/state/actions/internal/read-write-actions.ts"],"sourcesContent":["import { type Operation } from 'ot-json0'\nimport { type ThunkAction } from '@reduxjs/toolkit'\n\nimport { ControlInstance } from '@makeswift/controls'\n\nimport { ElementImperativeHandle } from '../../../runtimes/react/element-imperative-handle'\n\nimport { type DescriptorsByComponentType } from '../../modules/prop-controller-descriptors'\nimport { type Measurable } from '../../modules/read-write/box-models'\nimport { type PropControllersHandle } from '../../modules/read-write/prop-controllers'\n\nimport { type DocumentPayload } from '../../shared-api'\nimport { type SerializedState as APIClientCache } from '../../api-client/state'\n\nimport { ReadWriteActionTypes } from './read-write-action-types'\n\ntype ChangeElementTreeAction = {\n type: typeof ReadWriteActionTypes.CHANGE_ELEMENT_TREE\n payload: {\n oldDocument: DocumentPayload\n newDocument: DocumentPayload\n descriptors: DescriptorsByComponentType\n operation: Operation\n }\n}\n\ntype RegisterComponentHandleAction = {\n type: typeof ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string; componentHandle: ElementImperativeHandle }\n}\n\ntype UnregisterComponentHandleAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersHandleAction = {\n type: typeof ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string; handle: PropControllersHandle }\n}\n\ntype UnregisterPropControllersHandleAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersAction = {\n type: typeof ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS\n payload: {\n documentKey: string\n elementKey: string\n propControllers: Record<string, ControlInstance>\n }\n}\n\ntype UnregisterPropControllersAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof ReadWriteActionTypes.REGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype UpdateAPIClientCache = {\n type: typeof ReadWriteActionTypes.UPDATE_API_CLIENT_CACHE\n payload: APIClientCache\n}\n\ntype ClearAPIClientCache = {\n type: typeof ReadWriteActionTypes.CLEAR_API_CLIENT_CACHE\n}\n\nexport type ReadWriteAction =\n | ChangeElementTreeAction\n | RegisterComponentHandleAction\n | UnregisterComponentHandleAction\n | RegisterPropControllersHandleAction\n | UnregisterPropControllersHandleAction\n | RegisterPropControllersAction\n | UnregisterPropControllersAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | UpdateAPIClientCache\n | ClearAPIClientCache\n\nexport function changeElementTree(\n payload: ChangeElementTreeAction['payload'],\n): ChangeElementTreeAction {\n return {\n type: ReadWriteActionTypes.CHANGE_ELEMENT_TREE,\n payload,\n }\n}\n\nexport function registerComponentHandle(\n documentKey: string,\n elementKey: string,\n componentHandle: ElementImperativeHandle,\n): RegisterComponentHandleAction {\n return {\n type: ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey, componentHandle },\n }\n}\n\nexport function unregisterComponentHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterComponentHandleAction {\n return {\n type: ReadWriteActionTypes.UNREGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerComponentHandleEffect(\n documentKey: string,\n elementKey: string,\n componentHandle: ElementImperativeHandle,\n): ThunkAction<() => void, unknown, unknown, ReadWriteAction> {\n return dispatch => {\n dispatch(registerComponentHandle(documentKey, elementKey, componentHandle))\n\n return () => {\n dispatch(unregisterComponentHandle(documentKey, elementKey))\n }\n }\n}\n\nexport function registerPropControllersHandle(\n documentKey: string,\n elementKey: string,\n handle: PropControllersHandle,\n): RegisterPropControllersHandleAction {\n return {\n type: ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey, handle },\n }\n}\n\nexport function unregisterPropControllersHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersHandleAction {\n return {\n type: ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerPropControllers(\n documentKey: string,\n elementKey: string,\n propControllers: Record<string, ControlInstance>,\n): RegisterPropControllersAction {\n return {\n type: ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS,\n payload: { documentKey, elementKey, propControllers },\n }\n}\n\nexport function unregisterPropControllers(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersAction {\n return {\n type: ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerMeasurable(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): RegisterMeasurableAction {\n return {\n type: ReadWriteActionTypes.REGISTER_MEASURABLE,\n payload: { documentKey, elementKey, measurable },\n }\n}\n\nexport function unregisterMeasurable(\n documentKey: string,\n elementKey: string,\n): UnregisterMeasurableAction {\n return { type: ReadWriteActionTypes.UNREGISTER_MEASURABLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerMeasurableEffect(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): ThunkAction<() => void, unknown, unknown, ReadWriteAction> {\n return dispatch => {\n dispatch(registerMeasurable(documentKey, elementKey, measurable))\n\n return () => {\n dispatch(unregisterMeasurable(documentKey, elementKey))\n }\n }\n}\n\nexport function updateAPIClientCache(payload: APIClientCache): UpdateAPIClientCache {\n return { type: ReadWriteActionTypes.UPDATE_API_CLIENT_CACHE, payload }\n}\n\nexport function clearAPIClientCache(): ClearAPIClientCache {\n return { type: ReadWriteActionTypes.CLEAR_API_CLIENT_CACHE }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,qCAAqC;AA8E9B,SAAS,kBACd,SACyB;AACzB,SAAO;AAAA,IACL,MAAM,oDAAqB;AAAA,IAC3B;AAAA,EACF;AACF;AAEO,SAAS,wBACd,aACA,YACA,iBAC+B;AAC/B,SAAO;AAAA,IACL,MAAM,oDAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,YAAY,gBAAgB;AAAA,EACtD;AACF;AAEO,SAAS,0BACd,aACA,YACiC;AACjC,SAAO;AAAA,IACL,MAAM,oDAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,WAAW;AAAA,EACrC;AACF;AAEO,SAAS,8BACd,aACA,YACA,iBAC4D;AAC5D,SAAO,cAAY;AACjB,aAAS,wBAAwB,aAAa,YAAY,eAAe,CAAC;AAE1E,WAAO,MAAM;AACX,eAAS,0BAA0B,aAAa,UAAU,CAAC;AAAA,IAC7D;AAAA,EACF;AACF;AAEO,SAAS,8BACd,aACA,YACA,QACqC;AACrC,SAAO;AAAA,IACL,MAAM,oDAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,YAAY,OAAO;AAAA,EAC7C;AACF;AAEO,SAAS,gCACd,aACA,YACuC;AACvC,SAAO;AAAA,IACL,MAAM,oDAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,WAAW;AAAA,EACrC;AACF;AAEO,SAAS,wBACd,aACA,YACA,iBAC+B;AAC/B,SAAO;AAAA,IACL,MAAM,oDAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,YAAY,gBAAgB;AAAA,EACtD;AACF;AAEO,SAAS,0BACd,aACA,YACiC;AACjC,SAAO;AAAA,IACL,MAAM,oDAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,WAAW;AAAA,EACrC;AACF;AAEO,SAAS,mBACd,aACA,YACA,YAC0B;AAC1B,SAAO;AAAA,IACL,MAAM,oDAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,YAAY,WAAW;AAAA,EACjD;AACF;AAEO,SAAS,qBACd,aACA,YAC4B;AAC5B,SAAO,EAAE,MAAM,oDAAqB,uBAAuB,SAAS,EAAE,aAAa,WAAW,EAAE;AAClG;AAEO,SAAS,yBACd,aACA,YACA,YAC4D;AAC5D,SAAO,cAAY;AACjB,aAAS,mBAAmB,aAAa,YAAY,UAAU,CAAC;AAEhE,WAAO,MAAM;AACX,eAAS,qBAAqB,aAAa,UAAU,CAAC;AAAA,IACxD;AAAA,EACF;AACF;AAEO,SAAS,qBAAqB,SAA+C;AAClF,SAAO,EAAE,MAAM,oDAAqB,yBAAyB,QAAQ;AACvE;AAEO,SAAS,sBAA2C;AACzD,SAAO,EAAE,MAAM,oDAAqB,uBAAuB;AAC7D;","names":[]}
|
|
@@ -90,6 +90,7 @@ function propControllerHandlesMiddleware() {
|
|
|
90
90
|
});
|
|
91
91
|
handle?.setPropControllers(null);
|
|
92
92
|
dispatch((0, import_read_write_actions.unregisterPropControllers)(documentKey, elementKey));
|
|
93
|
+
dispatch((0, import_read_write_actions.unregisterPropControllersHandle)(documentKey, elementKey));
|
|
93
94
|
break;
|
|
94
95
|
}
|
|
95
96
|
case import_host_api.HostActionTypes.MESSAGE_HOST_PROP_CONTROLLER: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/state/middleware/read-write/prop-controller-handles.ts"],"sourcesContent":["import { type Middleware, type ThunkAction } from '@reduxjs/toolkit'\n\nimport { ControlInstance } from '@makeswift/controls'\n\nimport * as PropControllers from '../../modules/read-write/prop-controllers'\n\nimport { type Action } from '../../actions'\n\nimport * as Builder from '../../builder-api/actions'\n\nimport { ReadWriteActionTypes } from '../../actions/internal/read-write-action-types'\n\nimport { actionMiddleware } from '../../toolkit'\n\nimport { createPropController } from '../../../prop-controllers/instances'\nimport { HostActionTypes } from '../../host-api'\n\nimport * as ReadOnlyState from '../../read-only-state'\nimport {\n type State,\n type Dispatch,\n getPropControllersHandle,\n getPropController,\n} from '../../read-write-state'\n\nimport {\n registerPropControllers,\n registerPropControllersHandle,\n unregisterPropControllers,\n} from '../../actions/internal/read-write-actions'\n\nfunction createAndRegisterPropControllers(\n documentKey: string,\n elementKey: string,\n): ThunkAction<Record<string, ControlInstance> | null, State, unknown, Action> {\n return (dispatch, getState) => {\n const descriptors = ReadOnlyState.getElementPropControllerDescriptors(\n getState(),\n documentKey,\n elementKey,\n )\n\n if (descriptors == null) return null\n\n const propControllers = Object.entries(descriptors).reduce(\n (acc, [propName, descriptor]) => {\n const propController = createPropController({\n descriptor,\n instanceKey: { elementKey, propPath: propName },\n sendMessage: message =>\n dispatch(\n Builder.messageBuilderPropController(documentKey, elementKey, propName, message),\n ),\n }) as ControlInstance\n\n return { ...acc, [propName]: propController }\n },\n {} as Record<string, ControlInstance>,\n )\n\n dispatch(registerPropControllers(documentKey, elementKey, propControllers))\n\n return propControllers\n }\n}\n\nexport function propControllerHandlesMiddleware(): Middleware<Dispatch, State, Dispatch> {\n return actionMiddleware(({ dispatch, getState }) => next => {\n return (action: Action) => {\n switch (action.type) {\n case ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE: {\n const { documentKey, elementKey, componentHandle } = action.payload\n const element = ReadOnlyState.getElement(getState(), documentKey, elementKey)\n const propControllers = dispatch(\n createAndRegisterPropControllers(documentKey, elementKey),\n )\n\n if (\n element != null &&\n !ReadOnlyState.isElementReference(element) &&\n PropControllers.isPropControllersHandle(componentHandle)\n ) {\n dispatch(registerPropControllersHandle(documentKey, elementKey, componentHandle))\n componentHandle.setPropControllers(propControllers)\n }\n\n break\n }\n\n case ReadWriteActionTypes.UNREGISTER_COMPONENT_HANDLE: {\n const { documentKey, elementKey } = action.payload\n const handle = getPropControllersHandle(getState(), {\n documentKey,\n elementKey,\n })\n\n handle?.setPropControllers(null)\n\n dispatch(unregisterPropControllers(documentKey, elementKey))\n\n break\n }\n\n case HostActionTypes.MESSAGE_HOST_PROP_CONTROLLER: {\n const { documentKey, elementKey, propName, message } = action.payload\n const propController = getPropController(getState(), {\n documentKey,\n elementKey,\n propName,\n })\n\n if (propController) propController.recv(message)\n }\n }\n\n return next(action)\n }\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,sBAAiC;AAIjC,cAAyB;AAEzB,qCAAqC;AAErC,IAAAA,kBAAiC;AAEjC,uBAAqC;AACrC,sBAAgC;AAEhC,oBAA+B;AAC/B,8BAKO;AAEP,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/state/middleware/read-write/prop-controller-handles.ts"],"sourcesContent":["import { type Middleware, type ThunkAction } from '@reduxjs/toolkit'\n\nimport { ControlInstance } from '@makeswift/controls'\n\nimport * as PropControllers from '../../modules/read-write/prop-controllers'\n\nimport { type Action } from '../../actions'\n\nimport * as Builder from '../../builder-api/actions'\n\nimport { ReadWriteActionTypes } from '../../actions/internal/read-write-action-types'\n\nimport { actionMiddleware } from '../../toolkit'\n\nimport { createPropController } from '../../../prop-controllers/instances'\nimport { HostActionTypes } from '../../host-api'\n\nimport * as ReadOnlyState from '../../read-only-state'\nimport {\n type State,\n type Dispatch,\n getPropControllersHandle,\n getPropController,\n} from '../../read-write-state'\n\nimport {\n registerPropControllers,\n registerPropControllersHandle,\n unregisterPropControllers,\n unregisterPropControllersHandle,\n} from '../../actions/internal/read-write-actions'\n\nfunction createAndRegisterPropControllers(\n documentKey: string,\n elementKey: string,\n): ThunkAction<Record<string, ControlInstance> | null, State, unknown, Action> {\n return (dispatch, getState) => {\n const descriptors = ReadOnlyState.getElementPropControllerDescriptors(\n getState(),\n documentKey,\n elementKey,\n )\n\n if (descriptors == null) return null\n\n const propControllers = Object.entries(descriptors).reduce(\n (acc, [propName, descriptor]) => {\n const propController = createPropController({\n descriptor,\n instanceKey: { elementKey, propPath: propName },\n sendMessage: message =>\n dispatch(\n Builder.messageBuilderPropController(documentKey, elementKey, propName, message),\n ),\n }) as ControlInstance\n\n return { ...acc, [propName]: propController }\n },\n {} as Record<string, ControlInstance>,\n )\n\n dispatch(registerPropControllers(documentKey, elementKey, propControllers))\n\n return propControllers\n }\n}\n\nexport function propControllerHandlesMiddleware(): Middleware<Dispatch, State, Dispatch> {\n return actionMiddleware(({ dispatch, getState }) => next => {\n return (action: Action) => {\n switch (action.type) {\n case ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE: {\n const { documentKey, elementKey, componentHandle } = action.payload\n const element = ReadOnlyState.getElement(getState(), documentKey, elementKey)\n const propControllers = dispatch(\n createAndRegisterPropControllers(documentKey, elementKey),\n )\n\n if (\n element != null &&\n !ReadOnlyState.isElementReference(element) &&\n PropControllers.isPropControllersHandle(componentHandle)\n ) {\n dispatch(registerPropControllersHandle(documentKey, elementKey, componentHandle))\n componentHandle.setPropControllers(propControllers)\n }\n\n break\n }\n\n case ReadWriteActionTypes.UNREGISTER_COMPONENT_HANDLE: {\n const { documentKey, elementKey } = action.payload\n const handle = getPropControllersHandle(getState(), {\n documentKey,\n elementKey,\n })\n\n handle?.setPropControllers(null)\n\n dispatch(unregisterPropControllers(documentKey, elementKey))\n dispatch(unregisterPropControllersHandle(documentKey, elementKey))\n\n break\n }\n\n case HostActionTypes.MESSAGE_HOST_PROP_CONTROLLER: {\n const { documentKey, elementKey, propName, message } = action.payload\n const propController = getPropController(getState(), {\n documentKey,\n elementKey,\n propName,\n })\n\n if (propController) propController.recv(message)\n }\n }\n\n return next(action)\n }\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,sBAAiC;AAIjC,cAAyB;AAEzB,qCAAqC;AAErC,IAAAA,kBAAiC;AAEjC,uBAAqC;AACrC,sBAAgC;AAEhC,oBAA+B;AAC/B,8BAKO;AAEP,gCAKO;AAEP,SAAS,iCACP,aACA,YAC6E;AAC7E,SAAO,CAAC,UAAU,aAAa;AAC7B,UAAM,cAAc,cAAc;AAAA,MAChC,SAAS;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAEA,QAAI,eAAe;AAAM,aAAO;AAEhC,UAAM,kBAAkB,OAAO,QAAQ,WAAW,EAAE;AAAA,MAClD,CAAC,KAAK,CAAC,UAAU,UAAU,MAAM;AAC/B,cAAM,qBAAiB,uCAAqB;AAAA,UAC1C;AAAA,UACA,aAAa,EAAE,YAAY,UAAU,SAAS;AAAA,UAC9C,aAAa,aACX;AAAA,YACE,QAAQ,6BAA6B,aAAa,YAAY,UAAU,OAAO;AAAA,UACjF;AAAA,QACJ,CAAC;AAED,eAAO,EAAE,GAAG,KAAK,CAAC,QAAQ,GAAG,eAAe;AAAA,MAC9C;AAAA,MACA,CAAC;AAAA,IACH;AAEA,iBAAS,mDAAwB,aAAa,YAAY,eAAe,CAAC;AAE1E,WAAO;AAAA,EACT;AACF;AAEO,SAAS,kCAAyE;AACvF,aAAO,kCAAiB,CAAC,EAAE,UAAU,SAAS,MAAM,UAAQ;AAC1D,WAAO,CAAC,WAAmB;AACzB,cAAQ,OAAO,MAAM;AAAA,QACnB,KAAK,oDAAqB,2BAA2B;AACnD,gBAAM,EAAE,aAAa,YAAY,gBAAgB,IAAI,OAAO;AAC5D,gBAAM,UAAU,cAAc,WAAW,SAAS,GAAG,aAAa,UAAU;AAC5E,gBAAM,kBAAkB;AAAA,YACtB,iCAAiC,aAAa,UAAU;AAAA,UAC1D;AAEA,cACE,WAAW,QACX,CAAC,cAAc,mBAAmB,OAAO,KACzC,gBAAgB,wBAAwB,eAAe,GACvD;AACA,yBAAS,yDAA8B,aAAa,YAAY,eAAe,CAAC;AAChF,4BAAgB,mBAAmB,eAAe;AAAA,UACpD;AAEA;AAAA,QACF;AAAA,QAEA,KAAK,oDAAqB,6BAA6B;AACrD,gBAAM,EAAE,aAAa,WAAW,IAAI,OAAO;AAC3C,gBAAM,aAAS,kDAAyB,SAAS,GAAG;AAAA,YAClD;AAAA,YACA;AAAA,UACF,CAAC;AAED,kBAAQ,mBAAmB,IAAI;AAE/B,uBAAS,qDAA0B,aAAa,UAAU,CAAC;AAC3D,uBAAS,2DAAgC,aAAa,UAAU,CAAC;AAEjE;AAAA,QACF;AAAA,QAEA,KAAK,gCAAgB,8BAA8B;AACjD,gBAAM,EAAE,aAAa,YAAY,UAAU,QAAQ,IAAI,OAAO;AAC9D,gBAAM,qBAAiB,2CAAkB,SAAS,GAAG;AAAA,YACnD;AAAA,YACA;AAAA,YACA;AAAA,UACF,CAAC;AAED,cAAI;AAAgB,2BAAe,KAAK,OAAO;AAAA,QACjD;AAAA,MACF;AAEA,aAAO,KAAK,MAAM;AAAA,IACpB;AAAA,EACF,CAAC;AACH;","names":["import_toolkit"]}
|
|
@@ -9,7 +9,7 @@ class MakeswiftGraphQLApiClient {
|
|
|
9
9
|
graphqlClient;
|
|
10
10
|
constructor({ endpoint }) {
|
|
11
11
|
this.graphqlClient = new GraphQLClient(endpoint, {
|
|
12
|
-
"makeswift-runtime-version": "0.28.8-canary.
|
|
12
|
+
"makeswift-runtime-version": "0.28.8-canary.16"
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
async createTableRecord(tableId, columns) {
|
|
@@ -113,7 +113,7 @@ class MakeswiftRestAPIClient {
|
|
|
113
113
|
const requestHeaders = new Headers({
|
|
114
114
|
"x-api-key": this.apiKey,
|
|
115
115
|
"makeswift-site-api-key": this.apiKey,
|
|
116
|
-
"makeswift-runtime-version": "0.28.8-canary.
|
|
116
|
+
"makeswift-runtime-version": "0.28.8-canary.16"
|
|
117
117
|
});
|
|
118
118
|
if (siteVersion?.token) {
|
|
119
119
|
requestUrl.searchParams.set("version", siteVersion.version);
|
|
@@ -8,7 +8,7 @@ async function manifestHandler(req, { apiKey, manifest }) {
|
|
|
8
8
|
return ApiResponse.json({ message: "Unauthorized" }, { status: 401 });
|
|
9
9
|
}
|
|
10
10
|
return ApiResponse.json({
|
|
11
|
-
version: "0.28.8-canary.
|
|
11
|
+
version: "0.28.8-canary.16",
|
|
12
12
|
interactionMode: true,
|
|
13
13
|
clientSideNavigation: false,
|
|
14
14
|
elementFromPoint: false,
|
package/dist/esm/client/index.js
CHANGED
|
@@ -669,7 +669,7 @@ Received "${apiKey}" instead.`
|
|
|
669
669
|
headers: {
|
|
670
670
|
"x-api-key": this.apiKey,
|
|
671
671
|
"makeswift-site-api-key": this.apiKey,
|
|
672
|
-
"makeswift-runtime-version": "0.28.8-canary.
|
|
672
|
+
"makeswift-runtime-version": "0.28.8-canary.16",
|
|
673
673
|
"content-type": "application/json"
|
|
674
674
|
},
|
|
675
675
|
body: JSON.stringify({ token }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/state/actions/internal/read-write-actions.ts"],"sourcesContent":["import { type Operation } from 'ot-json0'\nimport { type ThunkAction } from '@reduxjs/toolkit'\n\nimport { ControlInstance } from '@makeswift/controls'\n\nimport { ElementImperativeHandle } from '../../../runtimes/react/element-imperative-handle'\n\nimport { type DescriptorsByComponentType } from '../../modules/prop-controller-descriptors'\nimport { type Measurable } from '../../modules/read-write/box-models'\nimport { type PropControllersHandle } from '../../modules/read-write/prop-controllers'\n\nimport { type DocumentPayload } from '../../shared-api'\nimport { type SerializedState as APIClientCache } from '../../api-client/state'\n\nimport { ReadWriteActionTypes } from './read-write-action-types'\n\ntype ChangeElementTreeAction = {\n type: typeof ReadWriteActionTypes.CHANGE_ELEMENT_TREE\n payload: {\n oldDocument: DocumentPayload\n newDocument: DocumentPayload\n descriptors: DescriptorsByComponentType\n operation: Operation\n }\n}\n\ntype RegisterComponentHandleAction = {\n type: typeof ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string; componentHandle: ElementImperativeHandle }\n}\n\ntype UnregisterComponentHandleAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersHandleAction = {\n type: typeof ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string; handle: PropControllersHandle }\n}\n\ntype UnregisterPropControllersHandleAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersAction = {\n type: typeof ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS\n payload: {\n documentKey: string\n elementKey: string\n propControllers: Record<string, ControlInstance>\n }\n}\n\ntype UnregisterPropControllersAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof ReadWriteActionTypes.REGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype UpdateAPIClientCache = {\n type: typeof ReadWriteActionTypes.UPDATE_API_CLIENT_CACHE\n payload: APIClientCache\n}\n\ntype ClearAPIClientCache = {\n type: typeof ReadWriteActionTypes.CLEAR_API_CLIENT_CACHE\n}\n\nexport type ReadWriteAction =\n | ChangeElementTreeAction\n | RegisterComponentHandleAction\n | UnregisterComponentHandleAction\n | RegisterPropControllersHandleAction\n | UnregisterPropControllersHandleAction\n | RegisterPropControllersAction\n | UnregisterPropControllersAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | UpdateAPIClientCache\n | ClearAPIClientCache\n\nexport function changeElementTree(\n payload: ChangeElementTreeAction['payload'],\n): ChangeElementTreeAction {\n return {\n type: ReadWriteActionTypes.CHANGE_ELEMENT_TREE,\n payload,\n }\n}\n\nexport function registerComponentHandle(\n documentKey: string,\n elementKey: string,\n componentHandle: ElementImperativeHandle,\n): RegisterComponentHandleAction {\n return {\n type: ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey, componentHandle },\n }\n}\n\
|
|
1
|
+
{"version":3,"sources":["../../../../../src/state/actions/internal/read-write-actions.ts"],"sourcesContent":["import { type Operation } from 'ot-json0'\nimport { type ThunkAction } from '@reduxjs/toolkit'\n\nimport { ControlInstance } from '@makeswift/controls'\n\nimport { ElementImperativeHandle } from '../../../runtimes/react/element-imperative-handle'\n\nimport { type DescriptorsByComponentType } from '../../modules/prop-controller-descriptors'\nimport { type Measurable } from '../../modules/read-write/box-models'\nimport { type PropControllersHandle } from '../../modules/read-write/prop-controllers'\n\nimport { type DocumentPayload } from '../../shared-api'\nimport { type SerializedState as APIClientCache } from '../../api-client/state'\n\nimport { ReadWriteActionTypes } from './read-write-action-types'\n\ntype ChangeElementTreeAction = {\n type: typeof ReadWriteActionTypes.CHANGE_ELEMENT_TREE\n payload: {\n oldDocument: DocumentPayload\n newDocument: DocumentPayload\n descriptors: DescriptorsByComponentType\n operation: Operation\n }\n}\n\ntype RegisterComponentHandleAction = {\n type: typeof ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string; componentHandle: ElementImperativeHandle }\n}\n\ntype UnregisterComponentHandleAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_COMPONENT_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersHandleAction = {\n type: typeof ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string; handle: PropControllersHandle }\n}\n\ntype UnregisterPropControllersHandleAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterPropControllersAction = {\n type: typeof ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS\n payload: {\n documentKey: string\n elementKey: string\n propControllers: Record<string, ControlInstance>\n }\n}\n\ntype UnregisterPropControllersAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS\n payload: { documentKey: string; elementKey: string }\n}\n\ntype RegisterMeasurableAction = {\n type: typeof ReadWriteActionTypes.REGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string; measurable: Measurable }\n}\n\ntype UnregisterMeasurableAction = {\n type: typeof ReadWriteActionTypes.UNREGISTER_MEASURABLE\n payload: { documentKey: string; elementKey: string }\n}\n\ntype UpdateAPIClientCache = {\n type: typeof ReadWriteActionTypes.UPDATE_API_CLIENT_CACHE\n payload: APIClientCache\n}\n\ntype ClearAPIClientCache = {\n type: typeof ReadWriteActionTypes.CLEAR_API_CLIENT_CACHE\n}\n\nexport type ReadWriteAction =\n | ChangeElementTreeAction\n | RegisterComponentHandleAction\n | UnregisterComponentHandleAction\n | RegisterPropControllersHandleAction\n | UnregisterPropControllersHandleAction\n | RegisterPropControllersAction\n | UnregisterPropControllersAction\n | RegisterMeasurableAction\n | UnregisterMeasurableAction\n | UpdateAPIClientCache\n | ClearAPIClientCache\n\nexport function changeElementTree(\n payload: ChangeElementTreeAction['payload'],\n): ChangeElementTreeAction {\n return {\n type: ReadWriteActionTypes.CHANGE_ELEMENT_TREE,\n payload,\n }\n}\n\nexport function registerComponentHandle(\n documentKey: string,\n elementKey: string,\n componentHandle: ElementImperativeHandle,\n): RegisterComponentHandleAction {\n return {\n type: ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey, componentHandle },\n }\n}\n\nexport function unregisterComponentHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterComponentHandleAction {\n return {\n type: ReadWriteActionTypes.UNREGISTER_COMPONENT_HANDLE,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerComponentHandleEffect(\n documentKey: string,\n elementKey: string,\n componentHandle: ElementImperativeHandle,\n): ThunkAction<() => void, unknown, unknown, ReadWriteAction> {\n return dispatch => {\n dispatch(registerComponentHandle(documentKey, elementKey, componentHandle))\n\n return () => {\n dispatch(unregisterComponentHandle(documentKey, elementKey))\n }\n }\n}\n\nexport function registerPropControllersHandle(\n documentKey: string,\n elementKey: string,\n handle: PropControllersHandle,\n): RegisterPropControllersHandleAction {\n return {\n type: ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey, handle },\n }\n}\n\nexport function unregisterPropControllersHandle(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersHandleAction {\n return {\n type: ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerPropControllers(\n documentKey: string,\n elementKey: string,\n propControllers: Record<string, ControlInstance>,\n): RegisterPropControllersAction {\n return {\n type: ReadWriteActionTypes.REGISTER_PROP_CONTROLLERS,\n payload: { documentKey, elementKey, propControllers },\n }\n}\n\nexport function unregisterPropControllers(\n documentKey: string,\n elementKey: string,\n): UnregisterPropControllersAction {\n return {\n type: ReadWriteActionTypes.UNREGISTER_PROP_CONTROLLERS,\n payload: { documentKey, elementKey },\n }\n}\n\nexport function registerMeasurable(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): RegisterMeasurableAction {\n return {\n type: ReadWriteActionTypes.REGISTER_MEASURABLE,\n payload: { documentKey, elementKey, measurable },\n }\n}\n\nexport function unregisterMeasurable(\n documentKey: string,\n elementKey: string,\n): UnregisterMeasurableAction {\n return { type: ReadWriteActionTypes.UNREGISTER_MEASURABLE, payload: { documentKey, elementKey } }\n}\n\nexport function registerMeasurableEffect(\n documentKey: string,\n elementKey: string,\n measurable: Measurable,\n): ThunkAction<() => void, unknown, unknown, ReadWriteAction> {\n return dispatch => {\n dispatch(registerMeasurable(documentKey, elementKey, measurable))\n\n return () => {\n dispatch(unregisterMeasurable(documentKey, elementKey))\n }\n }\n}\n\nexport function updateAPIClientCache(payload: APIClientCache): UpdateAPIClientCache {\n return { type: ReadWriteActionTypes.UPDATE_API_CLIENT_CACHE, payload }\n}\n\nexport function clearAPIClientCache(): ClearAPIClientCache {\n return { type: ReadWriteActionTypes.CLEAR_API_CLIENT_CACHE }\n}\n"],"mappings":"AAcA,SAAS,4BAA4B;AA8E9B,SAAS,kBACd,SACyB;AACzB,SAAO;AAAA,IACL,MAAM,qBAAqB;AAAA,IAC3B;AAAA,EACF;AACF;AAEO,SAAS,wBACd,aACA,YACA,iBAC+B;AAC/B,SAAO;AAAA,IACL,MAAM,qBAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,YAAY,gBAAgB;AAAA,EACtD;AACF;AAEO,SAAS,0BACd,aACA,YACiC;AACjC,SAAO;AAAA,IACL,MAAM,qBAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,WAAW;AAAA,EACrC;AACF;AAEO,SAAS,8BACd,aACA,YACA,iBAC4D;AAC5D,SAAO,cAAY;AACjB,aAAS,wBAAwB,aAAa,YAAY,eAAe,CAAC;AAE1E,WAAO,MAAM;AACX,eAAS,0BAA0B,aAAa,UAAU,CAAC;AAAA,IAC7D;AAAA,EACF;AACF;AAEO,SAAS,8BACd,aACA,YACA,QACqC;AACrC,SAAO;AAAA,IACL,MAAM,qBAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,YAAY,OAAO;AAAA,EAC7C;AACF;AAEO,SAAS,gCACd,aACA,YACuC;AACvC,SAAO;AAAA,IACL,MAAM,qBAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,WAAW;AAAA,EACrC;AACF;AAEO,SAAS,wBACd,aACA,YACA,iBAC+B;AAC/B,SAAO;AAAA,IACL,MAAM,qBAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,YAAY,gBAAgB;AAAA,EACtD;AACF;AAEO,SAAS,0BACd,aACA,YACiC;AACjC,SAAO;AAAA,IACL,MAAM,qBAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,WAAW;AAAA,EACrC;AACF;AAEO,SAAS,mBACd,aACA,YACA,YAC0B;AAC1B,SAAO;AAAA,IACL,MAAM,qBAAqB;AAAA,IAC3B,SAAS,EAAE,aAAa,YAAY,WAAW;AAAA,EACjD;AACF;AAEO,SAAS,qBACd,aACA,YAC4B;AAC5B,SAAO,EAAE,MAAM,qBAAqB,uBAAuB,SAAS,EAAE,aAAa,WAAW,EAAE;AAClG;AAEO,SAAS,yBACd,aACA,YACA,YAC4D;AAC5D,SAAO,cAAY;AACjB,aAAS,mBAAmB,aAAa,YAAY,UAAU,CAAC;AAEhE,WAAO,MAAM;AACX,eAAS,qBAAqB,aAAa,UAAU,CAAC;AAAA,IACxD;AAAA,EACF;AACF;AAEO,SAAS,qBAAqB,SAA+C;AAClF,SAAO,EAAE,MAAM,qBAAqB,yBAAyB,QAAQ;AACvE;AAEO,SAAS,sBAA2C;AACzD,SAAO,EAAE,MAAM,qBAAqB,uBAAuB;AAC7D;","names":[]}
|
|
@@ -12,7 +12,8 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
registerPropControllers,
|
|
14
14
|
registerPropControllersHandle,
|
|
15
|
-
unregisterPropControllers
|
|
15
|
+
unregisterPropControllers,
|
|
16
|
+
unregisterPropControllersHandle
|
|
16
17
|
} from "../../actions/internal/read-write-actions";
|
|
17
18
|
function createAndRegisterPropControllers(documentKey, elementKey) {
|
|
18
19
|
return (dispatch, getState) => {
|
|
@@ -64,6 +65,7 @@ function propControllerHandlesMiddleware() {
|
|
|
64
65
|
});
|
|
65
66
|
handle?.setPropControllers(null);
|
|
66
67
|
dispatch(unregisterPropControllers(documentKey, elementKey));
|
|
68
|
+
dispatch(unregisterPropControllersHandle(documentKey, elementKey));
|
|
67
69
|
break;
|
|
68
70
|
}
|
|
69
71
|
case HostActionTypes.MESSAGE_HOST_PROP_CONTROLLER: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/state/middleware/read-write/prop-controller-handles.ts"],"sourcesContent":["import { type Middleware, type ThunkAction } from '@reduxjs/toolkit'\n\nimport { ControlInstance } from '@makeswift/controls'\n\nimport * as PropControllers from '../../modules/read-write/prop-controllers'\n\nimport { type Action } from '../../actions'\n\nimport * as Builder from '../../builder-api/actions'\n\nimport { ReadWriteActionTypes } from '../../actions/internal/read-write-action-types'\n\nimport { actionMiddleware } from '../../toolkit'\n\nimport { createPropController } from '../../../prop-controllers/instances'\nimport { HostActionTypes } from '../../host-api'\n\nimport * as ReadOnlyState from '../../read-only-state'\nimport {\n type State,\n type Dispatch,\n getPropControllersHandle,\n getPropController,\n} from '../../read-write-state'\n\nimport {\n registerPropControllers,\n registerPropControllersHandle,\n unregisterPropControllers,\n} from '../../actions/internal/read-write-actions'\n\nfunction createAndRegisterPropControllers(\n documentKey: string,\n elementKey: string,\n): ThunkAction<Record<string, ControlInstance> | null, State, unknown, Action> {\n return (dispatch, getState) => {\n const descriptors = ReadOnlyState.getElementPropControllerDescriptors(\n getState(),\n documentKey,\n elementKey,\n )\n\n if (descriptors == null) return null\n\n const propControllers = Object.entries(descriptors).reduce(\n (acc, [propName, descriptor]) => {\n const propController = createPropController({\n descriptor,\n instanceKey: { elementKey, propPath: propName },\n sendMessage: message =>\n dispatch(\n Builder.messageBuilderPropController(documentKey, elementKey, propName, message),\n ),\n }) as ControlInstance\n\n return { ...acc, [propName]: propController }\n },\n {} as Record<string, ControlInstance>,\n )\n\n dispatch(registerPropControllers(documentKey, elementKey, propControllers))\n\n return propControllers\n }\n}\n\nexport function propControllerHandlesMiddleware(): Middleware<Dispatch, State, Dispatch> {\n return actionMiddleware(({ dispatch, getState }) => next => {\n return (action: Action) => {\n switch (action.type) {\n case ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE: {\n const { documentKey, elementKey, componentHandle } = action.payload\n const element = ReadOnlyState.getElement(getState(), documentKey, elementKey)\n const propControllers = dispatch(\n createAndRegisterPropControllers(documentKey, elementKey),\n )\n\n if (\n element != null &&\n !ReadOnlyState.isElementReference(element) &&\n PropControllers.isPropControllersHandle(componentHandle)\n ) {\n dispatch(registerPropControllersHandle(documentKey, elementKey, componentHandle))\n componentHandle.setPropControllers(propControllers)\n }\n\n break\n }\n\n case ReadWriteActionTypes.UNREGISTER_COMPONENT_HANDLE: {\n const { documentKey, elementKey } = action.payload\n const handle = getPropControllersHandle(getState(), {\n documentKey,\n elementKey,\n })\n\n handle?.setPropControllers(null)\n\n dispatch(unregisterPropControllers(documentKey, elementKey))\n\n break\n }\n\n case HostActionTypes.MESSAGE_HOST_PROP_CONTROLLER: {\n const { documentKey, elementKey, propName, message } = action.payload\n const propController = getPropController(getState(), {\n documentKey,\n elementKey,\n propName,\n })\n\n if (propController) propController.recv(message)\n }\n }\n\n return next(action)\n }\n })\n}\n"],"mappings":"AAIA,YAAY,qBAAqB;AAIjC,YAAY,aAAa;AAEzB,SAAS,4BAA4B;AAErC,SAAS,wBAAwB;AAEjC,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAEhC,YAAY,mBAAmB;AAC/B;AAAA,EAGE;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iCACP,aACA,YAC6E;AAC7E,SAAO,CAAC,UAAU,aAAa;AAC7B,UAAM,cAAc,cAAc;AAAA,MAChC,SAAS;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAEA,QAAI,eAAe;AAAM,aAAO;AAEhC,UAAM,kBAAkB,OAAO,QAAQ,WAAW,EAAE;AAAA,MAClD,CAAC,KAAK,CAAC,UAAU,UAAU,MAAM;AAC/B,cAAM,iBAAiB,qBAAqB;AAAA,UAC1C;AAAA,UACA,aAAa,EAAE,YAAY,UAAU,SAAS;AAAA,UAC9C,aAAa,aACX;AAAA,YACE,QAAQ,6BAA6B,aAAa,YAAY,UAAU,OAAO;AAAA,UACjF;AAAA,QACJ,CAAC;AAED,eAAO,EAAE,GAAG,KAAK,CAAC,QAAQ,GAAG,eAAe;AAAA,MAC9C;AAAA,MACA,CAAC;AAAA,IACH;AAEA,aAAS,wBAAwB,aAAa,YAAY,eAAe,CAAC;AAE1E,WAAO;AAAA,EACT;AACF;AAEO,SAAS,kCAAyE;AACvF,SAAO,iBAAiB,CAAC,EAAE,UAAU,SAAS,MAAM,UAAQ;AAC1D,WAAO,CAAC,WAAmB;AACzB,cAAQ,OAAO,MAAM;AAAA,QACnB,KAAK,qBAAqB,2BAA2B;AACnD,gBAAM,EAAE,aAAa,YAAY,gBAAgB,IAAI,OAAO;AAC5D,gBAAM,UAAU,cAAc,WAAW,SAAS,GAAG,aAAa,UAAU;AAC5E,gBAAM,kBAAkB;AAAA,YACtB,iCAAiC,aAAa,UAAU;AAAA,UAC1D;AAEA,cACE,WAAW,QACX,CAAC,cAAc,mBAAmB,OAAO,KACzC,gBAAgB,wBAAwB,eAAe,GACvD;AACA,qBAAS,8BAA8B,aAAa,YAAY,eAAe,CAAC;AAChF,4BAAgB,mBAAmB,eAAe;AAAA,UACpD;AAEA;AAAA,QACF;AAAA,QAEA,KAAK,qBAAqB,6BAA6B;AACrD,gBAAM,EAAE,aAAa,WAAW,IAAI,OAAO;AAC3C,gBAAM,SAAS,yBAAyB,SAAS,GAAG;AAAA,YAClD;AAAA,YACA;AAAA,UACF,CAAC;AAED,kBAAQ,mBAAmB,IAAI;AAE/B,mBAAS,0BAA0B,aAAa,UAAU,CAAC;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/state/middleware/read-write/prop-controller-handles.ts"],"sourcesContent":["import { type Middleware, type ThunkAction } from '@reduxjs/toolkit'\n\nimport { ControlInstance } from '@makeswift/controls'\n\nimport * as PropControllers from '../../modules/read-write/prop-controllers'\n\nimport { type Action } from '../../actions'\n\nimport * as Builder from '../../builder-api/actions'\n\nimport { ReadWriteActionTypes } from '../../actions/internal/read-write-action-types'\n\nimport { actionMiddleware } from '../../toolkit'\n\nimport { createPropController } from '../../../prop-controllers/instances'\nimport { HostActionTypes } from '../../host-api'\n\nimport * as ReadOnlyState from '../../read-only-state'\nimport {\n type State,\n type Dispatch,\n getPropControllersHandle,\n getPropController,\n} from '../../read-write-state'\n\nimport {\n registerPropControllers,\n registerPropControllersHandle,\n unregisterPropControllers,\n unregisterPropControllersHandle,\n} from '../../actions/internal/read-write-actions'\n\nfunction createAndRegisterPropControllers(\n documentKey: string,\n elementKey: string,\n): ThunkAction<Record<string, ControlInstance> | null, State, unknown, Action> {\n return (dispatch, getState) => {\n const descriptors = ReadOnlyState.getElementPropControllerDescriptors(\n getState(),\n documentKey,\n elementKey,\n )\n\n if (descriptors == null) return null\n\n const propControllers = Object.entries(descriptors).reduce(\n (acc, [propName, descriptor]) => {\n const propController = createPropController({\n descriptor,\n instanceKey: { elementKey, propPath: propName },\n sendMessage: message =>\n dispatch(\n Builder.messageBuilderPropController(documentKey, elementKey, propName, message),\n ),\n }) as ControlInstance\n\n return { ...acc, [propName]: propController }\n },\n {} as Record<string, ControlInstance>,\n )\n\n dispatch(registerPropControllers(documentKey, elementKey, propControllers))\n\n return propControllers\n }\n}\n\nexport function propControllerHandlesMiddleware(): Middleware<Dispatch, State, Dispatch> {\n return actionMiddleware(({ dispatch, getState }) => next => {\n return (action: Action) => {\n switch (action.type) {\n case ReadWriteActionTypes.REGISTER_COMPONENT_HANDLE: {\n const { documentKey, elementKey, componentHandle } = action.payload\n const element = ReadOnlyState.getElement(getState(), documentKey, elementKey)\n const propControllers = dispatch(\n createAndRegisterPropControllers(documentKey, elementKey),\n )\n\n if (\n element != null &&\n !ReadOnlyState.isElementReference(element) &&\n PropControllers.isPropControllersHandle(componentHandle)\n ) {\n dispatch(registerPropControllersHandle(documentKey, elementKey, componentHandle))\n componentHandle.setPropControllers(propControllers)\n }\n\n break\n }\n\n case ReadWriteActionTypes.UNREGISTER_COMPONENT_HANDLE: {\n const { documentKey, elementKey } = action.payload\n const handle = getPropControllersHandle(getState(), {\n documentKey,\n elementKey,\n })\n\n handle?.setPropControllers(null)\n\n dispatch(unregisterPropControllers(documentKey, elementKey))\n dispatch(unregisterPropControllersHandle(documentKey, elementKey))\n\n break\n }\n\n case HostActionTypes.MESSAGE_HOST_PROP_CONTROLLER: {\n const { documentKey, elementKey, propName, message } = action.payload\n const propController = getPropController(getState(), {\n documentKey,\n elementKey,\n propName,\n })\n\n if (propController) propController.recv(message)\n }\n }\n\n return next(action)\n }\n })\n}\n"],"mappings":"AAIA,YAAY,qBAAqB;AAIjC,YAAY,aAAa;AAEzB,SAAS,4BAA4B;AAErC,SAAS,wBAAwB;AAEjC,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAEhC,YAAY,mBAAmB;AAC/B;AAAA,EAGE;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iCACP,aACA,YAC6E;AAC7E,SAAO,CAAC,UAAU,aAAa;AAC7B,UAAM,cAAc,cAAc;AAAA,MAChC,SAAS;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAEA,QAAI,eAAe;AAAM,aAAO;AAEhC,UAAM,kBAAkB,OAAO,QAAQ,WAAW,EAAE;AAAA,MAClD,CAAC,KAAK,CAAC,UAAU,UAAU,MAAM;AAC/B,cAAM,iBAAiB,qBAAqB;AAAA,UAC1C;AAAA,UACA,aAAa,EAAE,YAAY,UAAU,SAAS;AAAA,UAC9C,aAAa,aACX;AAAA,YACE,QAAQ,6BAA6B,aAAa,YAAY,UAAU,OAAO;AAAA,UACjF;AAAA,QACJ,CAAC;AAED,eAAO,EAAE,GAAG,KAAK,CAAC,QAAQ,GAAG,eAAe;AAAA,MAC9C;AAAA,MACA,CAAC;AAAA,IACH;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ientCache = {
|
|
|
87
87
|
export type ReadWriteAction = ChangeElementTreeAction | RegisterComponentHandleAction | UnregisterComponentHandleAction | RegisterPropControllersHandleAction | UnregisterPropControllersHandleAction | RegisterPropControllersAction | UnregisterPropControllersAction | RegisterMeasurableAction | UnregisterMeasurableAction | UpdateAPIClientCache | ClearAPIClientCache;
|
|
88
88
|
export declare function changeElementTree(payload: ChangeElementTreeAction['payload']): ChangeElementTreeAction;
|
|
89
89
|
export declare function registerComponentHandle(documentKey: string, elementKey: string, componentHandle: ElementImperativeHandle): RegisterComponentHandleAction;
|
|
90
|
+
export declare function unregisterComponentHandle(documentKey: string, elementKey: string): UnregisterComponentHandleAction;
|
|
90
91
|
export declare function registerComponentHandleEffect(documentKey: string, elementKey: string, componentHandle: ElementImperativeHandle): ThunkAction<() => void, unknown, unknown, ReadWriteAction>;
|
|
91
92
|
export declare function registerPropControllersHandle(documentKey: string, elementKey: string, handle: PropControllersHandle): RegisterPropControllersHandleAction;
|
|
92
93
|
export declare function unregisterPropControllersHandle(documentKey: string, elementKey: string): UnregisterPropControllersHandleAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-write-actions.d.ts","sourceRoot":"","sources":["../../../../../src/state/actions/internal/read-write-actions.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,mDAAmD,CAAA;AAE3F,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,2CAA2C,CAAA;AAC3F,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,2CAA2C,CAAA;AAEtF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kB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AC1C,uBAAuB,CAKzB;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,uBAAuB,GACvC,6BAA6B,CAK/B;
|
|
1
|
+
{"version":3,"file":"read-write-actions.d.ts","sourceRoot":"","sources":["../../../../../src/state/actions/internal/read-write-actions.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,mDAAmD,CAAA;AAE3F,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,2CAA2C,CAAA;AAC3F,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,2CAA2C,CAAA;AAEtF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAE,KAAK,eAAe,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE,KAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,OAAO,oBAAoB,CAAC,mBAAmB,CAAA;IACrD,OAAO,EAAE;QACP,WAAW,EAAE,eAAe,CAAA;QAC5B,WAAW,EAAE,eAAe,CAAA;QAC5B,WAAW,EAAE,0BAA0B,CAAA;QACvC,SAAS,EAAE,SAAS,CAAA;KACrB,CAAA;CACF,CAAA;AAED,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,OAAO,oBAAoB,CAAC,yBAAyB,CAAA;IAC3D,OAAO,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,eAAe,EAA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7C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,qCAAqC,CAKvC;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAC/C,6BAA6B,CAK/B;AAED,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,+BAA+B,CAKjC;AAED,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,UAAU,GACrB,wBAAwB,CAK1B;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,0BAA0B,CAE5B;AAED,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,UAAU,GACrB,WAAW,CAAC,MAAM,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,CAAC,CAQ5D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,oBAAoB,CAElF;AAED,wBAAgB,mBAAmB,IAAI,mBAAmB,CAEzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../../../src/state/middleware/read-write/__tests__/fixtures/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,eAAO,MAAM,iBAAiB,EAAE,SAyB/B,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,SAsBlC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,SA6iC1B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,SAqHzB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,SAY7B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,SAqB1B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-elements.d.ts","sourceRoot":"","sources":["../../../../../../../src/state/middleware/read-write/__tests__/fixtures/root-elements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE7C,eAAO,MAAM,gBAAgB,EAAE,OAuhB9B,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,OAkjBnC,CAAA"}
|
package/dist/types/state/middleware/read-write/__tests__/prop-controller-handles.test.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-controller-handles.test.d.ts","sourceRoot":"","sources":["../../../../../../src/state/middleware/read-write/__tests__/prop-controller-handles.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-element-tree.test.d.ts","sourceRoot":"","sources":["../../../../../../src/state/middleware/read-write/__tests__/update-element-tree.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-controller-handles.d.ts","sourceRoot":"","sources":["../../../../../src/state/middleware/read-write/prop-controller-handles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,kBAAkB,CAAA;AAkBpE,OAAO,EACL,KAAK,KAAK,EACV,KAAK,QAAQ,EAGd,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"prop-controller-handles.d.ts","sourceRoot":"","sources":["../../../../../src/state/middleware/read-write/prop-controller-handles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,kBAAkB,CAAA;AAkBpE,OAAO,EACL,KAAK,KAAK,EACV,KAAK,QAAQ,EAGd,MAAM,wBAAwB,CAAA;AA4C/B,wBAAgB,+BAA+B,IAAI,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CAqDvF"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../src/state/__tests__/fixtures/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,eAAO,MAAM,iBAAiB,EAAE,SAyB/B,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,SAsBlC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,SA6iC1B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,SAqHzB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,SAY7B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,SAqB1B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"root-elements.d.ts","sourceRoot":"","sources":["../../../../../src/state/__tests__/fixtures/root-elements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE7C,eAAO,MAAM,gBAAgB,EAAE,OAuhB9B,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,OAkjBnC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-builder-preview.test.d.ts","sourceRoot":"","sources":["../../../../src/state/__tests__/react-builder-preview.test.ts"],"names":[],"mappings":""}
|
/package/dist/types/state/{__tests__ → middleware/read-write/__tests__}/fixtures/operations.d.ts
RENAMED
|
File without changes
|
/package/dist/types/state/{__tests__ → middleware/read-write/__tests__}/fixtures/root-elements.d.ts
RENAMED
|
File without changes
|