najm-kit 2.8.2 → 2.10.0

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 CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.10.0 - 2026-08-10
4
+
5
+ - Added a shared, failure-aware media source chain for `NAvatar`, `NImage`, and
6
+ the new Next-only `NNextImage` export. Sources reset cleanly when inputs or
7
+ cache versions change, duplicate candidates are tried once, consumer event
8
+ handlers are preserved, and failed avatars return to initials without a
9
+ broken-image glyph.
10
+ - `NAvatar` now uses a native lazy-loaded image so loading and error events are
11
+ observable, keeps initials visible until the image paints, supports native
12
+ `imageProps`, and actually tries `fallbackSrc` after a primary failure.
13
+ - Added provider-level status badge defaults and the public
14
+ `normalizeStatusToken` helper. Applications can configure translated status
15
+ labels, colors, icons, look, shape, and size once while explicit badge props
16
+ retain precedence.
17
+ - Added `NNextImage` and `NNextImageProps` to `najm-kit/next` only, preserving
18
+ Next Image `fill`, `sizes`, optimizer, and `unoptimized` controls without
19
+ adding Next.js to the root runtime graph.
20
+
21
+ ## 2.9.0 - 2026-08-09
22
+
23
+ - Added `najm-kit/server`, a pure UI bootstrap loader. `createUiBootstrapLoader()`
24
+ takes the application's own fetcher, endpoint paths, payload parsers, and
25
+ factory values, then runs the resources concurrently, unwraps the `{ data }`
26
+ envelope (or one the application selects), and falls back per resource so a
27
+ branding outage never discards a valid appearance. Failures are reported
28
+ through an optional structured `onDiagnostic` callback carrying resource,
29
+ reason, path, and status — never a response body, header, cookie, or raw
30
+ thrown value. A `fallback()` that throws stays a visible error. The entry
31
+ imports no React, no Next.js, and no Node built-in, and re-exports
32
+ `parseNajmDesignConfig` so an appearance payload can be parsed without
33
+ reaching the root barrel.
34
+ - Added `najm-kit/server/react`, the React Server Component adapter.
35
+ `createReactServerUiBootstrap()` memoizes one bootstrap per request with
36
+ React's `cache()` and derives the per-resource accessors from it, so a root
37
+ layout, a nested layout, and a page share one resolution and one stable
38
+ snapshot for the whole render. Resolution is request-scoped only: separate
39
+ requests share no snapshot, failure, or diagnostic, and a transient outage is
40
+ retried on the next request. The `browser` export condition resolves to a
41
+ module that throws, so importing the adapter from a Client Component fails at
42
+ build time instead of shipping the application's fetcher and factory values
43
+ into a browser bundle.
44
+ - The root `najm-kit`, `najm-kit/next`, and `najm-kit/app` entries are unchanged
45
+ and do not reach either server entry.
46
+
3
47
  ## 2.8.2 - 2026-08-08
4
48
 
5
49
  - Added the framework-neutral `najm-kit/person-images` subpath. It ships a
@@ -10,33 +54,33 @@
10
54
  unknown role strings at the call site. The root `najm-kit` entry stays
11
55
  unchanged and does not pull in the person images.
12
56
 
13
- ## 2.8.1 - 2026-08-08
14
-
15
- - Added schema-driven form development tools to `NajmAppProvider`. Passing
16
- `formDevTools` enables F8 filling for every `NForm` and `WizardForm` without
17
- an application helper or additional provider.
18
- - Added built-in Zod 4 form-value generation with per-form overrides for
19
- relation fields and other application-owned values. Existing explicit
20
- `devTools.enabled` and `devTools.fill` usage remains supported.
21
-
22
- ## 2.8.0 - 2026-08-08
23
-
24
- - Added server-safe `najm-kit/format` helpers for currency minor units,
25
- numbers, percentages, dates, times, relative time, tokens, local date inputs,
26
- and slugs. Client applications can use the same contract reactively through
27
- `NajmFormatProvider` and `useNajmFormat`.
28
- - Added the server-safe `najm-kit/pagination` offset protocol, including bounded
29
- page creation, total-aware continuation, probe-row continuation for APIs
30
- without totals, and query cleanup that preserves meaningful `false` and `0`.
31
- - Added the optional-peer `najm-kit/query` entry with offset infinite-query and
32
- responsive paged/card-list hooks, plus shared card-pagination adapters and
33
- localized continuation labels.
34
- - Extended `NajmAppProvider` with formatting locale, currency, and placeholder
35
- configuration so applications can bind language, time zone, and formatting
36
- without another host bridge provider.
37
- - Added shared media-query/card-viewport helpers and avatar-source utilities.
38
-
39
- ## 2.6.2
57
+ ## 2.8.1 - 2026-08-08
58
+
59
+ - Added schema-driven form development tools to `NajmAppProvider`. Passing
60
+ `formDevTools` enables F8 filling for every `NForm` and `WizardForm` without
61
+ an application helper or additional provider.
62
+ - Added built-in Zod 4 form-value generation with per-form overrides for
63
+ relation fields and other application-owned values. Existing explicit
64
+ `devTools.enabled` and `devTools.fill` usage remains supported.
65
+
66
+ ## 2.8.0 - 2026-08-08
67
+
68
+ - Added server-safe `najm-kit/format` helpers for currency minor units,
69
+ numbers, percentages, dates, times, relative time, tokens, local date inputs,
70
+ and slugs. Client applications can use the same contract reactively through
71
+ `NajmFormatProvider` and `useNajmFormat`.
72
+ - Added the server-safe `najm-kit/pagination` offset protocol, including bounded
73
+ page creation, total-aware continuation, probe-row continuation for APIs
74
+ without totals, and query cleanup that preserves meaningful `false` and `0`.
75
+ - Added the optional-peer `najm-kit/query` entry with offset infinite-query and
76
+ responsive paged/card-list hooks, plus shared card-pagination adapters and
77
+ localized continuation labels.
78
+ - Extended `NajmAppProvider` with formatting locale, currency, and placeholder
79
+ configuration so applications can bind language, time zone, and formatting
80
+ without another host bridge provider.
81
+ - Added shared media-query/card-viewport helpers and avatar-source utilities.
82
+
83
+ ## 2.6.2
40
84
 
41
85
  - Added `NSidebarProvider` and `useNSidebar`, so sidebar state can be read from a distance. `NSidebar` renders beside the page content rather than around it, which left applications hand-rolling a context to hand `setMobileOpen` down to a page header — a wrapper component plus an aliased import at every call site. Wrap the shell in `NSidebarProvider` and `NPageHeader` now resolves both `onSidebarOpen` and `mobileBreakpoint` from it, so a header nested anywhere below renders a working mobile trigger with no props threaded to it. Also exports the `NSidebarContextValue` type.
42
86
  - `NSidebar` resolves its open and collapsed state as explicit prop → surrounding provider → internal state. Passing `collapsed`, `mobileOpen`, `onCollapsedChange`, or `onMobileOpenChange` keeps behaving exactly as before, and a sidebar with no provider around it still owns its own state, so this is additive for every existing consumer.