Events and public types¶
On this page¶
Custom Event¶
st_graph_workbench.component.events.Event ¶
Define a custom Cytoscape event listener returned to Python.
Create a listener definition.
Parameters:
-
name(str) –Application-specific action name included in the returned event.
-
event_type(str) –Space-separated Cytoscape event names, for example
"click tap". -
selector(str) –Cytoscape selector that scopes the listener, for example
"node".
Examples:
Source code in st_graph_workbench/component/events.py
dump ¶
Return the listener as a JSON-ready component dictionary.
GraphEvent¶
st_graph_workbench.component.types.GraphEvent
module-attribute
¶
An event dictionary returned from the browser component.
ProgressiveLoadConfig¶
st_graph_workbench.component.types.ProgressiveLoadConfig ¶
Bases: TypedDict
Configuration for requesting incremental graph batches.
page_size is the requested number of domain records in the next batch.
loaded_count and total_count drive the progress shown in the graph.
cursor is an opaque JSON scalar returned unchanged in the next
load_more event. Set has_more to false when no further batch exists.
acknowledged_request_id echoes the completed event's request_id,
including after a handled fetch failure, to enable another request without
changing the cursor or counts. Omit it for legacy progress-driven completion.
ConnectedDragConfig¶
st_graph_workbench.component.types.ConnectedDragConfig ¶
Bases: TypedDict
Configuration for rigidly dragging visible connected nodes.
enabled and depth are initial browser preferences. max_depth
bounds the toolbar choices to one, two, or three visible hops, while
max_nodes limits automatic followers for one gesture. Explicitly
selected and compound-descendant nodes retain Cytoscape's native behavior.
ToolbarConfig¶
st_graph_workbench.component.types.ToolbarConfig ¶
Bases: TypedDict
Configuration for the responsive controls above the graph.
mode chooses adaptive, expanded, compact, or initially minimized
presentation. position currently supports the top of the graph.
collapsible lets the reader minimize and restore the controls, while
sticky reserves their measured height so they never cover the canvas.
Action type aliases¶
st_graph_workbench.component.component.AnalysisAction
module-attribute
¶
Browser-side graph algorithms exposed by the analysis toolbox.
st_graph_workbench.component.component.CrudAction
module-attribute
¶
CrudAction = Literal['create_node', 'create_edge', 'read_selected', 'update_selected', 'delete_selected', 'request_node_data']
CRUD intents that the browser can return for Python handling.
st_graph_workbench.component.component.EditAction
module-attribute
¶
EditAction = Literal['add_node', 'connect_selected', 'delete_selected', 'lock_selected', 'unlock_selected', 'make_ungrabbable', 'make_grabbable', 'snap_to_grid', 'undo', 'redo']
Immediate browser-local graph editing actions.
st_graph_workbench.component.component.ElementsSync
module-attribute
¶
Full reconciliation or command-driven element synchronization.
st_graph_workbench.component.component.NodeAction
module-attribute
¶
NodeAction = Literal['remove', 'expand', 'show_neighbors', 'show_incoming', 'show_outgoing', 'hide_unselected', 'restore_hidden']
Node context/toolbox actions supported by graph_workbench.
st_graph_workbench.component.component.PerformanceProfile
module-attribute
¶
Rendering profiles that tune graph behavior for different scales.
st_graph_workbench.component.component.SelectionMode
module-attribute
¶
Supported Cytoscape selection interaction modes.
st_graph_workbench.component.component.ViewportAction
module-attribute
¶
ViewportAction = Literal['toggle_zoom', 'toggle_pan', 'save_viewport', 'restore_viewport', 'reset_viewport']
Interactive viewport actions exposed by the graph toolbox.