@tollerud/ui 4.0.4 → 4.0.5

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,27 @@
7
7
  • Never write bold mid-paragraph as a heading substitute — it merges into surrounding text
8
8
  -->
9
9
 
10
+ ## 4.0.5 — 2026-06-10 — Starter template and DX docs
11
+
12
+ Patch release: human-facing Next.js starter, migration guide, and footer package tooling alignment. No breaking API changes.
13
+
14
+ ### Added
15
+
16
+ - `examples/next-starter/` — copy-paste Next.js 16 + Tailwind v4 reference app (`source.css`, `Toaster`, sample page)
17
+ - `GETTING_STARTED.md` — “Migrating from copied components” section (grep recipe, prop drift checklist, link to `SKILL.md`)
18
+
19
+ ### Changed
20
+
21
+ - `@tollerud/footer` — TypeScript 6.x in devDependencies; `sync-footer-package.mjs` preserves `tsup.config.ts` build and `publishConfig`
22
+ - `GETTING_STARTED.md` / `README.md` — footer self-contained dependency model documented; starter template linked
23
+ - `packages/footer/tsconfig.json` — `ignoreDeprecations: "6.0"` for DTS emit under TS 6
24
+
25
+ ### Migration
26
+
27
+ Nothing breaking. New apps can copy `examples/next-starter/` instead of wiring from scratch.
28
+
29
+ ---
30
+
10
31
  ## 4.0.4 — 2026-06-10 — Export verification and source.css
11
32
 
12
33
  Patch release: verifies all subpath exports in CI, adds package-owned Tailwind scanning, and expands install docs.
@@ -35,7 +35,17 @@ import { Footer } from '@tollerud/footer'
35
35
  <Footer />
36
36
  ```
37
37
 
38
- `@tollerud/footer` bundles `clsx` and `tailwind-merge` as dependencies. Use `@tollerud/ui` when you need the full component set.
38
+ `@tollerud/footer` is **self-contained by design** — it bundles `clsx` and `tailwind-merge` so footer-only apps avoid extra peer installs. You still need Tailwind with Tollerud tokens (`@tollerud/ui/globals.css` or equivalent) for `text-tollerud-*` / `bg-tollerud-*` classes to resolve.
39
+
40
+ Use `@tollerud/ui` (or `@tollerud/ui/footer`) when you need the full component set. Apps using both packages may install duplicate `clsx` / `tailwind-merge` versions — harmless in practice; npm dedupes when ranges align.
41
+
42
+ ### Next.js starter
43
+
44
+ Copy [`examples/next-starter/`](../examples/next-starter/) from this repo — minimal App Router app with `globals.css`, `source.css`, sample page, and `Toaster` mounted.
45
+
46
+ ```bash
47
+ cp -R examples/next-starter my-app && cd my-app && npm install && npm run dev
48
+ ```
39
49
 
40
50
  ---
41
51
 
@@ -135,6 +145,37 @@ Use subpath imports (`@tollerud/ui/button`) for smaller client boundaries when s
135
145
 
136
146
  ---
137
147
 
148
+ ## Migrating from copied components
149
+
150
+ Older projects sometimes copied `Button.tsx`, `lib/utils.ts`, or whole `components/ui/` trees from this design system. Replace them with package imports.
151
+
152
+ ### Detect copied files
153
+
154
+ ```bash
155
+ grep -rl "tollerud-yellow\|tollerud-noir\|tollerud-surface" src --include="*.tsx" --include="*.ts"
156
+ ```
157
+
158
+ Also look for `components/ui/index.ts` re-exporting relative paths instead of `@tollerud/ui`.
159
+
160
+ ### Fix checklist
161
+
162
+ 1. Install the package and peers (see [Install](#install) above).
163
+ 2. Replace local imports — `import { Button } from '@/components/ui/Button'` → `import { Button } from '@tollerud/ui'` (or `@tollerud/ui/button`).
164
+ 3. Replace hand-rolled `cn()` — `import { cn } from '@tollerud/ui'` or `@tollerud/ui/utils`.
165
+ 4. Delete copied files after imports compile.
166
+ 5. Check **prop drift** against [SKILL.md](SKILL.md) — copied files may use outdated prop names (`onChange` vs `onValueChange`, etc.).
167
+ 6. Replace hardcoded hex (`#FFFF00`, `#0A0A0A`) with tokens (`text-tollerud-yellow`, `bg-tollerud-noir-950`).
168
+ 7. Add `<Toaster />` near the app root if you use Sonner toasts.
169
+ 8. Run `npx tsc --noEmit` and fix type errors from signature changes.
170
+
171
+ | Copied pattern | Fix |
172
+ |----------------|-----|
173
+ | `src/components/ui/Button.tsx` | Delete; import from `@tollerud/ui` |
174
+ | Local `lib/utils.ts` with `cn()` | Delete; `import { cn } from '@tollerud/ui/utils'` |
175
+ | `components/ui.ts` re-exporting relatives | Direct `@tollerud/ui` imports |
176
+
177
+ ---
178
+
138
179
  ## AI agents
139
180
 
140
181
  If you're using Claude Code or Cursor, sync [SKILL.md](SKILL.md) into your project skills folder — it reflects the actual current exports and known gotchas.
package/README.md CHANGED
@@ -15,7 +15,7 @@ A complete, browsable UI library built around **monochrome + yellow accent**. No
15
15
  | [`@tollerud/ui`](https://www.npmjs.com/package/@tollerud/ui) | `npm install @tollerud/ui` | You want the full design system — components, tokens, Tailwind preset |
16
16
  | [`@tollerud/footer`](https://www.npmjs.com/package/@tollerud/footer) | `npm install @tollerud/footer` | You only need the branded footer, with no other design system dependency |
17
17
 
18
- **Footer maintenance:** `@tollerud/ui` re-exports `Footer` from the same source as `@tollerud/footer`. Use the standalone `@tollerud/footer` package only when you want the footer without pulling in the full design system (and its peer deps). Both packages are maintained in this monorepo; version them together when the footer changes.
18
+ **Footer maintenance:** `@tollerud/ui` exports `Footer` from the same source as `@tollerud/footer` (`npm run sync:footer` keeps them lockstep). Use the standalone package when you want the branded footer without Radix, Lucide, Framer Motion, Sonner, or other `@tollerud/ui` peers — `@tollerud/footer` bundles `clsx` and `tailwind-merge` as dependencies **on purpose** for that path. You still need Tailwind + Tollerud tokens for footer styles. Deprecation of `@tollerud/footer` is not planned for now.
19
19
 
20
20
  ## Philosophy
21
21
 
@@ -25,6 +25,8 @@ Tollerud UI is minimal but not cold. It uses a near-black foundation with warm y
25
25
 
26
26
  ## Quick Start
27
27
 
28
+ **Starter template:** [`examples/next-starter/`](examples/next-starter/) — copy into a new project, `npm install`, `npm run dev`. See [GETTING_STARTED.md](GETTING_STARTED.md) for the full guide and migration from copied components.
29
+
28
30
  ### npm package (recommended)
29
31
 
30
32
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tollerud/ui",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "description": "Tollerud User Interface — dark, monochrome + yellow accent. Noir aesthetic meets modern utility.",
5
5
  "private": false,
6
6
  "type": "module",