@makeswift/runtime 0.26.4-canary.0 → 0.27.0-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/client.js +2 -4
- package/dist/cjs/api/client.js.map +1 -1
- package/dist/cjs/api-handler/handlers/manifest.js +1 -1
- package/dist/cjs/api-handler/index.js +1 -2
- package/dist/cjs/api-handler/index.js.map +1 -1
- package/dist/cjs/client/index.js +8 -13
- package/dist/cjs/client/index.js.map +1 -1
- package/dist/cjs/next/api-handler/index.js +2 -2
- package/dist/cjs/next/api-handler/index.js.map +1 -1
- package/dist/cjs/next/components/framework-provider/index.js +1 -3
- package/dist/cjs/next/components/framework-provider/index.js.map +1 -1
- package/dist/cjs/next/components/tests/controls/style-control/fixtures.js.map +1 -1
- package/dist/cjs/next/index.js +3 -0
- package/dist/cjs/next/index.js.map +1 -1
- package/dist/cjs/next/runtime.js +38 -0
- package/dist/cjs/next/runtime.js.map +1 -0
- package/dist/cjs/next/tests/test-utils.js +3 -6
- package/dist/cjs/next/tests/test-utils.js.map +1 -1
- package/dist/cjs/react/index.js +0 -3
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/runtimes/react/components/RuntimeProvider.js +13 -32
- package/dist/cjs/runtimes/react/components/RuntimeProvider.js.map +1 -1
- package/dist/cjs/runtimes/react/components/framework-context.js +3 -14
- package/dist/cjs/runtimes/react/components/framework-context.js.map +1 -1
- package/dist/cjs/runtimes/react/hooks/use-async-effect.js +55 -0
- package/dist/cjs/runtimes/react/hooks/use-async-effect.js.map +1 -0
- package/dist/cjs/runtimes/react/hooks/use-store.js +2 -9
- package/dist/cjs/runtimes/react/hooks/use-store.js.map +1 -1
- package/dist/cjs/runtimes/react/host-api-client.js +2 -24
- package/dist/cjs/runtimes/react/host-api-client.js.map +1 -1
- package/dist/cjs/runtimes/react/index.js +0 -5
- package/dist/cjs/runtimes/react/index.js.map +1 -1
- package/dist/cjs/runtimes/react/react-runtime-core.js +0 -3
- package/dist/cjs/runtimes/react/react-runtime-core.js.map +1 -1
- package/dist/cjs/runtimes/react/react-runtime.js +2 -2
- package/dist/cjs/runtimes/react/react-runtime.js.map +1 -1
- package/dist/cjs/runtimes/react/runtime-core.js +42 -3
- package/dist/cjs/runtimes/react/runtime-core.js.map +1 -1
- package/dist/cjs/runtimes/react/testing/react-runtime.js +2 -1
- package/dist/cjs/runtimes/react/testing/react-runtime.js.map +1 -1
- package/dist/cjs/state/actions/internal/read-only-actions.js +15 -1
- package/dist/cjs/state/actions/internal/read-only-actions.js.map +1 -1
- package/dist/cjs/state/makeswift-api-client.js +32 -18
- package/dist/cjs/state/makeswift-api-client.js.map +1 -1
- package/dist/cjs/state/middleware/{read-write/makeswift-api-client-sync.js → makeswift-api-client-sync.js} +1 -1
- package/dist/cjs/state/middleware/makeswift-api-client-sync.js.map +1 -0
- package/dist/cjs/state/middleware/read-write/index.js +40 -0
- package/dist/cjs/state/middleware/read-write/index.js.map +1 -0
- package/dist/cjs/state/middleware/{prop-controller-handles.js → read-write/prop-controller-handles.js} +8 -8
- package/dist/cjs/state/middleware/read-write/prop-controller-handles.js.map +1 -0
- package/dist/cjs/state/modules/locale.js +53 -0
- package/dist/cjs/state/modules/locale.js.map +1 -0
- package/dist/cjs/state/modules/site-version.js +50 -0
- package/dist/cjs/state/modules/site-version.js.map +1 -0
- package/dist/cjs/state/read-only-state.js +2 -0
- package/dist/cjs/state/read-only-state.js.map +1 -1
- package/dist/cjs/state/read-write-state.js +9 -2
- package/dist/cjs/state/read-write-state.js.map +1 -1
- package/dist/cjs/state/store.js +184 -0
- package/dist/cjs/state/store.js.map +1 -0
- package/dist/cjs/state/unified-state.js +17 -0
- package/dist/cjs/state/unified-state.js.map +1 -0
- package/dist/cjs/unstable-framework-support/index.js +2 -4
- package/dist/cjs/unstable-framework-support/index.js.map +1 -1
- package/dist/cjs/{state/mixins/setup-teardown.js → utils/deferred.js} +15 -11
- package/dist/cjs/utils/deferred.js.map +1 -0
- package/dist/esm/api/client.js +2 -4
- package/dist/esm/api/client.js.map +1 -1
- package/dist/esm/api-handler/handlers/manifest.js +1 -1
- package/dist/esm/api-handler/index.js +1 -2
- package/dist/esm/api-handler/index.js.map +1 -1
- package/dist/esm/client/index.js +8 -13
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/next/api-handler/index.js +2 -2
- package/dist/esm/next/api-handler/index.js.map +1 -1
- package/dist/esm/next/components/framework-provider/index.js +2 -7
- package/dist/esm/next/components/framework-provider/index.js.map +1 -1
- package/dist/esm/next/components/tests/controls/style-control/fixtures.js.map +1 -1
- package/dist/esm/next/index.js +2 -0
- package/dist/esm/next/index.js.map +1 -1
- package/dist/esm/next/runtime.js +14 -0
- package/dist/esm/next/runtime.js.map +1 -0
- package/dist/esm/next/tests/test-utils.js +3 -6
- package/dist/esm/next/tests/test-utils.js.map +1 -1
- package/dist/esm/react/index.js +0 -2
- package/dist/esm/react/index.js.map +1 -1
- package/dist/esm/runtimes/react/components/RuntimeProvider.js +14 -23
- package/dist/esm/runtimes/react/components/RuntimeProvider.js.map +1 -1
- package/dist/esm/runtimes/react/components/framework-context.js +2 -15
- package/dist/esm/runtimes/react/components/framework-context.js.map +1 -1
- package/dist/esm/runtimes/react/hooks/use-async-effect.js +31 -0
- package/dist/esm/runtimes/react/hooks/use-async-effect.js.map +1 -0
- package/dist/esm/runtimes/react/hooks/use-store.js +2 -8
- package/dist/esm/runtimes/react/hooks/use-store.js.map +1 -1
- package/dist/esm/runtimes/react/host-api-client.js +2 -23
- package/dist/esm/runtimes/react/host-api-client.js.map +1 -1
- package/dist/esm/runtimes/react/index.js +1 -4
- package/dist/esm/runtimes/react/index.js.map +1 -1
- package/dist/esm/runtimes/react/react-runtime-core.js +0 -3
- package/dist/esm/runtimes/react/react-runtime-core.js.map +1 -1
- package/dist/esm/runtimes/react/react-runtime.js +2 -2
- package/dist/esm/runtimes/react/react-runtime.js.map +1 -1
- package/dist/esm/runtimes/react/runtime-core.js +45 -2
- package/dist/esm/runtimes/react/runtime-core.js.map +1 -1
- package/dist/esm/runtimes/react/testing/react-runtime.js +2 -1
- package/dist/esm/runtimes/react/testing/react-runtime.js.map +1 -1
- package/dist/esm/state/actions/internal/read-only-actions.js +13 -1
- package/dist/esm/state/actions/internal/read-only-actions.js.map +1 -1
- package/dist/esm/state/makeswift-api-client.js +32 -18
- package/dist/esm/state/makeswift-api-client.js.map +1 -1
- package/dist/esm/state/middleware/{read-write/makeswift-api-client-sync.js → makeswift-api-client-sync.js} +1 -1
- package/dist/esm/state/middleware/makeswift-api-client-sync.js.map +1 -0
- package/dist/esm/state/middleware/read-write/index.js +16 -0
- package/dist/esm/state/middleware/read-write/index.js.map +1 -0
- package/dist/esm/state/middleware/{prop-controller-handles.js → read-write/prop-controller-handles.js} +8 -8
- package/dist/esm/state/middleware/read-write/prop-controller-handles.js.map +1 -0
- package/dist/esm/state/modules/locale.js +27 -0
- package/dist/esm/state/modules/locale.js.map +1 -0
- package/dist/esm/state/modules/site-version.js +24 -0
- package/dist/esm/state/modules/site-version.js.map +1 -0
- package/dist/esm/state/read-only-state.js +2 -0
- package/dist/esm/state/read-only-state.js.map +1 -1
- package/dist/esm/state/read-write-state.js +7 -1
- package/dist/esm/state/read-write-state.js.map +1 -1
- package/dist/esm/state/store.js +153 -0
- package/dist/esm/state/store.js.map +1 -0
- package/dist/esm/state/unified-state.js +1 -0
- package/dist/esm/state/unified-state.js.map +1 -0
- package/dist/esm/unstable-framework-support/index.js +2 -4
- package/dist/esm/unstable-framework-support/index.js.map +1 -1
- package/dist/esm/utils/deferred.js +15 -0
- package/dist/esm/utils/deferred.js.map +1 -0
- package/dist/types/api/client.d.ts +1 -2
- package/dist/types/api/client.d.ts.map +1 -1
- package/dist/types/api-handler/handlers/webhook/types.d.ts +4 -4
- package/dist/types/api-handler/index.d.ts +1 -3
- package/dist/types/api-handler/index.d.ts.map +1 -1
- package/dist/types/client/index.d.ts +10 -11
- package/dist/types/client/index.d.ts.map +1 -1
- package/dist/types/components/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/types/components/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/dist/types/next/api-handler/index.d.ts +1 -1
- package/dist/types/next/api-handler/index.d.ts.map +1 -1
- package/dist/types/next/components/framework-provider/index.d.ts.map +1 -1
- package/dist/types/next/components/tests/controls/style-control/fixtures.d.ts +1 -1
- package/dist/types/next/components/tests/controls/style-control/fixtures.d.ts.map +1 -1
- package/dist/types/next/index.d.ts +1 -0
- package/dist/types/next/index.d.ts.map +1 -1
- package/dist/types/next/runtime.d.ts +10 -0
- package/dist/types/next/runtime.d.ts.map +1 -0
- package/dist/types/next/tests/test-utils.d.ts.map +1 -1
- package/dist/types/react/index.d.ts +0 -1
- package/dist/types/react/index.d.ts.map +1 -1
- package/dist/types/runtimes/react/components/RuntimeProvider.d.ts +2 -4
- package/dist/types/runtimes/react/components/RuntimeProvider.d.ts.map +1 -1
- package/dist/types/runtimes/react/components/framework-context.d.ts +0 -4
- package/dist/types/runtimes/react/components/framework-context.d.ts.map +1 -1
- package/dist/types/runtimes/react/hooks/__tests__/use-async-effect.test.d.ts +2 -0
- package/dist/types/runtimes/react/hooks/__tests__/use-async-effect.test.d.ts.map +1 -0
- package/dist/types/runtimes/react/hooks/use-async-effect.d.ts +3 -0
- package/dist/types/runtimes/react/hooks/use-async-effect.d.ts.map +1 -0
- package/dist/types/runtimes/react/hooks/use-store.d.ts +1 -26
- package/dist/types/runtimes/react/hooks/use-store.d.ts.map +1 -1
- package/dist/types/runtimes/react/host-api-client.d.ts +0 -5
- package/dist/types/runtimes/react/host-api-client.d.ts.map +1 -1
- package/dist/types/runtimes/react/index.d.ts +1 -2
- package/dist/types/runtimes/react/index.d.ts.map +1 -1
- package/dist/types/runtimes/react/react-runtime-core.d.ts +0 -4
- package/dist/types/runtimes/react/react-runtime-core.d.ts.map +1 -1
- package/dist/types/runtimes/react/react-runtime.d.ts +1 -4
- package/dist/types/runtimes/react/react-runtime.d.ts.map +1 -1
- package/dist/types/runtimes/react/runtime-core.d.ts +20 -3
- package/dist/types/runtimes/react/runtime-core.d.ts.map +1 -1
- package/dist/types/runtimes/react/testing/react-runtime.d.ts.map +1 -1
- package/dist/types/state/__tests__/store.read-write-state.test.d.ts +2 -0
- package/dist/types/state/__tests__/store.read-write-state.test.d.ts.map +1 -0
- package/dist/types/state/__tests__/test-store.d.ts +29 -0
- package/dist/types/state/__tests__/test-store.d.ts.map +1 -0
- package/dist/types/state/actions/index.d.ts +2 -0
- package/dist/types/state/actions/index.d.ts.map +1 -1
- package/dist/types/state/actions/internal/index.d.ts +2 -0
- package/dist/types/state/actions/internal/index.d.ts.map +1 -1
- package/dist/types/state/actions/internal/read-only-actions.d.ts +13 -1
- package/dist/types/state/actions/internal/read-only-actions.d.ts.map +1 -1
- package/dist/types/state/makeswift-api-client.d.ts +11 -2
- package/dist/types/state/makeswift-api-client.d.ts.map +1 -1
- package/dist/types/state/middleware/makeswift-api-client-sync.d.ts +5 -0
- package/dist/types/state/middleware/makeswift-api-client-sync.d.ts.map +1 -0
- package/dist/types/state/middleware/read-write/index.d.ts +5 -0
- package/dist/types/state/middleware/read-write/index.d.ts.map +1 -0
- package/dist/types/state/middleware/{prop-controller-handles.d.ts → read-write/prop-controller-handles.d.ts} +1 -1
- package/dist/types/state/middleware/read-write/prop-controller-handles.d.ts.map +1 -0
- package/dist/types/state/modules/locale.d.ts +6 -0
- package/dist/types/state/modules/locale.d.ts.map +1 -0
- package/dist/types/state/modules/site-version.d.ts +7 -0
- package/dist/types/state/modules/site-version.d.ts.map +1 -0
- package/dist/types/state/read-only-state.d.ts +3 -0
- package/dist/types/state/read-only-state.d.ts.map +1 -1
- package/dist/types/state/read-write-state.d.ts +5 -1
- package/dist/types/state/read-write-state.d.ts.map +1 -1
- package/dist/types/state/{react-page.d.ts → store.d.ts} +25 -6
- package/dist/types/state/store.d.ts.map +1 -0
- package/dist/types/state/unified-state.d.ts +9 -0
- package/dist/types/state/unified-state.d.ts.map +1 -0
- package/dist/types/unstable-framework-support/index.d.ts +2 -1
- package/dist/types/unstable-framework-support/index.d.ts.map +1 -1
- package/dist/types/utils/deferred.d.ts +7 -0
- package/dist/types/utils/deferred.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/cjs/runtimes/react/components/LiveProvider.js +0 -50
- package/dist/cjs/runtimes/react/components/LiveProvider.js.map +0 -1
- package/dist/cjs/runtimes/react/components/PreviewProvider.js +0 -63
- package/dist/cjs/runtimes/react/components/PreviewProvider.js.map +0 -1
- package/dist/cjs/state/middleware/prop-controller-handles.js.map +0 -1
- package/dist/cjs/state/middleware/read-write/makeswift-api-client-sync.js.map +0 -1
- package/dist/cjs/state/mixins/setup-teardown.js.map +0 -1
- package/dist/cjs/state/react-builder-preview.js +0 -96
- package/dist/cjs/state/react-builder-preview.js.map +0 -1
- package/dist/cjs/state/react-page.js +0 -69
- package/dist/cjs/state/react-page.js.map +0 -1
- package/dist/esm/runtimes/react/components/LiveProvider.js +0 -20
- package/dist/esm/runtimes/react/components/LiveProvider.js.map +0 -1
- package/dist/esm/runtimes/react/components/PreviewProvider.js +0 -33
- package/dist/esm/runtimes/react/components/PreviewProvider.js.map +0 -1
- package/dist/esm/state/middleware/prop-controller-handles.js.map +0 -1
- package/dist/esm/state/middleware/read-write/makeswift-api-client-sync.js.map +0 -1
- package/dist/esm/state/mixins/setup-teardown.js +0 -11
- package/dist/esm/state/mixins/setup-teardown.js.map +0 -1
- package/dist/esm/state/react-builder-preview.js +0 -62
- package/dist/esm/state/react-builder-preview.js.map +0 -1
- package/dist/esm/state/react-page.js +0 -35
- package/dist/esm/state/react-page.js.map +0 -1
- package/dist/types/runtimes/react/components/LiveProvider.d.ts +0 -3
- package/dist/types/runtimes/react/components/LiveProvider.d.ts.map +0 -1
- package/dist/types/runtimes/react/components/PreviewProvider.d.ts +0 -5
- package/dist/types/runtimes/react/components/PreviewProvider.d.ts.map +0 -1
- package/dist/types/state/middleware/prop-controller-handles.d.ts.map +0 -1
- package/dist/types/state/middleware/read-write/makeswift-api-client-sync.d.ts +0 -5
- package/dist/types/state/middleware/read-write/makeswift-api-client-sync.d.ts.map +0 -1
- package/dist/types/state/mixins/setup-teardown.d.ts +0 -7
- package/dist/types/state/mixins/setup-teardown.d.ts.map +0 -1
- package/dist/types/state/react-builder-preview.d.ts +0 -41
- package/dist/types/state/react-builder-preview.d.ts.map +0 -1
- package/dist/types/state/react-page.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/state/middleware/read-write/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAO9D,wBAAgB,yBAAyB,CAAC,EAAE,YAAY,EAAE,EAAE;IAAE,YAAY,EAAE,eAAe,CAAA;CAAE,yKAO5F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type Middleware } from '@reduxjs/toolkit';
|
|
2
|
-
import { type State, type Dispatch } from '
|
|
2
|
+
import { type State, type Dispatch } from '../../read-write-state';
|
|
3
3
|
export declare function propControllerHandlesMiddleware(): Middleware<Dispatch, State, Dispatch>;
|
|
4
4
|
//# sourceMappingURL=prop-controller-handles.d.ts.map
|
|
@@ -0,0 +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;AAmBpE,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAkClE,wBAAgB,+BAA+B,IAAI,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CAsDvF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Action, type UnknownAction } from '../actions';
|
|
2
|
+
export type State = string | null;
|
|
3
|
+
export declare function getInitialState(locale?: string | null): State;
|
|
4
|
+
export declare function getLocale(state: State): string | null;
|
|
5
|
+
export declare function reducer(state: State | undefined, action: Action | UnknownAction): State;
|
|
6
|
+
//# sourceMappingURL=locale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAiB,MAAM,YAAY,CAAA;AAI3E,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,IAAI,CAAA;AAEjC,wBAAgB,eAAe,CAAC,MAAM,GAAE,MAAM,GAAG,IAAW,GAAG,KAAK,CAEnE;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAErD;AAED,wBAAgB,OAAO,CAAC,KAAK,mBAAoB,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,CAaxF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SiteVersion } from '../../api/site-version';
|
|
2
|
+
import { type Action, type UnknownAction } from '../actions';
|
|
3
|
+
export type State = SiteVersion | null;
|
|
4
|
+
export declare function getInitialState(siteVersion?: SiteVersion | null): State;
|
|
5
|
+
export declare function getSiteVersion(state: State): SiteVersion | null;
|
|
6
|
+
export declare function reducer(state: State | undefined, action: Action | UnknownAction): State;
|
|
7
|
+
//# sourceMappingURL=site-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-version.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/site-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAiB,MAAM,YAAY,CAAA;AAG3E,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,IAAI,CAAA;AAEtC,wBAAgB,eAAe,CAAC,WAAW,GAAE,WAAW,GAAG,IAAW,GAAG,KAAK,CAE7E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,GAAG,IAAI,CAE/D;AAED,wBAAgB,OAAO,CAAC,KAAK,mBAAoB,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,CAUxF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ThunkDispatch } from '@reduxjs/toolkit';
|
|
2
|
+
import * as SiteVersion from './modules/site-version';
|
|
2
3
|
import * as Documents from './modules/read-only-documents';
|
|
3
4
|
import * as ElementTrees from './modules/element-trees';
|
|
4
5
|
import * as ReactComponents from './modules/react-components';
|
|
@@ -16,6 +17,7 @@ export type { ComponentType } from './modules/react-components';
|
|
|
16
17
|
export type { ComponentMeta } from './modules/components-meta';
|
|
17
18
|
export declare const reducers: {
|
|
18
19
|
isReadOnly: typeof IsReadOnly.reducer;
|
|
20
|
+
siteVersion: typeof SiteVersion.reducer;
|
|
19
21
|
documents: typeof Documents.reducer;
|
|
20
22
|
elementTrees: typeof ElementTrees.reducer;
|
|
21
23
|
reactComponents: typeof ReactComponents.reducer;
|
|
@@ -28,6 +30,7 @@ export declare const reducers: {
|
|
|
28
30
|
};
|
|
29
31
|
export type State = {
|
|
30
32
|
isReadOnly: IsReadOnly.State;
|
|
33
|
+
siteVersion: SiteVersion.State;
|
|
31
34
|
documents: Documents.State;
|
|
32
35
|
elementTrees: ElementTrees.State;
|
|
33
36
|
reactComponents: ReactComponents.State;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-only-state.d.ts","sourceRoot":"","sources":["../../../src/state/read-only-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAIrD,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAC1D,OAAO,KA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B,CAC/B,KAAK,EAAE,KAAK,EACZ,EACE,WAAW,EACX,UAAU,EACV,QAAQ,GACT,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;8BAQjE;AAED;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,EAKlE,CAAA;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,SAAS,CAAC,OAAO,GAAG,IAAI,CAE1B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEjG;AAED,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAMjE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAEpD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAEnD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe,CAAC,KAAK,CAEtE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,KAAK,CAE9D"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type ThunkDispatch } from '@reduxjs/toolkit';
|
|
1
|
+
import { type ThunkAction, type ThunkDispatch } from '@reduxjs/toolkit';
|
|
2
2
|
import * as Documents from './modules/read-write/read-write-documents';
|
|
3
3
|
import * as BoxModels from './modules/read-write/box-models';
|
|
4
4
|
import * as Pointer from './modules/read-write/pointer';
|
|
5
5
|
import * as ElementImperativeHandles from './modules/read-write/element-imperative-handles';
|
|
6
6
|
import { type Action } from './actions';
|
|
7
7
|
import { ElementImperativeHandle } from '../runtimes/react/element-imperative-handle';
|
|
8
|
+
import { BuilderAPIProxy } from './builder-api/proxy';
|
|
8
9
|
import * as ReadOnlyState from './read-only-state';
|
|
9
10
|
export type { Operation } from './modules/read-write/read-write-documents';
|
|
10
11
|
export type { BoxModelHandle } from './modules/read-write/box-models';
|
|
@@ -15,6 +16,7 @@ export declare function createRootReducer(): import("@reduxjs/toolkit").Reducer<
|
|
|
15
16
|
pointer: Pointer.State;
|
|
16
17
|
elementImperativeHandles: ElementImperativeHandles.State;
|
|
17
18
|
isReadOnly: boolean;
|
|
19
|
+
siteVersion: import("./modules/site-version").State;
|
|
18
20
|
elementTrees: import("./modules/element-trees").State;
|
|
19
21
|
reactComponents: import("./modules/react-components").State;
|
|
20
22
|
componentsMeta: import("./modules/components-meta").State;
|
|
@@ -29,6 +31,7 @@ export declare function createRootReducer(): import("@reduxjs/toolkit").Reducer<
|
|
|
29
31
|
pointer: Pointer.State | undefined;
|
|
30
32
|
elementImperativeHandles: ElementImperativeHandles.State | undefined;
|
|
31
33
|
isReadOnly: boolean | undefined;
|
|
34
|
+
siteVersion: import("./modules/site-version").State | undefined;
|
|
32
35
|
elementTrees: import("./modules/element-trees").State | undefined;
|
|
33
36
|
reactComponents: import("./modules/react-components").State | undefined;
|
|
34
37
|
componentsMeta: import("./modules/components-meta").State | undefined;
|
|
@@ -53,4 +56,5 @@ export declare function getBoxModel(state: State, documentKey: string, elementKe
|
|
|
53
56
|
export declare function getPointer(state: State): Pointer.Point | null;
|
|
54
57
|
export declare function getElementImperativeHandles(state: State): Map<string, Map<string, ElementImperativeHandle>>;
|
|
55
58
|
export declare function getElementImperativeHandlesContainingElement(state: State, element: Element): Map<string, Map<string, ElementImperativeHandle>>;
|
|
59
|
+
export declare function setupBuilderProxy(builderProxy: BuilderAPIProxy): ThunkAction<void, State, unknown, Action>;
|
|
56
60
|
//# sourceMappingURL=read-write-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-write-state.d.ts","sourceRoot":"","sources":["../../../src/state/read-write-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"read-write-state.d.ts","sourceRoot":"","sources":["../../../src/state/read-write-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAExF,OAAO,KAAK,SAAS,MAAM,2CAA2C,CAAA;AACtE,OAAO,KAAK,SAAS,MAAM,iCAAiC,CAAA;AAC5D,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAA;AACvD,OAAO,KAAK,wBAAwB,MAAM,iDAAiD,CAAA;AAE3F,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAA;AAErF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAA;AAElD,YAAY,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAA;AAC1E,YAAY,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AAU1E,wBAAgB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhC;AAED,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG;IAC3D,SAAS,EAAE,SAAS,CAAC,KAAK,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAC,KAAK,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAC,K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I3C"}
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
+
import { type Middleware, type StoreEnhancer } from '@reduxjs/toolkit';
|
|
2
|
+
import { MakeswiftHostApiClient } from '../api/client';
|
|
1
3
|
import * as Breakpoints from './modules/breakpoints';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
+
import { type Action } from './actions';
|
|
5
|
+
import * as ReadOnlyState from './read-only-state';
|
|
6
|
+
import { type State, type Dispatch } from './unified-state';
|
|
7
|
+
type ReadWriteMiddleware = ReturnType<typeof import('./middleware/read-write').createReadWriteMiddleware>;
|
|
8
|
+
type ReadWriteMiddlewareRef = {
|
|
9
|
+
current: ReadWriteMiddleware | null;
|
|
10
|
+
};
|
|
11
|
+
export declare function conditionalReadWriteMiddleware(middlewareRef: ReadWriteMiddlewareRef): Middleware<Dispatch, State, Dispatch>;
|
|
12
|
+
interface ReadWriteStateMixin {
|
|
13
|
+
loadReadWriteState: ({ isReadOnly }: {
|
|
14
|
+
isReadOnly: boolean;
|
|
15
|
+
}) => Promise<() => void>;
|
|
16
|
+
}
|
|
17
|
+
export declare function configureStore({ name, appOrigin, hostApiClient, preloadedState, breakpoints, }: {
|
|
4
18
|
name: string;
|
|
19
|
+
appOrigin: string;
|
|
20
|
+
hostApiClient: MakeswiftHostApiClient;
|
|
5
21
|
preloadedState: Partial<State> | null;
|
|
6
22
|
breakpoints?: Breakpoints.State;
|
|
7
23
|
}): import("@reduxjs/toolkit").EnhancedStore<{
|
|
8
24
|
isReadOnly: boolean;
|
|
25
|
+
siteVersion: import("./modules/site-version").State;
|
|
9
26
|
documents: import("./modules/read-only-documents").State;
|
|
10
27
|
elementTrees: import("./modules/element-trees").State;
|
|
11
28
|
reactComponents: import("./modules/react-components").State;
|
|
@@ -15,9 +32,10 @@ export declare function configureStore({ name, preloadedState, breakpoints, }: {
|
|
|
15
32
|
isInBuilder: boolean;
|
|
16
33
|
builderEditMode: import("./modules/builder-edit-mode").State;
|
|
17
34
|
breakpoints: Breakpoints.Breakpoints;
|
|
18
|
-
},
|
|
35
|
+
}, Action | import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[StoreEnhancer<{
|
|
19
36
|
dispatch: import("@reduxjs/toolkit").ThunkDispatch<{
|
|
20
37
|
isReadOnly: boolean;
|
|
38
|
+
siteVersion: import("./modules/site-version").State;
|
|
21
39
|
documents: import("./modules/read-only-documents").State;
|
|
22
40
|
elementTrees: import("./modules/element-trees").State;
|
|
23
41
|
reactComponents: import("./modules/react-components").State;
|
|
@@ -27,7 +45,8 @@ export declare function configureStore({ name, preloadedState, breakpoints, }: {
|
|
|
27
45
|
isInBuilder: boolean;
|
|
28
46
|
builderEditMode: import("./modules/builder-edit-mode").State;
|
|
29
47
|
breakpoints: Breakpoints.Breakpoints;
|
|
30
|
-
}, undefined, import("@reduxjs/toolkit").UnknownAction> &
|
|
31
|
-
}>,
|
|
48
|
+
}, undefined, import("@reduxjs/toolkit").UnknownAction> & ReadOnlyState.Dispatch & Dispatch;
|
|
49
|
+
}>, StoreEnhancer<ReadWriteStateMixin>]>>;
|
|
32
50
|
export type Store = ReturnType<typeof configureStore>;
|
|
33
|
-
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/state/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,aAAa,EAKnB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAMtD,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAA;AAIpD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAA;AAElD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,QAAQ,EAGd,MAAM,iBAAiB,CAAA;AAGxB,KAAK,mBAAmB,GAAG,UAAU,CACnC,cAAc,yBAAyB,EAAE,yBAAyB,CACnE,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;CACpC,CAAA;AAED,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,sBAAsB,GACpC,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CAyDvC;AAED,UAAU,mBAAmB;IAC3B,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,IAAI,CAAC,CAAA;CACrF;AAWD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,SAAS,EACT,aAAa,EACb,cAAc,EACd,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,sBAAsB,CAAA;IACrC,cAAc,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAA;IACrC,WAAW,CAAC,EAAE,WAAW,CAAC,KAAK,CAAA;CAChC;;;;;;;;;;;;;;;;;;;;;;;;;;0CAmHA;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ThunkDispatch, type Reducer } from '@reduxjs/toolkit';
|
|
2
|
+
import { type State as ReadOnlyState } from './read-only-state';
|
|
3
|
+
import { type State as ReadWriteState } from './read-write-state';
|
|
4
|
+
import { type Action } from './actions';
|
|
5
|
+
export type State = ReadOnlyState | ReadWriteState;
|
|
6
|
+
export type Dispatch = ThunkDispatch<State, unknown, Action>;
|
|
7
|
+
export type ReadOnlyReducer = Reducer<ReadOnlyState>;
|
|
8
|
+
export type ReadWriteDispatch = ThunkDispatch<ReadWriteState, unknown, Action>;
|
|
9
|
+
//# sourceMappingURL=unified-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unified-state.d.ts","sourceRoot":"","sources":["../../../src/state/unified-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAEnE,OAAO,EAAE,KAAK,KAAK,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,KAAK,KAAK,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC,MAAM,MAAM,KAAK,GAAG,aAAa,GAAG,cAAc,CAAA;AAClD,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AAC5D,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;AACpD,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,cAAc,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA"}
|
|
@@ -5,7 +5,8 @@ export { REDIRECT_SEARCH_PARAM, redirectLiveHandler } from '../api-handler/handl
|
|
|
5
5
|
export { toApiRequest, pipeResponseTo } from '../api-handler/node-request-response';
|
|
6
6
|
export { MAKESWIFT_SITE_VERSION_COOKIE, SearchParams } from '../api-handler/preview';
|
|
7
7
|
export { MakeswiftClient } from '../client';
|
|
8
|
-
export {
|
|
8
|
+
export { type BreakpointsInput as Breakpoints } from '../state/modules/breakpoints';
|
|
9
|
+
export { FrameworkContext, DefaultHead, DefaultHeadSnippet, DefaultImage, } from '../runtimes/react/components/framework-context';
|
|
9
10
|
export { MakeswiftComponent } from '../runtimes/react/components/MakeswiftComponent';
|
|
10
11
|
export { Page } from '../runtimes/react/components/page';
|
|
11
12
|
export { RuntimeProvider } from '../runtimes/react/components/RuntimeProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/unstable-framework-support/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,KAAK,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAChF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAClG,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AACnF,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/unstable-framework-support/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,KAAK,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAChF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAClG,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AACnF,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,OAAO,EAAE,KAAK,gBAAgB,IAAI,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAEnF,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,YAAY,GACb,MAAM,gDAAgD,CAAA;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAA;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAA;AAExD,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,KAAK,cAAc,GACpB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deferred.d.ts","sourceRoot":"","sources":["../../../src/utils/deferred.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;IACxB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACnB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;IAC3B,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CACnC,CAAA;AAED,wBAAgB,cAAc,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAU/C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makeswift/runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0-canary.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "makeswift/makeswift",
|
|
@@ -232,8 +232,8 @@
|
|
|
232
232
|
"use-sync-external-store": "^1.5.0",
|
|
233
233
|
"uuid": "^9.0.0",
|
|
234
234
|
"zod": "^3.21.4",
|
|
235
|
-
"@makeswift/controls": "0.1.16",
|
|
236
235
|
"@makeswift/next-plugin": "0.6.1",
|
|
236
|
+
"@makeswift/controls": "0.1.16",
|
|
237
237
|
"@makeswift/prop-controllers": "0.4.10"
|
|
238
238
|
},
|
|
239
239
|
"devDependencies": {
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var LiveProvider_exports = {};
|
|
30
|
-
__export(LiveProvider_exports, {
|
|
31
|
-
default: () => LiveProvider
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(LiveProvider_exports);
|
|
34
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var import_react = require("react");
|
|
36
|
-
var ReactPage = __toESM(require("../../../state/react-page"));
|
|
37
|
-
var import_use_react_runtime = require("../hooks/use-react-runtime");
|
|
38
|
-
var import_use_store = require("../hooks/use-store");
|
|
39
|
-
function LiveProvider({ children }) {
|
|
40
|
-
const runtime = (0, import_use_react_runtime.useReactRuntime)();
|
|
41
|
-
const store = (0, import_react.useMemo)(
|
|
42
|
-
() => ReactPage.configureStore({
|
|
43
|
-
name: "Host store",
|
|
44
|
-
preloadedState: runtime.store.getState()
|
|
45
|
-
}),
|
|
46
|
-
[runtime]
|
|
47
|
-
);
|
|
48
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_use_store.StoreContext.Provider, { value: store, children });
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=LiveProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/runtimes/react/components/LiveProvider.tsx"],"sourcesContent":["import { type PropsWithChildren, useMemo, ReactNode } from 'react'\n\nimport * as ReactPage from '../../../state/react-page'\n\nimport { useReactRuntime } from '../hooks/use-react-runtime'\nimport { StoreContext } from '../hooks/use-store'\n\nexport default function LiveProvider({ children }: PropsWithChildren): ReactNode {\n const runtime = useReactRuntime()\n const store = useMemo(\n () =>\n ReactPage.configureStore({\n name: 'Host store',\n preloadedState: runtime.store.getState(),\n }),\n [runtime],\n )\n\n return <StoreContext.Provider value={store}>{children}</StoreContext.Provider>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBS;AAlBT,mBAA2D;AAE3D,gBAA2B;AAE3B,+BAAgC;AAChC,uBAA6B;AAEd,SAAR,aAA8B,EAAE,SAAS,GAAiC;AAC/E,QAAM,cAAU,0CAAgB;AAChC,QAAM,YAAQ;AAAA,IACZ,MACE,UAAU,eAAe;AAAA,MACvB,MAAM;AAAA,MACN,gBAAgB,QAAQ,MAAM,SAAS;AAAA,IACzC,CAAC;AAAA,IACH,CAAC,OAAO;AAAA,EACV;AAEA,SAAO,4CAAC,8BAAa,UAAb,EAAsB,OAAO,OAAQ,UAAS;AACxD;","names":[]}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
var PreviewProvider_exports = {};
|
|
31
|
-
__export(PreviewProvider_exports, {
|
|
32
|
-
default: () => PreviewProvider
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(PreviewProvider_exports);
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var import_react = require("react");
|
|
37
|
-
var ReactBuilderPreview = __toESM(require("../../../state/react-builder-preview"));
|
|
38
|
-
var import_proxy = require("../../../state/builder-api/proxy");
|
|
39
|
-
var import_use_react_runtime = require("../hooks/use-react-runtime");
|
|
40
|
-
var import_use_store = require("../hooks/use-store");
|
|
41
|
-
var import_host_api_client = require("../host-api-client");
|
|
42
|
-
function PreviewProvider({
|
|
43
|
-
appOrigin,
|
|
44
|
-
children
|
|
45
|
-
}) {
|
|
46
|
-
const runtime = (0, import_use_react_runtime.useReactRuntime)();
|
|
47
|
-
const client = (0, import_host_api_client.useMakeswiftHostApiClient)();
|
|
48
|
-
const builderProxy = (0, import_react.useMemo)(() => new import_proxy.BuilderAPIProxy({ appOrigin }), [appOrigin]);
|
|
49
|
-
const store = (0, import_react.useMemo)(
|
|
50
|
-
() => ReactBuilderPreview.configureStore({
|
|
51
|
-
preloadedState: runtime.store.getState(),
|
|
52
|
-
client,
|
|
53
|
-
builderProxy
|
|
54
|
-
}),
|
|
55
|
-
[runtime, client, builderProxy]
|
|
56
|
-
);
|
|
57
|
-
(0, import_react.useEffect)(() => {
|
|
58
|
-
store.setup();
|
|
59
|
-
return () => store.teardown();
|
|
60
|
-
}, [store]);
|
|
61
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_use_store.StoreContext.Provider, { value: store, children });
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=PreviewProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/runtimes/react/components/PreviewProvider.tsx"],"sourcesContent":["'use client'\n\nimport { type PropsWithChildren, useEffect, useMemo, ReactNode } from 'react'\n\nimport * as ReactBuilderPreview from '../../../state/react-builder-preview'\nimport { BuilderAPIProxy } from '../../../state/builder-api/proxy'\n\nimport { useReactRuntime } from '../hooks/use-react-runtime'\nimport { StoreContext } from '../hooks/use-store'\nimport { useMakeswiftHostApiClient } from '../host-api-client'\n\nexport default function PreviewProvider({\n appOrigin,\n children,\n}: PropsWithChildren<{ appOrigin: string }>): ReactNode {\n const runtime = useReactRuntime()\n const client = useMakeswiftHostApiClient()\n const builderProxy = useMemo(() => new BuilderAPIProxy({ appOrigin }), [appOrigin])\n\n const store = useMemo(\n () =>\n ReactBuilderPreview.configureStore({\n preloadedState: runtime.store.getState(),\n client,\n builderProxy,\n }),\n [runtime, client, builderProxy],\n )\n\n useEffect(() => {\n store.setup()\n return () => store.teardown()\n }, [store])\n\n return <StoreContext.Provider value={store}>{children}</StoreContext.Provider>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCS;AAhCT,mBAAsE;AAEtE,0BAAqC;AACrC,mBAAgC;AAEhC,+BAAgC;AAChC,uBAA6B;AAC7B,6BAA0C;AAE3B,SAAR,gBAAiC;AAAA,EACtC;AAAA,EACA;AACF,GAAwD;AACtD,QAAM,cAAU,0CAAgB;AAChC,QAAM,aAAS,kDAA0B;AACzC,QAAM,mBAAe,sBAAQ,MAAM,IAAI,6BAAgB,EAAE,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC;AAElF,QAAM,YAAQ;AAAA,IACZ,MACE,oBAAoB,eAAe;AAAA,MACjC,gBAAgB,QAAQ,MAAM,SAAS;AAAA,MACvC;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACH,CAAC,SAAS,QAAQ,YAAY;AAAA,EAChC;AAEA,8BAAU,MAAM;AACd,UAAM,MAAM;AACZ,WAAO,MAAM,MAAM,SAAS;AAAA,EAC9B,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO,4CAAC,8BAAa,UAAb,EAAsB,OAAO,OAAQ,UAAS;AACxD;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/state/middleware/prop-controller-handles.ts"],"sourcesContent":["import { type Middleware, type ThunkAction } from '@reduxjs/toolkit'\n\nimport { ControlInstance } from '@makeswift/controls'\n\nimport * as PropControllerHandles from '../modules/prop-controller-handles'\n\nimport { type Action } from '../actions'\n\nimport * as Builder from '../builder-api/actions'\n\nimport { ReadOnlyActionTypes } from '../actions/internal/read-only-actions'\nimport * as ReadOnly from '../actions/internal/read-only-actions'\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 { type State, type Dispatch } from '../read-write-state'\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(descriptor, 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(ReadOnly.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 ReadOnlyActionTypes.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 PropControllerHandles.isPropControllersHandle(componentHandle)\n ) {\n dispatch(\n ReadOnly.registerPropControllersHandle(documentKey, elementKey, componentHandle),\n )\n componentHandle.setPropControllers(propControllers)\n }\n\n break\n }\n\n case ReadOnlyActionTypes.UNREGISTER_COMPONENT_HANDLE: {\n const { documentKey, elementKey } = action.payload\n const handle = ReadOnlyState.getPropControllersHandle(getState(), {\n documentKey,\n elementKey,\n })\n\n handle?.setPropControllers(null)\n\n dispatch(ReadOnly.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 = ReadOnlyState.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,4BAAuC;AAIvC,cAAyB;AAEzB,+BAAoC;AACpC,eAA0B;AAE1B,IAAAA,kBAAiC;AAEjC,uBAAqC;AACrC,sBAAgC;AAEhC,oBAA+B;AAG/B,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;AAAA,UAAqB;AAAA,UAAY,aACtD;AAAA,YACE,QAAQ,6BAA6B,aAAa,YAAY,UA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AAO;AAAA,QACjD;AAAA,MACF;AAEA,aAAO,KAAK,MAAM;AAAA,IACpB;AAAA,EACF,CAAC;AACH;","names":["import_toolkit"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/state/middleware/read-write/makeswift-api-client-sync.ts"],"sourcesContent":["import { type Middleware } from '@reduxjs/toolkit'\n\nimport { MakeswiftHostApiClient } from '../../../api/client'\n\nimport { type Action } from '../../actions'\nimport { actionMiddleware } from '../../toolkit'\nimport { type State, type Dispatch } from '../../read-write-state'\n\nexport function makeswiftApiClientSyncMiddleware(\n client: MakeswiftHostApiClient,\n): Middleware<Dispatch, State, Dispatch> {\n return actionMiddleware(() => next => {\n return (action: Action) => {\n client.makeswiftApiClient.dispatch(action)\n\n return next(action)\n }\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,IAAAA,kBAAiC;AAG1B,SAAS,iCACd,QACuC;AACvC,aAAO,kCAAiB,MAAM,UAAQ;AACpC,WAAO,CAAC,WAAmB;AACzB,aAAO,mBAAmB,SAAS,MAAM;AAEzC,aAAO,KAAK,MAAM;AAAA,IACpB;AAAA,EACF,CAAC;AACH;","names":["import_toolkit"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/state/mixins/setup-teardown.ts"],"sourcesContent":["import { type StoreEnhancer } from '@reduxjs/toolkit'\n\nexport interface SetupTeardownMixin {\n setup: () => void\n teardown: () => void\n}\n\nexport function withSetupTeardown(\n setup: () => void,\n teardown: () => void,\n): StoreEnhancer<SetupTeardownMixin> {\n return next => (reducer, preloadedState?) => ({\n ...next(reducer, preloadedState),\n setup,\n teardown,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,SAAS,kBACd,OACA,UACmC;AACnC,SAAO,UAAQ,CAAC,SAAS,oBAAqB;AAAA,IAC5C,GAAG,KAAK,SAAS,cAAc;AAAA,IAC/B;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var react_builder_preview_exports = {};
|
|
30
|
-
__export(react_builder_preview_exports, {
|
|
31
|
-
configureStore: () => configureStore
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(react_builder_preview_exports);
|
|
34
|
-
var import_toolkit = require("@reduxjs/toolkit");
|
|
35
|
-
var import_setup_teardown = require("./mixins/setup-teardown");
|
|
36
|
-
var import_actions2 = require("./builder-api/actions");
|
|
37
|
-
var import_toolkit2 = require("./toolkit");
|
|
38
|
-
var import_host_api = require("./host-api");
|
|
39
|
-
var import_read_write_state = require("./read-write-state");
|
|
40
|
-
var IsReadOnly = __toESM(require("./modules/is-read-only"));
|
|
41
|
-
var import_prop_controller_handles = require("./middleware/prop-controller-handles");
|
|
42
|
-
var import_read_only_element_tree = require("./middleware/read-only-element-tree");
|
|
43
|
-
var import_update_element_tree = require("./middleware/read-write/update-element-tree");
|
|
44
|
-
var import_measure_box_models = require("./middleware/read-write/measure-box-models");
|
|
45
|
-
var import_builder_api = require("./middleware/read-write/builder-api");
|
|
46
|
-
var import_makeswift_api_client_sync = require("./middleware/read-write/makeswift-api-client-sync");
|
|
47
|
-
function setupBuilderProxy(builderProxy) {
|
|
48
|
-
return (dispatch) => {
|
|
49
|
-
builderProxy.setup({ onHostAction: (action) => dispatch(action) });
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function configureStore({
|
|
53
|
-
preloadedState,
|
|
54
|
-
client,
|
|
55
|
-
builderProxy
|
|
56
|
-
}) {
|
|
57
|
-
const initialState = {
|
|
58
|
-
...preloadedState,
|
|
59
|
-
isReadOnly: IsReadOnly.getInitialState(false)
|
|
60
|
-
};
|
|
61
|
-
const store = (0, import_toolkit.configureStore)({
|
|
62
|
-
reducer: (0, import_read_write_state.createRootReducer)(),
|
|
63
|
-
preloadedState: initialState,
|
|
64
|
-
middleware: (getDefaultMiddleware) => getDefaultMiddleware(import_toolkit2.middlewareOptions).concat(
|
|
65
|
-
(0, import_read_only_element_tree.readOnlyElementTreeMiddleware)(),
|
|
66
|
-
(0, import_update_element_tree.updateElementTreeMiddleware)(),
|
|
67
|
-
(0, import_measure_box_models.measureBoxModelsMiddleware)(),
|
|
68
|
-
(0, import_builder_api.builderAPIMiddleware)(builderProxy),
|
|
69
|
-
(0, import_prop_controller_handles.propControllerHandlesMiddleware)(),
|
|
70
|
-
(0, import_makeswift_api_client_sync.makeswiftApiClientSyncMiddleware)(client)
|
|
71
|
-
),
|
|
72
|
-
enhancers: (getDefaultEnhancers) => getDefaultEnhancers().concat(
|
|
73
|
-
(0, import_setup_teardown.withSetupTeardown)(
|
|
74
|
-
() => {
|
|
75
|
-
const dispatch = store.dispatch;
|
|
76
|
-
dispatch(setupBuilderProxy(builderProxy));
|
|
77
|
-
},
|
|
78
|
-
() => builderProxy.teardown()
|
|
79
|
-
)
|
|
80
|
-
),
|
|
81
|
-
devTools: (0, import_toolkit2.devToolsConfig)({
|
|
82
|
-
name: `Host store (${(/* @__PURE__ */ new Date()).toISOString()})`,
|
|
83
|
-
actionsDenylist: [
|
|
84
|
-
import_host_api.HostActionTypes.BUILDER_POINTER_MOVE,
|
|
85
|
-
import_actions2.BuilderActionTypes.HANDLE_POINTER_MOVE,
|
|
86
|
-
import_actions2.BuilderActionTypes.ELEMENT_FROM_POINT_CHANGE
|
|
87
|
-
]
|
|
88
|
-
})
|
|
89
|
-
});
|
|
90
|
-
return store;
|
|
91
|
-
}
|
|
92
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
-
0 && (module.exports = {
|
|
94
|
-
configureStore
|
|
95
|
-
});
|
|
96
|
-
//# sourceMappingURL=react-builder-preview.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/state/react-builder-preview.ts"],"sourcesContent":["import { configureStore as configureReduxStore, type ThunkAction } from '@reduxjs/toolkit'\n\nimport { withSetupTeardown } from './mixins/setup-teardown'\n\nimport { type Action } from './actions'\n\nimport { BuilderActionTypes } from './builder-api/actions'\nimport { middlewareOptions, devToolsConfig } from './toolkit'\n\nimport { MakeswiftHostApiClient } from '../api/client'\nimport { type BuilderAPIProxy } from './builder-api/proxy'\nimport { HostActionTypes } from './host-api'\n\nimport { type State, type Dispatch, createRootReducer } from './read-write-state'\nimport * as IsReadOnly from './modules/is-read-only'\n\nimport { propControllerHandlesMiddleware } from './middleware/prop-controller-handles'\nimport { readOnlyElementTreeMiddleware } from './middleware/read-only-element-tree'\n\nimport { updateElementTreeMiddleware } from './middleware/read-write/update-element-tree'\nimport { measureBoxModelsMiddleware } from './middleware/read-write/measure-box-models'\nimport { builderAPIMiddleware } from './middleware/read-write/builder-api'\nimport { makeswiftApiClientSyncMiddleware } from './middleware/read-write/makeswift-api-client-sync'\n\nfunction setupBuilderProxy(\n builderProxy: BuilderAPIProxy,\n): ThunkAction<void, State, unknown, Action> {\n return dispatch => {\n builderProxy.setup({ onHostAction: action => dispatch(action) })\n }\n}\n\nexport function configureStore({\n preloadedState,\n client,\n builderProxy,\n}: {\n preloadedState: Partial<State>\n client: MakeswiftHostApiClient\n builderProxy: BuilderAPIProxy\n}) {\n const initialState: Partial<State> = {\n ...preloadedState,\n isReadOnly: IsReadOnly.getInitialState(false),\n }\n\n const store = configureReduxStore({\n reducer: createRootReducer(),\n preloadedState: initialState,\n\n middleware: getDefaultMiddleware =>\n getDefaultMiddleware(middlewareOptions).concat(\n readOnlyElementTreeMiddleware(),\n updateElementTreeMiddleware(),\n measureBoxModelsMiddleware(),\n builderAPIMiddleware(builderProxy),\n propControllerHandlesMiddleware(),\n makeswiftApiClientSyncMiddleware(client),\n ),\n\n enhancers: getDefaultEnhancers =>\n getDefaultEnhancers().concat(\n withSetupTeardown(\n () => {\n const dispatch = store.dispatch as Dispatch\n dispatch(setupBuilderProxy(builderProxy))\n },\n () => builderProxy.teardown(),\n ),\n ),\n\n devTools: devToolsConfig({\n name: `Host store (${new Date().toISOString()})`,\n actionsDenylist: [\n HostActionTypes.BUILDER_POINTER_MOVE,\n BuilderActionTypes.HANDLE_POINTER_MOVE,\n BuilderActionTypes.ELEMENT_FROM_POINT_CHANGE,\n ],\n }),\n })\n\n return store\n}\n\nexport type Store = ReturnType<typeof configureStore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A,EACH,CAAC;AAED,SAAO;AACT;","names":["import_actions","import_toolkit","configureReduxStore"]}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var react_page_exports = {};
|
|
30
|
-
__export(react_page_exports, {
|
|
31
|
-
configureStore: () => configureStore
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(react_page_exports);
|
|
34
|
-
var import_toolkit = require("@reduxjs/toolkit");
|
|
35
|
-
var Breakpoints = __toESM(require("./modules/breakpoints"));
|
|
36
|
-
var import_toolkit2 = require("./toolkit");
|
|
37
|
-
var import_setup_teardown = require("./mixins/setup-teardown");
|
|
38
|
-
var import_read_only_element_tree = require("./middleware/read-only-element-tree");
|
|
39
|
-
var import_read_only_state = require("./read-only-state");
|
|
40
|
-
function configureStore({
|
|
41
|
-
name,
|
|
42
|
-
preloadedState,
|
|
43
|
-
breakpoints
|
|
44
|
-
}) {
|
|
45
|
-
return (0, import_toolkit.configureStore)({
|
|
46
|
-
reducer: (0, import_toolkit.combineReducers)(import_read_only_state.reducers),
|
|
47
|
-
preloadedState: {
|
|
48
|
-
...preloadedState,
|
|
49
|
-
breakpoints: Breakpoints.getInitialState(breakpoints ?? preloadedState?.breakpoints)
|
|
50
|
-
},
|
|
51
|
-
middleware: (getDefaultMiddleware) => getDefaultMiddleware(import_toolkit2.middlewareOptions).concat((0, import_read_only_element_tree.readOnlyElementTreeMiddleware)()),
|
|
52
|
-
enhancers: (getDefaultEnhancers) => getDefaultEnhancers().concat(
|
|
53
|
-
(0, import_setup_teardown.withSetupTeardown)(
|
|
54
|
-
() => {
|
|
55
|
-
},
|
|
56
|
-
() => {
|
|
57
|
-
}
|
|
58
|
-
)
|
|
59
|
-
),
|
|
60
|
-
devTools: (0, import_toolkit2.devToolsConfig)({
|
|
61
|
-
name: `${name} (${(/* @__PURE__ */ new Date()).toISOString()})`
|
|
62
|
-
})
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
-
0 && (module.exports = {
|
|
67
|
-
configureStore
|
|
68
|
-
});
|
|
69
|
-
//# sourceMappingURL=react-page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/state/react-page.ts"],"sourcesContent":["import { configureStore as configureReduxStore, combineReducers } from '@reduxjs/toolkit'\n\nimport * as Breakpoints from './modules/breakpoints'\n\nimport { middlewareOptions, devToolsConfig } from './toolkit'\n\nimport { withSetupTeardown } from './mixins/setup-teardown'\nimport { readOnlyElementTreeMiddleware } from './middleware/read-only-element-tree'\n\nimport { type State, reducers } from './read-only-state'\n\nexport function configureStore({\n name,\n preloadedState,\n breakpoints,\n}: {\n name: string\n preloadedState: Partial<State> | null\n breakpoints?: Breakpoints.State\n}) {\n return configureReduxStore({\n reducer: combineReducers(reducers),\n preloadedState: {\n ...preloadedState,\n breakpoints: Breakpoints.getInitialState(breakpoints ?? preloadedState?.breakpoints),\n },\n\n middleware: getDefaultMiddleware =>\n getDefaultMiddleware(middlewareOptions).concat(readOnlyElementTreeMiddleware()),\n\n enhancers: getDefaultEnhancers =>\n getDefaultEnhancers().concat(\n withSetupTeardown(\n () => {},\n () => {},\n ),\n ),\n\n devTools: devToolsConfig({\n name: `${name} (${new Date().toISOString()})`,\n }),\n })\n}\n\nexport type Store = ReturnType<typeof configureStore>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAuE;AAEvE,kBAA6B;AAE7B,IAAAA,kBAAkD;AAElD,4BAAkC;AAClC,oCAA8C;AAE9C,6BAAqC;AAE9B,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,aAAO,eAAAC,gBAAoB;AAAA,IACzB,aAAS,gCAAgB,+BAAQ;AAAA,IACjC,gBAAgB;AAAA,MACd,GAAG;AAAA,MACH,aAAa,YAAY,gBAAgB,eAAe,gBAAgB,WAAW;AAAA,IACrF;AAAA,IAEA,YAAY,0BACV,qBAAqB,iCAAiB,EAAE,WAAO,6DAA8B,CAAC;AAAA,IAEhF,WAAW,yBACT,oBAAoB,EAAE;AAAA,UACpB;AAAA,QACE,MAAM;AAAA,QAAC;AAAA,QACP,MAAM;AAAA,QAAC;AAAA,MACT;AAAA,IACF;AAAA,IAEF,cAAU,gCAAe;AAAA,MACvB,MAAM,GAAG,IAAI,MAAK,oBAAI,KAAK,GAAE,YAAY,CAAC;AAAA,IAC5C,CAAC;AAAA,EACH,CAAC;AACH;","names":["import_toolkit","configureReduxStore"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from "react";
|
|
3
|
-
import * as ReactPage from "../../../state/react-page";
|
|
4
|
-
import { useReactRuntime } from "../hooks/use-react-runtime";
|
|
5
|
-
import { StoreContext } from "../hooks/use-store";
|
|
6
|
-
function LiveProvider({ children }) {
|
|
7
|
-
const runtime = useReactRuntime();
|
|
8
|
-
const store = useMemo(
|
|
9
|
-
() => ReactPage.configureStore({
|
|
10
|
-
name: "Host store",
|
|
11
|
-
preloadedState: runtime.store.getState()
|
|
12
|
-
}),
|
|
13
|
-
[runtime]
|
|
14
|
-
);
|
|
15
|
-
return /* @__PURE__ */ jsx(StoreContext.Provider, { value: store, children });
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
LiveProvider as default
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=LiveProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/runtimes/react/components/LiveProvider.tsx"],"sourcesContent":["import { type PropsWithChildren, useMemo, ReactNode } from 'react'\n\nimport * as ReactPage from '../../../state/react-page'\n\nimport { useReactRuntime } from '../hooks/use-react-runtime'\nimport { StoreContext } from '../hooks/use-store'\n\nexport default function LiveProvider({ children }: PropsWithChildren): ReactNode {\n const runtime = useReactRuntime()\n const store = useMemo(\n () =>\n ReactPage.configureStore({\n name: 'Host store',\n preloadedState: runtime.store.getState(),\n }),\n [runtime],\n )\n\n return <StoreContext.Provider value={store}>{children}</StoreContext.Provider>\n}\n"],"mappings":"AAkBS;AAlBT,SAAiC,eAA0B;AAE3D,YAAY,eAAe;AAE3B,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAEd,SAAR,aAA8B,EAAE,SAAS,GAAiC;AAC/E,QAAM,UAAU,gBAAgB;AAChC,QAAM,QAAQ;AAAA,IACZ,MACE,UAAU,eAAe;AAAA,MACvB,MAAM;AAAA,MACN,gBAAgB,QAAQ,MAAM,SAAS;AAAA,IACzC,CAAC;AAAA,IACH,CAAC,OAAO;AAAA,EACV;AAEA,SAAO,oBAAC,aAAa,UAAb,EAAsB,OAAO,OAAQ,UAAS;AACxD;","names":[]}
|