readest/apps/readest-app/components.json
Huang Xin 8ef527af70
feat(ui): migrate to daisyUI 5 and Tailwind CSS 4 (#5884)
* feat(ui): migrate to daisyUI 5 and Tailwind CSS 4

daisyUI 5 requires Tailwind CSS 4, so the configuration moves into
globals.css: tailwind.config.ts is gone, and the built-in themes now
compile through a small plugin (src/styles/daisyui-themes.ts) that
shares one token emitter with the runtime custom theme injector.

Keep the rendering identical to daisyUI 4:

- themes.ts emits daisyUI 5 --color-* tokens, derives the *-content
  colors with the v4 formula, and pins the v4 radii, border and depth.
- globals.css carries a compat block for the component defaults v5
  changed: md field height, small size type, checkbox radius, menu
  width and line height, disabled non-buttons, toggle width, and the
  visibility of closed and nested dropdowns. Every rule has zero
  specificity so utilities keep winning as they did on v3.
- Pin the Tailwind 3 color palette for the families the app uses;
  Tailwind 4 ships oklch values that render noticeably more vivid.
- Restore the v3 preflight defaults the UI was tuned on (border and
  placeholder colors, button cursor) and the v3 hover semantics.

Class names are migrated for both upgrades: the v3 renames (shadow,
rounded, blur, outline-none, flex-shrink, the important modifier, CSS
variables in arbitrary values) and the daisyUI removals
(input-bordered, form-control, label-text, tr.hover). Three call sites
relied on the old stylesheet order of conflicting utilities and now
say what they mean instead.

Fixes #5587: daisyUI 5 opts the select into appearance: base-select and
themes ::picker(select), so the option popup follows the app theme
instead of the operating system. The chromeless settings selects no
longer force appearance-none, which would cancel that.

The font dropdown's System Fonts sub-list now opens only when its row
is activated, and its bottom edge lines up with the parent menu.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(nix): refresh pnpmDeps hash for the daisyUI 5 lockfile

The daisyUI and Tailwind upgrade changes pnpm-lock.yaml, so the pinned
fixed-output hash no longer matches. Value taken from the got: line of
the nix-deps-check run on this pull request.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(ui): keep the daisyUI toggle size modifiers

The compat rule that restored the v4 track width applied to every
toggle, so toggle-sm and toggle-xs were stretched to the medium width:
the OPDS catalog manager's auto-download switches came out 48px wide on
a 20px track. daisyUI 4 sized each step separately and the steps do not
share one ratio, so pin all four.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(android): require WebView 111 and use btn-contrast for catalog save

Tailwind CSS 4 targets Chromium 111 and up, and the oklch fallback that
used to cover older WebViews is gone with the daisyUI 5 migration, so
raise the webview-upgrade plugin's minSupportedMajor from 92 to 111.
Below that the plugin now tells the user their WebView is too old
instead of letting the app render with broken colors.

Also switch the OPDS catalog dialog's submit button to btn-contrast,
which is the design system's primary action for dialogs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(ios): require iOS 16.4

Tailwind CSS 4 targets Safari 16.4 and up. Below that, color-mix() and
@property are missing, so daisyUI's controls do not degrade gracefully:
input borders fall back to currentColor and the toggle geometry
collapses, as seen on an iOS 15.8 device. Raising the deployment target
keeps those devices on the last build that renders correctly instead of
shipping them a broken UI.

Covers the Tauri bundle config, the xcodegen project and every target in
the generated Xcode project.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore(deps): point the webview-upgrade plugin at the 111 default

Picks up readest/tauri-plugin-webview-upgrade#2, which raises the
plugin's own defaultMinSupportedMajor to match the minSupportedMajor
this app already sets in tauri.conf.json.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 16:09:41 +02:00

22 lines
451 B
JSON

{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/styles/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide",
"aliases": {
"components": "@/components",
"utils": "@/utils",
"ui": "@/components/ui",
"lib": "@/libs",
"hooks": "@/hooks"
},
"registries": {}
}