feat(xref): detach, unload, reload, bind, overlay, and path operations

Detach, unload, reload preserving host layer overrides, bind, overlay, and saved-path editing, with per-tab session state and a read-only web list.
This commit is contained in:
Karim Jerbi committed 2026-09-15 23:56:31 +01:00
1 parent 42219a4b8c
commit d0d946a568
16 files changed
+4856 -499

No files matched your search

+73
View File
@@ -3151,6 +3151,79 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
"XREF Reloaded \"{}\"" => Some(("insert", "xref-reloaded")),
"XREF Save the drawing first to resolve relative XREF paths." => Some(("insert", "xref-save-the-drawing-first-to-resolve-relativ")),
"XREF Unloaded (skipped): \"{}\"" => Some(("common", "xref-unloaded-skipped")),
"XREF: '{}' ships with reference operations (Task 8/9)." => Some(("insert", "xref-ships-with-reference-operations")),
"XREF: \"{}\" set to Overlay." => Some(("insert", "xref-set-to-overlay")),
"XREF: bound \"{}\"." => Some(("insert", "xref-bound")),
"XREF: bound \"{}\" with {} unremapped style handles (see bind limitations)." => Some(("insert", "xref-bound-with-unremapped-handles")),
"XREF: cannot bind nested reference '{}'. Bind it in its host drawing." => Some(("insert", "xref-cannot-bind-nested-reference")),
"Unreferenced" => Some(("insert", "unreferenced")),
"XREF: cannot unload nested reference '{}'. Unload it in its host drawing." => Some(("insert", "xref-cannot-unload-nested-reference")),
"XREF: cannot overlay nested reference '{}'. Overlay it in its host drawing." => Some(("insert", "xref-cannot-overlay-nested-reference")),
"XREF: cannot reload nested reference '{}'. Reload it in its host drawing." => Some(("insert", "xref-cannot-reload-nested-reference")),
"XREF: cannot attach nested reference '{}'. Attach it in its host drawing." => Some(("insert", "xref-cannot-attach-nested-reference")),
"XREF: cannot set path type for nested reference '{}'. Set it in its host drawing." => Some(("insert", "xref-cannot-set-path-type-nested-reference")),
"{}: reload applies to drawing references only." => Some(("insert", "reload-applies-to-drawing-references-only")),
"XREF: \"{}\" set to Attach." => Some(("insert", "xref-set-to-attach")),
"Reference Manager" => Some(("insert", "xref-manager-title")),
"XATTACH: cannot attach the host drawing into itself." => Some(("insert", "xref-self-attach-blocked")),
"XREF: cannot bind \"{}\": {}." => Some(("insert", "xref-cannot-bind")),
"XREF: cannot detach nested reference '{}'. Detach it in its host drawing." => Some(("insert", "xref-cannot-detach-nested-reference")),
"XREF: PDF bind (vector import) is not available in this version." => Some(("insert", "xref-pdf-bind-unavailable")),
"XREF: cannot make path relative across drives." => Some(("insert", "xref-cannot-make-path-relative")),
"XREF: detached \"{}\"." => Some(("insert", "xref-detached")),
"XREF: no loaded reference with that key." => Some(("insert", "xref-no-loaded-reference-with-that-key")),
"XREF: no references match '{}'." => Some(("insert", "xref-no-references-match")),
"XREF: overlays apply to drawing references only." => Some(("insert", "xref-overlays-drawing-references-only")),
"XREF: Path set for \"{}\" — Reload to apply." => Some(("insert", "xref-path-set-for")),
"XREF: unloaded \"{}\"." => Some(("insert", "xref-unloaded")),
"XREF: unknown option '{}'. Options: ? Reload Unload Detach Path Pathtype Bind Overlay Attach" => Some(("insert", "xref-unknown-option")),
"XREF: updated {} reference(s)." => Some(("insert", "xref-updated-references")),
"XREF Recovered with warnings: \"{}\"" => Some(("file", "xref-recovered-with-warnings")),
"XREF Recovery failed: \"{}\" ({})" => Some(("file", "xref-recovery-failed")),
"XREF Reload failed: \"{}\" ({})" => Some(("insert", "xref-reload-failed")),
"XREF Reloaded with repairs: \"{}\"" => Some(("insert", "xref-reloaded-with-repairs")),
"Usage: XREF Path <pattern> <new path>" => Some(("insert", "usage-xref-path-pattern")),
"Usage: XREF Path Find <old> <new>" => Some(("insert", "usage-xref-path-find")),
"Usage: XREF Pathtype <Full|Relative|None> [pattern]" => Some(("insert", "usage-xref-pathtype")),
"{} reference(s) not found — open the reference manager with EXTERNALREFERENCES." => Some(("insert", "xref-missing-open-xrefman")),
" (nested — not rendered)" => Some(("insert", "xref-nested-not-rendered")),
"Change Path:" => Some(("insert", "change-path")),
"Date" => Some(("insert", "date")),
"Details" => Some(("insert", "details")),
"Detach" => Some(("insert", "xref-detach")),
"Failed" => Some(("insert", "failed")),
"File attach is not available on web — the reference list below is read-only." => Some(("insert", "xref-file-attach-is-not-available-on-web")),
"File name" => Some(("insert", "xref-file-name")),
"Found At" => Some(("insert", "found-at")),
"Help" => Some(("insert", "xref-help")),
"Image" => Some(("insert", "image")),
"Nested references are read-only — edit them in their host drawing." => Some(("insert", "xref-nested-references-are-read-only")),
"Not found" => Some(("insert", "not-found")),
"Orphaned" => Some(("insert", "orphaned")),
"Overlay" => Some(("insert", "xref-overlay")),
"Path:" => Some(("insert", "path")),
"PDF" => Some(("insert", "pdf")),
"Reference Manager — select rows, then Detach, Unload, Reload, Overlay, or a Change Path mode." => Some(("insert", "xref-reference-manager-select-rows")),
"Reference Manager — select rows, then Detach, Unload, Reload, Bind, Overlay, or a Change Path mode." => Some(("insert", "xref-reference-manager-select-rows-bind")),
"Bind" => Some(("insert", "xref-bind")),
"Refresh" => Some(("insert", "xref-refresh")),
"Relative" => Some(("insert", "relative")),
"Reload" => Some(("insert", "xref-reload")),
"Replace:" => Some(("insert", "xref-replace")),
"Saved Path" => Some(("insert", "saved-path")),
"Select a reference first." => Some(("insert", "xref-select-a-reference-first")),
"Select a reference to inspect its details" => Some(("insert", "xref-select-a-reference-to-inspect-its")),
"Set Path" => Some(("insert", "xref-set-path")),
"Stale" => Some(("insert", "stale")),
"Toggle list/tree" => Some(("insert", "toggle-list-tree")),
"Tree" => Some(("insert", "tree")),
"Type a new path first." => Some(("insert", "xref-type-a-new-path-first")),
"Type the path prefix to find first." => Some(("insert", "xref-type-the-path-prefix-to-find-first")),
"Unload" => Some(("insert", "xref-unload")),
"Unloaded" => Some(("insert", "unloaded")),
"new path for selection" => Some(("insert", "xref-new-path-for-selection")),
"new path prefix" => Some(("insert", "xref-new-path-prefix")),
"old path prefix" => Some(("insert", "xref-old-path-prefix")),
"Y (mm)" => Some(("plot", "y-mm")),
"Yards" => Some(("common", "yards")),
"Yellow" => Some(("common", "yellow")),