panel-reactflow 0.5.0b1__tar.gz → 0.5.1__tar.gz
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.
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/PKG-INFO +1 -1
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/how-to/react-to-events.md +46 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/releases.md +30 -7
- panel_reactflow-0.5.1/examples/drop_from_menu.py +75 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/pixi.lock +43 -42
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/src/panel_reactflow/base.py +31 -0
- panel_reactflow-0.5.1/src/panel_reactflow/dist/panel-reactflow.bundle.js +88 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/src/panel_reactflow/models/reactflow.jsx +89 -4
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/test_api.py +28 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/ui/test_ui.py +224 -0
- panel_reactflow-0.5.0b1/src/panel_reactflow/dist/panel-reactflow.bundle.js +0 -88
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/.copier-answers.yml +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/.gitattributes +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/.github/CODEOWNERS +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/.github/dependabot.yml +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/.github/workflows/build.yml +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/.github/workflows/docs.yml +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/.github/workflows/test.yml +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/.gitignore +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/.pre-commit-config.yaml +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/.prettierrc +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/LICENSE.txt +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/MANIFEST.in +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/README.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/logo.svg +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/declare-types.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/define-editors-edge.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/define-editors-node.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/define-nodes-edges.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/embed-views-in-nodes.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/examples/advanced.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/examples/custom_editor.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/examples/edge_editors.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/examples/node_edge_instances.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/examples/schema_types.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/examples/simple.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/examples/threejs_viewer.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/examples/threejs_viewer_instances.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/quickstart.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/react-to-events.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/assets/screenshots/style-nodes-edges.png +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/examples/advanced.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/examples/custom-editor.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/examples/edge-editors.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/examples/index.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/examples/node-edge-instances.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/examples/schema-types.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/examples/simple.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/examples/threejs-viewer-instances.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/examples/threejs-viewer.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/how-to/context-menu.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/how-to/control-handle-connectivity.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/how-to/declare-types.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/how-to/define-editors.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/how-to/define-nodes-edges.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/how-to/embed-views-in-nodes.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/how-to/recover-from-errors.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/how-to/style-nodes-edges.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/how-to/validate-connections.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/index.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/quickstart.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/docs/reference/panel_reactflow.md +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/advanced.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/connection_validation.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/context_menu.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/custom_editor.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/edge_editors.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/edge_types_comparison.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/node_edge_instances.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/port_value_inspection.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/schema_types.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/simple.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/smart_edges_example.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/threejs_viewer.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/examples/threejs_viewer_instances.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/hatch_build.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/pixi.toml +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/pyproject.toml +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/src/panel_reactflow/__init__.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/src/panel_reactflow/__version.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/src/panel_reactflow/dist/css/reactflow.css +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/src/panel_reactflow/dist/icons/gear.svg +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/src/panel_reactflow/dist/panel-reactflow.bundle.css +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/src/panel_reactflow/py.typed +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/src/panel_reactflow/schema.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/__init__.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/conftest.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/test_connectable_handles.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/test_connectable_integration.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/test_core.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/test_error_recovery.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/ui/__init__.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/ui/test_context_menu.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/ui/test_error_recovery.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/tests/ui/test_value_popup.py +0 -0
- {panel_reactflow-0.5.0b1 → panel_reactflow-0.5.1}/zensical.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: panel-reactflow
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: A Panel wrapper for the Reactflow JS library.
|
|
5
5
|
Project-URL: Homepage, https://github.com/panel-extensions/panel-reactflow
|
|
6
6
|
Project-URL: Source, https://github.com/panel-extensions/panel-reactflow
|
|
@@ -30,6 +30,7 @@ the `ReactFlow` instance as a second argument. You can also listen for
|
|
|
30
30
|
| `edge_data_changed` | Edge data is patched (via API, editor patch, or parameter-driven sync). | `edge_id`, `patch` |
|
|
31
31
|
| `selection_changed` | The active selection changes. | `nodes`, `edges` |
|
|
32
32
|
| `sync` | A batch sync from the frontend. | *(varies)* |
|
|
33
|
+
| `drop` | Data of one of the `drop_types` is dropped onto the canvas. See [Handle drops](#handle-drops-onto-the-canvas). | `drop_type`, `data`, `position`, `target` |
|
|
33
34
|
| `client_error` | The graph view hit a rendering error in the browser. See [Recover from Rendering Errors](recover-from-errors.md). | `source`, `message`, `stack`, `component_stack`, `attempt`, `mode` |
|
|
34
35
|
|
|
35
36
|
---
|
|
@@ -151,6 +152,51 @@ flow.on("selection_changed", on_selection)
|
|
|
151
152
|
|
|
152
153
|
---
|
|
153
154
|
|
|
155
|
+
## Handle drops onto the canvas
|
|
156
|
+
|
|
157
|
+
Set `drop_types` to the MIME types the canvas accepts, and each drop of one
|
|
158
|
+
of them emits `drop`. Anything that sets data under that type when a drag
|
|
159
|
+
starts can be the source; a `panel_material_ui.MenuList` with
|
|
160
|
+
`draggable=True` sends `{"path": [...], "label": ...}` under its
|
|
161
|
+
`drag_type`. The payload's `position` is in flow coordinates, and `target`
|
|
162
|
+
names the node, and handle when there is one, under the pointer, so a
|
|
163
|
+
handler can add the dropped item there or wire it to the handle it landed
|
|
164
|
+
on. Drops are ignored while `editable` is False.
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
palette = pmui.MenuList(items=[{"label": "CSV file"}, {"label": "Database"}], draggable=True)
|
|
168
|
+
flow = ReactFlow(drop_types=[palette.drag_type])
|
|
169
|
+
|
|
170
|
+
def on_drop(payload, flow):
|
|
171
|
+
item = palette.items[payload["data"]["path"][0]]
|
|
172
|
+
node_id = f"node-{len(flow.nodes)}"
|
|
173
|
+
flow.add_node({"id": node_id, "label": item["label"], "position": payload["position"], "data": {}})
|
|
174
|
+
target = payload["target"]
|
|
175
|
+
if target and target["direction"] == "input":
|
|
176
|
+
flow.add_edge({"source": node_id, "target": target["node_id"], "targetHandle": target["handle_id"]})
|
|
177
|
+
|
|
178
|
+
flow.on("drop", on_drop)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
`examples/drop_from_menu.py` extends this with a grouped palette and places
|
|
182
|
+
a node dropped on an input handle beside the node it feeds.
|
|
183
|
+
|
|
184
|
+
To accept files dragged in from the operating system, add `"Files"` to `drop_types`. The payload's `data` is then a list with one `{"name", "type", "size", "content"}` entry per file, each read as text:
|
|
185
|
+
|
|
186
|
+
```python
|
|
187
|
+
flow = ReactFlow(drop_types=["Files"])
|
|
188
|
+
|
|
189
|
+
def on_file_drop(payload, flow):
|
|
190
|
+
for file in payload["data"]:
|
|
191
|
+
if file["name"].endswith(".json"):
|
|
192
|
+
graph = json.loads(file["content"])
|
|
193
|
+
flow.param.update(nodes=graph["nodes"], edges=graph["edges"])
|
|
194
|
+
|
|
195
|
+
flow.on("drop", on_file_drop)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
154
200
|
## Register multiple handlers
|
|
155
201
|
|
|
156
202
|
You can register as many handlers as you like for the same event — they
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## Version 0.5.1
|
|
4
|
+
|
|
5
|
+
A small enhancement release that lets the canvas accept files dragged in from the operating system.
|
|
6
|
+
|
|
7
|
+
### Enhancements
|
|
8
|
+
|
|
9
|
+
- **Drop files onto the canvas**: add `"Files"` to `drop_types` to accept files dragged in from the operating system. The `drop` event's `data` lists each file's `name`, `type`, `size` and text `content`, so a handler can, for example, load a graph saved as JSON. See [React to Events](how-to/react-to-events.md#handle-drops-onto-the-canvas) ([#79](https://github.com/panel-extensions/panel-reactflow/pull/79)).
|
|
10
|
+
|
|
3
11
|
## Version 0.5.0
|
|
4
12
|
|
|
5
|
-
This release adds port and edge value inspection
|
|
6
|
-
for interactive graph editing. `Node` and `Edge` properties now sync to
|
|
13
|
+
This release adds port and edge value inspection, connection checks
|
|
14
|
+
and canvas drops for interactive graph editing. `Node` and `Edge` properties now sync to
|
|
7
15
|
the browser in place, batches of changes render as a single update, and
|
|
8
16
|
an error boundary keeps a malformed graph from blanking the canvas.
|
|
9
17
|
|
|
@@ -26,7 +34,7 @@ an error boundary keeps a malformed graph from blanking the canvas.
|
|
|
26
34
|
`examples/connection_validation.py`
|
|
27
35
|
([#75](https://github.com/panel-extensions/panel-reactflow/pull/75)).
|
|
28
36
|
|
|
29
|
-
- **Error recovery
|
|
37
|
+
- **Error recovery**: the canvas is now wrapped in an error boundary,
|
|
30
38
|
controlled by the new `error_recovery` parameter (`"auto"` by default,
|
|
31
39
|
or `"manual"` / `"off"`). In `"auto"` mode a React render error
|
|
32
40
|
remounts the canvas, then remounts again in a view-only safe mode that
|
|
@@ -39,7 +47,7 @@ an error boundary keeps a malformed graph from blanking the canvas.
|
|
|
39
47
|
to the server
|
|
40
48
|
([#70](https://github.com/panel-extensions/panel-reactflow/pull/70)).
|
|
41
49
|
|
|
42
|
-
- **Base property sync
|
|
50
|
+
- **Base property sync**: the top-level React Flow fields on `Node` and
|
|
43
51
|
`Edge` (`label`, `type`, `style`, `className`, `draggable`,
|
|
44
52
|
`connectable`, `deletable`, ...) are now synced to the frontend, so
|
|
45
53
|
assigning `node.label = "Start (running)"` patches the browser in place
|
|
@@ -55,7 +63,7 @@ an error boundary keeps a malformed graph from blanking the canvas.
|
|
|
55
63
|
|
|
56
64
|
### Enhancements
|
|
57
65
|
|
|
58
|
-
- **Batch removal
|
|
66
|
+
- **Batch removal**: `remove_node()` and `remove_edge()` now accept
|
|
59
67
|
several ids, either as separate arguments
|
|
60
68
|
(`flow.remove_node("n1", "n2")`) or as a sequence
|
|
61
69
|
(`flow.remove_node(["n1", "n2"])`), and remove them in a single update.
|
|
@@ -63,9 +71,24 @@ an error boundary keeps a malformed graph from blanking the canvas.
|
|
|
63
71
|
`pn.io.hold()` to render them at once
|
|
64
72
|
([#72](https://github.com/panel-extensions/panel-reactflow/pull/72)).
|
|
65
73
|
|
|
74
|
+
- **Drop data onto the canvas**: `drop_types` lists MIME types the canvas
|
|
75
|
+
accepts, and each drop of one of them emits a `drop` event with the
|
|
76
|
+
dropped data, its flow position, and the node or handle under the
|
|
77
|
+
pointer, so a handler can add and wire what was dropped. Draggable
|
|
78
|
+
`panel_material_ui.MenuList` items work as a source; see
|
|
79
|
+
[React to Events](how-to/react-to-events.md#handle-drops-onto-the-canvas)
|
|
80
|
+
([#77](https://github.com/panel-extensions/panel-reactflow/pull/77)).
|
|
81
|
+
|
|
66
82
|
### Bug fixes
|
|
67
83
|
|
|
68
|
-
- **
|
|
84
|
+
- **Nodes remounted when node types change**: any change to
|
|
85
|
+
`node_types` rebuilt the component for every node type, so React
|
|
86
|
+
remounted every node and detached its embedded view, which could leave
|
|
87
|
+
Bokeh plots blank. Each type's component is now reused until its own
|
|
88
|
+
spec or the popup settings change
|
|
89
|
+
([#77](https://github.com/panel-extensions/panel-reactflow/pull/77)).
|
|
90
|
+
|
|
91
|
+
- **Progressive re-render when deleting multiple elements**: deleting a
|
|
69
92
|
multi-node selection removed the nodes one at a time, syncing an
|
|
70
93
|
intermediate graph to the browser per node so the nodes visibly
|
|
71
94
|
disappeared one by one. Updates triggered by a frontend message are now
|
|
@@ -73,7 +96,7 @@ an error boundary keeps a malformed graph from blanking the canvas.
|
|
|
73
96
|
`nodes` and `edges` once
|
|
74
97
|
([#72](https://github.com/panel-extensions/panel-reactflow/pull/72)).
|
|
75
98
|
|
|
76
|
-
- **Serialization error when updating `node_types
|
|
99
|
+
- **Serialization error when updating `node_types`**: assigning
|
|
77
100
|
`NodeType` or `EdgeType` descriptors with a `schema` class after
|
|
78
101
|
construction synced them to the browser before they were converted to
|
|
79
102
|
JSON descriptors, so the server failed with `can't serialize
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""Drag items from a panel-material-ui MenuList onto the canvas to add nodes.
|
|
2
|
+
|
|
3
|
+
Dropping an item on empty canvas adds a node there; dropping it on a node's
|
|
4
|
+
input handle also connects the new node to that input.
|
|
5
|
+
|
|
6
|
+
Run from the repository root with:
|
|
7
|
+
|
|
8
|
+
PYTHONPATH=src pixi run panel serve examples/drop_from_menu.py --show
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import panel as pn
|
|
12
|
+
import panel_material_ui as pmui
|
|
13
|
+
|
|
14
|
+
from panel_reactflow import NodeSpec, NodeType, ReactFlow
|
|
15
|
+
|
|
16
|
+
pn.extension()
|
|
17
|
+
|
|
18
|
+
PALETTE_ITEMS = [
|
|
19
|
+
{"label": "Sources", "draggable": False, "items": [
|
|
20
|
+
{"label": "CSV file", "icon": "description", "kind": "source"},
|
|
21
|
+
{"label": "Database", "icon": "storage", "kind": "source"},
|
|
22
|
+
]},
|
|
23
|
+
{"label": "Transforms", "draggable": False, "items": [
|
|
24
|
+
{"label": "Filter", "icon": "filter_alt", "kind": "transform"},
|
|
25
|
+
]},
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def lookup(items, path):
|
|
30
|
+
item = {"items": items}
|
|
31
|
+
for index in path:
|
|
32
|
+
item = item["items"][index]
|
|
33
|
+
return item
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
palette = pmui.MenuList(
|
|
37
|
+
items=PALETTE_ITEMS, draggable=True, expanded=[(0,), (1,)], width=220, label="Drag onto the canvas"
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
flow = ReactFlow(
|
|
41
|
+
nodes=[NodeSpec(id="sink", type="transform", label="Sink", position={"x": 400, "y": 150}).to_dict()],
|
|
42
|
+
node_types={
|
|
43
|
+
"source": NodeType(type="source", inputs=[], outputs=["out"]),
|
|
44
|
+
"transform": NodeType(type="transform", inputs=["in"], outputs=["out"]),
|
|
45
|
+
},
|
|
46
|
+
drop_types=[palette.drag_type],
|
|
47
|
+
# Keeps fitView from zooming in on the lone starting node, so nodes placed
|
|
48
|
+
# beside it stay on screen.
|
|
49
|
+
max_zoom=1,
|
|
50
|
+
sizing_mode="stretch_both",
|
|
51
|
+
min_height=500,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def on_drop(payload, flow):
|
|
56
|
+
item = lookup(palette.items, payload["data"]["path"])
|
|
57
|
+
node_id = f"{item['kind']}-{len(flow.nodes)}"
|
|
58
|
+
target = payload["target"]
|
|
59
|
+
wire = target is not None and target["direction"] == "input"
|
|
60
|
+
position = payload["position"]
|
|
61
|
+
if wire:
|
|
62
|
+
# Place the new node left of the input it feeds rather than on top of it.
|
|
63
|
+
target_node = next(n for n in flow.nodes if n["id"] == target["node_id"])
|
|
64
|
+
position = {"x": target_node["position"]["x"] - 320, "y": target_node["position"]["y"]}
|
|
65
|
+
flow.add_node(NodeSpec(id=node_id, type=item["kind"], label=item["label"], position=position).to_dict())
|
|
66
|
+
if wire:
|
|
67
|
+
flow.add_edge(
|
|
68
|
+
{"source": node_id, "sourceHandle": "out", "target": target["node_id"], "targetHandle": target["handle_id"]}
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
flow.on("drop", on_drop)
|
|
73
|
+
|
|
74
|
+
demo = pmui.Row(palette, flow, sizing_mode="stretch_both")
|
|
75
|
+
demo.servable()
|
|
@@ -168,7 +168,7 @@ environments:
|
|
|
168
168
|
- conda: https://conda.anaconda.org/conda-forge/noarch/xyzservices-2026.9.1-pyhd8ed1ab_0.conda
|
|
169
169
|
- conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda
|
|
170
170
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
171
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
171
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
172
172
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
173
173
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
174
174
|
osx-64:
|
|
@@ -302,7 +302,7 @@ environments:
|
|
|
302
302
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zlib-ng-2.3.3-h646e873_1.conda
|
|
303
303
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-hbc1a06c_7.conda
|
|
304
304
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
305
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
305
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
306
306
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
307
307
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
308
308
|
osx-arm64:
|
|
@@ -436,7 +436,7 @@ environments:
|
|
|
436
436
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zlib-ng-2.3.3-h31dac16_1.conda
|
|
437
437
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hf451053_7.conda
|
|
438
438
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
439
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
439
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
440
440
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
441
441
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
442
442
|
win-64:
|
|
@@ -564,7 +564,7 @@ environments:
|
|
|
564
564
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zlib-ng-2.3.3-h0261ad2_1.conda
|
|
565
565
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_7.conda
|
|
566
566
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
567
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
567
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
568
568
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
569
569
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
570
570
|
default:
|
|
@@ -702,7 +702,7 @@ environments:
|
|
|
702
702
|
- conda: https://conda.anaconda.org/conda-forge/noarch/xyzservices-2026.9.1-pyhd8ed1ab_0.conda
|
|
703
703
|
- conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda
|
|
704
704
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
705
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
705
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
706
706
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
707
707
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
708
708
|
osx-64:
|
|
@@ -833,7 +833,7 @@ environments:
|
|
|
833
833
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zlib-ng-2.3.3-h646e873_1.conda
|
|
834
834
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-hbc1a06c_7.conda
|
|
835
835
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
836
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
836
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
837
837
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
838
838
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
839
839
|
osx-arm64:
|
|
@@ -964,7 +964,7 @@ environments:
|
|
|
964
964
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zlib-ng-2.3.3-h31dac16_1.conda
|
|
965
965
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hf451053_7.conda
|
|
966
966
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
967
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
967
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
968
968
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
969
969
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
970
970
|
win-64:
|
|
@@ -1088,7 +1088,7 @@ environments:
|
|
|
1088
1088
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zlib-ng-2.3.3-h0261ad2_1.conda
|
|
1089
1089
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_7.conda
|
|
1090
1090
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
1091
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
1091
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
1092
1092
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
1093
1093
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
1094
1094
|
docs:
|
|
@@ -1229,7 +1229,7 @@ environments:
|
|
|
1229
1229
|
- conda: https://conda.anaconda.org/conda-forge/noarch/xyzservices-2026.9.1-pyhd8ed1ab_0.conda
|
|
1230
1230
|
- conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda
|
|
1231
1231
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
1232
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
1232
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
1233
1233
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
1234
1234
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
1235
1235
|
osx-64:
|
|
@@ -1363,7 +1363,7 @@ environments:
|
|
|
1363
1363
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zlib-ng-2.3.3-h646e873_1.conda
|
|
1364
1364
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-hbc1a06c_7.conda
|
|
1365
1365
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
1366
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
1366
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
1367
1367
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
1368
1368
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
1369
1369
|
osx-arm64:
|
|
@@ -1497,7 +1497,7 @@ environments:
|
|
|
1497
1497
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zlib-ng-2.3.3-h31dac16_1.conda
|
|
1498
1498
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hf451053_7.conda
|
|
1499
1499
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
1500
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
1500
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
1501
1501
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
1502
1502
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
1503
1503
|
win-64:
|
|
@@ -1624,7 +1624,7 @@ environments:
|
|
|
1624
1624
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zlib-ng-2.3.3-h0261ad2_1.conda
|
|
1625
1625
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_7.conda
|
|
1626
1626
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
1627
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
1627
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
1628
1628
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
1629
1629
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
1630
1630
|
lint:
|
|
@@ -1685,7 +1685,7 @@ environments:
|
|
|
1685
1685
|
- conda: https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.5.1-pyhd8ed1ab_0.conda
|
|
1686
1686
|
- conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.4.3-pyhcf101f3_0.conda
|
|
1687
1687
|
- conda: https://conda.anaconda.org/conda-forge/noarch/docformatter-1.7.8-pyhc364b38_0.conda
|
|
1688
|
-
- conda: https://conda.anaconda.org/conda-forge/noarch/filelock-4.0.
|
|
1688
|
+
- conda: https://conda.anaconda.org/conda-forge/noarch/filelock-4.0.6-pyhd8ed1ab_0.conda
|
|
1689
1689
|
- conda: https://conda.anaconda.org/conda-forge/noarch/identify-2.6.20-pyhd8ed1ab_0.conda
|
|
1690
1690
|
- conda: https://conda.anaconda.org/conda-forge/noarch/insert-license-header-1.3.0-pyhd8ed1ab_1.conda
|
|
1691
1691
|
- conda: https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.10.0-pyhd8ed1ab_0.conda
|
|
@@ -1706,7 +1706,7 @@ environments:
|
|
|
1706
1706
|
- conda: https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.5.1-pyhd8ed1ab_0.conda
|
|
1707
1707
|
- conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.4.3-pyhcf101f3_0.conda
|
|
1708
1708
|
- conda: https://conda.anaconda.org/conda-forge/noarch/docformatter-1.7.8-pyhc364b38_0.conda
|
|
1709
|
-
- conda: https://conda.anaconda.org/conda-forge/noarch/filelock-4.0.
|
|
1709
|
+
- conda: https://conda.anaconda.org/conda-forge/noarch/filelock-4.0.6-pyhd8ed1ab_0.conda
|
|
1710
1710
|
- conda: https://conda.anaconda.org/conda-forge/noarch/identify-2.6.20-pyhd8ed1ab_0.conda
|
|
1711
1711
|
- conda: https://conda.anaconda.org/conda-forge/noarch/insert-license-header-1.3.0-pyhd8ed1ab_1.conda
|
|
1712
1712
|
- conda: https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.10.0-pyhd8ed1ab_0.conda
|
|
@@ -1772,7 +1772,7 @@ environments:
|
|
|
1772
1772
|
- conda: https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.5.1-pyhd8ed1ab_0.conda
|
|
1773
1773
|
- conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.4.3-pyhcf101f3_0.conda
|
|
1774
1774
|
- conda: https://conda.anaconda.org/conda-forge/noarch/docformatter-1.7.8-pyhc364b38_0.conda
|
|
1775
|
-
- conda: https://conda.anaconda.org/conda-forge/noarch/filelock-4.0.
|
|
1775
|
+
- conda: https://conda.anaconda.org/conda-forge/noarch/filelock-4.0.6-pyhd8ed1ab_0.conda
|
|
1776
1776
|
- conda: https://conda.anaconda.org/conda-forge/noarch/identify-2.6.20-pyhd8ed1ab_0.conda
|
|
1777
1777
|
- conda: https://conda.anaconda.org/conda-forge/noarch/insert-license-header-1.3.0-pyhd8ed1ab_1.conda
|
|
1778
1778
|
- conda: https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.10.0-pyhd8ed1ab_0.conda
|
|
@@ -1838,7 +1838,7 @@ environments:
|
|
|
1838
1838
|
- conda: https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.5.1-pyhd8ed1ab_0.conda
|
|
1839
1839
|
- conda: https://conda.anaconda.org/conda-forge/noarch/distlib-0.4.3-pyhcf101f3_0.conda
|
|
1840
1840
|
- conda: https://conda.anaconda.org/conda-forge/noarch/docformatter-1.7.8-pyhc364b38_0.conda
|
|
1841
|
-
- conda: https://conda.anaconda.org/conda-forge/noarch/filelock-4.0.
|
|
1841
|
+
- conda: https://conda.anaconda.org/conda-forge/noarch/filelock-4.0.6-pyhd8ed1ab_0.conda
|
|
1842
1842
|
- conda: https://conda.anaconda.org/conda-forge/noarch/identify-2.6.20-pyhd8ed1ab_0.conda
|
|
1843
1843
|
- conda: https://conda.anaconda.org/conda-forge/noarch/insert-license-header-1.3.0-pyhd8ed1ab_1.conda
|
|
1844
1844
|
- conda: https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.10.0-pyhd8ed1ab_0.conda
|
|
@@ -2034,7 +2034,7 @@ environments:
|
|
|
2034
2034
|
- conda: https://conda.anaconda.org/conda-forge/noarch/xyzservices-2026.9.1-pyhd8ed1ab_0.conda
|
|
2035
2035
|
- conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda
|
|
2036
2036
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.9.4-py_0.conda
|
|
2037
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
2037
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
2038
2038
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0a0-py_0.conda
|
|
2039
2039
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
2040
2040
|
osx-64:
|
|
@@ -2167,7 +2167,7 @@ environments:
|
|
|
2167
2167
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zstandard-0.25.0-py310hb5cd75e_3.conda
|
|
2168
2168
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-hbc1a06c_7.conda
|
|
2169
2169
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.9.4-py_0.conda
|
|
2170
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
2170
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
2171
2171
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0a0-py_0.conda
|
|
2172
2172
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
2173
2173
|
osx-arm64:
|
|
@@ -2300,7 +2300,7 @@ environments:
|
|
|
2300
2300
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstandard-0.25.0-py310hbbcf1ca_3.conda
|
|
2301
2301
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hf451053_7.conda
|
|
2302
2302
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.9.4-py_0.conda
|
|
2303
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
2303
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
2304
2304
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0a0-py_0.conda
|
|
2305
2305
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
2306
2306
|
win-64:
|
|
@@ -2430,7 +2430,7 @@ environments:
|
|
|
2430
2430
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zlib-ng-2.3.3-h0261ad2_1.conda
|
|
2431
2431
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_7.conda
|
|
2432
2432
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.9.4-py_0.conda
|
|
2433
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
2433
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
2434
2434
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0a0-py_0.conda
|
|
2435
2435
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
2436
2436
|
py311:
|
|
@@ -2570,7 +2570,7 @@ environments:
|
|
|
2570
2570
|
- conda: https://conda.anaconda.org/conda-forge/noarch/xyzservices-2026.9.1-pyhd8ed1ab_0.conda
|
|
2571
2571
|
- conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda
|
|
2572
2572
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.9.4-py_0.conda
|
|
2573
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
2573
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
2574
2574
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
2575
2575
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
2576
2576
|
osx-64:
|
|
@@ -2701,7 +2701,7 @@ environments:
|
|
|
2701
2701
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zlib-ng-2.3.3-h646e873_1.conda
|
|
2702
2702
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-hbc1a06c_7.conda
|
|
2703
2703
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.9.4-py_0.conda
|
|
2704
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
2704
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
2705
2705
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
2706
2706
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
2707
2707
|
osx-arm64:
|
|
@@ -2832,7 +2832,7 @@ environments:
|
|
|
2832
2832
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zlib-ng-2.3.3-h31dac16_1.conda
|
|
2833
2833
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hf451053_7.conda
|
|
2834
2834
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.9.4-py_0.conda
|
|
2835
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
2835
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
2836
2836
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
2837
2837
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
2838
2838
|
win-64:
|
|
@@ -2956,7 +2956,7 @@ environments:
|
|
|
2956
2956
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zlib-ng-2.3.3-h0261ad2_1.conda
|
|
2957
2957
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_7.conda
|
|
2958
2958
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.9.4-py_0.conda
|
|
2959
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
2959
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
2960
2960
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
2961
2961
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
2962
2962
|
py312:
|
|
@@ -3096,7 +3096,7 @@ environments:
|
|
|
3096
3096
|
- conda: https://conda.anaconda.org/conda-forge/noarch/xyzservices-2026.9.1-pyhd8ed1ab_0.conda
|
|
3097
3097
|
- conda: https://conda.anaconda.org/conda-forge/noarch/zipp-4.1.0-pyhcf101f3_0.conda
|
|
3098
3098
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
3099
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
3099
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
3100
3100
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
3101
3101
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
3102
3102
|
osx-64:
|
|
@@ -3227,7 +3227,7 @@ environments:
|
|
|
3227
3227
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zlib-ng-2.3.3-h646e873_1.conda
|
|
3228
3228
|
- conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-hbc1a06c_7.conda
|
|
3229
3229
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
3230
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
3230
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
3231
3231
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
3232
3232
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
3233
3233
|
osx-arm64:
|
|
@@ -3358,7 +3358,7 @@ environments:
|
|
|
3358
3358
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zlib-ng-2.3.3-h31dac16_1.conda
|
|
3359
3359
|
- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hf451053_7.conda
|
|
3360
3360
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
3361
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
3361
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
3362
3362
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
3363
3363
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
3364
3364
|
win-64:
|
|
@@ -3482,7 +3482,7 @@ environments:
|
|
|
3482
3482
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zlib-ng-2.3.3-h0261ad2_1.conda
|
|
3483
3483
|
- conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_7.conda
|
|
3484
3484
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
3485
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
3485
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
3486
3486
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
3487
3487
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
3488
3488
|
test-ui:
|
|
@@ -3632,7 +3632,7 @@ environments:
|
|
|
3632
3632
|
- conda: https://conda.anaconda.org/microsoft/linux-64/playwright-1.47.0-py312_0.tar.bz2
|
|
3633
3633
|
- conda: https://conda.anaconda.org/microsoft/noarch/pytest-playwright-0.8.0-pyhe2000d9_0.conda
|
|
3634
3634
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
3635
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
3635
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
3636
3636
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
3637
3637
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
3638
3638
|
osx-64:
|
|
@@ -3770,7 +3770,7 @@ environments:
|
|
|
3770
3770
|
- conda: https://conda.anaconda.org/microsoft/noarch/pytest-playwright-0.8.0-pyhe2000d9_0.conda
|
|
3771
3771
|
- conda: https://conda.anaconda.org/microsoft/osx-64/playwright-1.47.0-py312_0.tar.bz2
|
|
3772
3772
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
3773
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
3773
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
3774
3774
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
3775
3775
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
3776
3776
|
osx-arm64:
|
|
@@ -3908,7 +3908,7 @@ environments:
|
|
|
3908
3908
|
- conda: https://conda.anaconda.org/microsoft/noarch/pytest-playwright-0.8.0-pyhe2000d9_0.conda
|
|
3909
3909
|
- conda: https://conda.anaconda.org/microsoft/osx-arm64/playwright-1.47.0-py312_0.tar.bz2
|
|
3910
3910
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
3911
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
3911
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
3912
3912
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
3913
3913
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
3914
3914
|
win-64:
|
|
@@ -4039,7 +4039,7 @@ environments:
|
|
|
4039
4039
|
- conda: https://conda.anaconda.org/microsoft/noarch/pytest-playwright-0.8.0-pyhe2000d9_0.conda
|
|
4040
4040
|
- conda: https://conda.anaconda.org/microsoft/win-64/playwright-1.47.0-py312_0.tar.bz2
|
|
4041
4041
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-1.10.0b1-py_0.conda
|
|
4042
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
4042
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
4043
4043
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0b2-py_0.conda
|
|
4044
4044
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/pyviz_comms-3.0.6-pyhd8ed1ab_0.conda
|
|
4045
4045
|
packages:
|
|
@@ -6643,16 +6643,16 @@ packages:
|
|
|
6643
6643
|
run_exports: {}
|
|
6644
6644
|
size: 39499
|
|
6645
6645
|
timestamp: 1762974150770
|
|
6646
|
-
- conda: https://conda.anaconda.org/conda-forge/noarch/filelock-4.0.
|
|
6647
|
-
sha256:
|
|
6648
|
-
md5:
|
|
6646
|
+
- conda: https://conda.anaconda.org/conda-forge/noarch/filelock-4.0.6-pyhd8ed1ab_0.conda
|
|
6647
|
+
sha256: 96dad736319581923d190e64931a19e24a7ee81ee04c0ffaf6f517e82080fef2
|
|
6648
|
+
md5: 2a68742ffb325d6b25dcb3effff4234c
|
|
6649
6649
|
depends:
|
|
6650
6650
|
- python >=3.11
|
|
6651
6651
|
license: MIT
|
|
6652
6652
|
license_family: MIT
|
|
6653
6653
|
run_exports: {}
|
|
6654
|
-
size:
|
|
6655
|
-
timestamp:
|
|
6654
|
+
size: 84506
|
|
6655
|
+
timestamp: 1790655312213
|
|
6656
6656
|
- conda: https://conda.anaconda.org/conda-forge/noarch/ghp-import-2.1.0-pyhd8ed1ab_2.conda
|
|
6657
6657
|
sha256: 40fdf5a9d5cc7a3503cd0c33e1b90b1e6eab251aaaa74e6b965417d089809a15
|
|
6658
6658
|
md5: 93f742fe078a7b34c29a182958d4d765
|
|
@@ -7293,6 +7293,7 @@ packages:
|
|
|
7293
7293
|
- python >=3.11
|
|
7294
7294
|
- python
|
|
7295
7295
|
license: MIT
|
|
7296
|
+
license_family: MIT
|
|
7296
7297
|
run_exports: {}
|
|
7297
7298
|
size: 34083
|
|
7298
7299
|
timestamp: 1790601106656
|
|
@@ -14391,17 +14392,17 @@ packages:
|
|
|
14391
14392
|
license: BSD
|
|
14392
14393
|
size: 23135124
|
|
14393
14394
|
timestamp: 1786969827601
|
|
14394
|
-
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.
|
|
14395
|
-
sha256:
|
|
14396
|
-
md5:
|
|
14395
|
+
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/panel-material-ui-0.16.0-py_0.conda
|
|
14396
|
+
sha256: df33a0d92117414d9f07ffbf5a394769f124fc8b6d991c0285849398fbe63a62
|
|
14397
|
+
md5: 6e2823b4c222d85242e135476d8ef0de
|
|
14397
14398
|
depends:
|
|
14398
14399
|
- bokeh >=3.8.0
|
|
14399
14400
|
- packaging
|
|
14400
14401
|
- panel >=1.9.0
|
|
14401
14402
|
- python >=3.10
|
|
14402
14403
|
license: BSD
|
|
14403
|
-
size:
|
|
14404
|
-
timestamp:
|
|
14404
|
+
size: 1608358
|
|
14405
|
+
timestamp: 1790678259647
|
|
14405
14406
|
- conda: https://conda.anaconda.org/pyviz/label/dev/noarch/param-2.5.0a0-py_0.conda
|
|
14406
14407
|
sha256: d75717f819ba034c65a997199a51b3f71dacff945b861bd00d79f0a5fef1f724
|
|
14407
14408
|
md5: 297852e8831ca8da22d62710970c0c7c
|
|
@@ -1584,6 +1584,17 @@ class ReactFlow(ReactComponent):
|
|
|
1584
1584
|
|
|
1585
1585
|
viewport = param.Dict(default=None, allow_None=True, doc="Optional persisted viewport state.")
|
|
1586
1586
|
|
|
1587
|
+
drop_types = param.List(
|
|
1588
|
+
default=[],
|
|
1589
|
+
item_type=str,
|
|
1590
|
+
doc="""
|
|
1591
|
+
MIME types accepted when data is dropped onto the canvas, e.g. the
|
|
1592
|
+
``drag_type`` of a draggable ``panel_material_ui.MenuList``. Include
|
|
1593
|
+
``"Files"`` to accept files dragged in from the operating system.
|
|
1594
|
+
Each accepted drop emits a ``"drop"`` event; drops of other types are
|
|
1595
|
+
ignored, as are all drops while ``editable`` is False.""",
|
|
1596
|
+
)
|
|
1597
|
+
|
|
1587
1598
|
popup_trigger = param.ObjectSelector(
|
|
1588
1599
|
default="click",
|
|
1589
1600
|
objects=["click", "hover", "none"],
|
|
@@ -2458,6 +2469,17 @@ class ReactFlow(ReactComponent):
|
|
|
2458
2469
|
match msg.get("type"):
|
|
2459
2470
|
case "connection_validation_requested":
|
|
2460
2471
|
self._validate_connection_request(msg)
|
|
2472
|
+
case "drop":
|
|
2473
|
+
self._emit(
|
|
2474
|
+
"drop",
|
|
2475
|
+
{
|
|
2476
|
+
"type": "drop",
|
|
2477
|
+
"drop_type": msg.get("drop_type"),
|
|
2478
|
+
"data": msg.get("data"),
|
|
2479
|
+
"position": msg.get("position"),
|
|
2480
|
+
"target": msg.get("target"),
|
|
2481
|
+
},
|
|
2482
|
+
)
|
|
2461
2483
|
case "sync":
|
|
2462
2484
|
nodes = msg.get("nodes")
|
|
2463
2485
|
edges = msg.get("edges")
|
|
@@ -3508,6 +3530,15 @@ class ReactFlow(ReactComponent):
|
|
|
3508
3530
|
``style``, ``type``, ...) were modified
|
|
3509
3531
|
- ``"selection_changed"``: Selection changed
|
|
3510
3532
|
- ``"sync"``: Full graph sync from frontend
|
|
3533
|
+
- ``"drop"``: Data of one of the ``drop_types`` was dropped onto
|
|
3534
|
+
the canvas. Payload has the matched ``drop_type``, the dropped
|
|
3535
|
+
``data`` (parsed from JSON when possible, otherwise the raw
|
|
3536
|
+
string; for ``"Files"`` a list of ``{"name", "type", "size",
|
|
3537
|
+
"content"}`` with each file read as text), the drop
|
|
3538
|
+
``position`` in flow coordinates, and a
|
|
3539
|
+
``target`` of ``{"node_id", "handle_id", "direction"}`` when
|
|
3540
|
+
dropped on a node or handle (``handle_id`` and ``direction``
|
|
3541
|
+
are ``None`` for a node), else ``None``.
|
|
3511
3542
|
- ``"client_error"``: The graph view hit a rendering error in the
|
|
3512
3543
|
browser. The payload carries ``source``, ``message``, ``stack``,
|
|
3513
3544
|
``component_stack``, ``attempt`` and ``mode``, or for
|