@knime/scripting-editor 0.0.90 → 0.0.92

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.
@@ -1,13 +1,13 @@
1
1
  import { l as i } from "./log-BmIREpQ5.js";
2
- function c(r) {
2
+ function t(r) {
3
3
  return new Promise((n) => setTimeout(n, r));
4
4
  }
5
- const t = 100, l = 2e3, S = (r, ...n) => {
5
+ const c = 100, l = 2e3, a = (r, ...n) => {
6
6
  typeof consola > "u" ? console.error(r, ...n) : consola.error(r, ...n);
7
- }, a = (r) => {
7
+ }, g = (r) => {
8
8
  const n = /* @__PURE__ */ new Map(), o = {
9
9
  suggestCode: async () => {
10
- await c(l);
10
+ await t(l);
11
11
  const e = n.get("codeSuggestion");
12
12
  return typeof e < "u" && e({
13
13
  status: "SUCCESS",
@@ -18,7 +18,7 @@ const t = 100, l = 2e3, S = (r, ...n) => {
18
18
  };
19
19
  return {
20
20
  async sendToService(e, s) {
21
- return i(`Called scriptingService.sendToService("${e}")`, s), await c(t), r.sendToServiceMockResponses && e in r.sendToServiceMockResponses ? r.sendToServiceMockResponses[e](s) : e in o ? o[e](s) : (S(
21
+ return i(`Called scriptingService.sendToService("${e}")`, s), await t(c), r.sendToServiceMockResponses && e in r.sendToServiceMockResponses ? r.sendToServiceMockResponses[e](s) : e in o ? o[e](s) : (a(
22
22
  `${e} not implemented in sendToServiceMockResponses.
23
23
  Returning undefined.`
24
24
  ), Promise.resolve());
@@ -38,10 +38,15 @@ const t = 100, l = 2e3, S = (r, ...n) => {
38
38
  connectToLanguageServer() {
39
39
  return i("Called scriptingService.connectToLanguageServer"), Promise.reject(new Error("No language server in mock"));
40
40
  },
41
+ getAiDisclaimer() {
42
+ return i("Called scriptingService.getAiDisclaimer"), Promise.resolve(
43
+ "This is a fake AI disclaimer. Enjoy the AI. It does nothing!"
44
+ );
45
+ },
41
46
  // Console handling
42
47
  eventHandlers: n
43
48
  };
44
49
  };
45
50
  export {
46
- a as createScriptingServiceMock
51
+ g as createScriptingServiceMock
47
52
  };
@@ -2,14 +2,21 @@ import { MenuItem } from '@knime/components';
2
2
  export interface SettingsMenuItem extends MenuItem {
3
3
  showSettingsPage?: boolean;
4
4
  }
5
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ declare function __VLS_template(): {
6
+ slots: {
7
+ "settings-title"?(_: {}): any;
8
+ "settings-content"?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ attrs: Partial<{}>;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
15
  "close-settings-page": () => void;
7
16
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>> & {
8
17
  "onClose-settings-page"?: (() => any) | undefined;
9
- }, {}, {}>, {
10
- "settings-title"?(_: {}): any;
11
- "settings-content"?(_: {}): any;
12
- }>;
18
+ }, {}, {}>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
20
  export default _default;
14
21
  type __VLS_WithTemplateSlots<T, S> = T & {
15
22
  new (): {
@@ -46,16 +46,6 @@ export type UseCodeEditorReturn = {
46
46
  * @param requiredImport the import to add before the text. Can be left out.
47
47
  */
48
48
  insertColumnReference: (textToInsert: string, requiredImport?: string) => void;
49
- /**
50
- * Inserts the specified function reference at the current cursor position in the editor.
51
- * Uses snippets to give really nice insertion behavior for function arguments. If the
52
- * arguments are null, the function will be inserted without arguments OR brackets.
53
- * If the arguments are an empty list, the function will be inserted with empty brackets.
54
- *
55
- * @param functionName
56
- * @param functionArgs the arguments to the function.
57
- */
58
- insertFunctionReference: (functionName: string, functionArgs: string[] | null) => void;
59
49
  };
60
50
  export type UseDiffEditorParams = ContainerParams & {
61
51
  originalModel: monaco.editor.ITextModel;
@@ -1,5 +1,5 @@
1
- import { GenericInitialData, InitialDataServiceType, InputConnectionInfo } from './initial-data-service';
2
1
  import { InputOutputModel } from './components/InputOutputItem.vue';
2
+ import { GenericInitialData, InitialDataServiceType, InputConnectionInfo } from './initial-data-service';
3
3
  export declare const DEFAULT_INPUT_OBJECTS: InputOutputModel[];
4
4
  export declare const DEFAULT_PORT_INFORMATION: InputConnectionInfo[];
5
5
  export declare const DEFAULT_OUTPUT_OBJECTS: InputOutputModel[];
@@ -1,5 +1,5 @@
1
- import { Position, editor, languages, IRange } from 'monaco-editor';
2
- import { CompletionItem, CompletionList, CompletionClientCapabilities, CompletionParams } from 'vscode-languageserver-protocol';
1
+ import { IRange, Position, editor, languages } from 'monaco-editor';
2
+ import { CompletionClientCapabilities, CompletionItem, CompletionList, CompletionParams } from 'vscode-languageserver-protocol';
3
3
  export declare const completionCapibilities: CompletionClientCapabilities;
4
4
  export declare const getCompletionParams: (model: editor.ITextModel, position: Position, context: languages.CompletionContext) => CompletionParams;
5
5
  export declare const mapCompletionResult: (result: CompletionList | CompletionItem[], model: editor.ITextModel, position: Position) => languages.CompletionList;
@@ -1,5 +1,5 @@
1
1
  import { editor } from 'monaco-editor';
2
- import { MessageReader, MessageWriter, LSPAny } from 'vscode-languageserver-protocol';
2
+ import { LSPAny, MessageReader, MessageWriter } from 'vscode-languageserver-protocol';
3
3
  export declare class MonacoLSPConnection {
4
4
  private _editorModel;
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { AbstractMessageReader, AbstractMessageWriter, Disposable, Message, MessageReader, MessageWriter, DataCallback } from 'vscode-languageserver-protocol';
1
+ import { AbstractMessageReader, AbstractMessageWriter, DataCallback, Disposable, Message, MessageReader, MessageWriter } from 'vscode-languageserver-protocol';
2
2
  /**
3
3
  * This class is used to read messages from the language server. The callback
4
4
  * is registered by the connection and called each time a message from the
@@ -1,4 +1,4 @@
1
- import { Position, editor, IMarkdownString, IRange } from 'monaco-editor';
1
+ import { IMarkdownString, IRange, Position, editor } from 'monaco-editor';
2
2
  import { Position as LSPPosition, MarkupContent, Range, TextDocumentIdentifier, TextDocumentPositionParams } from 'vscode-languageserver-protocol';
3
3
  export declare const mapPositionToLSP: (position: Position) => LSPPosition;
4
4
  export declare const mapMarkupToMonaco: (markup: MarkupContent | string) => IMarkdownString;
@@ -1,11 +1,12 @@
1
- import { MonacoLSPConnection } from './lsp/connection';
2
1
  import { PortConfig } from './initial-data-service';
2
+ import { MonacoLSPConnection } from './lsp/connection';
3
3
  declare const scriptingService: {
4
4
  sendToService(methodName: string, options?: any[] | undefined): Promise<any>;
5
5
  registerEventHandler(type: string, handler: (args: any) => void): void;
6
6
  connectToLanguageServer(): Promise<MonacoLSPConnection>;
7
7
  isCallKnimeUiApiAvailable(portToTestFor: PortConfig): Promise<boolean>;
8
- isLoggedIntoHub(): Promise<any>;
8
+ isLoggedIntoHub(): Promise<boolean>;
9
+ getAiDisclaimer(): Promise<string>;
9
10
  };
10
11
  export type ScriptingServiceType = typeof scriptingService;
11
12
  /**
@@ -1,5 +1,5 @@
1
- import { GenericNodeSettings, SettingsServiceType } from './settings-service';
2
1
  import { SettingState } from '@knime/ui-extension-service';
2
+ import { GenericNodeSettings, SettingsServiceType } from './settings-service';
3
3
  export declare const DEFAULT_INITIAL_SETTINGS: GenericNodeSettings;
4
4
  export declare const registerSettingsMock: () => Promise<() => SettingState<any>>;
5
5
  export declare const createSettingsServiceMock: (data?: GenericNodeSettings) => SettingsServiceType;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knime/scripting-editor",
3
3
  "type": "module",
4
- "version": "0.0.90",
4
+ "version": "0.0.92",
5
5
  "description": "Shared Scripting Editor components for KNIME",
6
6
  "author": "KNIME AG, Zurich, Switzerland",
7
7
  "license": "See the file license.txt",
@@ -25,10 +25,9 @@
25
25
  "postinstall": "license-check -c"
26
26
  },
27
27
  "dependencies": {
28
- "@knime/components": "^1.2.3",
29
- "@knime/styles": "^1.0.9",
30
- "@knime/ui-extension-renderer": "^1.1.13",
31
- "@knime/utils": "^1.0.14",
28
+ "@knime/styles": "^1.1.0",
29
+ "@knime/ui-extension-renderer": "^1.1.28",
30
+ "@knime/utils": "^1.0.17",
32
31
  "@vueuse/core": "10.09.0",
33
32
  "@xterm/addon-fit": "^0.10.0",
34
33
  "@xterm/addon-unicode11": "^0.8.0",
@@ -38,7 +37,7 @@
38
37
  "vscode-languageserver-protocol": "3.17.5"
39
38
  },
40
39
  "devDependencies": {
41
- "@knime/eslint-config": "8.1.0",
40
+ "@knime/eslint-config": "8.2.0",
42
41
  "@knime/licenses": "^1.0.6",
43
42
  "@rushstack/eslint-patch": "1.10.4",
44
43
  "@tsconfig/node20": "20.1.4",
@@ -70,6 +69,7 @@
70
69
  "vue-tsc": "2.1.6"
71
70
  },
72
71
  "peerDependencies": {
72
+ "@knime/components": "^1.4.5",
73
73
  "@knime/ui-extension-service": "0.39.0",
74
74
  "monaco-editor": "0.45.x",
75
75
  "vue": "3.4.27"