@dobot-plus/template 1.2.7 → 1.2.8

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.
Files changed (64) hide show
  1. package/.dobot/components/DobotPlusApp.tsx +78 -78
  2. package/.dobot/http/axios.ts +52 -52
  3. package/.dobot/http/http.ts +22 -22
  4. package/.dobot/index.ts +2 -2
  5. package/.dobot/protocol/methodsHandler.ts +15 -15
  6. package/.dobot/protocol/postMessageHandler.ts +289 -289
  7. package/.dobot/shim.d.ts +3 -3
  8. package/.dobot/store/actions/toolActions.ts +69 -69
  9. package/.dobot/store/reducers/index.ts +8 -8
  10. package/.dobot/store/reducers/toolReducer.ts +152 -152
  11. package/.dobot/store/types.ts +240 -240
  12. package/.dobot/template/default.tsx.mustache +19 -19
  13. package/.dobot/template/entry.css +25 -25
  14. package/.dobot/template/entry.tsx +53 -53
  15. package/.dobot/template/index.html +23 -23
  16. package/.dobot/template/index.scss +5 -5
  17. package/.dobot/utils/i18n.ts +31 -31
  18. package/.dobot/utils/mqtt.ts +61 -61
  19. package/.dobot/utils/rem.js +21 -21
  20. package/.dobot/utils/tool.ts +15 -15
  21. package/.eslintrc.cjs +18 -18
  22. package/.luarc.json +8 -8
  23. package/.vscode/Api.schema.json +103 -103
  24. package/.vscode/Blocks.schema.json +94 -94
  25. package/.vscode/Main.schema.json +42 -42
  26. package/.vscode/Script.schema.json +22 -22
  27. package/.vscode/Toolbar.schema.json +19 -19
  28. package/.vscode/extensions.json +8 -8
  29. package/.vscode/settings.json +51 -51
  30. package/Resources/i18n/client/de.json +11 -11
  31. package/Resources/i18n/client/en.json +11 -11
  32. package/Resources/i18n/client/es.json +11 -11
  33. package/Resources/i18n/client/hk.json +11 -11
  34. package/Resources/i18n/client/ja.json +11 -11
  35. package/Resources/i18n/client/ko.json +11 -11
  36. package/Resources/i18n/client/ru.json +11 -11
  37. package/Resources/i18n/client/zh.json +11 -11
  38. package/Resources/i18n/plugin/de.json +3 -3
  39. package/Resources/i18n/plugin/en.json +3 -3
  40. package/Resources/i18n/plugin/es.json +3 -3
  41. package/Resources/i18n/plugin/hk.json +3 -3
  42. package/Resources/i18n/plugin/ja.json +3 -3
  43. package/Resources/i18n/plugin/ko.json +3 -3
  44. package/Resources/i18n/plugin/ru.json +3 -3
  45. package/Resources/i18n/plugin/zh.json +3 -3
  46. package/configs/Blocks.json +21 -21
  47. package/configs/Main.json +5 -5
  48. package/configs/Scripts.json +7 -7
  49. package/configs/Toolbar.json +5 -5
  50. package/dpt.json +4 -4
  51. package/lua/control.lua +18 -18
  52. package/lua/daemon.lua +22 -22
  53. package/lua/httpAPI.lua +66 -66
  54. package/lua/userAPI.lua +51 -51
  55. package/lua/utils/mqtt.lua +16 -16
  56. package/lua/utils/num_convert.lua +41 -41
  57. package/lua/utils/tcp.lua +30 -30
  58. package/lua/utils/util.lua +30 -30
  59. package/package.json +58 -49
  60. package/project.json +3 -3
  61. package/tsconfig.json +26 -26
  62. package/ui/Blocks.tsx +5 -5
  63. package/ui/Main.tsx +31 -31
  64. package/ui/Toolbar.tsx +5 -5
@@ -1,94 +1,94 @@
1
- {
2
- "type": "array",
3
- "items": {
4
- "type": "object",
5
- "properties": {
6
- "block_name": {
7
- "type": "string"
8
- },
9
- "block_color": {
10
- "type": "string",
11
- "format": "color"
12
- },
13
- "block_type": {
14
- "type": "string",
15
- "enum": ["shape_hat", "shape_end", "shape_statement", "output_string", "output_boolean", "output_number"]
16
- },
17
- "block_popup": {
18
- "type": "object",
19
- "properties": {
20
- "title": {
21
- "type": "string"
22
- },
23
- "page": {
24
- "type": "string"
25
- },
26
- "width": {
27
- "type": "number"
28
- },
29
- "height": {
30
- "type": "number"
31
- }
32
- },
33
- "required": ["title", "page"]
34
- },
35
- "block_configs": {
36
- "type": "array",
37
- "items": {
38
- "type": "object",
39
- "properties": {
40
- "message": {
41
- "type": "string"
42
- },
43
- "params": {
44
- "type": "array",
45
- "items": {
46
- "type": "object",
47
- "properties": {
48
- "param_type": {
49
- "type": "string",
50
- "enum": ["input_value", "field_dropdown", "input_statement"]
51
- },
52
- "data_type": {
53
- "type": "string",
54
- "enum": ["math_number", "text", ""]
55
- },
56
- "name": {
57
- "type": "string"
58
- },
59
- "default": {
60
- "type": ["string", "number", "boolean"]
61
- },
62
- "options": {
63
- "type": "array",
64
- "items": {
65
- "type": "object",
66
- "properties": {
67
- "label": {
68
- "type": "string"
69
- },
70
- "value": {
71
- "type": "string"
72
- }
73
- },
74
- "required": ["label", "value"]
75
- }
76
- }
77
- },
78
- "required": ["param_type", "name"]
79
- }
80
- }
81
- },
82
- "required": ["message"]
83
- }
84
- },
85
- "block_code": {
86
- "type": "array",
87
- "items": {
88
- "type": "string"
89
- }
90
- }
91
- },
92
- "required": ["block_name", "block_type", "block_configs"]
93
- }
94
- }
1
+ {
2
+ "type": "array",
3
+ "items": {
4
+ "type": "object",
5
+ "properties": {
6
+ "block_name": {
7
+ "type": "string"
8
+ },
9
+ "block_color": {
10
+ "type": "string",
11
+ "format": "color"
12
+ },
13
+ "block_type": {
14
+ "type": "string",
15
+ "enum": ["shape_hat", "shape_end", "shape_statement", "output_string", "output_boolean", "output_number"]
16
+ },
17
+ "block_popup": {
18
+ "type": "object",
19
+ "properties": {
20
+ "title": {
21
+ "type": "string"
22
+ },
23
+ "page": {
24
+ "type": "string"
25
+ },
26
+ "width": {
27
+ "type": "number"
28
+ },
29
+ "height": {
30
+ "type": "number"
31
+ }
32
+ },
33
+ "required": ["title", "page"]
34
+ },
35
+ "block_configs": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "object",
39
+ "properties": {
40
+ "message": {
41
+ "type": "string"
42
+ },
43
+ "params": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "object",
47
+ "properties": {
48
+ "param_type": {
49
+ "type": "string",
50
+ "enum": ["input_value", "field_dropdown", "input_statement"]
51
+ },
52
+ "data_type": {
53
+ "type": "string",
54
+ "enum": ["math_number", "text", ""]
55
+ },
56
+ "name": {
57
+ "type": "string"
58
+ },
59
+ "default": {
60
+ "type": ["string", "number", "boolean"]
61
+ },
62
+ "options": {
63
+ "type": "array",
64
+ "items": {
65
+ "type": "object",
66
+ "properties": {
67
+ "label": {
68
+ "type": "string"
69
+ },
70
+ "value": {
71
+ "type": "string"
72
+ }
73
+ },
74
+ "required": ["label", "value"]
75
+ }
76
+ }
77
+ },
78
+ "required": ["param_type", "name"]
79
+ }
80
+ }
81
+ },
82
+ "required": ["message"]
83
+ }
84
+ },
85
+ "block_code": {
86
+ "type": "array",
87
+ "items": {
88
+ "type": "string"
89
+ }
90
+ }
91
+ },
92
+ "required": ["block_name", "block_type", "block_configs"]
93
+ }
94
+ }
@@ -1,42 +1,42 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "name": {
5
- "type": "string",
6
- "description": "The name of the application."
7
- },
8
- "version": {
9
- "type": "string",
10
- "description": "The version of the application."
11
- },
12
- "description": {
13
- "type": "string",
14
- "description": "The description of the application."
15
- },
16
- "versionRestricted": {
17
- "type": "string",
18
- "description": "The version of the application that has restrictions."
19
- },
20
- "permissionsRequired": {
21
- "type": "boolean",
22
- "description": "Indicates if permissions are required for the application."
23
- },
24
- "applicationDisplayed": {
25
- "type": "object",
26
- "properties": {
27
- "applicationTitle": {
28
- "type": "string",
29
- "description": "The title of the application as displayed to the user."
30
- },
31
- "applicationImage": {
32
- "type": "string",
33
- "description": "The image associated with the application."
34
- }
35
- },
36
- "required": ["applicationTitle", "applicationImage"],
37
- "additionalProperties": false
38
- }
39
- },
40
- "required": ["name", "version", "description", "versionRestricted", "permissionsRequired", "applicationDisplayed"],
41
- "additionalProperties": false
42
- }
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "name": {
5
+ "type": "string",
6
+ "description": "The name of the application."
7
+ },
8
+ "version": {
9
+ "type": "string",
10
+ "description": "The version of the application."
11
+ },
12
+ "description": {
13
+ "type": "string",
14
+ "description": "The description of the application."
15
+ },
16
+ "versionRestricted": {
17
+ "type": "string",
18
+ "description": "The version of the application that has restrictions."
19
+ },
20
+ "permissionsRequired": {
21
+ "type": "boolean",
22
+ "description": "Indicates if permissions are required for the application."
23
+ },
24
+ "applicationDisplayed": {
25
+ "type": "object",
26
+ "properties": {
27
+ "applicationTitle": {
28
+ "type": "string",
29
+ "description": "The title of the application as displayed to the user."
30
+ },
31
+ "applicationImage": {
32
+ "type": "string",
33
+ "description": "The image associated with the application."
34
+ }
35
+ },
36
+ "required": ["applicationTitle", "applicationImage"],
37
+ "additionalProperties": false
38
+ }
39
+ },
40
+ "required": ["name", "version", "description", "versionRestricted", "permissionsRequired", "applicationDisplayed"],
41
+ "additionalProperties": false
42
+ }
@@ -1,22 +1,22 @@
1
- {
2
- "type": "array",
3
- "items": {
4
- "type": "object",
5
- "properties": {
6
- "script_name": {
7
- "type": "string",
8
- "description": "The name of the script."
9
- },
10
- "message": {
11
- "type": "string",
12
- "description": "The message associated with the script, typically used for localization."
13
- },
14
- "script_code": {
15
- "type": "string",
16
- "description": "The code of the script."
17
- }
18
- },
19
- "required": ["script_name", "message", "script_code"],
20
- "additionalProperties": false
21
- }
22
- }
1
+ {
2
+ "type": "array",
3
+ "items": {
4
+ "type": "object",
5
+ "properties": {
6
+ "script_name": {
7
+ "type": "string",
8
+ "description": "The name of the script."
9
+ },
10
+ "message": {
11
+ "type": "string",
12
+ "description": "The message associated with the script, typically used for localization."
13
+ },
14
+ "script_code": {
15
+ "type": "string",
16
+ "description": "The code of the script."
17
+ }
18
+ },
19
+ "required": ["script_name", "message", "script_code"],
20
+ "additionalProperties": false
21
+ }
22
+ }
@@ -1,19 +1,19 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "name": {
5
- "type": "string",
6
- "description": "The name of the toolbar, typically used for localization."
7
- },
8
- "width": {
9
- "type": "number",
10
- "description": "The width of the toolbar in pixels."
11
- },
12
- "height": {
13
- "type": "number",
14
- "description": "The height of the toolbar in pixels."
15
- }
16
- },
17
- "required": ["name", "width", "height"],
18
- "additionalProperties": false
19
- }
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "name": {
5
+ "type": "string",
6
+ "description": "The name of the toolbar, typically used for localization."
7
+ },
8
+ "width": {
9
+ "type": "number",
10
+ "description": "The width of the toolbar in pixels."
11
+ },
12
+ "height": {
13
+ "type": "number",
14
+ "description": "The height of the toolbar in pixels."
15
+ }
16
+ },
17
+ "required": ["name", "width", "height"],
18
+ "additionalProperties": false
19
+ }
@@ -1,8 +1,8 @@
1
- {
2
- "recommendations": [
3
- "sumneko.lua",
4
- "yinfei.luahelper",
5
- "streetsidesoftware.code-spell-checker",
6
- "lokalise.i18n-ally"
7
- ]
8
- }
1
+ {
2
+ "recommendations": [
3
+ "sumneko.lua",
4
+ "yinfei.luahelper",
5
+ "streetsidesoftware.code-spell-checker",
6
+ "lokalise.i18n-ally"
7
+ ]
8
+ }
@@ -1,52 +1,52 @@
1
- {
2
- "json.schemas": [
3
- {
4
- "fileMatch": [
5
- "configs/Blocks.json"
6
- ],
7
- "url": ".vscode/Blocks.schema.json"
8
- },
9
- {
10
- "fileMatch": [
11
- "configs/Toolbar.json"
12
- ],
13
- "url": ".vscode/Toolbar.schema.json"
14
- },
15
- {
16
- "fileMatch": [
17
- "configs/Main.json"
18
- ],
19
- "url": ".vscode/Main.schema.json"
20
- },
21
- {
22
- "fileMatch": [
23
- "configs/Scripts.json"
24
- ],
25
- "url": ".vscode/Script.schema.json"
26
- },
27
- {
28
- "fileMatch": [
29
- "api.json"
30
- ],
31
- "url": ".vscode/Api.schema.json"
32
- }
33
- ],
34
- "i18n-ally.localesPaths": ["Resources/i18n/client", "Resources/i18n/plugin"],
35
- "i18n-ally.sourceLanguage": "zh",
36
- "i18n-ally.enabledFrameworks": ["react-i18next", "react"],
37
- "i18n-ally.keystyle": "flat",
38
- "cSpell.words": [
39
- "DOBOTPLUS",
40
- "dobot"
41
- ],
42
- "[lua]": {
43
- "editor.defaultFormatter": "yinfei.luahelper",
44
- "editor.formatOnSave": true,
45
- "editor.quickSuggestions": {
46
- "other": "on",
47
- "comments": "on",
48
- "strings": "on"
49
- }
50
- },
51
- "luahelper.Warn.AllEnable": true
1
+ {
2
+ "json.schemas": [
3
+ {
4
+ "fileMatch": [
5
+ "configs/Blocks.json"
6
+ ],
7
+ "url": ".vscode/Blocks.schema.json"
8
+ },
9
+ {
10
+ "fileMatch": [
11
+ "configs/Toolbar.json"
12
+ ],
13
+ "url": ".vscode/Toolbar.schema.json"
14
+ },
15
+ {
16
+ "fileMatch": [
17
+ "configs/Main.json"
18
+ ],
19
+ "url": ".vscode/Main.schema.json"
20
+ },
21
+ {
22
+ "fileMatch": [
23
+ "configs/Scripts.json"
24
+ ],
25
+ "url": ".vscode/Script.schema.json"
26
+ },
27
+ {
28
+ "fileMatch": [
29
+ "api.json"
30
+ ],
31
+ "url": ".vscode/Api.schema.json"
32
+ }
33
+ ],
34
+ "i18n-ally.localesPaths": ["Resources/i18n/client", "Resources/i18n/plugin"],
35
+ "i18n-ally.sourceLanguage": "zh",
36
+ "i18n-ally.enabledFrameworks": ["react-i18next", "react"],
37
+ "i18n-ally.keystyle": "flat",
38
+ "cSpell.words": [
39
+ "DOBOTPLUS",
40
+ "dobot"
41
+ ],
42
+ "[lua]": {
43
+ "editor.defaultFormatter": "yinfei.luahelper",
44
+ "editor.formatOnSave": true,
45
+ "editor.quickSuggestions": {
46
+ "other": "on",
47
+ "comments": "on",
48
+ "strings": "on"
49
+ }
50
+ },
51
+ "luahelper.Warn.AllEnable": true
52
52
  }
@@ -1,11 +1,11 @@
1
- {
2
- "blocks": {
3
- "blocksDemoKey": "Bausteinübersetzung auf Deutsch %1"
4
- },
5
- "config": {
6
- "configDemoKey": "Konfigurationsinhalt auf Deutsch"
7
- },
8
- "scripts": {
9
- "scriptDemoKey": "Skriptübersetzung auf Deutsch"
10
- }
11
- }
1
+ {
2
+ "blocks": {
3
+ "blocksDemoKey": "Bausteinübersetzung auf Deutsch %1"
4
+ },
5
+ "config": {
6
+ "configDemoKey": "Konfigurationsinhalt auf Deutsch"
7
+ },
8
+ "scripts": {
9
+ "scriptDemoKey": "Skriptübersetzung auf Deutsch"
10
+ }
11
+ }
@@ -1,11 +1,11 @@
1
- {
2
- "blocks": {
3
- "blocksDemoKey": "Block translation content in English %1"
4
- },
5
- "config": {
6
- "configDemoKey": "Content in English"
7
- },
8
- "scripts": {
9
- "scriptDemoKey": "Script translation content in English"
10
- }
11
- }
1
+ {
2
+ "blocks": {
3
+ "blocksDemoKey": "Block translation content in English %1"
4
+ },
5
+ "config": {
6
+ "configDemoKey": "Content in English"
7
+ },
8
+ "scripts": {
9
+ "scriptDemoKey": "Script translation content in English"
10
+ }
11
+ }
@@ -1,11 +1,11 @@
1
- {
2
- "blocks": {
3
- "blocksDemoKey": "Contenido de traducción de bloques en español %1"
4
- },
5
- "config": {
6
- "configDemoKey": "Contenido en español"
7
- },
8
- "scripts": {
9
- "scriptDemoKey": "Contenido de traducción de scripts en español"
10
- }
11
- }
1
+ {
2
+ "blocks": {
3
+ "blocksDemoKey": "Contenido de traducción de bloques en español %1"
4
+ },
5
+ "config": {
6
+ "configDemoKey": "Contenido en español"
7
+ },
8
+ "scripts": {
9
+ "scriptDemoKey": "Contenido de traducción de scripts en español"
10
+ }
11
+ }
@@ -1,11 +1,11 @@
1
- {
2
- "blocks": {
3
- "blocksDemoKey": "積木中文翻譯內容 %1"
4
- },
5
- "config": {
6
- "configDemoKey": "中文內容"
7
- },
8
- "scripts": {
9
- "scriptDemoKey": "腳本中文翻譯內容"
10
- }
11
- }
1
+ {
2
+ "blocks": {
3
+ "blocksDemoKey": "積木中文翻譯內容 %1"
4
+ },
5
+ "config": {
6
+ "configDemoKey": "中文內容"
7
+ },
8
+ "scripts": {
9
+ "scriptDemoKey": "腳本中文翻譯內容"
10
+ }
11
+ }
@@ -1,11 +1,11 @@
1
- {
2
- "blocks": {
3
- "blocksDemoKey": "ブロックの日本語翻訳内容 %1"
4
- },
5
- "config": {
6
- "configDemoKey": "日本語の内容"
7
- },
8
- "scripts": {
9
- "scriptDemoKey": "スクリプトの日本語翻訳内容"
10
- }
11
- }
1
+ {
2
+ "blocks": {
3
+ "blocksDemoKey": "ブロックの日本語翻訳内容 %1"
4
+ },
5
+ "config": {
6
+ "configDemoKey": "日本語の内容"
7
+ },
8
+ "scripts": {
9
+ "scriptDemoKey": "スクリプトの日本語翻訳内容"
10
+ }
11
+ }
@@ -1,11 +1,11 @@
1
- {
2
- "blocks": {
3
- "blocksDemoKey": "블록 한국어 번역 내용 %1"
4
- },
5
- "config": {
6
- "configDemoKey": "한국어 내용"
7
- },
8
- "scripts": {
9
- "scriptDemoKey": "스크립트 한국어 번역 내용"
10
- }
11
- }
1
+ {
2
+ "blocks": {
3
+ "blocksDemoKey": "블록 한국어 번역 내용 %1"
4
+ },
5
+ "config": {
6
+ "configDemoKey": "한국어 내용"
7
+ },
8
+ "scripts": {
9
+ "scriptDemoKey": "스크립트 한국어 번역 내용"
10
+ }
11
+ }
@@ -1,11 +1,11 @@
1
- {
2
- "blocks": {
3
- "blocksDemoKey": "Содержимое перевода блоков на русском языке %1"
4
- },
5
- "config": {
6
- "configDemoKey": "Содержимое на русском языке"
7
- },
8
- "scripts": {
9
- "scriptDemoKey": "Содержимое перевода скрипта на русском языке"
10
- }
11
- }
1
+ {
2
+ "blocks": {
3
+ "blocksDemoKey": "Содержимое перевода блоков на русском языке %1"
4
+ },
5
+ "config": {
6
+ "configDemoKey": "Содержимое на русском языке"
7
+ },
8
+ "scripts": {
9
+ "scriptDemoKey": "Содержимое перевода скрипта на русском языке"
10
+ }
11
+ }