@ksojecki/purpose-ui 0.2.0 → 0.2.1
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/README.md +6 -50
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,32 +6,12 @@ Documentation, with live examples and props for every component: [sojecki.pl/ui]
|
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
-
Stable releases are on npmjs:
|
|
10
|
-
|
|
11
9
|
```sh
|
|
12
10
|
pnpm add @ksojecki/purpose-ui react react-dom react-router daisyui tailwindcss
|
|
13
11
|
```
|
|
14
12
|
|
|
15
13
|
Peer dependencies: `react` and `react-dom` ^19, `react-router` ^8, `daisyui` ^5.6.0, `tailwindcss` ^4. The package is ESM only. `FormField` takes the result of react-hook-form's `register()` but does not depend on that package.
|
|
16
14
|
|
|
17
|
-
### Development builds
|
|
18
|
-
|
|
19
|
-
Builds from the `next` branch are published to GitHub Packages only, as `<next version>-next.<UTC timestamp>` under the `next` dist-tag. To use them, add the scope to your project's `.npmrc`:
|
|
20
|
-
|
|
21
|
-
```ini
|
|
22
|
-
@ksojecki:registry=https://npm.pkg.github.com
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
and the token reference to your user `~/.npmrc`:
|
|
26
|
-
|
|
27
|
-
```ini
|
|
28
|
-
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Set `NODE_AUTH_TOKEN` to a GitHub personal access token (classic) with `read:packages`. In GitHub Actions, use `GITHUB_TOKEN` with `packages: read` after granting the workflow repository access in the package settings. Pin an exact version (`pnpm add @ksojecki/purpose-ui@next` records it); dev versions exist only on GitHub Packages, so a missing scope mapping fails the install instead of silently installing a stable build. Stable versions are mirrored there too.
|
|
32
|
-
|
|
33
|
-
Before `0.2.0` the package was `@ksojecki/ui` on GitHub Packages. Replace the dependency and change imports from `@ksojecki/ui/<group>` to `@ksojecki/purpose-ui/<group>`; exports, components and props are unchanged.
|
|
34
|
-
|
|
35
15
|
## Set up styles
|
|
36
16
|
|
|
37
17
|
In your app's main stylesheet, import Tailwind, then one palette entry:
|
|
@@ -89,36 +69,12 @@ Choose a `purpose` (`ActionPurpose`, `StatusPurpose`, `BadgePurpose`), not a col
|
|
|
89
69
|
|
|
90
70
|
Motion utilities (`animate-fade-in`, `animate-slide-up`, `animate-scale-in`) come from `theme.css` and switch off under `prefers-reduced-motion`.
|
|
91
71
|
|
|
92
|
-
##
|
|
72
|
+
## Links
|
|
93
73
|
|
|
94
|
-
|
|
74
|
+
- [Documentation](https://sojecki.pl/ui/)
|
|
75
|
+
- [Changelog](https://github.com/ksojecki/purpose-ui/blob/main/CHANGELOG.md)
|
|
76
|
+
- [Source and issues](https://github.com/ksojecki/purpose-ui)
|
|
95
77
|
|
|
96
|
-
##
|
|
97
|
-
|
|
98
|
-
Use Node 26 and pnpm 12. The repository pins their versions in `.node-version` and `package.json`.
|
|
99
|
-
|
|
100
|
-
Run `pnpm install --frozen-lockfile && pnpm dev:docs`, then open [localhost:4400](http://localhost:4400). The docs site in `docs/` is built with Astro, loads components from source and previews all four palettes in light and dark. It is not included in the package tarball. `pnpm build:docs` builds it; set `DOCS_BASE=/ui/` to serve it under a path.
|
|
101
|
-
|
|
102
|
-
```sh
|
|
103
|
-
pnpm install --frozen-lockfile
|
|
104
|
-
pnpm lint
|
|
105
|
-
pnpm format:check
|
|
106
|
-
pnpm typecheck
|
|
107
|
-
pnpm test
|
|
108
|
-
pnpm build
|
|
109
|
-
pnpm pack
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Vite builds the ESM entry points, and TypeScript emits the declarations alongside them in `dist/`. Specs run in Vitest with jsdom. See [AGENTS.md](./AGENTS.md) for contribution conventions.
|
|
113
|
-
|
|
114
|
-
## Releases
|
|
115
|
-
|
|
116
|
-
Work lands on `next`, the default PR branch. A PR that changes the published library includes a changeset (`pnpm changeset`).
|
|
117
|
-
|
|
118
|
-
- **Dev build:** each push to `next` with pending changesets publishes `<version>-next.<timestamp>` to GitHub Packages under `next`. The version is calculated from the pending changesets and is not committed. Publishing fails if `main` is not merged into `next`, or if the new version would sort below the current `next` build (for example after reverting the only `minor` changeset); add a changeset with a bump at least as large.
|
|
119
|
-
- **Promotion:** open a PR from `next` to `main` and merge it with a merge commit, not squash, so `main` stays an ancestor of `next`.
|
|
120
|
-
- **Stable release:** on `main`, the release workflow opens a Version packages PR that bumps the version and writes `CHANGELOG.md`. Merging it publishes the version to npmjs with provenance, mirrors the same tarball to GitHub Packages, and creates the `v<version>` GitHub release. Re-running a failed release publishes only what is missing. Other pushes to `main` publish nothing.
|
|
121
|
-
- **Hotfix:** branch from `main`, add a changeset, merge into `main`, then merge the Version packages PR.
|
|
122
|
-
- **Back-merge:** after every push to `main`, the release workflow opens a PR merging `main` into `next` (or leaves the open one, which follows `main`). Merge it with a merge commit; until then dev builds fail the ancestry check.
|
|
78
|
+
## License
|
|
123
79
|
|
|
124
|
-
|
|
80
|
+
MIT
|