@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.
Files changed (173) hide show
  1. package/.eslintrc.js +1 -0
  2. package/CHANGELOG.md +16 -0
  3. package/README.md +31 -0
  4. package/build.config.js +4 -3
  5. package/dist/Engine.module.scss.d.ts +5 -0
  6. package/dist/component/CSSEditor/index.d.ts +16 -0
  7. package/dist/component/CSSEditor/style.module.scss.d.ts +6 -0
  8. package/dist/component/CSSPropertiesEditor/cssProperties.d.ts +898 -0
  9. package/dist/component/CSSPropertiesEditor/index.d.ts +43 -0
  10. package/dist/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
  11. package/dist/component/CSSPropertiesEditor/util.d.ts +1 -0
  12. package/dist/component/CSSPropertiesVariableBindEditor/cssProperties.d.ts +898 -0
  13. package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +37 -0
  14. package/dist/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
  15. package/dist/component/CSSPropertiesVariableBindEditor/util.d.ts +1 -0
  16. package/dist/component/ClassNameEditor/index.d.ts +16 -0
  17. package/dist/component/CustomSchemaForm/components/Form/Field/index.d.ts +11 -0
  18. package/dist/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
  19. package/dist/component/CustomSchemaForm/components/Form/context.d.ts +10 -0
  20. package/dist/component/CustomSchemaForm/components/Form/index.d.ts +17 -0
  21. package/dist/component/CustomSchemaForm/components/SetterSwitcher/index.d.ts +12 -0
  22. package/dist/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
  23. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/ArrayItem.d.ts +11 -0
  24. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/SortItemOrderModal.d.ts +10 -0
  25. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/index.d.ts +14 -0
  26. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
  27. package/dist/component/CustomSchemaForm/components/Setters/BooleanSetter/index.d.ts +5 -0
  28. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/index.d.ts +6 -0
  29. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
  30. package/dist/component/CustomSchemaForm/components/Setters/ExpressionSetter/index.d.ts +8 -0
  31. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/defaultDts.d.ts +1 -0
  32. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/index.d.ts +2 -0
  33. package/dist/component/CustomSchemaForm/components/Setters/JSONSetter/index.d.ts +2 -0
  34. package/dist/component/CustomSchemaForm/components/Setters/NumberSetter/index.d.ts +3 -0
  35. package/dist/component/CustomSchemaForm/components/Setters/SelectSetter/index.d.ts +3 -0
  36. package/dist/component/CustomSchemaForm/components/Setters/ShapeSetter/index.d.ts +8 -0
  37. package/dist/component/CustomSchemaForm/components/Setters/StringSetter/index.d.ts +3 -0
  38. package/dist/component/CustomSchemaForm/components/Setters/TextAreaSetter/index.d.ts +3 -0
  39. package/dist/component/CustomSchemaForm/components/Setters/index.d.ts +3 -0
  40. package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +19 -0
  41. package/dist/component/CustomSchemaForm/context.d.ts +15 -0
  42. package/dist/component/CustomSchemaForm/index.d.ts +17 -0
  43. package/dist/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
  44. package/dist/component/CustomSchemaForm/utils.d.ts +2 -0
  45. package/dist/component/MonacoEditor/index.d.ts +15 -0
  46. package/dist/component/Workbench/style.module.scss.d.ts +26 -0
  47. package/dist/core/pluginManager.d.ts +1 -1
  48. package/dist/index.cjs.js +295 -39
  49. package/dist/index.cjs.js.map +1 -1
  50. package/dist/index.d.ts +4 -2
  51. package/dist/index.es.js +44920 -9933
  52. package/dist/index.es.js.map +1 -1
  53. package/dist/material/innerMaterial.d.ts +2 -0
  54. package/dist/monacoeditorwork/css.worker.bundle.js +45072 -0
  55. package/dist/monacoeditorwork/editor.worker.bundle.js +8294 -0
  56. package/dist/monacoeditorwork/html.worker.bundle.js +24321 -0
  57. package/dist/monacoeditorwork/json.worker.bundle.js +15550 -0
  58. package/dist/monacoeditorwork/ts.worker.bundle.js +169967 -0
  59. package/dist/plugins/AdvancePanel/index.d.ts +10 -0
  60. package/dist/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
  61. package/dist/plugins/ComponentLibrary/components/DragItem/index.d.ts +12 -0
  62. package/dist/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
  63. package/dist/plugins/ComponentLibrary/components/ListView/index.d.ts +9 -0
  64. package/dist/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
  65. package/dist/plugins/ComponentLibrary/index.d.ts +3 -0
  66. package/dist/plugins/ComponentLibrary/localize/en_US/index.d.ts +1 -0
  67. package/dist/plugins/ComponentLibrary/localize/index.d.ts +2 -0
  68. package/dist/plugins/ComponentLibrary/localize/zh_CN/index.d.ts +1 -0
  69. package/dist/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
  70. package/dist/plugins/ComponentLibrary/util.d.ts +1 -0
  71. package/dist/plugins/ComponentStatePanel/index.d.ts +10 -0
  72. package/dist/plugins/Designer/components/DefaultSelectToolBar/index.d.ts +10 -0
  73. package/dist/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
  74. package/dist/plugins/Designer/components/GhostView/index.d.ts +5 -0
  75. package/dist/plugins/Designer/config.d.ts +1 -0
  76. package/dist/plugins/Designer/index.d.ts +15 -0
  77. package/dist/plugins/Designer/localize/en_US/index.d.ts +1 -0
  78. package/dist/plugins/Designer/localize/index.d.ts +2 -0
  79. package/dist/plugins/Designer/localize/zh_CN/index.d.ts +1 -0
  80. package/dist/plugins/Designer/style.module.scss.d.ts +5 -0
  81. package/dist/plugins/Designer/util.d.ts +2 -0
  82. package/dist/plugins/Designer/view.d.ts +30 -0
  83. package/dist/plugins/DisplaySourceSchema/index.d.ts +9 -0
  84. package/dist/plugins/GlobalStatePanel/index.d.ts +3 -0
  85. package/dist/plugins/GlobalStatePanel/localize/en_US/index.d.ts +1 -0
  86. package/dist/plugins/GlobalStatePanel/localize/index.d.ts +2 -0
  87. package/dist/plugins/GlobalStatePanel/localize/zh_CN/index.d.ts +1 -0
  88. package/dist/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
  89. package/dist/plugins/History/index.d.ts +2 -0
  90. package/dist/plugins/OutlineTree/components/TreeView/context.d.ts +30 -0
  91. package/dist/plugins/OutlineTree/components/TreeView/dataStruct.d.ts +21 -0
  92. package/dist/plugins/OutlineTree/components/TreeView/index.d.ts +34 -0
  93. package/dist/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
  94. package/dist/plugins/OutlineTree/components/TreeView/treeNode.d.ts +9 -0
  95. package/dist/plugins/OutlineTree/index.d.ts +3 -0
  96. package/dist/plugins/OutlineTree/localize/en_US/index.d.ts +1 -0
  97. package/dist/plugins/OutlineTree/localize/index.d.ts +2 -0
  98. package/dist/plugins/OutlineTree/localize/zh_CN/index.d.ts +1 -0
  99. package/dist/plugins/OutlineTree/util.d.ts +15 -0
  100. package/dist/plugins/PropertyPanel/index.d.ts +9 -0
  101. package/dist/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
  102. package/dist/plugins/RightPanel/index.d.ts +2 -0
  103. package/dist/plugins/RightPanel/style.module.scss.d.ts +10 -0
  104. package/dist/plugins/RightPanel/view.d.ts +34 -0
  105. package/dist/plugins/VisualPanelPlus/index.d.ts +9 -0
  106. package/dist/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
  107. package/dist/plugins/index.d.ts +9 -0
  108. package/dist/style.css +1 -1
  109. package/dist/utils/css.d.ts +19 -0
  110. package/dist/utils/logger.d.ts +1 -0
  111. package/package.json +16 -8
  112. package/public/Engine.module.scss.d.ts +5 -0
  113. package/public/component/CSSEditor/style.module.scss.d.ts +6 -0
  114. package/public/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
  115. package/public/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
  116. package/public/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
  117. package/public/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
  118. package/public/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
  119. package/public/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
  120. package/public/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
  121. package/public/component/Workbench/style.module.scss.d.ts +26 -0
  122. package/public/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
  123. package/public/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
  124. package/public/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
  125. package/public/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
  126. package/public/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
  127. package/public/plugins/Designer/style.module.scss.d.ts +5 -0
  128. package/public/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
  129. package/public/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
  130. package/public/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
  131. package/public/plugins/RightPanel/style.module.scss.d.ts +10 -0
  132. package/public/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
  133. package/public/render.umd.js +14 -14
  134. package/public/render.umd.js.map +1 -1
  135. package/src/Engine.module.scss.d.ts +5 -0
  136. package/src/_dev_/page/Editor/index.tsx +1 -1
  137. package/src/component/CSSEditor/index.tsx +4 -5
  138. package/src/component/CSSEditor/style.module.scss.d.ts +6 -0
  139. package/src/component/CSSPropertiesEditor/index.tsx +1 -5
  140. package/src/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
  141. package/src/component/CSSPropertiesVariableBindEditor/index.tsx +1 -1
  142. package/src/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
  143. package/src/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
  144. package/src/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
  145. package/src/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
  146. package/src/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
  147. package/src/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
  148. package/src/component/MonacoEditor/index.tsx +1 -41
  149. package/src/component/Workbench/style.module.scss.d.ts +26 -0
  150. package/src/core/pluginManager.ts +1 -1
  151. package/src/index.tsx +5 -2
  152. package/src/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
  153. package/src/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
  154. package/src/plugins/ComponentLibrary/components/ListView/index.tsx +0 -1
  155. package/src/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
  156. package/src/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
  157. package/src/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
  158. package/src/plugins/Designer/style.module.scss.d.ts +5 -0
  159. package/src/plugins/DisplaySourceSchema/index.tsx +1 -1
  160. package/src/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
  161. package/src/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
  162. package/src/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
  163. package/src/plugins/RightPanel/style.module.scss.d.ts +10 -0
  164. package/src/plugins/VisualPanelPlus/index.tsx +3 -19
  165. package/src/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
  166. package/src/plugins/index.tsx +3 -1
  167. package/src/style.d.ts +2 -0
  168. package/src/typing.d.ts +5 -0
  169. package/dist/typing.d.ts +0 -4
  170. package/dist/vite-env.d.ts +0 -1
  171. package/public/typing.d.ts +0 -4
  172. package/public/vite-env.d.ts +0 -1
  173. package/src/component/MonacoEditor/index copy.tsx +0 -119
@@ -0,0 +1,37 @@
1
+ /// <reference types="react" />
2
+ import { JSExpressionPropType } from '@chamn/model';
3
+ export type SinglePropertyEditorProps = {
4
+ value?: {
5
+ key: string;
6
+ value: JSExpressionPropType;
7
+ };
8
+ onValueChange: (value: {
9
+ key: string;
10
+ value: JSExpressionPropType;
11
+ }) => void;
12
+ onDelete?: () => void;
13
+ onCreate?: (value: {
14
+ key: string;
15
+ value: JSExpressionPropType;
16
+ }) => {
17
+ errorKey?: string[];
18
+ } | void;
19
+ mod?: 'create' | 'edit';
20
+ };
21
+ export type CSSPropertiesVariableBindEditorProps = {
22
+ initialValue?: {
23
+ key: string;
24
+ value: string;
25
+ }[];
26
+ onValueChange?: (val: {
27
+ key: string;
28
+ value: string;
29
+ }[]) => void;
30
+ };
31
+ export type CSSPropertiesVariableBindEditorRef = {
32
+ setValue: (val: {
33
+ key: string;
34
+ value: string;
35
+ }[]) => void;
36
+ };
37
+ export declare const CSSPropertiesVariableBindEditor: import("react").ForwardRefExoticComponent<CSSPropertiesVariableBindEditorProps & import("react").RefAttributes<CSSPropertiesVariableBindEditorRef>>;
@@ -0,0 +1,15 @@
1
+ import globalClassNames from '../../style.d';
2
+ declare const classNames: typeof globalClassNames & {
3
+ readonly cssFieldBox: 'cssFieldBox';
4
+ readonly 'ant-select-selector': 'ant-select-selector';
5
+ readonly row: 'row';
6
+ readonly fieldLabel: 'fieldLabel';
7
+ readonly leftBox: 'leftBox';
8
+ readonly rightBox: 'rightBox';
9
+ readonly inputBox: 'inputBox';
10
+ readonly cssBox: 'cssBox';
11
+ readonly 'ant-collapse-borderless': 'ant-collapse-borderless';
12
+ readonly 'ant-collapse-item': 'ant-collapse-item';
13
+ readonly 'ant-collapse-content-box': 'ant-collapse-content-box';
14
+ };
15
+ export = classNames;
@@ -0,0 +1 @@
1
+ export declare const getTextWidth: (text: string, fontSize?: number) => Promise<string>;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { ClassNameType } from '@chamn/model';
3
+ export type ClassNameEditorProps = {
4
+ initialValue?: {
5
+ key: string;
6
+ value: string;
7
+ }[];
8
+ onValueChange?: (val: ClassNameType[]) => void;
9
+ };
10
+ export type ClassNameEditorRef = {
11
+ setValue: (val: {
12
+ key: string;
13
+ value: string;
14
+ }[]) => void;
15
+ };
16
+ export declare const ClassNameEditor: import("react").ForwardRefExoticComponent<ClassNameEditorProps & import("react").RefAttributes<ClassNameEditorRef>>;
@@ -0,0 +1,11 @@
1
+ import React, { ReactNode } from 'react';
2
+ export type CFieldProps = {
3
+ children: React.ReactNode;
4
+ label?: string;
5
+ tips?: ReactNode | (() => ReactNode);
6
+ name: string;
7
+ condition?: (formState: Record<string, any>) => boolean;
8
+ onConditionValueChange?: (val: boolean) => void;
9
+ noStyle?: boolean;
10
+ };
11
+ export declare const CField: (props: CFieldProps) => JSX.Element | null;
@@ -0,0 +1,8 @@
1
+ import globalClassNames from '../../../../../style.d';
2
+ declare const classNames: typeof globalClassNames & {
3
+ readonly fieldBox: 'fieldBox';
4
+ readonly label: 'label';
5
+ readonly tipsLabel: 'tipsLabel';
6
+ readonly content: 'content';
7
+ };
8
+ export = classNames;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export type ContextState = Record<string, any>;
3
+ export type CFormContextData = {
4
+ formName: string;
5
+ formState: ContextState;
6
+ conditionConfig: Record<string, (state: ContextState) => boolean>;
7
+ updateContext: (newState: ContextState) => void;
8
+ updateConditionConfig: (name: string, cb: (state: ContextState) => boolean) => void;
9
+ };
10
+ export declare const CFormContext: React.Context<CFormContextData>;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { CFormContextData, ContextState } from './context';
4
+ export type CFormProps = {
5
+ name: string;
6
+ children?: ReactNode | ReactNode[];
7
+ initialValue?: Record<string, any>;
8
+ onValueChange?: (formData: Record<string, any>) => void;
9
+ };
10
+ export declare class CForm extends React.Component<CFormProps, CFormContextData> {
11
+ updateContext: (newState: ContextState) => void;
12
+ constructor(props: CFormProps);
13
+ getFieldsValue: () => Record<string, any>;
14
+ setFields: (state: Record<string, any>) => void;
15
+ formatValue: (data: Record<string, any>) => Record<string, any>;
16
+ render(): ReactNode;
17
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { SetterObjType } from '@chamn/model';
3
+ import { CFieldProps } from '../Form/Field';
4
+ export type SetterSwitcherProps = {
5
+ setters: SetterObjType[];
6
+ keyPaths: string[];
7
+ prefix?: React.ReactNode;
8
+ suffix?: React.ReactNode;
9
+ style?: React.CSSProperties;
10
+ useField?: boolean;
11
+ } & Omit<CFieldProps, 'children'>;
12
+ export declare const SetterSwitcher: ({ setters, keyPaths, condition, useField, ...props }: SetterSwitcherProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import globalClassNames from '../../../../style.d';
2
+ declare const classNames: typeof globalClassNames & {
3
+ readonly switchBtn: 'switchBtn';
4
+ readonly shapeFieldBox: 'shapeFieldBox';
5
+ readonly collapseHeader: 'collapseHeader';
6
+ };
7
+ export = classNames;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { SetterObjType } from '@chamn/model';
3
+ export declare function ArrayItem(props: {
4
+ index: number;
5
+ keyPaths: string[];
6
+ value: Record<string, any>;
7
+ setters: SetterObjType[];
8
+ style: React.CSSProperties;
9
+ onValueChange: (val: Record<string, any>) => void;
10
+ onDelete: () => void;
11
+ }): JSX.Element;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { ModalProps } from 'antd';
3
+ export type SortItemOrderProps = {
4
+ list: any[];
5
+ keyPaths: string[];
6
+ label: string;
7
+ sortLabelKey?: string;
8
+ onValueChange?: (newList: any[]) => void;
9
+ } & ModalProps;
10
+ export declare const SortItemOrderModal: ({ list, onValueChange, keyPaths, label, sortLabelKey, ...modalProps }: SortItemOrderProps) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { CSetterProps } from '../type';
3
+ import { SetterType } from '@chamn/model';
4
+ export type CArraySetterProps = {
5
+ item: {
6
+ setters: SetterType[];
7
+ initialValue?: any;
8
+ };
9
+ sortLabelKey?: string;
10
+ };
11
+ export declare const ArraySetter: {
12
+ ({ onValueChange, setterContext, item: { setters, initialValue }, sortLabelKey, ...props }: CSetterProps<CArraySetterProps>): JSX.Element;
13
+ setterName: string;
14
+ };
@@ -0,0 +1,7 @@
1
+ import globalClassNames from '../../../../../style.d';
2
+ declare const classNames: typeof globalClassNames & {
3
+ readonly dragItem: 'dragItem';
4
+ readonly sortModalBox: 'sortModalBox';
5
+ readonly addOneBtn: 'addOneBtn';
6
+ };
7
+ export = classNames;
@@ -0,0 +1,5 @@
1
+ import { SwitchProps } from 'antd';
2
+ import { CSetter } from '../type';
3
+ type BooleanSetterProps = SwitchProps;
4
+ export declare const BooleanSetter: CSetter<BooleanSetterProps>;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ import { CSetter } from '../type';
2
+ type CSSValueSetterProps = {
3
+ propertyKey: string;
4
+ };
5
+ export declare const CSSValueSetter: CSetter<CSSValueSetterProps>;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import globalClassNames from '../../../../../style.d';
2
+ declare const classNames: typeof globalClassNames & {
3
+ readonly inputAuto: 'inputAuto';
4
+ readonly active: 'active';
5
+ };
6
+ export = classNames;
@@ -0,0 +1,8 @@
1
+ import { InputProps } from 'antd';
2
+ import { CSetter } from '../type';
3
+ export declare const ExpressionSetter: CSetter<InputProps & {
4
+ value: {
5
+ type: string;
6
+ value: string;
7
+ };
8
+ }>;
@@ -0,0 +1 @@
1
+ export declare const DefaultTslibSource = "\ntype ContextType = {\n /** \u6E32\u67D3\u51FD\u6570\u7684\u5165\u53E3\u53C2\u6570 */\n params?: Record<any, any>;\n /** \u5168\u5C40\u72B6\u6001 */\n globalState?: Record<any, any>;\n /** \u66F4\u65B0\u5168\u5C40\u72B6\u6001 */\n updateGlobalState?: (newState: any) => void;\n /** \u5F53\u524D\u8282\u70B9\u72B6\u6001 **/\n state?: Record<any, any>;\n /** \u5B58\u50A8\u5F53\u524D\u8282\u70B9\u7684\u6570\u636E\uFF0C\u4E0D\u5177\u6709\u54CD\u5E94\u6027 **/\n staticState?: Record<any, any>;\n /** \u66F4\u65B0\u5F53\u524D\u8282\u70B9\u72B6\u6001 */\n updateState?: (newState: any) => void;\n /** \u6240\u6709\u8282\u70B9\u7684\u7D22\u5F15 */\n refs?: RefManager;\n /** \u5FAA\u73AF\u6E32\u67D3\u4E2D\u7684\u5355\u4E2A\u5FAA\u73AF\u6570\u636E */\n loopData?: Record<any, any>;\n /** \u7528\u4E8E\u8BBF\u8BBF\u95EE\u548C\u7BA1\u7406\u9875\u9762\u88AB\u6CE8\u518C\u4E3A\u5168\u5C40\u7684\u5C40\u90E8 state */\n stateManager?: Record<string, {\n state: any,\n updateState: (newState: Record<string, any>) => void\n }>;\n};\n\n/** \u6E32\u67D3\u4E0A\u4E0B\u6587 */\ndeclare var $$context: ContextType;\n";
@@ -0,0 +1,2 @@
1
+ import { CSetter } from '../type';
2
+ export declare const FunctionSetter: CSetter<any>;
@@ -0,0 +1,2 @@
1
+ import { CSetter } from '../type';
2
+ export declare const JSONSetter: CSetter<any>;
@@ -0,0 +1,3 @@
1
+ import { InputNumberProps } from 'antd';
2
+ import { CSetter } from '../type';
3
+ export declare const NumberSetter: CSetter<InputNumberProps>;
@@ -0,0 +1,3 @@
1
+ import { SelectProps } from 'antd';
2
+ import { CSetter } from '../type';
3
+ export declare const SelectSetter: CSetter<SelectProps>;
@@ -0,0 +1,8 @@
1
+ import { CSetter } from '../type';
2
+ import { MaterialPropType } from '@chamn/model';
3
+ export type CShapeSetterProps = {
4
+ elements: MaterialPropType[];
5
+ initialValue?: Record<string, any>;
6
+ value: Record<string, any>;
7
+ };
8
+ export declare const ShapeSetter: CSetter<CShapeSetterProps>;
@@ -0,0 +1,3 @@
1
+ import { InputProps } from 'antd';
2
+ import { CSetter } from '../type';
3
+ export declare const StringSetter: CSetter<InputProps>;
@@ -0,0 +1,3 @@
1
+ import { CSetter } from '../type';
2
+ import { TextAreaProps } from 'antd/es/input';
3
+ export declare const TextAreaSetter: CSetter<TextAreaProps>;
@@ -0,0 +1,3 @@
1
+ import { CSetter } from './type';
2
+ declare const _default: Record<string, CSetter<any>>;
3
+ export default _default;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { CPluginCtx } from '../../../../core/pluginManager';
3
+ export type CSetter<T = any> = {
4
+ (props: CSetterProps<T>): JSX.Element;
5
+ setterName: string;
6
+ };
7
+ export type CSetterProps<T = {
8
+ _: any;
9
+ }> = {
10
+ onValueChange?: ((val: any) => void) | undefined;
11
+ value?: unknown;
12
+ setterContext: {
13
+ pluginCtx: CPluginCtx;
14
+ setCollapseHeaderExt?: (el: React.ReactNode) => void;
15
+ onSetterChange: (keyPaths: string[], setterName: string) => void;
16
+ keyPaths: string[];
17
+ label: string;
18
+ };
19
+ } & T;
@@ -0,0 +1,15 @@
1
+ import React, { Ref } from 'react';
2
+ import { CustomSchemaFormInstance } from '.';
3
+ import { CPluginCtx } from '../../core/pluginManager';
4
+ import { CForm } from './components/Form';
5
+ export type ContextState = Record<string, any>;
6
+ export type CCustomSchemaFormContextData = {
7
+ onSetterChange: (keyPaths: string[], setterName: string) => void;
8
+ defaultSetterConfig: Record<string, {
9
+ name: string;
10
+ setter: string;
11
+ }>;
12
+ formRef?: Ref<CustomSchemaFormInstance | CForm>;
13
+ pluginCtx?: CPluginCtx;
14
+ };
15
+ export declare const CCustomSchemaFormContext: React.Context<CCustomSchemaFormContextData>;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { CMaterialPropsType } from '@chamn/model';
3
+ import { CForm } from './components/Form';
4
+ import { CPluginCtx } from '../../core/pluginManager';
5
+ export type CustomSchemaFormInstance = CForm;
6
+ export type CustomSchemaFormProps = {
7
+ pluginCtx?: CPluginCtx;
8
+ initialValue: Record<string, any>;
9
+ properties: CMaterialPropsType<any>;
10
+ onValueChange?: (val: any) => void;
11
+ onSetterChange: (keyPaths: string[], setterName: string) => void;
12
+ defaultSetterConfig: Record<string, {
13
+ name: string;
14
+ setter: string;
15
+ }>;
16
+ };
17
+ export declare const CustomSchemaForm: React.ForwardRefExoticComponent<CustomSchemaFormProps & React.RefAttributes<CForm>>;
@@ -0,0 +1,11 @@
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
+ readonly 'ant-collapse-expand-icon': 'ant-collapse-expand-icon';
10
+ };
11
+ export = classNames;
@@ -0,0 +1,2 @@
1
+ import { SetterObjType, SetterType } from '@chamn/model';
2
+ export declare const getSetterList: <T extends string = "">(setters?: SetterType<T>[]) => SetterObjType<T>[];
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import * as monaco from 'monaco-editor';
3
+ import * as monacoEditor from 'monaco-editor/esm/vs/editor/editor.api';
4
+ export type MonacoEditorInstance = monacoEditor.editor.IStandaloneCodeEditor;
5
+ export type MonacoEditorProps = {
6
+ beforeMount?: (monaco: typeof monacoEditor) => void;
7
+ onDidMount?: (editor: MonacoEditorInstance) => void;
8
+ options?: monaco.editor.IStandaloneEditorConstructionOptions;
9
+ override?: monaco.editor.IEditorOverrideServices;
10
+ onChange?: (val: string, e: monaco.editor.IModelContentChangedEvent) => void;
11
+ onDidChangeMarkers?: (markers: monaco.editor.IMarker[]) => void;
12
+ initialValue?: string;
13
+ language?: 'json' | 'javascript' | 'typescript';
14
+ };
15
+ export declare const MonacoEditor: (props: MonacoEditorProps) => JSX.Element;
@@ -0,0 +1,26 @@
1
+ import globalClassNames from '../../style.d';
2
+ declare const classNames: typeof globalClassNames & {
3
+ readonly workbenchContainer: 'workbenchContainer';
4
+ readonly topToolBarBox: 'topToolBarBox';
5
+ readonly logo: 'logo';
6
+ readonly topToolBarView: 'topToolBarView';
7
+ readonly bodyContent: 'bodyContent';
8
+ readonly leftBox: 'leftBox';
9
+ readonly pluginIconBar: 'pluginIconBar';
10
+ readonly pluginIconItem: 'pluginIconItem';
11
+ readonly active: 'active';
12
+ readonly pluginPanelBoxResizeBox: 'pluginPanelBoxResizeBox';
13
+ readonly pluginHeader: 'pluginHeader';
14
+ readonly pluginNameText: 'pluginNameText';
15
+ readonly closeBtn: 'closeBtn';
16
+ readonly fixedBtn: 'fixedBtn';
17
+ readonly pluginPanelBox: 'pluginPanelBox';
18
+ readonly rightResizeBox: 'rightResizeBox';
19
+ readonly arrowCursor: 'arrowCursor';
20
+ readonly rightBox: 'rightBox';
21
+ readonly centerBox: 'centerBox';
22
+ readonly subTopToolbarBox: 'subTopToolbarBox';
23
+ readonly canvasBox: 'canvasBox';
24
+ readonly scrollBox: 'scrollBox';
25
+ };
26
+ export = classNames;
@@ -1,4 +1,4 @@
1
- import Engine from '../Engine';
1
+ import { Engine } from '../index';
2
2
  import { AssetPackage, CPage } from '@chamn/model';
3
3
  import { Emitter } from 'mitt';
4
4
  import { Workbench } from '../component/Workbench';