@biongff/vizarr 0.3.0-dev.2025-11-12.283baee9

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 (81) hide show
  1. package/.gitattributes +1 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
  3. package/.github/ISSUE_TEMPLATE/documentation_update.md +16 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
  5. package/.github/ISSUE_TEMPLATE/maintenance.md +19 -0
  6. package/.github/ISSUE_TEMPLATE/optimisation_request.md +23 -0
  7. package/.github/ISSUE_TEMPLATE/support_request.md +25 -0
  8. package/.github/PULL_REQUEST_TEMPLATE.md +21 -0
  9. package/.github/dependabot.yml +13 -0
  10. package/.github/workflows/build_and_deploy.yml +29 -0
  11. package/.github/workflows/npm-publish-dev.yml +49 -0
  12. package/.github/workflows/npm-publish.yml +20 -0
  13. package/.github/workflows/release.yml +37 -0
  14. package/.github/workflows/test.yml +21 -0
  15. package/.releaserc.json +29 -0
  16. package/CITATION.cff +56 -0
  17. package/CONTRIBUTING.md +82 -0
  18. package/LICENSE +21 -0
  19. package/README.md +85 -0
  20. package/assets/favicon.ico +0 -0
  21. package/assets/favicon.png +0 -0
  22. package/assets/logo-wide.png +0 -0
  23. package/assets/logo-wide.svg +60 -0
  24. package/assets/logo.png +0 -0
  25. package/assets/logo.svg +36 -0
  26. package/assets/robots.txt +3 -0
  27. package/assets/screenshot.png +0 -0
  28. package/biome.json +34 -0
  29. package/index.html +24 -0
  30. package/main.ts +52 -0
  31. package/package.json +55 -0
  32. package/patches/@vivjs__loaders@0.17.2.patch +13 -0
  33. package/python/.python-version +1 -0
  34. package/python/README.md +14 -0
  35. package/python/Untitled.ipynb +40 -0
  36. package/python/deno.json +22 -0
  37. package/python/notebooks/IDR_example.ipynb +86 -0
  38. package/python/notebooks/README.md +35 -0
  39. package/python/notebooks/create_fixture.py +72 -0
  40. package/python/notebooks/getting_started.ipynb +217 -0
  41. package/python/notebooks/mandelbrot.ipynb +211 -0
  42. package/python/notebooks/spatial_transformations.ipynb +139 -0
  43. package/python/pyproject.toml +18 -0
  44. package/python/src/vizarr/__init__.py +10 -0
  45. package/python/src/vizarr/_widget.js +113 -0
  46. package/python/src/vizarr/_widget.py +67 -0
  47. package/python/uv.lock +2495 -0
  48. package/src/ZarrPixelSource.ts +182 -0
  49. package/src/codecs/jpeg2k.ts +22 -0
  50. package/src/codecs/register.ts +2 -0
  51. package/src/components/LayerController/AcquisitionController.tsx +46 -0
  52. package/src/components/LayerController/AddChannelButton.tsx +122 -0
  53. package/src/components/LayerController/AxisOptions.tsx +93 -0
  54. package/src/components/LayerController/AxisSlider.tsx +86 -0
  55. package/src/components/LayerController/AxisSliders.tsx +29 -0
  56. package/src/components/LayerController/ChannelController.tsx +84 -0
  57. package/src/components/LayerController/ChannelOptions.tsx +183 -0
  58. package/src/components/LayerController/ColorPalette.tsx +40 -0
  59. package/src/components/LayerController/Content.tsx +71 -0
  60. package/src/components/LayerController/Header.tsx +48 -0
  61. package/src/components/LayerController/Labels.tsx +73 -0
  62. package/src/components/LayerController/LayerFitToViewportButton.tsx +43 -0
  63. package/src/components/LayerController/LayerVisibilityButton.tsx +32 -0
  64. package/src/components/LayerController/OpacitySlider.tsx +25 -0
  65. package/src/components/LayerController/index.tsx +42 -0
  66. package/src/components/Menu.tsx +54 -0
  67. package/src/components/Viewer.tsx +136 -0
  68. package/src/hooks.ts +29 -0
  69. package/src/index.tsx +138 -0
  70. package/src/io.ts +276 -0
  71. package/src/layers/grid-layer.ts +214 -0
  72. package/src/layers/label-layer.ts +446 -0
  73. package/src/layers/viv-layers.ts +55 -0
  74. package/src/lru-store.ts +57 -0
  75. package/src/ome.ts +388 -0
  76. package/src/state.ts +202 -0
  77. package/src/theme.ts +80 -0
  78. package/src/types.ts +112 -0
  79. package/src/utils.ts +655 -0
  80. package/tsconfig.json +14 -0
  81. package/vite.config.js +47 -0
package/vite.config.js ADDED
@@ -0,0 +1,47 @@
1
+ import * as path from "node:path";
2
+
3
+ import react from "@vitejs/plugin-react";
4
+ import { defineConfig } from "vite";
5
+
6
+ /**
7
+ * Writes a new entry point that exports contents of an existing chunk.
8
+ * @param {string} entryPointName - Name of the new entry point
9
+ * @param {RegExp} chunkName - Name of the existing chunk
10
+ */
11
+ function writeEntryPoint(entryPointName, chunkName) {
12
+ return {
13
+ name: "write-entry-point",
14
+ async generateBundle(_, bundle) {
15
+ const chunk = Object.keys(bundle).find((key) => key.match(chunkName));
16
+ if (!chunk) {
17
+ throw new Error(`Could not find chunk matching ${chunkName}`);
18
+ }
19
+ bundle[entryPointName] = {
20
+ fileName: entryPointName,
21
+ type: "chunk",
22
+ code: `export * from './${chunk}';`,
23
+ };
24
+ },
25
+ };
26
+ }
27
+
28
+ export default defineConfig({
29
+ plugins: [react(), writeEntryPoint("index.js", /^vizarr-/)],
30
+ base: process.env.VIZARR_PREFIX || "./",
31
+ publicDir: path.resolve(__dirname, "assets"),
32
+ build: {
33
+ assetsDir: "",
34
+ sourcemap: true,
35
+ rollupOptions: {
36
+ output: {
37
+ minifyInternalExports: false,
38
+ manualChunks: {
39
+ vizarr: [path.resolve(__dirname, "src/index.tsx")],
40
+ },
41
+ },
42
+ },
43
+ },
44
+ server: {
45
+ open: `?source=${process.env.VIZARR_DATA || "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.1/6001253.zarr"}`,
46
+ },
47
+ });