`reloadOnStaleChunk` existed but no app had ever wired it up, and using it turned up two gaps. It reloaded in place, so a click that tripped a stale chunk put the user back on the page they were leaving; it now takes an optional `resolveTarget`, called at event time inside the guard, so a router can hand back the location it was navigating to. And its sessionStorage read was unguarded — blocked storage (private mode, cookie policy) throws on `getItem`, and that throw escaping the listener left the tab on exactly the dead page this exists to prevent. Both reads and the callback are now fenced. Peers move a generation: motion 13.1, TypeScript 7, lucide-react 1.34, radix-ui 1.6.7, @tanstack/react-virtual 3.14, @payloadcms/richtext-lexical 3.88 — breaking for consumers, hence 0.10.0. `inlinedDependencies` still pinned framer-motion 12.38; note that nothing is actually inlined (dist imports `motion/react` externally, 138 kB across 115 files), so the field was stale metadata rather than a second motion runtime. biome 2.5.11, and the new rules it brings: - `useResponsiveHover` listed deps narrower than its captures. Destructuring the config above the effect makes them exhaustive AND stable — depending on `config` itself would re-run on every render, since callers pass an object literal. - `useControllableState`'s effect listed a ref in its deps; refs are stable, so it goes. - Four `<explanation>` placeholders are now real explanations. They must be one line: a wrapped `//` continuation attaches the suppression to the comment instead of the code, and biome then reports it as unused while the original error stands. - Checkbox/Switch stories associate label and control by id rather than wrapping, which the rule cannot see through a Radix control that renders a button. - `Promise` story renamed `PromiseToast` (shadowed the global), display name preserved. CSS: the reduced-motion `.material-spot` override keeps its `!important` with a reason — it has to outrank `.material-card .material-spot`, which is more specific. `globals.css` and `theme.css` are excluded because biome's CSS parser cannot read Tailwind 4's `@theme inline static`; it stops at `static` and reports the remainder as unbalanced. Note for anyone editing biome.json: it is strict JSON, and a `//` comment silently disables the ENTIRE config — no error, biome just falls back to defaults. That is what made `css.parser.tailwindDirectives` look broken. Comments need biome.jsonc.
110 lines
3.6 KiB
JSON
110 lines
3.6 KiB
JSON
{
|
|
"name": "@unom/ui",
|
|
"type": "module",
|
|
"version": "0.10.0",
|
|
"license": "MIT",
|
|
"description": "ui elements for unom",
|
|
"private": false,
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsdown",
|
|
"dev": "tsdown --watch",
|
|
"storybook": "storybook dev -p 6011",
|
|
"build-storybook": "storybook build"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "^2.5.11",
|
|
"@bosh-code/tsdown-plugin-inject-css": "^2.0.0",
|
|
"@bosh-code/tsdown-plugin-tailwindcss": "^1.0.1",
|
|
"@rollup/plugin-url": "^8.0.2",
|
|
"@storybook/react-vite": "^10.5.10",
|
|
"@tailwindcss/vite": "^4.3.3",
|
|
"@types/bun": "latest",
|
|
"@types/howler": "^2.2.13",
|
|
"@types/react": "^19.2.18",
|
|
"@vitejs/plugin-react": "^6.1.0",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"storybook": "^10.5.10",
|
|
"tailwindcss": "^4.3.3",
|
|
"tsdown": "^0.22.14",
|
|
"tw-animate-css": "^1.4.0",
|
|
"vite": "^8.2.2"
|
|
},
|
|
"peerDependencies": {
|
|
"@payloadcms/richtext-lexical": "^3.88.0",
|
|
"@tanstack/react-virtual": "^3.14.10",
|
|
"@unom/style": "^0.4.4",
|
|
"class-variance-authority": "^0.7.1",
|
|
"embla-carousel-react": "^8.6.0",
|
|
"lucide-react": "^1.34.0",
|
|
"motion": "^13.1.1",
|
|
"radix-ui": "^1.6.7",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"typescript": "^7.0.2",
|
|
"zod": "^4.4.3"
|
|
},
|
|
"exports": {
|
|
"./accordion": "./dist/accordion.js",
|
|
"./animate-number": "./dist/animate-number.js",
|
|
"./animation": "./dist/animation/index.js",
|
|
"./badge": "./dist/badge.js",
|
|
"./button": "./dist/button.js",
|
|
"./card": "./dist/card.js",
|
|
"./card-context": "./dist/card-context.js",
|
|
"./code-block": "./dist/code-block.js",
|
|
"./dialog": "./dist/dialog.js",
|
|
"./elastic-slider": "./dist/elastic-slider.js",
|
|
"./empty-state": "./dist/empty-state.js",
|
|
"./form/checkbox": "./dist/form/checkbox.js",
|
|
"./form/field-container": "./dist/form/field-container.js",
|
|
"./form/form": "./dist/form/form.js",
|
|
"./form/input-number": "./dist/form/input-number.js",
|
|
"./form/input-text": "./dist/form/input-text.js",
|
|
"./form/label": "./dist/form/label.js",
|
|
"./form/select": "./dist/form/select.js",
|
|
"./form/switch": "./dist/form/switch.js",
|
|
"./form/textarea": "./dist/form/textarea.js",
|
|
"./hooks/useControllableState": "./dist/hooks/useControllableState.js",
|
|
"./lib/utils": "./dist/lib/utils.js",
|
|
"./preload-reload": "./dist/preload-reload.js",
|
|
"./sound": "./dist/sound/index.js",
|
|
"./sound/default-theme": "./dist/sound/default-theme.js",
|
|
"./richtext": "./dist/richtext/index.js",
|
|
"./richtext/converters": "./dist/richtext/converters/index.js",
|
|
"./richtext/converters/headings": "./dist/richtext/converters/headings.js",
|
|
"./richtext/converters/internal-link": "./dist/richtext/converters/internal-link.js",
|
|
"./section": "./dist/section/index.js",
|
|
"./section/heading": "./dist/section/heading/index.js",
|
|
"./section/section.types": "./dist/section/section.types.js",
|
|
"./skeleton": "./dist/skeleton.js",
|
|
"./spinner": "./dist/spinner.js",
|
|
"./styles/animations": "./dist/styles/animations.js",
|
|
"./styles/material.css": "./dist/material.css",
|
|
"./material": "./dist/material/index.js",
|
|
"./table": "./dist/table.js",
|
|
"./tabs": "./dist/tabs.js",
|
|
"./text": "./dist/text.js",
|
|
"./toast": "./dist/toast.js",
|
|
"./toggle-group": "./dist/toggle-group.js",
|
|
"./virtualized-grid": "./dist/virtualized-grid.js",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"dependencies": {
|
|
"@tanstack/react-router": "^1.170.32",
|
|
"@tsdown/css": "^0.22.14",
|
|
"clsx": "^2.1.1",
|
|
"howler": "^2.2.4",
|
|
"sonner": "^2.0.8",
|
|
"tailwind-merge": "^3.6.0"
|
|
},
|
|
"inlinedDependencies": {
|
|
"framer-motion": "13.1.1",
|
|
"motion-dom": "13.1.1",
|
|
"motion-utils": "13.0.0"
|
|
}
|
|
}
|