@chamn/engine 0.0.17 → 0.0.19
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/dist/component/CSSPropertiesEditor/index.d.ts +4 -2
- package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +4 -1
- package/dist/component/CustomSchemaForm/components/Setters/index.d.ts +1 -0
- package/dist/component/CustomSchemaForm/index.d.ts +2 -0
- package/dist/component/MonacoEditor/index.d.ts +7 -8
- package/dist/index.d.ts +5 -0
- package/dist/index.js +45 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11665 -11124
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/History/index.d.ts +2 -2
- package/dist/plugins/History/type.d.ts +12 -0
- package/dist/utils/index.d.ts +3 -0
- package/package.json +10 -10
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
export declare const defaultPropertyOptions: {
|
|
3
|
+
value: string;
|
|
4
|
+
}[];
|
|
2
5
|
export type SinglePropertyEditorProps = {
|
|
3
6
|
mode: 'create' | 'edit';
|
|
4
7
|
value: {
|
|
@@ -19,7 +22,7 @@ export type SinglePropertyEditorProps = {
|
|
|
19
22
|
}) => void;
|
|
20
23
|
onDelete?: () => void;
|
|
21
24
|
};
|
|
22
|
-
type SinglePropertyEditorRef = {
|
|
25
|
+
export type SinglePropertyEditorRef = {
|
|
23
26
|
reset: () => void;
|
|
24
27
|
};
|
|
25
28
|
export declare const SinglePropertyEditor: import("react").ForwardRefExoticComponent<SinglePropertyEditorProps & import("react").RefAttributes<SinglePropertyEditorRef>>;
|
|
@@ -40,4 +43,3 @@ export type CSSPropertiesEditorRef = {
|
|
|
40
43
|
}[]) => void;
|
|
41
44
|
};
|
|
42
45
|
export declare const CSSPropertiesEditor: import("react").ForwardRefExoticComponent<CSSPropertiesEditorProps & import("react").RefAttributes<CSSPropertiesEditorRef>>;
|
|
43
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { JSExpressionPropType } from '@chamn/model';
|
|
3
|
-
export type
|
|
3
|
+
export type InnerSinglePropertyEditorProps = {
|
|
4
4
|
value?: {
|
|
5
5
|
key: string;
|
|
6
6
|
value: JSExpressionPropType;
|
|
@@ -18,6 +18,9 @@ export type SinglePropertyEditorProps = {
|
|
|
18
18
|
} | void;
|
|
19
19
|
mod?: 'create' | 'edit';
|
|
20
20
|
};
|
|
21
|
+
export type InnerSinglePropertyEditorRef = {
|
|
22
|
+
reset: () => void;
|
|
23
|
+
};
|
|
21
24
|
export type CSSPropertiesVariableBindEditorProps = {
|
|
22
25
|
initialValue?: {
|
|
23
26
|
key: string;
|
|
@@ -18,3 +18,5 @@ export type CustomSchemaFormProps = {
|
|
|
18
18
|
customSetterMap?: CFormContextData['customSetterMap'];
|
|
19
19
|
};
|
|
20
20
|
export declare const CustomSchemaForm: React.ForwardRefExoticComponent<CustomSchemaFormProps & React.RefAttributes<CForm>>;
|
|
21
|
+
export * from './components/SetterSwitcher';
|
|
22
|
+
export * from './components/Setters';
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export type MonacoEditorInstance =
|
|
2
|
+
import { EditorProps, Monaco } from '@monaco-editor/react';
|
|
3
|
+
type EditorType = EditorProps;
|
|
4
|
+
export type MonacoEditorInstance = Parameters<Required<EditorType>['onMount']>[0];
|
|
5
5
|
export type MonacoEditorProps = {
|
|
6
|
-
beforeMount?: (monaco:
|
|
6
|
+
beforeMount?: (monaco: Monaco) => void;
|
|
7
7
|
onDidMount?: (editor: MonacoEditorInstance) => void;
|
|
8
|
-
options?:
|
|
9
|
-
|
|
10
|
-
onChange?: (val: string, e: monaco.editor.IModelContentChangedEvent) => void;
|
|
11
|
-
onDidChangeMarkers?: (markers: monaco.editor.IMarker[]) => void;
|
|
8
|
+
options?: EditorType['options'];
|
|
9
|
+
onChange?: EditorType['onChange'];
|
|
12
10
|
initialValue?: string;
|
|
13
11
|
language?: 'json' | 'javascript' | 'typescript';
|
|
14
12
|
};
|
|
15
13
|
export declare const MonacoEditor: (props: MonacoEditorProps) => JSX.Element;
|
|
14
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -16,9 +16,13 @@ export type EngineProps = {
|
|
|
16
16
|
beforePluginRun?: (options: {
|
|
17
17
|
pluginManager: PluginManager;
|
|
18
18
|
}) => void;
|
|
19
|
+
/** 所有的加插件加载完成 */
|
|
19
20
|
onReady?: (ctx: EnginContext) => void;
|
|
21
|
+
onMount?: (ctx: EnginContext) => void;
|
|
20
22
|
/** 渲染器 umd 格式 js 地址, 默认 ./render.umd.js */
|
|
21
23
|
renderJSUrl?: string;
|
|
24
|
+
style?: React.CSSProperties;
|
|
25
|
+
className?: string;
|
|
22
26
|
};
|
|
23
27
|
export declare class Engine extends React.Component<EngineProps> {
|
|
24
28
|
static version: string;
|
|
@@ -44,3 +48,4 @@ export * as plugins from './plugins';
|
|
|
44
48
|
export * from '@chamn/layout';
|
|
45
49
|
export * from './material/innerMaterial';
|
|
46
50
|
export * from './component/CustomSchemaForm/components/Setters/type';
|
|
51
|
+
export * from './utils/index';
|