@jax-data-science/sci-image-visualizer 0.15.0 → 0.17.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 (47) hide show
  1. package/esm2022/lib/contracts/display-types.mjs +2 -1
  2. package/esm2022/lib/implementations/napari-js/napari-loading-state.mjs +1 -1
  3. package/esm2022/lib/implementations/napari-js/napari-scene.mjs +1 -1
  4. package/esm2022/lib/implementations/napari-js/napari-spatial-2d-scene.mjs +10 -8
  5. package/esm2022/lib/implementations/napari-js/napari-spatial-3d-scene.mjs +226 -39
  6. package/esm2022/lib/implementations/napari-js/napari-spatial-3d-transcripts.mjs +269 -0
  7. package/esm2022/lib/implementations/napari-js/napari-spatial-encoding.mjs +11 -4
  8. package/esm2022/lib/implementations/napari-js/napari-spatial-tiles.mjs +6 -7
  9. package/esm2022/lib/implementations/napari-js/napari-visualizer.service.mjs +2 -1
  10. package/esm2022/lib/implementations/napari-js/napari-volume-region-meshes.mjs +33 -8
  11. package/esm2022/lib/implementations/napari-js/napari-volume-scene.mjs +6 -2
  12. package/esm2022/lib/implementations/napari-js/spatial-tiles/cell-layers.mjs +10 -6
  13. package/esm2022/lib/implementations/napari-js/spatial-tiles/transcript-layers.mjs +9 -5
  14. package/esm2022/lib/spatial/spatial-controls.facade.mjs +7 -4
  15. package/esm2022/lib/spatial/spatial-encoding.mjs +18 -1
  16. package/esm2022/lib/spatial-controls/spatial-charts/spatial-charts.component.mjs +6 -2
  17. package/esm2022/lib/spatial-controls/spatial-controls.component.mjs +7 -3
  18. package/esm2022/lib/spatial-controls/spatial-gene-style/spatial-gene-style.component.mjs +7 -3
  19. package/esm2022/lib/spatial-controls/spatial-gene-tree/spatial-gene-tree.component.mjs +67 -19
  20. package/esm2022/lib/spatial-controls/spatial-groups-panel/spatial-groups-panel.component.mjs +61 -8
  21. package/esm2022/lib/spatial-controls/spatial-observations-panel/spatial-observations-panel.component.mjs +3 -3
  22. package/esm2022/lib/toolbar/toolbar.component.mjs +13 -4
  23. package/esm2022/lib/toolbar/view-controls/view-controls.component.mjs +7 -7
  24. package/fesm2022/{jax-data-science-sci-image-visualizer-jax-data-science-sci-image-visualizer-qUeMuBb0.mjs → jax-data-science-sci-image-visualizer-jax-data-science-sci-image-visualizer-DHrHO2ay.mjs} +795 -165
  25. package/fesm2022/jax-data-science-sci-image-visualizer-jax-data-science-sci-image-visualizer-DHrHO2ay.mjs.map +1 -0
  26. package/fesm2022/{jax-data-science-sci-image-visualizer-onnx-sam-session-U1ODcfYD.mjs → jax-data-science-sci-image-visualizer-onnx-sam-session-CKEUwNta.mjs} +2 -2
  27. package/fesm2022/{jax-data-science-sci-image-visualizer-onnx-sam-session-U1ODcfYD.mjs.map → jax-data-science-sci-image-visualizer-onnx-sam-session-CKEUwNta.mjs.map} +1 -1
  28. package/fesm2022/jax-data-science-sci-image-visualizer.mjs +1 -1
  29. package/lib/contracts/display-types.d.ts +9 -2
  30. package/lib/implementations/napari-js/napari-loading-state.d.ts +1 -1
  31. package/lib/implementations/napari-js/napari-scene.d.ts +2 -0
  32. package/lib/implementations/napari-js/napari-spatial-2d-scene.d.ts +3 -3
  33. package/lib/implementations/napari-js/napari-spatial-3d-scene.d.ts +82 -9
  34. package/lib/implementations/napari-js/napari-spatial-3d-transcripts.d.ts +62 -0
  35. package/lib/implementations/napari-js/napari-spatial-encoding.d.ts +9 -2
  36. package/lib/implementations/napari-js/napari-spatial-tiles.d.ts +5 -6
  37. package/lib/implementations/napari-js/napari-volume-region-meshes.d.ts +16 -3
  38. package/lib/implementations/napari-js/spatial-tiles/cell-layers.d.ts +1 -1
  39. package/lib/spatial/spatial-encoding.d.ts +10 -0
  40. package/lib/spatial-controls/spatial-controls.component.d.ts +2 -0
  41. package/lib/spatial-controls/spatial-gene-style/spatial-gene-style.component.d.ts +3 -1
  42. package/lib/spatial-controls/spatial-gene-tree/spatial-gene-tree.component.d.ts +25 -0
  43. package/lib/spatial-controls/spatial-groups-panel/spatial-groups-panel.component.d.ts +14 -3
  44. package/lib/toolbar/toolbar.component.d.ts +6 -0
  45. package/lib/toolbar/view-controls/view-controls.component.d.ts +3 -3
  46. package/package.json +2 -2
  47. package/fesm2022/jax-data-science-sci-image-visualizer-jax-data-science-sci-image-visualizer-qUeMuBb0.mjs.map +0 -1
@@ -7,10 +7,10 @@ import * as i0 from "@angular/core";
7
7
  /**
8
8
  * The cells' grouping, as Xenium Explorer's Groups section: the group picker (columns under
9
9
  * their section heading, a k-means family once, with its k beside it), CSV import of a new
10
- * grouping, and the grouping's categories with their colours, cell counts and show/hide
11
- * switches.
10
+ * grouping, and the grouping's categories with their colours (each one's swatch opens a colour
11
+ * picker), cell counts and show/hide switches.
12
12
  *
13
- * Writes only through `controls.setViewState` (`cellTypeColumn`, `hiddenGroups`).
13
+ * Writes only through `controls.setViewState` (`cellTypeColumn`, `hiddenGroups`, `groupColors`).
14
14
  */
15
15
  export declare class SpatialGroupsPanelComponent implements OnChanges {
16
16
  private readonly zone;
@@ -42,6 +42,8 @@ export declare class SpatialGroupsPanelComponent implements OnChanges {
42
42
  private readonly groupRowsLoad;
43
43
  protected groupImportError: string | null;
44
44
  protected groupImporting: boolean;
45
+ /** The group the open colour picker edits. */
46
+ protected styleGroup: string | null;
45
47
  constructor(zone: NgZone, cdr: ChangeDetectorRef);
46
48
  ngOnChanges(changes: SimpleChanges): void;
47
49
  /** The categorical column the cells are grouped by. */
@@ -57,6 +59,15 @@ export declare class SpatialGroupsPanelComponent implements OnChanges {
57
59
  protected get allGroupsShown(): boolean;
58
60
  protected onGroupShown(label: string, on: boolean): void;
59
61
  protected onAllGroupsShown(on: boolean): void;
62
+ protected openGroupStyle(event: Event, label: string, panel: {
63
+ toggle(e: Event): void;
64
+ hide(): void;
65
+ }): void;
66
+ /** The colour group `label` is drawn in now (the user's, else the column's or the palette's). */
67
+ protected groupColorOf(label: string): string;
68
+ protected onGroupColor(label: string, hex: string): void;
69
+ /** Back to the group's own colour (the column's, else the palette's). */
70
+ protected resetGroupColor(label: string): void;
60
71
  protected get canImportGroups(): boolean;
61
72
  /** '+': a CSV/TSV of `cell_id` and group, named after the file. */
62
73
  protected onImportGroupsFile(input: HTMLInputElement): Promise<void>;
@@ -216,6 +216,12 @@ export declare class ToolbarComponent {
216
216
  protected get isNapariMode(): boolean;
217
217
  /** ISOSURFACE (Plotly or napari-js WebGPU, either resolution) shows the isovalue range slider. */
218
218
  protected get isIsosurfaceMode(): boolean;
219
+ /**
220
+ * The views that draw the 3D axes gizmo (an `Axes3dGizmo`): napari-js's volume, isosurface and
221
+ * surface, and the 3D spatial cloud. Not every napari-js view: its 2D image and scatter and its
222
+ * 3D scatter draw none, and a toggle there would do nothing.
223
+ */
224
+ protected get showsAxesToggle(): boolean;
219
225
  /** The napari-js WebGPU surface — shows the wireframe toggle. */
220
226
  protected get isNapariSurfaceMode(): boolean;
221
227
  /** Any napari-js WebGPU 3D type (volume/isosurface/surface) — shows the Resolution control. */
@@ -16,12 +16,12 @@ export declare class ViewControlsComponent {
16
16
  activeDragMode: string | null;
17
17
  /** The 3D camera mode (`turntable` / `orbit` / …). */
18
18
  activeSurface3dMode: string;
19
- /** A napari-js WebGPU view (axes toggle, napari camera). */
20
- isNapariMode: boolean;
21
19
  /** The napari-js surface (shows the wireframe toggle). */
22
20
  isNapariSurfaceMode: boolean;
23
21
  /** A napari-js 3D view (shows the Resolution dropdown). */
24
22
  isNapari3dMode: boolean;
23
+ /** Whether the view draws the 3D axes gizmo (shows its toggle). */
24
+ axesToggle: boolean;
25
25
  /** The napari 3D axes gizmo is shown. */
26
26
  axesVisible: boolean;
27
27
  /** The napari surface wireframe is on. */
@@ -50,5 +50,5 @@ export declare class ViewControlsComponent {
50
50
  value: number;
51
51
  }[];
52
52
  static ɵfac: i0.ɵɵFactoryDeclaration<ViewControlsComponent, never>;
53
- static ɵcmp: i0.ɵɵComponentDeclaration<ViewControlsComponent, "toolbar-view-controls", never, { "isHeatmap": { "alias": "isHeatmap"; "required": false; }; "zoomTools": { "alias": "zoomTools"; "required": false; }; "isImageView": { "alias": "isImageView"; "required": false; }; "activeDragMode": { "alias": "activeDragMode"; "required": false; }; "activeSurface3dMode": { "alias": "activeSurface3dMode"; "required": false; }; "isNapariMode": { "alias": "isNapariMode"; "required": false; }; "isNapariSurfaceMode": { "alias": "isNapariSurfaceMode"; "required": false; }; "isNapari3dMode": { "alias": "isNapari3dMode"; "required": false; }; "axesVisible": { "alias": "axesVisible"; "required": false; }; "wireframeActive": { "alias": "wireframeActive"; "required": false; }; "resolutionScale": { "alias": "resolutionScale"; "required": false; }; }, { "toggleDragMode": "toggleDragMode"; "zoomIn": "zoomIn"; "zoomOut": "zoomOut"; "toggleSurface3dMode": "toggleSurface3dMode"; "resetSurfaceCamera": "resetSurfaceCamera"; "toggleAxes": "toggleAxes"; "toggleWireframe": "toggleWireframe"; "selectResolution": "selectResolution"; }, never, never, true, never>;
53
+ static ɵcmp: i0.ɵɵComponentDeclaration<ViewControlsComponent, "toolbar-view-controls", never, { "isHeatmap": { "alias": "isHeatmap"; "required": false; }; "zoomTools": { "alias": "zoomTools"; "required": false; }; "isImageView": { "alias": "isImageView"; "required": false; }; "activeDragMode": { "alias": "activeDragMode"; "required": false; }; "activeSurface3dMode": { "alias": "activeSurface3dMode"; "required": false; }; "isNapariSurfaceMode": { "alias": "isNapariSurfaceMode"; "required": false; }; "isNapari3dMode": { "alias": "isNapari3dMode"; "required": false; }; "axesToggle": { "alias": "axesToggle"; "required": false; }; "axesVisible": { "alias": "axesVisible"; "required": false; }; "wireframeActive": { "alias": "wireframeActive"; "required": false; }; "resolutionScale": { "alias": "resolutionScale"; "required": false; }; }, { "toggleDragMode": "toggleDragMode"; "zoomIn": "zoomIn"; "zoomOut": "zoomOut"; "toggleSurface3dMode": "toggleSurface3dMode"; "resetSurfaceCamera": "resetSurfaceCamera"; "toggleAxes": "toggleAxes"; "toggleWireframe": "toggleWireframe"; "selectResolution": "selectResolution"; }, never, never, true, never>;
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jax-data-science/sci-image-visualizer",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "engines": {
5
5
  "node": ">=20.9.0"
6
6
  },
@@ -40,7 +40,7 @@
40
40
  "cellpose-js": "^0.6.0",
41
41
  "fast-png": "^6.4.0",
42
42
  "fzstd": "^0.1.1",
43
- "napari-js": "^0.18.0",
43
+ "napari-js": "^0.20.0",
44
44
  "openseadragon": "^6.0.2",
45
45
  "plotly.js-dist-min": "^3.0.1",
46
46
  "tslib": "^2.3.0"