@cognitap/radiant 0.0.1 → 0.0.2
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 +8 -15
- package/LICENSE +1 -1
- package/README.md +74 -242
- package/RELEASE_POLICY.md +23 -95
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,20 +4,13 @@ See the [release policy](RELEASE_POLICY.md) for versioning and migration rules.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.0.2
|
|
8
|
+
|
|
9
|
+
- Documentation and maintainer tooling cleanup. The Button API, styles and
|
|
10
|
+
dependency requirements are unchanged; no migration is needed.
|
|
11
|
+
- Still experimental, with a single native Button. Automated package checks do
|
|
12
|
+
not replace manual keyboard, focus and screen reader verification.
|
|
13
|
+
|
|
7
14
|
## 0.0.1
|
|
8
15
|
|
|
9
|
-
-
|
|
10
|
-
`reset.css` and a source `tailwind.css` customization entry. Tailwind is now
|
|
11
|
-
an optional peer dependency.
|
|
12
|
-
- Button inherits application fonts and sets its own box sizing and border
|
|
13
|
-
style, so its default appearance does not require a global reset.
|
|
14
|
-
- Migration for Tailwind consumers: replace the old source `styles.css` import
|
|
15
|
-
with `tailwind.css` alongside your own Tailwind entry. Ordinary consumers
|
|
16
|
-
retain the `styles.css` import. Choose one route to avoid duplicate utilities;
|
|
17
|
-
import `reset.css` separately if you want Preflight.
|
|
18
|
-
- Public source under MIT, with the copyright notice naming Zoltán Cserei and
|
|
19
|
-
a documented maintainer workflow and public bug/accessibility reporting.
|
|
20
|
-
- Initial experimental Button with ESM JavaScript, TypeScript declarations and
|
|
21
|
-
source maps.
|
|
22
|
-
- Public package identity, release policy and publishing metadata prepared for
|
|
23
|
-
the first `0.0.1` release.
|
|
16
|
+
- Public package identity for the first, `0.0.1` release. Do not expect granular updates until package is mature enough to be used by third parties.
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,146 +1,21 @@
|
|
|
1
1
|
# Radiant
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
React interaction components and presentation primitives, published as
|
|
4
|
+
[`@cognitap/radiant`](https://www.npmjs.com/package/@cognitap/radiant) under the
|
|
5
|
+
[MIT license](LICENSE). Radiant is experimental: `0.0.2` contains a single native
|
|
6
|
+
Button.
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
experimental: version `0.0.1` is a native Button proof of concept. The build
|
|
8
|
-
includes standalone component CSS, a separate optional reset and a Tailwind
|
|
9
|
-
customization entry.
|
|
10
|
-
See the
|
|
11
|
-
[release policy](RELEASE_POLICY.md) for identity, compatibility, support and
|
|
12
|
-
publication requirements, and the [changelog](CHANGELOG.md) for release changes.
|
|
13
|
-
|
|
14
|
-
Install the experimental package in a React application:
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
pnpm add --save-exact @cognitap/radiant@0.0.1
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Import `@cognitap/radiant/styles.css` once; see [Button](#button) for usage.
|
|
21
|
-
|
|
22
|
-
## Getting started
|
|
23
|
-
|
|
24
|
-
Use the Node version in `.nvmrc` and the pnpm version in `package.json`:
|
|
25
|
-
|
|
26
|
-
```sh
|
|
27
|
-
nvm install
|
|
28
|
-
nvm use
|
|
29
|
-
npm install --global "$(node -p 'require("./package.json").packageManager')"
|
|
30
|
-
pnpm install --frozen-lockfile
|
|
31
|
-
pnpm storybook
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Open [Storybook](http://localhost:6006) for the primary component development
|
|
35
|
-
loop. No Cognitap checkout or private configuration is required.
|
|
36
|
-
|
|
37
|
-
| Command | Purpose |
|
|
38
|
-
| ------------------------------------------- | ------------------------------------------------------------ |
|
|
39
|
-
| `pnpm storybook` | Edit components in the local workshop |
|
|
40
|
-
| `pnpm build` | Build library JavaScript, declarations, maps and CSS |
|
|
41
|
-
| `pnpm watch` | Watch JavaScript, declarations and compiled component styles |
|
|
42
|
-
| `pnpm build:storybook` | Build the separate static workshop |
|
|
43
|
-
| `pnpm typecheck` | Check source and Storybook types |
|
|
44
|
-
| `pnpm test` | Verify builds and an independently installed archive |
|
|
45
|
-
| `pnpm test:package` | Build, pack and verify an isolated installed package |
|
|
46
|
-
| `pnpm lint` | Check correctness and accessibility lint rules |
|
|
47
|
-
| `pnpm fmt` | Format repository files |
|
|
48
|
-
| `pnpm fmt:check` | Check formatting |
|
|
49
|
-
| `pnpm check` | Run all checks, including the Storybook build |
|
|
50
|
-
| `pnpm release:prepare` | Pack and verify a release candidate; dry-run publication |
|
|
51
|
-
| `pnpm pack --pack-destination dist/package` | Create a package archive locally |
|
|
52
|
-
|
|
53
|
-
CI installs the pinned dependencies with the committed lockfile and runs
|
|
54
|
-
`pnpm check` and package creation. Installing dependencies registers the
|
|
55
|
-
pre-commit hook, which formats staged files. See
|
|
56
|
-
[CONTRIBUTING.md](CONTRIBUTING.md) for the maintainer workflow.
|
|
57
|
-
|
|
58
|
-
Releases are independent of Cognitap; see the
|
|
59
|
-
[release workflow](RELEASE_POLICY.md#release-workflow).
|
|
60
|
-
|
|
61
|
-
## Library build
|
|
62
|
-
|
|
63
|
-
From the repository root:
|
|
8
|
+
## Usage
|
|
64
9
|
|
|
65
10
|
```sh
|
|
66
|
-
pnpm
|
|
11
|
+
pnpm add --save-exact @cognitap/radiant@0.0.2
|
|
67
12
|
```
|
|
68
13
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
development tools; ordinary consumers need only React and the packaged CSS.
|
|
72
|
-
|
|
73
|
-
TypeScript emits separate ES2022 ESM modules, `.d.ts` declarations, JavaScript
|
|
74
|
-
maps with embedded source, and declaration maps into `dist/library`. Keeping
|
|
75
|
-
modules separate preserves `use client` directives and external runtime imports:
|
|
76
|
-
React is a peer dependency and `cn` is a runtime dependency. Relative source
|
|
77
|
-
imports use `.js` extensions so emitted JavaScript and declarations work in Node
|
|
78
|
-
and bundlers, following [TypeScript's library guidance](https://www.typescriptlang.org/docs/handbook/modules/guides/choosing-compiler-options#im-writing-a-library).
|
|
79
|
-
|
|
80
|
-
The package root and three stylesheet entries are public exports. JavaScript,
|
|
81
|
-
types, component styles and the reset resolve to compiled artifacts. Sources ship for editor
|
|
82
|
-
navigation through declaration maps; stories, tests and Storybook output stay
|
|
83
|
-
out of the archive. Rebuilding cleans only `dist/library`.
|
|
84
|
-
|
|
85
|
-
JavaScript modules must remain free of import-time side effects. Bundlers can
|
|
86
|
-
discard unused modules; CSS is explicitly marked as having side effects so
|
|
87
|
-
stylesheet imports are retained. Browser interactions belong in the component's
|
|
88
|
-
lifecycle, and client-dependent modules need their own `use client` directive.
|
|
89
|
-
|
|
90
|
-
`pnpm test` builds the library, checks the Tailwind customization route locally,
|
|
91
|
-
and verifies the public package through an isolated installation.
|
|
92
|
-
|
|
93
|
-
### Installed archive verification
|
|
94
|
-
|
|
95
|
-
`pnpm test:package` builds Radiant, packs it into a temporary directory and
|
|
96
|
-
installs the archive there with npm. The small `tests/consumer` fixture owns
|
|
97
|
-
the public import/SSR, CSS, map, metadata and React-peer checks, plus independent
|
|
98
|
-
NodeNext and bundler declaration checks. It uses the repository's pinned React
|
|
99
|
-
and TypeScript versions, with no Tailwind or source aliases. Public package
|
|
100
|
-
checks run once, against installed artifacts. The directory and archive are
|
|
101
|
-
removed after success or failure.
|
|
102
|
-
|
|
103
|
-
`pnpm test` and `pnpm check` include this verification; npm and registry access
|
|
104
|
-
are required. Use `node scripts/verify-package.mjs /absolute/path/to/candidate.tgz`
|
|
105
|
-
to verify an existing release candidate without rebuilding or repacking it.
|
|
106
|
-
Browser interaction/hydration evidence and registry publication remain separate.
|
|
107
|
-
|
|
108
|
-
Storybook reads component source directly for rapid editing. `pnpm watch` uses
|
|
109
|
-
TypeScript and Tailwind's native watchers to update JavaScript, declarations and
|
|
110
|
-
the compiled component stylesheet. Run `pnpm build` first when using the watcher
|
|
111
|
-
on its own. The initial build also generates the optional reset; rerun
|
|
112
|
-
`pnpm build:css` after editing `styles/reset.css`. The watcher does not start Storybook.
|
|
113
|
-
|
|
114
|
-
For live integration, install dependencies in this checkout and Cognitap once,
|
|
115
|
-
then run `pnpm dev` from Cognitap. It automatically selects a sibling `../radiant`
|
|
116
|
-
checkout when present; `pnpm dev /path/to/radiant` selects another location, and
|
|
117
|
-
`pnpm dev --installed` selects the installed dependency explicitly. Without a
|
|
118
|
-
sibling checkout, development uses the installed dependency.
|
|
119
|
-
|
|
120
|
-
Cognitap builds the selected package, then starts its watchers and Storybook,
|
|
121
|
-
both frontend apps and Trantor together through Nx. The frontend processes resolve
|
|
122
|
-
this checkout's public exports through temporary aliases. The apps consume
|
|
123
|
-
compiled JavaScript and the documented Tailwind entry. Local Next.js development
|
|
124
|
-
uses Webpack for external package watching; ordinary development keeps Turbopack.
|
|
125
|
-
`Ctrl+C` stops the session.
|
|
126
|
-
Installed dependencies, manifests and lockfiles stay unchanged; ordinary Cognitap
|
|
127
|
-
checks and builds use its installed dependency even during a local session.
|
|
128
|
-
|
|
129
|
-
Run `pnpm dev --typecheck [checkout-path]` from Cognitap to refresh JavaScript,
|
|
130
|
-
declarations and maps with the `build:js` helper and check both apps against the
|
|
131
|
-
public declarations. The helper preserves the output directory and compiled
|
|
132
|
-
stylesheets during a watch session. Local commands select temporary type
|
|
133
|
-
configurations; editors normally read the ordinary app configurations, so use
|
|
134
|
-
this command to validate new public types. See
|
|
135
|
-
[Cognitap's development guide](https://github.com/cognitap/cognitap#live-radiant-development)
|
|
136
|
-
for the full workflow and Trantor setup.
|
|
137
|
-
|
|
138
|
-
Independent Storybook development needs no Cognitap checkout. Live integration
|
|
139
|
-
complements installed-archive and registry verification; it does not replace them.
|
|
140
|
-
|
|
141
|
-
## Button
|
|
14
|
+
Import the stylesheet once in your application. It needs no Tailwind and only
|
|
15
|
+
styles Radiant components:
|
|
142
16
|
|
|
143
17
|
```tsx
|
|
18
|
+
import '@cognitap/radiant/styles.css'
|
|
144
19
|
import { Button } from '@cognitap/radiant'
|
|
145
20
|
|
|
146
21
|
<Button onClick={handleContinue}>Continue</Button>
|
|
@@ -148,128 +23,85 @@ import { Button } from '@cognitap/radiant'
|
|
|
148
23
|
<Button type="submit">Save</Button>
|
|
149
24
|
```
|
|
150
25
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
avoid accidental form submission. Import its stylesheet once in your application:
|
|
26
|
+
For a global reset (Tailwind Preflight), also import `@cognitap/radiant/reset.css`
|
|
27
|
+
before `styles.css`. React 19.3+ is a peer dependency.
|
|
154
28
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
This route needs no Tailwind installation or CSS compiler. Components do not
|
|
160
|
-
import CSS themselves. The stylesheet contains component utilities and tokens;
|
|
161
|
-
it does not reset headings, body margins or unrelated native controls. Button
|
|
162
|
-
sets its own border style and box sizing and inherits the application's font.
|
|
163
|
-
|
|
164
|
-
The optional reset is a separate, application-wide choice:
|
|
165
|
-
|
|
166
|
-
```tsx
|
|
167
|
-
import '@cognitap/radiant/reset.css'
|
|
168
|
-
import '@cognitap/radiant/styles.css'
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
`reset.css` contains Tailwind Preflight, compiled and self-contained. It changes
|
|
172
|
-
global element defaults; importing it is not required for Radiant components.
|
|
29
|
+
`Button` takes native button props, including `ref`, `aria-*` and form attributes,
|
|
30
|
+
and defaults to `type="button"`. Give every button an accessible name through its
|
|
31
|
+
text or `aria-label`, and use a link for navigation. There are no variants, sizes,
|
|
32
|
+
or loading state yet.
|
|
173
33
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
34
|
+
Components use semantic tokens such as `bg-primary` and `rounded-control`.
|
|
35
|
+
Override their CSS variables to theme an application or a subtree; the defaults
|
|
36
|
+
are a light theme. Unlayered application CSS takes precedence over Radiant's
|
|
37
|
+
styles.
|
|
177
38
|
|
|
178
|
-
|
|
179
|
-
polymorphic rendering. The consumer owns actions and state. React 19.3+ is a peer
|
|
180
|
-
dependency.
|
|
39
|
+
### With Tailwind
|
|
181
40
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
instead of the compiled component sheet. It provides the semantic theme and
|
|
186
|
-
registers Radiant's shipped component sources for scanning; your application
|
|
187
|
-
generates the utilities once with its own Tailwind integration:
|
|
41
|
+
Applications on Tailwind 4.3.3+ can import the source entry instead of
|
|
42
|
+
`styles.css`, so their own build generates Radiant's utilities. Use one route,
|
|
43
|
+
not both, or the utilities are duplicated:
|
|
188
44
|
|
|
189
45
|
```css
|
|
190
46
|
@import 'tailwindcss';
|
|
191
47
|
@import '@cognitap/radiant/tailwind.css';
|
|
192
48
|
```
|
|
193
49
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
@layer theme, base, components, utilities;
|
|
199
|
-
@import 'tailwindcss/theme.css' layer(theme);
|
|
200
|
-
@import 'tailwindcss/utilities.css' layer(utilities);
|
|
201
|
-
@import '@cognitap/radiant/tailwind.css';
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
Choose one component-style route: compiled `styles.css` or generated
|
|
205
|
-
`tailwind.css`. Combining them duplicates the component utilities. The source
|
|
206
|
-
entry does not import Tailwind or generate a second utility sheet. Its `@source`
|
|
207
|
-
is relative to the installed source entry, so library scanning works inside
|
|
208
|
-
`node_modules`; stories and tests are excluded. Application scanning belongs to
|
|
209
|
-
your Tailwind setup. Configure its source base or add an application-relative
|
|
210
|
-
`@source` when automatic scanning does not cover your files. See
|
|
211
|
-
[Tailwind's source detection guide](https://tailwindcss.com/docs/detecting-classes-in-source-files).
|
|
50
|
+
To skip Preflight, replace `@import 'tailwindcss'` with
|
|
51
|
+
[Tailwind's separate imports](https://tailwindcss.com/docs/preflight#disabling-preflight).
|
|
52
|
+
Utilities passed in `className` replace matching defaults, including `hover:` and
|
|
53
|
+
`disabled:` variants: `<Button className="rounded-full hover:bg-red-500">`.
|
|
212
54
|
|
|
213
|
-
|
|
214
|
-
disabled background and foreground, focus color, and control radius. Components
|
|
215
|
-
use semantic utilities such as `bg-primary`, `text-primary-foreground`, and
|
|
216
|
-
`rounded-control`. Override the corresponding CSS variables to theme an application
|
|
217
|
-
or a subtree; these defaults currently define a light theme.
|
|
55
|
+
## Development
|
|
218
56
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
caller's `className` last so matching utilities override defaults. In a Tailwind app, for example,
|
|
222
|
-
`<Button className="rounded-full px-8 hover:bg-red-500">Continue</Button>` replaces
|
|
223
|
-
the default corner radius, horizontal padding, and hover color. Disabled
|
|
224
|
-
overrides use the same prefix, such as `disabled:bg-slate-300`. The compiled
|
|
225
|
-
sheet only includes utilities used by library components; arbitrary caller
|
|
226
|
-
utilities need your own generated CSS. Without Tailwind, use ordinary CSS
|
|
227
|
-
classes or override the semantic variables. Unlayered application CSS takes
|
|
228
|
-
precedence over Radiant's layered utilities.
|
|
229
|
-
|
|
230
|
-
## Storybook
|
|
231
|
-
|
|
232
|
-
Storybook uses React and Vite and lives in this package. From the repository root:
|
|
57
|
+
Use the Node.js version in `.nvmrc`. Any recent pnpm switches itself to the version
|
|
58
|
+
pinned in `package.json`:
|
|
233
59
|
|
|
234
60
|
```sh
|
|
61
|
+
nvm install && nvm use
|
|
62
|
+
npm install --global pnpm
|
|
63
|
+
pnpm install --frozen-lockfile
|
|
235
64
|
pnpm storybook
|
|
236
65
|
```
|
|
237
66
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
pnpm
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
`pnpm
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
and
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
67
|
+
Storybook runs at [localhost:6006](http://localhost:6006) and needs no Cognitap
|
|
68
|
+
checkout.
|
|
69
|
+
|
|
70
|
+
| Command | Purpose |
|
|
71
|
+
| ---------------------- | --------------------------------------------------------------- |
|
|
72
|
+
| `pnpm storybook` | Develop components in Storybook. |
|
|
73
|
+
| `pnpm build` | Build JavaScript, declarations, and CSS into `dist/library`. |
|
|
74
|
+
| `pnpm watch` | Rebuild on change, except `reset.css` (run `pnpm build` first). |
|
|
75
|
+
| `pnpm build:storybook` | Build static Storybook into `dist/storybook`. |
|
|
76
|
+
| `pnpm lint` | Run Oxlint, including accessibility rules. |
|
|
77
|
+
| `pnpm format` | Format with Oxfmt (`format:check` to check only). |
|
|
78
|
+
| `pnpm typecheck` | Check TypeScript. |
|
|
79
|
+
| `pnpm test` | Run style tests and verify the packed, installed package. |
|
|
80
|
+
| `pnpm test:package` | Verify the packed, installed package only. |
|
|
81
|
+
| `pnpm check` | Run formatting, lint, types, tests, and builds, as CI does. |
|
|
82
|
+
| `pnpm release:prepare` | Pack and verify a release candidate, then dry-run publishing. |
|
|
83
|
+
|
|
84
|
+
Package verification installs the archive with npm, so it needs network access.
|
|
85
|
+
A Husky pre-commit hook formats staged files with Oxfmt.
|
|
86
|
+
[CI](.github/workflows/ci.yml) runs `pnpm check`.
|
|
87
|
+
|
|
88
|
+
Modules must stay free of import-time side effects, and client-dependent modules
|
|
89
|
+
need their own `use client` directive. Add `*.stories.tsx` next to each component,
|
|
90
|
+
like `src/Button.stories.tsx`. Storybook's Accessibility panel runs axe checks on
|
|
91
|
+
every story, but automated checks cover only part of WCAG, so still test keyboard,
|
|
92
|
+
focus, and screen reader behavior by hand.
|
|
93
|
+
|
|
94
|
+
## Live development in Cognitap
|
|
95
|
+
|
|
96
|
+
With this checkout at `../radiant` and its dependencies installed, `pnpm dev` in
|
|
97
|
+
Cognitap builds and watches it, points both apps at it, and starts this Storybook.
|
|
98
|
+
Cognitap's installed package, manifests, and lockfile stay untouched. See
|
|
99
|
+
[Cognitap's guide](https://github.com/cognitap/cognitap#live-radiant-development)
|
|
100
|
+
for other checkouts and type checking.
|
|
101
|
+
|
|
102
|
+
## Further reading
|
|
103
|
+
|
|
104
|
+
- [Release policy](RELEASE_POLICY.md): versioning, compatibility, and the release workflow
|
|
105
|
+
- [Changelog](CHANGELOG.md): consumer-facing changes per release
|
|
106
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md): maintainer workflow and bug reports
|
|
107
|
+
- [AGENTS.md](AGENTS.md): component and styling conventions
|
package/RELEASE_POLICY.md
CHANGED
|
@@ -1,113 +1,41 @@
|
|
|
1
1
|
# Radiant release policy
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
deployments; the owner and trusted maintainers control development and merges.
|
|
5
|
-
|
|
6
|
-
## Identity and licensing
|
|
7
|
-
|
|
8
|
-
This repository is the authoritative Radiant source. Its selected GitHub identity
|
|
9
|
-
is `cognitap/radiant`; the npm package is `@cognitap/radiant`.
|
|
10
|
-
|
|
11
|
-
The source is licensed under MIT. [LICENSE](LICENSE) contains the complete text
|
|
12
|
-
and names Zoltán Cserei as the copyright holder. Corporate formation is not a
|
|
13
|
-
prerequisite for source opening or npm publication. This decision supersedes
|
|
14
|
-
DEV-84's initial incorporation gate.
|
|
15
|
-
|
|
16
|
-
Keep `private: true` in the package manifest until npm publication prerequisites
|
|
17
|
-
pass. This prevents package publication while public source development proceeds.
|
|
3
|
+
Radiant releases independently of Cognitap deployments.
|
|
18
4
|
|
|
19
5
|
## Versions
|
|
20
6
|
|
|
21
|
-
|
|
22
|
-
`latest
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
Releases follow [SemVer](https://semver.org/). `0.x` releases are experimental
|
|
8
|
+
and publish under `latest`; say so in the README and release notes. `1.0.0`
|
|
9
|
+
follows once the full catalog, its documentation, and accessibility
|
|
10
|
+
and compatibility verification are complete.
|
|
25
11
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| Compatible addition, cosmetic change or deprecation | Minor | Minor |
|
|
30
|
-
| Breaking change | Minor | Major |
|
|
12
|
+
Use the largest applicable bump. A fix that requires consumers to adapt is
|
|
13
|
+
breaking, even for accessibility or security. Published versions are immutable.
|
|
14
|
+
Prereleases use a version suffix and their own npm tag, never `latest`.
|
|
31
15
|
|
|
32
|
-
|
|
33
|
-
is breaking, including accessibility or security corrections. Pure internal
|
|
34
|
-
changes can use a patch when they preserve the public contract. Published
|
|
35
|
-
versions are immutable; follow-up fixes receive a new version.
|
|
16
|
+
## Public contract
|
|
36
17
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
18
|
+
The contract covers documented props and types, package exports, behavior,
|
|
19
|
+
semantic tokens, named parts, state attributes and functional CSS requirements.
|
|
20
|
+
Breaking changes include incompatible changes to any of these, sizing or layout
|
|
21
|
+
changes consumers must adapt to, raised peer dependency ranges and narrowed
|
|
22
|
+
environment support.
|
|
41
23
|
|
|
42
|
-
##
|
|
24
|
+
## Support
|
|
43
25
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
browser or OS support target do not themselves require a breaking release.
|
|
52
|
-
Record tested combinations separately from support targets.
|
|
53
|
-
|
|
54
|
-
Generated utility strings and foundation internals remain private. Package
|
|
55
|
-
exports define the supported import surface; shipping source for editor
|
|
56
|
-
navigation does not make internal imports supported.
|
|
57
|
-
|
|
58
|
-
React remains a peer dependency. Keep the current range initially; changes need
|
|
59
|
-
installed-package verification. The [package manifest](package.json) declares
|
|
60
|
-
current peer ranges and runtime dependencies. Contributor Node, pnpm and
|
|
61
|
-
TypeScript pins belong to development configuration and do not establish
|
|
62
|
-
consumer runtime or declaration requirements.
|
|
63
|
-
|
|
64
|
-
Ordinary consumers use compiled `styles.css` without Tailwind. The optional
|
|
65
|
-
`reset.css` is a separate, global opt-in; importing components loads neither
|
|
66
|
-
stylesheet automatically. Tailwind belongs to the optional `tailwind.css`
|
|
67
|
-
customization route, which registers the library theme and sources for the
|
|
68
|
-
application's own CSS generation. Choose one component stylesheet route.
|
|
69
|
-
|
|
70
|
-
Cognitap pins exact published versions after its migration. Optional local
|
|
71
|
-
development watches this package's public build and selects its exports through
|
|
72
|
-
process-only aliases. The apps use compiled JavaScript/types and the supported
|
|
73
|
-
Tailwind entry. Installed dependencies stay unchanged, so stopping needs no
|
|
74
|
-
restore step. Normal consumption after migration requires
|
|
75
|
-
only the published package. Local updates complement archive and registry
|
|
76
|
-
verification and do not replace publication readiness checks.
|
|
77
|
-
|
|
78
|
-
## Support and upgrades
|
|
79
|
-
|
|
80
|
-
Maintain the current stable major through its latest minor and patch releases.
|
|
81
|
-
Before `1.0.0`, fixes land in the latest experimental release. There is no
|
|
82
|
-
standing commitment to older release branches or response deadlines.
|
|
83
|
-
|
|
84
|
-
Every published version has a changelog entry describing its consumer-facing
|
|
85
|
-
changes and relevant verification limits. Identify breaking changes and include
|
|
86
|
-
actionable migration instructions. After `1.0.0`, normally deprecate in a minor
|
|
87
|
-
before removal in a major, without a fixed waiting period. During `0.x`, direct
|
|
88
|
-
removal is allowed with migration guidance.
|
|
89
|
-
|
|
90
|
-
## Publication readiness
|
|
91
|
-
|
|
92
|
-
Public source opening requires the finalized MIT notice, repository control and
|
|
93
|
-
verified standalone tooling. Initial npm publication additionally
|
|
94
|
-
requires scope permissions, compiled CSS, verified installed archives and an
|
|
95
|
-
independent release workflow.
|
|
96
|
-
|
|
97
|
-
Archives include the public build, stylesheet, editor-navigation sources, README,
|
|
98
|
-
LICENSE, changelog and this policy; exclude tests, stories and Storybook output.
|
|
99
|
-
The manifest's allowlist and exports define what ships and what is public.
|
|
100
|
-
|
|
101
|
-
The selected publishing configuration uses public npm access and `latest`.
|
|
102
|
-
Keep publication disabled until its prerequisites pass. Neither public source
|
|
103
|
-
nor an experimental package establishes stable catalog readiness or conformance
|
|
104
|
-
for an entire consumer application.
|
|
26
|
+
Only the latest release is maintained: the latest `0.x` before `1.0.0`, then the
|
|
27
|
+
current major. There are no backports or response deadlines.
|
|
28
|
+
|
|
29
|
+
Every published version gets a changelog entry covering consumer-facing changes
|
|
30
|
+
and known verification gaps. Mark breaking changes and include migration steps.
|
|
31
|
+
From `1.0.0`, deprecate in a minor before removing in a major; during `0.x`,
|
|
32
|
+
direct removal is allowed.
|
|
105
33
|
|
|
106
34
|
## Release workflow
|
|
107
35
|
|
|
108
36
|
Releases use native pnpm versioning and reviewed changelog notes. In a pull
|
|
109
37
|
request, run `pnpm version patch --no-git-tag-version` (or `minor`, following
|
|
110
|
-
the
|
|
38
|
+
the rules above), move the applicable Unreleased notes under a `## <version>`
|
|
111
39
|
heading in `CHANGELOG.md` and commit both. The first release keeps `0.0.1`.
|
|
112
40
|
|
|
113
41
|
From a clean checkout, `pnpm release:prepare` checks the version and notes,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognitap/radiant",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "React interaction components and presentation primitives",
|
|
5
5
|
"homepage": "https://github.com/cognitap/radiant#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
"test:package": "pnpm build && node scripts/verify-package.mjs",
|
|
94
94
|
"typecheck": "tsc --noEmit",
|
|
95
95
|
"lint": "oxlint --deny-warnings",
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"check": "pnpm
|
|
96
|
+
"format": "oxfmt",
|
|
97
|
+
"format:check": "oxfmt --check",
|
|
98
|
+
"check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build:storybook",
|
|
99
99
|
"release:prepare": "node scripts/prepare-release.mjs"
|
|
100
100
|
}
|
|
101
101
|
}
|