@knime/scripting-editor 0.0.4 → 0.0.6
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/README.md +3 -18
- package/dist/knime-scripting-editor.js +1738 -30
- package/dist/lib/main.d.ts +6 -2
- package/dist/src/components/CodeEditor.vue.d.ts +25 -0
- package/dist/src/components/ScriptingEditor.vue.d.ts +59 -0
- package/dist/src/scripting-service.d.ts +28 -0
- package/package.json +8 -2
- package/dist/src/components/HelloWorld.vue.d.ts +0 -2
- package/dist/style.css +0 -1
package/dist/lib/main.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import ScriptingEditor from "../src/components/ScriptingEditor.vue";
|
|
2
|
+
import CodeEditor from "../src/components/CodeEditor.vue";
|
|
3
|
+
import { getScriptingService } from "../src/scripting-service";
|
|
4
|
+
import type { NodeSettings, ScriptingServiceType } from "../src/scripting-service";
|
|
5
|
+
export { ScriptingEditor, CodeEditor, getScriptingService };
|
|
6
|
+
export type { NodeSettings, ScriptingServiceType };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
language: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: null;
|
|
5
|
+
};
|
|
6
|
+
fileName: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "monaco-created"[], "monaco-created", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
language: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: null;
|
|
14
|
+
};
|
|
15
|
+
fileName: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
}>> & {
|
|
20
|
+
"onMonaco-created"?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
language: string;
|
|
23
|
+
fileName: string;
|
|
24
|
+
}, {}>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import type { editor } from './monaco-editor';
|
|
3
|
+
type PaneSizes = {
|
|
4
|
+
[key in "left" | "right" | "bottom"]: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<{
|
|
7
|
+
language: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: null;
|
|
10
|
+
};
|
|
11
|
+
fileName: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: null;
|
|
14
|
+
};
|
|
15
|
+
rightPaneLayout: {
|
|
16
|
+
type: PropType<"fixed" | "relative">;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
}, unknown, {
|
|
20
|
+
currentPaneSizes: PaneSizes;
|
|
21
|
+
initialPaneSizes: PaneSizes;
|
|
22
|
+
previousPaneSizes: PaneSizes;
|
|
23
|
+
}, {
|
|
24
|
+
usedMainPaneSize(): number;
|
|
25
|
+
usedHorizontalCodeEditorPaneSize(): number;
|
|
26
|
+
usedVerticalCodeEditorPaneSize(): number;
|
|
27
|
+
isLeftPaneCollapsed(): boolean;
|
|
28
|
+
isRightPaneCollapsed(): boolean;
|
|
29
|
+
isBottomPaneCollapsed(): boolean;
|
|
30
|
+
}, {
|
|
31
|
+
collapsePane(pane: keyof PaneSizes): void;
|
|
32
|
+
resizePane(size: number, pane: keyof PaneSizes, updatePreviousPaneSize?: boolean): void;
|
|
33
|
+
updatePreviousPaneSize(pane: keyof PaneSizes): void;
|
|
34
|
+
updateRightPane(size: number): void;
|
|
35
|
+
onMonacoCreated({ editor, editorModel, }: {
|
|
36
|
+
editor: editor.IStandaloneCodeEditor;
|
|
37
|
+
editorModel: editor.ITextModel;
|
|
38
|
+
}): void;
|
|
39
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "monaco-created"[], "monaco-created", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
+
language: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: null;
|
|
43
|
+
};
|
|
44
|
+
fileName: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: null;
|
|
47
|
+
};
|
|
48
|
+
rightPaneLayout: {
|
|
49
|
+
type: PropType<"fixed" | "relative">;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
}>> & {
|
|
53
|
+
"onMonaco-created"?: ((...args: any[]) => any) | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
language: string;
|
|
56
|
+
fileName: string;
|
|
57
|
+
rightPaneLayout: "fixed" | "relative";
|
|
58
|
+
}, {}>;
|
|
59
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ConsoleText = {
|
|
2
|
+
text: string;
|
|
3
|
+
stderr: boolean;
|
|
4
|
+
};
|
|
5
|
+
export type NodeSettings = {
|
|
6
|
+
script: string;
|
|
7
|
+
};
|
|
8
|
+
declare class ScriptingService {
|
|
9
|
+
private _knimeService;
|
|
10
|
+
private _jsonDataService;
|
|
11
|
+
private _dialogService;
|
|
12
|
+
private _settings;
|
|
13
|
+
private _eventHandlers;
|
|
14
|
+
private _runEventPoller;
|
|
15
|
+
constructor();
|
|
16
|
+
private eventPoller;
|
|
17
|
+
stopEventPoller(): void;
|
|
18
|
+
sendToService(methodName: string, options?: any[]): Promise<any>;
|
|
19
|
+
getInitialSettings(): Promise<NodeSettings>;
|
|
20
|
+
getFlowVariableSettings(): Promise<any>;
|
|
21
|
+
saveSettings(settings: NodeSettings): Promise<void>;
|
|
22
|
+
registerEventHandler(type: string, handler: (args: any) => void): void;
|
|
23
|
+
registerLanguageServerEventHandler(handler: (message: string) => void): void;
|
|
24
|
+
registerConsoleEventHandler(handler: (text: ConsoleText) => void): void;
|
|
25
|
+
}
|
|
26
|
+
export type ScriptingServiceType = Pick<ScriptingService, keyof ScriptingService>;
|
|
27
|
+
declare const getScriptingService: (mock?: ScriptingServiceType) => ScriptingServiceType;
|
|
28
|
+
export { getScriptingService };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knime/scripting-editor",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"description": "Shared Scripting Editor components for KNIME",
|
|
6
6
|
"author": "KNIME AG, Zurich, Switzerland",
|
|
7
7
|
"license": "See the file license.txt",
|
|
@@ -24,8 +24,12 @@
|
|
|
24
24
|
"prepare": "cd .. && husky install ./org.knime.scripting.editor.js/.husky"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"
|
|
27
|
+
"@knime/ui-extension-service": "0.15.0",
|
|
28
|
+
"eslint-import-resolver-typescript": "3.5.5",
|
|
29
|
+
"monaco-editor": "0.40.0",
|
|
30
|
+
"monaco-languageclient": "4.0.3",
|
|
28
31
|
"pinia": "2.1.4",
|
|
32
|
+
"splitpanes": "3.1.5",
|
|
29
33
|
"vue": "3.x",
|
|
30
34
|
"webapps-common": "file:webapps-common"
|
|
31
35
|
},
|
|
@@ -35,6 +39,7 @@
|
|
|
35
39
|
"@tsconfig/node18": "18.2.0",
|
|
36
40
|
"@types/jsdom": "21.1.1",
|
|
37
41
|
"@types/node": "18.17.0",
|
|
42
|
+
"@types/splitpanes": "^2.2.1",
|
|
38
43
|
"@vitejs/plugin-vue": "4.2.3",
|
|
39
44
|
"@vitejs/plugin-vue-jsx": "3.0.1",
|
|
40
45
|
"@vitest/coverage-v8": "0.33.0",
|
|
@@ -51,6 +56,7 @@
|
|
|
51
56
|
"stylelint": "15.10.2",
|
|
52
57
|
"typescript": "5.1.6",
|
|
53
58
|
"vite": "4.4.6",
|
|
59
|
+
"vite-plugin-css-injected-by-js": "3.2.1",
|
|
54
60
|
"vite-plugin-dts": "3.4.0",
|
|
55
61
|
"vitest": "0.33.0",
|
|
56
62
|
"vue-tsc": "1.8.6"
|
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
h1[data-v-af185b77]{font-weight:500;font-size:2.6rem;position:relative;top:-10px}h3[data-v-af185b77]{font-size:1.2rem}.greetings h1[data-v-af185b77],.greetings h3[data-v-af185b77]{text-align:center}@media (min-width: 1024px){.greetings h1[data-v-af185b77],.greetings h3[data-v-af185b77]{text-align:left}}
|