@node-red/editor-api 5.0.0-beta.3 → 5.0.0-beta.4
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/editor/theme.js +15 -3
- package/package.json +3 -3
package/lib/editor/theme.js
CHANGED
|
@@ -198,6 +198,10 @@ async function loadThemePlugin () {
|
|
|
198
198
|
}
|
|
199
199
|
})
|
|
200
200
|
}
|
|
201
|
+
if (Array.isArray(themePlugin.palette?.categories)) {
|
|
202
|
+
themeSettings.palette = themeSettings.palette || {};
|
|
203
|
+
themeSettings.palette.categories = themePlugin.palette.categories;
|
|
204
|
+
}
|
|
201
205
|
|
|
202
206
|
// These settings are not exposed under `editorTheme`, so we don't have a merge strategy for them
|
|
203
207
|
// If they're defined in the theme plugin, they replace any settings.js values.
|
|
@@ -221,9 +225,17 @@ module.exports = {
|
|
|
221
225
|
}
|
|
222
226
|
themeSettings = null;
|
|
223
227
|
theme = settings.editorTheme || {};
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
228
|
+
theme.codeEditor = theme.codeEditor || {}
|
|
229
|
+
theme.codeEditor.lib = theme.codeEditor.lib || 'monaco' // default to monaco if no code editor lib specified
|
|
230
|
+
themeContext.asset.vendorAce = ''
|
|
231
|
+
themeContext.asset.vendorMonaco = ''
|
|
232
|
+
if (theme.codeEditor.lib === 'monaco') {
|
|
233
|
+
themeContext.asset.vendorMonaco = "vendor/monaco/monaco-bootstrap.js"
|
|
234
|
+
} else if (theme.codeEditor.lib === 'ace') {
|
|
235
|
+
themeContext.asset.vendorAce = 'vendor/ace/ace-bootstrap.js'
|
|
236
|
+
} else {
|
|
237
|
+
// default to basic if no valid code editor lib specified
|
|
238
|
+
theme.codeEditor.lib = 'basic'
|
|
227
239
|
}
|
|
228
240
|
activeTheme = theme.theme;
|
|
229
241
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-red/editor-api",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@node-red/util": "5.0.0-beta.
|
|
20
|
-
"@node-red/editor-client": "5.0.0-beta.
|
|
19
|
+
"@node-red/util": "5.0.0-beta.4",
|
|
20
|
+
"@node-red/editor-client": "5.0.0-beta.4",
|
|
21
21
|
"bcryptjs": "3.0.3",
|
|
22
22
|
"body-parser": "1.20.4",
|
|
23
23
|
"clone": "2.1.2",
|