yasmin_editor.editor_gui.clipboard_logic module

Qt-free shelf workflow helpers.

The shelf feature combines several editor concerns: container-kind matching, cross-container link preservation, status text, and split-view labelling. This module keeps those rules out of the Qt mixin so the behaviour can be covered by direct tests.

yasmin_editor.editor_gui.clipboard_logic.clipboard_kind_label(kind: str) str

Return the user-facing shelf container label.

yasmin_editor.editor_gui.clipboard_logic.clipboard_operation_status(action: str, *, performed: bool) str | None

Return the status-bar text for one shelf workflow.

None means the operation did not complete and should stay silent.

Return the link categories that cannot survive one paste.

Moving data between a state machine and a concurrence is allowed, but only data that both container kinds can represent should survive unchanged.

yasmin_editor.editor_gui.clipboard_logic.cross_container_paste_warning(source_kind: str, target_kind: str, *, has_transitions: bool, has_outcome_rules: bool) str | None

Return the cross-container warning text or None.

The editor only needs to warn when the paste changes container kind and the selected bundle carries links that the target container cannot encode.

yasmin_editor.editor_gui.clipboard_logic.replacement_clipboard_message(required_kind: str) str

Return the warning shown before replacing shelf contents.