diff --git a/.husky/install.mjs b/.husky/install.mjs new file mode 100644 index 00000000..3be5a5d0 --- /dev/null +++ b/.husky/install.mjs @@ -0,0 +1,6 @@ +// Skip Husky install in production and CI +if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') { + process.exit(0); +} +const husky = (await import('husky')).default; +console.log(husky()); diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..5ee7abd8 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +pnpm exec lint-staged diff --git a/biome.json b/biome.json index dbe53541..b22f1665 100644 --- a/biome.json +++ b/biome.json @@ -7,7 +7,7 @@ }, "files": { "ignoreUnknown": false, - "includes": ["**", "!**/dist/**/*", "!**/coverage/**/*", "!**/.astro/**/*"] + "includes": ["**", "!**/dist/**/*", "!**/coverage/**/*", "!**/.astro/**/*", "!**/.husky/**/*"] }, "formatter": { "enabled": true, diff --git a/package.json b/package.json index d4507198..d5a71bb6 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "fmt:check": "biome format .", "lint": "biome lint . --write", "lint:check": "biome lint .", - "changelog": "pnpm -r run changelog" + "changelog": "pnpm -r run changelog", + "prepare": "node .husky/install.mjs" }, "devDependencies": { "@biomejs/biome": "2.2.2", @@ -22,6 +23,8 @@ "@vitest/coverage-istanbul": "3.2.4", "buffer": "6.0.0", "git-cliff": "2.10.1", + "husky": "9.1.7", + "lint-staged": "16.2.3", "parcel": "2.15.4", "process": "0.11.10", "typescript": "5.9.2", @@ -31,5 +34,10 @@ "node": "22.11.0", "pnpm": "9.14.2" }, - "packageManager": "pnpm@9.14.2" + "packageManager": "pnpm@9.14.2", + "lint-staged": { + "*": [ + "biome check --write --no-errors-on-unmatched --files-ignore-unknown=true" + ] + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4133b0d7..00b3b432 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,13 +19,19 @@ importers: version: 2.15.4(@parcel/core@2.15.4(@swc/helpers@0.5.17))(typescript@5.9.2) '@vitest/coverage-istanbul': specifier: 3.2.4 - version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(lightningcss@1.30.1)(yaml@2.7.1)) + version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(lightningcss@1.30.1)(yaml@2.8.1)) buffer: specifier: 6.0.0 version: 6.0.0 git-cliff: specifier: 2.10.1 version: 2.10.1 + husky: + specifier: 9.1.7 + version: 9.1.7 + lint-staged: + specifier: 16.2.3 + version: 16.2.3 parcel: specifier: 2.15.4 version: 2.15.4(@swc/helpers@0.5.17) @@ -37,7 +43,7 @@ importers: version: 5.9.2 vitest: specifier: 3.2.4 - version: 3.2.4(@types/debug@4.1.12)(lightningcss@1.30.1)(yaml@2.7.1) + version: 3.2.4(@types/debug@4.1.12)(lightningcss@1.30.1)(yaml@2.8.1) packages/core: dependencies: @@ -106,13 +112,13 @@ importers: version: 0.9.4(typescript@5.8.3) '@astrojs/mdx': specifier: 4.3.0 - version: 4.3.0(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1)) + version: 4.3.0(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1)) '@astrojs/react': specifier: 4.3.0 - version: 4.3.0(@types/node@22.1.0)(@types/react-dom@19.1.3(@types/react@19.1.3))(@types/react@19.1.3)(lightningcss@1.30.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(yaml@2.7.1) + version: 4.3.0(@types/node@22.1.0)(@types/react-dom@19.1.3(@types/react@19.1.3))(@types/react@19.1.3)(lightningcss@1.30.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(yaml@2.8.1) '@astrojs/starlight': specifier: 0.34.3 - version: 0.34.3(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1)) + version: 0.34.3(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1)) '@czi-sds/components': specifier: 20.0.1 version: 20.0.1(yhvdhk7sonewaw25ryh4hrzn6m) @@ -148,7 +154,7 @@ importers: version: 19.1.3(@types/react@19.1.3) astro: specifier: 5.8.0 - version: 5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1) + version: 5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1) file-saver: specifier: 2.0.5 version: 2.0.5 @@ -2260,6 +2266,10 @@ packages: ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} + ansi-escapes@7.1.1: + resolution: {integrity: sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q==} + engines: {node: '>=18'} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -2430,6 +2440,14 @@ packages: resolution: {integrity: sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==} engines: {node: '>=10'} + cli-cursor@5.0.0: + resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} + engines: {node: '>=18'} + + cli-truncate@5.1.0: + resolution: {integrity: sha512-7JDGG+4Zp0CsknDCedl0DYdaeOhc46QNpXi3NLQblkZpXXgA6LncLDUUyvrjSvZeF3VRQa+KiMGomazQrC1V8g==} + engines: {node: '>=20'} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -2459,6 +2477,9 @@ packages: resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} engines: {node: '>=12.5.0'} + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -2466,6 +2487,10 @@ packages: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} + commander@14.0.1: + resolution: {integrity: sha512-2JkV3gUZUVrbNA+1sjBOYLsMZ5cEEl8GTFP2a4AVz5hvasAMCQ1D2l2le/cX+pV4N6ZU17zjUahLpIXRrnWL8A==} + engines: {node: '>=20'} + common-ancestor-path@1.0.1: resolution: {integrity: sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==} @@ -2616,6 +2641,10 @@ packages: resolution: {integrity: sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==} engines: {node: '>=0.12'} + environment@1.1.0: + resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} + engines: {node: '>=18'} + error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -2763,6 +2792,10 @@ packages: resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} engines: {node: '>=18'} + get-east-asian-width@1.4.0: + resolution: {integrity: sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==} + engines: {node: '>=18'} + get-port@4.2.0: resolution: {integrity: sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==} engines: {node: '>=6'} @@ -2918,6 +2951,11 @@ packages: resolution: {integrity: sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==} engines: {node: '>=18.18.0'} + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} + engines: {node: '>=18'} + hasBin: true + i18next@23.16.8: resolution: {integrity: sha512-06r/TitrM88Mg5FdUXAKL96dJMzgqLE5dv3ryBAra4KCwD9mJ4ndOTS95ZuymIGoE+2hzfdaMak2X11/es7ZWg==} @@ -2969,6 +3007,10 @@ packages: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} + is-fullwidth-code-point@5.1.0: + resolution: {integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==} + engines: {node: '>=18'} + is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -3142,6 +3184,15 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + lint-staged@16.2.3: + resolution: {integrity: sha512-1OnJEESB9zZqsp61XHH2fvpS1es3hRCxMplF/AJUDa8Ho8VrscYDIuxGrj3m8KPXbcWZ8fT9XTMUhEQmOVKpKw==} + engines: {node: '>=20.17'} + hasBin: true + + listr2@9.0.4: + resolution: {integrity: sha512-1wd/kpAdKRLwv7/3OKC8zZ5U8e/fajCfWMxacUvB79S5nLrYGPtUI/8chMQhn3LQjsRVErTb9i1ECAwW0ZIHnQ==} + engines: {node: '>=20.0.0'} + lmdb@2.8.5: resolution: {integrity: sha512-9bMdFfc80S+vSldBmG3HOuLVHnxRdNTlpzR6QDnzqCQtCzGUEAGTzBKYMeIM+I/sU4oZfgbcbS7X7F65/z/oxQ==} hasBin: true @@ -3149,6 +3200,10 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + log-update@6.1.0: + resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} + engines: {node: '>=18'} + longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} @@ -3355,6 +3410,10 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} + mimic-function@5.0.1: + resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} + engines: {node: '>=18'} + minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -3380,6 +3439,10 @@ packages: muggle-string@0.4.1: resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + nano-spawn@1.0.3: + resolution: {integrity: sha512-jtpsQDetTnvS2Ts1fiRdci5rx0VYws5jGyC+4IYOTnIQ/wwdf6JdomlHBwqC3bJYOvaKu0C2GSZ1A60anrYpaA==} + engines: {node: '>=20.17'} + nanoid@3.3.11: resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -3451,6 +3514,10 @@ packages: ohash@2.0.11: resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} + onetime@7.0.0: + resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} + engines: {node: '>=18'} + oniguruma-parser@0.12.1: resolution: {integrity: sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==} @@ -3551,6 +3618,11 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} + pidtree@0.6.0: + resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} + engines: {node: '>=0.10'} + hasBin: true + postcss-nested@6.2.0: resolution: {integrity: sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==} engines: {node: '>=12.0'} @@ -3743,6 +3815,10 @@ packages: engines: {node: '>= 0.4'} hasBin: true + restore-cursor@5.1.0: + resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} + engines: {node: '>=18'} + restructure@3.0.2: resolution: {integrity: sha512-gSfoiOEA0VPE6Tukkrr7I0RBdE0s7H1eFCDBk05l1KIQT1UIKNc5JZy6jdyW6eYH3aR3g5b3PuL77rq0hvwtAw==} @@ -3762,6 +3838,9 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rfdc@1.4.1: + resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + rollup@4.40.2: resolution: {integrity: sha512-tfUOg6DTP4rhQ3VjOO6B4wyrJnGOX85requAXvqYTHsOgb2TFJdZ3aWpT8W2kPoypSGP7dZUyzxJ9ee4buM5Fg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -3835,6 +3914,10 @@ packages: engines: {node: '>=14.0.0', npm: '>=6.0.0'} hasBin: true + slice-ansi@7.1.2: + resolution: {integrity: sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==} + engines: {node: '>=18'} + smol-toml@1.3.4: resolution: {integrity: sha512-UOPtVuYkzYGee0Bd2Szz8d2G3RfMfJ2t3qVdZUAozZyAk+a0Sxa+QKix0YCwjL/A1RR0ar44nCxaoN9FxdJGwA==} engines: {node: '>= 18'} @@ -3863,6 +3946,10 @@ packages: stream-replace-string@2.0.0: resolution: {integrity: sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==} + string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -3875,6 +3962,10 @@ packages: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} + string-width@8.1.0: + resolution: {integrity: sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==} + engines: {node: '>=20'} + stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} @@ -4442,6 +4533,11 @@ packages: engines: {node: '>= 14'} hasBin: true + yaml@2.8.1: + resolution: {integrity: sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==} + engines: {node: '>= 14.6'} + hasBin: true + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -4589,12 +4685,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/mdx@4.3.0(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1))': + '@astrojs/mdx@4.3.0(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1))': dependencies: '@astrojs/markdown-remark': 6.3.2 '@mdx-js/mdx': 3.1.0(acorn@8.14.1) acorn: 8.14.1 - astro: 5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1) + astro: 5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1) es-module-lexer: 1.7.0 estree-util-visit: 2.0.0 hast-util-to-html: 9.0.5 @@ -4616,15 +4712,15 @@ snapshots: dependencies: prismjs: 1.30.0 - '@astrojs/react@4.3.0(@types/node@22.1.0)(@types/react-dom@19.1.3(@types/react@19.1.3))(@types/react@19.1.3)(lightningcss@1.30.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(yaml@2.7.1)': + '@astrojs/react@4.3.0(@types/node@22.1.0)(@types/react-dom@19.1.3(@types/react@19.1.3))(@types/react@19.1.3)(lightningcss@1.30.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(yaml@2.8.1)': dependencies: '@types/react': 19.1.3 '@types/react-dom': 19.1.3(@types/react@19.1.3) - '@vitejs/plugin-react': 4.4.1(vite@6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.7.1)) + '@vitejs/plugin-react': 4.4.1(vite@6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.8.1)) react: 19.1.0 react-dom: 19.1.0(react@19.1.0) ultrahtml: 1.6.0 - vite: 6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.7.1) + vite: 6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - jiti @@ -4645,17 +4741,17 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.25.76 - '@astrojs/starlight@0.34.3(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1))': + '@astrojs/starlight@0.34.3(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1))': dependencies: '@astrojs/markdown-remark': 6.3.1 - '@astrojs/mdx': 4.3.0(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1)) + '@astrojs/mdx': 4.3.0(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1)) '@astrojs/sitemap': 3.3.1 '@pagefind/default-ui': 1.3.0 '@types/hast': 3.0.4 '@types/js-yaml': 4.0.9 '@types/mdast': 4.0.4 - astro: 5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1) - astro-expressive-code: 0.41.2(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1)) + astro: 5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1) + astro-expressive-code: 0.41.2(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1)) bcp-47: 2.1.0 hast-util-from-html: 2.0.3 hast-util-select: 6.0.4 @@ -6687,18 +6783,18 @@ snapshots: '@ungap/structured-clone@1.3.0': {} - '@vitejs/plugin-react@4.4.1(vite@6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.7.1))': + '@vitejs/plugin-react@4.4.1(vite@6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.8.1))': dependencies: '@babel/core': 7.27.1 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.27.1) '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.27.1) '@types/babel__core': 7.20.5 react-refresh: 0.17.0 - vite: 6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.7.1) + vite: 6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.8.1) transitivePeerDependencies: - supports-color - '@vitest/coverage-istanbul@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(lightningcss@1.30.1)(yaml@2.7.1))': + '@vitest/coverage-istanbul@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(lightningcss@1.30.1)(yaml@2.8.1))': dependencies: '@istanbuljs/schema': 0.1.3 debug: 4.4.1 @@ -6710,7 +6806,7 @@ snapshots: magicast: 0.3.5 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/debug@4.1.12)(lightningcss@1.30.1)(yaml@2.7.1) + vitest: 3.2.4(@types/debug@4.1.12)(lightningcss@1.30.1)(yaml@2.8.1) transitivePeerDependencies: - supports-color @@ -6722,13 +6818,13 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(vite@7.0.0(lightningcss@1.30.1)(yaml@2.7.1))': + '@vitest/mocker@3.2.4(vite@7.0.0(lightningcss@1.30.1)(yaml@2.8.1))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 7.0.0(lightningcss@1.30.1)(yaml@2.7.1) + vite: 7.0.0(lightningcss@1.30.1)(yaml@2.8.1) '@vitest/pretty-format@3.2.4': dependencies: @@ -6828,6 +6924,10 @@ snapshots: dependencies: string-width: 4.2.3 + ansi-escapes@7.1.1: + dependencies: + environment: 1.1.0 + ansi-regex@5.0.1: {} ansi-regex@6.1.0: {} @@ -6855,12 +6955,12 @@ snapshots: astring@1.9.0: {} - astro-expressive-code@0.41.2(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1)): + astro-expressive-code@0.41.2(astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1)): dependencies: - astro: 5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1) + astro: 5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1) rehype-expressive-code: 0.41.2 - astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.7.1): + astro@5.8.0(@types/node@22.1.0)(lightningcss@1.30.1)(rollup@4.44.1)(typescript@5.8.3)(yaml@2.8.1): dependencies: '@astrojs/compiler': 2.12.0 '@astrojs/internal-helpers': 0.6.1 @@ -6915,8 +7015,8 @@ snapshots: unist-util-visit: 5.0.0 unstorage: 1.16.0 vfile: 6.0.3 - vite: 6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.7.1) - vitefu: 1.0.6(vite@6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.7.1)) + vite: 6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.8.1) + vitefu: 1.0.6(vite@6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.8.1)) xxhash-wasm: 1.1.0 yargs-parser: 21.1.1 yocto-spinner: 0.2.2 @@ -7072,6 +7172,15 @@ snapshots: cli-boxes@3.0.0: {} + cli-cursor@5.0.0: + dependencies: + restore-cursor: 5.1.0 + + cli-truncate@5.1.0: + dependencies: + slice-ansi: 7.1.2 + string-width: 8.1.0 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -7100,10 +7209,14 @@ snapshots: color-convert: 2.0.1 color-string: 1.9.1 + colorette@2.0.20: {} + comma-separated-tokens@2.0.3: {} commander@12.1.0: {} + commander@14.0.1: {} + common-ancestor-path@1.0.1: {} convert-source-map@1.9.0: {} @@ -7221,6 +7334,8 @@ snapshots: entities@6.0.0: {} + environment@1.1.0: {} + error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 @@ -7435,6 +7550,8 @@ snapshots: get-east-asian-width@1.3.0: {} + get-east-asian-width@1.4.0: {} + get-port@4.2.0: {} get-stream@9.0.1: @@ -7715,6 +7832,8 @@ snapshots: human-signals@8.0.1: {} + husky@9.1.7: {} + i18next@23.16.8: dependencies: '@babel/runtime': 7.27.0 @@ -7755,6 +7874,10 @@ snapshots: is-fullwidth-code-point@3.0.0: {} + is-fullwidth-code-point@5.1.0: + dependencies: + get-east-asian-width: 1.4.0 + is-glob@4.0.3: dependencies: is-extglob: 2.1.1 @@ -7891,6 +8014,25 @@ snapshots: lines-and-columns@1.2.4: {} + lint-staged@16.2.3: + dependencies: + commander: 14.0.1 + listr2: 9.0.4 + micromatch: 4.0.8 + nano-spawn: 1.0.3 + pidtree: 0.6.0 + string-argv: 0.3.2 + yaml: 2.8.1 + + listr2@9.0.4: + dependencies: + cli-truncate: 5.1.0 + colorette: 2.0.20 + eventemitter3: 5.0.1 + log-update: 6.1.0 + rfdc: 1.4.1 + wrap-ansi: 9.0.0 + lmdb@2.8.5: dependencies: msgpackr: 1.11.4 @@ -7908,6 +8050,14 @@ snapshots: lodash@4.17.21: {} + log-update@6.1.0: + dependencies: + ansi-escapes: 7.1.1 + cli-cursor: 5.0.0 + slice-ansi: 7.1.2 + strip-ansi: 7.1.0 + wrap-ansi: 9.0.0 + longest-streak@3.1.0: {} loose-envify@1.4.0: @@ -8406,6 +8556,8 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + mimic-function@5.0.1: {} + minimatch@9.0.5: dependencies: brace-expansion: 2.0.2 @@ -8434,6 +8586,8 @@ snapshots: muggle-string@0.4.1: {} + nano-spawn@1.0.3: {} + nanoid@3.3.11: {} neotraverse@0.6.18: {} @@ -8492,6 +8646,10 @@ snapshots: ohash@2.0.11: {} + onetime@7.0.0: + dependencies: + mimic-function: 5.0.1 + oniguruma-parser@0.12.1: {} oniguruma-to-es@4.3.3: @@ -8609,6 +8767,8 @@ snapshots: picomatch@4.0.2: {} + pidtree@0.6.0: {} + postcss-nested@6.2.0(postcss@8.5.6): dependencies: postcss: 8.5.6 @@ -8854,6 +9014,11 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + restore-cursor@5.1.0: + dependencies: + onetime: 7.0.0 + signal-exit: 4.1.0 + restructure@3.0.2: {} retext-latin@4.0.0: @@ -8883,6 +9048,8 @@ snapshots: reusify@1.1.0: {} + rfdc@1.4.1: {} + rollup@4.40.2: dependencies: '@types/estree': 1.0.7 @@ -9039,6 +9206,11 @@ snapshots: arg: 5.0.2 sax: 1.4.1 + slice-ansi@7.1.2: + dependencies: + ansi-styles: 6.2.1 + is-fullwidth-code-point: 5.1.0 + smol-toml@1.3.4: {} source-map-js@1.2.1: {} @@ -9055,6 +9227,8 @@ snapshots: stream-replace-string@2.0.0: {} + string-argv@0.3.2: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -9073,6 +9247,11 @@ snapshots: get-east-asian-width: 1.3.0 strip-ansi: 7.1.0 + string-width@8.1.0: + dependencies: + get-east-asian-width: 1.3.0 + strip-ansi: 7.1.0 + stringify-entities@4.0.4: dependencies: character-entities-html4: 2.1.0 @@ -9294,13 +9473,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@3.2.4(lightningcss@1.30.1)(yaml@2.7.1): + vite-node@3.2.4(lightningcss@1.30.1)(yaml@2.8.1): dependencies: cac: 6.7.14 debug: 4.4.1 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.0.0(lightningcss@1.30.1)(yaml@2.7.1) + vite: 7.0.0(lightningcss@1.30.1)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - jiti @@ -9315,7 +9494,7 @@ snapshots: - tsx - yaml - vite@6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.7.1): + vite@6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.8.1): dependencies: esbuild: 0.25.4 fdir: 6.4.6(picomatch@4.0.2) @@ -9327,9 +9506,9 @@ snapshots: '@types/node': 22.1.0 fsevents: 2.3.3 lightningcss: 1.30.1 - yaml: 2.7.1 + yaml: 2.8.1 - vite@7.0.0(lightningcss@1.30.1)(yaml@2.7.1): + vite@7.0.0(lightningcss@1.30.1)(yaml@2.8.1): dependencies: esbuild: 0.25.5 fdir: 6.4.6(picomatch@4.0.2) @@ -9340,17 +9519,17 @@ snapshots: optionalDependencies: fsevents: 2.3.3 lightningcss: 1.30.1 - yaml: 2.7.1 + yaml: 2.8.1 - vitefu@1.0.6(vite@6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.7.1)): + vitefu@1.0.6(vite@6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.8.1)): optionalDependencies: - vite: 6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.7.1) + vite: 6.3.5(@types/node@22.1.0)(lightningcss@1.30.1)(yaml@2.8.1) - vitest@3.2.4(@types/debug@4.1.12)(lightningcss@1.30.1)(yaml@2.7.1): + vitest@3.2.4(@types/debug@4.1.12)(lightningcss@1.30.1)(yaml@2.8.1): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.0.0(lightningcss@1.30.1)(yaml@2.7.1)) + '@vitest/mocker': 3.2.4(vite@7.0.0(lightningcss@1.30.1)(yaml@2.8.1)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -9368,8 +9547,8 @@ snapshots: tinyglobby: 0.2.14 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.0.0(lightningcss@1.30.1)(yaml@2.7.1) - vite-node: 3.2.4(lightningcss@1.30.1)(yaml@2.7.1) + vite: 7.0.0(lightningcss@1.30.1)(yaml@2.8.1) + vite-node: 3.2.4(lightningcss@1.30.1)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 @@ -9567,6 +9746,8 @@ snapshots: yaml@2.7.1: {} + yaml@2.8.1: {} + yargs-parser@21.1.1: {} yargs@17.7.2: diff --git a/site/src/examples/omezarr/omezarr-demo.tsx b/site/src/examples/omezarr/omezarr-demo.tsx index fd84c661..bf7c3a79 100644 --- a/site/src/examples/omezarr/omezarr-demo.tsx +++ b/site/src/examples/omezarr/omezarr-demo.tsx @@ -1,13 +1,14 @@ -import { Box2D, type Interval, PLANE_XY, type box2D, type vec2 } from '@alleninstitute/vis-geometry'; -import { type OmeZarrMetadata, loadMetadata, sizeInUnits } from '@alleninstitute/vis-omezarr'; -import type { RenderSettings, RenderSettingsChannels } from '@alleninstitute/vis-omezarr'; import { logger, type WebResource } from '@alleninstitute/vis-core'; +import { Box2D, type box2D, type Interval, PLANE_XY, type vec2 } from '@alleninstitute/vis-geometry'; +import type { RenderSettings, RenderSettingsChannels } from '@alleninstitute/vis-omezarr'; +import { loadMetadata, type OmeZarrMetadata, sizeInUnits } from '@alleninstitute/vis-omezarr'; import type React from 'react'; import { useEffect, useId, useMemo, useState } from 'react'; import { pan, zoom } from '../common/camera'; import { RenderServerProvider } from '../common/react/render-server-provider'; import { OmezarrViewer } from './omezarr-viewer'; import { SliceView } from './sliceview'; + type DemoOption = { value: string; label: string; res: WebResource }; const demoOptions: DemoOption[] = [