@chamn/engine 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +2 -2
  3. package/build.config.js +16 -2
  4. package/dist/index.cjs.js +90 -362
  5. package/dist/index.cjs.js.map +1 -1
  6. package/dist/index.es.js +17844 -46121
  7. package/dist/index.es.js.map +1 -1
  8. package/dist/style.css +1 -1
  9. package/package.json +10 -9
  10. package/public/component/Workbench/style.module.scss.d.ts +0 -1
  11. package/src/_dev_/index.css +10 -0
  12. package/src/_dev_/page/Editor/index.tsx +9 -86
  13. package/src/_dev_/page/Editor/indexCustom.tsx +274 -0
  14. package/src/_dev_/page/Preview/index.tsx +38 -6
  15. package/src/_dev_/router.tsx +0 -1
  16. package/src/component/Workbench/index.tsx +0 -2
  17. package/src/component/Workbench/style.module.scss +0 -8
  18. package/src/component/Workbench/style.module.scss.d.ts +0 -1
  19. package/src/index.tsx +12 -4
  20. package/src/plugins/Designer/util.ts +1 -1
  21. package/src/plugins/Designer/view.tsx +5 -3
  22. package/src/utils/defaultEngineConfig.tsx +55 -0
  23. package/dist/Engine.module.scss.d.ts +0 -5
  24. package/dist/component/CSSEditor/index.d.ts +0 -16
  25. package/dist/component/CSSEditor/style.module.scss.d.ts +0 -6
  26. package/dist/component/CSSPropertiesEditor/cssProperties.d.ts +0 -898
  27. package/dist/component/CSSPropertiesEditor/index.d.ts +0 -43
  28. package/dist/component/CSSPropertiesEditor/style.module.scss.d.ts +0 -15
  29. package/dist/component/CSSPropertiesEditor/util.d.ts +0 -1
  30. package/dist/component/CSSPropertiesVariableBindEditor/cssProperties.d.ts +0 -898
  31. package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +0 -37
  32. package/dist/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +0 -15
  33. package/dist/component/CSSPropertiesVariableBindEditor/util.d.ts +0 -1
  34. package/dist/component/ClassNameEditor/index.d.ts +0 -16
  35. package/dist/component/CustomSchemaForm/components/Form/Field/index.d.ts +0 -11
  36. package/dist/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +0 -8
  37. package/dist/component/CustomSchemaForm/components/Form/context.d.ts +0 -10
  38. package/dist/component/CustomSchemaForm/components/Form/index.d.ts +0 -17
  39. package/dist/component/CustomSchemaForm/components/SetterSwitcher/index.d.ts +0 -12
  40. package/dist/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +0 -7
  41. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/ArrayItem.d.ts +0 -11
  42. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/SortItemOrderModal.d.ts +0 -10
  43. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/index.d.ts +0 -14
  44. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +0 -7
  45. package/dist/component/CustomSchemaForm/components/Setters/BooleanSetter/index.d.ts +0 -5
  46. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/index.d.ts +0 -6
  47. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +0 -6
  48. package/dist/component/CustomSchemaForm/components/Setters/ExpressionSetter/index.d.ts +0 -8
  49. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/defaultDts.d.ts +0 -1
  50. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/index.d.ts +0 -2
  51. package/dist/component/CustomSchemaForm/components/Setters/JSONSetter/index.d.ts +0 -2
  52. package/dist/component/CustomSchemaForm/components/Setters/NumberSetter/index.d.ts +0 -3
  53. package/dist/component/CustomSchemaForm/components/Setters/SelectSetter/index.d.ts +0 -3
  54. package/dist/component/CustomSchemaForm/components/Setters/ShapeSetter/index.d.ts +0 -8
  55. package/dist/component/CustomSchemaForm/components/Setters/StringSetter/index.d.ts +0 -3
  56. package/dist/component/CustomSchemaForm/components/Setters/TextAreaSetter/index.d.ts +0 -3
  57. package/dist/component/CustomSchemaForm/components/Setters/index.d.ts +0 -3
  58. package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +0 -19
  59. package/dist/component/CustomSchemaForm/context.d.ts +0 -15
  60. package/dist/component/CustomSchemaForm/index.d.ts +0 -17
  61. package/dist/component/CustomSchemaForm/style.module.scss.d.ts +0 -11
  62. package/dist/component/CustomSchemaForm/utils.d.ts +0 -2
  63. package/dist/component/MonacoEditor/index.d.ts +0 -15
  64. package/dist/component/Workbench/index.d.ts +0 -57
  65. package/dist/component/Workbench/style.module.scss.d.ts +0 -26
  66. package/dist/core/pluginManager.d.ts +0 -56
  67. package/dist/i18n/en_US/index.d.ts +0 -5
  68. package/dist/i18n/index.d.ts +0 -6
  69. package/dist/i18n/zh_CN/index.d.ts +0 -5
  70. package/dist/index.d.ts +0 -42
  71. package/dist/material/innerMaterial.d.ts +0 -2
  72. package/dist/monacoeditorwork/css.worker.bundle.js +0 -45072
  73. package/dist/monacoeditorwork/editor.worker.bundle.js +0 -8294
  74. package/dist/monacoeditorwork/html.worker.bundle.js +0 -24321
  75. package/dist/monacoeditorwork/json.worker.bundle.js +0 -15550
  76. package/dist/monacoeditorwork/ts.worker.bundle.js +0 -169967
  77. package/dist/plugins/AdvancePanel/index.d.ts +0 -10
  78. package/dist/plugins/AdvancePanel/style.module.scss.d.ts +0 -7
  79. package/dist/plugins/ComponentLibrary/components/DragItem/index.d.ts +0 -12
  80. package/dist/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +0 -9
  81. package/dist/plugins/ComponentLibrary/components/ListView/index.d.ts +0 -9
  82. package/dist/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +0 -12
  83. package/dist/plugins/ComponentLibrary/index.d.ts +0 -3
  84. package/dist/plugins/ComponentLibrary/localize/en_US/index.d.ts +0 -1
  85. package/dist/plugins/ComponentLibrary/localize/index.d.ts +0 -2
  86. package/dist/plugins/ComponentLibrary/localize/zh_CN/index.d.ts +0 -1
  87. package/dist/plugins/ComponentLibrary/style.module.scss.d.ts +0 -11
  88. package/dist/plugins/ComponentLibrary/util.d.ts +0 -1
  89. package/dist/plugins/ComponentStatePanel/index.d.ts +0 -10
  90. package/dist/plugins/Designer/components/DefaultSelectToolBar/index.d.ts +0 -10
  91. package/dist/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +0 -11
  92. package/dist/plugins/Designer/components/GhostView/index.d.ts +0 -5
  93. package/dist/plugins/Designer/config.d.ts +0 -1
  94. package/dist/plugins/Designer/index.d.ts +0 -15
  95. package/dist/plugins/Designer/localize/en_US/index.d.ts +0 -1
  96. package/dist/plugins/Designer/localize/index.d.ts +0 -2
  97. package/dist/plugins/Designer/localize/zh_CN/index.d.ts +0 -1
  98. package/dist/plugins/Designer/style.module.scss.d.ts +0 -5
  99. package/dist/plugins/Designer/util.d.ts +0 -2
  100. package/dist/plugins/Designer/view.d.ts +0 -30
  101. package/dist/plugins/DisplaySourceSchema/index.d.ts +0 -9
  102. package/dist/plugins/GlobalStatePanel/index.d.ts +0 -3
  103. package/dist/plugins/GlobalStatePanel/localize/en_US/index.d.ts +0 -1
  104. package/dist/plugins/GlobalStatePanel/localize/index.d.ts +0 -2
  105. package/dist/plugins/GlobalStatePanel/localize/zh_CN/index.d.ts +0 -1
  106. package/dist/plugins/GlobalStatePanel/style.module.scss.d.ts +0 -5
  107. package/dist/plugins/History/index.d.ts +0 -2
  108. package/dist/plugins/OutlineTree/components/TreeView/context.d.ts +0 -30
  109. package/dist/plugins/OutlineTree/components/TreeView/dataStruct.d.ts +0 -21
  110. package/dist/plugins/OutlineTree/components/TreeView/index.d.ts +0 -34
  111. package/dist/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +0 -16
  112. package/dist/plugins/OutlineTree/components/TreeView/treeNode.d.ts +0 -9
  113. package/dist/plugins/OutlineTree/index.d.ts +0 -3
  114. package/dist/plugins/OutlineTree/localize/en_US/index.d.ts +0 -1
  115. package/dist/plugins/OutlineTree/localize/index.d.ts +0 -2
  116. package/dist/plugins/OutlineTree/localize/zh_CN/index.d.ts +0 -1
  117. package/dist/plugins/OutlineTree/util.d.ts +0 -15
  118. package/dist/plugins/PropertyPanel/index.d.ts +0 -9
  119. package/dist/plugins/PropertyPanel/style.module.scss.d.ts +0 -10
  120. package/dist/plugins/RightPanel/index.d.ts +0 -2
  121. package/dist/plugins/RightPanel/style.module.scss.d.ts +0 -10
  122. package/dist/plugins/RightPanel/view.d.ts +0 -34
  123. package/dist/plugins/VisualPanelPlus/index.d.ts +0 -9
  124. package/dist/plugins/VisualPanelPlus/style.module.scss.d.ts +0 -10
  125. package/dist/plugins/index.d.ts +0 -9
  126. package/dist/utils/css.d.ts +0 -19
  127. package/dist/utils/index.d.ts +0 -6
  128. package/dist/utils/logger.d.ts +0 -1
@@ -1,10 +0,0 @@
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;
@@ -1,7 +0,0 @@
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;
@@ -1,12 +0,0 @@
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";
@@ -1,9 +0,0 @@
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;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { SnippetsType } from '@chamn/model';
3
- export type ListViewProps = {
4
- dataSource: {
5
- name: string;
6
- list: SnippetsType[];
7
- }[];
8
- };
9
- export declare const ListView: (props: ListViewProps) => JSX.Element | null;
@@ -1,12 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- import { CPlugin } from '../../core/pluginManager';
2
- export declare const PLUGIN_NAME = "ComponentLib";
3
- export declare const ComponentLibPlugin: CPlugin;
@@ -1 +0,0 @@
1
- export declare const en_US: Record<string, any>;
@@ -1,2 +0,0 @@
1
- declare const _default: Record<string, any>;
2
- export default _default;
@@ -1 +0,0 @@
1
- export declare const zh_CN: Record<string, any>;
@@ -1,11 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export declare const getTargetMNodeKeyVal: (dom: HTMLElement | null, key: string) => null | string;
@@ -1,10 +0,0 @@
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;
@@ -1,10 +0,0 @@
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;
@@ -1,11 +0,0 @@
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;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { CNode, CRootNode } from '@chamn/model';
3
- export declare const GhostView: ({ node }: {
4
- node: CNode | CRootNode;
5
- }) => JSX.Element;
@@ -1 +0,0 @@
1
- export declare const PLUGIN_NAME = "Designer";
@@ -1,15 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export declare const en_US: Record<string, any>;
@@ -1,2 +0,0 @@
1
- declare const _default: Record<string, any>;
2
- export default _default;
@@ -1 +0,0 @@
1
- export declare const zh_CN: Record<string, any>;
@@ -1,5 +0,0 @@
1
- import globalClassNames from '../../style.d';
2
- declare const classNames: typeof globalClassNames & {
3
- readonly hoverTips: 'hoverTips';
4
- };
5
- export = classNames;
@@ -1,2 +0,0 @@
1
- import { CNode, CRootNode } from '@chamn/model';
2
- export declare const getCloseNodeList: (node: CNode | CRootNode, level?: number) => CNode[];
@@ -1,30 +0,0 @@
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 {};
@@ -1,9 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- import { CPlugin } from '../../core/pluginManager';
2
- export declare const PLUGIN_NAME = "GlobalState";
3
- export declare const GlobalStatePanelPlugin: CPlugin;
@@ -1 +0,0 @@
1
- export declare const en_US: Record<string, any>;
@@ -1,2 +0,0 @@
1
- declare const _default: Record<string, any>;
2
- export default _default;
@@ -1 +0,0 @@
1
- export declare const zh_CN: Record<string, any>;
@@ -1,5 +0,0 @@
1
- import globalClassNames from '../../style.d';
2
- declare const classNames: typeof globalClassNames & {
3
- readonly box: 'box';
4
- };
5
- export = classNames;
@@ -1,2 +0,0 @@
1
- import { CPlugin } from '../../core/pluginManager';
2
- export declare const HistoryPlugin: CPlugin;
@@ -1,30 +0,0 @@
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>;
@@ -1,21 +0,0 @@
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;
@@ -1,34 +0,0 @@
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 {};
@@ -1,16 +0,0 @@
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;
@@ -1,9 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- import { CPlugin } from '../../core/pluginManager';
2
- export declare const PLUGIN_NAME = "OutlineTree";
3
- export declare const OutlineTreePlugin: CPlugin;
@@ -1 +0,0 @@
1
- export declare const en_US: Record<string, any>;
@@ -1,2 +0,0 @@
1
- declare const _default: Record<string, any>;
2
- export default _default;
@@ -1 +0,0 @@
1
- export declare const zh_CN: Record<string, any>;
@@ -1,15 +0,0 @@
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>;
@@ -1,9 +0,0 @@
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;
@@ -1,10 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import { CPlugin } from '../../core/pluginManager';
2
- export declare const RightPanelPlugin: CPlugin;
@@ -1,10 +0,0 @@
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;
@@ -1,34 +0,0 @@
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 {};
@@ -1,9 +0,0 @@
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;
@@ -1,10 +0,0 @@
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;
@@ -1,9 +0,0 @@
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, };
@@ -1,19 +0,0 @@
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;
@@ -1,6 +0,0 @@
1
- /**
2
- *
3
- * @param time 毫秒
4
- * @returns
5
- */
6
- export declare const waitReactUpdate: (time?: number) => Promise<unknown>;
@@ -1 +0,0 @@
1
- export declare const LOGGER: import("consola").Consola;