diff --git a/cypress/pages/ndv.ts b/cypress/pages/ndv.ts index 15f177240f..cf787a4a3f 100644 --- a/cypress/pages/ndv.ts +++ b/cypress/pages/ndv.ts @@ -18,7 +18,7 @@ export class NDV extends BasePage { outputDisplayMode: () => this.getters.outputPanel().findChildByTestId('ndv-run-data-display-mode').first(), pinDataButton: () => cy.getByTestId('ndv-pin-data'), editPinnedDataButton: () => cy.getByTestId('ndv-edit-pinned-data'), - pinnedDataEditor: () => this.getters.outputPanel().find('.monaco-editor[role=code]'), + pinnedDataEditor: () => this.getters.outputPanel().find('.cm-editor .cm-scroller'), runDataPaneHeader: () => cy.getByTestId('run-data-pane-header'), savePinnedDataButton: () => this.getters.runDataPaneHeader().find('button').filter(':visible').contains('Save'), outputTableRows: () => this.getters.outputDataContainer().find('table tr'), @@ -77,8 +77,7 @@ export class NDV extends BasePage { this.getters.editPinnedDataButton().click(); this.getters.pinnedDataEditor().click(); - this.getters.pinnedDataEditor().type(`{selectall}{backspace}`); - this.getters.pinnedDataEditor().type(JSON.stringify(data).replace(new RegExp('{', 'g'), '{{}')); + this.getters.pinnedDataEditor().type(`{selectall}{backspace}${JSON.stringify(data).replace(new RegExp('{', 'g'), '{{}')}`); this.actions.savePinnedData(); }, diff --git a/packages/design-system/src/css/_tokens.dark.scss b/packages/design-system/src/css/_tokens.dark.scss index 8efd088106..671eeead71 100644 --- a/packages/design-system/src/css/_tokens.dark.scss +++ b/packages/design-system/src/css/_tokens.dark.scss @@ -276,6 +276,7 @@ --color-json-highlight: #dcdfea; --color-code-background: #222020; + --color-code-background-readonly: #323230; --color-code-foreground: #f8f8f2; --color-code-caret: #f8f8f0; --color-code-selection: #312b25; diff --git a/packages/design-system/src/css/_tokens.scss b/packages/design-system/src/css/_tokens.scss index 944bb55f54..1e8762c851 100644 --- a/packages/design-system/src/css/_tokens.scss +++ b/packages/design-system/src/css/_tokens.scss @@ -377,6 +377,7 @@ ); --color-code-background: #ffffff; + --color-code-background-readonly: #f5f2f0; --color-code-foreground: #4d4d4c; --color-code-caret: #aeafad; --color-code-selection: #d6d6d6; diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index 90a2bde206..f648d3137f 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -29,6 +29,7 @@ "@codemirror/autocomplete": "^6.4.0", "@codemirror/commands": "^6.1.0", "@codemirror/lang-javascript": "^6.1.2", + "@codemirror/lang-json": "^6.0.1", "@codemirror/language": "^6.2.1", "@codemirror/lint": "^6.0.0", "@codemirror/state": "^6.1.4", @@ -58,13 +59,11 @@ "jsonpath": "^1.1.1", "lodash-es": "^4.17.21", "luxon": "^3.3.0", - "monaco-editor": "^0.33.0", "n8n-design-system": "workspace:*", "n8n-workflow": "workspace:*", "normalize-wheel": "^1.0.1", "pinia": "^2.0.22", "prettier": "^2.8.3", - "prismjs": "^1.17.1", "stream-browserify": "^3.0.0", "timeago.js": "^4.0.2", "uuid": "^8.3.2", @@ -75,7 +74,6 @@ "vue-i18n": "^8.26.7", "vue-infinite-loading": "^2.4.5", "vue-json-pretty": "1.9.3", - "vue-prism-editor": "^0.3.0", "vue-router": "^3.6.5", "vue-template-compiler": "^2.7.14", "vue-typed-mixins": "^0.2.0", @@ -113,7 +111,6 @@ "sass-loader": "^10.1.1", "string-template-parser": "^1.2.6", "vite": "4.0.4", - "vite-plugin-monaco-editor": "^1.0.10", "vitest": "^0.28.5", "vue-tsc": "^1.0.24" } diff --git a/packages/editor-ui/src/components/CodeEdit.vue b/packages/editor-ui/src/components/CodeEdit.vue deleted file mode 100644 index 287409312b..0000000000 --- a/packages/editor-ui/src/components/CodeEdit.vue +++ /dev/null @@ -1,281 +0,0 @@ - - - - - diff --git a/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue b/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue index 8899ab74f6..c775580ddd 100644 --- a/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue +++ b/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue @@ -1,11 +1,11 @@