@molecule/app-bonds-default-react 1.1.7 → 2.0.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/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-10-19T21:59:14.074Z
6
+ Generated: 2026-10-24T08:39:00.105Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-bonds-default-react
@@ -33,7 +33,11 @@ React fleet stack, replacing the byte-identical per-app files:
33
33
  - Auth/http factories — `createDefaultAuthClient(authConfig)` returns
34
34
  `{ authClient, setupAuthDefault }`; the `...WithHttpSync` /
35
35
  `...WithFetchClient` variants also keep the bonded http client's bearer
36
- token in sync with auth events.
36
+ token in sync with auth events. All three accept any JSON object profile
37
+ (`createDefaultAuthClient<SessionUser>(config)` for an API whose user has no
38
+ `id`) and fall back to `UserProfile` — with its `id: string` — when no type
39
+ argument is given. The profile is never inferred from `authConfig`, so an
40
+ untyped call keeps the default contract.
37
41
 
38
42
  > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
39
43
  > It is written to be read by coding agents as much as by people, and is generated from this
@@ -129,8 +133,29 @@ Replaces the 16-line per-app `bonds/auth-default.ts` that 93 fleet
129
133
  apps shipped byte-identically. Apps pass their own `authConfig`
130
134
  (which lives in `src/config.ts`).
131
135
 
136
+ `TUser` is the profile the app's pages read, and may be any JSON object type —
137
+ including a profile with NO `id` (`{ username, email, bio, image }`), exactly
138
+ like the factory beneath this wrapper. Never add a synthetic `id` to satisfy a
139
+ type: nothing in the client reads it, and the fabricated value then travels into
140
+ storage, `getUser()` and every page. Omit the type parameter and the default is
141
+ `UserProfile`, whose `id: string` stays required — the profile is never inferred
142
+ from `authConfig` (no member of it, and not from an annotated config variable),
143
+ so an untyped wrapper call keeps the default contract.
144
+
145
+ Type the config with the SAME type (`const authConfig: AuthClientConfig<MyUser> = { … }`)
146
+ so its `mapAuthResponse` is checked against `MyUser`, and name that type at the
147
+ call (`createDefaultAuthClient<MyUser>(authConfig)`): a mapper that omits a
148
+ required custom field then fails at that call instead of shipping a signed-in
149
+ page that reads `undefined`. An annotated config alone does not supply the type
150
+ argument — that is a 1.8 caller shape this major changes (see
151
+ `AuthClientConfig`'s migration note in `@molecule/app-auth`).
152
+
153
+ `TRegister` is the app's own registration fields (`{ username: string }` for a
154
+
155
+ _(description truncated — read the full text in `node_modules/@molecule/app-bonds-default-react/dist/auth.d.ts`.)_
156
+
132
157
  ```typescript
133
- function createDefaultAuthClient(authConfig: AuthClientConfig<TUser>): {
158
+ function createDefaultAuthClient(authConfig: NoInfer<AuthClientConfigOptions<TUser>>): {
134
159
  authClient: AuthClient<TUser, TRegister>
135
160
  setupAuthDefault: () => void
136
161
  }
@@ -144,6 +169,9 @@ Variant of `createDefaultAuthClient` that also keeps the bonded
144
169
  client must carry the JWT on every request — without this wiring,
145
170
  authed endpoints return 401 after page reloads or token refresh.
146
171
 
172
+ The profile type is `createDefaultAuthClient`'s: a JSON object type of named
173
+ fields (see `AuthProfileShape`), including an app profile with no `id`.
174
+
147
175
  Hydrates the HTTP client's token from the persisted auth state
148
176
  on setup, then listens for auth events to keep them aligned, and holds
149
177
  requests until the session restore settles so a page effect that fetches
@@ -157,7 +185,7 @@ with no `Authorization` header). The source is applied to the client WHENEVER it
157
185
  bonded, so setup order no longer decides whether the first request is authorized.
158
186
 
159
187
  ```typescript
160
- function createDefaultAuthClientWithHttpSync(authConfig: AuthClientConfig<TUser>): {
188
+ function createDefaultAuthClientWithHttpSync(authConfig: NoInfer<AuthClientConfigOptions<TUser>>): {
161
189
  authClient: AuthClient<TUser, TRegister>
162
190
  setupAuthDefault: () => void
163
191
  }
@@ -185,9 +213,12 @@ Requests are also held until the session restore settles (see
185
213
  {@link registerAuthGate}), so a page that fetches viewer-dependent data on
186
214
  mount cannot race it and answer for an anonymous viewer.
187
215
 
216
+ The profile type is `createDefaultAuthClient`'s: a JSON object type of named
217
+ fields (see `AuthProfileShape`), including an app profile with no `id`.
218
+
188
219
  ```typescript
189
220
  function createDefaultAuthClientWithFetchClient(
190
- authConfig: AuthClientConfig<TUser>,
221
+ authConfig: NoInfer<AuthClientConfigOptions<TUser>>,
191
222
  fetchClientOptions: { baseURL: string; withCredentials?: boolean },
192
223
  ): { authClient: AuthClient<TUser, TRegister>; setupAuthDefault: () => void }
193
224
  ```
@@ -312,7 +343,7 @@ function setupAllDefaultBonds(): void
312
343
 
313
344
  Peer dependencies:
314
345
 
315
- - `@molecule/app-auth` ^1.0.1
346
+ - `@molecule/app-auth` ^2.0.0
316
347
  - `@molecule/app-charts` ^1.0.1
317
348
  - `@molecule/app-charts-chartjs` ^1.0.1
318
349
  - `@molecule/app-client-search` ^1.0.0
package/dist/auth.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AuthClient, AuthClientConfig, RegisterExtraShape, UserProfile } from '@molecule/app-auth';
1
+ import type { AuthClient, AuthClientConfigOptions, AuthProfileConstraint, RegisterExtraShape, UserProfile } from '@molecule/app-auth';
2
2
  import type { HttpClient } from '@molecule/app-http';
3
3
  /**
4
4
  * Builds the default fetch-based HTTP client + wires it into
@@ -56,6 +56,27 @@ export declare function createDefaultHttpClientWithAuthBearer(opts: {
56
56
  * apps shipped byte-identically. Apps pass their own `authConfig`
57
57
  * (which lives in `src/config.ts`).
58
58
  *
59
+ * `TUser` is the profile the app's pages read, and may be any JSON object type —
60
+ * including a profile with NO `id` (`{ username, email, bio, image }`), exactly
61
+ * like the factory beneath this wrapper. Never add a synthetic `id` to satisfy a
62
+ * type: nothing in the client reads it, and the fabricated value then travels into
63
+ * storage, `getUser()` and every page. Omit the type parameter and the default is
64
+ * `UserProfile`, whose `id: string` stays required — the profile is never inferred
65
+ * from `authConfig` (no member of it, and not from an annotated config variable),
66
+ * so an untyped wrapper call keeps the default contract.
67
+ *
68
+ * Type the config with the SAME type (`const authConfig: AuthClientConfig<MyUser> = { … }`)
69
+ * so its `mapAuthResponse` is checked against `MyUser`, and name that type at the
70
+ * call (`createDefaultAuthClient<MyUser>(authConfig)`): a mapper that omits a
71
+ * required custom field then fails at that call instead of shipping a signed-in
72
+ * page that reads `undefined`. An annotated config alone does not supply the type
73
+ * argument — that is a 1.8 caller shape this major changes (see
74
+ * `AuthClientConfig`'s migration note in `@molecule/app-auth`).
75
+ *
76
+ * `TRegister` is the app's own registration fields (`{ username: string }` for a
77
+ * RealWorld-shaped API), passed on to `@molecule/app-auth`'s factory so
78
+ * `authClient.register({ username, email, password })` type-checks with no cast.
79
+ *
59
80
  * @example
60
81
  * ```ts
61
82
  * // bonds/auth-default.ts
@@ -65,18 +86,8 @@ export declare function createDefaultHttpClientWithAuthBearer(opts: {
65
86
  * export const { authClient, setupAuthDefault } =
66
87
  * createDefaultAuthClient(authConfig)
67
88
  * ```
68
- *
69
- * `TRegister` is the app's own registration fields (`{ username: string }` for a
70
- * RealWorld-shaped API), passed on to `@molecule/app-auth`'s factory so
71
- * `authClient.register({ username, email, password })` type-checks with no cast.
72
- *
73
- * `TUser` is the profile the app's pages read. Type the config with the SAME
74
- * type (`const authConfig: AuthClientConfig<MyUser> = { … }`) so its
75
- * `mapAuthResponse` is checked against `MyUser`: a mapper that omits a required
76
- * custom field then fails at the `createDefaultAuthClient<MyUser>(authConfig)`
77
- * call instead of shipping a signed-in page that reads `undefined`.
78
89
  */
79
- export declare function createDefaultAuthClient<TUser extends UserProfile = UserProfile, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(authConfig: AuthClientConfig<TUser>): {
90
+ export declare function createDefaultAuthClient<TUser extends AuthProfileConstraint<TUser> = UserProfile, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(authConfig: NoInfer<AuthClientConfigOptions<TUser>>): {
80
91
  authClient: AuthClient<TUser, TRegister>;
81
92
  setupAuthDefault: () => void;
82
93
  };
@@ -87,6 +98,9 @@ export declare function createDefaultAuthClient<TUser extends UserProfile = User
87
98
  * client must carry the JWT on every request — without this wiring,
88
99
  * authed endpoints return 401 after page reloads or token refresh.
89
100
  *
101
+ * The profile type is `createDefaultAuthClient`'s: a JSON object type of named
102
+ * fields (see `AuthProfileShape`), including an app profile with no `id`.
103
+ *
90
104
  * Hydrates the HTTP client's token from the persisted auth state
91
105
  * on setup, then listens for auth events to keep them aligned, and holds
92
106
  * requests until the session restore settles so a page effect that fetches
@@ -99,7 +113,7 @@ export declare function createDefaultAuthClient<TUser extends UserProfile = User
99
113
  * with no `Authorization` header). The source is applied to the client WHENEVER it is
100
114
  * bonded, so setup order no longer decides whether the first request is authorized.
101
115
  */
102
- export declare function createDefaultAuthClientWithHttpSync<TUser extends UserProfile = UserProfile, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(authConfig: AuthClientConfig<TUser>): {
116
+ export declare function createDefaultAuthClientWithHttpSync<TUser extends AuthProfileConstraint<TUser> = UserProfile, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(authConfig: NoInfer<AuthClientConfigOptions<TUser>>): {
103
117
  authClient: AuthClient<TUser, TRegister>;
104
118
  setupAuthDefault: () => void;
105
119
  };
@@ -123,8 +137,11 @@ export declare function createDefaultAuthClientWithHttpSync<TUser extends UserPr
123
137
  * Requests are also held until the session restore settles (see
124
138
  * {@link registerAuthGate}), so a page that fetches viewer-dependent data on
125
139
  * mount cannot race it and answer for an anonymous viewer.
140
+ *
141
+ * The profile type is `createDefaultAuthClient`'s: a JSON object type of named
142
+ * fields (see `AuthProfileShape`), including an app profile with no `id`.
126
143
  */
127
- export declare function createDefaultAuthClientWithFetchClient<TUser extends UserProfile = UserProfile, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(authConfig: AuthClientConfig<TUser>, fetchClientOptions: {
144
+ export declare function createDefaultAuthClientWithFetchClient<TUser extends AuthProfileConstraint<TUser> = UserProfile, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(authConfig: NoInfer<AuthClientConfigOptions<TUser>>, fetchClientOptions: {
128
145
  baseURL: string;
129
146
  withCredentials?: boolean;
130
147
  }): {
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACZ,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAuCpD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG;IACxD,UAAU,EAAE,UAAU,CAAA;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAMA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qCAAqC,CAAC,IAAI,EAAE;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACzC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,GAAG;IACF,UAAU,EAAE,UAAU,CAAA;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAoBA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,SAAS,WAAW,GAAG,WAAW,EACvC,SAAS,SAAS,kBAAkB,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAEtE,UAAU,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAClC;IACD,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IACxC,gBA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CAAC,KAAK,CAAC,GAAG,WAAW,EACxD,SAAS,SAAS,kBAAkB,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAEtE,UAAU,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,EACnD,kBAAkB,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GACjE;IACD,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IACxC,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CA2BA"}
package/dist/auth.js CHANGED
@@ -92,6 +92,27 @@ export function createDefaultHttpClientWithAuthBearer(opts) {
92
92
  * apps shipped byte-identically. Apps pass their own `authConfig`
93
93
  * (which lives in `src/config.ts`).
94
94
  *
95
+ * `TUser` is the profile the app's pages read, and may be any JSON object type —
96
+ * including a profile with NO `id` (`{ username, email, bio, image }`), exactly
97
+ * like the factory beneath this wrapper. Never add a synthetic `id` to satisfy a
98
+ * type: nothing in the client reads it, and the fabricated value then travels into
99
+ * storage, `getUser()` and every page. Omit the type parameter and the default is
100
+ * `UserProfile`, whose `id: string` stays required — the profile is never inferred
101
+ * from `authConfig` (no member of it, and not from an annotated config variable),
102
+ * so an untyped wrapper call keeps the default contract.
103
+ *
104
+ * Type the config with the SAME type (`const authConfig: AuthClientConfig<MyUser> = { … }`)
105
+ * so its `mapAuthResponse` is checked against `MyUser`, and name that type at the
106
+ * call (`createDefaultAuthClient<MyUser>(authConfig)`): a mapper that omits a
107
+ * required custom field then fails at that call instead of shipping a signed-in
108
+ * page that reads `undefined`. An annotated config alone does not supply the type
109
+ * argument — that is a 1.8 caller shape this major changes (see
110
+ * `AuthClientConfig`'s migration note in `@molecule/app-auth`).
111
+ *
112
+ * `TRegister` is the app's own registration fields (`{ username: string }` for a
113
+ * RealWorld-shaped API), passed on to `@molecule/app-auth`'s factory so
114
+ * `authClient.register({ username, email, password })` type-checks with no cast.
115
+ *
95
116
  * @example
96
117
  * ```ts
97
118
  * // bonds/auth-default.ts
@@ -101,16 +122,6 @@ export function createDefaultHttpClientWithAuthBearer(opts) {
101
122
  * export const { authClient, setupAuthDefault } =
102
123
  * createDefaultAuthClient(authConfig)
103
124
  * ```
104
- *
105
- * `TRegister` is the app's own registration fields (`{ username: string }` for a
106
- * RealWorld-shaped API), passed on to `@molecule/app-auth`'s factory so
107
- * `authClient.register({ username, email, password })` type-checks with no cast.
108
- *
109
- * `TUser` is the profile the app's pages read. Type the config with the SAME
110
- * type (`const authConfig: AuthClientConfig<MyUser> = { … }`) so its
111
- * `mapAuthResponse` is checked against `MyUser`: a mapper that omits a required
112
- * custom field then fails at the `createDefaultAuthClient<MyUser>(authConfig)`
113
- * call instead of shipping a signed-in page that reads `undefined`.
114
125
  */
115
126
  export function createDefaultAuthClient(authConfig) {
116
127
  const authClient = createJWTAuthClient(authConfig);
@@ -126,6 +137,9 @@ export function createDefaultAuthClient(authConfig) {
126
137
  * client must carry the JWT on every request — without this wiring,
127
138
  * authed endpoints return 401 after page reloads or token refresh.
128
139
  *
140
+ * The profile type is `createDefaultAuthClient`'s: a JSON object type of named
141
+ * fields (see `AuthProfileShape`), including an app profile with no `id`.
142
+ *
129
143
  * Hydrates the HTTP client's token from the persisted auth state
130
144
  * on setup, then listens for auth events to keep them aligned, and holds
131
145
  * requests until the session restore settles so a page effect that fetches
@@ -188,6 +202,9 @@ export function createDefaultAuthClientWithHttpSync(authConfig) {
188
202
  * Requests are also held until the session restore settles (see
189
203
  * {@link registerAuthGate}), so a page that fetches viewer-dependent data on
190
204
  * mount cannot race it and answer for an anonymous viewer.
205
+ *
206
+ * The profile type is `createDefaultAuthClient`'s: a JSON object type of named
207
+ * fields (see `AuthProfileShape`), including an app profile with no `id`.
191
208
  */
192
209
  export function createDefaultAuthClientWithFetchClient(authConfig, fetchClientOptions) {
193
210
  const authClient = createJWTAuthClient(authConfig);
package/dist/index.d.ts CHANGED
@@ -24,7 +24,11 @@
24
24
  * - Auth/http factories — `createDefaultAuthClient(authConfig)` returns
25
25
  * `{ authClient, setupAuthDefault }`; the `...WithHttpSync` /
26
26
  * `...WithFetchClient` variants also keep the bonded http client's bearer
27
- * token in sync with auth events.
27
+ * token in sync with auth events. All three accept any JSON object profile
28
+ * (`createDefaultAuthClient<SessionUser>(config)` for an API whose user has no
29
+ * `id`) and fall back to `UserProfile` — with its `id: string` — when no type
30
+ * argument is given. The profile is never inferred from `authConfig`, so an
31
+ * untyped call keeps the default contract.
28
32
  *
29
33
  * @example
30
34
  * ```tsx
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuFG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -24,7 +24,11 @@
24
24
  * - Auth/http factories — `createDefaultAuthClient(authConfig)` returns
25
25
  * `{ authClient, setupAuthDefault }`; the `...WithHttpSync` /
26
26
  * `...WithFetchClient` variants also keep the bonded http client's bearer
27
- * token in sync with auth events.
27
+ * token in sync with auth events. All three accept any JSON object profile
28
+ * (`createDefaultAuthClient<SessionUser>(config)` for an API whose user has no
29
+ * `id`) and fall back to `UserProfile` — with its `id: string` — when no type
30
+ * argument is given. The profile is never inferred from `authConfig`, so an
31
+ * untyped call keeps the default contract.
28
32
  *
29
33
  * @example
30
34
  * ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-bonds-default-react",
3
- "version": "1.1.7",
3
+ "version": "2.0.0",
4
4
  "description": "Default app-side bond wirings for React+Tailwind+react-router+localStorage+Arimo font+molecule icons. 5 setup functions consolidating 665 byte-identical per-app bond wiring files across the fleet.",
5
5
  "homepage": "https://www.molecule.dev/packages/app-bonds-default-react",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "directory": "packages/app/infrastructure/bonds-default-react"
39
39
  },
40
40
  "devDependencies": {
41
- "@molecule/app-auth": "1.8.2",
41
+ "@molecule/app-auth": "2.0.0",
42
42
  "@molecule/app-charts-chartjs": "1.0.3",
43
43
  "@molecule/app-client-search": "1.0.3",
44
44
  "@molecule/app-client-search-minisearch": "1.0.4",
@@ -80,7 +80,7 @@
80
80
  "vitest": "4.1.12"
81
81
  },
82
82
  "peerDependencies": {
83
- "@molecule/app-auth": "^1.0.1",
83
+ "@molecule/app-auth": "^2.0.0",
84
84
  "@molecule/app-charts": "^1.0.1",
85
85
  "@molecule/app-charts-chartjs": "^1.0.1",
86
86
  "@molecule/app-client-search": "^1.0.0",