@rxdrag/website-studio 0.0.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/README.md +1 -0
- package/dist/WebsiteStudio.d.ts +4 -0
- package/dist/components/CanvasPanel/BgColorButton.d.ts +4 -0
- package/dist/components/CanvasPanel/CanvasDrawer.d.ts +11 -0
- package/dist/components/CanvasPanel/CanvasNavbar.d.ts +2 -0
- package/dist/components/CanvasPanel/CanvasToolbar.d.ts +5 -0
- package/dist/components/CanvasPanel/CanvasToolbarButton.d.ts +5 -0
- package/dist/components/CanvasPanel/CanvasTools.d.ts +1 -0
- package/dist/components/CanvasPanel/ResizableWrapper.d.ts +4 -0
- package/dist/components/CanvasPanel/ResizeHandler.d.ts +2 -0
- package/dist/components/CanvasPanel/Viewport.d.ts +6 -0
- package/dist/components/CanvasPanel/index.d.ts +6 -0
- package/dist/components/DocCanvas/DocCanvas.d.ts +10 -0
- package/dist/components/DocCanvas/DocFrame.d.ts +12 -0
- package/dist/components/DocCanvas/DocTreeView.d.ts +6 -0
- package/dist/components/DocCanvas/FrameRoutePage.d.ts +1 -0
- package/dist/components/DocCanvas/colors.d.ts +292 -0
- package/dist/components/DocCanvas/index.d.ts +5 -0
- package/dist/components/DocCanvas/useFrameInitialHTML.d.ts +5 -0
- package/dist/components/DocCanvas/useSetIFrameClasses.d.ts +1 -0
- package/dist/components/DocPreview/SchemaPreview.d.ts +8 -0
- package/dist/components/DocPreview/index.d.ts +5 -0
- package/dist/components/EditorScope/index.d.ts +11 -0
- package/dist/components/LeftDrawer/ComponentSchemaPanel/PropsConfig.d.ts +11 -0
- package/dist/components/LeftDrawer/ComponentSchemaPanel/index.d.ts +6 -0
- package/dist/components/LeftDrawer/ComponentTestPanel/PropsTest.d.ts +5 -0
- package/dist/components/LeftDrawer/ComponentTestPanel/index.d.ts +6 -0
- package/dist/components/LeftDrawer/InsertPanel/ComponentsRootNode.d.ts +7 -0
- package/dist/components/LeftDrawer/InsertPanel/SectionsNode.d.ts +8 -0
- package/dist/components/LeftDrawer/InsertPanel/index.d.ts +3 -0
- package/dist/components/LeftDrawer/LayersPanel/index.d.ts +3 -0
- package/dist/components/LeftDrawer/LeftPanel.d.ts +6 -0
- package/dist/components/LeftDrawer/SEMPanel/index.d.ts +3 -0
- package/dist/components/LeftDrawer/SEOPanel/index.d.ts +3 -0
- package/dist/components/LeftDrawer/SNSPanel/index.d.ts +3 -0
- package/dist/components/LeftDrawer/index.d.ts +7 -0
- package/dist/components/Leftbar/LeftbarButtion.d.ts +9 -0
- package/dist/components/Leftbar/ThemeSettingsDrawer/CssPanel.d.ts +2 -0
- package/dist/components/Leftbar/ThemeSettingsDrawer/ExtendsPanel.d.ts +1 -0
- package/dist/components/Leftbar/ThemeSettingsDrawer/ExtendsTable.d.ts +11 -0
- package/dist/components/Leftbar/ThemeSettingsDrawer/PostPanel.d.ts +5 -0
- package/dist/components/Leftbar/ThemeSettingsDrawer/ProductPanel.d.ts +5 -0
- package/dist/components/Leftbar/ThemeSettingsDrawer/RatioSelect.d.ts +2 -0
- package/dist/components/Leftbar/ThemeSettingsDrawer/TailwindPanel.d.ts +2 -0
- package/dist/components/Leftbar/ThemeSettingsDrawer/index.d.ts +1 -0
- package/dist/components/Leftbar/index.d.ts +17 -0
- package/dist/components/NodeNavs/NodeTag.d.ts +8 -0
- package/dist/components/NodeNavs/index.d.ts +6 -0
- package/dist/components/NodeNavs/useNodesOnPath.d.ts +2 -0
- package/dist/components/OutlineTree/OutlineNode.d.ts +5 -0
- package/dist/components/OutlineTree/index.d.ts +2 -0
- package/dist/components/PropsPanel/PromptInput.d.ts +4 -0
- package/dist/components/PropsPanel/index.d.ts +3 -0
- package/dist/components/SettingsForm/SettingsForm.d.ts +2 -0
- package/dist/components/SettingsForm/index.d.ts +2 -0
- package/dist/components/SettingsForm/locales.d.ts +188 -0
- package/dist/components/Sheet.d.ts +3 -0
- package/dist/components/StudioCore/ThemeSetup.d.ts +1 -0
- package/dist/components/StudioCore/Welcome.d.ts +1 -0
- package/dist/components/StudioCore/index.d.ts +6 -0
- package/dist/components/StudioCore/useMetaFilters.d.ts +2 -0
- package/dist/components/StudioRoot/StudioRoot.d.ts +5 -0
- package/dist/components/StudioRoot/contexts.d.ts +19 -0
- package/dist/components/StudioRoot/index.d.ts +2 -0
- package/dist/components/Toolbar/MenuContent/PagesNode.d.ts +6 -0
- package/dist/components/Toolbar/MenuContent/PredefinedPageNode.d.ts +11 -0
- package/dist/components/Toolbar/MenuContent/PredefinedPages.d.ts +6 -0
- package/dist/components/Toolbar/MenuContent/index.d.ts +6 -0
- package/dist/components/Toolbar/index.d.ts +2 -0
- package/dist/components/actions/CollectComponentButton.d.ts +1 -0
- package/dist/components/actions/CollectTemplateIconButton.d.ts +3 -0
- package/dist/components/actions/ComponentSaveButton.d.ts +1 -0
- package/dist/components/actions/FrameSaveButton.d.ts +1 -0
- package/dist/components/actions/PageSaveButton.d.ts +1 -0
- package/dist/components/actions/SaveAlertDialog.d.ts +6 -0
- package/dist/components/actions/SlotSettingButton.d.ts +1 -0
- package/dist/components/actions/TemplateSaveButton.d.ts +1 -0
- package/dist/components/common/ComponentCategoryList/ComponentCategoryModal.d.ts +4 -0
- package/dist/components/common/ComponentCategoryList/ComponentCategoryNode.d.ts +9 -0
- package/dist/components/common/ComponentCategoryList/ComponentList.d.ts +13 -0
- package/dist/components/common/ComponentCategoryList/ComponentModal.d.ts +9 -0
- package/dist/components/common/ComponentCategoryList/ComponentNode.d.ts +8 -0
- package/dist/components/common/ComponentCategoryList/index.d.ts +5 -0
- package/dist/components/common/ComponentCategoryListScope/index.d.ts +5 -0
- package/dist/components/common/MaterialNodeView.d.ts +4 -0
- package/dist/components/common/PageList/PageModal.d.ts +7 -0
- package/dist/components/common/PageList/PageNode.d.ts +7 -0
- package/dist/components/common/PageList/index.d.ts +6 -0
- package/dist/components/common/PageScope/index.d.ts +5 -0
- package/dist/components/common/TemplateCategoryList/TemplateCategoryModal.d.ts +6 -0
- package/dist/components/common/TemplateCategoryList/TemplateCategoryNode.d.ts +10 -0
- package/dist/components/common/TemplateCategoryList/TemplateList.d.ts +14 -0
- package/dist/components/common/TemplateCategoryList/TemplateModal.d.ts +10 -0
- package/dist/components/common/TemplateCategoryList/TemplateNode.d.ts +9 -0
- package/dist/components/common/TemplateCategoryList/index.d.ts +6 -0
- package/dist/components/common/TemplateCategoryListScope/index.d.ts +6 -0
- package/dist/components/common/WebComponents/index.d.ts +1 -0
- package/dist/components/common/WebComponents/useOrRegisterRecouceNode.d.ts +3 -0
- package/dist/components/common/index.d.ts +8 -0
- package/dist/components/common/utils.d.ts +5 -0
- package/dist/components/views/CodeViewport/consts.d.ts +1 -0
- package/dist/components/views/CodeViewport/index.d.ts +2 -0
- package/dist/components/views/CodeViewport/useTransCodeToJson.d.ts +4 -0
- package/dist/components/views/CodeViewport/useTransJsonToCode.d.ts +4 -0
- package/dist/components/views/DesignViewport.d.ts +7 -0
- package/dist/components/views/PreviewViewport.d.ts +4 -0
- package/dist/customize/consts.d.ts +2 -0
- package/dist/customize/designer/index.d.ts +7 -0
- package/dist/customize/funcs.d.ts +6 -0
- package/dist/customize/hooks/index.d.ts +2 -0
- package/dist/customize/hooks/useCustomizedMaterials.d.ts +2 -0
- package/dist/customize/hooks/useFrontComponent.d.ts +1 -0
- package/dist/customize/index.d.ts +1 -0
- package/dist/customize/preview.d.ts +7 -0
- package/dist/customize/setter/CustomizedComponentPropsSetter/InputControl.d.ts +7 -0
- package/dist/customize/setter/CustomizedComponentPropsSetter/index.d.ts +6 -0
- package/dist/customize/setter/index.d.ts +1 -0
- package/dist/decorators/SlotDecorator.d.ts +8 -0
- package/dist/hooks/useCheckSlotName.d.ts +1 -0
- package/dist/hooks/useFrameSchema.d.ts +16 -0
- package/dist/hooks/useIsSlotable.d.ts +1 -0
- package/dist/hooks/useMergeComponentSchema.d.ts +3 -0
- package/dist/hooks/useSchema.d.ts +19 -0
- package/dist/hooks/useSplitComponentSchema.d.ts +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +15544 -0
- package/dist/index.mjs.map +1 -0
- package/dist/plugins/ContentEditor/controls/AbstractMiniButton.d.ts +10 -0
- package/dist/plugins/ContentEditor/controls/MarkButton.d.ts +15 -0
- package/dist/plugins/ContentEditor/getClildrenNodes.d.ts +3 -0
- package/dist/plugins/ContentEditor/index.d.ts +30 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/preview/ComponentView.d.ts +19 -0
- package/dist/preview/PreviewRender.d.ts +10 -0
- package/dist/preview/contexts.d.ts +3 -0
- package/dist/preview/hooks/defualtProductRichText.d.ts +82 -0
- package/dist/preview/hooks/index.d.ts +2 -0
- package/dist/preview/hooks/useMotionProps.d.ts +3 -0
- package/dist/preview/hooks/usePreviewComponent.d.ts +45 -0
- package/dist/preview/hooks/usePreviewComponents.d.ts +1 -0
- package/dist/preview/hooks/useValue.d.ts +10 -0
- package/dist/preview/index.d.ts +5 -0
- package/dist/preview/transform.d.ts +4 -0
- package/dist/recoil/atoms.d.ts +21 -0
- package/dist/recoil/selectors.d.ts +1 -0
- package/dist/resources/data/fields.d.ts +8 -0
- package/dist/resources/data/index.d.ts +2 -0
- package/dist/resources/data/roots.d.ts +4 -0
- package/dist/resources/index.d.ts +2 -0
- package/dist/resources/resourceTreeNodes.d.ts +2 -0
- package/dist/resources/types.d.ts +7 -0
- package/dist/setters/index.d.ts +2 -0
- package/dist/style.css +21 -0
- package/dist/types.d.ts +31 -0
- package/package.json +76 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IDesignerEngine, ITreeNode } from "@rxdrag/core-pro";
|
|
2
|
+
export declare abstract class AbstractMiniButton {
|
|
3
|
+
name: string;
|
|
4
|
+
protected engine: IDesignerEngine;
|
|
5
|
+
protected htmlElement: HTMLElement | null;
|
|
6
|
+
constructor(name: string, engine: IDesignerEngine);
|
|
7
|
+
abstract onRender(node: ITreeNode): HTMLElement | null;
|
|
8
|
+
teardown(): void;
|
|
9
|
+
protected createHtmlElement(): HTMLDivElement;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IDesignerEngine, ITreeNode } from "@rxdrag/core-pro";
|
|
2
|
+
import { AbstractMiniButton } from "./AbstractMiniButton";
|
|
3
|
+
export declare class MarkButton extends AbstractMiniButton {
|
|
4
|
+
protected engine: IDesignerEngine;
|
|
5
|
+
protected mark: string;
|
|
6
|
+
protected innerHtml: string;
|
|
7
|
+
private unsubscribe;
|
|
8
|
+
private nodeId;
|
|
9
|
+
changed: boolean;
|
|
10
|
+
constructor(engine: IDesignerEngine, mark: string, innerHtml: string);
|
|
11
|
+
handleEditingChange: (nodeId: string | null) => void;
|
|
12
|
+
handleClick: (e: MouseEvent) => void;
|
|
13
|
+
onRender(node: ITreeNode): HTMLElement | null;
|
|
14
|
+
teardown(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IPlugin, IDesignerEngine, DraggingNodesState, DraggingResourceState } from "@rxdrag/core-pro";
|
|
2
|
+
export declare class ContentEditorImpl implements IPlugin {
|
|
3
|
+
protected engine: IDesignerEngine;
|
|
4
|
+
name: string;
|
|
5
|
+
private toolbarHtml;
|
|
6
|
+
private controls;
|
|
7
|
+
resizeObserver: ResizeObserver;
|
|
8
|
+
private unsubscribe;
|
|
9
|
+
private editingNodeId;
|
|
10
|
+
private refreshedFlag;
|
|
11
|
+
private unCanvasScroll;
|
|
12
|
+
private unCanvasResize;
|
|
13
|
+
private draggingNodesOff;
|
|
14
|
+
private draggingResourceOff;
|
|
15
|
+
constructor(engine: IDesignerEngine);
|
|
16
|
+
private refresh;
|
|
17
|
+
onResize: () => void;
|
|
18
|
+
onMutation: () => void;
|
|
19
|
+
handleEditingChange: (nodeId: string | null) => void;
|
|
20
|
+
render: () => void;
|
|
21
|
+
handleDraggingNodes: (dragging: DraggingNodesState | null) => void;
|
|
22
|
+
handleDraggingResource: (dragging: DraggingResourceState | null) => void;
|
|
23
|
+
onViewportChange: () => void;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
private positionLimit;
|
|
26
|
+
private clear;
|
|
27
|
+
private resetButtons;
|
|
28
|
+
private buttonChanged;
|
|
29
|
+
}
|
|
30
|
+
export declare const ContentEditor: (engine: IDesignerEngine) => ContentEditorImpl;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ContentEditor";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ID } from "@rxdrag/shared";
|
|
3
|
+
import { INodeSchema } from "@rxdrag/schema-pro";
|
|
4
|
+
import { MetaFilter } from "@rxdrag/react-core-pro";
|
|
5
|
+
import { RXID_ATTR_NAME } from "@rxdrag/core-pro";
|
|
6
|
+
import { IEffect, XData } from "@rxdrag/website-components";
|
|
7
|
+
export interface IComponentRenderSchema extends INodeSchema<XData, IEffect[]> {
|
|
8
|
+
id: ID;
|
|
9
|
+
children?: IComponentRenderSchema[];
|
|
10
|
+
slots?: {
|
|
11
|
+
[name: string]: IComponentRenderSchema | undefined;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export type ComponentViewProps = {
|
|
15
|
+
node: IComponentRenderSchema;
|
|
16
|
+
metaFilters?: MetaFilter[];
|
|
17
|
+
[RXID_ATTR_NAME]?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const ComponentView: React.NamedExoticComponent<ComponentViewProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { INodeSchema } from "@rxdrag/schema-pro";
|
|
3
|
+
import { IReactComponents } from "@rxdrag/react-shared";
|
|
4
|
+
import { MetaFilter } from "@rxdrag/react-core-pro";
|
|
5
|
+
export declare const PreviewRender: import("react").MemoExoticComponent<(props: {
|
|
6
|
+
schema: INodeSchema;
|
|
7
|
+
components: IReactComponents | undefined;
|
|
8
|
+
metaFilters?: MetaFilter[];
|
|
9
|
+
customziedSlots?: Record<string, React.ReactNode>;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export declare const defualtProductContent: {
|
|
2
|
+
nodes: ({
|
|
3
|
+
children: {
|
|
4
|
+
text: string;
|
|
5
|
+
}[];
|
|
6
|
+
type: string;
|
|
7
|
+
id: string;
|
|
8
|
+
colSizes?: undefined;
|
|
9
|
+
theme?: undefined;
|
|
10
|
+
width?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
children: {
|
|
13
|
+
children: {
|
|
14
|
+
children: ({
|
|
15
|
+
children: {
|
|
16
|
+
align: string;
|
|
17
|
+
children: {
|
|
18
|
+
text: string;
|
|
19
|
+
}[];
|
|
20
|
+
type: string;
|
|
21
|
+
}[];
|
|
22
|
+
type: string;
|
|
23
|
+
} | {
|
|
24
|
+
children: {
|
|
25
|
+
children: ({
|
|
26
|
+
text: string;
|
|
27
|
+
sub?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
sub: boolean;
|
|
30
|
+
text: string;
|
|
31
|
+
})[];
|
|
32
|
+
type: string;
|
|
33
|
+
}[];
|
|
34
|
+
type: string;
|
|
35
|
+
})[];
|
|
36
|
+
type: string;
|
|
37
|
+
}[];
|
|
38
|
+
type: string;
|
|
39
|
+
}[];
|
|
40
|
+
colSizes: number[];
|
|
41
|
+
theme: string;
|
|
42
|
+
type: string;
|
|
43
|
+
width: null;
|
|
44
|
+
id: string;
|
|
45
|
+
})[];
|
|
46
|
+
};
|
|
47
|
+
export declare const defualtProductContent2: {
|
|
48
|
+
nodes: ({
|
|
49
|
+
children: {
|
|
50
|
+
text: string;
|
|
51
|
+
}[];
|
|
52
|
+
type: string;
|
|
53
|
+
id: string;
|
|
54
|
+
url?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
children: {
|
|
57
|
+
children: {
|
|
58
|
+
text: string;
|
|
59
|
+
}[];
|
|
60
|
+
type: string;
|
|
61
|
+
}[];
|
|
62
|
+
type: string;
|
|
63
|
+
id: string;
|
|
64
|
+
url?: undefined;
|
|
65
|
+
} | {
|
|
66
|
+
children: {
|
|
67
|
+
text: string;
|
|
68
|
+
}[];
|
|
69
|
+
type: string;
|
|
70
|
+
url: string;
|
|
71
|
+
id: string;
|
|
72
|
+
})[];
|
|
73
|
+
};
|
|
74
|
+
export declare const defaultPostContent: {
|
|
75
|
+
nodes: {
|
|
76
|
+
children: {
|
|
77
|
+
text: string;
|
|
78
|
+
}[];
|
|
79
|
+
id: string;
|
|
80
|
+
type: string;
|
|
81
|
+
}[];
|
|
82
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IComponentRenderSchema } from "../ComponentView";
|
|
2
|
+
export declare const motionComponents: {
|
|
3
|
+
a: import("framer-motion").ForwardRefComponent<HTMLAnchorElement, import("framer-motion").HTMLMotionProps<"a">>;
|
|
4
|
+
article: import("framer-motion").ForwardRefComponent<HTMLElement, import("framer-motion").HTMLMotionProps<"article">>;
|
|
5
|
+
aside: import("framer-motion").ForwardRefComponent<HTMLElement, import("framer-motion").HTMLMotionProps<"aside">>;
|
|
6
|
+
audio: import("framer-motion").ForwardRefComponent<HTMLAudioElement, import("framer-motion").HTMLMotionProps<"audio">>;
|
|
7
|
+
button: import("framer-motion").ForwardRefComponent<HTMLButtonElement, import("framer-motion").HTMLMotionProps<"button">>;
|
|
8
|
+
canvas: import("framer-motion").ForwardRefComponent<HTMLCanvasElement, import("framer-motion").HTMLMotionProps<"canvas">>;
|
|
9
|
+
div: import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>;
|
|
10
|
+
footer: import("framer-motion").ForwardRefComponent<HTMLElement, import("framer-motion").HTMLMotionProps<"footer">>;
|
|
11
|
+
form: import("framer-motion").ForwardRefComponent<HTMLFormElement, import("framer-motion").HTMLMotionProps<"form">>;
|
|
12
|
+
h1: import("framer-motion").ForwardRefComponent<HTMLHeadingElement, import("framer-motion").HTMLMotionProps<"h1">>;
|
|
13
|
+
h2: import("framer-motion").ForwardRefComponent<HTMLHeadingElement, import("framer-motion").HTMLMotionProps<"h2">>;
|
|
14
|
+
h3: import("framer-motion").ForwardRefComponent<HTMLHeadingElement, import("framer-motion").HTMLMotionProps<"h3">>;
|
|
15
|
+
h4: import("framer-motion").ForwardRefComponent<HTMLHeadingElement, import("framer-motion").HTMLMotionProps<"h4">>;
|
|
16
|
+
h5: import("framer-motion").ForwardRefComponent<HTMLHeadingElement, import("framer-motion").HTMLMotionProps<"h5">>;
|
|
17
|
+
h6: import("framer-motion").ForwardRefComponent<HTMLHeadingElement, import("framer-motion").HTMLMotionProps<"h6">>;
|
|
18
|
+
header: import("framer-motion").ForwardRefComponent<HTMLElement, import("framer-motion").HTMLMotionProps<"header">>;
|
|
19
|
+
hr: import("framer-motion").ForwardRefComponent<HTMLHRElement, import("framer-motion").HTMLMotionProps<"hr">>;
|
|
20
|
+
iframe: import("framer-motion").ForwardRefComponent<HTMLIFrameElement, import("framer-motion").HTMLMotionProps<"iframe">>;
|
|
21
|
+
img: import("framer-motion").ForwardRefComponent<HTMLImageElement, import("framer-motion").HTMLMotionProps<"img">>;
|
|
22
|
+
input: import("framer-motion").ForwardRefComponent<HTMLInputElement, import("framer-motion").HTMLMotionProps<"input">>;
|
|
23
|
+
li: import("framer-motion").ForwardRefComponent<HTMLLIElement, import("framer-motion").HTMLMotionProps<"li">>;
|
|
24
|
+
main: import("framer-motion").ForwardRefComponent<HTMLElement, import("framer-motion").HTMLMotionProps<"main">>;
|
|
25
|
+
nav: import("framer-motion").ForwardRefComponent<HTMLElement, import("framer-motion").HTMLMotionProps<"nav">>;
|
|
26
|
+
ol: import("framer-motion").ForwardRefComponent<HTMLOListElement, import("framer-motion").HTMLMotionProps<"ol">>;
|
|
27
|
+
option: import("framer-motion").ForwardRefComponent<HTMLOptionElement, import("framer-motion").HTMLMotionProps<"option">>;
|
|
28
|
+
p: import("framer-motion").ForwardRefComponent<HTMLParagraphElement, import("framer-motion").HTMLMotionProps<"p">>;
|
|
29
|
+
picture: import("framer-motion").ForwardRefComponent<HTMLElement, import("framer-motion").HTMLMotionProps<"picture">>;
|
|
30
|
+
section: import("framer-motion").ForwardRefComponent<HTMLElement, import("framer-motion").HTMLMotionProps<"section">>;
|
|
31
|
+
select: import("framer-motion").ForwardRefComponent<HTMLSelectElement, import("framer-motion").HTMLMotionProps<"select">>;
|
|
32
|
+
span: import("framer-motion").ForwardRefComponent<HTMLSpanElement, import("framer-motion").HTMLMotionProps<"span">>;
|
|
33
|
+
svg: import("framer-motion").ForwardRefComponent<SVGSVGElement, import("framer-motion").SVGMotionProps<SVGSVGElement>>;
|
|
34
|
+
table: import("framer-motion").ForwardRefComponent<HTMLTableElement, import("framer-motion").HTMLMotionProps<"table">>;
|
|
35
|
+
tbody: import("framer-motion").ForwardRefComponent<HTMLTableSectionElement, import("framer-motion").HTMLMotionProps<"tbody">>;
|
|
36
|
+
td: import("framer-motion").ForwardRefComponent<HTMLTableDataCellElement, import("framer-motion").HTMLMotionProps<"td">>;
|
|
37
|
+
textarea: import("framer-motion").ForwardRefComponent<HTMLTextAreaElement, import("framer-motion").HTMLMotionProps<"textarea">>;
|
|
38
|
+
tfoot: import("framer-motion").ForwardRefComponent<HTMLTableSectionElement, import("framer-motion").HTMLMotionProps<"tfoot">>;
|
|
39
|
+
th: import("framer-motion").ForwardRefComponent<HTMLTableHeaderCellElement, import("framer-motion").HTMLMotionProps<"th">>;
|
|
40
|
+
thead: import("framer-motion").ForwardRefComponent<HTMLTableSectionElement, import("framer-motion").HTMLMotionProps<"thead">>;
|
|
41
|
+
tr: import("framer-motion").ForwardRefComponent<HTMLTableRowElement, import("framer-motion").HTMLMotionProps<"tr">>;
|
|
42
|
+
ul: import("framer-motion").ForwardRefComponent<HTMLUListElement, import("framer-motion").HTMLMotionProps<"ul">>;
|
|
43
|
+
video: import("framer-motion").ForwardRefComponent<HTMLVideoElement, import("framer-motion").HTMLMotionProps<"video">>;
|
|
44
|
+
};
|
|
45
|
+
export declare function usePreviewComponent(node: IComponentRenderSchema): import("@rxdrag/react-shared").ReactComponent | import("framer-motion").ForwardRefComponent<HTMLAnchorElement, import("framer-motion").HTMLMotionProps<"a">> | import("framer-motion").ForwardRefComponent<HTMLButtonElement, import("framer-motion").HTMLMotionProps<"button">> | import("framer-motion").ForwardRefComponent<HTMLCanvasElement, import("framer-motion").HTMLMotionProps<"canvas">> | import("framer-motion").ForwardRefComponent<HTMLFormElement, import("framer-motion").HTMLMotionProps<"form">> | import("framer-motion").ForwardRefComponent<HTMLHRElement, import("framer-motion").HTMLMotionProps<"hr">> | import("framer-motion").ForwardRefComponent<HTMLIFrameElement, import("framer-motion").HTMLMotionProps<"iframe">> | import("framer-motion").ForwardRefComponent<HTMLImageElement, import("framer-motion").HTMLMotionProps<"img">> | import("framer-motion").ForwardRefComponent<HTMLInputElement, import("framer-motion").HTMLMotionProps<"input">> | import("framer-motion").ForwardRefComponent<HTMLLIElement, import("framer-motion").HTMLMotionProps<"li">> | import("framer-motion").ForwardRefComponent<HTMLOListElement, import("framer-motion").HTMLMotionProps<"ol">> | import("framer-motion").ForwardRefComponent<HTMLOptionElement, import("framer-motion").HTMLMotionProps<"option">> | import("framer-motion").ForwardRefComponent<HTMLSelectElement, import("framer-motion").HTMLMotionProps<"select">> | import("framer-motion").ForwardRefComponent<SVGSVGElement, import("framer-motion").SVGMotionProps<SVGSVGElement>> | import("framer-motion").ForwardRefComponent<HTMLTableElement, import("framer-motion").HTMLMotionProps<"table">> | import("framer-motion").ForwardRefComponent<HTMLTableSectionElement, import("framer-motion").HTMLMotionProps<"tbody">> | import("framer-motion").ForwardRefComponent<HTMLTableDataCellElement, import("framer-motion").HTMLMotionProps<"td">> | import("framer-motion").ForwardRefComponent<HTMLTextAreaElement, import("framer-motion").HTMLMotionProps<"textarea">> | import("framer-motion").ForwardRefComponent<HTMLTableRowElement, import("framer-motion").HTMLMotionProps<"tr">> | import("framer-motion").ForwardRefComponent<HTMLVideoElement, import("framer-motion").HTMLMotionProps<"video">> | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePreviewComponents(): import("@rxdrag/react-shared").IReactComponents;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { XData } from "@rxdrag/website-components";
|
|
2
|
+
export declare function useValue(xData: XData | undefined): {
|
|
3
|
+
value?: unknown;
|
|
4
|
+
isList?: boolean | undefined;
|
|
5
|
+
};
|
|
6
|
+
export declare const createMedia: (xData: XData | undefined) => {
|
|
7
|
+
value: string;
|
|
8
|
+
} | {
|
|
9
|
+
value: undefined;
|
|
10
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { INodeSchema } from "@rxdrag/schema-pro";
|
|
2
|
+
import { IComponentRenderSchema } from "./ComponentView";
|
|
3
|
+
import { IFieldMeta } from "@rxdrag/fieldy-pro";
|
|
4
|
+
export declare function transToRenderSchema(node: INodeSchema<IFieldMeta | undefined>): IComponentRenderSchema;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DeviceType, DrawerConentType, SelectedContent, ViewMode } from "../types";
|
|
2
|
+
import { FrontComponent, Page } from "@rxdrag/rxcms-models";
|
|
3
|
+
export declare const defaultDesktopWidth = 1280;
|
|
4
|
+
export declare const defaultTabletWidth = 800;
|
|
5
|
+
export declare const defaultMobileWidth = 480;
|
|
6
|
+
export declare const selectedContentState: import("recoil").RecoilState<SelectedContent | undefined>;
|
|
7
|
+
export declare const willSeletedContentState: import("recoil").RecoilState<SelectedContent | undefined>;
|
|
8
|
+
export declare const drawerTypeState: import("recoil").RecoilState<DrawerConentType | undefined>;
|
|
9
|
+
export declare const showOutlineState: import("recoil").RecoilState<boolean>;
|
|
10
|
+
export declare const deviceTypeState: import("recoil").RecoilState<DeviceType>;
|
|
11
|
+
export declare const viewModeState: import("recoil").RecoilState<ViewMode>;
|
|
12
|
+
export declare const isHomeState: import("recoil").RecoilState<boolean>;
|
|
13
|
+
export declare const bgColorState: import("recoil").RecoilState<string>;
|
|
14
|
+
export declare const showFrameState: import("recoil").RecoilState<boolean>;
|
|
15
|
+
export declare const viewPortWidthState: import("recoil").RecoilState<number>;
|
|
16
|
+
export declare const viewPortHeightState: import("recoil").RecoilState<number>;
|
|
17
|
+
export declare const canvasWidthState: import("recoil").RecoilState<number>;
|
|
18
|
+
export declare const editingComponentState: import("recoil").RecoilState<FrontComponent | undefined>;
|
|
19
|
+
export declare const editingPageState: import("recoil").RecoilState<Page | undefined>;
|
|
20
|
+
export declare const contentChangedState: import("recoil").RecoilState<boolean | undefined>;
|
|
21
|
+
export declare const canvasRefIdState: import("recoil").RecoilState<string | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const scaleSelector: import("recoil").RecoilValueReadOnly<number>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IResourceTreeNode } from "../types";
|
|
2
|
+
export declare const settingsFields: IResourceTreeNode[];
|
|
3
|
+
export declare const userFields: IResourceTreeNode[];
|
|
4
|
+
export declare const productCategoryFields: IResourceTreeNode[];
|
|
5
|
+
export declare const postCategoryFields: IResourceTreeNode[];
|
|
6
|
+
export declare const productFields: IResourceTreeNode[];
|
|
7
|
+
export declare const attachmentFields: IResourceTreeNode[];
|
|
8
|
+
export declare const postFields: IResourceTreeNode[];
|
package/dist/style.css
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.canvas-resize-handler{
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
.canvas-resize-handler::after {
|
|
5
|
+
content: "";
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 50%;
|
|
8
|
+
left: 50%;
|
|
9
|
+
transform: translate(-50%, -50%);
|
|
10
|
+
width: 0.4rem;
|
|
11
|
+
height: 3rem;
|
|
12
|
+
max-height: 100%;
|
|
13
|
+
background-color: gray;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
border-radius: 0.2rem;
|
|
16
|
+
opacity: 0.5;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.canvas-resize-handler:hover::after{
|
|
20
|
+
opacity: 0.7;
|
|
21
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare enum ContentType {
|
|
2
|
+
Page = "page",
|
|
3
|
+
Component = "component",
|
|
4
|
+
PredefinedPage = "PredefinedPage",
|
|
5
|
+
Template = "Template",
|
|
6
|
+
Frame = "Frame"
|
|
7
|
+
}
|
|
8
|
+
export type SelectedContent = {
|
|
9
|
+
id: string;
|
|
10
|
+
type: ContentType;
|
|
11
|
+
breadcrumbs?: string[];
|
|
12
|
+
};
|
|
13
|
+
export declare enum DrawerConentType {
|
|
14
|
+
Insert = "insert",
|
|
15
|
+
Layers = "layers",
|
|
16
|
+
SEO = "seo",
|
|
17
|
+
SEM = "sem",
|
|
18
|
+
SNS = "sns",
|
|
19
|
+
ComponentSchema = "componentSchema",
|
|
20
|
+
ComponentTest = "componentTest"
|
|
21
|
+
}
|
|
22
|
+
export declare enum DeviceType {
|
|
23
|
+
Mobile = "mobile",
|
|
24
|
+
Tablet = "tablet",
|
|
25
|
+
Desktop = "desktop"
|
|
26
|
+
}
|
|
27
|
+
export declare enum ViewMode {
|
|
28
|
+
Design = "design",
|
|
29
|
+
Preview = "preview",
|
|
30
|
+
Code = "code"
|
|
31
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rxdrag/website-studio",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"module": "dist/index.mjs",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"@types/he": "^1.2.3",
|
|
13
|
+
"@types/lodash-es": "^4.14.191",
|
|
14
|
+
"@types/react": "^18.2.22",
|
|
15
|
+
"@types/react-dom": "^18.2.7",
|
|
16
|
+
"@types/tinycolor2": "^1.4.6",
|
|
17
|
+
"autoprefixer": "^10.4.17",
|
|
18
|
+
"eslint": "^7.32.0",
|
|
19
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
20
|
+
"postcss": "^8.4.33",
|
|
21
|
+
"react": "^18.2.0",
|
|
22
|
+
"react-dom": "^18.2.0",
|
|
23
|
+
"tailwindcss": "^3.3.0",
|
|
24
|
+
"typescript": "^5",
|
|
25
|
+
"@rxdrag/eslint-config-custom": "0.2.1",
|
|
26
|
+
"@rxdrag/tsconfig": "0.2.0"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@monaco-editor/react": "^4.6.0",
|
|
30
|
+
"react": "^18.2.0",
|
|
31
|
+
"react-dom": "^18.2.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@faker-js/faker": "^9.2.0",
|
|
35
|
+
"@iconify/react": "^5.0.2",
|
|
36
|
+
"@nextui-org/react": "^2.4.8",
|
|
37
|
+
"@rxdrag/locales": "^0.6.0",
|
|
38
|
+
"@rxdrag/react-shared": "^0.6.0",
|
|
39
|
+
"@rxdrag/shared": "^0.6.0",
|
|
40
|
+
"dayjs": "^1.11.7",
|
|
41
|
+
"framer-motion": "^11.1.9",
|
|
42
|
+
"jszip": "^3.10.1",
|
|
43
|
+
"he": "^1.2.0",
|
|
44
|
+
"lodash-es": "^4.17.21",
|
|
45
|
+
"react-colorful": "^5.6.1",
|
|
46
|
+
"react-router-dom": "^6.9.0",
|
|
47
|
+
"redux": "^4.2.1",
|
|
48
|
+
"recoil": "^0.7.7",
|
|
49
|
+
"tinycolor2": "^1.6.0",
|
|
50
|
+
"@rxdrag/biz-components": "0.3.45",
|
|
51
|
+
"@rxdrag/entify-hooks": "0.2.29",
|
|
52
|
+
"@rxdrag/fieldy-nextui": "0.0.2",
|
|
53
|
+
"@rxdrag/fieldy-pro": "0.2.2",
|
|
54
|
+
"@rxdrag/react-core-pro": "0.2.2",
|
|
55
|
+
"@rxdrag/core-pro": "0.2.2",
|
|
56
|
+
"@rxdrag/react-fieldy-pro": "0.2.2",
|
|
57
|
+
"@rxdrag/rxcms-common": "0.2.43",
|
|
58
|
+
"@rxdrag/react-runner-pro": "0.2.2",
|
|
59
|
+
"@rxdrag/rxcms-entify-wrapper": "0.2.36",
|
|
60
|
+
"@rxdrag/rxcms-model-hooks": "0.2.42",
|
|
61
|
+
"@rxdrag/rxcms-models": "0.3.35",
|
|
62
|
+
"@rxdrag/rxcms-models-ui": "0.3.45",
|
|
63
|
+
"@rxdrag/rxcms-track": "0.1.0",
|
|
64
|
+
"@rxdrag/schema-pro": "0.2.2",
|
|
65
|
+
"@rxdrag/schema-setters": "0.0.3",
|
|
66
|
+
"@rxdrag/website-materials": "0.2.45",
|
|
67
|
+
"@rxdrag/website-components": "1.2.44",
|
|
68
|
+
"@rxdrag/website-preview": "0.2.2"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"lint": "eslint . --ext .ts,tsx",
|
|
72
|
+
"clean": "rimraf -rf .turbo && rimraf -rf node_modules && rimraf -rf dist",
|
|
73
|
+
"build": "vite build"
|
|
74
|
+
},
|
|
75
|
+
"typings": "dist/index.d.ts"
|
|
76
|
+
}
|