@tollerud/ui 4.0.2 → 4.0.4

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/AGENTS.md CHANGED
@@ -39,12 +39,12 @@ npm install @tollerud/footer
39
39
  ```css
40
40
  /* app/globals.css */
41
41
  @import "@tollerud/ui/globals.css";
42
- @source "../node_modules/@tollerud/ui/dist";
42
+ @import "@tollerud/ui/source.css";
43
43
  ```
44
44
 
45
- Adjust `@source` relative to your CSS file. Without it, classes used only inside `@tollerud/ui` dist may be purged.
45
+ `source.css` resolves `@source` inside the installed package (npm, pnpm, workspaces, Bun). Without it, classes used only inside `@tollerud/ui` dist may be purged.
46
46
 
47
- **Optional preset shim** — extra utilities from `tollerud-preset.js`:
47
+ **Optional preset shim** — extra utilities from `@tollerud/ui/preset`:
48
48
 
49
49
  ```ts
50
50
  // tailwind.config.ts
package/CHANGELOG.md CHANGED
@@ -7,6 +7,59 @@
7
7
  • Never write bold mid-paragraph as a heading substitute — it merges into surrounding text
8
8
  -->
9
9
 
10
+ ## 4.0.4 — 2026-06-10 — Export verification and source.css
11
+
12
+ Patch release: verifies all subpath exports in CI, adds package-owned Tailwind scanning, and expands install docs.
13
+
14
+ ### Added
15
+
16
+ - `@tollerud/ui/source.css` — package-owned `@source` for `dist` scanning (npm, pnpm, workspaces, Bun)
17
+ - `test:subpath` now checks all 70 manifest entries (`dist/{name}.js` + `.d.ts`)
18
+ - `test:package` runs attw against every public subpath export
19
+
20
+ ### Changed
21
+
22
+ - Recommended Tailwind v4 setup: `@import "@tollerud/ui/source.css"` after `globals.css`
23
+ - `GETTING_STARTED.md` — monorepo `@source` path table, footer-only minimal install
24
+ - `tailwind.css` re-exports `source.css` for one-import convenience
25
+ - Docs site getting-started page updated for `source.css`
26
+
27
+ ### Migration
28
+
29
+ Replace manual `@source "../node_modules/@tollerud/ui/dist"` with:
30
+
31
+ ```css
32
+ @import "@tollerud/ui/globals.css";
33
+ @import "@tollerud/ui/source.css";
34
+ ```
35
+
36
+ ---
37
+
38
+ ## 4.0.3 — 2026-06-09 — Publish pipeline hardening
39
+
40
+ Patch release: aligns npm publish with `validate`, fixes preset export shape, enables provenance via OIDC, and fixes `@tollerud/footer` CI build.
41
+
42
+ ### Changed
43
+
44
+ - `prepublishOnly` and `publish-npm.yml` now run `verify:footer-sync` and `test:consumer` before publish
45
+ - `publish-npm.yml` auto-builds and publishes `@tollerud/footer` alongside `@tollerud/ui`
46
+ - `tollerud-preset.js` renamed to `tollerud-preset.cjs` — fixes publint CJS-in-ESM warning; import via `@tollerud/ui/preset`
47
+ - `@tollerud/ui/utils` subpath no longer ships `'use client'` — `cn` is safe to import from Server Components
48
+ - Removed `engines.node` from `package.json` (contributor Node/npm guidance stays in `CONTRIBUTING.md`)
49
+ - Publish uses npm Trusted Publishers (OIDC) with `--provenance` instead of `NPM_TOKEN`
50
+ - `@tollerud/footer` ships its own `tsup.config.ts` — stops inheriting root TS 6 `tsconfig.build.json` during DTS emit
51
+
52
+ ### Docs
53
+
54
+ - `README.md`, `GETTING_STARTED.md`, `SKILL.md`, `AGENTS.md` — preset import path updated
55
+ - Added `NPM_PACKAGE_PLAN.md` — npm hardening audit and task list
56
+
57
+ ### Migration
58
+
59
+ Nothing breaking. If you copied `tollerud-preset.js` locally, rename to `tollerud-preset.cjs` or switch to `import preset from '@tollerud/ui/preset'`.
60
+
61
+ ---
62
+
10
63
  ## 4.0.2 — 2026-06-10 — Repo layout and publish surface cleanup
11
64
 
12
65
  Patch release: consolidates docs and CI fixtures, stops shipping internal manifests, and clarifies docs copy after the npm-only pivot.
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Install
4
4
 
5
+ ### Full design system
6
+
7
+ Copy-paste — installs `@tollerud/ui` and all required peers:
8
+
5
9
  ```bash
6
10
  npm install @tollerud/ui clsx tailwind-merge tailwindcss@4 \
7
11
  @radix-ui/react-dialog @radix-ui/react-dropdown-menu @radix-ui/react-progress \
@@ -17,19 +21,56 @@ As of **v2.0.0**, Radix, Lucide, Framer Motion, and Sonner are **required peer d
17
21
  npm install @paper-design/shaders-react
18
22
  ```
19
23
 
24
+ ### Footer only (minimal)
25
+
26
+ If you only need the branded footer — no Tailwind, Radix, or other design-system peers:
27
+
28
+ ```bash
29
+ npm install @tollerud/footer
30
+ ```
31
+
32
+ ```tsx
33
+ import { Footer } from '@tollerud/footer'
34
+
35
+ <Footer />
36
+ ```
37
+
38
+ `@tollerud/footer` bundles `clsx` and `tailwind-merge` as dependencies. Use `@tollerud/ui` when you need the full component set.
39
+
20
40
  ---
21
41
 
22
42
  ## Tailwind Setup (v4)
23
43
 
44
+ **Recommended** — package-owned `@source` (works with npm, pnpm, Yarn workspaces, and Bun):
45
+
24
46
  ```css
25
47
  /* app/globals.css */
26
48
  @import "@tollerud/ui/globals.css";
49
+ @import "@tollerud/ui/source.css";
50
+ ```
51
+
52
+ `globals.css` bundles Tailwind v4, design tokens, and all component layer styles. `source.css` points Tailwind at the installed package `dist` folder so component utility classes are not purged — no fragile `../node_modules` paths.
53
+
54
+ ### Manual `@source` path (monorepos / custom layouts)
55
+
56
+ If you prefer an explicit path, resolve it **relative to your CSS file** to `node_modules/@tollerud/ui/dist`:
57
+
58
+ | Layout | Example CSS file | `@source` path |
59
+ |--------|------------------|----------------|
60
+ | Next.js App Router (default) | `app/globals.css` | `../node_modules/@tollerud/ui/dist` |
61
+ | `src/` app dir | `src/app/globals.css` | `../../node_modules/@tollerud/ui/dist` |
62
+ | Turborepo / npm workspace app | `apps/web/app/globals.css` | `../../../node_modules/@tollerud/ui/dist` |
63
+ | pnpm (package in workspace) | `app/globals.css` | Prefer `@import "@tollerud/ui/source.css"` — hoisting varies |
64
+ | Bun | `app/globals.css` | Prefer `@import "@tollerud/ui/source.css"` |
65
+
66
+ ```css
67
+ @import "@tollerud/ui/globals.css";
27
68
  @source "../node_modules/@tollerud/ui/dist";
28
69
  ```
29
70
 
30
- `globals.css` bundles Tailwind v4, design tokens, and all component layer styles. Point `@source` at the package `dist` folder relative to your CSS file so component utility classes are not purged.
71
+ If styles disappear in production, the `@source` path is wrong switch to `@tollerud/ui/source.css` or fix the relative path.
31
72
 
32
- **Optional preset shim** — for extra theme tokens from `tollerud-preset.js`:
73
+ **Optional preset shim** — for extra theme tokens from `@tollerud/ui/preset` (`tollerud-preset.cjs`):
33
74
 
34
75
  ```ts
35
76
  // tailwind.config.ts
@@ -42,7 +83,7 @@ export default { presets: [tollerudPreset] }
42
83
  @config "./tailwind.config.ts";
43
84
  @import "@tollerud/ui/tokens.css";
44
85
  @import "@tollerud/ui/globals-layers.css";
45
- @source "../node_modules/@tollerud/ui/dist";
86
+ @import "@tollerud/ui/source.css";
46
87
  ```
47
88
 
48
89
  ### Tailwind v3 (legacy)
package/README.md CHANGED
@@ -42,16 +42,16 @@ As of **v2.0.0**, Radix primitives, Lucide, Framer Motion, and Sonner are **peer
42
42
  npm install @paper-design/shaders-react
43
43
  ```
44
44
 
45
- **CSS** — one import in `app/globals.css` (Tailwind v4 + tokens + component classes):
45
+ **CSS** — two imports in `app/globals.css` (Tailwind v4 + tokens + component class scanning):
46
46
 
47
47
  ```css
48
48
  @import '@tollerud/ui/globals.css';
49
- @source '../node_modules/@tollerud/ui/dist';
49
+ @import '@tollerud/ui/source.css';
50
50
  ```
51
51
 
52
- Adjust the `@source` path relative to your CSS file so it resolves to `node_modules/@tollerud/ui/dist`.
52
+ `source.css` resolves `@source` inside the installed package works with npm, pnpm, Yarn workspaces, and Bun. See [GETTING_STARTED.md](GETTING_STARTED.md) for manual `@source` paths in monorepos.
53
53
 
54
- **Optional preset shim** — if you need utilities from `tollerud-preset.js` beyond what `tokens.css` provides:
54
+ **Optional preset shim** — if you need utilities from `@tollerud/ui/preset` beyond what `tokens.css` provides:
55
55
 
56
56
  ```ts
57
57
  // tailwind.config.ts
@@ -64,7 +64,7 @@ export default { presets: [tollerudPreset] }
64
64
  @config './tailwind.config.ts';
65
65
  @import '@tollerud/ui/tokens.css';
66
66
  @import '@tollerud/ui/globals-layers.css';
67
- @source '../node_modules/@tollerud/ui/dist';
67
+ @import '@tollerud/ui/source.css';
68
68
  ```
69
69
 
70
70
  **Tailwind v3 (legacy)** — preset in `tailwind.config.ts` plus `@tollerud/ui/globals-v3.css`:
@@ -97,13 +97,13 @@ import { Button, Card, Badge, StatusDot, CodeBlock, Kbd, CommandMenu, NoirGlowBa
97
97
 
98
98
  TypeScript types are included — no `@types/*` package needed. See **[COMPONENTS.md](COMPONENTS.md)** for the full prop reference for every component.
99
99
 
100
- Publish a new version by bumping `version` in `package.json` and pushing to `main` — the `publish-npm` GitHub Action detects the version change, runs `npm publish` (using the `NPM_TOKEN` secret), and then creates a matching GitHub Release automatically.
100
+ Publish a new version by bumping `version` in `package.json` and pushing to `main` — the `publish-npm` GitHub Action detects the version change, runs `npm publish --provenance` via npm Trusted Publishers (OIDC), and then creates a matching GitHub Release automatically.
101
101
 
102
102
  ### Copy from repo (alternative)
103
103
 
104
104
  ```bash
105
105
  npm install clsx tailwind-merge
106
- cp tollerud-preset.js globals.css components/ -r <your-next-project>/
106
+ cp tollerud-preset.cjs globals.css components/ -r <your-next-project>/
107
107
  ```
108
108
 
109
109
  Then use local paths instead of `@tollerud/ui` in the snippets above.
@@ -235,7 +235,7 @@ design-system/
235
235
  ├── globals-v3.css # Tailwind v3 legacy
236
236
  ├── globals-layers.css # Shared component CSS layers
237
237
  ├── tokens.css # Design tokens
238
- ├── tollerud-preset.js # Tailwind preset
238
+ ├── tollerud-preset.cjs # Tailwind preset (CJS)
239
239
  ├── scripts/ # Build, validate, docs, and release helpers
240
240
  ├── docs-app/ # Next.js docs site (static export → _site/)
241
241
  │ ├── app/ # App Router + globals.css
package/SKILL.md CHANGED
@@ -22,12 +22,12 @@ npm install @paper-design/shaders-react
22
22
 
23
23
  As of **v4.0.1**, install is **npm-only** — `import { Button } from '@tollerud/ui'` or subpaths like `@tollerud/ui/button`. Copy-via-shadcn registry CLI is unsupported. As of **v4.0.0**, `@tollerud/ui/globals-v4.css` is removed — use `globals.css` only. Brand assets live at `@tollerud/ui/brand/*`. As of **v3.1.1**, `.tollerud-display-shimmer` ships in `globals.css` for animated hero accent text. As of **v3.1.0**, `Monogram` ships as an inline SVG component (`color`: `yellow` | `black` | `white`). As of **v3.0.0**, the package is **ESM-only** (no CJS `require` entry). As of **v2.0.0**, Radix, Lucide, Framer Motion, and Sonner are **required peers** (not bundled).
24
24
 
25
- Apply the Tailwind preset when you need extra utilities from `tollerud-preset.js` — `globals.css` already includes tokens and component layers for v4:
25
+ Apply the Tailwind preset when you need extra utilities from `@tollerud/ui/preset` — `globals.css` already includes tokens and component layers for v4:
26
26
 
27
27
  ```css
28
28
  /* app/globals.css — Tailwind v4 (default) */
29
29
  @import "@tollerud/ui/globals.css";
30
- @source "../node_modules/@tollerud/ui/dist";
30
+ @import "@tollerud/ui/source.css";
31
31
  ```
32
32
 
33
33
  As of **v1.4.0**, charts (`BarChart`, `AreaChart`, `Donut`, `Sparkline`) and marketing blocks (`HeroBlock`, `FeatureCard`, `CTABand`) ship in the package. As of **v1.3.0**, `@tollerud/ui/globals.css` is the Tailwind v4 entry. Tailwind colors are under `tollerud.*` only (`text-tollerud-yellow`, `bg-tollerud-surface-raised`, etc.) — not `tia-*`.
package/dist/utils.js CHANGED
@@ -1,4 +1,3 @@
1
- 'use client';
2
1
  export { cn } from './chunk-WSQNPRGN.js';
3
2
  //# sourceMappingURL=utils.js.map
4
3
  //# sourceMappingURL=utils.js.map
package/globals.css CHANGED
@@ -4,9 +4,9 @@
4
4
  Usage in app/globals.css:
5
5
 
6
6
  @import '@tollerud/ui/globals.css';
7
- @source '../node_modules/@tollerud/ui/dist';
7
+ @import '@tollerud/ui/source.css';
8
8
 
9
- Optional preset shim (extra theme tokens from tollerud-preset.js):
9
+ Optional preset shim (extra theme tokens from tollerud-preset.cjs):
10
10
 
11
11
  @import 'tailwindcss';
12
12
  @config './tailwind.config.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tollerud/ui",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "description": "Tollerud User Interface — dark, monochrome + yellow accent. Noir aesthetic meets modern utility.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -13,11 +13,8 @@
13
13
  "url": "https://github.com/Tollerud/ui/issues"
14
14
  },
15
15
  "license": "MIT",
16
- "author": "Mathias Tollerud <mathias.tollerud@gmail.com>",
16
+ "author": "Mathias Tollerud <mathias@tollerud.no>",
17
17
  "packageManager": "npm@11.16.0",
18
- "engines": {
19
- "node": ">=20"
20
- },
21
18
  "sideEffects": [
22
19
  "*.css"
23
20
  ],
@@ -35,8 +32,9 @@
35
32
  "./globals-v3.css": "./globals-v3.css",
36
33
  "./globals-layers.css": "./globals-layers.css",
37
34
  "./tailwind.css": "./tailwind.css",
35
+ "./source.css": "./source.css",
38
36
  "./tokens.css": "./tokens.css",
39
- "./preset": "./tollerud-preset.js",
37
+ "./preset": "./tollerud-preset.cjs",
40
38
  "./brand/tollerud-logo.svg": "./brand/tollerud-logo.svg",
41
39
  "./brand/tollerud-avatar.svg": "./brand/tollerud-avatar.svg",
42
40
  "./brand/tollerud-avatar.png": "./brand/tollerud-avatar.png",
@@ -55,8 +53,9 @@
55
53
  "globals-v3.css",
56
54
  "globals-layers.css",
57
55
  "tailwind.css",
56
+ "source.css",
58
57
  "tokens.css",
59
- "tollerud-preset.js",
58
+ "tollerud-preset.cjs",
60
59
  "GETTING_STARTED.md",
61
60
  "COMPONENTS.md",
62
61
  "CHANGELOG.md",
@@ -86,7 +85,7 @@
86
85
  "docs:props": "node scripts/generate-props.mjs",
87
86
  "test:props": "node scripts/verify-props-drift.mjs",
88
87
  "validate": "npm run typecheck && npm run lint && npm run test && npm run build && npm run test:subpath && npm run test:drift && npm run test:package && npm run test:size && npm run test:props && npm run verify:footer-sync && npm run build:docs && npm run test:consumer",
89
- "prepublishOnly": "npm run sync:registry && npm run typecheck && npm run lint && npm run test && npm run build && npm run test:subpath && npm run test:drift && npm run test:package && npm run test:size && npm run test:props",
88
+ "prepublishOnly": "npm run sync:registry && npm run typecheck && npm run lint && npm run test && npm run build && npm run test:subpath && npm run test:drift && npm run test:package && npm run test:size && npm run test:props && npm run verify:footer-sync && npm run test:consumer",
90
89
  "build:docs": "node scripts/build-docs.mjs",
91
90
  "preview:docs": "npx --yes serve _site -l 4173"
92
91
  },
package/source.css ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Tailwind v4 — scan @tollerud/ui dist for component utility classes.
3
+ *
4
+ * Import in app/globals.css after globals.css:
5
+ *
6
+ * @import "@tollerud/ui/globals.css";
7
+ * @import "@tollerud/ui/source.css";
8
+ *
9
+ * Paths resolve inside the installed package — works with npm, pnpm, Yarn
10
+ * workspaces, and Bun without fragile ../node_modules relative paths.
11
+ */
12
+ @source "./dist";
package/tailwind.css CHANGED
@@ -1,9 +1,6 @@
1
1
  /**
2
2
  * Convenience entry for Tailwind v4 consumers.
3
- * Re-exports globals + documents the @source path for class scanning.
3
+ * Re-exports globals + source scanning in one import.
4
4
  */
5
5
  @import "./globals.css";
6
-
7
- /* In your app globals.css, add after this import:
8
- @source "../node_modules/@tollerud/ui/dist";
9
- */
6
+ @import "./source.css";
@@ -4,7 +4,7 @@
4
4
  * Drop this into any Tailwind project:
5
5
  *
6
6
  * // tailwind.config.ts
7
- * import tollerudPreset from './path/to/tollerud-preset'
7
+ * import tollerudPreset from '@tollerud/ui/preset'
8
8
  * export default {
9
9
  * presets: [tollerudPreset],
10
10
  * content: ['your-source-files'],