@chamn/engine 0.0.40 → 0.0.41

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 (129) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +17 -17
  4. package/dist/index.mjs.map +1 -1
  5. package/package.json +7 -7
  6. package/dist/Engine.module.scss.d.ts +0 -5
  7. package/dist/component/CSSEditor/index.d.ts +0 -16
  8. package/dist/component/CSSEditor/style.module.scss.d.ts +0 -6
  9. package/dist/component/CSSPropertiesEditor/cssProperties.d.ts +0 -898
  10. package/dist/component/CSSPropertiesEditor/index.d.ts +0 -21
  11. package/dist/component/CSSPropertiesEditor/signleProperty.d.ts +0 -25
  12. package/dist/component/CSSPropertiesEditor/style.module.scss.d.ts +0 -17
  13. package/dist/component/CSSPropertiesVariableBindEditor/SingleProperty.d.ts +0 -24
  14. package/dist/component/CSSPropertiesVariableBindEditor/cssProperties.d.ts +0 -898
  15. package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +0 -19
  16. package/dist/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +0 -16
  17. package/dist/component/CSSSizeInput/index.d.ts +0 -39
  18. package/dist/component/CSSSizeInput/style.module.scss.d.ts +0 -10
  19. package/dist/component/CSSUIPanel/BackgroundInput/index.d.ts +0 -10
  20. package/dist/component/CSSUIPanel/BorderInput/index.d.ts +0 -10
  21. package/dist/component/CSSUIPanel/DimensionInput/index.d.ts +0 -11
  22. package/dist/component/CSSUIPanel/FontInput/index.d.ts +0 -10
  23. package/dist/component/CSSUIPanel/MarginAndPaddingInput/index.d.ts +0 -11
  24. package/dist/component/CSSUIPanel/ShadowInput/index.d.ts +0 -10
  25. package/dist/component/CSSUIPanel/index.d.ts +0 -9
  26. package/dist/component/CSSUIPanel/style.module.scss.d.ts +0 -11
  27. package/dist/component/CSSUIPanel/type.d.ts +0 -3
  28. package/dist/component/ClassNameEditor/index.d.ts +0 -10
  29. package/dist/component/CustomSchemaForm/components/Form/Field/index.d.ts +0 -12
  30. package/dist/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +0 -8
  31. package/dist/component/CustomSchemaForm/components/Form/context.d.ts +0 -12
  32. package/dist/component/CustomSchemaForm/components/Form/index.d.ts +0 -19
  33. package/dist/component/CustomSchemaForm/components/SetterSwitcher/index.d.ts +0 -14
  34. package/dist/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +0 -7
  35. package/dist/component/CustomSchemaForm/components/Setters/AntDColorSetter/index.d.ts +0 -2
  36. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/ArrayItem.d.ts +0 -11
  37. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/SortItemOrderModal.d.ts +0 -10
  38. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/index.d.ts +0 -14
  39. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +0 -7
  40. package/dist/component/CustomSchemaForm/components/Setters/BooleanSetter/index.d.ts +0 -7
  41. package/dist/component/CustomSchemaForm/components/Setters/CSSSizeSetter/index.d.ts +0 -3
  42. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/index.d.ts +0 -6
  43. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +0 -6
  44. package/dist/component/CustomSchemaForm/components/Setters/ColorSetter/index.d.ts +0 -2
  45. package/dist/component/CustomSchemaForm/components/Setters/ExpressionSetter/index.d.ts +0 -10
  46. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/index.d.ts +0 -2
  47. package/dist/component/CustomSchemaForm/components/Setters/JSONSetter/index.d.ts +0 -2
  48. package/dist/component/CustomSchemaForm/components/Setters/NumberSetter/index.d.ts +0 -3
  49. package/dist/component/CustomSchemaForm/components/Setters/RadioGroupSetter/index.d.ts +0 -2
  50. package/dist/component/CustomSchemaForm/components/Setters/SelectSetter/index.d.ts +0 -3
  51. package/dist/component/CustomSchemaForm/components/Setters/ShapeSetter/index.d.ts +0 -8
  52. package/dist/component/CustomSchemaForm/components/Setters/SliderSetter/index.d.ts +0 -3
  53. package/dist/component/CustomSchemaForm/components/Setters/StringSetter/index.d.ts +0 -3
  54. package/dist/component/CustomSchemaForm/components/Setters/TextAreaSetter/index.d.ts +0 -3
  55. package/dist/component/CustomSchemaForm/components/Setters/index.d.ts +0 -4
  56. package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +0 -20
  57. package/dist/component/CustomSchemaForm/context.d.ts +0 -15
  58. package/dist/component/CustomSchemaForm/index.d.ts +0 -22
  59. package/dist/component/CustomSchemaForm/style.module.scss.d.ts +0 -11
  60. package/dist/component/CustomSchemaForm/utils.d.ts +0 -2
  61. package/dist/component/InputNumberPlus/index.d.ts +0 -9
  62. package/dist/component/InputNumberPlus/style.module.scss.d.ts +0 -6
  63. package/dist/component/MonacoEditor/index.d.ts +0 -14
  64. package/dist/component/Workbench/index.d.ts +0 -72
  65. package/dist/component/Workbench/style.module.scss.d.ts +0 -26
  66. package/dist/config/colorPickerColorList.d.ts +0 -4
  67. package/dist/core/assetPackagesListManage.d.ts +0 -8
  68. package/dist/core/pluginManager.d.ts +0 -63
  69. package/dist/i18n/en_US/index.d.ts +0 -5
  70. package/dist/i18n/index.d.ts +0 -6
  71. package/dist/i18n/zh_CN/index.d.ts +0 -5
  72. package/dist/index.d.ts +0 -57
  73. package/dist/material/innerMaterial.d.ts +0 -2
  74. package/dist/plugins/AdvancePanel/index.d.ts +0 -10
  75. package/dist/plugins/AdvancePanel/style.module.scss.d.ts +0 -7
  76. package/dist/plugins/ComponentLibrary/components/DragItem/index.d.ts +0 -12
  77. package/dist/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +0 -9
  78. package/dist/plugins/ComponentLibrary/components/ListView/index.d.ts +0 -9
  79. package/dist/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +0 -12
  80. package/dist/plugins/ComponentLibrary/index.d.ts +0 -3
  81. package/dist/plugins/ComponentLibrary/localize/en_US/index.d.ts +0 -1
  82. package/dist/plugins/ComponentLibrary/localize/index.d.ts +0 -2
  83. package/dist/plugins/ComponentLibrary/localize/zh_CN/index.d.ts +0 -1
  84. package/dist/plugins/ComponentLibrary/style.module.scss.d.ts +0 -11
  85. package/dist/plugins/ComponentLibrary/util.d.ts +0 -1
  86. package/dist/plugins/ComponentStatePanel/index.d.ts +0 -10
  87. package/dist/plugins/Designer/components/Canvas/advanceCustomHook.d.ts +0 -45
  88. package/dist/plugins/Designer/components/Canvas/index.d.ts +0 -63
  89. package/dist/plugins/Designer/components/Canvas/style.module.scss.d.ts +0 -5
  90. package/dist/plugins/Designer/components/DefaultSelectToolBar/index.d.ts +0 -16
  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 -2
  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/type.d.ts +0 -26
  99. package/dist/plugins/Designer/util.d.ts +0 -2
  100. package/dist/plugins/DisplaySourceSchema/index.d.ts +0 -9
  101. package/dist/plugins/GlobalStatePanel/index.d.ts +0 -3
  102. package/dist/plugins/GlobalStatePanel/localize/en_US/index.d.ts +0 -1
  103. package/dist/plugins/GlobalStatePanel/localize/index.d.ts +0 -2
  104. package/dist/plugins/GlobalStatePanel/localize/zh_CN/index.d.ts +0 -1
  105. package/dist/plugins/GlobalStatePanel/style.module.scss.d.ts +0 -5
  106. package/dist/plugins/History/index.d.ts +0 -2
  107. package/dist/plugins/History/type.d.ts +0 -12
  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 -33
  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 -11
  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 -14
  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 -39
  123. package/dist/plugins/VisualPanelPlus/index.d.ts +0 -4
  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 -40
  127. package/dist/utils/defaultEngineConfig.d.ts +0 -13
  128. package/dist/utils/index.d.ts +0 -12
  129. package/dist/utils/logger.d.ts +0 -1
@@ -1,19 +0,0 @@
1
- /// <reference types="react" />
2
- import { JSExpressionPropType } from '@chamn/model';
3
- export type CSSPropertiesVariableBindEditorProps = {
4
- initialValue?: {
5
- property: string;
6
- value: string | JSExpressionPropType;
7
- }[];
8
- onValueChange?: (val: {
9
- property: string;
10
- value: string;
11
- }[]) => void;
12
- };
13
- export type CSSPropertiesVariableBindEditorRef = {
14
- setValue: (val: {
15
- property: string;
16
- value: string | JSExpressionPropType;
17
- }[]) => void;
18
- };
19
- export declare const CSSPropertiesVariableBindEditor: import("react").ForwardRefExoticComponent<CSSPropertiesVariableBindEditorProps & import("react").RefAttributes<CSSPropertiesVariableBindEditorRef>>;
@@ -1,16 +0,0 @@
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
- readonly switchBtn: 'switchBtn';
15
- };
16
- export = classNames;
@@ -1,39 +0,0 @@
1
- import { InputProps } from 'antd';
2
- import { MouseEventHandler } from 'react';
3
- type CumulativeInfoType = {
4
- x: number;
5
- y: number;
6
- cumulativeX: number;
7
- cumulativeY: number;
8
- };
9
- export declare const useDragSize: (options?: {
10
- onStart?: ((data: CumulativeInfoType) => void) | undefined;
11
- onChange?: ((data: CumulativeInfoType) => void) | undefined;
12
- onEnd?: ((data: CumulativeInfoType) => void) | undefined;
13
- limitCumulative?: {
14
- x?: [number | undefined, number | undefined] | undefined;
15
- y?: [number | undefined, number | undefined] | undefined;
16
- } | undefined;
17
- } | undefined) => {
18
- onMouseDown: MouseEventHandler<any>;
19
- };
20
- type MinMaxType = {
21
- px?: number;
22
- vw?: number;
23
- vh?: number;
24
- rem?: number;
25
- };
26
- export type CSSSizeInputProps = {
27
- value?: string;
28
- onValueChange?: (newVal: string | undefined) => void;
29
- min?: MinMaxType | number;
30
- max?: MinMaxType | number;
31
- size?: InputProps['size'];
32
- style?: React.CSSProperties;
33
- unit?: boolean;
34
- /** 累计的偏移量,映射为具体的值,默认 1:1 */
35
- cumulativeTransform?: (params: CumulativeInfoType) => CumulativeInfoType;
36
- unitList?: (keyof MinMaxType)[];
37
- };
38
- export declare const CSSSizeInput: (props: CSSSizeInputProps) => JSX.Element;
39
- export {};
@@ -1,10 +0,0 @@
1
- import globalClassNames from '../../style.d';
2
- declare const classNames: typeof globalClassNames & {
3
- readonly cssSizeInput: 'cssSizeInput';
4
- readonly unitSelect: 'unitSelect';
5
- readonly 'ant-select-focused': 'ant-select-focused';
6
- readonly 'ant-select-selector': 'ant-select-selector';
7
- readonly 'ant-select-selection-item': 'ant-select-selection-item';
8
- readonly 'ant-select-arrow': 'ant-select-arrow';
9
- };
10
- export = classNames;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { InputCommonRef } from '../type';
3
- type Value = Record<'background-color' | 'background-image' | 'background-repeat' | 'background-size', string>;
4
- export type BackgroundInputProps = {
5
- value?: Value;
6
- initialValue?: Value;
7
- onChange?: (newVal: Value) => void;
8
- };
9
- export declare const BackgroundInput: import("react").ForwardRefExoticComponent<BackgroundInputProps & import("react").RefAttributes<InputCommonRef>>;
10
- export {};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { InputCommonRef } from '../type';
3
- type Value = Record<'border' | 'border-radius', string>;
4
- export type BorderInputProps = {
5
- value?: Value;
6
- initialValue?: Value;
7
- onChange?: (newVal: Value) => void;
8
- };
9
- export declare const BorderInput: import("react").ForwardRefExoticComponent<BorderInputProps & import("react").RefAttributes<InputCommonRef>>;
10
- export {};
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { InputCommonRef } from '../type';
3
- declare const keyList: readonly ["width", "height", "min-width", "max-width", "min-height", "max-height", "flex", "display"];
4
- type Value = Record<typeof keyList[number], string>;
5
- export type DimensionInputProps = {
6
- value?: Value;
7
- initialValue?: Value;
8
- onChange?: (newVal: Value) => void;
9
- };
10
- export declare const DimensionInput: import("react").ForwardRefExoticComponent<DimensionInputProps & import("react").RefAttributes<InputCommonRef>>;
11
- export {};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { InputCommonRef } from '../type';
3
- type Value = Record<'font-size' | 'color' | 'text-align' | 'font-weight', string>;
4
- export type FontInputProps = {
5
- initialValue?: Value;
6
- value?: Value;
7
- onChange?: (newVal: Value) => void;
8
- };
9
- export declare const FontInput: import("react").ForwardRefExoticComponent<FontInputProps & import("react").RefAttributes<InputCommonRef>>;
10
- export {};
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { InputCommonRef } from '../type';
3
- type Value = Record<'left' | 'right' | 'top' | 'bottom' | 'all', string>;
4
- export type MarginAndPaddingInputProps = {
5
- value?: Value;
6
- initialValue?: Value;
7
- onChange?: (newVal: Value) => void;
8
- prefix: 'margin' | 'padding';
9
- };
10
- export declare const MarginAndPaddingInput: import("react").ForwardRefExoticComponent<MarginAndPaddingInputProps & import("react").RefAttributes<InputCommonRef>>;
11
- export {};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { InputCommonRef } from '../type';
3
- type Value = Record<'box-shadow', string>;
4
- export type ShadowInputProps = {
5
- value?: Value;
6
- initialValue?: Value;
7
- onChange?: (newVal: Value) => void;
8
- };
9
- export declare const ShadowInput: import("react").ForwardRefExoticComponent<ShadowInputProps & import("react").RefAttributes<InputCommonRef>>;
10
- export {};
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { InputCommonRef } from './type';
3
- export type CSSUIPanelProps = {
4
- initialVal?: Record<string, string>;
5
- value?: Record<string, string>;
6
- onValueChange?: (newVal: Record<string, string>) => void;
7
- };
8
- export type CSSUIPanelRef = InputCommonRef;
9
- export declare const CSSUIPanel: import("react").ForwardRefExoticComponent<CSSUIPanelProps & import("react").RefAttributes<InputCommonRef>>;
@@ -1,11 +0,0 @@
1
- import globalClassNames from '../../style.d';
2
- declare const classNames: typeof globalClassNames & {
3
- readonly label: 'label';
4
- readonly font: 'font';
5
- readonly 'm-p': 'm-p';
6
- readonly fontOption: 'fontOption';
7
- readonly row: 'row';
8
- readonly CSSUIPanel: 'CSSUIPanel';
9
- readonly 'ant-radio-button-wrapper': 'ant-radio-button-wrapper';
10
- };
11
- export = classNames;
@@ -1,3 +0,0 @@
1
- export type InputCommonRef = {
2
- setValue: (newVal: Record<string, string>) => void;
3
- };
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { ClassNameType } from '@chamn/model';
3
- export type ClassNameEditorProps = {
4
- initialValue?: ClassNameType[];
5
- onValueChange?: (val: ClassNameType[]) => void;
6
- };
7
- export type ClassNameEditorRef = {
8
- setValue: (val: ClassNameType[]) => void;
9
- };
10
- export declare const ClassNameEditor: React.ForwardRefExoticComponent<ClassNameEditorProps & React.RefAttributes<ClassNameEditorRef>>;
@@ -1,12 +0,0 @@
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
- hiddenLabel?: boolean;
11
- };
12
- export declare const CField: (props: CFieldProps) => JSX.Element | null;
@@ -1,8 +0,0 @@
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;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { CSetter } from '../Setters/type';
3
- export type ContextState = Record<string, any>;
4
- export type CFormContextData = {
5
- formName: string;
6
- formState: ContextState;
7
- conditionConfig: Record<string, (state: ContextState) => boolean>;
8
- customSetterMap?: Record<string, CSetter>;
9
- updateContext: (newState: ContextState) => void;
10
- updateConditionConfig: (name: string, cb: (state: ContextState) => boolean) => void;
11
- };
12
- export declare const CFormContext: React.Context<CFormContextData>;
@@ -1,19 +0,0 @@
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
- customSetterMap: CFormContextData['customSetterMap'];
9
- onValueChange?: (formData: Record<string, any>) => void;
10
- };
11
- export declare const registerCustomSetter: (customSetterMap: CFormContextData['customSetterMap']) => void;
12
- export declare class CForm extends React.Component<CFormProps, CFormContextData> {
13
- updateContext: (newState: ContextState) => void;
14
- constructor(props: CFormProps);
15
- getFieldsValue: () => Record<string, any>;
16
- setFields: (state: Record<string, any>) => void;
17
- formatValue: (data: Record<string, any>) => Record<string, any>;
18
- render(): ReactNode;
19
- }
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { SetterObjType } from '@chamn/model';
3
- import { CFieldProps } from '../Form/Field';
4
- import { CSetter } from '../Setters/type';
5
- export type SetterSwitcherProps = {
6
- setters: SetterObjType[];
7
- customSetterMap?: Record<string, CSetter>;
8
- keyPaths: string[];
9
- prefix?: React.ReactNode;
10
- suffix?: React.ReactNode;
11
- style?: React.CSSProperties;
12
- useField?: boolean;
13
- } & Omit<CFieldProps, 'children'>;
14
- export declare const SetterSwitcher: ({ setters, keyPaths, condition, useField, ...props }: SetterSwitcherProps) => JSX.Element;
@@ -1,7 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import { CSetter } from '../type';
2
- export declare const AntDColorSetter: CSetter;
@@ -1,11 +0,0 @@
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;
@@ -1,10 +0,0 @@
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;
@@ -1,14 +0,0 @@
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: itemInitialValue }, sortLabelKey, initialValue, ...props }: CSetterProps<CArraySetterProps>): JSX.Element;
13
- setterName: string;
14
- };
@@ -1,7 +0,0 @@
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;
@@ -1,7 +0,0 @@
1
- import { SwitchProps } from 'antd';
2
- import { CSetter } from '../type';
3
- type BooleanSetterProps = SwitchProps;
4
- export declare const BooleanSetter: CSetter<BooleanSetterProps & {
5
- initialValue?: boolean;
6
- }>;
7
- export {};
@@ -1,3 +0,0 @@
1
- import { CSetter } from '../type';
2
- import { CSSSizeInputProps } from '../../../../../component/CSSSizeInput';
3
- export declare const CSSSizeSetter: CSetter<CSSSizeInputProps>;
@@ -1,6 +0,0 @@
1
- import { CSetter } from '../type';
2
- type CSSValueSetterProps = {
3
- propertyKey: string;
4
- };
5
- export declare const CSSValueSetter: CSetter<CSSValueSetterProps>;
6
- export {};
@@ -1,6 +0,0 @@
1
- import globalClassNames from '../../../../../style.d';
2
- declare const classNames: typeof globalClassNames & {
3
- readonly inputAuto: 'inputAuto';
4
- readonly active: 'active';
5
- };
6
- export = classNames;
@@ -1,2 +0,0 @@
1
- import { CSetter } from '../type';
2
- export declare const ColorSetter: CSetter;
@@ -1,10 +0,0 @@
1
- import { CSetter, CSetterProps } from '../type';
2
- import { ChangeEventHandler } from 'react';
3
- export type ExpressionSetterProps = CSetterProps<{
4
- value: {
5
- type: string;
6
- value: string;
7
- };
8
- onChange: ChangeEventHandler<HTMLTextAreaElement>;
9
- }>;
10
- export declare const ExpressionSetter: CSetter<ExpressionSetterProps>;
@@ -1,2 +0,0 @@
1
- import { CSetter } from '../type';
2
- export declare const FunctionSetter: CSetter<any>;
@@ -1,2 +0,0 @@
1
- import { CSetter } from '../type';
2
- export declare const JSONSetter: CSetter<any>;
@@ -1,3 +0,0 @@
1
- import { InputNumberProps } from 'antd';
2
- import { CSetter } from '../type';
3
- export declare const NumberSetter: CSetter<InputNumberProps>;
@@ -1,2 +0,0 @@
1
- import { CSetter } from '../type';
2
- export declare const RadioGroupSetter: CSetter;
@@ -1,3 +0,0 @@
1
- import { SelectProps } from 'antd';
2
- import { CSetter } from '../type';
3
- export declare const SelectSetter: CSetter<SelectProps>;
@@ -1,8 +0,0 @@
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>;
@@ -1,3 +0,0 @@
1
- import { SliderSingleProps } from 'antd';
2
- import { CSetter } from '../type';
3
- export declare const SliderSetter: CSetter<SliderSingleProps>;
@@ -1,3 +0,0 @@
1
- import { InputProps } from 'antd';
2
- import { CSetter } from '../type';
3
- export declare const StringSetter: CSetter<InputProps>;
@@ -1,3 +0,0 @@
1
- import { CSetter } from '../type';
2
- import { TextAreaProps } from 'antd/es/input';
3
- export declare const TextAreaSetter: CSetter<TextAreaProps>;
@@ -1,4 +0,0 @@
1
- import { CSetter } from './type';
2
- declare const _default: Record<string, CSetter<any>>;
3
- export default _default;
4
- export * from './type';
@@ -1,20 +0,0 @@
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;
11
- initialValue?: any;
12
- value?: any;
13
- setterContext: {
14
- pluginCtx: CPluginCtx;
15
- setCollapseHeaderExt?: (el: React.ReactNode) => void;
16
- onSetterChange: (keyPaths: string[], setterName: string) => void;
17
- keyPaths: string[];
18
- label: string;
19
- };
20
- } & T;
@@ -1,15 +0,0 @@
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>;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { CMaterialPropsType } from '@chamn/model';
3
- import { CForm } from './components/Form';
4
- import { CPluginCtx } from '../../core/pluginManager';
5
- import { CFormContextData } from './components/Form/context';
6
- export type CustomSchemaFormInstance = CForm;
7
- export type CustomSchemaFormProps = {
8
- pluginCtx?: CPluginCtx;
9
- initialValue: Record<string, any>;
10
- properties: CMaterialPropsType<any>;
11
- onValueChange?: (val: any) => void;
12
- onSetterChange: (keyPaths: string[], setterName: string) => void;
13
- /** 存储每个字段上次使用的 setter */
14
- defaultSetterConfig: Record<string, {
15
- name: string;
16
- setter: string;
17
- }>;
18
- customSetterMap?: CFormContextData['customSetterMap'];
19
- };
20
- export declare const CustomSchemaForm: React.ForwardRefExoticComponent<CustomSchemaFormProps & React.RefAttributes<CForm>>;
21
- export * from './components/SetterSwitcher';
22
- export * from './components/Setters';
@@ -1,11 +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
- readonly 'ant-collapse-expand-icon': 'ant-collapse-expand-icon';
10
- };
11
- export = classNames;
@@ -1,2 +0,0 @@
1
- import { SetterObjType, SetterType } from '@chamn/model';
2
- export declare const getSetterList: <T extends string = "">(setters?: SetterType<T>[]) => SetterObjType<T>[];
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { InputProps } from 'antd';
3
- export type InputNumberPlusProps = Omit<InputProps, 'onChange'> & {
4
- min?: number;
5
- max?: number;
6
- value?: number;
7
- onChange?: (newVal: number | undefined) => void;
8
- };
9
- export declare const InputNumberPlus: ({ min, max, value, onChange, addonAfter, ...restProps }: InputNumberPlusProps) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import globalClassNames from '../../style.d';
2
- declare const classNames: typeof globalClassNames & {
3
- readonly inputNumberPlus: 'inputNumberPlus';
4
- readonly delIcon: 'delIcon';
5
- };
6
- export = classNames;
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- import { EditorProps, Monaco } from '@monaco-editor/react';
3
- type EditorType = EditorProps;
4
- export type MonacoEditorInstance = Parameters<Required<EditorType>['onMount']>[0];
5
- export type MonacoEditorProps = {
6
- beforeMount?: (monaco: Monaco) => void;
7
- onDidMount?: (editor: MonacoEditorInstance) => void;
8
- options?: EditorType['options'];
9
- onChange?: EditorType['onChange'];
10
- initialValue?: string;
11
- language?: 'json' | 'javascript' | 'typescript';
12
- };
13
- export declare const MonacoEditor: (props: MonacoEditorProps) => JSX.Element;
14
- export {};
@@ -1,72 +0,0 @@
1
- import React from 'react';
2
- import { ResizeCallback } from 're-resizable';
3
- import { Emitter } from 'mitt';
4
- export interface PluginContext {
5
- openPanel: () => void;
6
- closePanel: () => void;
7
- getPlugin: (pluginName: string) => any;
8
- emitter: Emitter<any>;
9
- }
10
- type PanelItem = {
11
- name: string;
12
- title: string | React.ReactNode;
13
- icon: React.ReactNode;
14
- render: React.ReactNode;
15
- };
16
- export type WorkbenchCustomView = {
17
- key: string;
18
- view: React.ReactNode;
19
- };
20
- type WorkbenchStateType = {
21
- leftBoxVisible: boolean;
22
- leftBoxSize: {
23
- width: number;
24
- height: number | string;
25
- };
26
- leftBoxFixed: boolean;
27
- rightBoxSize: {
28
- width: number;
29
- height: number | string;
30
- };
31
- rightBoxVisible: boolean;
32
- currentActiveLeftPanel: string;
33
- leftPanels: PanelItem[];
34
- bodyView: React.ReactNode | null;
35
- rightView: React.ReactNode | null;
36
- topToolBarView: React.ReactNode | null;
37
- subTopToolBarView: React.ReactNode | null;
38
- customViewList: WorkbenchCustomView[];
39
- };
40
- export type WorkbenchPropsType = {
41
- emitter: Emitter<any>;
42
- };
43
- export declare class Workbench extends React.Component<WorkbenchPropsType, WorkbenchStateType> {
44
- emitter: Emitter<any>;
45
- leftPanelContentRef: React.RefObject<HTMLDivElement>;
46
- constructor(props: WorkbenchPropsType);
47
- addLeftPanel: (panel: PanelItem) => void;
48
- /** 替换对应的 panel */
49
- replaceLeftPanel: (panelName: string, newPanel: PanelItem) => void;
50
- /**
51
- * 添加属于插件的自定义视图
52
- * @param view
53
- * @returns dispose: 调用后移除 view
54
- */
55
- addCustomView(view: WorkbenchCustomView): () => void;
56
- openLeftPanel: (currentActiveLeftPanel?: string) => Promise<void>;
57
- closeLeftPanel: () => Promise<void>;
58
- toggleLeftPanel: () => void;
59
- onPluginIconClick: (panel: PanelItem) => void;
60
- openRightPanel: () => void;
61
- closeRightPanel: () => void;
62
- replaceBodyView: (newView: React.ReactNode) => void;
63
- replaceRightView: (newView: React.ReactNode) => void;
64
- replaceTopBarView: (newView: React.ReactNode) => void;
65
- replaceSubTopBarView: (newView: React.ReactNode) => void;
66
- toggleRightPanel: () => void;
67
- onLeftBoxResizeStop: ResizeCallback;
68
- onGlobalClick: (e: MouseEvent) => void;
69
- componentDidMount(): void;
70
- render(): JSX.Element;
71
- }
72
- export {};