@jsenv/navi 0.27.80 → 0.27.82

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.
@@ -1,12 +1,31 @@
1
- # Instructions for AI assistants — read this before using @jsenv/navi
1
+ # @jsenv/navi — context for AI assistants
2
2
 
3
- This file is meant for an AI reading `dist/jsenv_navi.js` (e.g. while debugging
4
- inside `node_modules/@jsenv/navi/`). That file is a **generated build
5
- artifact** — bundled and flattened, without the comments or JSDoc that live in
6
- the original source. Don't infer usage or edit behavior from reading it
7
- directly; treat it as an implementation detail.
3
+ This file gives context for using `@jsenv/navi` as intended, useful whether
4
+ you're reading the source directly or the built `dist/jsenv_navi.js` (e.g.
5
+ inside `node_modules/@jsenv/navi/`).
8
6
 
9
- ## Where to find real documentation
7
+ `dist/jsenv_navi.js` is the bundled build of navi's actual source, not an
8
+ opaque blob — JSDoc comments on individual functions/exports are preserved
9
+ and carry real, useful information. What's lost in bundling is only
10
+ file-level comments and anything attached to an import/re-export statement
11
+ (the bundler only keeps a comment that sits directly above a declaration it
12
+ retains as-is).
13
+
14
+ ## Library, but also a framework
15
+
16
+ Navi is a library in the sense that every export is independently usable —
17
+ pick just `stateSignal` or just `Table` if that's all you need, no
18
+ all-or-nothing adoption required.
19
+
20
+ But it's also meant as a framework: it provides low-level primitives for
21
+ things most apps otherwise reinvent inconsistently — routing, async data
22
+ lifecycle, CSS layering/design tokens, focus/keyboard handling, and more.
23
+ When building something Navi already has a primitive for, prefer that
24
+ primitive over a custom one, even if the custom one would be quicker to
25
+ write for this one case — the value of using Navi as a framework comes from
26
+ consistency across the app, not from any single call site.
27
+
28
+ ## More context, if the JSDoc on what you're using isn't enough
10
29
 
11
30
  - `README.md` (package root) — high-level overview of what Navi provides:
12
31
  routing, actions, layout (`Box`), typography, icons, forms/validation,
@@ -17,8 +36,8 @@ directly; treat it as an implementation detail.
17
36
  - `docs/MOBILE_LAYOUT_PITFALLS.md` — mobile-specific layout gotchas (viewport
18
37
  units, virtual keyboard, safe areas).
19
38
  - Source code on GitHub: https://github.com/jsenv/core/tree/main/packages/frontend/navi/src
20
- the actual source, with per-file context, is more reliable than the
21
- bundled `dist/` output for understanding a specific export.
39
+ worth checking if the JSDoc on an export genuinely doesn't answer your
40
+ question.
22
41
 
23
42
  ## Key concepts to know before guessing an API
24
43
 
@@ -35,5 +54,6 @@ directly; treat it as an implementation detail.
35
54
  prop to respond to interaction — this is the standard wiring, not
36
55
  `onChange` + manual state.
37
56
 
38
- If unsure which export solves a problem, check `README.md` and the `src/`
39
- tree on GitHub before assuming behavior from the bundled code.
57
+ If unsure which export solves a problem, check `README.md` first the
58
+ `src/` tree on GitHub is there too if a specific export's own JSDoc doesn't
59
+ cover what you need.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.27.80",
3
+ "version": "0.27.82",
4
4
  "type": "module",
5
5
  "description": "Library of components including navigation to create frontend applications",
6
6
  "repository": {