trama-forms 0.1.0 → 0.1.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/README.md +7 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,13 +31,15 @@ The public entries are `trama-forms/core` and `trama-forms/react`, which point t
|
|
|
31
31
|
|
|
32
32
|
## Interactive guide
|
|
33
33
|
|
|
34
|
+
Open the guide at https://aleluman.github.io/trama/. It explains fields, sessions, React, loading with TanStack Query, value formulas, events, field state, remote select, outputs, a complete example, the API, and errors and limits. Each example shows the file that runs the demo beside it, with steps to try it. The guide documents only what is implemented. The published guide documents the latest release, and its sidebar shows the version.
|
|
35
|
+
|
|
36
|
+
To run the guide from a checkout, which can be ahead of the latest release, use these commands and open http://127.0.0.1:5173.
|
|
37
|
+
|
|
34
38
|
```sh
|
|
35
39
|
pnpm install --frozen-lockfile
|
|
36
40
|
pnpm run docs:dev
|
|
37
41
|
```
|
|
38
42
|
|
|
39
|
-
Open http://127.0.0.1:5173. The guide (`docs/site/`) explains fields, sessions, React, loading with TanStack Query, value formulas, events, field state, remote select, outputs, a complete example, the API, and errors and limits. Each example shows the file that runs the demo beside it, with steps to try it. The guide documents only what is implemented.
|
|
40
|
-
|
|
41
43
|
`pnpm run docs:dev` builds Trama, and the guide uses the public entries from `dist`. To rebuild the library while editing `src/`, run `pnpm run build:watch` in another terminal. If a definition changes during HMR, reload the page. `pnpm run docs:site` builds the guide in `.artifacts/site/` and `pnpm run docs:preview` serves it at http://127.0.0.1:4173.
|
|
42
44
|
|
|
43
45
|
## Development
|
|
@@ -60,13 +62,13 @@ pnpm test
|
|
|
60
62
|
|
|
61
63
|
- **Build.** TypeScript builds the core and the declarations. The build distributes the binding compiled with React Compiler through `oxc-transform-react` 0.145.0, without Babel. The binding uses `react/compiler-runtime`, which ships with React 19. The native compiler is experimental, and its version is pinned alongside `@vitejs/plugin-react` 6.1.1.
|
|
62
64
|
- **Lint and formatting.** [Oxlint](https://oxc.rs/docs/guide/usage/linter/config) with type-aware analysis (`oxlint-tsgolint`) treats the `correctness`, `suspicious`, `pedantic`, and `perf` categories as errors and rejects unused suppressions. [Oxfmt](https://oxc.rs/docs/guide/usage/formatter) formats the code. In `docs/site/`, the `react-perf` rules for new props are disabled because React Compiler memoizes the guide. The Hooks rules remain enabled.
|
|
63
|
-
- **Tests.** `node:test` tests the actual core, React, and TanStack Query with controlled transport, and the definition of the guide's complete example. The package test installs a `.tgz` in an isolated project, runs the core without React, checks the typing of valid and invalid uses, verifies that internal imports are rejected, and builds the guide against the installed package. Artifacts are kept in `.artifacts/package-check/`.
|
|
65
|
+
- **Tests.** `node:test` tests the actual core, React, and TanStack Query with controlled transport, and the definition of the guide's complete example. The package test installs a `.tgz` in an isolated project, runs the core without React, checks the typing of valid and invalid uses, verifies that internal imports are rejected, and builds the guide against the installed package, with relative asset paths and the package version in its sidebar. Artifacts are kept in `.artifacts/package-check/`.
|
|
64
66
|
- **Continuous integration.** GitHub Actions runs `pnpm run check` on every pull request and on every push to `main` (`.github/workflows/ci.yml`).
|
|
65
|
-
- **Releases.** Releases come from `aleluman/trama`. Set the version in `package.json` and push a matching tag, such as `v0.1.1`. The release workflow (`.github/workflows/release.yml`) checks that the tag matches the version, runs `pnpm run check`, and packs the package. If that version is not on npm yet, a separate job
|
|
67
|
+
- **Releases.** Releases come from `aleluman/trama`. Set the version in `package.json` and push a matching tag, such as `v0.1.1`. The release workflow (`.github/workflows/release.yml`) checks that the tag matches the version, runs `pnpm run check`, and packs the package. If that version is not on npm yet, a separate job stages the tarball through npm trusted publishing, with provenance. The version becomes public only after a maintainer approves it on npmjs.com with two-factor authentication. Approve staged versions in version order, because each one keeps the `latest` tag it was staged with. On npmjs.com, the trusted publisher names this repository and the `release.yml` workflow, and it is stage-only, with "Allow npm publish" and "Allow npm dist-tag" unchecked. A new trusted publisher expires unless its first publish succeeds within two days, so create it just before pushing the tag. Provenance requires the repository to be public. Version 0.1.0 is published by hand, because trusted publishing can only be configured for a package that already exists. The same workflow deploys the guide built by `pnpm run check` to GitHub Pages, whose source is GitHub Actions. The guide is deployed after the version is staged, or when it is already on npm, and never when staging fails. The `github-pages` environment accepts only `v*` tags.
|
|
66
68
|
|
|
67
69
|
## Project documentation
|
|
68
70
|
|
|
69
|
-
- [Interactive guide](
|
|
71
|
+
- [Interactive guide](https://aleluman.github.io/trama/) on using the library, with demos. Its source is in [docs/site/](docs/site/).
|
|
70
72
|
- The technical document records the current contracts, limits, decisions, and performance. `pnpm run docs:build` generates standalone HTML, and `pnpm run docs:check` checks that it is up to date. [Technical document](docs/technical.html) · [Source](docs/technical/content.html)
|
|
71
73
|
- [CONTEXT.md](CONTEXT.md) is the glossary.
|
|
72
74
|
- [AGENTS.md](AGENTS.md) contains the working rules.
|