flowrs-engine/e2e/fixtures/appexport/live_counter.flowrs
flowRS fd958c0547 flowRS engine, cut from flowRS 3451b065
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 19:04:39 -05:00

93 lines
1.9 KiB
Text

{
"format": 1,
"generator": "flowrs 0.1.0",
"nodes": [
{
"id": 0,
"type_id": "FloatLiteral",
"properties": {
"value": "1",
"label": "Step",
"unit": "{count}"
},
"position": [
60.0,
60.0
],
"group": null
},
{
"id": 1,
"type_id": "math.add",
"properties": {},
"position": [
280.0,
60.0
],
"group": null
},
{
"id": 2,
"type_id": "flow.delay",
"properties": {
"duration_s": "0.25"
},
"position": [
280.0,
200.0
],
"group": null
},
{
"id": 3,
"type_id": "Indicator",
"properties": {
"label": "Count",
"kind": "numeric",
"min": "0",
"max": "200"
},
"position": [
500.0,
60.0
],
"group": null
}
],
"wires": [
{
"id": 0,
"from_node": 1,
"from_port": "sum",
"to_node": 1,
"to_port": "a",
"mode": "Copy",
"feedback": true
},
{
"id": 1,
"from_node": 0,
"from_port": "value",
"to_node": 1,
"to_port": "b",
"mode": "Move"
},
{
"id": 2,
"from_node": 1,
"from_port": "sum",
"to_node": 3,
"to_port": "input",
"mode": "Move"
}
],
"groups": [],
"widgets": {},
"app": {
"version": "1.0",
"library": "flowrs-app@1",
"source": "root = Stack([title, controls, reading])\ntitle = Heading(\"A counter you set while it runs\")\ncontrols = Grid([Card(\"Step size\", [Slider(\"Step\", $n0, 0, 5, 0.5)]), Card(\"Step size, typed\", [NumberInput(\"Step, typed\", $n0)])], 2)\nreading = Grid([Card(\"Count\", [Gauge(n1.sum, \"Count\", null, 0, 200)]), Card(\"Last pass\", [Stat(\"Count so far\", n1.sum), Stat(\"Wait each pass\", n2.out, \"s\")])], 2)",
"title": "A counter you set while it runs",
"steps": 40
}
}