task(A3): pilot v2 tools select+line
This commit is contained in:
@@ -25,6 +25,10 @@ export interface DispatcherDeps {
|
||||
setPreview?(el: unknown | null): void;
|
||||
/** Tool-Nachschlag überschreibbar (Default: aktive Registry-Tools). */
|
||||
toolLookup?(toolId: string): ToolExtensionV2 | undefined;
|
||||
/** Dokument-Fassade für Tools (ab A3; lazy pro Event abgefragt). */
|
||||
getDoc?(): import('../kernel/document/CADDocument').CADDocument | undefined;
|
||||
/** Selektions-Bridge für Tools (ab A3; lazy pro Event abgefragt). */
|
||||
getSelectionBridge?(): import('../plugins/types').ToolSelectionBridge;
|
||||
}
|
||||
|
||||
export class InteractionDispatcher {
|
||||
@@ -91,12 +95,14 @@ export class InteractionDispatcher {
|
||||
this.bound = true;
|
||||
}
|
||||
|
||||
private buildContext(): ToolContext {
|
||||
private buildContext(): import('../plugins/types').FullToolContext {
|
||||
const toolId = this.active?.manifest.id ?? '';
|
||||
return {
|
||||
options: this.deps.getOptions?.(toolId) ?? {},
|
||||
setStatus: (msg) => this.setStatus(msg),
|
||||
setPreview: (el) => this.deps.setPreview?.(el),
|
||||
doc: this.deps.getDoc?.(),
|
||||
selection: this.deps.getSelectionBridge?.(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user