enchancements

This commit is contained in:
2026-02-10 23:25:05 +03:00
parent af003c180d
commit 053c4fba60
6 changed files with 186 additions and 40 deletions

34
basics/calculator.json Normal file
View File

@@ -0,0 +1,34 @@
{
"code": "basics.calculator",
"name": "Simple calculator",
"description": "Do simple operations for numbers in `args` input.",
"icon": "mdi-calculator",
"inputs": [
{
"name": "operator",
"type": "string",
"description": "Operation to perform",
"enum": ["add", "subtract", "multiply", "divide"],
"required": true
},
{
"name": "args",
"type": "object[]",
"description": "Array of numbers to operate on",
"required": true
}
],
"outputs": [
{
"name": "result",
"type": "object",
"description": "Result of the calculation"
}
],
"source": "S8n.Components.Packages (project)",
"class": "S8n.Components.Basics.Calculator",
"methods": ["Execute"],
"gui": "ComponentCalculator.vue",
"category": "basics",
"tags": ["arithmetic", "math", "basics"]
}