@squeed/flow-sdk 2.0.36 → 2.0.38
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.
- package/README.md +29 -7
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5793 -5715
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -714,6 +714,12 @@ Pass `true` as the fourth argument to `focusBranch`, `focusNode`, or
|
|
|
714
714
|
`focusConnections` after a view toggle to fit the new geometry together with
|
|
715
715
|
the layout animation. Existing three-argument calls keep their behavior.
|
|
716
716
|
|
|
717
|
+
`focusBranch` accepts `centerOnNode` as its fifth argument and `zoomScale` as
|
|
718
|
+
its sixth (default `1`). For example,
|
|
719
|
+
`engine.focusBranch(nodeId, 40, true, false, true, 0.6)` keeps the selected node
|
|
720
|
+
centered and applies 60% of the fitted zoom, subject to existing zoom limits.
|
|
721
|
+
Omitting the scale preserves the previous branch fit.
|
|
722
|
+
|
|
717
723
|
For a closing preview in an ordinary document canvas, use
|
|
718
724
|
`engine.restoreView(true, savedViewport, true)` alongside the view change.
|
|
719
725
|
The optional third argument restores the saved viewport in the same transition
|
|
@@ -1405,16 +1411,32 @@ import { PiX } from "react-icons/pi";
|
|
|
1405
1411
|
|
|
1406
1412
|
## Keyboard Shortcuts
|
|
1407
1413
|
|
|
1408
|
-
| Key | Action
|
|
1409
|
-
| ---------------------- |
|
|
1410
|
-
| `Z` | Toggle zoom mode (scroll to zoom)
|
|
1411
|
-
| `M` | Toggle multi-select mode
|
|
1412
|
-
| `D` | Toggle drag/pan mode
|
|
1413
|
-
|
|
|
1414
|
-
| `
|
|
1414
|
+
| Key | Action |
|
|
1415
|
+
| ---------------------- | ----------------------------------------------------------------------------------- |
|
|
1416
|
+
| `Z` | Toggle zoom mode (scroll to zoom) |
|
|
1417
|
+
| `M` | Toggle multi-select mode |
|
|
1418
|
+
| `D` | Toggle drag/pan mode |
|
|
1419
|
+
| Arrow keys | Select a node in that direction and pan it to center without zooming |
|
|
1420
|
+
| `Delete` / `Backspace` | Delete selected non-root nodes |
|
|
1421
|
+
| `Escape` | Cancel an active editor/gesture first; otherwise reuse graph-background deselection |
|
|
1415
1422
|
|
|
1416
1423
|
The canvas supports pointer panning, wheel zoom, and two-finger pinch zoom. Interactive inputs inside nodes retain their own keyboard behavior.
|
|
1417
1424
|
|
|
1425
|
+
Click empty canvas to give it keyboard focus. Unmodified arrows select the
|
|
1426
|
+
nearest rendered node in the requested direction, starting from the selected
|
|
1427
|
+
node or the viewport center when nothing is selected. Hidden nodes and nodes
|
|
1428
|
+
inside another canvas are excluded. Panning is immediate and preserves zoom.
|
|
1429
|
+
No candidate leaves selection and viewport unchanged. Forms, open menus,
|
|
1430
|
+
multi-selection, read-only mode, and disabled keyboard shortcuts retain their
|
|
1431
|
+
existing keyboard behavior. Selection callbacks receive
|
|
1432
|
+
`keyboardNavigation: true` in `NodeSelectionModifiers`; hosts should not apply
|
|
1433
|
+
their mouse-click fit/zoom behavior for that event.
|
|
1434
|
+
|
|
1435
|
+
Escape on a selected canvas node reuses the background-click action, including
|
|
1436
|
+
preview retraction and the host's viewport restoration. Editors, dialogs, menus,
|
|
1437
|
+
fullscreen, and active gestures retain priority. If preview opening focuses its
|
|
1438
|
+
label editor, press Escape once to cancel editing and again to close the preview.
|
|
1439
|
+
|
|
1418
1440
|
## Theme Utilities
|
|
1419
1441
|
|
|
1420
1442
|
```tsx
|