@jax-data-science/sci-image-visualizer 0.4.0 → 0.6.0

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.
Files changed (32) hide show
  1. package/README.md +109 -0
  2. package/esm2022/index.mjs +2 -1
  3. package/esm2022/lib/contracts/display-types.mjs +1 -1
  4. package/esm2022/lib/contracts/plot-type-contribution.contract.mjs +66 -0
  5. package/esm2022/lib/contracts/plot-type.mjs +6 -1
  6. package/esm2022/lib/contracts/toolbar-tool.contract.mjs +46 -4
  7. package/esm2022/lib/contracts/visualizer.contract.mjs +1 -1
  8. package/esm2022/lib/implementations/napari-js/napari-visualizer.service.mjs +2 -3
  9. package/esm2022/lib/implementations/osd/openseadragon-visualizer.service.mjs +70 -7
  10. package/esm2022/lib/implementations/osd/osd-coordinate-transform.mjs +8 -1
  11. package/esm2022/lib/implementations/plotly/plotly.service.mjs +2 -3
  12. package/esm2022/lib/plot-mode/plot-mode-controller.mjs +329 -0
  13. package/esm2022/lib/routing-visualizer.service.mjs +6 -1
  14. package/esm2022/lib/toolbar/brush/brush-tool.service.mjs +44 -3
  15. package/esm2022/lib/toolbar/toolbar.component.mjs +50 -21
  16. package/esm2022/lib/visualizer.component.mjs +479 -43
  17. package/fesm2022/jax-data-science-sci-image-visualizer.mjs +1092 -75
  18. package/fesm2022/jax-data-science-sci-image-visualizer.mjs.map +1 -1
  19. package/index.d.ts +1 -0
  20. package/lib/contracts/display-types.d.ts +10 -0
  21. package/lib/contracts/plot-type-contribution.contract.d.ts +199 -0
  22. package/lib/contracts/plot-type.d.ts +10 -0
  23. package/lib/contracts/toolbar-tool.contract.d.ts +84 -5
  24. package/lib/contracts/visualizer.contract.d.ts +5 -0
  25. package/lib/implementations/osd/openseadragon-visualizer.service.d.ts +21 -0
  26. package/lib/implementations/osd/osd-coordinate-transform.d.ts +6 -0
  27. package/lib/plot-mode/plot-mode-controller.d.ts +130 -0
  28. package/lib/routing-visualizer.service.d.ts +4 -0
  29. package/lib/toolbar/brush/brush-tool.service.d.ts +21 -0
  30. package/lib/toolbar/toolbar.component.d.ts +28 -8
  31. package/lib/visualizer.component.d.ts +121 -8
  32. package/package.json +1 -1
@@ -1,9 +1,10 @@
1
1
  import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { MenuItem } from 'primeng/api';
3
3
  import { IImageInfo } from '../contracts/image.contract';
4
- import { PlotType, PlotTypeDescriptor } from '../contracts/plot-type';
4
+ import { PlotType, PlotTypeId } from '../contracts/plot-type';
5
5
  import { ToolbarToolVisibility } from '../contracts/toolbar-config';
6
- import { ToolbarToolContribution } from '../contracts/toolbar-tool.contract';
6
+ import { ToolbarDialogToolContribution, ToolbarToolContribution } from '../contracts/toolbar-tool.contract';
7
+ import { PlotTypeOption } from '../contracts/plot-type-contribution.contract';
7
8
  import * as i0 from "@angular/core";
8
9
  /**
9
10
  * Presentational toolbar for the plotting viewport.
@@ -20,9 +21,18 @@ import * as i0 from "@angular/core";
20
21
  export declare class ToolbarComponent implements OnChanges {
21
22
  /** Current image (gates which control groups are shown). */
22
23
  imageInfo: IImageInfo | undefined;
23
- /** Plot types the active backend advertises. */
24
- plotTypeOptions: PlotTypeDescriptor[];
25
- selectedPlotType: PlotType;
24
+ /** Plot types the active backend advertises, then any contributed modes. */
25
+ plotTypeOptions: PlotTypeOption[];
26
+ /** The selector's value: a built-in type or a contributed mode's id. */
27
+ selectedPlotType: PlotTypeId;
28
+ /**
29
+ * The built-in type that renders {@link selectedPlotType} — its `baseType`
30
+ * for a contributed mode. Every tool/control decision below reads
31
+ * {@link effectivePlotType}, so a contributed mode gets exactly its base
32
+ * type's toolbar. When unbound, a built-in selection is its own base and
33
+ * anything else is treated as the default Image view.
34
+ */
35
+ basePlotType: PlotType | null;
26
36
  /** Isosurface band as a 0–255 slider position (mapped onto the volume's real
27
37
  * intensity range by the renderer). Defaults to the full range. */
28
38
  isoRange: number[];
@@ -80,9 +90,13 @@ export declare class ToolbarComponent implements OnChanges {
80
90
  * per-tool parameter state; this component only draws them.
81
91
  */
82
92
  contributedTools: ToolbarToolContribution[];
93
+ /** Dialog tools (TOOLBAR_TOOLS, kind: 'dialog'), sorted; shown in the Image view. */
94
+ dialogTools: ToolbarDialogToolContribution[];
95
+ /** Id of the dialog tool whose dialog is open, or null. */
96
+ openDialogToolId: string | null;
83
97
  /** Active checkpoint per contributed tool, keyed by tool id. */
84
98
  toolModelIds: Record<string, string>;
85
- selectPlotType: EventEmitter<PlotType>;
99
+ selectPlotType: EventEmitter<string>;
86
100
  /** Intensity (LINE) mode: add another colored line ROI + inset trace. */
87
101
  addProfileLine: EventEmitter<void>;
88
102
  /** Toggle image smoothing (bilinear) vs nearest-neighbour (crisp pixels). */
@@ -125,6 +139,8 @@ export declare class ToolbarComponent implements OnChanges {
125
139
  segmentCellpose: EventEmitter<void>;
126
140
  /** Run a contributed tool over the current view, by tool id. */
127
141
  runTool: EventEmitter<string>;
142
+ /** A dialog tool's button was clicked: open its dialog, or close it if open. */
143
+ toggleDialogTool: EventEmitter<string>;
128
144
  /** Pick a contributed tool's checkpoint. */
129
145
  toolModelChange: EventEmitter<{
130
146
  toolId: string;
@@ -195,7 +211,11 @@ export declare class ToolbarComponent implements OnChanges {
195
211
  get contributedToolNames(): string;
196
212
  /** Keeps each contributed tool's `p-menu` overlay alive across CD ticks —
197
213
  * re-creating it mid-interaction swallows the click on a menu item. */
198
- trackToolById(_index: number, tool: ToolbarToolContribution): string;
214
+ trackToolById(_index: number, tool: {
215
+ id: string;
216
+ }): string;
217
+ /** The built-in type whose tools and controls apply to the current selection. */
218
+ get effectivePlotType(): PlotType;
199
219
  /** The Image plot type renders as a natively pan/zoom-able raster, so the
200
220
  * generic zoom/pan tools are hidden. */
201
221
  get isImageView(): boolean;
@@ -230,5 +250,5 @@ export declare class ToolbarComponent implements OnChanges {
230
250
  get isIntensityCapable(): boolean;
231
251
  showHelp(): void;
232
252
  static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarComponent, never>;
233
- static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarComponent, "plotting-toolbar", never, { "imageInfo": { "alias": "imageInfo"; "required": false; }; "plotTypeOptions": { "alias": "plotTypeOptions"; "required": false; }; "selectedPlotType": { "alias": "selectedPlotType"; "required": false; }; "isoRange": { "alias": "isoRange"; "required": false; }; "maxIndex": { "alias": "maxIndex"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "isHeatmap": { "alias": "isHeatmap"; "required": false; }; "is3dRegions": { "alias": "is3dRegions"; "required": false; }; "activeDragMode": { "alias": "activeDragMode"; "required": false; }; "activeSurface3dMode": { "alias": "activeSurface3dMode"; "required": false; }; "axesVisible": { "alias": "axesVisible"; "required": false; }; "wireframeActive": { "alias": "wireframeActive"; "required": false; }; "resolutionScale": { "alias": "resolutionScale"; "required": false; }; "wandSensitivity": { "alias": "wandSensitivity"; "required": false; }; "brushSize": { "alias": "brushSize"; "required": false; }; "vertexEraserRadius": { "alias": "vertexEraserRadius"; "required": false; }; "canUndo": { "alias": "canUndo"; "required": false; }; "canRedo": { "alias": "canRedo"; "required": false; }; "stackOptions": { "alias": "stackOptions"; "required": false; }; "tools": { "alias": "tools"; "required": false; }; "imageSmoothingEnabled": { "alias": "imageSmoothingEnabled"; "required": false; }; "samModels": { "alias": "samModels"; "required": false; }; "samModelId": { "alias": "samModelId"; "required": false; }; "contributedTools": { "alias": "contributedTools"; "required": false; }; "toolModelIds": { "alias": "toolModelIds"; "required": false; }; }, { "selectPlotType": "selectPlotType"; "addProfileLine": "addProfileLine"; "toggleImageSmoothing": "toggleImageSmoothing"; "isoRangeChange": "isoRangeChange"; "openChannelHistogram": "openChannelHistogram"; "openSpatialControls": "openSpatialControls"; "openRegionEditor": "openRegionEditor"; "selectStackOption": "selectStackOption"; "zScrub": "zScrub"; "zSlide": "zSlide"; "zIndexInput": "zIndexInput"; "reloadAndPlot": "reloadAndPlot"; "downloadImage": "downloadImage"; "autoscaleImage": "autoscaleImage"; "toggleDragMode": "toggleDragMode"; "zoomIn": "zoomIn"; "zoomOut": "zoomOut"; "toggleSurface3dMode": "toggleSurface3dMode"; "resetSurfaceCamera": "resetSurfaceCamera"; "toggleAxes": "toggleAxes"; "toggleWireframe": "toggleWireframe"; "selectResolution": "selectResolution"; "deleteRegion": "deleteRegion"; "undoRegion": "undoRegion"; "redoRegion": "redoRegion"; "segmentRegions": "segmentRegions"; "segmentCellpose": "segmentCellpose"; "runTool": "runTool"; "toolModelChange": "toolModelChange"; "openToolParams": "openToolParams"; "samModelChange": "samModelChange"; "wandSensitivityChange": "wandSensitivityChange"; "brushSizeChange": "brushSizeChange"; "vertexEraserRadiusChange": "vertexEraserRadiusChange"; }, never, ["*"], false, never>;
253
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarComponent, "plotting-toolbar", never, { "imageInfo": { "alias": "imageInfo"; "required": false; }; "plotTypeOptions": { "alias": "plotTypeOptions"; "required": false; }; "selectedPlotType": { "alias": "selectedPlotType"; "required": false; }; "basePlotType": { "alias": "basePlotType"; "required": false; }; "isoRange": { "alias": "isoRange"; "required": false; }; "maxIndex": { "alias": "maxIndex"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "isHeatmap": { "alias": "isHeatmap"; "required": false; }; "is3dRegions": { "alias": "is3dRegions"; "required": false; }; "activeDragMode": { "alias": "activeDragMode"; "required": false; }; "activeSurface3dMode": { "alias": "activeSurface3dMode"; "required": false; }; "axesVisible": { "alias": "axesVisible"; "required": false; }; "wireframeActive": { "alias": "wireframeActive"; "required": false; }; "resolutionScale": { "alias": "resolutionScale"; "required": false; }; "wandSensitivity": { "alias": "wandSensitivity"; "required": false; }; "brushSize": { "alias": "brushSize"; "required": false; }; "vertexEraserRadius": { "alias": "vertexEraserRadius"; "required": false; }; "canUndo": { "alias": "canUndo"; "required": false; }; "canRedo": { "alias": "canRedo"; "required": false; }; "stackOptions": { "alias": "stackOptions"; "required": false; }; "tools": { "alias": "tools"; "required": false; }; "imageSmoothingEnabled": { "alias": "imageSmoothingEnabled"; "required": false; }; "samModels": { "alias": "samModels"; "required": false; }; "samModelId": { "alias": "samModelId"; "required": false; }; "contributedTools": { "alias": "contributedTools"; "required": false; }; "dialogTools": { "alias": "dialogTools"; "required": false; }; "openDialogToolId": { "alias": "openDialogToolId"; "required": false; }; "toolModelIds": { "alias": "toolModelIds"; "required": false; }; }, { "selectPlotType": "selectPlotType"; "addProfileLine": "addProfileLine"; "toggleImageSmoothing": "toggleImageSmoothing"; "isoRangeChange": "isoRangeChange"; "openChannelHistogram": "openChannelHistogram"; "openSpatialControls": "openSpatialControls"; "openRegionEditor": "openRegionEditor"; "selectStackOption": "selectStackOption"; "zScrub": "zScrub"; "zSlide": "zSlide"; "zIndexInput": "zIndexInput"; "reloadAndPlot": "reloadAndPlot"; "downloadImage": "downloadImage"; "autoscaleImage": "autoscaleImage"; "toggleDragMode": "toggleDragMode"; "zoomIn": "zoomIn"; "zoomOut": "zoomOut"; "toggleSurface3dMode": "toggleSurface3dMode"; "resetSurfaceCamera": "resetSurfaceCamera"; "toggleAxes": "toggleAxes"; "toggleWireframe": "toggleWireframe"; "selectResolution": "selectResolution"; "deleteRegion": "deleteRegion"; "undoRegion": "undoRegion"; "redoRegion": "redoRegion"; "segmentRegions": "segmentRegions"; "segmentCellpose": "segmentCellpose"; "runTool": "runTool"; "toggleDialogTool": "toggleDialogTool"; "toolModelChange": "toolModelChange"; "openToolParams": "openToolParams"; "samModelChange": "samModelChange"; "wandSensitivityChange": "wandSensitivityChange"; "brushSizeChange": "brushSizeChange"; "vertexEraserRadiusChange": "vertexEraserRadiusChange"; }, never, ["*"], false, never>;
234
254
  }
@@ -1,4 +1,4 @@
1
- import { ChangeDetectorRef, AfterViewInit, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
1
+ import { ChangeDetectorRef, AfterViewInit, ElementRef, EventEmitter, Injector, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges, Type } from '@angular/core';
2
2
  import { Subscription } from 'rxjs';
3
3
  import { MenuItem, MessageService, TreeNode } from 'primeng/api';
4
4
  import { ContextMenu } from 'primeng/contextmenu';
@@ -7,12 +7,14 @@ import { ImageStatePort } from './contracts/ports/image-state.port';
7
7
  import { Polygon } from './models/region';
8
8
  import { RegionOpsService } from './region-ops.service';
9
9
  import { VisualizerStore } from './store/visualizer-store.service';
10
- import { PlotType, PlotTypeDescriptor } from './contracts/plot-type';
10
+ import { PlotType, PlotTypeDescriptor, PlotTypeId } from './contracts/plot-type';
11
+ import { PlotTypeContribution, PlotTypeOption } from './contracts/plot-type-contribution.contract';
12
+ import { PlotModeController } from './plot-mode/plot-mode-controller';
11
13
  import { IVisualizer } from './contracts/visualizer.contract';
12
14
  import { SamToolService } from './toolbar/segmentation/sam-tool.service';
13
15
  import { SamPointToolService } from './toolbar/segmentation/sam-point-tool.service';
14
16
  import { CellSegmentToolService } from './toolbar/segmentation/cell-segment-tool.service';
15
- import { NumberParamSpec, SelectParamSpec, ToolParamSpec, ToolbarToolContribution } from './contracts/toolbar-tool.contract';
17
+ import { NumberParamSpec, SelectParamSpec, ToolParamSpec, ToolbarContribution, ToolbarDialogToolContribution, ToolbarToolContribution } from './contracts/toolbar-tool.contract';
16
18
  import { ToolbarToolVisibility } from './contracts/toolbar-config';
17
19
  import { VizConfig } from './contracts/viz-config';
18
20
  import { SpatialDataPort } from './contracts/ports/spatial-data.port';
@@ -30,6 +32,7 @@ export declare class VisualizerComponent implements OnInit, OnChanges, AfterView
30
32
  private regionOps;
31
33
  private vizConfig?;
32
34
  private spatialData?;
35
+ private injector?;
33
36
  /** Per-instance toast key. MessageService is a global singleton, so two live
34
37
  * `<visualizer>` instances (main viewer + pipeline-dialog preview) sharing
35
38
  * one key would each render the same message — a duplicate toast. A unique
@@ -118,6 +121,8 @@ export declare class VisualizerComponent implements OnInit, OnChanges, AfterView
118
121
  wandSensitivity: number;
119
122
  /** Brush diameter in image-pixel coordinates (drives the painted disc size). */
120
123
  brushSize: number;
124
+ /** Class the brush paints while a plot mode armed it (PlotModeTools.armBrush); null = plain brush. */
125
+ private brushClass;
121
126
  /** SAM model picker options + current selection (jit-ui#90 P1). Only models
122
127
  * with a hosted ONNX pair (configured via setSamModelUrls at app init) are
123
128
  * offered, so the picker can't select a model that can't run. */
@@ -133,6 +138,22 @@ export declare class VisualizerComponent implements OnInit, OnChanges, AfterView
133
138
  * and help dialog simply omit that group.
134
139
  */
135
140
  contributedTools: ToolbarToolContribution[];
141
+ /**
142
+ * Dialog tools registered through {@link TOOLBAR_TOOLS} (`kind: 'dialog'`),
143
+ * sorted. Their buttons sit with the host's own actions and show in the Image
144
+ * view only; each opens a floating dialog the tool fills.
145
+ */
146
+ dialogTools: ToolbarDialogToolContribution[];
147
+ /** The dialog tool the user has open (its session may be between renders). */
148
+ openDialogToolId: string | null;
149
+ /** The open dialog tool's live dialog, as the template renders it. */
150
+ toolDialog: {
151
+ title: string;
152
+ width: string;
153
+ host: HTMLElement;
154
+ } | null;
155
+ /** Dialog-tool sessions: the same lifecycle and isolation as contributed plot modes. */
156
+ private readonly toolDialogs;
136
157
  /** Active checkpoint per contributed tool. */
137
158
  toolModelIds: Record<string, string>;
138
159
  /**
@@ -204,9 +225,48 @@ export declare class VisualizerComponent implements OnInit, OnChanges, AfterView
204
225
  wireframeActive: boolean;
205
226
  /** napari 3D decimate factor (1 = Full … 8 = ⅛; default ½); changing it re-plots. */
206
227
  resolutionScale: number;
207
- /** Plot types the active backend advertises (3D gated by capability). */
228
+ /** The selector's entries: the built-in plot types the active backend
229
+ * advertises (3D gated by capability), then any contributed modes
230
+ * ({@link PLOT_TYPE_CONTRIBUTIONS}). */
231
+ plotTypeMenu: PlotTypeOption[];
232
+ /**
233
+ * The built-in plot types on offer — {@link plotTypeMenu} without contributed
234
+ * modes. Kept with its original type so existing readers are unaffected.
235
+ */
208
236
  plotTypeOptions: PlotTypeDescriptor[];
209
- selectedPlotType: PlotType;
237
+ /**
238
+ * What the selector shows: a built-in type or a contributed mode's id. Every
239
+ * rendering and tool decision goes through {@link basePlotType} instead, so a
240
+ * contributed mode behaves exactly like the built-in type it rides on.
241
+ */
242
+ selectedPlotTypeId: PlotTypeId;
243
+ /**
244
+ * The built-in plot type being rendered. With no contributed mode active this
245
+ * is the selection itself; during one it is the mode's `baseType`. Kept with its
246
+ * original `PlotType` type for existing readers — use {@link selectedPlotTypeId}
247
+ * for the selector's id. Assigning selects that built-in type.
248
+ */
249
+ get selectedPlotType(): PlotType;
250
+ set selectedPlotType(type: PlotType);
251
+ /** Contributed plot modes and their single live session. */
252
+ readonly plotModes: PlotModeController;
253
+ /**
254
+ * The live contributed mode's side panel, as the template renders it: an
255
+ * Angular component with its own injector, or a plain host element a `mount`
256
+ * panel rendered into. Null while no contributed session is live.
257
+ */
258
+ plotModePanel: {
259
+ title: string;
260
+ component: Type<unknown> | null;
261
+ injector: Injector | null;
262
+ host: HTMLElement | null;
263
+ } | null;
264
+ private destroying;
265
+ /** Where a `mount` panel's host element is attached once the dialog renders. */
266
+ set plotModePanelSlot(ref: ElementRef<HTMLElement> | undefined);
267
+ /** The built-in type actually rendered for {@link selectedPlotTypeId}: itself
268
+ * for a built-in type, `baseType` for a contributed mode. */
269
+ get basePlotType(): PlotType;
210
270
  /** Floating intensity-profile inset (LINE mode). */
211
271
  readonly intensityInsetDiv = "intensity-inset-plot";
212
272
  profilePanelPos: {
@@ -276,7 +336,7 @@ export declare class VisualizerComponent implements OnInit, OnChanges, AfterView
276
336
  private wheelListener?;
277
337
  /** Debounced z-slice scrubbing (see SliceScrubber — refactoring plan Step 7). */
278
338
  private readonly scrubber;
279
- constructor(state: ImageStatePort, plotService: IVisualizer, messageService: MessageService, ngZone: NgZone, cdr: ChangeDetectorRef, session: VisualizerStore, samTool: SamToolService, cellSegmentTool: CellSegmentToolService, samPointTool: SamPointToolService, regionOps: RegionOpsService, vizConfig?: VizConfig | undefined, toolContributions?: readonly ToolbarToolContribution[], spatialData?: SpatialDataPort | undefined);
339
+ constructor(state: ImageStatePort, plotService: IVisualizer, messageService: MessageService, ngZone: NgZone, cdr: ChangeDetectorRef, session: VisualizerStore, samTool: SamToolService, cellSegmentTool: CellSegmentToolService, samPointTool: SamPointToolService, regionOps: RegionOpsService, vizConfig?: VizConfig | undefined, toolContributions?: readonly ToolbarContribution[], spatialData?: SpatialDataPort | undefined, plotTypeContributions?: readonly PlotTypeContribution[], injector?: Injector | undefined);
280
340
  /**
281
341
  * Plot types offered in the selector for the current image:
282
342
  * - Outside **test mode**, only the curated default set (descriptors with a
@@ -412,6 +472,8 @@ export declare class VisualizerComponent implements OnInit, OnChanges, AfterView
412
472
  onToggleImageSmoothing(): void;
413
473
  resetAxes(): void;
414
474
  toggleDragMode(mode: string): void;
475
+ /** Arm `mode` (or nothing) across every tool, keeping the toolbar in step. */
476
+ private applyDragMode;
415
477
  /** Region draw/select/edit modes routed through the region overlay. The
416
478
  * The vertex tools (drawpolygon/addpoint/deletepoint/move) are
417
479
  * handled by the OpenSeadragon overlay; Plotly's overlay maps them to no-op. */
@@ -544,9 +606,60 @@ export declare class VisualizerComponent implements OnInit, OnChanges, AfterView
544
606
  * the toolbar/context-menu logic relies on, deactivates 2D-only tools when
545
607
  * moving to a 3D type, then re-plots.
546
608
  */
547
- onSelectPlotType(type: PlotType): void;
609
+ onSelectPlotType(selected: PlotTypeId): void;
610
+ /**
611
+ * Start the selected contributed mode's session, once its base view has
612
+ * plotted. No-op for a built-in type, or when the base on screen is not the
613
+ * one the mode rides on. A backend that cannot provide a viewport for it
614
+ * (e.g. OSD fell back to Plotly) counts as a failed activation.
615
+ */
616
+ private activateSelectedPlotMode;
617
+ /** Render the live mode's panel. Activation can resolve outside Angular (an
618
+ * OSD callback, a contribution's own promise), hence the zone re-entry. */
619
+ private showPlotModePanel;
620
+ /** Drop the panel (destroying a component panel) before the session ends. */
621
+ private hidePlotModePanel;
622
+ /**
623
+ * A contributed mode could not start. Its base type is already on screen —
624
+ * the base plotted first — so just select it: nothing needs to re-plot.
625
+ */
626
+ private fallBackFromPlotMode;
627
+ /** Run change detection; returns what it threw (logged), or null. */
628
+ private detectChangesSafely;
629
+ /** The toolbar button: open the tool's dialog, or close it if it is open. */
630
+ toggleDialogTool(id: string): void;
631
+ /** Close the open dialog tool: its body is torn down, then its session ends. */
632
+ closeDialogTool(): void;
633
+ /** Start (or restart, after a re-render) the open dialog tool's session. */
634
+ private activateOpenDialogTool;
635
+ /** The live dialog body's teardown, and a pending wait for its host to connect. */
636
+ private toolDialogTeardown;
637
+ private toolDialogFrame;
638
+ /**
639
+ * The session is live: render the dialog, then mount the tool's body once the host
640
+ * element is in the document, so `mount()` can measure it and start widgets that need
641
+ * a connected element.
642
+ */
643
+ private showToolDialog;
644
+ /** How many animation frames to wait for the dialog to attach the body's host. */
645
+ private static readonly TOOL_DIALOG_ATTACH_FRAMES;
646
+ /**
647
+ * Mount `tool`'s body into `host` once it is connected (the dialog may attach it a
648
+ * frame later, when it moves itself to `<body>`). If it never connects within
649
+ * {@link TOOL_DIALOG_ATTACH_FRAMES} it is mounted anyway, with a warning, rather than
650
+ * leaving an empty dialog. A throwing `mount()` fails the session like a failed start.
651
+ */
652
+ private mountToolDialogBody;
653
+ /** The session is about to end: tear the body down first, then drop the dialog. */
654
+ private hideToolDialog;
655
+ /** A dialog tool could not start: close it and say so. */
656
+ private dialogToolFailed;
657
+ /** Where the open dialog tool's host element is attached once its dialog renders. */
658
+ set toolDialogSlot(ref: ElementRef<HTMLElement> | undefined);
659
+ /** Toolbar tools for contributed modes. Calls can come from outside Angular, hence the zone. */
660
+ private readonly plotModeTools;
548
661
  /** Deactivate whatever tool is armed and clear every tool mode. */
549
662
  private deactivateActiveTool;
550
- static ɵfac: i0.ɵɵFactoryDeclaration<VisualizerComponent, [null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
663
+ static ɵfac: i0.ɵɵFactoryDeclaration<VisualizerComponent, [null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
551
664
  static ɵcmp: i0.ɵɵComponentDeclaration<VisualizerComponent, "visualizer", never, { "toolbarTools": { "alias": "toolbarTools"; "required": false; }; "testMode": { "alias": "testMode"; "required": false; }; }, { "isStackEvent": "isStackEvent"; "isGrayscaleEvent": "isGrayscaleEvent"; }, never, ["*"], false, never>;
552
665
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jax-data-science/sci-image-visualizer",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "engines": {
5
5
  "node": ">=20.9.0"
6
6
  },