@makeswift/runtime 0.0.0-af7286d → 0.0.0-afbfa6b
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/api.js +1 -0
- package/box-model.js +1 -0
- package/builder.js +1 -0
- package/components.js +1 -0
- package/dist/actions.cjs.js +101 -17
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +90 -16
- package/dist/actions.es.js.map +1 -1
- package/dist/api.cjs.js +5 -0
- package/dist/api.cjs.js.map +1 -0
- package/dist/api.es.js +2 -0
- package/dist/api.es.js.map +1 -0
- package/dist/box-model.cjs.js +2 -2
- package/dist/box-model.es.js +1 -0
- package/dist/box-model.es.js.map +1 -1
- package/dist/box-models.cjs.js +27 -157
- package/dist/box-models.cjs.js.map +1 -1
- package/dist/box-models.es.js +30 -160
- package/dist/box-models.es.js.map +1 -1
- package/dist/builder.cjs.js +9 -0
- package/dist/builder.cjs.js.map +1 -0
- package/dist/builder.es.js +3 -0
- package/dist/builder.es.js.map +1 -0
- package/dist/components.cjs.js +54 -19948
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +25 -19911
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +146 -0
- package/dist/constants.cjs.js.map +1 -0
- package/dist/constants.es.js +145 -0
- package/dist/constants.es.js.map +1 -0
- package/dist/control-serialization.cjs.js +91 -0
- package/dist/control-serialization.cjs.js.map +1 -0
- package/dist/control-serialization.es.js +87 -0
- package/dist/control-serialization.es.js.map +1 -0
- package/dist/descriptors.cjs.js +32 -3
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js +3 -4
- package/dist/descriptors.es.js.map +1 -1
- package/dist/instances.cjs.js +89 -0
- package/dist/instances.cjs.js.map +1 -0
- package/dist/instances.es.js +87 -0
- package/dist/instances.es.js.map +1 -0
- package/dist/main.cjs.js +5 -2
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +1 -1
- package/dist/next.cjs.js +169 -0
- package/dist/next.cjs.js.map +1 -0
- package/dist/next.es.js +159 -0
- package/dist/next.es.js.map +1 -0
- package/dist/prop-controllers.cjs.js +3 -2
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +1 -0
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/react-builder-preview.cjs.js +270 -4115
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +270 -4119
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react.cjs.js +25 -2
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.cjs2.js +5798 -539
- package/dist/react.cjs2.js.map +1 -1
- package/dist/react.es.js +23 -1
- package/dist/react.es.js.map +1 -1
- package/dist/react.es2.js +5742 -540
- package/dist/react.es2.js.map +1 -1
- package/dist/types/api/constants.d.ts +4 -0
- package/dist/types/api/constants.d.ts.map +1 -0
- package/dist/types/api/generated/graphql.d.ts +61 -0
- package/dist/types/api/generated/graphql.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +3 -0
- package/dist/types/api/index.d.ts.map +1 -0
- package/dist/types/api/react.d.ts +6 -0
- package/dist/types/api/react.d.ts.map +1 -0
- package/dist/types/api/types.d.ts +4 -0
- package/dist/types/api/types.d.ts.map +1 -0
- package/dist/types/builder/index.d.ts +2 -0
- package/dist/types/builder/index.d.ts.map +1 -0
- package/dist/types/builder/serialization/control-serialization.d.ts +30 -0
- package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -0
- package/dist/types/builder/serialization/function-serialization.d.ts +11 -0
- package/dist/types/builder/serialization/function-serialization.d.ts.map +1 -0
- package/dist/types/builder/serialization/index.d.ts +3 -0
- package/dist/types/builder/serialization/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Box/Box.d.ts +5 -2
- package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
- package/dist/types/components/builtin/Box/index.d.ts +1 -1
- package/dist/types/components/builtin/Box/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Button/Button.d.ts +5 -2
- package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
- package/dist/types/components/builtin/Button/index.d.ts +1 -1
- package/dist/types/components/builtin/Button/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Carousel/Carousel.d.ts +5 -2
- package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
- package/dist/types/components/builtin/Carousel/index.d.ts +1 -1
- package/dist/types/components/builtin/Carousel/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Countdown/Countdown.d.ts +5 -2
- package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
- package/dist/types/components/builtin/Countdown/index.d.ts +1 -1
- package/dist/types/components/builtin/Countdown/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Divider/Divider.d.ts +5 -2
- package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -1
- package/dist/types/components/builtin/Divider/index.d.ts +1 -1
- package/dist/types/components/builtin/Divider/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Embed/Embed.d.ts +5 -2
- package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
- package/dist/types/components/builtin/Embed/index.d.ts +1 -1
- package/dist/types/components/builtin/Embed/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Image/Image.d.ts +5 -2
- package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/components/builtin/Image/index.d.ts +1 -1
- package/dist/types/components/builtin/Image/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/Navigation.d.ts +5 -2
- package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/index.d.ts +1 -1
- package/dist/types/components/builtin/Navigation/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Root/Root.d.ts +5 -2
- package/dist/types/components/builtin/Root/Root.d.ts.map +1 -1
- package/dist/types/components/builtin/Root/index.d.ts +1 -1
- package/dist/types/components/builtin/Root/index.d.ts.map +1 -1
- package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts +5 -2
- package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
- package/dist/types/components/builtin/SocialLinks/index.d.ts +1 -1
- package/dist/types/components/builtin/SocialLinks/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Text/Text.d.ts +19 -0
- package/dist/types/components/builtin/Text/Text.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts +24 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/hooks/useTypographyMark.d.ts +25 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/hooks/useTypographyMark.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts +13 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/index.d.ts +5 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesBlocks.d.ts +3 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesBlocks.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesMarks.d.ts +3 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesMarks.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Inlines.d.ts +3 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Inlines.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Link.d.ts +3 -0
- package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Link.d.ts.map +1 -0
- package/dist/types/components/builtin/Text/index.d.ts +2 -0
- package/dist/types/components/builtin/Text/index.d.ts.map +1 -0
- package/dist/types/components/builtin/index.d.ts +5 -1
- package/dist/types/components/builtin/index.d.ts.map +1 -1
- package/dist/types/components/hooks/useBackgrounds.d.ts.map +1 -1
- package/dist/types/components/hooks/useBorder.d.ts.map +1 -1
- package/dist/types/components/hooks/useBoxShadow.d.ts.map +1 -1
- package/dist/types/components/hooks/useColor.d.ts.map +1 -1
- package/dist/types/components/hooks/useFile.d.ts.map +1 -1
- package/dist/types/components/hooks/usePage.d.ts.map +1 -1
- package/dist/types/components/hooks/useTypography.d.ts +24 -0
- package/dist/types/components/hooks/useTypography.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/utils/devices.d.ts +1 -0
- package/dist/types/components/utils/devices.d.ts.map +1 -1
- package/dist/types/components/utils/queries.d.ts +6 -4
- package/dist/types/components/utils/queries.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/next.d.ts +21 -0
- package/dist/types/next.d.ts.map +1 -0
- package/dist/types/prop-controllers/descriptors.d.ts +8 -7
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/prop-controllers/index.d.ts +3 -1
- package/dist/types/prop-controllers/index.d.ts.map +1 -1
- package/dist/types/prop-controllers/instances.d.ts +63 -4
- package/dist/types/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/runtimes/react.d.ts +21 -8
- package/dist/types/runtimes/react.d.ts.map +1 -1
- package/dist/types/state/actions.d.ts +126 -13
- package/dist/types/state/actions.d.ts.map +1 -1
- package/dist/types/state/modules/box-models.d.ts +5 -5
- package/dist/types/state/modules/box-models.d.ts.map +1 -1
- package/dist/types/state/modules/prop-controller-handles.d.ts +4 -8
- package/dist/types/state/modules/prop-controller-handles.d.ts.map +1 -1
- package/dist/types/state/react-builder-preview.d.ts +5 -1
- package/dist/types/state/react-builder-preview.d.ts.map +1 -1
- package/dist/types/state/react-page.d.ts +1 -0
- package/dist/types/state/react-page.d.ts.map +1 -1
- package/dist/types/utils/coalesce.d.ts +3 -0
- package/dist/types/utils/coalesce.d.ts.map +1 -0
- package/dist/types/utils/constants.d.ts +6 -0
- package/dist/types/utils/constants.d.ts.map +1 -0
- package/dist/types/utils/intersection.d.ts +4 -0
- package/dist/types/utils/intersection.d.ts.map +1 -0
- package/dist/types/utils/keys.d.ts +5 -0
- package/dist/types/utils/keys.d.ts.map +1 -0
- package/dist/types/utils/shallowMerge.d.ts +2 -0
- package/dist/types/utils/shallowMerge.d.ts.map +1 -0
- package/next.js +1 -0
- package/package.json +60 -24
- package/prop-controllers.js +1 -0
- package/react.js +1 -0
- package/dist/types/components/BackgroundsContainer/components/BackgroundVideo/index.d.ts +0 -11
- package/dist/types/components/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +0 -1
- package/dist/types/components/BackgroundsContainer/components/Backgrounds/index.d.ts +0 -8
- package/dist/types/components/BackgroundsContainer/components/Backgrounds/index.d.ts.map +0 -1
- package/dist/types/components/BackgroundsContainer/components/Parallax/index.d.ts +0 -11
- package/dist/types/components/BackgroundsContainer/components/Parallax/index.d.ts.map +0 -1
- package/dist/types/components/BackgroundsContainer/index.d.ts +0 -11
- package/dist/types/components/BackgroundsContainer/index.d.ts.map +0 -1
- package/dist/types/components/Box/Box.d.ts +0 -30
- package/dist/types/components/Box/Box.d.ts.map +0 -1
- package/dist/types/components/Box/animations.d.ts +0 -69
- package/dist/types/components/Box/animations.d.ts.map +0 -1
- package/dist/types/components/Box/components/Placeholder/index.d.ts +0 -7
- package/dist/types/components/Box/components/Placeholder/index.d.ts.map +0 -1
- package/dist/types/components/Box/index.d.ts +0 -3
- package/dist/types/components/Box/index.d.ts.map +0 -1
- package/dist/types/components/Carousel/Carousel.d.ts +0 -25
- package/dist/types/components/Carousel/Carousel.d.ts.map +0 -1
- package/dist/types/components/Carousel/index.d.ts +0 -2
- package/dist/types/components/Carousel/index.d.ts.map +0 -1
- package/dist/types/components/Countdown/Countdown.d.ts +0 -24
- package/dist/types/components/Countdown/Countdown.d.ts.map +0 -1
- package/dist/types/components/Countdown/index.d.ts +0 -2
- package/dist/types/components/Countdown/index.d.ts.map +0 -1
- package/dist/types/components/Divider/Divider.d.ts +0 -14
- package/dist/types/components/Divider/Divider.d.ts.map +0 -1
- package/dist/types/components/Divider/index.d.ts +0 -2
- package/dist/types/components/Divider/index.d.ts.map +0 -1
- package/dist/types/components/Embed/Embed.d.ts +0 -11
- package/dist/types/components/Embed/Embed.d.ts.map +0 -1
- package/dist/types/components/Embed/index.d.ts +0 -2
- package/dist/types/components/Embed/index.d.ts.map +0 -1
- package/dist/types/components/Image/Image.d.ts +0 -26
- package/dist/types/components/Image/Image.d.ts.map +0 -1
- package/dist/types/components/Image/index.d.ts +0 -2
- package/dist/types/components/Image/index.d.ts.map +0 -1
- package/dist/types/components/Link/index.d.ts +0 -9
- package/dist/types/components/Link/index.d.ts.map +0 -1
- package/dist/types/components/RichText/index.d.ts +0 -5
- package/dist/types/components/RichText/index.d.ts.map +0 -1
- package/dist/types/components/Root/Root.d.ts +0 -11
- package/dist/types/components/Root/Root.d.ts.map +0 -1
- package/dist/types/components/Root/components/Placeholder/index.d.ts +0 -5
- package/dist/types/components/Root/components/Placeholder/index.d.ts.map +0 -1
- package/dist/types/components/Root/index.d.ts +0 -2
- package/dist/types/components/Root/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,EACL,QAAQ,EACR,OAAO,EACP,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,SAAS,GACV,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import * as ReactPage from '../state/react-page';
|
|
3
3
|
import type { PropControllerDescriptor, PropControllerDescriptorValueType } from '../prop-controllers';
|
|
4
4
|
import { ComponentIcon } from '../state/modules/components-meta';
|
|
5
|
-
export
|
|
6
|
-
registerComponent<P extends Record<string, PropControllerDescriptor
|
|
5
|
+
export interface ReactRuntime {
|
|
6
|
+
registerComponent<P extends Record<string, PropControllerDescriptor>, C extends ReactPage.ComponentType<{
|
|
7
|
+
[K in keyof P]?: PropControllerDescriptorValueType<P[K]>;
|
|
8
|
+
}>>(component: C, meta: {
|
|
7
9
|
type: string;
|
|
8
10
|
label: string;
|
|
9
|
-
icon?: ComponentIcon
|
|
10
|
-
hidden?: boolean
|
|
11
|
-
props?: P
|
|
11
|
+
icon?: ComponentIcon;
|
|
12
|
+
hidden?: boolean;
|
|
13
|
+
props?: P;
|
|
12
14
|
}): () => void;
|
|
13
|
-
}
|
|
15
|
+
}
|
|
16
|
+
export declare function createReactRuntime(store: ReactPage.Store): ReactRuntime;
|
|
17
|
+
export declare const ReactRuntime: ReactRuntime;
|
|
14
18
|
declare type RuntimeProviderProps = {
|
|
15
19
|
defaultRootElements?: Map<string, ReactPage.Element>;
|
|
16
20
|
children?: ReactNode;
|
|
21
|
+
registerComponents?: (runtime: ReactRuntime) => () => void;
|
|
22
|
+
makeswiftApiEndpoint?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function RuntimeProvider({ children, defaultRootElements, registerComponents, makeswiftApiEndpoint, }: RuntimeProviderProps): JSX.Element;
|
|
25
|
+
declare const PageContext: import("react").Context<string | null>;
|
|
26
|
+
export declare function usePageId(): string;
|
|
27
|
+
declare type PageProviderProps = {
|
|
28
|
+
id: string;
|
|
29
|
+
children: ComponentPropsWithoutRef<typeof PageContext['Provider']>['children'];
|
|
17
30
|
};
|
|
18
|
-
export declare function
|
|
31
|
+
export declare function PageProvider({ id, children }: PageProviderProps): JSX.Element;
|
|
19
32
|
export declare function useElementId(elementKey: string | null | undefined): string | null;
|
|
20
33
|
export declare function useIsInBuilder(): boolean;
|
|
21
34
|
declare type ElementProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/runtimes/react.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/runtimes/react.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAIxB,SAAS,EAKV,MAAM,OAAO,CAAA;AAId,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAA;AAQhD,OAAO,KAAK,EACV,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAMhE,MAAM,WAAW,YAAY;IAC3B,iBAAiB,CACf,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,EAClD,CAAC,SAAS,SAAS,CAAC,aAAa,CAAC;SAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,iCAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAAE,CAAC,EAE/F,SAAS,EAAE,CAAC,EACZ,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,aAAa,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC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AED,eAAO,MAAM,QAAQ,qDAmBnB,CAAA"}
|
|
@@ -5,20 +5,42 @@ import type { ThunkAction } from 'redux-thunk';
|
|
|
5
5
|
import { ComponentMeta } from './modules/components-meta';
|
|
6
6
|
import { PropControllerDescriptor } from '../prop-controllers';
|
|
7
7
|
import type { Size } from './react-builder-preview';
|
|
8
|
+
import type { PropControllersHandle } from './modules/prop-controller-handles';
|
|
9
|
+
import type { PropController, PropControllerMessage } from '../prop-controllers/instances';
|
|
10
|
+
import type { APIResource } from '../api/types';
|
|
11
|
+
import type { SerializedControl } from '../builder';
|
|
8
12
|
export declare const ActionTypes: {
|
|
13
|
+
readonly INIT: "INIT";
|
|
14
|
+
readonly CLEAN_UP: "CLEAN_UP";
|
|
9
15
|
readonly CHANGE_DOCUMENT: "CHANGE_DOCUMENT";
|
|
10
16
|
readonly REGISTER_COMPONENT: "REGISTER_COMPONENT";
|
|
11
17
|
readonly UNREGISTER_COMPONENT: "UNREGISTER_COMPONENT";
|
|
18
|
+
readonly REGISTER_BUILDER_COMPONENT: "REGISTER_BUILDER_COMPONENT";
|
|
19
|
+
readonly UNREGISTER_BUILDER_COMPONENT: "UNREGISTER_BUILDER_COMPONENT";
|
|
12
20
|
readonly REGISTER_REACT_COMPONENT: "REGISTER_REACT_COMPONENT";
|
|
13
21
|
readonly UNREGISTER_REACT_COMPONENT: "UNREGISTER_REACT_COMPONENT";
|
|
14
22
|
readonly MOUNT_COMPONENT: "MOUNT_COMPONENT";
|
|
15
23
|
readonly UNMOUNT_COMPONENT: "UNMOUNT_COMPONENT";
|
|
16
|
-
readonly
|
|
24
|
+
readonly REGISTER_COMPONENT_HANDLE: "REGISTER_COMPONENT_HANDLE";
|
|
25
|
+
readonly UNREGISTER_COMPONENT_HANDLE: "UNREGISTER_COMPONENT_HANDLE";
|
|
17
26
|
readonly REGISTER_MEASURABLE: "REGISTER_MEASURABLE";
|
|
18
27
|
readonly UNREGISTER_MEASURABLE: "UNREGISTER_MEASURABLE";
|
|
19
28
|
readonly CHANGE_ELEMENT_BOX_MODELS: "CHANGE_ELEMENT_BOX_MODELS";
|
|
20
29
|
readonly CHANGE_DOCUMENT_ELEMENT_SIZE: "CHANGE_DOCUMENT_ELEMENT_SIZE";
|
|
21
30
|
readonly CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: "CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP";
|
|
31
|
+
readonly REGISTER_PROP_CONTROLLERS_HANDLE: "REGISTER_PROP_CONTROLLERS_HANDLE";
|
|
32
|
+
readonly UNREGISTER_PROP_CONTROLLERS_HANDLE: "UNREGISTER_PROP_CONTROLLERS_HANDLE";
|
|
33
|
+
readonly REGISTER_PROP_CONTROLLERS: "REGISTER_PROP_CONTROLLERS";
|
|
34
|
+
readonly UNREGISTER_PROP_CONTROLLERS: "UNREGISTER_PROP_CONTROLLERS";
|
|
35
|
+
readonly MESSAGE_HOST_PROP_CONTROLLER: "MESSAGE_HOST_PROP_CONTROLLER";
|
|
36
|
+
readonly MESSAGE_BUILDER_PROP_CONTROLLER: "MESSAGE_BUILDER_PROP_CONTROLLER";
|
|
37
|
+
readonly CHANGE_API_RESOURCE: "CHANGE_API_RESOURCE";
|
|
38
|
+
};
|
|
39
|
+
declare type InitAction = {
|
|
40
|
+
type: typeof ActionTypes.INIT;
|
|
41
|
+
};
|
|
42
|
+
declare type CleanUpAction = {
|
|
43
|
+
type: typeof ActionTypes.CLEAN_UP;
|
|
22
44
|
};
|
|
23
45
|
declare type ChangeDocumentAction = {
|
|
24
46
|
type: typeof ActionTypes.CHANGE_DOCUMENT;
|
|
@@ -41,6 +63,20 @@ declare type UnregisterComponentAction = {
|
|
|
41
63
|
type: string;
|
|
42
64
|
};
|
|
43
65
|
};
|
|
66
|
+
declare type RegisterBuilderComponentAction = {
|
|
67
|
+
type: typeof ActionTypes.REGISTER_BUILDER_COMPONENT;
|
|
68
|
+
payload: {
|
|
69
|
+
type: string;
|
|
70
|
+
meta: ComponentMeta;
|
|
71
|
+
serializedControls: Record<string, SerializedControl>;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
declare type UnregisterBuilderComponentAction = {
|
|
75
|
+
type: typeof ActionTypes.UNREGISTER_BUILDER_COMPONENT;
|
|
76
|
+
payload: {
|
|
77
|
+
type: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
44
80
|
declare type RegisterReactComponentAction = {
|
|
45
81
|
type: typeof ActionTypes.REGISTER_REACT_COMPONENT;
|
|
46
82
|
payload: {
|
|
@@ -57,25 +93,36 @@ declare type UnregisterReactComponentAction = {
|
|
|
57
93
|
declare type MountComponentAction = {
|
|
58
94
|
type: typeof ActionTypes.MOUNT_COMPONENT;
|
|
59
95
|
payload: {
|
|
96
|
+
documentKey: string;
|
|
60
97
|
elementKey: string;
|
|
61
98
|
};
|
|
62
99
|
};
|
|
63
100
|
declare type UnmountComponentAction = {
|
|
64
101
|
type: typeof ActionTypes.UNMOUNT_COMPONENT;
|
|
65
102
|
payload: {
|
|
103
|
+
documentKey: string;
|
|
66
104
|
elementKey: string;
|
|
67
105
|
};
|
|
68
106
|
};
|
|
69
|
-
declare type
|
|
70
|
-
type: typeof ActionTypes.
|
|
107
|
+
declare type RegisterComponentHandleAction = {
|
|
108
|
+
type: typeof ActionTypes.REGISTER_COMPONENT_HANDLE;
|
|
71
109
|
payload: {
|
|
110
|
+
documentKey: string;
|
|
72
111
|
elementKey: string;
|
|
73
112
|
componentHandle: unknown;
|
|
74
113
|
};
|
|
75
114
|
};
|
|
115
|
+
declare type UnregisterComponentHandleAction = {
|
|
116
|
+
type: typeof ActionTypes.UNREGISTER_COMPONENT_HANDLE;
|
|
117
|
+
payload: {
|
|
118
|
+
documentKey: string;
|
|
119
|
+
elementKey: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
76
122
|
declare type RegisterMeasurableAction = {
|
|
77
123
|
type: typeof ActionTypes.REGISTER_MEASURABLE;
|
|
78
124
|
payload: {
|
|
125
|
+
documentKey: string;
|
|
79
126
|
elementKey: string;
|
|
80
127
|
measurable: Measurable;
|
|
81
128
|
};
|
|
@@ -83,13 +130,14 @@ declare type RegisterMeasurableAction = {
|
|
|
83
130
|
declare type UnregisterMeasurableAction = {
|
|
84
131
|
type: typeof ActionTypes.UNREGISTER_MEASURABLE;
|
|
85
132
|
payload: {
|
|
133
|
+
documentKey: string;
|
|
86
134
|
elementKey: string;
|
|
87
135
|
};
|
|
88
136
|
};
|
|
89
137
|
declare type ChangeElementBoxModelsAction = {
|
|
90
138
|
type: typeof ActionTypes.CHANGE_ELEMENT_BOX_MODELS;
|
|
91
139
|
payload: {
|
|
92
|
-
changedElementBoxModels: Map<string, BoxModel | null
|
|
140
|
+
changedElementBoxModels: Map<string, Map<string, BoxModel | null>>;
|
|
93
141
|
};
|
|
94
142
|
};
|
|
95
143
|
declare type ChangeDocumentElementSizeAction = {
|
|
@@ -104,21 +152,86 @@ declare type ChangeDocumentElementScrollTopAction = {
|
|
|
104
152
|
scrollTop: number;
|
|
105
153
|
};
|
|
106
154
|
};
|
|
107
|
-
|
|
155
|
+
declare type RegisterPropControllersHandleAction = {
|
|
156
|
+
type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE;
|
|
157
|
+
payload: {
|
|
158
|
+
documentKey: string;
|
|
159
|
+
elementKey: string;
|
|
160
|
+
handle: PropControllersHandle;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
declare type UnregisterPropControllersHandleAction = {
|
|
164
|
+
type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE;
|
|
165
|
+
payload: {
|
|
166
|
+
documentKey: string;
|
|
167
|
+
elementKey: string;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
declare type RegisterPropControllersAction = {
|
|
171
|
+
type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS;
|
|
172
|
+
payload: {
|
|
173
|
+
documentKey: string;
|
|
174
|
+
elementKey: string;
|
|
175
|
+
propControllers: Record<string, PropController>;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
declare type UnregisterPropControllersAction = {
|
|
179
|
+
type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS;
|
|
180
|
+
payload: {
|
|
181
|
+
documentKey: string;
|
|
182
|
+
elementKey: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
declare type MessageHostPropControllerAction<T = PropControllerMessage> = {
|
|
186
|
+
type: typeof ActionTypes.MESSAGE_HOST_PROP_CONTROLLER;
|
|
187
|
+
payload: {
|
|
188
|
+
documentKey: string;
|
|
189
|
+
elementKey: string;
|
|
190
|
+
propName: string;
|
|
191
|
+
message: T;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
declare type MessageBuilderPropControllerAction<T = PropControllerMessage> = {
|
|
195
|
+
type: typeof ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER;
|
|
196
|
+
payload: {
|
|
197
|
+
documentKey: string;
|
|
198
|
+
elementKey: string;
|
|
199
|
+
propName: string;
|
|
200
|
+
message: T;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
declare type ChangeAPIResourceAction = {
|
|
204
|
+
type: typeof ActionTypes.CHANGE_API_RESOURCE;
|
|
205
|
+
payload: {
|
|
206
|
+
resource: APIResource;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
export declare type Action = InitAction | CleanUpAction | ChangeDocumentAction | RegisterComponentAction | UnregisterComponentAction | RegisterBuilderComponentAction | UnregisterBuilderComponentAction | RegisterReactComponentAction | UnregisterReactComponentAction | MountComponentAction | UnmountComponentAction | RegisterComponentHandleAction | UnregisterComponentHandleAction | RegisterMeasurableAction | UnregisterMeasurableAction | ChangeElementBoxModelsAction | ChangeDocumentElementSizeAction | ChangeDocumentElementScrollTopAction | RegisterPropControllersHandleAction | UnregisterPropControllersHandleAction | RegisterPropControllersAction | UnregisterPropControllersAction | MessageHostPropControllerAction | MessageBuilderPropControllerAction | ChangeAPIResourceAction;
|
|
210
|
+
export declare function init(): InitAction;
|
|
211
|
+
export declare function cleanUp(): CleanUpAction;
|
|
108
212
|
export declare function changeDocument(documentKey: string, operation: Operation): ChangeDocumentAction;
|
|
109
213
|
export declare function registerComponent(type: string, meta: ComponentMeta, propControllerDescriptors: Record<string, PropControllerDescriptor>): RegisterComponentAction;
|
|
110
214
|
export declare function unregisterComponent(type: string): UnregisterComponentAction;
|
|
111
215
|
export declare function registerComponentEffect(type: string, meta: ComponentMeta, propControllerDescriptors: Record<string, PropControllerDescriptor>): ThunkAction<() => void, unknown, unknown, Action>;
|
|
216
|
+
export declare function registerBuilderComponent(type: string, meta: ComponentMeta, serializedControls: Record<string, SerializedControl>): RegisterBuilderComponentAction;
|
|
217
|
+
export declare function unregisterBuilderComponent(type: string): UnregisterBuilderComponentAction;
|
|
112
218
|
export declare function registerReactComponentEffect(type: string, component: ComponentType): ThunkAction<() => void, unknown, unknown, Action>;
|
|
113
|
-
export declare function mountComponent(elementKey: string): MountComponentAction;
|
|
114
|
-
export declare function unmountComponent(elementKey: string): UnmountComponentAction;
|
|
115
|
-
export declare function mountComponentEffect(elementKey: string): ThunkAction<() => void, unknown, unknown, Action>;
|
|
116
|
-
export declare function
|
|
117
|
-
export declare function registerMeasurable(elementKey: string, measurable: Measurable): RegisterMeasurableAction;
|
|
118
|
-
export declare function unregisterMeasurable(elementKey: string): UnregisterMeasurableAction;
|
|
119
|
-
export declare function registerMeasurableEffect(elementKey: string, measurable: Measurable): ThunkAction<() => void, unknown, unknown, Action>;
|
|
120
|
-
export declare function changeElementBoxModels(changedElementBoxModels: Map<string, BoxModel | null
|
|
219
|
+
export declare function mountComponent(documentKey: string, elementKey: string): MountComponentAction;
|
|
220
|
+
export declare function unmountComponent(documentKey: string, elementKey: string): UnmountComponentAction;
|
|
221
|
+
export declare function mountComponentEffect(documentKey: string, elementKey: string): ThunkAction<() => void, unknown, unknown, Action>;
|
|
222
|
+
export declare function registerComponentHandleEffect(documentKey: string, elementKey: string, componentHandle: unknown): ThunkAction<() => void, unknown, unknown, Action>;
|
|
223
|
+
export declare function registerMeasurable(documentKey: string, elementKey: string, measurable: Measurable): RegisterMeasurableAction;
|
|
224
|
+
export declare function unregisterMeasurable(documentKey: string, elementKey: string): UnregisterMeasurableAction;
|
|
225
|
+
export declare function registerMeasurableEffect(documentKey: string, elementKey: string, measurable: Measurable): ThunkAction<() => void, unknown, unknown, Action>;
|
|
226
|
+
export declare function changeElementBoxModels(changedElementBoxModels: Map<string, Map<string, BoxModel | null>>): ChangeElementBoxModelsAction;
|
|
121
227
|
export declare function changeDocumentElementSize(size: Size): ChangeDocumentElementSizeAction;
|
|
122
228
|
export declare function changeDocumentElementScrollTop(scrollTop: number): ChangeDocumentElementScrollTopAction;
|
|
229
|
+
export declare function registerPropControllersHandle(documentKey: string, elementKey: string, handle: PropControllersHandle): RegisterPropControllersHandleAction;
|
|
230
|
+
export declare function unregisterPropControllersHandle(documentKey: string, elementKey: string): UnregisterPropControllersHandleAction;
|
|
231
|
+
export declare function registerPropControllers(documentKey: string, elementKey: string, propControllers: Record<string, PropController>): RegisterPropControllersAction;
|
|
232
|
+
export declare function unregisterPropControllers(documentKey: string, elementKey: string): UnregisterPropControllersAction;
|
|
233
|
+
export declare function messageHostPropController<T>(documentKey: string, elementKey: string, propName: string, message: T): MessageHostPropControllerAction<T>;
|
|
234
|
+
export declare function messageBuilderPropController<T>(documentKey: string, elementKey: string, propName: string, message: T): MessageBuilderPropControllerAction<T>;
|
|
235
|
+
export declare function changeApiResource(resource: APIResource): ChangeAPIResourceAction;
|
|
123
236
|
export {};
|
|
124
237
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/state/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK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B,UAAU,EAAE,MAAM,GACjB,+BAA+B,CAEjC;AAED,wBAAgB,yBAAyB,CAAC,CAAC,EACzC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,GACT,+BAA+B,CAAC,CAAC,CAAC,CAKpC;AAED,wBAAgB,4BAA4B,CAAC,CAAC,EAC5C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,GACT,kCAAkC,CAAC,CAAC,CAAC,CAKvC;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GAAG,uBAAuB,CAEhF"}
|
|
@@ -11,12 +11,12 @@ export declare type Measurable = Element | BoxModelHandle;
|
|
|
11
11
|
export declare function isMeasurable(value: unknown): value is Measurable;
|
|
12
12
|
export declare function measure(measurable: Measurable): BoxModel | null;
|
|
13
13
|
export declare type State = {
|
|
14
|
-
measurables: Map<string, Measurable
|
|
15
|
-
boxModels: Map<string, BoxModel
|
|
14
|
+
measurables: Map<string, Map<string, Measurable>>;
|
|
15
|
+
boxModels: Map<string, Map<string, BoxModel>>;
|
|
16
16
|
};
|
|
17
17
|
export declare function getInitialState(): State;
|
|
18
|
-
export declare function getMeasurables(state: State): Map<string, Measurable
|
|
19
|
-
export declare function getBoxModels(state: State): Map<string, BoxModel
|
|
20
|
-
export declare function getBoxModel(state: State, elementKey: string): BoxModel | null;
|
|
18
|
+
export declare function getMeasurables(state: State): Map<string, Map<string, Measurable>>;
|
|
19
|
+
export declare function getBoxModels(state: State): Map<string, Map<string, BoxModel>>;
|
|
20
|
+
export declare function getBoxModel(state: State, documentKey: string, elementKey: string): BoxModel | null;
|
|
21
21
|
export declare function reducer(state: State | undefined, action: Action): State;
|
|
22
22
|
//# sourceMappingURL=box-models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box-models.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/box-models.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,aAAa,EAGd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,MAAM,EAAe,MAAM,YAAY,CAAA;AAEhD,YAAY,EAAE,QAAQ,EAAE,CAAA;AAExB,wBAAgB,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAI/C;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAE1D;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,CAEjD;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,IAAI,QAAQ,GAAG,IAAI,CAAA;CAC/B;AAED,oBAAY,UAAU,GAAG,OAAO,GAAG,cAAc,CAAA;AAEjD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAahE;AAED,wBAAgB,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,QAAQ,GAAG,IAAI,CAI/D;AAED,oBAAY,KAAK,GAAG;IAClB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"box-models.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/box-models.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,aAAa,EAGd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,MAAM,EAAe,MAAM,YAAY,CAAA;AAEhD,YAAY,EAAE,QAAQ,EAAE,CAAA;AAExB,wBAAgB,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAI/C;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAE1D;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,CAEjD;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,IAAI,QAAQ,GAAG,IAAI,CAAA;CAC/B;AAED,oBAAY,UAAU,GAAG,OAAO,GAAG,cAAc,CAAA;AAEjD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAahE;AAED,wBAAgB,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,QAAQ,GAAG,IAAI,CAI/D;AAED,oBAAY,KAAK,GAAG;IAClB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;IACjD,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;CAC9C,CAAA;AAED,wBAAgB,eAAe,IAAI,KAAK,CAEvC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAEjF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAE7E;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,QAAQ,GAAG,IAAI,CAEjB;AAED,wBAAgB,OAAO,CAAC,KAAK,mBAA2B,EAAE,MAAM,EAAE,MAAM,SAiDvE"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import type { Dispatch as ReactDispatch, SetStateAction } from 'react';
|
|
2
1
|
import { Action } from '../actions';
|
|
3
|
-
import type {
|
|
4
|
-
import {
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
export interface PropControllersHandle<T extends Record<string, Data> = Record<string, Data>> {
|
|
9
|
-
setPropControllers: ReactDispatch<SetStateAction<PropsPropControllers<T> | null>>;
|
|
2
|
+
import type { DescriptorsPropControllers, PropController } from '../../prop-controllers/instances';
|
|
3
|
+
import type { Descriptor } from '../../prop-controllers/descriptors';
|
|
4
|
+
export interface PropControllersHandle<T extends Record<string, Descriptor> = Record<string, Descriptor>> {
|
|
5
|
+
setPropControllers(propControllers: DescriptorsPropControllers<T> | null): void;
|
|
10
6
|
}
|
|
11
7
|
export declare function isPropControllersHandle(value: unknown): value is PropControllersHandle;
|
|
12
8
|
export declare type State = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-controller-handles.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/prop-controller-handles.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"prop-controller-handles.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/prop-controller-handles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAe,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EAAE,0BAA0B,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAClG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAEpE,MAAM,WAAW,qBAAqB,CACpC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAEjE,kBAAkB,CAAC,eAAe,EAAE,0BAA0B,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA;CAChF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,qBAAqB,CAWtF;AAED,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAA;IACxD,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAA;CACpE,CAAA;AAED,wBAAgB,eAAe,IAAI,KAAK,CAEvC;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,qBAAqB,GAAG,IAAI,CAE9B;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,cAAc,GAAG,IAAI,CAEvB;AAED,wBAAgB,OAAO,CAAC,KAAK,mBAA2B,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAmD/E"}
|
|
@@ -4,7 +4,9 @@ import * as ReactComponents from './modules/react-components';
|
|
|
4
4
|
import * as BoxModels from './modules/box-models';
|
|
5
5
|
import * as ComponentsMeta from './modules/components-meta';
|
|
6
6
|
import * as PropControllers from './modules/prop-controllers';
|
|
7
|
+
import * as PropControllerHandles from './modules/prop-controller-handles';
|
|
7
8
|
import { Action } from './actions';
|
|
9
|
+
import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
|
|
8
10
|
export type { Operation } from './modules/read-write-documents';
|
|
9
11
|
export type { BoxModelHandle } from './modules/box-models';
|
|
10
12
|
export { createBox, getBox, parse } from './modules/box-models';
|
|
@@ -14,6 +16,7 @@ declare const reducer: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
14
16
|
boxModels: BoxModels.State;
|
|
15
17
|
componentsMeta: ComponentsMeta.State;
|
|
16
18
|
propControllers: PropControllers.State;
|
|
19
|
+
propControllerHandles: PropControllerHandles.State;
|
|
17
20
|
isInBuilder: boolean;
|
|
18
21
|
}>, Action>;
|
|
19
22
|
export declare type State = ReturnType<typeof reducer>;
|
|
@@ -34,7 +37,8 @@ export declare function messageChannelMiddleware(): Middleware<Dispatch, State,
|
|
|
34
37
|
export declare type Store = ReduxStore<State, Action> & {
|
|
35
38
|
dispatch: Dispatch;
|
|
36
39
|
};
|
|
37
|
-
export declare function configureStore({ preloadedState, }
|
|
40
|
+
export declare function configureStore({ preloadedState, client, }: {
|
|
38
41
|
preloadedState?: PreloadedState<State>;
|
|
42
|
+
client: ApolloClient<NormalizedCacheObject>;
|
|
39
43
|
}): Store;
|
|
40
44
|
//# sourceMappingURL=react-builder-preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-builder-preview.d.ts","sourceRoot":"","sources":["../../../src/state/react-builder-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,UAAU,EAEV,cAAc,EACd,KAAK,IAAI,UAAU,EACpB,MAAM,OAAO,CAAA;AACd,OAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAI/D,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EACL,MAAM,
|
|
1
|
+
{"version":3,"file":"react-builder-preview.d.ts","sourceRoot":"","sources":["../../../src/state/react-builder-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,UAAU,EAEV,cAAc,EACd,KAAK,IAAI,UAAU,EACpB,MAAM,OAAO,CAAA;AACd,OAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAI/D,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,qBAAqB,MAAM,mCAAmC,CAAA;AAE1E,OAAO,EACL,MAAM,EAWP,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAIpE,YAAY,EA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
@@ -19,6 +19,7 @@ export declare type State = ReturnType<typeof reducer>;
|
|
|
19
19
|
export declare function getDocumentRootElement(state: State, documentKey: string): Documents.Element | null;
|
|
20
20
|
export declare function getReactComponent(state: State, type: string): ReactComponents.ComponentType | null;
|
|
21
21
|
export declare function getElement(state: State, documentKey: string, elementKey: string): Documents.Element | null;
|
|
22
|
+
export declare function getElementPropControllerDescriptors(state: State, documentKey: string, elementKey: string): Record<string, PropControllers.PropControllerDescriptor> | null;
|
|
22
23
|
export declare function getElementId(state: State, documentKey: string, elementKey: string): string | null;
|
|
23
24
|
export declare function getIsInBuilder(state: State): boolean;
|
|
24
25
|
export declare type Dispatch = ThunkDispatch<State, unknown, Action>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-page.d.ts","sourceRoot":"","sources":["../../../src/state/react-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EACd,KAAK,IAAI,UAAU,EACpB,MAAM,OAAO,CAAA;AACd,OAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAA;AAC1D,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,YAAY,EACV,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,WAAW,EACX,gBAAgB,GACjB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE/D,QAAA,MAAM,OAAO;;;;;;WAMX,CAAA;AAEF,oBAAY,KAAK,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAM9C,wBAAgB,sBAAsB,CACpC,KAAK,EA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AAA;AAE5D,oBAAY,KAAK,GAAG,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAA;AAEtE,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,cAAc,GACf,GAAE;IACD,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC7C,cAAc,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAA;CAClC,GAAG,KAAK,CAMb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coalesce.d.ts","sourceRoot":"","sources":["../../../src/utils/coalesce.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,QAAQ,wBAQb,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;CAGlB,CAAA;AAEV,oBAAY,eAAe,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersection.d.ts","sourceRoot":"","sources":["../../../src/utils/intersection.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,EACjF,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,CAAC,EACJ,OAAO,GAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,OAAmB,GACvD;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;CAAE,CASjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/utils/keys.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI;;uBAA8E,CAAA;AAExF,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shallowMerge.d.ts","sourceRoot":"","sources":["../../../src/utils/shallowMerge.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAUnB"}
|
package/next.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/next.cjs')
|
package/package.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makeswift/runtime",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-afbfa6b",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"main": "dist/main.cjs",
|
|
5
6
|
"module": "dist/main.es",
|
|
6
7
|
"types": "dist/types",
|
|
7
8
|
"files": [
|
|
8
|
-
"dist"
|
|
9
|
+
"dist",
|
|
10
|
+
"prop-controllers.js",
|
|
11
|
+
"react.js",
|
|
12
|
+
"box-model.js",
|
|
13
|
+
"components.js",
|
|
14
|
+
"api.js",
|
|
15
|
+
"next.js",
|
|
16
|
+
"builder.js"
|
|
9
17
|
],
|
|
10
18
|
"exports": {
|
|
11
19
|
".": {
|
|
@@ -27,6 +35,18 @@
|
|
|
27
35
|
"./components": {
|
|
28
36
|
"import": "./dist/components.es.js",
|
|
29
37
|
"require": "./dist/components.cjs.js"
|
|
38
|
+
},
|
|
39
|
+
"./api": {
|
|
40
|
+
"import": "./dist/api.es.js",
|
|
41
|
+
"require": "./dist/api.cjs.js"
|
|
42
|
+
},
|
|
43
|
+
"./next": {
|
|
44
|
+
"import": "./dist/next.es.js",
|
|
45
|
+
"require": "./dist/next.cjs.js"
|
|
46
|
+
},
|
|
47
|
+
"./builder": {
|
|
48
|
+
"import": "./dist/builder.es.js",
|
|
49
|
+
"require": "./dist/builder.cjs.js"
|
|
30
50
|
}
|
|
31
51
|
},
|
|
32
52
|
"typesVersions": {
|
|
@@ -42,6 +62,15 @@
|
|
|
42
62
|
],
|
|
43
63
|
"components": [
|
|
44
64
|
"dist/types/components/index.d.ts"
|
|
65
|
+
],
|
|
66
|
+
"api": [
|
|
67
|
+
"dist/types/api/index.d.ts"
|
|
68
|
+
],
|
|
69
|
+
"next": [
|
|
70
|
+
"dist/types/next.d.ts"
|
|
71
|
+
],
|
|
72
|
+
"builder": [
|
|
73
|
+
"dist/types/builder/index.d.ts"
|
|
45
74
|
]
|
|
46
75
|
}
|
|
47
76
|
},
|
|
@@ -49,36 +78,33 @@
|
|
|
49
78
|
"dev": "concurrently -k 'tsc --watch --preserveWatchOutput' 'vite build --watch'",
|
|
50
79
|
"build": "tsc && vite build",
|
|
51
80
|
"preview": "vite preview",
|
|
52
|
-
"deploy": "yarn publish . --new-version 0.0.0-$(git rev-parse --short HEAD) --access public"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"optional": true
|
|
57
|
-
},
|
|
58
|
-
"next": {
|
|
59
|
-
"optional": true
|
|
60
|
-
},
|
|
61
|
-
"react": {
|
|
62
|
-
"optional": true
|
|
63
|
-
},
|
|
64
|
-
"styled-components": {
|
|
65
|
-
"optional": true
|
|
66
|
-
}
|
|
81
|
+
"deploy": "yarn publish . --new-version 0.0.0-$(git rev-parse --short HEAD) --access public && git push origin main",
|
|
82
|
+
"prepare": "yarn build",
|
|
83
|
+
"generate": "graphql-codegen --config codegen.yml",
|
|
84
|
+
"test": "vitest"
|
|
67
85
|
},
|
|
68
86
|
"peerDependencies": {
|
|
69
|
-
"
|
|
70
|
-
"next": "12.0.2",
|
|
87
|
+
"next": "^12.0.2",
|
|
71
88
|
"react": "^17.0.1",
|
|
72
|
-
"
|
|
89
|
+
"react-dom": "^17.0.1"
|
|
73
90
|
},
|
|
74
91
|
"dependencies": {
|
|
92
|
+
"@apollo/client": "^3.5.10",
|
|
93
|
+
"@convertkit/slate-lists": "^0.2.4",
|
|
75
94
|
"@popmotion/popcorn": "^0.4.4",
|
|
76
|
-
"@types/
|
|
95
|
+
"@types/react": "^17.0.3",
|
|
96
|
+
"@types/react-dom": "^17.0.2",
|
|
97
|
+
"@types/slate": "0.47.11",
|
|
98
|
+
"@types/slate-react": "^0.22.9",
|
|
77
99
|
"@types/styled-components": "^5.1.5",
|
|
78
100
|
"@types/use-sync-external-store": "^0.0.3",
|
|
101
|
+
"@types/uuid": "^7.0.3",
|
|
102
|
+
"color": "^3.1.3",
|
|
103
|
+
"corporate-ipsum": "^1.0.1",
|
|
79
104
|
"css-box-model": "^1.2.1",
|
|
80
105
|
"csstype": "^2.6.5",
|
|
81
106
|
"framer-motion": "^6.0.0",
|
|
107
|
+
"graphql": "^16.3.0",
|
|
82
108
|
"immutable": "^4.0.0-rc.12",
|
|
83
109
|
"ot-json0": "^1.1.0",
|
|
84
110
|
"polished": "3.0.3",
|
|
@@ -87,21 +113,31 @@
|
|
|
87
113
|
"redux": "^4.0.5",
|
|
88
114
|
"redux-thunk": "^2.3.0",
|
|
89
115
|
"scroll-into-view-if-needed": "^2.2.20",
|
|
116
|
+
"slate": "^0.47.8",
|
|
117
|
+
"slate-hotkeys": "^0.2.9",
|
|
118
|
+
"slate-react": "^0.22.9",
|
|
119
|
+
"styled-components": "5.2.0",
|
|
90
120
|
"use-sync-external-store": "^1.0.0-rc.0",
|
|
91
121
|
"uuid": "^3.3.3"
|
|
92
122
|
},
|
|
93
123
|
"devDependencies": {
|
|
94
|
-
"@
|
|
124
|
+
"@graphql-codegen/cli": "2.6.2",
|
|
125
|
+
"@graphql-codegen/typed-document-node": "^2.2.7",
|
|
126
|
+
"@graphql-codegen/typescript-operations": "2.3.4",
|
|
95
127
|
"@svgr/rollup": "^6.2.1",
|
|
96
128
|
"@types/color": "^3.0.2",
|
|
97
129
|
"@types/node": "^17.0.21",
|
|
98
130
|
"@vitejs/plugin-react": "^1.1.4",
|
|
99
|
-
"color": "^3.1.3",
|
|
100
131
|
"concurrently": "^5.3.0",
|
|
101
132
|
"next": "12.0.2",
|
|
102
133
|
"prettier": "^2.5.1",
|
|
103
134
|
"react": "^17.0.1",
|
|
135
|
+
"react-dom": "^17.0.1",
|
|
136
|
+
"slate": "^0.47.8",
|
|
137
|
+
"slate-react": "^0.22.9",
|
|
138
|
+
"styled-components": "5.2.0",
|
|
104
139
|
"typescript": "^4.5.5",
|
|
105
|
-
"vite": "^2.
|
|
140
|
+
"vite": "^2.8.6",
|
|
141
|
+
"vitest": "^0.7.4"
|
|
106
142
|
}
|
|
107
143
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/prop-controllers.cjs')
|
package/react.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/react.cjs')
|