opsfuse-ui 0.1.5 → 0.1.7

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.
@@ -53,23 +53,21 @@ If the project has `tsconfig.json`, ensure `moduleResolution` is set to `"bundle
53
53
 
54
54
  ### 2a. Import opsfuse styles
55
55
 
56
- Find the app's entry file (e.g. `main.tsx`, `_app.tsx`, `app/layout.tsx`) and add the CSS import that matches the host's Tailwind version, **before the host app's own Tailwind / global stylesheet**. There are two bundles — pick one:
56
+ Find the app's entry file (e.g. `main.tsx`, `_app.tsx`, `app/layout.tsx`) and add the single CSS import **before the host app's own Tailwind / global stylesheet**:
57
57
 
58
58
  ```ts
59
- // Tailwind v3 host (or no Tailwind): flat, un-layered
60
- import "opsfuse-ui/styles.css";
61
- // Tailwind v4 host: cascade-layered
62
- import "opsfuse-ui/styles.layered.css";
59
+ import "opsfuse-ui/styles.css"; // FIRST — before your Tailwind / global CSS
63
60
 
64
61
  import "./index.css"; // your app's `@import "tailwindcss"` etc. — comes AFTER
65
62
  ```
66
63
 
67
64
  For **Next.js App Router** add it first in `app/layout.tsx`; for **Pages Router** add it first in `pages/_app.tsx` — in both cases before `globals.css`.
68
65
 
69
- **Which bundle and why.** Both are precompiled, self-contained CSS (you do not run Tailwind over them). Import opsfuse *before* your own CSS so your rules keep precedence and your `className` overrides on library components still take effect.
66
+ **One bundle, every Tailwind version.** `styles.css` is a single precompiled, self-contained bundle that works on Tailwind v3, v4, and future hosts — there is nothing to choose. (`styles.layered.css` still exists as an identical backward-compat alias; prefer `styles.css`.) You do not run Tailwind over it.
67
+
68
+ **Import it _before_ your own CSS — this is the one rule that matters.** The library wraps all its CSS in a single low-priority `@layer opsfuse`. Imported first, your host Tailwind registers later, so on a **v4 host** its layers win and on a **v3 host** its un-layered utilities win — either way your `className` overrides on library components (`md:px-8`, `bg-red-500`, hover/responsive variants) stay authoritative. The library's design tokens, themed borders, and heading typography are emitted un-layered + scoped to `.opsfuse-ui`, so they survive your host's preflight without leaking into or overriding the rest of your app.
70
69
 
71
- - **`styles.css` (flat) — Tailwind v3 host.** No `@layer` blocks, so v3's PostCSS never throws `@layer components is used but no matching @tailwind components directive`, and the library's un-layered utility classes correctly out-specify the host's un-layered preflight (`*{padding:0}`, element resets). Do **not** use this on a v4 host: its un-layered utilities would beat the host's layered ones (e.g. library `.px-4` would override your `md:px-8`).
72
- - **`styles.layered.css` — Tailwind v4 host.** The library sits in low-priority `opsfuse-*` cascade layers; imported first, the host's own `base`/`utilities` layers register later and win, so the host's preflight and responsive utilities (`md:*`, `hover:*`) stay authoritative while library components still render correctly.
70
+ > The bundle ships **no global preflight** — it never restyles your `html`, `body`, headings, or form controls. A scoped equivalent applies only inside `.opsfuse-ui`, so component normalization is intact with zero document-level side effects.
73
71
 
74
72
  ### 2b. Font setup
75
73