@knime/scripting-editor 0.0.91 → 0.0.93

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
  };
@@ -7,9 +7,9 @@ export declare const useResizeLogic: ({ initialPaneSizes, rightPaneMinimumWidthI
7
7
  rootSplitPaneRef: UseElementBoundingReturn;
8
8
  editorSplitPaneRef: UseElementBoundingReturn;
9
9
  }) => {
10
- collapseAllPanes: import('vue').ComputedRef<boolean>;
11
- collapseLeftPane: import('vue').ComputedRef<boolean>;
12
- showButtonText: import('vue').ComputedRef<boolean>;
10
+ shouldCollapseAllPanes: import('vue').ComputedRef<boolean>;
11
+ shouldCollapseLeftPane: import('vue').ComputedRef<boolean>;
12
+ shouldShowButtonText: import('vue').ComputedRef<boolean>;
13
13
  minRatioOfRightPaneInPercent: import('vue').ComputedRef<number>;
14
14
  currentPaneSizes: import('vue').ComputedRef<{
15
15
  left: number;
@@ -22,8 +22,8 @@ export declare const useResizeLogic: ({ initialPaneSizes, rightPaneMinimumWidthI
22
22
  isLeftPaneCollapsed: import('vue').ComputedRef<boolean>;
23
23
  isRightPaneCollapsed: import('vue').ComputedRef<boolean>;
24
24
  isBottomPaneCollapsed: import('vue').ComputedRef<boolean>;
25
- updatePreviousPaneSize: (pane: keyof PaneSizes) => void;
26
- resizePane: (size: number, pane: keyof PaneSizes, shouldUpdatePreviousPaneSize?: boolean) => void;
27
- updateRightPane: (size: number) => void;
28
- collapsePane: (pane: keyof PaneSizes) => void;
25
+ doUpdatePreviousPaneSize: (pane: keyof PaneSizes) => void;
26
+ doResizePane: (size: number, pane: keyof PaneSizes, shouldUpdatePreviousPaneSize?: boolean) => void;
27
+ doUpdateRightPane: (size: number) => void;
28
+ doToggleCollapsePane: (pane: keyof PaneSizes) => void;
29
29
  };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Reactive reference for the display mode of the configuration panel.
3
+ *
4
+ * - `"small"`: The configuration panel is displayed alongside the workflow within the UI.
5
+ * - `"large"`: The configuration panel is displayed as an overlay over the UI or in a separate window.
6
+ *
7
+ * The initial value of `displayMode` is dynamically set based on the user's UI configuration.
8
+ * It automatically updates whenever the display mode changes within the `DialogService`.
9
+ */
10
+ export declare const displayMode: import('vue').Ref<"small" | "large">;
@@ -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;
@@ -5,7 +5,8 @@ declare const scriptingService: {
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
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knime/scripting-editor",
3
3
  "type": "module",
4
- "version": "0.0.91",
4
+ "version": "0.0.93",
5
5
  "description": "Shared Scripting Editor components for KNIME",
6
6
  "author": "KNIME AG, Zurich, Switzerland",
7
7
  "license": "See the file license.txt",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@knime/components": "^1.4.5",
73
- "@knime/ui-extension-service": "0.39.0",
73
+ "@knime/ui-extension-service": "1.0.0",
74
74
  "monaco-editor": "0.45.x",
75
75
  "vue": "3.4.27"
76
76
  },