diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/theme.js b/packages/node_modules/@node-red/editor-api/lib/editor/theme.js index 234671f2e..17dbbafea 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/theme.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/theme.js @@ -28,7 +28,7 @@ var defaultContext = { }, header: { title: "Node-RED", - image: "red/images/node-red.png" + image: "red/images/node-red.svg" }, asset: { red: (process.env.NODE_ENV == "development")? "red/red.js":"red/red.min.js", diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/ui.js b/packages/node_modules/@node-red/editor-api/lib/editor/ui.js index ce3ec862c..24b819fec 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/ui.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/ui.js @@ -25,7 +25,7 @@ var theme = require("./theme"); var runtimeAPI; var editorClientDir = path.dirname(require.resolve("@node-red/editor-client")); -var defaultNodeIcon = path.join(editorClientDir,"public","red","images","icons","arrow-in.png"); +var defaultNodeIcon = path.join(editorClientDir,"public","red","images","icons","arrow-in.svg"); var editorTemplatePath = path.join(editorClientDir,"templates","index.mst"); var editorTemplate; diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.png deleted file mode 100644 index a2f5373e2..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.svg new file mode 100644 index 000000000..c4511ba87 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows-o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.png deleted file mode 100644 index e83638234..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.svg new file mode 100644 index 000000000..0b0069272 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-flows.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.png deleted file mode 100644 index b5f3a9870..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.svg new file mode 100644 index 000000000..fc3221f1c --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-full-o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-full.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-full.png deleted file mode 100644 index 775374d17..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-full.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-full.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-full.svg new file mode 100644 index 000000000..e4448e10f --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-full.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.png deleted file mode 100644 index 3174716cc..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.svg new file mode 100644 index 000000000..af540dd3d --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes-o.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.png deleted file mode 100644 index 4d982a9c8..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.svg new file mode 100644 index 000000000..12d4c8972 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-nodes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.png b/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.png deleted file mode 100644 index 197fc610d..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.svg b/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.svg new file mode 100644 index 000000000..00f319014 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/deploy-reload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.png b/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.png deleted file mode 100644 index e38f39146..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.svg b/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.svg new file mode 100644 index 000000000..a5fcb49af --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/icons/arrow-in.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/icons/node-changed.png b/packages/node_modules/@node-red/editor-client/src/images/icons/node-changed.png deleted file mode 100644 index 38a179444..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/icons/node-changed.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/icons/node-error.png b/packages/node_modules/@node-red/editor-client/src/images/icons/node-error.png deleted file mode 100644 index c20c8e85a..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/icons/node-error.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/node-red.png b/packages/node_modules/@node-red/editor-client/src/images/node-red.png deleted file mode 100644 index a60c26729..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/node-red.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/node-red.svg b/packages/node_modules/@node-red/editor-client/src/images/node-red.svg new file mode 100644 index 000000000..c62b35866 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/node-red.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/pw_maze_white.png b/packages/node_modules/@node-red/editor-client/src/images/pw_maze_white.png deleted file mode 100644 index 66464831c..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/pw_maze_white.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.png b/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.png deleted file mode 100644 index 022777c4d..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.svg b/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.svg new file mode 100644 index 000000000..4acb241e4 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/subflow_tab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.png deleted file mode 100644 index 247371fe5..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.svg new file mode 100644 index 000000000..29c54b860 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/09.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.png deleted file mode 100644 index 5f5d2404e..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.svg new file mode 100644 index 000000000..e0abbdc4a --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/az.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.png deleted file mode 100644 index 615c8dd4f..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.svg new file mode 100644 index 000000000..0ef91aed8 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.png deleted file mode 100644 index 9530983de..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.svg new file mode 100644 index 000000000..e2e4297c7 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/bool.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.png deleted file mode 100644 index 0ea51da00..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.svg new file mode 100644 index 000000000..bddd1c082 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/env.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.png deleted file mode 100644 index 704105ce5..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.svg new file mode 100644 index 000000000..c6357af50 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/expr.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.png deleted file mode 100644 index 57ac8761f..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.svg new file mode 100644 index 000000000..713fe7944 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/json.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.png deleted file mode 100644 index 87deb02ae..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.svg new file mode 100644 index 000000000..c30cbff55 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/re.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.png b/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.png deleted file mode 100644 index cc9833b73..000000000 Binary files a/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.svg b/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.svg new file mode 100644 index 000000000..b98996701 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/images/typedInput/target.svg @@ -0,0 +1 @@ + diff --git a/packages/node_modules/@node-red/editor-client/src/js/nodes.js b/packages/node_modules/@node-red/editor-client/src/js/nodes.js index 5c544e7b7..62949efce 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/nodes.js +++ b/packages/node_modules/@node-red/editor-client/src/js/nodes.js @@ -362,7 +362,7 @@ RED.nodes = (function() { name:{value:""}, env:{value:[]} }, - icon: function() { return sf.icon||"subflow.png" }, + icon: function() { return sf.icon||"subflow.svg" }, category: sf.category || "subflows", inputs: sf.in.length, outputs: sf.out.length, @@ -583,7 +583,7 @@ RED.nodes = (function() { node.outputLabels = n.outputLabels.slice(); } if (n.icon) { - if (n.icon !== "node-red/subflow.png") { + if (n.icon !== "node-red/subflow.svg") { node.icon = n.icon; } } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js index 8de4a6e13..e4599f99c 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js @@ -71,7 +71,7 @@ RED.menu = (function() { } if (opt.icon !== undefined) { - if (/\.png/.test(opt.icon)) { + if (/\.(png|svg)/.test(opt.icon)) { linkContent += ' '; } else { linkContent += ' '; diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js index f5fe03890..0ef5b2102 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js @@ -32,6 +32,12 @@ return v; } } + var mapDeprecatedIcon = function(icon) { + if (/^red\/images\/typedInput\/.+\.png$/.test(icon)) { + icon = icon.replace(/.png$/,".svg"); + } + return icon; + } var allOptions = { msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression}, flow: {value:"flow",label:"flow.",hasValue:true, @@ -46,13 +52,13 @@ parse: contextParse, export: contextExport }, - str: {value:"str",label:"string",icon:"red/images/typedInput/az.png"}, - num: {value:"num",label:"number",icon:"red/images/typedInput/09.png",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/}, - bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.png",options:["true","false"]}, + str: {value:"str",label:"string",icon:"red/images/typedInput/az.svg"}, + num: {value:"num",label:"number",icon:"red/images/typedInput/09.svg",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/}, + bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.svg",options:["true","false"]}, json: { value:"json", label:"JSON", - icon:"red/images/typedInput/json.png", + icon:"red/images/typedInput/json.svg", validate: function(v) { try{JSON.parse(v);return true;}catch(e){return false;}}, expand: function() { var that = this; @@ -74,12 +80,12 @@ }) } }, - re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.png"}, + re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.svg"}, date: {value:"date",label:"timestamp",hasValue:false}, jsonata: { value: "jsonata", label: "expression", - icon: "red/images/typedInput/expr.png", + icon: "red/images/typedInput/expr.svg", validate: function(v) { try{jsonata(v);return true;}catch(e){return false;}}, expand:function() { var that = this; @@ -94,7 +100,7 @@ bin: { value: "bin", label: "buffer", - icon: "red/images/typedInput/bin.png", + icon: "red/images/typedInput/bin.svg", expand: function() { var that = this; RED.editor.editBuffer({ @@ -108,12 +114,12 @@ env: { value: "env", label: "env variable", - icon: "red/images/typedInput/env.png" + icon: "red/images/typedInput/env.svg" }, node: { value: "node", label: "node", - icon: "red/images/typedInput/target.png", + icon: "red/images/typedInput/target.svg", valueLabel: function(container,value) { var node = RED.nodes.node(value); var nodeDiv = $('