@guihz/trading-vue-editor-tes 0.0.42 → 0.0.44
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/lib/components/editor/constants/contents.d.ts +6 -0
- package/lib/components/editor/index.d.ts +5 -3
- package/lib/components/editor/utils/initEditor.d.ts +3 -1
- package/lib/components/referenceManual/components/ContentItem.d.ts +9 -0
- package/lib/components/referenceManual/index.d.ts +8 -0
- package/lib/components/referenceManual/tools.d.ts +42 -0
- package/lib/packages/index.d.ts +1 -0
- package/lib/trading-vue-editor.js +6622 -6046
- package/lib/trading-vue-editor.umd.cjs +54 -49
- package/package.json +4 -2
@@ -14,6 +14,7 @@ export declare const SNIPPET_COMPLETIONS: {
|
|
14
14
|
insertText: string;
|
15
15
|
kind: string;
|
16
16
|
}[];
|
17
|
+
export declare const NOT_SHOW_KEYWORDS: string[];
|
17
18
|
export declare const COMPLETE_KEYS: string[];
|
18
19
|
export declare const HOVER_KEYS: string[];
|
19
20
|
export declare const BUILD_IN_VALUE: IKeyValueStr;
|
@@ -37,4 +38,9 @@ export declare const ALL_KINDS: {
|
|
37
38
|
};
|
38
39
|
export declare const DEFAULT_DETIALS: IKeyValueStr;
|
39
40
|
export declare const KEY_LIST: IKeys, KEY_MAP_LIST: IKeyMaps;
|
41
|
+
export declare const CONTENT_GROUPS: {
|
42
|
+
title: string;
|
43
|
+
key: string;
|
44
|
+
prefix: string;
|
45
|
+
}[];
|
40
46
|
export {};
|
@@ -1,7 +1,8 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { Theme } from
|
3
|
-
import { IPosition, editor } from
|
4
|
-
import
|
2
|
+
import { Theme } from "@monaco-editor/react";
|
3
|
+
import { IPosition, editor } from "monaco-editor";
|
4
|
+
import * as monaco from "monaco-editor";
|
5
|
+
import "./style.css";
|
5
6
|
import { IKeyObjectValue } from "./type";
|
6
7
|
interface IProps {
|
7
8
|
height?: string | number;
|
@@ -16,6 +17,7 @@ interface IProps {
|
|
16
17
|
onChange?: (value: string) => void;
|
17
18
|
onDeclareConfigChange?: (value: IKeyObjectValue) => void;
|
18
19
|
onActionTrigger?: (actionId: string) => void;
|
20
|
+
onLinkOpen?: (source: monaco.Uri) => void;
|
19
21
|
}
|
20
22
|
export interface IRefs {
|
21
23
|
setOriginalScript: (val: string) => void;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Monaco } from "@monaco-editor/react";
|
2
|
-
import { IPosition, editor } from "monaco-editor";
|
2
|
+
import { IPosition, Uri, editor } from "monaco-editor";
|
3
3
|
export default class InitEditor {
|
4
4
|
private _editor;
|
5
5
|
private _monaco;
|
@@ -7,7 +7,9 @@ export default class InitEditor {
|
|
7
7
|
private _changPositionListener?;
|
8
8
|
private _originalScript?;
|
9
9
|
private _onActionTrigger?;
|
10
|
+
private _onLinkOpen?;
|
10
11
|
constructor(editor: editor.IStandaloneCodeEditor, monaco: Monaco, onActionTrigger?: (actionId: string) => void);
|
12
|
+
addLinkOpenFunc(onLinkOpen: (source: Uri) => void): void;
|
11
13
|
updateActionTrigger(onActionTrigger?: (actionId: string) => void): void;
|
12
14
|
setModelMarkers(markers: editor.IMarkerData[]): void;
|
13
15
|
addDiffDecorations(): void;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { IKeyObjectValue } from "../../editor/type";
|
3
|
+
interface IProps {
|
4
|
+
group: IKeyObjectValue | null;
|
5
|
+
itemKey: string;
|
6
|
+
onItemClick: (key: string) => void;
|
7
|
+
}
|
8
|
+
declare const ContentItem: FC<IProps>;
|
9
|
+
export default ContentItem;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { IDocValue } from "../editor/type";
|
2
|
+
interface IItem {
|
3
|
+
label: string;
|
4
|
+
desc?: string;
|
5
|
+
}
|
6
|
+
export interface ISearchItem {
|
7
|
+
label: string;
|
8
|
+
key: string;
|
9
|
+
group: {
|
10
|
+
key: string;
|
11
|
+
prefix: string;
|
12
|
+
title: string;
|
13
|
+
};
|
14
|
+
}
|
15
|
+
export interface IContent {
|
16
|
+
name: string;
|
17
|
+
args?: IItem[];
|
18
|
+
overloads?: string;
|
19
|
+
desc?: string[];
|
20
|
+
examples?: string;
|
21
|
+
detailedDesc?: {
|
22
|
+
desc: string[];
|
23
|
+
examples?: string;
|
24
|
+
originalExample?: string;
|
25
|
+
}[];
|
26
|
+
returns?: string[];
|
27
|
+
remarks?: string[];
|
28
|
+
syntax?: (string | undefined)[];
|
29
|
+
fields?: IItem[];
|
30
|
+
seeAlso?: ({
|
31
|
+
name: string;
|
32
|
+
link: string;
|
33
|
+
} | undefined)[];
|
34
|
+
type?: string;
|
35
|
+
originalExample?: string;
|
36
|
+
}
|
37
|
+
export declare function referenceItemHandle(items: IDocValue[], index?: number): Promise<IContent | undefined>;
|
38
|
+
export declare function querySearch(key: string): {
|
39
|
+
labelList: ISearchItem[];
|
40
|
+
contentList: ISearchItem[];
|
41
|
+
};
|
42
|
+
export {};
|
package/lib/packages/index.d.ts
CHANGED
@@ -5,3 +5,4 @@ export type { IRefs as IEditorRefs } from '../components/editor/index';
|
|
5
5
|
export { parseTcc, scriptsRun, removeScript } from '../components/editor/utils/parserTcc';
|
6
6
|
export type { IError, IPosition } from '../components/editor/parseScript/type';
|
7
7
|
export { VMarkerSeverity } from '../components/editor/parseScript/type';
|
8
|
+
export { default as ReferenceManual } from '../components/referenceManual';
|