@molecule/app-solid 1.0.4 → 1.0.5
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 +22 -13
- package/package.json +5 -5
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-
|
|
6
|
+
Generated: 2026-10-23T15:23:11.674Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-solid
|
|
@@ -130,6 +130,15 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
|
|
|
130
130
|
* Gets the current user.
|
|
131
131
|
*/
|
|
132
132
|
getUser(): T | null;
|
|
133
|
+
/**
|
|
134
|
+
* Optional ownership marker for the current session. Compare values only within
|
|
135
|
+
* this client: replacing or ending a session changes it, including re-adopting
|
|
136
|
+
* the same token and user. Profile updates and same-session refreshes keep it.
|
|
137
|
+
* Consumers can use it to discard stale async work without treating editable
|
|
138
|
+
* user fields as an immutable account identifier. Providers without this
|
|
139
|
+
* capability require the consumer's own stable identity check.
|
|
140
|
+
*/
|
|
141
|
+
getSessionRevision?(): number;
|
|
133
142
|
/**
|
|
134
143
|
* Updates the cached user object (state + persistent storage) without
|
|
135
144
|
* hitting the network. Intended for local refreshes after a per-app
|
|
@@ -204,6 +213,9 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
|
|
|
204
213
|
confirmPasswordReset(data: PasswordResetConfirm): Promise<void>;
|
|
205
214
|
/**
|
|
206
215
|
* Updates the current user's profile.
|
|
216
|
+
* Returns the saved response. If the session is explicitly replaced or ended
|
|
217
|
+
* while the request is pending, that response does not replace the current
|
|
218
|
+
* session's user or persisted cache.
|
|
207
219
|
*/
|
|
208
220
|
updateProfile(data: Partial<T>): Promise<T>;
|
|
209
221
|
/**
|
|
@@ -262,16 +274,6 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
|
|
|
262
274
|
* Resolves IMMEDIATELY when no restore is in flight: before `initialize()` is ever
|
|
263
275
|
* called, and after it has finished. A restore that failed resolves too (it settled the
|
|
264
276
|
* question), so an HTTP client can await this before every request without risking one
|
|
265
|
-
* held forever. That is what makes the fetch-before-restore race impossible: a page that
|
|
266
|
-
* fetches viewer-dependent data on mount waits here instead of going out anonymously
|
|
267
|
-
* (see `setAuthGate` in `@molecule/app-http`).
|
|
268
|
-
*
|
|
269
|
-
* Optional: a provider that restores no session has nothing to wait for. Without it, an
|
|
270
|
-
* HTTP client bonded to that provider sends first-paint requests unauthenticated.
|
|
271
|
-
*
|
|
272
|
-
* A provider whose restore sends a request THROUGH the gated HTTP client must send that
|
|
273
|
-
* request with `skipAuthGate: true` (`RequestConfig` in `@molecule/app-http`): the gate
|
|
274
|
-
* waits on this promise, so holding the restore's own request makes the gate wait on
|
|
275
277
|
// … truncated — the full declaration is in node_modules/@molecule/app-solid/dist
|
|
276
278
|
```
|
|
277
279
|
|
|
@@ -354,7 +356,13 @@ interface FormController<T extends Record<string, unknown> = Record<string, unkn
|
|
|
354
356
|
*/
|
|
355
357
|
validate(): Promise<boolean>
|
|
356
358
|
/**
|
|
357
|
-
* Resets the form
|
|
359
|
+
* Resets the form and clears errors, touched fields and submission state.
|
|
360
|
+
*
|
|
361
|
+
* With no argument it restores the current baseline — the initial
|
|
362
|
+
* `defaultValues`, or the values a previous `reset(values)` established.
|
|
363
|
+
* Passing `values` merges them over the current baseline and makes the
|
|
364
|
+
* result the new baseline, so a form reset to freshly loaded or saved data
|
|
365
|
+
* reads clean (`isDirty === false`).
|
|
358
366
|
*/
|
|
359
367
|
reset(values?: Partial<T>): void
|
|
360
368
|
/**
|
|
@@ -386,7 +394,8 @@ Form creation options.
|
|
|
386
394
|
```typescript
|
|
387
395
|
interface FormOptions<T extends Record<string, unknown>> {
|
|
388
396
|
/**
|
|
389
|
-
* Default values
|
|
397
|
+
* Default values, captured as the form's clean baseline when the controller
|
|
398
|
+
* is created. Mutating this object afterwards does not change the baseline.
|
|
390
399
|
*/
|
|
391
400
|
defaultValues?: Partial<T>
|
|
392
401
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-solid",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Solid.js framework bindings for molecule.dev",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"solid-js": "^1.8.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@molecule/app-utilities": "1.0.
|
|
43
|
-
"@types/node": "26.
|
|
44
|
-
"seroval": "1.
|
|
42
|
+
"@molecule/app-utilities": "1.0.5",
|
|
43
|
+
"@types/node": "26.6.5",
|
|
44
|
+
"seroval": "1.7.1",
|
|
45
45
|
"solid-js": "1.9.17",
|
|
46
46
|
"typescript": "6.0.3",
|
|
47
|
-
"vitest": "4.1.
|
|
47
|
+
"vitest": "4.1.12"
|
|
48
48
|
},
|
|
49
49
|
"repository": {
|
|
50
50
|
"type": "git",
|