diff --git a/examples/s2-rslib/.gitignore b/examples/s2-rslib/.gitignore new file mode 100644 index 00000000000..14419eef53e --- /dev/null +++ b/examples/s2-rslib/.gitignore @@ -0,0 +1,15 @@ +# Local +.DS_Store +*.local +*.log* + +# Dist +node_modules +dist/ +storybook-static +doc_build/ + +# IDE +.vscode/* +!.vscode/extensions.json +.idea diff --git a/examples/s2-rslib/.yarn/install-state.gz b/examples/s2-rslib/.yarn/install-state.gz new file mode 100644 index 00000000000..db610d2e9b1 Binary files /dev/null and b/examples/s2-rslib/.yarn/install-state.gz differ diff --git a/examples/s2-rslib/.yarn/patches/unplugin-npm-1.16.1-77bc28083a.patch b/examples/s2-rslib/.yarn/patches/unplugin-npm-1.16.1-77bc28083a.patch new file mode 100644 index 00000000000..08c772adddb --- /dev/null +++ b/examples/s2-rslib/.yarn/patches/unplugin-npm-1.16.1-77bc28083a.patch @@ -0,0 +1,84 @@ +diff --git a/dist/index.js b/dist/index.js +index 6a30f19344431fcbd495c8951695bdd2e5917583..00f310c9123972aa013a924bcc9c8d5b7cb20205 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -1646,19 +1646,38 @@ function decodeVirtualModuleId(encoded, _plugin) { + function isVirtualModuleId(encoded, plugin) { + return (0, import_path8.dirname)(encoded) === plugin.__virtualModulePrefix; + } +-var FakeVirtualModulesPlugin = class { ++var FakeVirtualModulesPlugin = class FakeVirtualModulesPlugin { ++ // PATCH (ported from unplugin>=2.x): share the virtual dir per-process and ++ // reference-count it so parallel compilers in one process (e.g. rslib's js+dts) ++ // don't delete the dir out from under each other on shutdown. ++ static counters = /* @__PURE__ */ new Map(); ++ static initCleanup = false; ++ name = "FakeVirtualModulesPlugin"; + constructor(plugin) { + this.plugin = plugin; ++ if (!FakeVirtualModulesPlugin.initCleanup) { ++ FakeVirtualModulesPlugin.initCleanup = true; ++ process.once("exit", () => { ++ FakeVirtualModulesPlugin.counters.forEach((_, dir) => { ++ import_fs3.default.rmSync(dir, { recursive: true, force: true }); ++ }); ++ }); ++ } + } +- name = "FakeVirtualModulesPlugin"; + apply(compiler) { + const dir = this.plugin.__virtualModulePrefix; + if (!import_fs3.default.existsSync(dir)) { + import_fs3.default.mkdirSync(dir, { recursive: true }); + } ++ const counter = FakeVirtualModulesPlugin.counters.get(dir) ?? 0; ++ FakeVirtualModulesPlugin.counters.set(dir, counter + 1); + compiler.hooks.shutdown.tap(this.name, () => { +- if (import_fs3.default.existsSync(dir)) { +- import_fs3.default.rmdirSync(dir, { recursive: true }); ++ const remaining = (FakeVirtualModulesPlugin.counters.get(dir) ?? 1) - 1; ++ if (remaining === 0) { ++ FakeVirtualModulesPlugin.counters.delete(dir); ++ import_fs3.default.rmSync(dir, { recursive: true, force: true }); ++ } else { ++ FakeVirtualModulesPlugin.counters.set(dir, remaining); + } + }); + } +@@ -1682,7 +1701,7 @@ function getRspackPlugin(factory) { + return (userOptions) => { + return { + apply(compiler) { +- const VIRTUAL_MODULE_PREFIX = (0, import_path9.resolve)(compiler.options.context ?? process.cwd(), "node_modules/.virtual"); ++ const VIRTUAL_MODULE_PREFIX = (0, import_path9.resolve)(compiler.options.context ?? process.cwd(), "node_modules/.virtual", compiler.rspack.experiments.VirtualModulesPlugin ? "" : process.pid.toString()); + const injected = compiler.$unpluginContext || {}; + compiler.$unpluginContext = injected; + const meta = { +@@ -1710,7 +1729,7 @@ function getRspackPlugin(factory) { + }); + const externalModules = /* @__PURE__ */ new Set(); + if (plugin.resolveId) { +- const vfs = new FakeVirtualModulesPlugin(plugin); ++ const vfs = compiler.rspack.experiments.VirtualModulesPlugin ? new compiler.rspack.experiments.VirtualModulesPlugin() : new FakeVirtualModulesPlugin(plugin); + vfs.apply(compiler); + plugin.__vfsModules = /* @__PURE__ */ new Set(); + compiler.hooks.compilation.tap(plugin.name, (compilation, { normalModuleFactory }) => { +@@ -1744,11 +1763,16 @@ function getRspackPlugin(factory) { + if (isExternal) + externalModules.add(resolved); + if (!import_fs4.default.existsSync(resolved)) { ++ const encodedVirtualPath = encodeVirtualModuleId(resolved, plugin); + if (!plugin.__vfsModules.has(resolved)) { + plugin.__vfsModules.add(resolved); +- await vfs.writeModule(resolved); ++ if (compiler.rspack.experiments.VirtualModulesPlugin) { ++ await vfs.writeModule(encodedVirtualPath, ""); ++ } else { ++ await vfs.writeModule(resolved); ++ } + } +- resolved = encodeVirtualModuleId(resolved, plugin); ++ resolved = encodedVirtualPath; + } + resolveData.request = resolved; + }); diff --git a/examples/s2-rslib/README.md b/examples/s2-rslib/README.md new file mode 100644 index 00000000000..6fa6e8a8111 --- /dev/null +++ b/examples/s2-rslib/README.md @@ -0,0 +1,69 @@ +# s2-rslib + +With the patch, it should work. Maintaining the rest of this README for historical context. + +Patch is based on these PRs with assistance from Claude: +https://github.com/unjs/unplugin/pull/510 +https://github.com/unjs/unplugin/pull/549 +https://github.com/unjs/unplugin/pull/538 +Because the newer version of unplugin works. We're currently unable to upgrade to the newer version though due to some old build tools we still support. + +This is an example of Rslib with unplugin-parcel-macros, that reliably does not work and fails to build if you turn off the unplugin patch. + + +## Reproduction steps + +1. turn off the patch (delete from resolutions) +2. `yarn install` +3. `yarn build` +4. Observe the error `Module not found: Can't resolve 'macro-xyz.css'` + +## Debugging notes from AI + +*TL;DR: It's a race condition in `unplugin-parcel-macros` + `unplugin`'s virtual module system within rspack. No config-level fix found yet — likely needs an upstream fix or inlining styles.* + +--- + +:mag: **The Problem** +`pnpm nx build @pandora/react-card-container` fails ~50% of the time with: +``` +Module not found: Can't resolve 'macro-.css' +``` +Errors come from `EmptyStateStyles.ts` and `ErrorStateStyles.ts`. + +--- + +:detective: **Root Cause** +The S2 `style()` macro generates CSS at build time. That CSS lives in: +• A module-level `assets` Map inside `unplugin-parcel-macros` (shared across plugin instances) +• Empty placeholder files in `node_modules/.virtual/` written by unplugin's `FakeVirtualModulesPlugin` + +The `transform` hook generates CSS → adds to `assets` Map → appends `import "macro-.css"` to the source. Then `resolveId` maps it to a `.virtual/` file, and the `load` hook serves the real CSS from the Map. + +The race happens within rspack's internal concurrent module processing. Even with a *single* lib entry and a *single* rspack compiler, the async `transform → resolveId → load` pipeline has a timing window where virtual CSS module resolution fails. + +--- + +:test_tube: **What I Tested** + +| Approach | Result | +|---|---| +| Normal build (ESM + CJS parallel) | ~40% pass | +| Patch: remove `assets.delete()` cleanup | Still fails | +| Patch: prevent `.virtual/` dir deletion on shutdown | Still fails | +| Both patches combined | Still fails | +| Patch: per-instance `assets` Map | Worse | +| Sequential builds (separate processes) | ESM passes, CJS still flaky | +| Single lib entry only | Still flaky (3/10) | +| Disable DTS | Still fails | +| Clean `.virtual/` before every build | Still fails | +| `cssModules: { namedExport: false }` | Still fails | + +--- + +:bulb: **Key Takeaways** +• Not caused by parallel ESM+CJS — fails with a single lib entry too +• Not caused by stale `.virtual/` files — cleaning doesn't help +• Not caused by the asset cleanup code — removing it doesn't fix it +• The working repo (`pandora-tooling-demo`) has fewer macro files and simpler inline `style()` calls — smaller race window +• Importing style files `with { type: 'macro' }` doesn't work — S2 throws an error since the exports are already-expanded values, not macro functions diff --git a/examples/s2-rslib/package.json b/examples/s2-rslib/package.json new file mode 100644 index 00000000000..9fb2c22d634 --- /dev/null +++ b/examples/s2-rslib/package.json @@ -0,0 +1,36 @@ +{ + "name": "s2-rslib", + "version": "0.0.0", + "private": true, + "files": [ + "dist" + ], + "type": "module", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + } + }, + "scripts": { + "build": "rslib build", + "dev": "rslib build --watch" + }, + "dependencies": { + "@react-spectrum/s2": "latest", + "react": "^19.2.0", + "react-dom": "^19.2.0" + }, + "devDependencies": { + "@rsbuild/plugin-react": "^1.4.5", + "@rslib/core": "^0.19.6", + "@types/react": "^19.2.14", + "react": "^19.2.4", + "typescript": "^5.9.3", + "unplugin-parcel-macros": "^0.2.0" + }, + "resolutions": { + "unplugin@npm:^1.9.0": "patch:unplugin@npm%3A1.16.1#~/.yarn/patches/unplugin-npm-1.16.1-77bc28083a.patch" + } +} diff --git a/examples/s2-rslib/rslib.config.ts b/examples/s2-rslib/rslib.config.ts new file mode 100644 index 00000000000..e14d25db301 --- /dev/null +++ b/examples/s2-rslib/rslib.config.ts @@ -0,0 +1,34 @@ +import {pluginReact} from '@rsbuild/plugin-react'; +import {defineConfig} from '@rslib/core'; +import {rspack as macros} from 'unplugin-parcel-macros'; + +export default defineConfig({ + source: { + entry: { + index: ['./src/index.tsx'] + } + }, + lib: [ + { + bundle: true, + dts: true, + format: 'esm' + } + ], + output: { + target: 'web' + }, + plugins: [pluginReact()], + tools: { + /** + * Add the macros plugin to enable support for React Spectrum S2 styles. + * This is a webpack plugin, so it is added to the rspack config. We should + * use the appendPlugins rather than appending it directly to the config, as + * this is the recommended way to add plugins. + */ + rspack: (config, {appendPlugins}) => { + appendPlugins(macros()); + return config; + } + } +}); diff --git a/examples/s2-rslib/src/App.tsx b/examples/s2-rslib/src/App.tsx new file mode 100644 index 00000000000..1c9e5e7aba6 --- /dev/null +++ b/examples/s2-rslib/src/App.tsx @@ -0,0 +1,68 @@ +import {style} from '@react-spectrum/s2/style' with {type: 'macro'}; +import Button from './Button'; +import Card from './Card'; +import Icon from './Icon'; + +const Header = () => { + return ( +
+

Header

+
+ ); +}; + +const Nav = () => { + return ( + + ); +}; + +const Main = () => { + return ( +
+

Main

+
+ ); +}; + +const Footer = () => { + return ( +
+

Footer

+
+ ); +}; + +const appStyles = style({ + display: 'flex', + flexDirection: 'column', + height: '100vh', + gridTemplateAreas: { + default: ['header', 'nav main', 'footer'] + }, + gridTemplateRows: ['auto', '1fr', 'auto'], + gridTemplateColumns: ['1fr', '1fr'], + gridGap: 8, + gridAutoFlow: 'row', + gridAutoColumns: '1fr', + gridAutoRows: 'auto' +}); + +const App = () => { + return ( +
+
+
+ ); +}; + +export default App; diff --git a/examples/s2-rslib/src/Button.tsx b/examples/s2-rslib/src/Button.tsx new file mode 100644 index 00000000000..72cd3ab92ac --- /dev/null +++ b/examples/s2-rslib/src/Button.tsx @@ -0,0 +1,51 @@ +import './button.css'; +import {style} from '@react-spectrum/s2/style' with {type: 'macro'}; + +export interface ButtonProps { + /** + * Whether the button is primary. + * + * @default false + */ + primary?: boolean; + /** + * Background color of the button. + */ + backgroundColor?: string; + /** + * Size of Button. + * + * @default 'medium' + */ + size?: 'small' | 'medium' | 'large'; + /** + * Label of the button. + */ + label: string; + /** + * Optional click handler. + */ + onClick?: () => void; +} + +const Button = ({ + primary = false, + size = 'medium', + backgroundColor, + label, + ...props +}: ButtonProps) => { + const mode = primary ? 'demo-button--primary' : 'demo-button--secondary'; + return ( +
+ +
+ ); +}; + +export default Button; diff --git a/examples/s2-rslib/src/Card.tsx b/examples/s2-rslib/src/Card.tsx new file mode 100644 index 00000000000..686103fc258 --- /dev/null +++ b/examples/s2-rslib/src/Card.tsx @@ -0,0 +1,11 @@ +import {style} from '@react-spectrum/s2/style' with {type: 'macro'}; + +const Card = () => { + return ( +
+

Card

+
+ ); +}; + +export default Card; diff --git a/examples/s2-rslib/src/Icon.tsx b/examples/s2-rslib/src/Icon.tsx new file mode 100644 index 00000000000..c3d9ea960d8 --- /dev/null +++ b/examples/s2-rslib/src/Icon.tsx @@ -0,0 +1,8 @@ +import AlertTriangle from '@react-spectrum/s2/icons/AlertTriangle'; +import {iconStyle} from '@react-spectrum/s2/style' with {type: 'macro'}; + +const Icon = () => { + return ; +}; + +export default Icon; diff --git a/examples/s2-rslib/src/button.css b/examples/s2-rslib/src/button.css new file mode 100644 index 00000000000..b7a36cbde4f --- /dev/null +++ b/examples/s2-rslib/src/button.css @@ -0,0 +1,34 @@ +.demo-button { + font-weight: 700; + border: 0; + border-radius: 3em; + cursor: pointer; + display: inline-block; + line-height: 1; +} + +.demo-button--primary { + color: white; + background-color: #1ea7fd; +} + +.demo-button--secondary { + color: #333; + background-color: transparent; + box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset; +} + +.demo-button--small { + font-size: 12px; + padding: 10px 16px; +} + +.demo-button--medium { + font-size: 14px; + padding: 11px 20px; +} + +.demo-button--large { + font-size: 16px; + padding: 12px 24px; +} diff --git a/examples/s2-rslib/src/index.tsx b/examples/s2-rslib/src/index.tsx new file mode 100644 index 00000000000..3bc413b9acc --- /dev/null +++ b/examples/s2-rslib/src/index.tsx @@ -0,0 +1 @@ +export {default as App} from './App'; diff --git a/examples/s2-rslib/tsconfig.json b/examples/s2-rslib/tsconfig.json new file mode 100644 index 00000000000..510ab68dfbb --- /dev/null +++ b/examples/s2-rslib/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "lib": ["DOM", "ES2022"], + "module": "ESNext", + "jsx": "react-jsx", + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "resolveJsonModule": true, + "moduleResolution": "bundler", + "useDefineForClassFields": true + }, + "include": ["src"] +} diff --git a/examples/s2-rslib/yarn.lock b/examples/s2-rslib/yarn.lock new file mode 100644 index 00000000000..0113a821afc --- /dev/null +++ b/examples/s2-rslib/yarn.lock @@ -0,0 +1,1009 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10c0 + +"@ast-grep/napi-darwin-arm64@npm:0.37.0": + version: 0.37.0 + resolution: "@ast-grep/napi-darwin-arm64@npm:0.37.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@ast-grep/napi-darwin-x64@npm:0.37.0": + version: 0.37.0 + resolution: "@ast-grep/napi-darwin-x64@npm:0.37.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@ast-grep/napi-linux-arm64-gnu@npm:0.37.0": + version: 0.37.0 + resolution: "@ast-grep/napi-linux-arm64-gnu@npm:0.37.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@ast-grep/napi-linux-arm64-musl@npm:0.37.0": + version: 0.37.0 + resolution: "@ast-grep/napi-linux-arm64-musl@npm:0.37.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@ast-grep/napi-linux-x64-gnu@npm:0.37.0": + version: 0.37.0 + resolution: "@ast-grep/napi-linux-x64-gnu@npm:0.37.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@ast-grep/napi-linux-x64-musl@npm:0.37.0": + version: 0.37.0 + resolution: "@ast-grep/napi-linux-x64-musl@npm:0.37.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@ast-grep/napi-win32-arm64-msvc@npm:0.37.0": + version: 0.37.0 + resolution: "@ast-grep/napi-win32-arm64-msvc@npm:0.37.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@ast-grep/napi-win32-ia32-msvc@npm:0.37.0": + version: 0.37.0 + resolution: "@ast-grep/napi-win32-ia32-msvc@npm:0.37.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@ast-grep/napi-win32-x64-msvc@npm:0.37.0": + version: 0.37.0 + resolution: "@ast-grep/napi-win32-x64-msvc@npm:0.37.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@ast-grep/napi@npm:0.37.0": + version: 0.37.0 + resolution: "@ast-grep/napi@npm:0.37.0" + dependencies: + "@ast-grep/napi-darwin-arm64": "npm:0.37.0" + "@ast-grep/napi-darwin-x64": "npm:0.37.0" + "@ast-grep/napi-linux-arm64-gnu": "npm:0.37.0" + "@ast-grep/napi-linux-arm64-musl": "npm:0.37.0" + "@ast-grep/napi-linux-x64-gnu": "npm:0.37.0" + "@ast-grep/napi-linux-x64-musl": "npm:0.37.0" + "@ast-grep/napi-win32-arm64-msvc": "npm:0.37.0" + "@ast-grep/napi-win32-ia32-msvc": "npm:0.37.0" + "@ast-grep/napi-win32-x64-msvc": "npm:0.37.0" + dependenciesMeta: + "@ast-grep/napi-darwin-arm64": + optional: true + "@ast-grep/napi-darwin-x64": + optional: true + "@ast-grep/napi-linux-arm64-gnu": + optional: true + "@ast-grep/napi-linux-arm64-musl": + optional: true + "@ast-grep/napi-linux-x64-gnu": + optional: true + "@ast-grep/napi-linux-x64-musl": + optional: true + "@ast-grep/napi-win32-arm64-msvc": + optional: true + "@ast-grep/napi-win32-ia32-msvc": + optional: true + "@ast-grep/napi-win32-x64-msvc": + optional: true + checksum: 10c0/9038ca27e64a83268ed6b23a6e860ee51c4cf5e1d72a6bd0b9130a33730240ecc5bf1035260d29443b488e53fb9c941eabea7e7953e11919e357454a9c8ce6c7 + languageName: node + linkType: hard + +"@emnapi/core@npm:^1.5.0": + version: 1.11.3 + resolution: "@emnapi/core@npm:1.11.3" + dependencies: + "@emnapi/wasi-threads": "npm:1.2.3" + tslib: "npm:^2.4.0" + checksum: 10c0/4ca08d349a82d5d2887ccc9e12df630877b0412ddcd59b9faee61e3c3947ccead27a18257a18bfe17abdf2b0709857808ad75d423ac49edd50c32fb140a7ed6e + languageName: node + linkType: hard + +"@emnapi/runtime@npm:^1.5.0": + version: 1.11.3 + resolution: "@emnapi/runtime@npm:1.11.3" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/a00f1020fefb9d4145c367f93a9fddb383a00da8ffd7871e20b19659890379b83aeecb9f84d7d0eda5456343f4a09eb05b0acb5153b0d3d889539dedb1ed87c3 + languageName: node + linkType: hard + +"@emnapi/wasi-threads@npm:1.2.3": + version: 1.2.3 + resolution: "@emnapi/wasi-threads@npm:1.2.3" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/5aed84bc5dbe867973b20406ca1ed95661a4892ecaef80378fdf2d37424b3f7b9c428df8a3e1d82b783a3345a530032bf049e699e1f113ea52203c3e9b4e6ce5 + languageName: node + linkType: hard + +"@internationalized/date@npm:^3.12.3": + version: 3.12.3 + resolution: "@internationalized/date@npm:3.12.3" + dependencies: + "@swc/helpers": "npm:^0.5.0" + checksum: 10c0/d99ef774b45326ecc3e96642b234de4e92440e4cc929f11141f91403515f1cdb321e66c40f4f71cc4140069776b78a8231c3a72966f3024018ee88da3c4a2726 + languageName: node + linkType: hard + +"@internationalized/number@npm:^3.6.7": + version: 3.6.7 + resolution: "@internationalized/number@npm:3.6.7" + dependencies: + "@swc/helpers": "npm:^0.5.0" + checksum: 10c0/b5d60cccc05e4549eedcaee4ef3fc7b972532321e841bce1251c4993f1f7b3416c2b92e7fddd22292ed494140fb3ca6eb6dafc6cbe37e267483e9510954a618f + languageName: node + linkType: hard + +"@internationalized/string@npm:^3.2.10": + version: 3.2.10 + resolution: "@internationalized/string@npm:3.2.10" + dependencies: + "@swc/helpers": "npm:^0.5.0" + checksum: 10c0/c9d3fa0846ab6afe67ca8342bec551c659ece9aa283972e7a3255b7e0976f6389ccadd3112f64470af6096bb68d0889fb8ff7afa1bc800ef88d15a122ead8cb5 + languageName: node + linkType: hard + +"@module-federation/error-codes@npm:0.22.0": + version: 0.22.0 + resolution: "@module-federation/error-codes@npm:0.22.0" + checksum: 10c0/a9b25e8c930971e146e6352f482f915f1b54965ce54706984e834a87be714d30caebbd3946f9eb408e7821b2cc326b90787eeb2f8306edf1d322d9931543a139 + languageName: node + linkType: hard + +"@module-federation/runtime-core@npm:0.22.0": + version: 0.22.0 + resolution: "@module-federation/runtime-core@npm:0.22.0" + dependencies: + "@module-federation/error-codes": "npm:0.22.0" + "@module-federation/sdk": "npm:0.22.0" + checksum: 10c0/0406c26b119065dca23a8fb65872b8ab5794984d5d82984ed625c433658693050a8a800cde8c97cc1572b0bc154a7824fa9db5bb05106b7250643e799ba7091d + languageName: node + linkType: hard + +"@module-federation/runtime-tools@npm:0.22.0": + version: 0.22.0 + resolution: "@module-federation/runtime-tools@npm:0.22.0" + dependencies: + "@module-federation/runtime": "npm:0.22.0" + "@module-federation/webpack-bundler-runtime": "npm:0.22.0" + checksum: 10c0/fbe76616fb176ce03550e3ce2bb43fa5d44c12d7d0939593f29dab5658accfb559b857df4180f7f681dc601aab928658cd9b49a78daad866089390b820854fbd + languageName: node + linkType: hard + +"@module-federation/runtime@npm:0.22.0": + version: 0.22.0 + resolution: "@module-federation/runtime@npm:0.22.0" + dependencies: + "@module-federation/error-codes": "npm:0.22.0" + "@module-federation/runtime-core": "npm:0.22.0" + "@module-federation/sdk": "npm:0.22.0" + checksum: 10c0/f9cfaf7f8599a215195cb612a5d4532d4399cc8eb5a928ced60c4bdf0e7e2028849cdc384fa3f1506f9e7e0e112f74f6c30a5a76136dc56e155012d111ea075b + languageName: node + linkType: hard + +"@module-federation/sdk@npm:0.22.0": + version: 0.22.0 + resolution: "@module-federation/sdk@npm:0.22.0" + checksum: 10c0/c09ba0147368151b67ba33b9174ef451a028e1709d2208aa811cacc1ae4efcae0f1987f02119f9b54754ee6430af3610e357c9b744147f112a25d8f7564f8041 + languageName: node + linkType: hard + +"@module-federation/webpack-bundler-runtime@npm:0.22.0": + version: 0.22.0 + resolution: "@module-federation/webpack-bundler-runtime@npm:0.22.0" + dependencies: + "@module-federation/runtime": "npm:0.22.0" + "@module-federation/sdk": "npm:0.22.0" + checksum: 10c0/4c1354b881ffc0c1521f1d676c9301db0b0d59186c386dde4dbb6d33f00fdb16bf118e85cfc38e2ffb36084fa87df8390d415a41c0c93b33bd0e5460a9a934f5 + languageName: node + linkType: hard + +"@napi-rs/wasm-runtime@npm:1.0.7": + version: 1.0.7 + resolution: "@napi-rs/wasm-runtime@npm:1.0.7" + dependencies: + "@emnapi/core": "npm:^1.5.0" + "@emnapi/runtime": "npm:^1.5.0" + "@tybys/wasm-util": "npm:^0.10.1" + checksum: 10c0/2d8635498136abb49d6dbf7395b78c63422292240963bf055f307b77aeafbde57ae2c0ceaaef215601531b36d6eb92a2cdd6f5ba90ed2aa8127c27aff9c4ae55 + languageName: node + linkType: hard + +"@parcel/macros@npm:^2.16.3": + version: 2.16.4 + resolution: "@parcel/macros@npm:2.16.4" + checksum: 10c0/e2000bffc469e728871fd16caa5c7797d576d08e1b3a881a204e5152a40d838d21efe0a01063b409b7e6e81b40c01c5c38475ab30b904dfed493ca106bb59cfe + languageName: node + linkType: hard + +"@parcel/source-map@npm:^2.1.1": + version: 2.1.1 + resolution: "@parcel/source-map@npm:2.1.1" + dependencies: + detect-libc: "npm:^1.0.3" + checksum: 10c0/cea8450e152666be413556f0d100f125e81646bffc497e7c792bd9fc5067d052f1a008c8404ce1cd3a587d58b9ef57207ada89149cf2c705e71b1978308045f6 + languageName: node + linkType: hard + +"@react-spectrum/s2@npm:latest": + version: 1.6.0 + resolution: "@react-spectrum/s2@npm:1.6.0" + dependencies: + "@internationalized/date": "npm:^3.12.3" + "@internationalized/number": "npm:^3.6.7" + "@parcel/macros": "npm:^2.16.3" + "@react-types/shared": "npm:^3.36.1" + react-aria: "npm:3.51.0" + react-aria-components: "npm:1.20.0" + react-stately: "npm:3.49.0" + peerDependencies: + react: ^19.0.0-rc.1 + react-dom: ^19.0.0-rc.1 + checksum: 10c0/b223109c9c6a809de6a3d3d78bb0fecfb3a8075c265333dd48c054ae64c723a10e2bfcc73be85f15096b74f6dd75b9f75672dc74edfa4a417781bb3260844040 + languageName: node + linkType: hard + +"@react-types/shared@npm:^3.36.1": + version: 3.36.1 + resolution: "@react-types/shared@npm:3.36.1" + peerDependencies: + react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + checksum: 10c0/377e9287025f046f3b088e73655a53813ce60f08d569094c098fd46f45d4eac1d288c5005bcb8a5a388aa9d1245763ef11e6fa86c00a2355b43f24fde447ca54 + languageName: node + linkType: hard + +"@rsbuild/core@npm:~1.7.3": + version: 1.7.6 + resolution: "@rsbuild/core@npm:1.7.6" + dependencies: + "@rspack/core": "npm:~1.7.10" + "@rspack/lite-tapable": "npm:~1.1.0" + "@swc/helpers": "npm:^0.5.20" + core-js: "npm:~3.47.0" + jiti: "npm:^2.6.1" + bin: + rsbuild: ./bin/rsbuild.js + checksum: 10c0/f4681387532d8645dacf8721bfc8a3c5dbda79dae8db246771d0bd12039393dc797215f00ce4a5e3a51d4febdf16cd7a6b129098b3e444ca967e85921484ae7f + languageName: node + linkType: hard + +"@rsbuild/plugin-react@npm:^1.4.5": + version: 1.4.6 + resolution: "@rsbuild/plugin-react@npm:1.4.6" + dependencies: + "@rspack/plugin-react-refresh": "npm:^1.6.1" + react-refresh: "npm:^0.18.0" + peerDependencies: + "@rsbuild/core": ^1.0.0 || ^2.0.0-0 + peerDependenciesMeta: + "@rsbuild/core": + optional: true + checksum: 10c0/e878c565ecdb23a1b08050adcd05e06c2c07dd8fc06be3d4de52b4976f593c27a823c42a2fbd21628ff70a24ad00f00171e889615a5b291a3bc02834e009f96f + languageName: node + linkType: hard + +"@rslib/core@npm:^0.19.6": + version: 0.19.6 + resolution: "@rslib/core@npm:0.19.6" + dependencies: + "@rsbuild/core": "npm:~1.7.3" + rsbuild-plugin-dts: "npm:0.19.6" + peerDependencies: + "@microsoft/api-extractor": ^7 + typescript: ^5 + peerDependenciesMeta: + "@microsoft/api-extractor": + optional: true + typescript: + optional: true + bin: + rslib: bin/rslib.js + checksum: 10c0/9359da1d84881877bc73ad35b134a88bcfb7a89c663f019e8646843d3567465b39d64c1fd1edf0a9df60a2bd6590d588a05ae0d4b3ada18980947f7de4abde2d + languageName: node + linkType: hard + +"@rspack/binding-darwin-arm64@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding-darwin-arm64@npm:1.7.12" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@rspack/binding-darwin-x64@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding-darwin-x64@npm:1.7.12" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@rspack/binding-linux-arm64-gnu@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding-linux-arm64-gnu@npm:1.7.12" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@rspack/binding-linux-arm64-musl@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding-linux-arm64-musl@npm:1.7.12" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@rspack/binding-linux-x64-gnu@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding-linux-x64-gnu@npm:1.7.12" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@rspack/binding-linux-x64-musl@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding-linux-x64-musl@npm:1.7.12" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@rspack/binding-wasm32-wasi@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding-wasm32-wasi@npm:1.7.12" + dependencies: + "@napi-rs/wasm-runtime": "npm:1.0.7" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@rspack/binding-win32-arm64-msvc@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding-win32-arm64-msvc@npm:1.7.12" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@rspack/binding-win32-ia32-msvc@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding-win32-ia32-msvc@npm:1.7.12" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@rspack/binding-win32-x64-msvc@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding-win32-x64-msvc@npm:1.7.12" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@rspack/binding@npm:1.7.12": + version: 1.7.12 + resolution: "@rspack/binding@npm:1.7.12" + dependencies: + "@rspack/binding-darwin-arm64": "npm:1.7.12" + "@rspack/binding-darwin-x64": "npm:1.7.12" + "@rspack/binding-linux-arm64-gnu": "npm:1.7.12" + "@rspack/binding-linux-arm64-musl": "npm:1.7.12" + "@rspack/binding-linux-x64-gnu": "npm:1.7.12" + "@rspack/binding-linux-x64-musl": "npm:1.7.12" + "@rspack/binding-wasm32-wasi": "npm:1.7.12" + "@rspack/binding-win32-arm64-msvc": "npm:1.7.12" + "@rspack/binding-win32-ia32-msvc": "npm:1.7.12" + "@rspack/binding-win32-x64-msvc": "npm:1.7.12" + dependenciesMeta: + "@rspack/binding-darwin-arm64": + optional: true + "@rspack/binding-darwin-x64": + optional: true + "@rspack/binding-linux-arm64-gnu": + optional: true + "@rspack/binding-linux-arm64-musl": + optional: true + "@rspack/binding-linux-x64-gnu": + optional: true + "@rspack/binding-linux-x64-musl": + optional: true + "@rspack/binding-wasm32-wasi": + optional: true + "@rspack/binding-win32-arm64-msvc": + optional: true + "@rspack/binding-win32-ia32-msvc": + optional: true + "@rspack/binding-win32-x64-msvc": + optional: true + checksum: 10c0/0bca963309c75418148ce67f9c102b11662844bc2412257da9e4fb56917bf279f37d5ebd8f6d641405bcde54d43384adc5693e22bc15c571f949a99a90aa6ec9 + languageName: node + linkType: hard + +"@rspack/core@npm:~1.7.10": + version: 1.7.12 + resolution: "@rspack/core@npm:1.7.12" + dependencies: + "@module-federation/runtime-tools": "npm:0.22.0" + "@rspack/binding": "npm:1.7.12" + "@rspack/lite-tapable": "npm:1.1.0" + peerDependencies: + "@swc/helpers": ">=0.5.1" + peerDependenciesMeta: + "@swc/helpers": + optional: true + checksum: 10c0/575737cffae45720563a8f5bc933058a0c6c42dbae1a41b53f98c44281146eb5f917f118c866d53aa8e0f2b4533dae092c564f27412affb58ae3dbeb853266b4 + languageName: node + linkType: hard + +"@rspack/lite-tapable@npm:1.1.0": + version: 1.1.0 + resolution: "@rspack/lite-tapable@npm:1.1.0" + checksum: 10c0/15059d1da73192b150339ceba3142a2d0073fa298dad9a497cc8c6037c597c3a982ed4c88dc50afa7b70d0757df1b47af7ae407cfe8acd31d333d524b84a7a4b + languageName: node + linkType: hard + +"@rspack/lite-tapable@npm:~1.1.0": + version: 1.1.5 + resolution: "@rspack/lite-tapable@npm:1.1.5" + checksum: 10c0/b3ddc59c824dff06981d3fd3ced577f7031fd88aa2749e8fba0d6b6566d40e38ccabe0f5c48cc8df1836cb1a1ba1afe936b7659528c03ab153f8351dbeea746b + languageName: node + linkType: hard + +"@rspack/plugin-react-refresh@npm:^1.6.1": + version: 1.6.2 + resolution: "@rspack/plugin-react-refresh@npm:1.6.2" + dependencies: + error-stack-parser: "npm:^2.1.4" + peerDependencies: + react-refresh: ">=0.10.0 <1.0.0" + webpack-hot-middleware: 2.x + peerDependenciesMeta: + webpack-hot-middleware: + optional: true + checksum: 10c0/a1e2eb42dc870ec8438c5a80fddf48c60b21084b694264ae8f94d15ed1d4ad8fff64f1e97c9f2f41303c9cb32bffab788c3f509aa8ee19d9f8834a04a95eb09b + languageName: node + linkType: hard + +"@swc/core-darwin-arm64@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-darwin-arm64@npm:1.15.47" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@swc/core-darwin-x64@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-darwin-x64@npm:1.15.47" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@swc/core-linux-arm-gnueabihf@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.15.47" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@swc/core-linux-arm64-gnu@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-linux-arm64-gnu@npm:1.15.47" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@swc/core-linux-arm64-musl@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-linux-arm64-musl@npm:1.15.47" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@swc/core-linux-ppc64-gnu@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-linux-ppc64-gnu@npm:1.15.47" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@swc/core-linux-s390x-gnu@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-linux-s390x-gnu@npm:1.15.47" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@swc/core-linux-x64-gnu@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-linux-x64-gnu@npm:1.15.47" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@swc/core-linux-x64-musl@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-linux-x64-musl@npm:1.15.47" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@swc/core-win32-arm64-msvc@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-win32-arm64-msvc@npm:1.15.47" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@swc/core-win32-ia32-msvc@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-win32-ia32-msvc@npm:1.15.47" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@swc/core-win32-x64-msvc@npm:1.15.47": + version: 1.15.47 + resolution: "@swc/core-win32-x64-msvc@npm:1.15.47" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@swc/core@npm:^1.15.3": + version: 1.15.47 + resolution: "@swc/core@npm:1.15.47" + dependencies: + "@swc/core-darwin-arm64": "npm:1.15.47" + "@swc/core-darwin-x64": "npm:1.15.47" + "@swc/core-linux-arm-gnueabihf": "npm:1.15.47" + "@swc/core-linux-arm64-gnu": "npm:1.15.47" + "@swc/core-linux-arm64-musl": "npm:1.15.47" + "@swc/core-linux-ppc64-gnu": "npm:1.15.47" + "@swc/core-linux-s390x-gnu": "npm:1.15.47" + "@swc/core-linux-x64-gnu": "npm:1.15.47" + "@swc/core-linux-x64-musl": "npm:1.15.47" + "@swc/core-win32-arm64-msvc": "npm:1.15.47" + "@swc/core-win32-ia32-msvc": "npm:1.15.47" + "@swc/core-win32-x64-msvc": "npm:1.15.47" + "@swc/counter": "npm:^0.1.3" + "@swc/types": "npm:^0.1.27" + peerDependencies: + "@swc/helpers": ">=0.5.17" + dependenciesMeta: + "@swc/core-darwin-arm64": + optional: true + "@swc/core-darwin-x64": + optional: true + "@swc/core-linux-arm-gnueabihf": + optional: true + "@swc/core-linux-arm64-gnu": + optional: true + "@swc/core-linux-arm64-musl": + optional: true + "@swc/core-linux-ppc64-gnu": + optional: true + "@swc/core-linux-s390x-gnu": + optional: true + "@swc/core-linux-x64-gnu": + optional: true + "@swc/core-linux-x64-musl": + optional: true + "@swc/core-win32-arm64-msvc": + optional: true + "@swc/core-win32-ia32-msvc": + optional: true + "@swc/core-win32-x64-msvc": + optional: true + peerDependenciesMeta: + "@swc/helpers": + optional: true + checksum: 10c0/34ccbb3ae5db0af520934abfdf2505b8490128b48863d9a2e6db2d8787e2d7415318000c92fd32ebe351b24d93f36f52c58f35b9a98e60a4010b34a1af2c3d5e + languageName: node + linkType: hard + +"@swc/counter@npm:^0.1.3": + version: 0.1.3 + resolution: "@swc/counter@npm:0.1.3" + checksum: 10c0/8424f60f6bf8694cfd2a9bca45845bce29f26105cda8cf19cdb9fd3e78dc6338699e4db77a89ae449260bafa1cc6bec307e81e7fb96dbf7dcfce0eea55151356 + languageName: node + linkType: hard + +"@swc/helpers@npm:^0.5.0, @swc/helpers@npm:^0.5.20": + version: 0.5.23 + resolution: "@swc/helpers@npm:0.5.23" + dependencies: + tslib: "npm:^2.8.0" + checksum: 10c0/02da7b4df465693933ecd4851cc193ec729c309939c8a84eccae5ec0010aafc3894e713b8ef8d13a6ba401759f0e900c88e2dcfef5872c27bb91e70f73275cce + languageName: node + linkType: hard + +"@swc/types@npm:^0.1.27": + version: 0.1.28 + resolution: "@swc/types@npm:0.1.28" + dependencies: + "@swc/counter": "npm:^0.1.3" + checksum: 10c0/7f2e959a7ee000ec4216acc6b7634e2d2fbe404b6ad3adf72bb91970a67359d7d429f60556342784dbe66912c7c987426683159e749332581a87e04de0524357 + languageName: node + linkType: hard + +"@tybys/wasm-util@npm:^0.10.1": + version: 0.10.3 + resolution: "@tybys/wasm-util@npm:0.10.3" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/fd2bd2a79c6cd8c79ed1cf7a0fa375c64589264c88a27acaf9756d556b453ea222b62a4f68dd2fbb8b3a78b6bab3b1f4fb2431b6afc6aeda8344b53a521a1cd3 + languageName: node + linkType: hard + +"@types/react@npm:^19.2.14": + version: 19.2.18 + resolution: "@types/react@npm:19.2.18" + dependencies: + csstype: "npm:^3.2.2" + checksum: 10c0/d04216172b4b4362b310017c210dfbe019fb4f4e7dffd0313e70b3acb3051d5c3e76e7e84e3cf4c6a3c824993ffadfe3949e589a6398a09d4200e7670e2962de + languageName: node + linkType: hard + +"acorn@npm:^8.14.0": + version: 8.18.0 + resolution: "acorn@npm:8.18.0" + bin: + acorn: bin/acorn + checksum: 10c0/be771be2135cc07910cf76f444ad514d7dcfd6d4a8026e597e93155275abc8ef61eee12211d52146e9d962874269b634f397464942087be013c89d0c54c5f8e5 + languageName: node + linkType: hard + +"aria-hidden@npm:^1.2.3": + version: 1.2.6 + resolution: "aria-hidden@npm:1.2.6" + dependencies: + tslib: "npm:^2.0.0" + checksum: 10c0/7720cb539497a9f760f68f98a4b30f22c6767aa0e72fa7d58279f7c164e258fc38b2699828f8de881aab0fc8e9c56d1313a3f1a965046fc0381a554dbc72b54a + languageName: node + linkType: hard + +"client-only@npm:^0.0.1": + version: 0.0.1 + resolution: "client-only@npm:0.0.1" + checksum: 10c0/9d6cfd0c19e1c96a434605added99dff48482152af791ec4172fb912a71cff9027ff174efd8cdb2160cc7f377543e0537ffc462d4f279bc4701de3f2a3c4b358 + languageName: node + linkType: hard + +"clsx@npm:^2.0.0": + version: 2.1.1 + resolution: "clsx@npm:2.1.1" + checksum: 10c0/c4c8eb865f8c82baab07e71bfa8897c73454881c4f99d6bc81585aecd7c441746c1399d08363dc096c550cceaf97bd4ce1e8854e1771e9998d9f94c4fe075839 + languageName: node + linkType: hard + +"core-js@npm:~3.47.0": + version: 3.47.0 + resolution: "core-js@npm:3.47.0" + checksum: 10c0/9b1a7088b7c660c7b8f1d4c90bb1816a8d5352ebdcb7bc742e3a0e4eb803316b5aa17bacb8769522342196351a5430178f46914644f2bfdb94ce0ced3c7fd523 + languageName: node + linkType: hard + +"csstype@npm:^3.2.2": + version: 3.2.3 + resolution: "csstype@npm:3.2.3" + checksum: 10c0/cd29c51e70fa822f1cecd8641a1445bed7063697469d35633b516e60fe8c1bde04b08f6c5b6022136bb669b64c63d4173af54864510fbb4ee23281801841a3ce + languageName: node + linkType: hard + +"detect-libc@npm:^1.0.3": + version: 1.0.3 + resolution: "detect-libc@npm:1.0.3" + bin: + detect-libc: ./bin/detect-libc.js + checksum: 10c0/4da0deae9f69e13bc37a0902d78bf7169480004b1fed3c19722d56cff578d16f0e11633b7fbf5fb6249181236c72e90024cbd68f0b9558ae06e281f47326d50d + languageName: node + linkType: hard + +"error-stack-parser@npm:^2.1.4": + version: 2.1.4 + resolution: "error-stack-parser@npm:2.1.4" + dependencies: + stackframe: "npm:^1.3.4" + checksum: 10c0/7679b780043c98b01fc546725484e0cfd3071bf5c906bbe358722972f04abf4fc3f0a77988017665bab367f6ef3fc2d0185f7528f45966b83e7c99c02d5509b9 + languageName: node + linkType: hard + +"jiti@npm:^2.6.1": + version: 2.7.0 + resolution: "jiti@npm:2.7.0" + bin: + jiti: lib/jiti-cli.mjs + checksum: 10c0/1b1e2310a490dce1aeea3da5f5dfe18273516c20ce48be2e98eb8ea452d5f3dcc8fd0cfd6d28b4052a24c5dbab6e3089b2d7e79f0bce7915b10d750929563c42 + languageName: node + linkType: hard + +"napi-wasm@npm:^1.0.1": + version: 1.1.3 + resolution: "napi-wasm@npm:1.1.3" + checksum: 10c0/7c365ab9dc59e6f20d7b7886279ecc03ffc7c3d502ed66d32652e3681c3a56c372f00f29b110aefd9b074a6bab6a997e9b602968c18622e2586818f417e41a5d + languageName: node + linkType: hard + +"react-aria-components@npm:1.20.0": + version: 1.20.0 + resolution: "react-aria-components@npm:1.20.0" + dependencies: + "@internationalized/date": "npm:^3.12.3" + "@internationalized/string": "npm:^3.2.10" + "@react-types/shared": "npm:^3.36.1" + "@swc/helpers": "npm:^0.5.0" + client-only: "npm:^0.0.1" + react-aria: "npm:3.51.0" + react-stately: "npm:3.49.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + checksum: 10c0/3ffc9428985b165a82b1cc02c883e6b31f3271be0f227e41b6d2de1ac2b2f111b359b8c410dae264d89d18bbe3b807e3c376ab28810dc8e00420d65e9cf32120 + languageName: node + linkType: hard + +"react-aria@npm:3.51.0": + version: 3.51.0 + resolution: "react-aria@npm:3.51.0" + dependencies: + "@internationalized/date": "npm:^3.12.3" + "@internationalized/number": "npm:^3.6.7" + "@internationalized/string": "npm:^3.2.10" + "@react-types/shared": "npm:^3.36.1" + "@swc/helpers": "npm:^0.5.0" + aria-hidden: "npm:^1.2.3" + clsx: "npm:^2.0.0" + react-stately: "npm:3.49.0" + use-sync-external-store: "npm:^1.6.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + checksum: 10c0/047296e063c8efbc79cc3905ad0e338c7b5918b81e44fadd0ac3f1a2d6728cfc71104ff378e86ef3dc8419e1b3f7174ff9cc1c1b0dd085e9fdfbc95f418196af + languageName: node + linkType: hard + +"react-dom@npm:^19.2.0": + version: 19.2.8 + resolution: "react-dom@npm:19.2.8" + dependencies: + scheduler: "npm:^0.27.0" + peerDependencies: + react: ^19.2.8 + checksum: 10c0/41ba2247b76f687fcfe5bbc99f514d6b851d8c8041c2f5ded36ed05bd7fdc5208cacbac9de51e3e6633e77f96f44cec9f0d4a5a55184dba4e00738f224439134 + languageName: node + linkType: hard + +"react-refresh@npm:^0.18.0": + version: 0.18.0 + resolution: "react-refresh@npm:0.18.0" + checksum: 10c0/34a262f7fd803433a534f50deb27a148112a81adcae440c7d1cbae7ef14d21ea8f2b3d783e858cb7698968183b77755a38b4d4b5b1d79b4f4689c2f6d358fff2 + languageName: node + linkType: hard + +"react-stately@npm:3.49.0": + version: 3.49.0 + resolution: "react-stately@npm:3.49.0" + dependencies: + "@internationalized/date": "npm:^3.12.3" + "@internationalized/number": "npm:^3.6.7" + "@internationalized/string": "npm:^3.2.10" + "@react-types/shared": "npm:^3.36.1" + "@swc/helpers": "npm:^0.5.0" + use-sync-external-store: "npm:^1.6.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + checksum: 10c0/6f569dffc1c0bd2900d028c705b35283031abe1f1029e519a342c4f7854b29725aecb758ad2148902101177c202e5c8e386a34f09cda2045cb330a6c3212cb20 + languageName: node + linkType: hard + +"react@npm:^19.2.4": + version: 19.2.8 + resolution: "react@npm:19.2.8" + checksum: 10c0/5f86bdb56426652fd6d989d30a6f2e603c057272c47c9ca3a3fbe190a3a39ee9ccce937d63cfc039717abed1b8891d6a499134bc35311acc07eafdacd86537cd + languageName: node + linkType: hard + +"rsbuild-plugin-dts@npm:0.19.6": + version: 0.19.6 + resolution: "rsbuild-plugin-dts@npm:0.19.6" + dependencies: + "@ast-grep/napi": "npm:0.37.0" + peerDependencies: + "@microsoft/api-extractor": ^7 + "@rsbuild/core": 1.x + "@typescript/native-preview": 7.x + typescript: ^5 + peerDependenciesMeta: + "@microsoft/api-extractor": + optional: true + "@typescript/native-preview": + optional: true + typescript: + optional: true + checksum: 10c0/fcf5eb3a1ce57aa042ea3411b2aa1d00c708abb619548041de945227afc8655e460dd32509c3e604d82a32704d61d1c1e81d54a22625c88e50fc152653980c48 + languageName: node + linkType: hard + +"s2-rslib@workspace:.": + version: 0.0.0-use.local + resolution: "s2-rslib@workspace:." + dependencies: + "@react-spectrum/s2": "npm:latest" + "@rsbuild/plugin-react": "npm:^1.4.5" + "@rslib/core": "npm:^0.19.6" + "@types/react": "npm:^19.2.14" + react: "npm:^19.2.4" + react-dom: "npm:^19.2.0" + typescript: "npm:^5.9.3" + unplugin-parcel-macros: "npm:^0.2.0" + languageName: unknown + linkType: soft + +"scheduler@npm:^0.27.0": + version: 0.27.0 + resolution: "scheduler@npm:0.27.0" + checksum: 10c0/4f03048cb05a3c8fddc45813052251eca00688f413a3cee236d984a161da28db28ba71bd11e7a3dd02f7af84ab28d39fb311431d3b3772fed557945beb00c452 + languageName: node + linkType: hard + +"stackframe@npm:^1.3.4": + version: 1.3.4 + resolution: "stackframe@npm:1.3.4" + checksum: 10c0/18410f7a1e0c5d211a4effa83bdbf24adbe8faa8c34db52e1cd3e89837518c592be60b60d8b7270ac53eeeb8b807cd11b399a41667f6c9abb41059c3ccc8a989 + languageName: node + linkType: hard + +"tslib@npm:^2.0.0, tslib@npm:^2.4.0, tslib@npm:^2.8.0": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 + languageName: node + linkType: hard + +"typescript@npm:^5.9.3": + version: 5.9.3 + resolution: "typescript@npm:5.9.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/6bd7552ce39f97e711db5aa048f6f9995b53f1c52f7d8667c1abdc1700c68a76a308f579cd309ce6b53646deb4e9a1be7c813a93baaf0a28ccd536a30270e1c5 + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A^5.9.3#optional!builtin": + version: 5.9.3 + resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=5786d5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/ad09fdf7a756814dce65bc60c1657b40d44451346858eea230e10f2e95a289d9183b6e32e5c11e95acc0ccc214b4f36289dcad4bf1886b0adb84d711d336a430 + languageName: node + linkType: hard + +"unplugin-parcel-macros-darwin-arm64@npm:0.2.0": + version: 0.2.0 + resolution: "unplugin-parcel-macros-darwin-arm64@npm:0.2.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"unplugin-parcel-macros-darwin-x64@npm:0.2.0": + version: 0.2.0 + resolution: "unplugin-parcel-macros-darwin-x64@npm:0.2.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"unplugin-parcel-macros-linux-arm64-gnu@npm:0.2.0": + version: 0.2.0 + resolution: "unplugin-parcel-macros-linux-arm64-gnu@npm:0.2.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"unplugin-parcel-macros-linux-arm64-musl@npm:0.2.0": + version: 0.2.0 + resolution: "unplugin-parcel-macros-linux-arm64-musl@npm:0.2.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"unplugin-parcel-macros-linux-x64-gnu@npm:0.2.0": + version: 0.2.0 + resolution: "unplugin-parcel-macros-linux-x64-gnu@npm:0.2.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"unplugin-parcel-macros-linux-x64-musl@npm:0.2.0": + version: 0.2.0 + resolution: "unplugin-parcel-macros-linux-x64-musl@npm:0.2.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"unplugin-parcel-macros-win32-x64-msvc@npm:0.2.0": + version: 0.2.0 + resolution: "unplugin-parcel-macros-win32-x64-msvc@npm:0.2.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"unplugin-parcel-macros@npm:^0.2.0": + version: 0.2.0 + resolution: "unplugin-parcel-macros@npm:0.2.0" + dependencies: + "@parcel/source-map": "npm:^2.1.1" + "@swc/core": "npm:^1.15.3" + napi-wasm: "npm:^1.0.1" + unplugin: "npm:^1.9.0" + unplugin-parcel-macros-darwin-arm64: "npm:0.2.0" + unplugin-parcel-macros-darwin-x64: "npm:0.2.0" + unplugin-parcel-macros-linux-arm64-gnu: "npm:0.2.0" + unplugin-parcel-macros-linux-arm64-musl: "npm:0.2.0" + unplugin-parcel-macros-linux-x64-gnu: "npm:0.2.0" + unplugin-parcel-macros-linux-x64-musl: "npm:0.2.0" + unplugin-parcel-macros-win32-x64-msvc: "npm:0.2.0" + dependenciesMeta: + unplugin-parcel-macros-darwin-arm64: + optional: true + unplugin-parcel-macros-darwin-x64: + optional: true + unplugin-parcel-macros-linux-arm64-gnu: + optional: true + unplugin-parcel-macros-linux-arm64-musl: + optional: true + unplugin-parcel-macros-linux-x64-gnu: + optional: true + unplugin-parcel-macros-linux-x64-musl: + optional: true + unplugin-parcel-macros-win32-x64-msvc: + optional: true + checksum: 10c0/4a9f99d9a48dcbedd2a4ae774376ad8130d1fb2c6dfe348871d41a4d4d0c22f0e13f8478363413bb28382b7712093a2eed388d88f6caecce87f601ae62f54fab + languageName: node + linkType: hard + +"unplugin@npm:1.16.1": + version: 1.16.1 + resolution: "unplugin@npm:1.16.1" + dependencies: + acorn: "npm:^8.14.0" + webpack-virtual-modules: "npm:^0.6.2" + checksum: 10c0/dd5f8c5727d0135847da73cf03fb199107f1acf458167034886fda3405737dab871ad3926431b4f70e1e82cdac482ac1383cea4019d782a68515c8e3e611b6cc + languageName: node + linkType: hard + +"unplugin@patch:unplugin@npm%3A1.16.1#~/.yarn/patches/unplugin-npm-1.16.1-77bc28083a.patch": + version: 1.16.1 + resolution: "unplugin@patch:unplugin@npm%3A1.16.1#~/.yarn/patches/unplugin-npm-1.16.1-77bc28083a.patch::version=1.16.1&hash=2c7984" + dependencies: + acorn: "npm:^8.14.0" + webpack-virtual-modules: "npm:^0.6.2" + checksum: 10c0/bd9c6c60ce55b00fdbbda1618c1162ad3fde0a2af6955c1bd7c4beb94375aabfcd47dbfab5bff19b23e64344a861be0cdd19437fbbcb4737d44dd53fdfa408e8 + languageName: node + linkType: hard + +"use-sync-external-store@npm:^1.6.0": + version: 1.6.0 + resolution: "use-sync-external-store@npm:1.6.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10c0/35e1179f872a53227bdf8a827f7911da4c37c0f4091c29b76b1e32473d1670ebe7bcd880b808b7549ba9a5605c233350f800ffab963ee4a4ee346ee983b6019b + languageName: node + linkType: hard + +"webpack-virtual-modules@npm:^0.6.2": + version: 0.6.2 + resolution: "webpack-virtual-modules@npm:0.6.2" + checksum: 10c0/5ffbddf0e84bf1562ff86cf6fcf039c74edf09d78358a6904a09bbd4484e8bb6812dc385fe14330b715031892dcd8423f7a88278b57c9f5002c84c2860179add + languageName: node + linkType: hard diff --git a/packages/@internationalized/date/src/calendars/EthiopicCalendar.ts b/packages/@internationalized/date/src/calendars/EthiopicCalendar.ts index 5169328b538..c1398576da9 100644 --- a/packages/@internationalized/date/src/calendars/EthiopicCalendar.ts +++ b/packages/@internationalized/date/src/calendars/EthiopicCalendar.ts @@ -37,6 +37,12 @@ function ceToJulianDay(epoch: number, year: number, month: number, day: number): function julianDayToCE(epoch: number, jd: number) { let year = Math.floor((4 * (jd - epoch)) / 1461); + // Years are 365 * year + floor(year / 4) days long, slightly less than the + // 365.25 day average assumed by the estimate above. As a result, the estimate + // can be one year too low on the first day of a year (3 of every 4 years). + if (jd >= ceToJulianDay(epoch, year + 1, 1, 1)) { + year++; + } let month = 1 + Math.floor((jd - ceToJulianDay(epoch, year, 1, 1)) / 30); let day = jd + 1 - ceToJulianDay(epoch, year, month, 1); return [year, month, day]; diff --git a/packages/@internationalized/date/tests/conversion.test.js b/packages/@internationalized/date/tests/conversion.test.js index 0c100c91b21..8d40c0c4cd9 100644 --- a/packages/@internationalized/date/tests/conversion.test.js +++ b/packages/@internationalized/date/tests/conversion.test.js @@ -14,6 +14,7 @@ import { BuddhistCalendar, CalendarDate, CalendarDateTime, + CopticCalendar, EthiopicAmeteAlemCalendar, EthiopicCalendar, GregorianCalendar, @@ -533,6 +534,50 @@ describe('CalendarDate conversion', function () { new CalendarDate(new EthiopicCalendar(), 'AA', 4294, 2, 13) ); }); + + it('gregorian to ethiopic on new year', function () { + // 2022-09-11 is Ethiopian New Year (1 Meskerem 2015). See #10390. + let date = new CalendarDate(2022, 9, 10); + expect(toCalendar(date, new EthiopicCalendar())).toEqual( + new CalendarDate(new EthiopicCalendar(), 'AM', 2014, 13, 5) + ); + + date = new CalendarDate(2022, 9, 11); + expect(toCalendar(date, new EthiopicCalendar())).toEqual( + new CalendarDate(new EthiopicCalendar(), 'AM', 2015, 1, 1) + ); + + date = new CalendarDate(2022, 9, 12); + expect(toCalendar(date, new EthiopicCalendar())).toEqual( + new CalendarDate(new EthiopicCalendar(), 'AM', 2015, 1, 2) + ); + + // 2015 is a leap year, so the following new year is one day later. + date = new CalendarDate(2023, 9, 11); + expect(toCalendar(date, new EthiopicCalendar())).toEqual( + new CalendarDate(new EthiopicCalendar(), 'AM', 2015, 13, 6) + ); + + date = new CalendarDate(2023, 9, 12); + expect(toCalendar(date, new EthiopicCalendar())).toEqual( + new CalendarDate(new EthiopicCalendar(), 'AM', 2016, 1, 1) + ); + + // Era boundary: first day of AM 1. + date = new CalendarDate(8, 8, 27); + expect(toCalendar(date, new EthiopicCalendar())).toEqual( + new CalendarDate(new EthiopicCalendar(), 'AM', 1, 1, 1) + ); + }); + + it('round trips between gregorian and ethiopic', function () { + let date = new CalendarDate(2020, 1, 1); + for (let i = 0; i < 365 * 8; i++) { + let ethiopic = toCalendar(date, new EthiopicCalendar()); + expect(toCalendar(ethiopic, new GregorianCalendar())).toEqual(date); + date = date.add({days: 1}); + } + }); }); describe('ethioaa', function () { @@ -547,6 +592,37 @@ describe('CalendarDate conversion', function () { new CalendarDate(new EthiopicAmeteAlemCalendar(), 9999, 13, 5) ); }); + + it('gregorian to ethioaa on new year', function () { + let date = new CalendarDate(2022, 9, 11); + expect(toCalendar(date, new EthiopicAmeteAlemCalendar())).toEqual( + new CalendarDate(new EthiopicAmeteAlemCalendar(), 7515, 1, 1) + ); + }); + }); + + describe('coptic', function () { + it('gregorian to coptic on new year', function () { + // 2022-09-11 is Coptic New Year (1 Thout 1739). See #10390. + let date = new CalendarDate(2022, 9, 10); + expect(toCalendar(date, new CopticCalendar())).toEqual( + new CalendarDate(new CopticCalendar(), 1738, 13, 5) + ); + + date = new CalendarDate(2022, 9, 11); + expect(toCalendar(date, new CopticCalendar())).toEqual( + new CalendarDate(new CopticCalendar(), 1739, 1, 1) + ); + }); + + it('round trips between gregorian and coptic', function () { + let date = new CalendarDate(2020, 1, 1); + for (let i = 0; i < 365 * 8; i++) { + let coptic = toCalendar(date, new CopticCalendar()); + expect(toCalendar(coptic, new GregorianCalendar())).toEqual(date); + date = date.add({days: 1}); + } + }); }); describe('custom calendar', function () {