@chamn/engine 0.0.4 → 0.0.7
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/.eslintrc.js +1 -0
- package/CHANGELOG.md +16 -0
- package/README.md +31 -0
- package/build.config.js +4 -3
- package/dist/Engine.module.scss.d.ts +5 -0
- package/dist/component/CSSEditor/index.d.ts +16 -0
- package/dist/component/CSSEditor/style.module.scss.d.ts +6 -0
- package/dist/component/CSSPropertiesEditor/cssProperties.d.ts +898 -0
- package/dist/component/CSSPropertiesEditor/index.d.ts +43 -0
- package/dist/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
- package/dist/component/CSSPropertiesEditor/util.d.ts +1 -0
- package/dist/component/CSSPropertiesVariableBindEditor/cssProperties.d.ts +898 -0
- package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +37 -0
- package/dist/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
- package/dist/component/CSSPropertiesVariableBindEditor/util.d.ts +1 -0
- package/dist/component/ClassNameEditor/index.d.ts +16 -0
- package/dist/component/CustomSchemaForm/components/Form/Field/index.d.ts +11 -0
- package/dist/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
- package/dist/component/CustomSchemaForm/components/Form/context.d.ts +10 -0
- package/dist/component/CustomSchemaForm/components/Form/index.d.ts +17 -0
- package/dist/component/CustomSchemaForm/components/SetterSwitcher/index.d.ts +12 -0
- package/dist/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/ArrayItem.d.ts +11 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/SortItemOrderModal.d.ts +10 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/index.d.ts +14 -0
- package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
- package/dist/component/CustomSchemaForm/components/Setters/BooleanSetter/index.d.ts +5 -0
- package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/index.d.ts +6 -0
- package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
- package/dist/component/CustomSchemaForm/components/Setters/ExpressionSetter/index.d.ts +8 -0
- package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/defaultDts.d.ts +1 -0
- package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/index.d.ts +2 -0
- package/dist/component/CustomSchemaForm/components/Setters/JSONSetter/index.d.ts +2 -0
- package/dist/component/CustomSchemaForm/components/Setters/NumberSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/SelectSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/ShapeSetter/index.d.ts +8 -0
- package/dist/component/CustomSchemaForm/components/Setters/StringSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/TextAreaSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +19 -0
- package/dist/component/CustomSchemaForm/context.d.ts +15 -0
- package/dist/component/CustomSchemaForm/index.d.ts +17 -0
- package/dist/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
- package/dist/component/CustomSchemaForm/utils.d.ts +2 -0
- package/dist/component/MonacoEditor/index.d.ts +15 -0
- package/dist/component/Workbench/style.module.scss.d.ts +26 -0
- package/dist/core/pluginManager.d.ts +1 -1
- package/dist/index.cjs.js +295 -39
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.es.js +44920 -9933
- package/dist/index.es.js.map +1 -1
- package/dist/material/innerMaterial.d.ts +2 -0
- package/dist/monacoeditorwork/css.worker.bundle.js +45072 -0
- package/dist/monacoeditorwork/editor.worker.bundle.js +8294 -0
- package/dist/monacoeditorwork/html.worker.bundle.js +24321 -0
- package/dist/monacoeditorwork/json.worker.bundle.js +15550 -0
- package/dist/monacoeditorwork/ts.worker.bundle.js +169967 -0
- package/dist/plugins/AdvancePanel/index.d.ts +10 -0
- package/dist/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
- package/dist/plugins/ComponentLibrary/components/DragItem/index.d.ts +12 -0
- package/dist/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
- package/dist/plugins/ComponentLibrary/components/ListView/index.d.ts +9 -0
- package/dist/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
- package/dist/plugins/ComponentLibrary/index.d.ts +3 -0
- package/dist/plugins/ComponentLibrary/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/ComponentLibrary/localize/index.d.ts +2 -0
- package/dist/plugins/ComponentLibrary/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
- package/dist/plugins/ComponentLibrary/util.d.ts +1 -0
- package/dist/plugins/ComponentStatePanel/index.d.ts +10 -0
- package/dist/plugins/Designer/components/DefaultSelectToolBar/index.d.ts +10 -0
- package/dist/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
- package/dist/plugins/Designer/components/GhostView/index.d.ts +5 -0
- package/dist/plugins/Designer/config.d.ts +1 -0
- package/dist/plugins/Designer/index.d.ts +15 -0
- package/dist/plugins/Designer/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/Designer/localize/index.d.ts +2 -0
- package/dist/plugins/Designer/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/Designer/style.module.scss.d.ts +5 -0
- package/dist/plugins/Designer/util.d.ts +2 -0
- package/dist/plugins/Designer/view.d.ts +30 -0
- package/dist/plugins/DisplaySourceSchema/index.d.ts +9 -0
- package/dist/plugins/GlobalStatePanel/index.d.ts +3 -0
- package/dist/plugins/GlobalStatePanel/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/GlobalStatePanel/localize/index.d.ts +2 -0
- package/dist/plugins/GlobalStatePanel/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
- package/dist/plugins/History/index.d.ts +2 -0
- package/dist/plugins/OutlineTree/components/TreeView/context.d.ts +30 -0
- package/dist/plugins/OutlineTree/components/TreeView/dataStruct.d.ts +21 -0
- package/dist/plugins/OutlineTree/components/TreeView/index.d.ts +34 -0
- package/dist/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
- package/dist/plugins/OutlineTree/components/TreeView/treeNode.d.ts +9 -0
- package/dist/plugins/OutlineTree/index.d.ts +3 -0
- package/dist/plugins/OutlineTree/localize/en_US/index.d.ts +1 -0
- package/dist/plugins/OutlineTree/localize/index.d.ts +2 -0
- package/dist/plugins/OutlineTree/localize/zh_CN/index.d.ts +1 -0
- package/dist/plugins/OutlineTree/util.d.ts +15 -0
- package/dist/plugins/PropertyPanel/index.d.ts +9 -0
- package/dist/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
- package/dist/plugins/RightPanel/index.d.ts +2 -0
- package/dist/plugins/RightPanel/style.module.scss.d.ts +10 -0
- package/dist/plugins/RightPanel/view.d.ts +34 -0
- package/dist/plugins/VisualPanelPlus/index.d.ts +9 -0
- package/dist/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
- package/dist/plugins/index.d.ts +9 -0
- package/dist/style.css +1 -1
- package/dist/utils/css.d.ts +19 -0
- package/dist/utils/logger.d.ts +1 -0
- package/package.json +16 -8
- package/public/Engine.module.scss.d.ts +5 -0
- package/public/component/CSSEditor/style.module.scss.d.ts +6 -0
- package/public/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
- package/public/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
- package/public/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
- package/public/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
- package/public/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
- package/public/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
- package/public/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
- package/public/component/Workbench/style.module.scss.d.ts +26 -0
- package/public/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
- package/public/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
- package/public/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
- package/public/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
- package/public/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
- package/public/plugins/Designer/style.module.scss.d.ts +5 -0
- package/public/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
- package/public/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
- package/public/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
- package/public/plugins/RightPanel/style.module.scss.d.ts +10 -0
- package/public/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
- package/public/render.umd.js +14 -14
- package/public/render.umd.js.map +1 -1
- package/src/Engine.module.scss.d.ts +5 -0
- package/src/_dev_/page/Editor/index.tsx +1 -1
- package/src/component/CSSEditor/index.tsx +4 -5
- package/src/component/CSSEditor/style.module.scss.d.ts +6 -0
- package/src/component/CSSPropertiesEditor/index.tsx +1 -5
- package/src/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
- package/src/component/CSSPropertiesVariableBindEditor/index.tsx +1 -1
- package/src/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
- package/src/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
- package/src/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
- package/src/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
- package/src/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
- package/src/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
- package/src/component/MonacoEditor/index.tsx +1 -41
- package/src/component/Workbench/style.module.scss.d.ts +26 -0
- package/src/core/pluginManager.ts +1 -1
- package/src/index.tsx +5 -2
- package/src/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
- package/src/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
- package/src/plugins/ComponentLibrary/components/ListView/index.tsx +0 -1
- package/src/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
- package/src/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
- package/src/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
- package/src/plugins/Designer/style.module.scss.d.ts +5 -0
- package/src/plugins/DisplaySourceSchema/index.tsx +1 -1
- package/src/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
- package/src/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
- package/src/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
- package/src/plugins/RightPanel/style.module.scss.d.ts +10 -0
- package/src/plugins/VisualPanelPlus/index.tsx +3 -19
- package/src/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
- package/src/plugins/index.tsx +3 -1
- package/src/style.d.ts +2 -0
- package/src/typing.d.ts +5 -0
- package/dist/typing.d.ts +0 -4
- package/dist/vite-env.d.ts +0 -1
- package/public/typing.d.ts +0 -4
- package/public/vite-env.d.ts +0 -1
- package/src/component/MonacoEditor/index copy.tsx +0 -119
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CNode, CRootNode } from '@chamn/model';
|
|
3
|
+
import { CPluginCtx } from '../../core/pluginManager';
|
|
4
|
+
import { CRightPanelItem } from '../RightPanel/view';
|
|
5
|
+
export type AdvancePanelProps = {
|
|
6
|
+
node: CNode | CRootNode;
|
|
7
|
+
pluginCtx: CPluginCtx;
|
|
8
|
+
};
|
|
9
|
+
export declare const AdvancePanel: (props: AdvancePanelProps) => JSX.Element;
|
|
10
|
+
export declare const AdvancePanelConfig: CRightPanelItem;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import globalClassNames from '../../style.d';
|
|
2
|
+
declare const classNames: typeof globalClassNames & {
|
|
3
|
+
readonly advanceBox: 'advanceBox';
|
|
4
|
+
readonly 'ant-input-affix-wrapper': 'ant-input-affix-wrapper';
|
|
5
|
+
readonly 'ant-input-prefix': 'ant-input-prefix';
|
|
6
|
+
};
|
|
7
|
+
export = classNames;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type DragComponentItemProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: any;
|
|
6
|
+
icon: React.ReactNode | string;
|
|
7
|
+
iconText?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
containerClassName?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const DragComponentItem: (props: DragComponentItemProps) => JSX.Element;
|
|
12
|
+
export declare const DRAG_ITEM_KEY = "data-drag-key";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import globalClassNames from '../../../../style.d';
|
|
2
|
+
declare const classNames: typeof globalClassNames & {
|
|
3
|
+
readonly square: 'square';
|
|
4
|
+
readonly componentItem: 'componentItem';
|
|
5
|
+
readonly iconImg: 'iconImg';
|
|
6
|
+
readonly iconBox: 'iconBox';
|
|
7
|
+
readonly iconText: 'iconText';
|
|
8
|
+
};
|
|
9
|
+
export = classNames;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import globalClassNames from '../../../../style.d';
|
|
2
|
+
declare const classNames: typeof globalClassNames & {
|
|
3
|
+
readonly ListBox: 'ListBox';
|
|
4
|
+
readonly 'ant-collapse': 'ant-collapse';
|
|
5
|
+
readonly 'ant-collapse-content': 'ant-collapse-content';
|
|
6
|
+
readonly 'ant-collapse-content-box': 'ant-collapse-content-box';
|
|
7
|
+
readonly 'ant-collapse-header': 'ant-collapse-header';
|
|
8
|
+
readonly 'ant-collapse-expand-icon': 'ant-collapse-expand-icon';
|
|
9
|
+
readonly 'ant-collapse-item': 'ant-collapse-item';
|
|
10
|
+
readonly collapsePanel: 'collapsePanel';
|
|
11
|
+
};
|
|
12
|
+
export = classNames;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const en_US: Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const zh_CN: Record<string, any>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import globalClassNames from '../../style.d';
|
|
2
|
+
declare const classNames: typeof globalClassNames & {
|
|
3
|
+
readonly container: 'container';
|
|
4
|
+
readonly 'ant-tabs': 'ant-tabs';
|
|
5
|
+
readonly 'ant-tabs-tab': 'ant-tabs-tab';
|
|
6
|
+
readonly 'ant-tabs-content': 'ant-tabs-content';
|
|
7
|
+
readonly 'ant-tabs-content-top': 'ant-tabs-content-top';
|
|
8
|
+
readonly 'ant-tabs-nav': 'ant-tabs-nav';
|
|
9
|
+
readonly tabTitle: 'tabTitle';
|
|
10
|
+
};
|
|
11
|
+
export = classNames;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getTargetMNodeKeyVal: (dom: HTMLElement | null, key: string) => null | string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CNode, CRootNode } from '@chamn/model';
|
|
3
|
+
import { CPluginCtx } from '../../core/pluginManager';
|
|
4
|
+
import { CRightPanelItem } from '../RightPanel/view';
|
|
5
|
+
export type ComponentStatePanelProps = {
|
|
6
|
+
node: CNode | CRootNode;
|
|
7
|
+
pluginCtx: CPluginCtx;
|
|
8
|
+
};
|
|
9
|
+
export declare const ComponentStatePanel: (props: ComponentStatePanelProps) => JSX.Element;
|
|
10
|
+
export declare const ComponentStatePanelConfig: CRightPanelItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CNode } from '@chamn/model';
|
|
3
|
+
export type DefaultSelectToolBarProps = {
|
|
4
|
+
nodeList: CNode[];
|
|
5
|
+
toSelectNode: (id: string) => void;
|
|
6
|
+
toDelete: (id: string) => void;
|
|
7
|
+
toCopy: (idd: string) => void;
|
|
8
|
+
toHidden: (idd: string) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const DefaultSelectToolBar: ({ nodeList, toSelectNode, toDelete, toCopy, toHidden, }: DefaultSelectToolBarProps) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import globalClassNames from '../../../../style.d';
|
|
2
|
+
declare const classNames: typeof globalClassNames & {
|
|
3
|
+
readonly toolBarBox: 'toolBarBox';
|
|
4
|
+
readonly item: 'item';
|
|
5
|
+
readonly layoutSelectBox: 'layoutSelectBox';
|
|
6
|
+
readonly hoverBox: 'hoverBox';
|
|
7
|
+
readonly hoverBoxActive: 'hoverBoxActive';
|
|
8
|
+
readonly hoverItem: 'hoverItem';
|
|
9
|
+
readonly placeholder: 'placeholder';
|
|
10
|
+
};
|
|
11
|
+
export = classNames;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PLUGIN_NAME = "Designer";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DragAndDrop } from '@chamn/layout';
|
|
2
|
+
import { CPlugin } from '../../core/pluginManager';
|
|
3
|
+
import { AssetPackage, CPageDataType } from '@chamn/model';
|
|
4
|
+
import { RenderInstance } from '@chamn/render';
|
|
5
|
+
export declare const DesignerPlugin: CPlugin;
|
|
6
|
+
export type DesignerExports = {
|
|
7
|
+
reload: (params?: {
|
|
8
|
+
assets?: AssetPackage[];
|
|
9
|
+
}) => void;
|
|
10
|
+
getDnd: () => DragAndDrop;
|
|
11
|
+
selectNode: (nodeId: string) => void;
|
|
12
|
+
updatePage: (page: CPageDataType) => void;
|
|
13
|
+
getComponentInstances: (id: string) => RenderInstance[];
|
|
14
|
+
getDynamicComponentInstances: (id: string) => RenderInstance;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const en_US: Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const zh_CN: Record<string, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Layout } from '@chamn/layout';
|
|
3
|
+
import { CNode, CPage, CRootNode } from '@chamn/model';
|
|
4
|
+
import { CPluginCtx } from '../../core/pluginManager';
|
|
5
|
+
import { AssetPackage } from '@chamn/model';
|
|
6
|
+
export type DesignerPropsType = {
|
|
7
|
+
pluginCtx: CPluginCtx;
|
|
8
|
+
};
|
|
9
|
+
type DesignerStateType = {
|
|
10
|
+
pageModel: CPage;
|
|
11
|
+
hoverToolBar: React.ReactNode;
|
|
12
|
+
selectToolBar: React.ReactNode;
|
|
13
|
+
ghostView: React.ReactNode;
|
|
14
|
+
assets: AssetPackage[];
|
|
15
|
+
};
|
|
16
|
+
export declare class Designer extends React.Component<DesignerPropsType, DesignerStateType> {
|
|
17
|
+
layoutRef: React.RefObject<Layout>;
|
|
18
|
+
constructor(props: DesignerPropsType);
|
|
19
|
+
componentDidMount(): void;
|
|
20
|
+
updateAssets(assets: AssetPackage[]): void;
|
|
21
|
+
reloadRender({ assets }: {
|
|
22
|
+
assets?: AssetPackage[];
|
|
23
|
+
}): void;
|
|
24
|
+
init(): Promise<void>;
|
|
25
|
+
onSelectNode: (node: CNode | CRootNode | null) => void;
|
|
26
|
+
onDragStart: (startNode: CNode | CRootNode | null) => void;
|
|
27
|
+
onHoverNode: (node: CNode | CRootNode | null, startNode: CNode | CRootNode) => void;
|
|
28
|
+
render(): JSX.Element;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CPage } from '@chamn/model';
|
|
3
|
+
import { EnginContext } from '../../index';
|
|
4
|
+
export type DisplaySourceSchemaProps = {
|
|
5
|
+
pageModel: CPage;
|
|
6
|
+
engineCtx: EnginContext;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare const DisplaySourceSchema: (props: DisplaySourceSchemaProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const en_US: Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const zh_CN: Record<string, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Sensor } from '@chamn/layout';
|
|
2
|
+
import { CPage } from '@chamn/model';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { DesignerExports } from '../../../Designer';
|
|
5
|
+
import { TreeNodeData } from './dataStruct';
|
|
6
|
+
export declare enum DragState {
|
|
7
|
+
DRAGGING = "DRAGGING",
|
|
8
|
+
NORMAL = "NORMAL"
|
|
9
|
+
}
|
|
10
|
+
export type ContextState = {
|
|
11
|
+
treeData: TreeNodeData[];
|
|
12
|
+
currentSelectNodeKeys: string[];
|
|
13
|
+
expandKeys: string[];
|
|
14
|
+
multiSelect: boolean;
|
|
15
|
+
dragState: DragState;
|
|
16
|
+
pageModel: CPage | null;
|
|
17
|
+
};
|
|
18
|
+
export type CTreeContextData = {
|
|
19
|
+
sensor?: Sensor;
|
|
20
|
+
state: ContextState;
|
|
21
|
+
updateState: (state: Partial<ContextState>) => void;
|
|
22
|
+
onSelectNode: (params: {
|
|
23
|
+
keys: string[];
|
|
24
|
+
node: TreeNodeData;
|
|
25
|
+
}) => void;
|
|
26
|
+
onDeleteNode: (id: string) => void;
|
|
27
|
+
onCopyNode: (id: string) => void;
|
|
28
|
+
getDesignerHandler?: () => Promise<DesignerExports>;
|
|
29
|
+
};
|
|
30
|
+
export declare const CTreeContext: React.Context<CTreeContextData>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TreeNodeData = {
|
|
3
|
+
containerRender?: (params: {
|
|
4
|
+
item: TreeNodeData;
|
|
5
|
+
treeNodeView: JSX.Element;
|
|
6
|
+
}) => React.ReactElement;
|
|
7
|
+
titleViewRender?: (params: {
|
|
8
|
+
item: TreeNodeData;
|
|
9
|
+
titleView: React.ReactNode;
|
|
10
|
+
}) => React.ReactElement;
|
|
11
|
+
title: React.ReactNode;
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
key?: string;
|
|
14
|
+
children?: TreeNodeData[];
|
|
15
|
+
parent?: TreeNodeData | null;
|
|
16
|
+
canBeSelected?: boolean;
|
|
17
|
+
canDrag?: boolean;
|
|
18
|
+
canDrop?: boolean | ('before' | 'after' | 'current')[];
|
|
19
|
+
rootNode?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const DemoTreeData: TreeNodeData;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Sensor } from '@chamn/layout';
|
|
2
|
+
import { CNode, CRootNode } from '@chamn/model';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { WithTranslation } from 'react-i18next';
|
|
5
|
+
import { CPluginCtx } from '../../../../core/pluginManager';
|
|
6
|
+
import { DesignerExports } from '../../../Designer';
|
|
7
|
+
import { ContextState } from './context';
|
|
8
|
+
import { TreeNodeData } from './dataStruct';
|
|
9
|
+
interface TreeViewProps extends WithTranslation {
|
|
10
|
+
pluginCtx: CPluginCtx;
|
|
11
|
+
multiSelect?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class TreeView extends React.Component<TreeViewProps, ContextState & {
|
|
14
|
+
dropPosInfo: {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
} | null;
|
|
18
|
+
}> {
|
|
19
|
+
domRef: React.RefObject<HTMLDivElement>;
|
|
20
|
+
disposeCbList: (() => void)[];
|
|
21
|
+
sensor?: Sensor;
|
|
22
|
+
constructor(props: TreeViewProps);
|
|
23
|
+
getDesignerHandler: () => Promise<DesignerExports>;
|
|
24
|
+
updateTreeDataFromNode: () => void;
|
|
25
|
+
getParentKeyPaths: (targetKey: string) => string[];
|
|
26
|
+
scrollNodeToView: (key: string) => void;
|
|
27
|
+
componentDidMount(): Promise<void>;
|
|
28
|
+
toSelectTreeNode: (node: CNode | CRootNode) => void;
|
|
29
|
+
containNode: (parentNode: TreeNodeData, targetNode: TreeNodeData) => null;
|
|
30
|
+
getTreeNodeByKey: (key: string) => TreeNodeData | null;
|
|
31
|
+
registerDragEvent: () => Promise<void>;
|
|
32
|
+
render(): JSX.Element;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import globalClassNames from '../../../../style.d';
|
|
2
|
+
declare const classNames: typeof globalClassNames & {
|
|
3
|
+
readonly contentBox: 'contentBox';
|
|
4
|
+
readonly nodeBox: 'nodeBox';
|
|
5
|
+
readonly toolbarBox: 'toolbarBox';
|
|
6
|
+
readonly iconItem: 'iconItem';
|
|
7
|
+
readonly nodeContent: 'nodeContent';
|
|
8
|
+
readonly selected: 'selected';
|
|
9
|
+
readonly nodeArrow: 'nodeArrow';
|
|
10
|
+
readonly expanded: 'expanded';
|
|
11
|
+
readonly nodeRenderView: 'nodeRenderView';
|
|
12
|
+
readonly nodeChildren: 'nodeChildren';
|
|
13
|
+
readonly dropAnchorLine: 'dropAnchorLine';
|
|
14
|
+
readonly arrowSpan: 'arrowSpan';
|
|
15
|
+
};
|
|
16
|
+
export = classNames;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TreeNodeData } from './dataStruct';
|
|
3
|
+
export declare const DRAG_ITEM_KEY = "data-drag-key";
|
|
4
|
+
export type TreeNodeProps = {
|
|
5
|
+
item: TreeNodeData;
|
|
6
|
+
level?: number;
|
|
7
|
+
paths?: (string | number)[];
|
|
8
|
+
};
|
|
9
|
+
export declare const TreeNode: (props: TreeNodeProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const en_US: Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const zh_CN: Record<string, any>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DropPosType } from '@chamn/layout/dist/components/DropAnchor/util';
|
|
2
|
+
import { CNode, CNodeDataType, CPage, CPageDataType, MTitle } from '@chamn/model';
|
|
3
|
+
import { TreeNodeData } from './components/TreeView/dataStruct';
|
|
4
|
+
export declare const getTargetMNodeKeyVal: (dom: HTMLElement | null, key: string) => null | string;
|
|
5
|
+
export declare const transformNodeSchemaToTreeData: (nodeSchema: CNodeDataType | CNodeDataType[], parent: TreeNodeData, pageModel: CPage) => TreeNodeData | TreeNodeData[];
|
|
6
|
+
export declare const transformPageSchemaToTreeData: (pageSchema: CPageDataType, pageModel: CPage) => TreeNodeData[];
|
|
7
|
+
export declare const traverseTree: (tree: TreeNodeData | TreeNodeData[], handler: (node: TreeNodeData) => boolean) => void;
|
|
8
|
+
export declare function calculateDropPosInfo(params: {
|
|
9
|
+
point: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
dom: HTMLElement;
|
|
14
|
+
}): DropPosType;
|
|
15
|
+
export declare const getNodePropsLabelMap: (node: CNode) => Record<string, MTitle>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CNode, CRootNode } from '@chamn/model';
|
|
3
|
+
import { CPluginCtx } from '../../core/pluginManager';
|
|
4
|
+
import { CRightPanelItem } from '../RightPanel/view';
|
|
5
|
+
export declare const PropertyPanel: (props: {
|
|
6
|
+
node: CNode | CRootNode;
|
|
7
|
+
pluginCtx: CPluginCtx;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export declare const PropertyPanelConfig: CRightPanelItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import globalClassNames from '../../style.d';
|
|
2
|
+
declare const classNames: typeof globalClassNames & {
|
|
3
|
+
readonly CFromRenderBox: 'CFromRenderBox';
|
|
4
|
+
readonly 'ant-collapse': 'ant-collapse';
|
|
5
|
+
readonly 'ant-collapse-content': 'ant-collapse-content';
|
|
6
|
+
readonly 'ant-collapse-content-box': 'ant-collapse-content-box';
|
|
7
|
+
readonly 'ant-collapse-item': 'ant-collapse-item';
|
|
8
|
+
readonly 'ant-collapse-header': 'ant-collapse-header';
|
|
9
|
+
};
|
|
10
|
+
export = classNames;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import globalClassNames from '../../style.d';
|
|
2
|
+
declare const classNames: typeof globalClassNames & {
|
|
3
|
+
readonly rightPanelContainer: 'rightPanelContainer';
|
|
4
|
+
readonly 'ant-tabs': 'ant-tabs';
|
|
5
|
+
readonly 'ant-tabs-tab': 'ant-tabs-tab';
|
|
6
|
+
readonly 'ant-tabs-content': 'ant-tabs-content';
|
|
7
|
+
readonly 'ant-tabs-content-top': 'ant-tabs-content-top';
|
|
8
|
+
readonly 'ant-tabs-tabpane': 'ant-tabs-tabpane';
|
|
9
|
+
};
|
|
10
|
+
export = classNames;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CNode, CRootNode } from '@chamn/model';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CPluginCtx } from '../../core/pluginManager';
|
|
4
|
+
export type RightPanelOptions = {
|
|
5
|
+
node: CNode | CRootNode;
|
|
6
|
+
pluginCtx: CPluginCtx;
|
|
7
|
+
};
|
|
8
|
+
export type CRightPanelItem = {
|
|
9
|
+
key: string;
|
|
10
|
+
name: string | ((props: RightPanelOptions) => React.ReactNode);
|
|
11
|
+
view: (props: RightPanelOptions) => React.ReactNode;
|
|
12
|
+
show?: (options: RightPanelOptions) => boolean;
|
|
13
|
+
};
|
|
14
|
+
interface RightPanelProps {
|
|
15
|
+
pluginCtx: CPluginCtx;
|
|
16
|
+
}
|
|
17
|
+
interface RightPanelState {
|
|
18
|
+
node: CNode | CRootNode | null;
|
|
19
|
+
activeKey: string;
|
|
20
|
+
panels: CRightPanelItem[];
|
|
21
|
+
displayPanels: CRightPanelItem[];
|
|
22
|
+
}
|
|
23
|
+
export declare class RightPanel extends React.Component<RightPanelProps, RightPanelState> {
|
|
24
|
+
constructor(props: RightPanelProps);
|
|
25
|
+
addPanel: (panel: CRightPanelItem) => void;
|
|
26
|
+
updatePanels: () => {
|
|
27
|
+
panels: CRightPanelItem[];
|
|
28
|
+
displayPanels: CRightPanelItem[];
|
|
29
|
+
};
|
|
30
|
+
onNodeChange: ({ node }: any) => void;
|
|
31
|
+
componentDidMount(): void;
|
|
32
|
+
render(): JSX.Element;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CNode, CRootNode } from '@chamn/model';
|
|
3
|
+
import { CPluginCtx } from '../../core/pluginManager';
|
|
4
|
+
import { CRightPanelItem } from '../RightPanel/view';
|
|
5
|
+
export declare const VisualPanelPlus: (props: {
|
|
6
|
+
node: CNode | CRootNode;
|
|
7
|
+
pluginCtx: CPluginCtx;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export declare const VisualPanelPlusConfig: CRightPanelItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import globalClassNames from '../../style.d';
|
|
2
|
+
declare const classNames: typeof globalClassNames & {
|
|
3
|
+
readonly visualPanelBox: 'visualPanelBox';
|
|
4
|
+
readonly header: 'header';
|
|
5
|
+
readonly 'ant-collapse': 'ant-collapse';
|
|
6
|
+
readonly 'ant-collapse-item': 'ant-collapse-item';
|
|
7
|
+
readonly 'ant-collapse-header': 'ant-collapse-header';
|
|
8
|
+
readonly 'ant-collapse-expand-icon': 'ant-collapse-expand-icon';
|
|
9
|
+
};
|
|
10
|
+
export = classNames;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CPlugin } from '../core/pluginManager';
|
|
2
|
+
import { ComponentLibPlugin } from './ComponentLibrary';
|
|
3
|
+
import { DesignerPlugin } from './Designer';
|
|
4
|
+
import { RightPanelPlugin } from './RightPanel';
|
|
5
|
+
import { GlobalStatePanelPlugin } from './GlobalStatePanel';
|
|
6
|
+
import { DisplaySourceSchema } from './DisplaySourceSchema';
|
|
7
|
+
import { HistoryPlugin } from './History';
|
|
8
|
+
export declare const DEFAULT_PLUGIN_LIST: CPlugin[];
|
|
9
|
+
export { DesignerPlugin, ComponentLibPlugin, RightPanelPlugin, GlobalStatePanelPlugin, HistoryPlugin, DisplaySourceSchema, };
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._workbenchContainer_1b5xq_2{width:100%;height:100%;display:flex;flex-direction:column}._workbenchContainer_1b5xq_2 ._topToolBarBox_1b5xq_8{height:64px;width:100%;border-bottom:1px solid rgb(233,233,233);display:flex}._workbenchContainer_1b5xq_2 ._topToolBarBox_1b5xq_8 ._logo_1b5xq_14{height:100%;font-size:20px;display:flex;align-items:center;margin-left:20px;font-weight:bolder}._workbenchContainer_1b5xq_2 ._topToolBarBox_1b5xq_8 ._topToolBarView_1b5xq_22{flex:1}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25{display:flex;width:100%;flex:1;overflow:hidden}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31{position:relative;display:flex;background-color:#fff;z-index:100}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37{width:50px;height:100%;border-right:1px solid rgb(233,233,233)}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37 ._pluginIconItem_1b5xq_42{position:relative;cursor:pointer;width:50px;height:50px;display:flex;align-items:center;justify-content:center;transition:all .1s}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37 ._pluginIconItem_1b5xq_42._active_1b5xq_52 :before,._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37 ._pluginIconItem_1b5xq_42:hover :before{transition:all .1s;display:block;content:"";width:2px;height:100%;position:absolute;left:0;top:0}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37 ._pluginIconItem_1b5xq_42._active_1b5xq_52 :before{border-left:4px solid #1677ff!important}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37 ._pluginIconItem_1b5xq_42:hover :before{border-left:4px solid rgba(22,119,255,.3)}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68{display:flex;flex-direction:column;background-color:#fff;z-index:100;border-right:1px solid rgb(233,233,233)}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75{display:flex;color:#686868;height:30px;margin:10px;overflow:hidden;align-items:center}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75 ._pluginNameText_1b5xq_83{font-size:16px;font-weight:700;margin-right:auto;flex-wrap:nowrap;word-break:keep-all}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75 ._closeBtn_1b5xq_90,._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75 ._fixedBtn_1b5xq_91{color:#686868}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75 ._fixedBtn_1b5xq_91>*{transition:all .1s}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75 ._fixedBtn_1b5xq_91>._active_1b5xq_52{transform:rotate(-45deg)}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBox_1b5xq_68{width:100%;flex:1;background-color:#f8f8ff;overflow:hidden}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._rightResizeBox_1b5xq_106{position:relative}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._rightResizeBox_1b5xq_106 ._arrowCursor_1b5xq_109{cursor:pointer;position:absolute;left:-18px;top:50%;transform:translateY(-50%);z-index:2;background-color:#fff;padding:10px 3px;border-radius:4px 0 0 4px;font-size:12px}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._rightResizeBox_1b5xq_106 ._arrowCursor_1b5xq_109>._active_1b5xq_52{transform:rotate(-180deg)}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._rightResizeBox_1b5xq_106 ._rightBox_1b5xq_124{position:relative;width:100%;height:100%;border-left:1px rgb(233,233,233) solid}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._centerBox_1b5xq_130{display:flex;flex-direction:column;flex:1;overflow:hidden}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._centerBox_1b5xq_130 ._subTopToolbarBox_1b5xq_136{width:100%;height:50px;background-color:#fff}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._centerBox_1b5xq_130 ._canvasBox_1b5xq_141{width:100%;flex:1;overflow:hidden;padding:20px 30px;background-color:#edeff3}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._centerBox_1b5xq_130 ._canvasBox_1b5xq_141 ._scrollBox_1b5xq_148{width:100%;height:100%;box-shadow:0 1px 4px #1f325821}._engineContainer_f3ly9_2{color:#686868;font-size:14px;width:100%;height:100%;overflow:hidden}._engineContainer_f3ly9_2 *{box-sizing:border-box}
|
|
1
|
+
@charset "UTF-8";._workbenchContainer_1b5xq_2{width:100%;height:100%;display:flex;flex-direction:column}._workbenchContainer_1b5xq_2 ._topToolBarBox_1b5xq_8{height:64px;width:100%;border-bottom:1px solid rgb(233,233,233);display:flex}._workbenchContainer_1b5xq_2 ._topToolBarBox_1b5xq_8 ._logo_1b5xq_14{height:100%;font-size:20px;display:flex;align-items:center;margin-left:20px;font-weight:bolder}._workbenchContainer_1b5xq_2 ._topToolBarBox_1b5xq_8 ._topToolBarView_1b5xq_22{flex:1}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25{display:flex;width:100%;flex:1;overflow:hidden}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31{position:relative;display:flex;background-color:#fff;z-index:100}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37{width:50px;height:100%;border-right:1px solid rgb(233,233,233)}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37 ._pluginIconItem_1b5xq_42{position:relative;cursor:pointer;width:50px;height:50px;display:flex;align-items:center;justify-content:center;transition:all .1s}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37 ._pluginIconItem_1b5xq_42._active_1b5xq_52 :before,._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37 ._pluginIconItem_1b5xq_42:hover :before{transition:all .1s;display:block;content:"";width:2px;height:100%;position:absolute;left:0;top:0}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37 ._pluginIconItem_1b5xq_42._active_1b5xq_52 :before{border-left:4px solid #1677ff!important}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginIconBar_1b5xq_37 ._pluginIconItem_1b5xq_42:hover :before{border-left:4px solid rgba(22,119,255,.3)}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68{display:flex;flex-direction:column;background-color:#fff;z-index:100;border-right:1px solid rgb(233,233,233)}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75{display:flex;color:#686868;height:30px;margin:10px;overflow:hidden;align-items:center}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75 ._pluginNameText_1b5xq_83{font-size:16px;font-weight:700;margin-right:auto;flex-wrap:nowrap;word-break:keep-all}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75 ._closeBtn_1b5xq_90,._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75 ._fixedBtn_1b5xq_91{color:#686868}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75 ._fixedBtn_1b5xq_91>*{transition:all .1s}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBoxResizeBox_1b5xq_68 ._pluginHeader_1b5xq_75 ._fixedBtn_1b5xq_91>._active_1b5xq_52{transform:rotate(-45deg)}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._leftBox_1b5xq_31 ._pluginPanelBox_1b5xq_68{width:100%;flex:1;background-color:#f8f8ff;overflow:hidden}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._rightResizeBox_1b5xq_106{position:relative}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._rightResizeBox_1b5xq_106 ._arrowCursor_1b5xq_109{cursor:pointer;position:absolute;left:-18px;top:50%;transform:translateY(-50%);z-index:2;background-color:#fff;padding:10px 3px;border-radius:4px 0 0 4px;font-size:12px}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._rightResizeBox_1b5xq_106 ._arrowCursor_1b5xq_109>._active_1b5xq_52{transform:rotate(-180deg)}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._rightResizeBox_1b5xq_106 ._rightBox_1b5xq_124{position:relative;width:100%;height:100%;border-left:1px rgb(233,233,233) solid}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._centerBox_1b5xq_130{display:flex;flex-direction:column;flex:1;overflow:hidden}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._centerBox_1b5xq_130 ._subTopToolbarBox_1b5xq_136{width:100%;height:50px;background-color:#fff}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._centerBox_1b5xq_130 ._canvasBox_1b5xq_141{width:100%;flex:1;overflow:hidden;padding:20px 30px;background-color:#edeff3}._workbenchContainer_1b5xq_2 ._bodyContent_1b5xq_25 ._centerBox_1b5xq_130 ._canvasBox_1b5xq_141 ._scrollBox_1b5xq_148{width:100%;height:100%;box-shadow:0 1px 4px #1f325821}._engineContainer_f3ly9_2{color:#686868;font-size:14px;width:100%;height:100%;overflow:hidden}._engineContainer_f3ly9_2 *{box-sizing:border-box}._container_191p3_2{width:100%;height:100%;overflow:hidden;background-color:#fff;display:flex}._container_191p3_2 .ant-tabs .ant-tabs-tab+.ant-tabs-tab{margin-left:12px}._container_191p3_2 .ant-tabs-content.ant-tabs-content-top{height:100%;overflow:auto}._container_191p3_2 .ant-tabs-tab{padding:6px 0}._container_191p3_2 .ant-tabs-nav{margin-bottom:0}._tabTitle_191p3_23{padding:0 10px;font-size:12px;font-weight:400;text-rendering:optimizeLegibility}._square_1b87f_2{user-select:none;position:relative;flex:33.3% 0}._square_1b87f_2:before{content:"";padding-top:100%;float:left}._square_1b87f_2:after{content:"";display:block;clear:both}._componentItem_1b87f_18{user-select:none;overflow:hidden;position:absolute;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;border-right:1px solid rgb(233,233,233);border-bottom:1px solid rgb(233,233,233);transition:all .2s}._componentItem_1b87f_18:hover{box-shadow:0 6px 16px #00000026;border-color:transparent;cursor:grab}._componentItem_1b87f_18:active{cursor:grabbing}._iconImg_1b87f_41{width:100%}._iconBox_1b87f_45{width:60%;height:60%;overflow:hidden;display:flex;align-items:center;justify-content:center}._iconText_1b87f_54{font-size:18px;font-weight:bolder;color:#686868}._ListBox_1q7zr_2{display:flex;flex-wrap:wrap}._ListBox_1q7zr_2 .ant-collapse .ant-collapse-content>.ant-collapse-content-box{padding:0}._ListBox_1q7zr_2 .ant-collapse{border:none;background-color:#fff}._ListBox_1q7zr_2 .ant-collapse-header{padding:10px 16px!important}._ListBox_1q7zr_2 .ant-collapse-expand-icon{padding-inline-end:0!important}._ListBox_1q7zr_2 .ant-collapse-item{border-color:#e9e9e9}._collapsePanel_1q7zr_23{display:flex;flex-wrap:wrap}._layoutContainer_1mubg_1{position:relative;width:100%;height:100%;box-sizing:border-box;margin:0;padding:0;overflow:hidden}._elementHighlightBox_1mubg_11{position:absolute;right:0;top:0;padding:10px}._iframeBox_1mubg_18{position:relative}._highlightBox_vl3g6_1{position:absolute;will-change:transform,width,height,left,right;border:2px solid rgb(44,115,253)}._borderDrawBox_vl3g6_7{position:absolute;left:0;height:100%;width:100%;z-index:99;pointer-events:none}._toolBox_vl3g6_16{position:absolute;width:100%;left:0;top:0;box-sizing:border-box;transform:translateY(-100%)}._highlightBox_1dlxo_1{position:absolute;will-change:transform,width,height,left,right}._borderDrawBox_1dlxo_6{position:absolute;left:0;top:0;height:100%;width:100%;z-index:99;pointer-events:none}._toolBox_1dlxo_16{position:absolute;right:0;top:-20px;border:1px solid black;box-sizing:border-box}._horizontal_1dlxo_24._before_1dlxo_24{border-left:2px solid #1890ff}._horizontal_1dlxo_24._after_1dlxo_27{border-right:2px solid #1890ff}._vertical_1dlxo_31._before_1dlxo_24{border-top:2px solid #1890ff}._vertical_1dlxo_31._after_1dlxo_27{border-bottom:2px solid #1890ff}._current_1dlxo_38{border:none!important;background-color:#0084ff6b}._toolBarBox_h5ljb_2{display:flex;margin-bottom:3px;margin-right:-2px;pointer-events:all;float:right}._item_h5ljb_10{background-color:#1677ff;color:#fff;padding:2px 3px;font-size:12px;overflow:hidden;margin-left:1px;cursor:pointer}._layoutSelectBox_h5ljb_20{position:relative;margin-right:1px;height:21px}._layoutSelectBox_h5ljb_20 ._hoverBox_h5ljb_25{transition:all .3s;position:absolute;left:0;top:0;white-space:nowrap;opacity:0;transform:translateY(-100%);pointer-events:none}._layoutSelectBox_h5ljb_20 ._hoverBox_h5ljb_25:hover,._layoutSelectBox_h5ljb_20 ._hoverBox_h5ljb_25._hoverBoxActive_h5ljb_35{opacity:1;pointer-events:all}._layoutSelectBox_h5ljb_20 ._hoverBox_h5ljb_25 ._hoverItem_h5ljb_39{background-color:#1677ff;padding:2px 3px;color:#fff;font-size:12px;margin-bottom:1px;cursor:pointer}._layoutSelectBox_h5ljb_20 ._placeholder_h5ljb_47{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:#1677ff;color:#fff;padding:2px 5px;font-size:12px;max-width:100px}._hoverTips_k3vn7_2{display:inline-block;color:#1677ff;opacity:.9;font-size:12px;margin-bottom:2px;background-color:#fff;padding:1px 3px;border-radius:2px}._contentBox_13nm8_2{background-color:#fff;height:100%;border-top:1px solid rgb(233,233,233);overflow:auto;position:relative}._contentBox_13nm8_2 *{transition:all .1s}._nodeBox_13nm8_13{cursor:pointer}._nodeBox_13nm8_13 ._toolbarBox_13nm8_16{display:none;padding-right:10px}._nodeBox_13nm8_13 ._iconItem_13nm8_20{margin-right:8px}._nodeContent_13nm8_24:hover ._toolbarBox_13nm8_16{display:flex}._nodeContent_13nm8_24{font-size:14px;cursor:pointer;display:flex;align-items:center}._nodeContent_13nm8_24._selected_13nm8_34{background-color:#dddddd3b}._nodeContent_13nm8_24 ._nodeArrow_13nm8_37{font-size:12px}._nodeContent_13nm8_24 ._nodeArrow_13nm8_37._expanded_13nm8_40{transform-origin:center;transform:rotate(90deg)}._nodeContent_13nm8_24 ._nodeRenderView_13nm8_44{padding:5px 0;flex:1;flex-wrap:nowrap;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._nodeChildren_13nm8_53{position:relative}._nodeChildren_13nm8_53:before{display:block;position:absolute;left:13px;top:0;content:"";height:100%;width:1px;background-color:#e9e9e9}._nodeChildren_13nm8_53._selected_13nm8_34:before{background-color:#0000ff5c}._dropAnchorLine_13nm8_70{width:100px;height:2px;background-color:#1890ff;position:fixed;z-index:99;pointer-events:none}._arrowSpan_13nm8_79{position:relative}._arrowSpan_13nm8_79:after{content:"";position:absolute;top:0px;right:0;bottom:0;left:-8px}._CFromRenderBox_1vsdm_2{padding:0 20px}._CFromRenderBox_1vsdm_2 .ant-collapse .ant-collapse-content>.ant-collapse-content-box{padding-right:5px}._CFromRenderBox_1vsdm_2 .ant-collapse>.ant-collapse-item:last-child>.ant-collapse-header{padding-right:5px}._dragItem_xzliq_2{cursor:grab;border:1px solid rgb(233,233,233);background-color:#fff;padding:10px;text-align:center;margin-bottom:10px;font-size:12px;border-radius:2px}._sortModalBox_xzliq_13{padding:20px 10px 10px;overflow:auto;max-height:500px}._addOneBtn_xzliq_19{width:100%;font-size:12px!important;color:#686868}._inputAuto_gk0d2_2{border-bottom:1px solid rgba(128,128,128,.23)}._active_gk0d2_6{border-bottom:1px solid rgb(128,177,255)}._fieldBox_nltxm_3{display:flex;flex-wrap:nowrap;flex-shrink:0;flex-grow:1;min-width:250px;align-items:center}._fieldBox_nltxm_3 ._label_nltxm_11{font-size:12px;color:#686868;padding-right:10px;user-select:none;width:60px;max-height:40px;word-break:break-all;text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}._fieldBox_nltxm_3 ._tipsLabel_nltxm_25{text-decoration-line:underline;text-decoration-style:dashed;text-underline-offset:2px;cursor:help;word-break:break-all}._fieldBox_nltxm_3 ._content_nltxm_32{flex:1}._switchBtn_k17cr_2{color:#686868;font-size:12px;padding:0 5px 0 10px}._shapeFieldBox_k17cr_8,._collapseHeader_k17cr_9{color:#686868;display:flex;font-size:12px}._collapseHeader_k17cr_9{align-items:center}._CFromRenderBox_13lda_2 .ant-collapse .ant-collapse-content>.ant-collapse-content-box{padding-right:5px}._CFromRenderBox_13lda_2 .ant-collapse>.ant-collapse-item:last-child>.ant-collapse-header{padding:5px 5px 5px 10px;align-items:center}._CFromRenderBox_13lda_2 .ant-collapse>.ant-collapse-item:last-child>.ant-collapse-header .ant-collapse-expand-icon{padding-inline-end:4px}._advanceBox_9o3af_2{padding:0 20px}._advanceBox_9o3af_2 .ant-input-affix-wrapper .ant-input-prefix{margin-inline-end:0}._rightPanelContainer_1p332_2{height:100%;width:100%}._rightPanelContainer_1p332_2 .ant-tabs .ant-tabs-tab+.ant-tabs-tab{margin-left:0}._rightPanelContainer_1p332_2 .ant-tabs-content.ant-tabs-content-top{height:100%;overflow:auto}._rightPanelContainer_1p332_2 .ant-tabs .ant-tabs-tabpane{height:100%}._visualPanelBox_6q12v_2{padding:0 15px 300px}._visualPanelBox_6q12v_2 ._header_6q12v_5{color:#686868;display:flex}.ant-collapse .ant-collapse-item .ant-collapse-header{padding:5px 5px 5px 10px;align-items:center;color:#686868;font-size:12px}.ant-collapse .ant-collapse-item .ant-collapse-header .ant-collapse-expand-icon{padding-inline-end:4px}._cssFieldBox_15f2h_2{display:flex;color:#686868!important}._cssFieldBox_15f2h_2 .ant-select-selector input{color:#686868!important}._cssFieldBox_15f2h_2 ._row_15f2h_9{display:flex;padding-bottom:6px;align-items:center}._cssFieldBox_15f2h_2 ._fieldLabel_15f2h_14{display:inline-block;width:70px;flex-shrink:0;font-size:12px}._cssFieldBox_15f2h_2 ._leftBox_15f2h_20{flex:1}._cssFieldBox_15f2h_2 ._rightBox_15f2h_23{padding-left:10px}._cssFieldBox_15f2h_2 ._inputBox_15f2h_26{flex:1}._cssBox_15f2h_30{overflow-x:hidden}._cssBox_15f2h_30 .ant-collapse-borderless>.ant-collapse-item{border-bottom:1px solid #e4e4e4}._cssBox_15f2h_30 .ant-collapse-borderless>.ant-collapse-item:last-child{border-bottom:none}._cssBox_15f2h_30 .ant-collapse-content-box{padding-bottom:30px!important}._cssFieldBox_4b8an_2{display:flex;align-items:center;color:#686868!important}._cssFieldBox_4b8an_2 .ant-select-selector{padding:0!important}._cssFieldBox_4b8an_2 .ant-select-single .ant-select-selector .ant-select-selection-search{inset-inline-start:0px;inset-inline-end:0px}._cssFieldBox_4b8an_2 .ant-select-selector input{color:#686868!important}._cssFieldBox_4b8an_2 .ant-select-status-error{border-bottom:1px solid red!important}._cssFieldBox_4b8an_2 ._inputAuto_4b8an_20{border-bottom:1px solid rgba(128,128,128,.23)}._cssFieldBox_4b8an_2 ._active_4b8an_23{border-bottom:1px solid rgb(128,177,255)}._cssBox_4b8an_27{overflow-x:hidden}._cssBox_4b8an_27 .ant-collapse-borderless>.ant-collapse-item{border-bottom:1px solid #e4e4e4}._cssBox_4b8an_27 .ant-collapse-borderless>.ant-collapse-item:last-child{border-bottom:none}._cssBox_4b8an_27 .ant-collapse-content-box{padding-bottom:30px!important}._stateTag_5a8hc_2{position:relative}._stateTag_5a8hc_2 ._stateTagClose_5a8hc_5{position:absolute;right:-10px;top:-10px;background-color:#fff;color:#4d4d4d;opacity:0;font-size:20px;transform:scale(.6);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow:hidden;border-radius:10px}._stateTag_5a8hc_2:hover ._stateTagClose_5a8hc_5{opacity:1}._box_tl0hm_2{height:100%;width:100%;padding-right:10px;border-top:1px solid rgb(233,233,233);padding-top:10px;background-color:#fff}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CSSVal } from '../component/CSSEditor';
|
|
2
|
+
import { CSSType } from '@chamn/model';
|
|
3
|
+
export type StyleArr = {
|
|
4
|
+
key: string;
|
|
5
|
+
value: any;
|
|
6
|
+
}[];
|
|
7
|
+
export declare const styleArr2Obj: (val: StyleArr) => Record<string, any>;
|
|
8
|
+
export declare const formatCSSProperty: (cssVal: Record<string, any>) => {
|
|
9
|
+
normalProperty: {
|
|
10
|
+
key: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
13
|
+
expressionProperty: {
|
|
14
|
+
key: string;
|
|
15
|
+
value: any;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
export declare const formatCssToNodeVal: (className: string, val: CSSVal) => CSSType;
|
|
19
|
+
export declare const formatNodeValToEditor: (val?: CSSType) => CSSVal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LOGGER: import("consola").Consola;
|