chain-studio-flow-editor/pubspec.yaml
flemming-it 296e5bfd01 feat(editor): right-click context menu + reset layout
Two operator-visible features filling concrete gaps the
jai_client editor exposed:

 - Right-click on any step node opens a popup menu at the
   cursor position with three actions:
   * Duplicate — clones the step with a unique id
     (<base>_2, <base>_3, …) and offsets its position so
     the copy is visible next to the original.
   * Disconnect all inputs — keeps every with-field key
     but clears its expression value, so the step still
     declares the same inputs but no longer wires them to
     any upstream step.
   * Delete — removes the step. Any dangling $refs in
     downstream steps become run-time errors; we don't
     silently rewrite their YAML because the surprise
     would be worse than the explicit error.

 - Floating "Reset layout" button on the canvas (next to
   Fit to screen). Wipes the layout sidecar so AutoLayout
   re-runs from scratch and the topological column
   placement is restored. Auto-fits afterwards. Useful
   when manual drags have drifted into spaghetti and the
   operator wants a clean slate without losing the flow.

Implementation:
 - FlowNode gains an `onContextMenu(Offset globalPos)`
   parameter, wired to GestureDetector.onSecondaryTapDown.
 - FlowEditorController.resetLayout() — clears layout,
   re-seeds via AutoLayout, saves sidecar, notifies.
 - The menu uses Flutter's showMenu() at the global
   cursor position for native-feeling positioning.

Version bumped 0.2.2 -> 0.3.0 — first new operator-visible
feature set since the v0.2 WYSIWYG release.

Signed-off-by: flemming-it <sf@flemming.it>
2026-06-01 16:15:57 +02:00

27 lines
738 B
YAML

name: fai_studio_flow_editor
description: Swappable inline YAML editor for F∆I Studio flows.
version: 0.3.0
publish_to: 'none'
repository: https://git.flemming.ai/fai/studio-flow-editor
environment:
sdk: ^3.11.0-200.1.beta
flutter: '>=3.30.0'
dependencies:
flutter:
sdk: flutter
# CodeMirror-style code editor + the highlight package's
# YAML grammar. Both are pure Dart so the editor stays
# WebView-free and ships in the same binary.
flutter_code_editor: ^0.3.5
highlight: ^0.7.0
# YAML parsing for the graph view's model layer. We
# round-trip text <-> graph via this; the graph never
# mutates the YAML directly.
yaml: ^3.1.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^6.0.0