@rxdrag/website-studio 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{tailwind.worker-c33e84b9.js → tailwind.worker-97c39410.js} +2 -2
- package/dist/assets/tailwind.worker-97c39410.js.map +1 -0
- package/dist/astro-component/designer/index.d.ts +6 -4
- package/dist/astro-component/hooks/useExecuteClientScript.d.ts +3 -0
- package/dist/astro-component/preview/AstroComponentPreview.d.ts +3 -1
- package/dist/astro-component/preview/PreviewComponentView.d.ts +11 -0
- package/dist/astro-component/preview/useCalcVariables.d.ts +2 -0
- package/dist/components/CanvasPanel/ResizableWrapper.d.ts +1 -1
- package/dist/components/DocCanvas/ComponentTreeWidget/ComDesignerView.d.ts +5 -0
- package/dist/components/DocCanvas/ComponentTreeWidget/ComponentTreeWidget.d.ts +6 -0
- package/dist/components/DocCanvas/ComponentTreeWidget/classListToClassName.d.ts +6 -0
- package/dist/components/DocCanvas/ComponentTreeWidget/index.d.ts +3 -0
- package/dist/components/DocPreview/DocumentPreview.d.ts +4 -0
- package/dist/components/DocPreview/mock/MockEntify.d.ts +35 -0
- package/dist/components/DocPreview/mock/MockRxPage.d.ts +41 -0
- package/dist/components/DocPreview/mock/categories.d.ts +5 -0
- package/dist/components/DocPreview/mock/index.d.ts +1 -0
- package/dist/components/DocPreview/mock/langs.d.ts +2 -0
- package/dist/components/DocPreview/mock/posts.d.ts +2 -0
- package/dist/components/DocPreview/mock/products.d.ts +2 -0
- package/dist/components/DocPreview/mock/theme.d.ts +3 -0
- package/dist/components/DocPreview/mock/user.d.ts +2 -0
- package/dist/components/StatusBar/index.d.ts +4 -1
- package/dist/components/views/CodeViewport.d.ts +1 -1
- package/dist/components/views/PreviewViewport.d.ts +1 -1
- package/dist/{runtime/webcontainer → generator/hooks}/baseFiles.d.ts +9 -0
- package/dist/generator/hooks/index.d.ts +3 -0
- package/dist/generator/hooks/useGetComponentFiles.d.ts +5 -0
- package/dist/{runtime/webcontainer/useFiles.d.ts → generator/hooks/useGetFiles.d.ts} +12 -2
- package/dist/generator/hooks/useGetFrontComponents.d.ts +2 -0
- package/dist/generator/hooks/useGetPageFiles.d.ts +5 -0
- package/dist/generator/hooks/useGetPages.d.ts +2 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useImportVariables.d.ts +28 -0
- package/dist/hooks/usePreviews.d.ts +5 -0
- package/dist/hooks/useVfs.d.ts +2 -0
- package/dist/index-e69a2bfd.js.map +1 -1
- package/dist/index.mjs +13035 -14018
- package/dist/index.mjs.map +1 -1
- package/dist/recoil/atoms.d.ts +2 -2
- package/dist/recoil/selectors.d.ts +1 -1
- package/dist/style.css +6 -1
- package/package.json +21 -20
- package/dist/assets/tailwind.worker-c33e84b9.js.map +0 -1
- package/dist/components/views/OutputPanel.d.ts +0 -1
- package/dist/consts.d.ts +0 -11
- package/dist/generator/classes/ComponentCoder.d.ts +0 -12
- package/dist/generator/classes/ComponentsStore.d.ts +0 -11
- package/dist/generator/classes/Page404Coder.d.ts +0 -10
- package/dist/generator/classes/PageErrorCoder.d.ts +0 -10
- package/dist/generator/classes/WebsiteGenerator.d.ts +0 -16
- package/dist/generator/classes/consts.d.ts +0 -1
- package/dist/generator/templates/IFileTemplate.d.ts +0 -4
- package/dist/generator/templates/app/api.product.$id.d.ts +0 -2
- package/dist/generator/templates/app/ask-for-quote.d.ts +0 -2
- package/dist/generator/templates/app/deploy/env.d.ts +0 -2
- package/dist/generator/templates/app/deploy/get-env.d.ts +0 -2
- package/dist/generator/templates/app/deploy/remix-run-node.d.ts +0 -2
- package/dist/generator/templates/app/page404.d.ts +0 -2
- package/dist/generator/templates/app/pageError.d.ts +0 -2
- package/dist/generator/templates/app/slug.d.ts +0 -2
- package/dist/generator/templates/app/tailwind.d.ts +0 -2
- package/dist/generator/templates/app/types.d.ts +0 -2
- package/dist/generator/templates/env.d.ts +0 -2
- package/dist/generator/templates/eslintrc.d.ts +0 -2
- package/dist/generator/templates/gitignore.d.ts +0 -2
- package/dist/generator/templates/package.d.ts +0 -2
- package/dist/generator/templates/postcss.d.ts +0 -2
- package/dist/generator/templates/readme.d.ts +0 -2
- package/dist/generator/templates/remix.config.d.ts +0 -2
- package/dist/generator/templates/remix.env.d.ts +0 -2
- package/dist/generator/templates/tailwind.config.d.ts +0 -2
- package/dist/generator/templates/tsconfig.d.ts +0 -2
- package/dist/generator/templates/vars.d.ts +0 -17
- package/dist/generator/templates/vite.config.d.ts +0 -2
- package/dist/runtime/index.d.ts +0 -2
- package/dist/runtime/recoil.d.ts +0 -9
- package/dist/runtime/webcontainer/WebcontainerProvider.d.ts +0 -11
- package/dist/runtime/webcontainer/contexts.d.ts +0 -4
- package/dist/runtime/webcontainer/hooks/index.d.ts +0 -1
- package/dist/runtime/webcontainer/hooks/useWriteFile.d.ts +0 -3
- package/dist/runtime/webcontainer/index.d.ts +0 -2
- package/dist/runtime/webcontainer/useComponentFiles.d.ts +0 -5
- package/dist/runtime/webcontainer/usePageFiles.d.ts +0 -5
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { RXID_ATTR_NAME } from "@rxdrag/core-pro";
|
|
2
3
|
export declare const AstroComponentDesigner: (props: {
|
|
3
|
-
[
|
|
4
|
-
className?: string;
|
|
5
|
-
style?:
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
className?: string | undefined;
|
|
6
|
+
style?: import("react").CSSProperties | undefined;
|
|
6
7
|
children?: React.ReactNode;
|
|
7
|
-
|
|
8
|
+
"rx-id"?: string | undefined;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { RXID_ATTR_NAME } from "@rxdrag/core-pro";
|
|
2
3
|
export type AstroComponentPreviewProps = {
|
|
3
4
|
name: string;
|
|
4
5
|
className?: string;
|
|
5
6
|
style?: React.CSSProperties;
|
|
6
7
|
children?: React.ReactNode;
|
|
8
|
+
[RXID_ATTR_NAME]?: string;
|
|
7
9
|
};
|
|
8
10
|
export declare const AstroComponentPreview: (props: AstroComponentPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare const createComponentPreview: (name: string) => (props: Omit<AstroComponentPreviewProps, "
|
|
11
|
+
export declare const createComponentPreview: (name: string) => (props: Omit<AstroComponentPreviewProps, "name">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { INodeSchema } from "@rxdrag/schema-pro";
|
|
2
3
|
import { RXID_ATTR_NAME } from "@rxdrag/core-pro";
|
|
4
|
+
/**
|
|
5
|
+
* 将HTML格式的属性名转换为JSX格式的属性名
|
|
6
|
+
* 例如: stroke-width -> strokeWidth
|
|
7
|
+
* 但保留特殊属性如 aria-label, data-* 等
|
|
8
|
+
*/
|
|
9
|
+
export declare function convertHtmlAttrToJsxAttr(props: Record<string, unknown>): Record<string, unknown>;
|
|
3
10
|
export type ComponentPreviewProps = {
|
|
4
11
|
node: INodeSchema;
|
|
5
12
|
[RXID_ATTR_NAME]?: string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
slotContents?: Record<string, React.ReactNode>;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
6
17
|
};
|
|
7
18
|
export declare function PreviewComponentView(props: ComponentPreviewProps): any;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare function executeClassList(expr?: string | null, variables?: Record<string, unknown>): any;
|
|
3
|
+
export declare const ComDesignerView: React.MemoExoticComponent<(props: {
|
|
4
|
+
nodeId: string;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IDocument } from "@rxdrag/core-pro";
|
|
3
|
+
export type ComponentTreeWidgetProps = {
|
|
4
|
+
doc: IDocument;
|
|
5
|
+
};
|
|
6
|
+
export declare const ComponentTreeWidget: import("react").MemoExoticComponent<(props: ComponentTreeWidgetProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IEntify, ListConditions, PostPatinateOptions, PostsOptions, TPost, TPostCategory, TProduct, TProductCategory, TSize, TUser } from "@rxdrag/website-lib-core";
|
|
2
|
+
import { IQueryOptions, ListResult } from "@rxdrag/entify-hooks";
|
|
3
|
+
import { Lang, Theme } from "@rxdrag/rxcms-models";
|
|
4
|
+
export declare class MockEntify implements IEntify {
|
|
5
|
+
queryEntityList<T, WhereExp = unknown, OrderBy = unknown, DistinctExp = unknown>(options: IQueryOptions<T, WhereExp, OrderBy, DistinctExp>, staticKey?: string): Promise<ListResult<unknown> | undefined>;
|
|
6
|
+
getTheme(): Promise<Theme | undefined>;
|
|
7
|
+
getLangs(): Promise<Lang[] | undefined>;
|
|
8
|
+
getFeaturedProducts(count?: number): Promise<TProduct[] | undefined>;
|
|
9
|
+
getLatestPosts(count?: number): Promise<TPost[] | undefined>;
|
|
10
|
+
getPosts(options: PostsOptions): Promise<TPost[] | undefined>;
|
|
11
|
+
getPostListPaths(options: PostPatinateOptions): Promise<unknown>;
|
|
12
|
+
getPostPaths(): Promise<unknown>;
|
|
13
|
+
getPostBySlug(slug: string, coverSize: TSize | undefined): Promise<unknown>;
|
|
14
|
+
getPostSlugs(): Promise<Array<string | undefined>>;
|
|
15
|
+
getPostCategories(): Promise<TPostCategory[] | undefined>;
|
|
16
|
+
getPostCategoryBySlug(slug: string): Promise<TPostCategory | undefined>;
|
|
17
|
+
getProducts(conditions: ListConditions, imageSize: TSize | undefined): Promise<TProduct[] | undefined>;
|
|
18
|
+
getProductListPaths(options: {
|
|
19
|
+
category?: string;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
}): Promise<unknown>;
|
|
22
|
+
getCategoredProductListPaths(): Promise<unknown>;
|
|
23
|
+
getCategoredPostListPaths(): Promise<unknown>;
|
|
24
|
+
getProductBySlug(slug: string, imageSize: TSize | undefined): Promise<TProduct | undefined>;
|
|
25
|
+
getProductPaths(): Promise<unknown>;
|
|
26
|
+
getProductSlugs(): Promise<Array<string | undefined>>;
|
|
27
|
+
getProductIds(): Promise<Array<string | null | undefined>>;
|
|
28
|
+
getProductCategories(): Promise<TProductCategory[] | undefined>;
|
|
29
|
+
getProductCategoryBySlug(slug: string): Promise<TProductCategory | undefined>;
|
|
30
|
+
getOneUser(id: string): Promise<TUser | undefined>;
|
|
31
|
+
getUserPosts(userId: string): Promise<TPost[] | undefined>;
|
|
32
|
+
searchProducts(keyword: string): Promise<ListResult<TProduct> | undefined>;
|
|
33
|
+
getUserPaths(): Promise<unknown>;
|
|
34
|
+
createPagination(totalItems: number, pageSize: number): unknown;
|
|
35
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TBreadcrumbItem, TPost, TPostCategory, TProduct, TProductCategory } from "@rxdrag/website-lib-core";
|
|
2
|
+
export declare function postsPagination(options: {
|
|
3
|
+
currentPage: number;
|
|
4
|
+
totalPages: number;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
}): {
|
|
7
|
+
pages: (number | "...")[];
|
|
8
|
+
hasPreviousPage: boolean;
|
|
9
|
+
hasNextPage: boolean;
|
|
10
|
+
previousPageUrl: string;
|
|
11
|
+
nextPageUrl: string;
|
|
12
|
+
pageUrls: Record<number, string>;
|
|
13
|
+
currentPage: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function productsPagination(options: {
|
|
16
|
+
currentPage: number;
|
|
17
|
+
totalPages: number;
|
|
18
|
+
baseUrl?: string;
|
|
19
|
+
}): {
|
|
20
|
+
pages: (number | "...")[];
|
|
21
|
+
hasPreviousPage: boolean;
|
|
22
|
+
hasNextPage: boolean;
|
|
23
|
+
previousPageUrl: string;
|
|
24
|
+
nextPageUrl: string;
|
|
25
|
+
pageUrls: Record<number, string>;
|
|
26
|
+
currentPage: number;
|
|
27
|
+
};
|
|
28
|
+
export declare function productBreadcrumbs(product?: TProduct): TBreadcrumbItem[];
|
|
29
|
+
export declare function productListBreadcrumbs(category?: TProductCategory | null): TBreadcrumbItem[];
|
|
30
|
+
export declare function postBreadcrumbs(post?: TPost): TBreadcrumbItem[];
|
|
31
|
+
export declare function postListBreadcrumbs(category?: TPostCategory): TBreadcrumbItem[];
|
|
32
|
+
export declare function pageBreadcrumbs(title: string): TBreadcrumbItem[];
|
|
33
|
+
export declare const mockRxPage: {
|
|
34
|
+
postsPagination: typeof postsPagination;
|
|
35
|
+
productsPagination: typeof productsPagination;
|
|
36
|
+
postBreadcrumbs: typeof postBreadcrumbs;
|
|
37
|
+
postListBreadcrumbs: typeof postListBreadcrumbs;
|
|
38
|
+
breadcrumbs: typeof pageBreadcrumbs;
|
|
39
|
+
productBreadcrumbs: typeof productBreadcrumbs;
|
|
40
|
+
productListBreadcrumbs: typeof productListBreadcrumbs;
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MockEntify";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function PreviewViewport():
|
|
1
|
+
export declare function PreviewViewport(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { Theme } from "@rxdrag/rxcms-models";
|
|
2
|
+
export declare function useGetFiles(): (theme?: Theme) => Promise<{
|
|
2
3
|
src: {
|
|
3
4
|
directory: {
|
|
4
5
|
components: {
|
|
@@ -16,6 +17,15 @@ export declare function useFiles(): {
|
|
|
16
17
|
};
|
|
17
18
|
};
|
|
18
19
|
};
|
|
20
|
+
lib: {
|
|
21
|
+
directory: {
|
|
22
|
+
"index.ts": {
|
|
23
|
+
file: {
|
|
24
|
+
contents: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
19
29
|
"env.d.ts": {
|
|
20
30
|
file: {
|
|
21
31
|
contents: string;
|
|
@@ -47,4 +57,4 @@ export declare function useFiles(): {
|
|
|
47
57
|
};
|
|
48
58
|
};
|
|
49
59
|
};
|
|
50
|
-
}
|
|
60
|
+
}>;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ProductCategoryFields, ProductCategoryQueryOptions, ProductFields, ProductQueryOptions, PublishableStatus } from "@rxdrag/rxcms-models";
|
|
2
|
+
import dayjs from "dayjs";
|
|
3
|
+
import { MockEntify } from "../components/DocPreview/mock";
|
|
4
|
+
export declare function useImportVariables(): {
|
|
5
|
+
rx: MockEntify;
|
|
6
|
+
ProductCategoryQueryOptions: typeof ProductCategoryQueryOptions;
|
|
7
|
+
ProductCategoryFields: typeof ProductCategoryFields;
|
|
8
|
+
ProductQueryOptions: typeof ProductQueryOptions;
|
|
9
|
+
ProductFields: typeof ProductFields;
|
|
10
|
+
PublishableStatus: typeof PublishableStatus;
|
|
11
|
+
getEnvVariables: () => {
|
|
12
|
+
websiteId: string;
|
|
13
|
+
entifyServerUrl: string;
|
|
14
|
+
entifyGuestToken: string;
|
|
15
|
+
language: string;
|
|
16
|
+
formSalt: string;
|
|
17
|
+
};
|
|
18
|
+
dayjs: typeof dayjs;
|
|
19
|
+
rxPage: {
|
|
20
|
+
postsPagination: typeof import("../components/DocPreview/mock/MockRxPage").postsPagination;
|
|
21
|
+
productsPagination: typeof import("../components/DocPreview/mock/MockRxPage").productsPagination;
|
|
22
|
+
postBreadcrumbs: typeof import("../components/DocPreview/mock/MockRxPage").postBreadcrumbs;
|
|
23
|
+
postListBreadcrumbs: typeof import("../components/DocPreview/mock/MockRxPage").postListBreadcrumbs;
|
|
24
|
+
breadcrumbs: typeof import("../components/DocPreview/mock/MockRxPage").pageBreadcrumbs;
|
|
25
|
+
productBreadcrumbs: typeof import("../components/DocPreview/mock/MockRxPage").productBreadcrumbs;
|
|
26
|
+
productListBreadcrumbs: typeof import("../components/DocPreview/mock/MockRxPage").productListBreadcrumbs;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-e69a2bfd.js","sources":["../../../node_modules/.pnpm/@heroui+dom-animation@2.1.5_framer-motion@11.
|
|
1
|
+
{"version":3,"file":"index-e69a2bfd.js","sources":["../../../node_modules/.pnpm/@heroui+dom-animation@2.1.5_framer-motion@11.18.2_@emotion+is-prop-valid@1.3.1_react-dom@18.3_3dhswdhjtz6s5ttwxy6m3woumy/node_modules/@heroui/dom-animation/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/index.ts\nimport { domAnimation } from \"framer-motion\";\nvar index_default = domAnimation;\nexport {\n index_default as default\n};\n"],"names":[],"mappings":";AAIG,IAAC,gBAAgB;","x_google_ignoreList":[0]}
|