@rxdrag/website-studio 0.0.7 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/components/LeftDrawer/DataSourcePanel/CustomizedDatasourceEditor.d.ts +5 -0
  2. package/dist/components/LeftDrawer/DataSourcePanel/CustomizedDatasourceModal.d.ts +7 -0
  3. package/dist/components/LeftDrawer/DataSourcePanel/CustomizedDatasources.d.ts +5 -0
  4. package/dist/components/LeftDrawer/DataSourcePanel/FrameDatasoucePanel.d.ts +5 -0
  5. package/dist/components/LeftDrawer/DataSourcePanel/PostCoverSize.d.ts +7 -0
  6. package/dist/components/LeftDrawer/DataSourcePanel/PostListPanel.d.ts +5 -0
  7. package/dist/components/LeftDrawer/DataSourcePanel/PostPanel.d.ts +5 -0
  8. package/dist/components/LeftDrawer/DataSourcePanel/ProductListPanel.d.ts +5 -0
  9. package/dist/components/LeftDrawer/DataSourcePanel/ProductMediaSize.d.ts +7 -0
  10. package/dist/components/LeftDrawer/DataSourcePanel/ProductPanel.d.ts +5 -0
  11. package/dist/components/LeftDrawer/DataSourcePanel/ProfilePanel.d.ts +5 -0
  12. package/dist/components/LeftDrawer/DataSourcePanel/SearchPanel.d.ts +5 -0
  13. package/dist/components/LeftDrawer/DataSourcePanel/clxs.d.ts +3 -0
  14. package/dist/components/LeftDrawer/DataSourcePanel/index.d.ts +3 -0
  15. package/dist/components/LeftDrawer/InsertPanel/DataScopeNodes.d.ts +1 -0
  16. package/dist/components/LeftDrawer/InsertPanel/FieldNodes.d.ts +1 -0
  17. package/dist/components/LeftDrawer/InsertPanel/useDataScopeNodes.d.ts +2 -0
  18. package/dist/components/Leftbar/index.d.ts +1 -0
  19. package/dist/components/StudioRoot/contexts.d.ts +1 -1
  20. package/dist/consts.d.ts +11 -0
  21. package/dist/datasources.d.ts +19 -0
  22. package/dist/generator/classes/Coder.d.ts +16 -2
  23. package/dist/generator/classes/FrameCoder.d.ts +8 -7
  24. package/dist/generator/classes/Page404Coder.d.ts +10 -0
  25. package/dist/generator/classes/PageCoder.d.ts +10 -13
  26. package/dist/generator/classes/PageErrorCoder.d.ts +10 -0
  27. package/dist/generator/classes/TypesCoder.d.ts +12 -0
  28. package/dist/generator/classes/WebsiteGenerator.d.ts +2 -1
  29. package/dist/generator/templates/app/api.product.$id.d.ts +2 -0
  30. package/dist/generator/templates/app/ask-for-quote.d.ts +2 -0
  31. package/dist/generator/templates/app/page404.d.ts +2 -0
  32. package/dist/generator/templates/app/pageError.d.ts +2 -0
  33. package/dist/generator/templates/{slug.d.ts → app/slug.d.ts} +1 -1
  34. package/dist/generator/templates/app/types.d.ts +2 -0
  35. package/dist/generator/templates/vars.d.ts +6 -4
  36. package/dist/generator/types.d.ts +1 -1
  37. package/dist/index.mjs +4655 -2875
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/preview/hooks/useMotionProps.d.ts +1 -2
  40. package/dist/preview/hooks/useValue.d.ts +1 -1
  41. package/dist/recoil/atoms.d.ts +2 -2
  42. package/dist/resources/data/roots.d.ts +1 -2
  43. package/dist/types.d.ts +2 -1
  44. package/package.json +21 -20
  45. package/dist/components/Leftbar/ThemeSettingsDrawer/RatioSelect.d.ts +0 -2
@@ -0,0 +1,5 @@
1
+ import { ICustomizedDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function CustomizedDatasourceEditor(props: {
3
+ value: ICustomizedDataSource;
4
+ onValueChange?: (value: ICustomizedDataSource) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ICustomizedDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function CustomizedDatasourceModal(props: {
3
+ value?: ICustomizedDataSource;
4
+ onValueChange?: (value: ICustomizedDataSource) => void;
5
+ isOpen: boolean;
6
+ onOpenChange: (isOpen: boolean) => void;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { IDataSourceSchema } from "@rxdrag/model-remix-lib";
2
+ export declare function CustomizedDatasources(props: {
3
+ value?: IDataSourceSchema;
4
+ onValueChange?: (value: IDataSourceSchema) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { IFrameDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function FrameDatasoucePanel(props: {
3
+ value?: IFrameDataSource;
4
+ onValueChange?: (value: IFrameDataSource) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { IPostDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function PostCoverSize(props: {
3
+ value?: IPostDataSource;
4
+ onValueChange?: (value: IPostDataSource) => void;
5
+ defaultWidth: number;
6
+ defaultHeight: number;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { IPostListPageDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function PostListPanel(props: {
3
+ value?: IPostListPageDataSource;
4
+ onValueChange?: (value: IPostListPageDataSource) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { IPostPageDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function PostPanel(props: {
3
+ value?: IPostPageDataSource;
4
+ onValueChange?: (value: IPostPageDataSource) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { IProductListPageDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function ProductListPanel(props: {
3
+ value?: IProductListPageDataSource;
4
+ onValueChange?: (value: IProductListPageDataSource) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { IProductDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function ProductMediaSize(props: {
3
+ value?: IProductDataSource;
4
+ onValueChange?: (value: IProductDataSource) => void;
5
+ defaultWidth: number;
6
+ defaultHeight: number;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { IProductPageDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function ProductPanel(props: {
3
+ value?: IProductPageDataSource;
4
+ onValueChange?: (value: IProductPageDataSource) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { IProfilePageDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function ProfilePanel(props: {
3
+ value?: IProfilePageDataSource;
4
+ onValueChange?: (value: IProfilePageDataSource) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ISearchPageDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare function SearchPanel(props: {
3
+ value?: ISearchPageDataSource;
4
+ onValueChange?: (value: ISearchPageDataSource) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const labelCls = "text-xs ps-0 pe-0 w-20 flex justify-end items-center pr-2";
2
+ export declare const subheaderCls = "text-xs text-default-500";
3
+ export declare const contentCls = "flex flex-col gap-4";
@@ -0,0 +1,3 @@
1
+ export declare function DataSourcePanel(props: {
2
+ hidden?: boolean;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function DataScopeNodes(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function FieldNodes(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { IResourceTreeNode } from "../../../resources";
2
+ export declare function useDataScopeNodes(): IResourceTreeNode[];
@@ -14,5 +14,6 @@ export declare const titles: {
14
14
  componentTest: string;
15
15
  layers: string;
16
16
  frameCode: string;
17
+ data: string;
17
18
  };
18
19
  export declare const Leftbar: import("react").MemoExoticComponent<(props: LeftbarProps) => import("react/jsx-runtime").JSX.Element>;
@@ -2,7 +2,7 @@ import { ListResult } from "@rxdrag/entify-hooks";
2
2
  import { FrontComponent, Page, Template, Theme, WebsiteFrame } from "@rxdrag/rxcms-models";
3
3
  import React from "react";
4
4
  export type StudioContextProps = {
5
- websiteId?: string;
5
+ websiteId?: string | null;
6
6
  templates?: Template[];
7
7
  components?: FrontComponent[];
8
8
  pages?: ListResult<Page>;
@@ -0,0 +1,11 @@
1
+ export declare const DEFAULT_POST_COVER_WIDTH = 800;
2
+ export declare const DEFAULT_POST_COVER_HEIGHT = 300;
3
+ export declare const DEFAULT_POST_LIST_COVER_WIDTH = 480;
4
+ export declare const DEFAULT_POST_LIST_COVER_HEIGHT = 180;
5
+ export declare const DEFAULT_POST_LIST_PAGE_SIZE = 10;
6
+ export declare const DEFUALT_USER_POST_LIST_PAGE_SIZE = 10;
7
+ export declare const DEFAULT_PRODUCT_MEDIA_WIDTH = 600;
8
+ export declare const DEFAULT_PRODUCT_MEDIA_HEIGHT = 600;
9
+ export declare const DEFAULT_PRODUCT_LIST_MEDIA_WIDTH = 500;
10
+ export declare const DEFAULT_PRODUCT_LIST_MEDIA_HEIGHT = 400;
11
+ export declare const DEFAULT_PRODUCT_LIST_PAGE_SIZE = 20;
@@ -0,0 +1,19 @@
1
+ import { ICustomizedDataSource, IFrameDataSource, IPostListPageDataSource, IPostPageDataSource, IProductListPageDataSource, IProductPageDataSource } from "@rxdrag/model-remix-lib";
2
+ export declare const defaultFrameDataSource: IFrameDataSource;
3
+ export declare const defaultProductPageDataSource: IProductPageDataSource;
4
+ export declare const defaultPostPageDataSource: IPostPageDataSource;
5
+ export declare const defaultPostListPageDataSource: IPostListPageDataSource;
6
+ export declare const defaultProductListPageDataSource: IProductListPageDataSource;
7
+ export declare const defaultProfilePageDataSource: {
8
+ user: {
9
+ static: boolean;
10
+ };
11
+ posts: {
12
+ static: boolean;
13
+ pageSize: number;
14
+ };
15
+ };
16
+ export declare const defaultFeaturedProductsDataSource: ICustomizedDataSource;
17
+ export declare const defaultLastedPostsDataSource: ICustomizedDataSource;
18
+ export declare const defaultProductCategoryListDataSource: ICustomizedDataSource;
19
+ export declare const defaultPostCategoryListDataSource: ICustomizedDataSource;
@@ -1,8 +1,14 @@
1
1
  import { IMaterial } from "@rxdrag/react-core-pro";
2
2
  import { INodeSchema } from "@rxdrag/schema-pro";
3
- import { XData, XDataScope } from "@rxdrag/website-components";
4
3
  import { TemplatesStore } from "./ComponentsStore";
5
4
  import { XDataSchema } from "../types";
5
+ import { XData, ICustomizedDataSource, IDataSourceSchema } from "@rxdrag/model-remix-lib";
6
+ import { IEffect } from "@rxdrag/website-components";
7
+ export type TRootQuery = {
8
+ scopeName: string;
9
+ funcName: string;
10
+ dataSource?: ICustomizedDataSource;
11
+ };
6
12
  export declare abstract class Coder {
7
13
  protected comsStore: TemplatesStore;
8
14
  protected elements: INodeSchema<XData>[];
@@ -10,8 +16,16 @@ export declare abstract class Coder {
10
16
  protected typeImports: Record<string, string[]>;
11
17
  protected defaultImports: Record<string, string[]>;
12
18
  constructor(comsStore: TemplatesStore, elements: INodeSchema<XData>[]);
19
+ getDataSourceSchema(): IDataSourceSchema | undefined;
20
+ getRootQueries(): TRootQuery[];
21
+ getDatasLoaderCode(): string;
22
+ getDatasCode(): string;
23
+ getDatasItems(): string[];
24
+ getCustomizedQueries(): TRootQuery[];
13
25
  getUsedMaterials(): IMaterial[];
14
26
  getMaterialsFromElements(elements: INodeSchema<XData>[], usedMaterials: IMaterial[]): void;
27
+ hasMotion(elements: INodeSchema[]): true | undefined;
28
+ elementHasMotion(element: INodeSchema): boolean;
15
29
  getXDataSchemas(): XDataSchema[];
16
30
  private getXSchemas;
17
31
  getCustomizedComponents(): string[];
@@ -21,12 +35,12 @@ export declare abstract class Coder {
21
35
  abstract getFileCode(): string;
22
36
  contentToTsx(schema: INodeSchema | null | undefined, spaces?: number, hasRootClassName?: boolean): string;
23
37
  jsonToTsx(node: INodeSchema, spaces?: number, hasRootClassName?: boolean): string;
24
- getScopeKey(xdata: XData | undefined): XDataScope | undefined;
25
38
  needAddDatas(xdata: XData | undefined): boolean;
26
39
  jsonToTsxProps(props: {
27
40
  [key: string]: unknown;
28
41
  } | undefined): string;
29
42
  jsonToTsxField(xData?: XData): string;
43
+ jsonToTsxMotion(effects?: IEffect[]): string;
30
44
  slotsToTsxProps(slots: {
31
45
  [key: string]: INodeSchema | undefined;
32
46
  } | undefined, spaces?: number): string;
@@ -1,14 +1,15 @@
1
- import { Page, WebsiteFrame } from "@rxdrag/rxcms-models";
2
- import { Coder } from "./Coder";
1
+ import { WebsiteFrame } from "@rxdrag/rxcms-models";
2
+ import { Coder, TRootQuery } from "./Coder";
3
3
  import { TemplatesStore } from "./ComponentsStore";
4
+ import { IDataSourceSchema } from "@rxdrag/model-remix-lib";
4
5
  export declare class FrameCoder extends Coder {
5
6
  protected comsStore: TemplatesStore;
6
7
  protected frame: WebsiteFrame | undefined;
7
- protected page404: Page | undefined;
8
- protected pageError: Page | undefined;
9
- constructor(comsStore: TemplatesStore, frame: WebsiteFrame | undefined, page404: Page | undefined, pageError: Page | undefined);
8
+ constructor(comsStore: TemplatesStore, frame: WebsiteFrame | undefined);
10
9
  getFileName(): string;
11
- getFileCode(): string;
12
10
  getLoaderCode(): string;
13
- get404Code(): string;
11
+ getDatasItems(): string[];
12
+ getFileCode(): string;
13
+ getRootQueries(): TRootQuery[];
14
+ getDataSourceSchema(): IDataSourceSchema | undefined;
14
15
  }
@@ -0,0 +1,10 @@
1
+ import { Page } from "@rxdrag/rxcms-models";
2
+ import { Coder } from "./Coder";
3
+ import { TemplatesStore } from "./ComponentsStore";
4
+ export declare class Page404Coder extends Coder {
5
+ protected comsStore: TemplatesStore;
6
+ protected page?: Page | undefined;
7
+ constructor(comsStore: TemplatesStore, page?: Page | undefined);
8
+ getFileCode(): string;
9
+ getFileName(): string;
10
+ }
@@ -1,24 +1,21 @@
1
1
  import { Page } from "@rxdrag/rxcms-models";
2
- import { Coder } from "./Coder";
2
+ import { Coder, TRootQuery } from "./Coder";
3
3
  import { TemplatesStore } from "./ComponentsStore";
4
- import { XDataScope } from "@rxdrag/website-components";
5
- type RootScope = {
6
- funcName: string;
7
- scope: XDataScope;
8
- variableName: string;
9
- args?: (string | number)[];
10
- rootParams?: string[];
11
- };
4
+ import { IDataSourceSchema } from "@rxdrag/model-remix-lib";
12
5
  export declare class PageCoder extends Coder {
13
6
  protected comsStore: TemplatesStore;
14
7
  protected page: Page;
15
8
  constructor(comsStore: TemplatesStore, page: Page);
16
9
  getFileName(): string;
17
- getQuerys(): RootScope[];
10
+ getDataSourceSchema(): IDataSourceSchema | undefined;
11
+ getRootQueries(): TRootQuery[];
12
+ getLoaderCode(): string;
13
+ needEnvVariables(): boolean;
14
+ getArgsDeconstructCode(): string;
15
+ getFixedLoaderCode(): string;
16
+ getPageInfoCode(): string;
17
+ getDatasItems(): string[];
18
18
  getFileCode(): string;
19
19
  getComponentName(): string;
20
- getLoaderCode(): string;
21
- getUseLoaderCode(): string;
22
20
  getMetaCode(): string;
23
21
  }
24
- export {};
@@ -0,0 +1,10 @@
1
+ import { Page } from "@rxdrag/rxcms-models";
2
+ import { Coder } from "./Coder";
3
+ import { TemplatesStore } from "./ComponentsStore";
4
+ export declare class PageErrorCoder extends Coder {
5
+ protected comsStore: TemplatesStore;
6
+ protected page?: Page | undefined;
7
+ constructor(comsStore: TemplatesStore, page?: Page | undefined);
8
+ getFileCode(): string;
9
+ getFileName(): string;
10
+ }
@@ -0,0 +1,12 @@
1
+ import { ICustomizedDataSource } from "@rxdrag/model-remix-lib";
2
+ export type TTypeItem = {
3
+ name: string;
4
+ type: string;
5
+ };
6
+ export declare class TypesCoder {
7
+ protected items: TTypeItem[];
8
+ constructor();
9
+ addTypeItem(name: string, type: string): void;
10
+ addCustomedDataSource(dataSource: ICustomizedDataSource): void;
11
+ getTDatasTypes(): string;
12
+ }
@@ -5,7 +5,8 @@ import { StudioContextProps } from "../../components/StudioRoot";
5
5
  export declare class WebsiteGenerator {
6
6
  protected studioProps: StudioContextProps;
7
7
  protected materials: IMaterial[];
8
- constructor(studioProps: StudioContextProps, materials: IMaterial[]);
8
+ protected endpoint: string | undefined;
9
+ constructor(studioProps: StudioContextProps, materials: IMaterial[], endpoint: string | undefined);
9
10
  getComponents(): import("@rxdrag/rxcms-models").FrontComponent[];
10
11
  getPages(): Page[] | undefined;
11
12
  get404Page(): Page | undefined;
@@ -0,0 +1,2 @@
1
+ import { IFileTemplate } from "../IFileTemplate";
2
+ export declare const productApiTemplate: IFileTemplate;
@@ -0,0 +1,2 @@
1
+ import { IFileTemplate } from "../IFileTemplate";
2
+ export declare const askForQuoteTemplate: IFileTemplate;
@@ -0,0 +1,2 @@
1
+ import { IFileTemplate } from "../IFileTemplate";
2
+ export declare const page404Template: IFileTemplate;
@@ -0,0 +1,2 @@
1
+ import { IFileTemplate } from "../IFileTemplate";
2
+ export declare const pageErrorTemplate: IFileTemplate;
@@ -1,2 +1,2 @@
1
- import { IFileTemplate } from "./IFileTemplate";
1
+ import { IFileTemplate } from "../IFileTemplate";
2
2
  export declare const slugTemplate: IFileTemplate;
@@ -0,0 +1,2 @@
1
+ import { IFileTemplate } from "../IFileTemplate";
2
+ export declare const typesTemplate: IFileTemplate;
@@ -1,6 +1,7 @@
1
+ export declare const TAILWIND_CONFIG = "#tailwindConfig#";
1
2
  export declare const FRAME_CONTENT = "#frameContent#";
2
3
  export declare const FRAME_IMPORTS = "#frameImports#";
3
- export declare const FRAME_404 = "#frame404#";
4
+ export declare const TDATAS_TYPES = "#tdatasTypes#";
4
5
  export declare const CSS_CONTENT = "#cssContent#";
5
6
  export declare const PAGE_CONTENT = "#content#";
6
7
  export declare const PAGE_IMPORTS = "#imports#";
@@ -8,8 +9,9 @@ export declare const APP_NAME = "#appName#";
8
9
  export declare const APP_VERSION = "#appVersion#";
9
10
  export declare const APP_PPACKAGES = "#appPackages#";
10
11
  export declare const WEBSITE_ID = "#websiteId#";
12
+ export declare const ENTIFY_SERVER_URL = "#entifyServerUrl#";
11
13
  export declare const LOADER_FUNCTION = "#loader#";
12
14
  export declare const USE_LOADER_DATA = "#useLoaderData#";
13
- export declare const rxcmsModelsVersion = "0.3.36";
14
- export declare const entifyHooksVersion = "0.2.30";
15
- export declare const modelRemixLibVersion = "0.1.47";
15
+ export declare const rxcmsModelsVersion = "0.3.42";
16
+ export declare const entifyHooksVersion = "0.2.36";
17
+ export declare const modelRemixLibVersion = "0.1.53";
@@ -1,4 +1,4 @@
1
- import { XData } from "@rxdrag/website-components";
1
+ import { XData } from "@rxdrag/model-remix-lib";
2
2
  export type XDataSchema = XData & {
3
3
  children?: XDataSchema[];
4
4
  };