@molecule/app-svelte 3.5.1 → 3.7.1
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 +287 -76
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/live-store.d.ts +0 -8
- package/dist/hooks/live-store.d.ts.map +1 -1
- package/dist/hooks/live-store.js +0 -13
- package/dist/hooks/maybe-readable.d.ts +36 -0
- package/dist/hooks/maybe-readable.d.ts.map +1 -0
- package/dist/hooks/maybe-readable.js +36 -0
- package/dist/hooks/useAIModels.d.ts +8 -2
- package/dist/hooks/useAIModels.d.ts.map +1 -1
- package/dist/hooks/useAIModels.js +44 -17
- package/dist/hooks/useAuth.d.ts +10 -4
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +39 -13
- package/dist/hooks/useForm.d.ts +13 -5
- package/dist/hooks/useForm.d.ts.map +1 -1
- package/dist/hooks/useForm.js +90 -58
- package/dist/hooks/useHttp.d.ts +28 -22
- package/dist/hooks/useHttp.d.ts.map +1 -1
- package/dist/hooks/useHttp.js +67 -96
- package/dist/hooks/useOAuth.d.ts +23 -7
- package/dist/hooks/useOAuth.d.ts.map +1 -1
- package/dist/hooks/useOAuth.js +51 -18
- package/dist/hooks/useOptimisticToggle.d.ts +67 -0
- package/dist/hooks/useOptimisticToggle.d.ts.map +1 -0
- package/dist/hooks/useOptimisticToggle.js +52 -0
- package/dist/hooks/useOptimisticValue.d.ts +11 -4
- package/dist/hooks/useOptimisticValue.d.ts.map +1 -1
- package/dist/hooks/useOptimisticValue.js +40 -49
- package/dist/hooks/usePush.d.ts +7 -3
- package/dist/hooks/usePush.d.ts.map +1 -1
- package/dist/hooks/usePush.js +26 -6
- package/dist/hooks/useRouter.d.ts +13 -7
- package/dist/hooks/useRouter.d.ts.map +1 -1
- package/dist/hooks/useRouter.js +39 -18
- package/dist/hooks/useStorage.d.ts +22 -9
- package/dist/hooks/useStorage.d.ts.map +1 -1
- package/dist/hooks/useStorage.js +146 -69
- package/dist/hooks/useStore.d.ts +14 -7
- package/dist/hooks/useStore.d.ts.map +1 -1
- package/dist/hooks/useStore.js +46 -9
- package/dist/hooks/useTranslation.d.ts +6 -2
- package/dist/hooks/useTranslation.d.ts.map +1 -1
- package/dist/hooks/useTranslation.js +11 -6
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/link/Link.svelte +33 -0
- package/dist/link/Link.svelte.d.ts +12 -0
- package/dist/link/Link.svelte.d.ts.map +1 -0
- package/dist/link/index.d.ts +23 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js +22 -0
- package/dist/link/types.d.ts +26 -0
- package/dist/link/types.d.ts.map +1 -0
- package/dist/link/types.js +6 -0
- package/dist/stores/chat.d.ts +4 -3
- package/dist/stores/chat.d.ts.map +1 -1
- package/dist/stores/chat.js +14 -15
- package/package.json +5 -5
package/dist/hooks/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
|
+
export * from './maybe-readable.js';
|
|
9
10
|
export * from './useAIModels.js';
|
|
10
11
|
export * from './useAsyncState.js';
|
|
11
12
|
export * from './useAuth.js';
|
|
@@ -18,6 +19,7 @@ export * from './useHttp.js';
|
|
|
18
19
|
export * from './useLogger.js';
|
|
19
20
|
export * from './useLogin.js';
|
|
20
21
|
export * from './useOAuth.js';
|
|
22
|
+
export * from './useOptimisticToggle.js';
|
|
21
23
|
export * from './useOptimisticValue.js';
|
|
22
24
|
export * from './usePasswordReset.js';
|
|
23
25
|
export * from './usePlatform.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,kBAAkB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BAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
|
+
export * from './maybe-readable.js';
|
|
9
10
|
export * from './useAIModels.js';
|
|
10
11
|
export * from './useAsyncState.js';
|
|
11
12
|
export * from './useAuth.js';
|
|
@@ -18,6 +19,7 @@ export * from './useHttp.js';
|
|
|
18
19
|
export * from './useLogger.js';
|
|
19
20
|
export * from './useLogin.js';
|
|
20
21
|
export * from './useOAuth.js';
|
|
22
|
+
export * from './useOptimisticToggle.js';
|
|
21
23
|
export * from './useOptimisticValue.js';
|
|
22
24
|
export * from './usePasswordReset.js';
|
|
23
25
|
export * from './usePlatform.js';
|
|
@@ -34,14 +34,6 @@ export declare function liveStore<T>(read: () => T, subscribe: (notify: () => vo
|
|
|
34
34
|
* @returns A readable store of that field's current value.
|
|
35
35
|
*/
|
|
36
36
|
export declare function fieldStore<T, K extends keyof T>(state: Readable<T>, key: K): Readable<T[K]>;
|
|
37
|
-
/**
|
|
38
|
-
* Whether a hook's options were passed as a readable store (options that change
|
|
39
|
-
* without a remount) rather than as a plain value.
|
|
40
|
-
*
|
|
41
|
-
* @param value - The options, or a store of them.
|
|
42
|
-
* @returns True for a store.
|
|
43
|
-
*/
|
|
44
|
-
export declare function isReadableStore<T>(value: T | Readable<T>): value is Readable<T>;
|
|
45
37
|
/** The field-by-field view of a `usePromise` tracker, for hooks built on it. */
|
|
46
38
|
export interface PromiseTrackerFields<T, A extends unknown[]> {
|
|
47
39
|
/** The latest call's status. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-store.d.ts","sourceRoot":"","sources":["../../src/hooks/live-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAgB,KAAK,QAAQ,EAAY,MAAM,cAAc,CAAA;AAEpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,IAAI,EAAE,MAAM,CAAC,EACb,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,GAC5C,QAAQ,CAAC,CAAC,CAAC,CAKb;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAE3F;AAED
|
|
1
|
+
{"version":3,"file":"live-store.d.ts","sourceRoot":"","sources":["../../src/hooks/live-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAgB,KAAK,QAAQ,EAAY,MAAM,cAAc,CAAA;AAEpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,IAAI,EAAE,MAAM,CAAC,EACb,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,GAC5C,QAAQ,CAAC,CAAC,CAAC,CAKb;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAE3F;AAED,gFAAgF;AAChF,MAAM,WAAW,oBAAoB,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE;IAC1D,gCAAgC;IAChC,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAA;IAC/B,6EAA6E;IAC7E,KAAK,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;IACzB,mCAAmC;IACnC,KAAK,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;IAC7B,oEAAoE;IACpE,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;IAChC,mCAAmC;IACnC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,EAClD,OAAO,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,GAC7B,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAW5B"}
|
package/dist/hooks/live-store.js
CHANGED
|
@@ -40,19 +40,6 @@ export function liveStore(read, subscribe) {
|
|
|
40
40
|
export function fieldStore(state, key) {
|
|
41
41
|
return derived(state, (current) => current[key]);
|
|
42
42
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Whether a hook's options were passed as a readable store (options that change
|
|
45
|
-
* without a remount) rather than as a plain value.
|
|
46
|
-
*
|
|
47
|
-
* @param value - The options, or a store of them.
|
|
48
|
-
* @returns True for a store.
|
|
49
|
-
*/
|
|
50
|
-
export function isReadableStore(value) {
|
|
51
|
-
return (typeof value === 'object' &&
|
|
52
|
-
value !== null &&
|
|
53
|
-
'subscribe' in value &&
|
|
54
|
-
typeof value.subscribe === 'function');
|
|
55
|
-
}
|
|
56
43
|
/**
|
|
57
44
|
* Reads a `usePromise` tracker's fields as individual stores and functions,
|
|
58
45
|
* for hooks built on it (`useLogin`, `useSignup`, …).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reactive argument every hook accepts: a plain value, or a readable store
|
|
3
|
+
* of one. A Svelte hook runs once per component, so the only way it can see a
|
|
4
|
+
* new argument is a store the app (or a `{#key}` block's parent) sets — the way
|
|
5
|
+
* React's hooks see a re-render.
|
|
6
|
+
*
|
|
7
|
+
* A store may hold `undefined`: that means the argument was omitted, and the
|
|
8
|
+
* parameter's default applies, exactly as for a missing argument.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { type Readable } from 'svelte/store';
|
|
13
|
+
/**
|
|
14
|
+
* A plain value or a readable store of one (a store of `undefined` stands for
|
|
15
|
+
* an omitted argument). Hooks read the current value when they use it and
|
|
16
|
+
* follow changes for as long as the component lives.
|
|
17
|
+
*/
|
|
18
|
+
export type MaybeReadable<T> = T | Readable<T>;
|
|
19
|
+
/**
|
|
20
|
+
* Whether a value is a readable store. A molecule store (`@molecule/app-state`'s
|
|
21
|
+
* `Store`: it has `getState` AND `subscribe`) is a VALUE, never a source —
|
|
22
|
+
* `useStore` takes the store itself as its argument.
|
|
23
|
+
*
|
|
24
|
+
* @param value - A hook argument: a plain value or a store.
|
|
25
|
+
* @returns True for a Svelte readable store.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isReadable(value: unknown): value is Readable<unknown>;
|
|
28
|
+
/**
|
|
29
|
+
* The readable-store view of a hook argument: the store itself when it is one,
|
|
30
|
+
* a constant store of the plain value otherwise.
|
|
31
|
+
*
|
|
32
|
+
* @param value - A plain value or a store of one.
|
|
33
|
+
* @returns A readable store of the value.
|
|
34
|
+
*/
|
|
35
|
+
export declare function toReadable<T>(value: MaybeReadable<T>): Readable<T>;
|
|
36
|
+
//# sourceMappingURL=maybe-readable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maybe-readable.d.ts","sourceRoot":"","sources":["../../src/hooks/maybe-readable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAAY,MAAM,cAAc,CAAA;AAEtD;;;;GAIG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;AAE9C;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAAC,OAAO,CAAC,CAOrE;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAElE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reactive argument every hook accepts: a plain value, or a readable store
|
|
3
|
+
* of one. A Svelte hook runs once per component, so the only way it can see a
|
|
4
|
+
* new argument is a store the app (or a `{#key}` block's parent) sets — the way
|
|
5
|
+
* React's hooks see a re-render.
|
|
6
|
+
*
|
|
7
|
+
* A store may hold `undefined`: that means the argument was omitted, and the
|
|
8
|
+
* parameter's default applies, exactly as for a missing argument.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { readable } from 'svelte/store';
|
|
13
|
+
/**
|
|
14
|
+
* Whether a value is a readable store. A molecule store (`@molecule/app-state`'s
|
|
15
|
+
* `Store`: it has `getState` AND `subscribe`) is a VALUE, never a source —
|
|
16
|
+
* `useStore` takes the store itself as its argument.
|
|
17
|
+
*
|
|
18
|
+
* @param value - A hook argument: a plain value or a store.
|
|
19
|
+
* @returns True for a Svelte readable store.
|
|
20
|
+
*/
|
|
21
|
+
export function isReadable(value) {
|
|
22
|
+
return (typeof value === 'object' &&
|
|
23
|
+
value !== null &&
|
|
24
|
+
typeof value.subscribe === 'function' &&
|
|
25
|
+
typeof value.getState !== 'function');
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The readable-store view of a hook argument: the store itself when it is one,
|
|
29
|
+
* a constant store of the plain value otherwise.
|
|
30
|
+
*
|
|
31
|
+
* @param value - A plain value or a store of one.
|
|
32
|
+
* @returns A readable store of the value.
|
|
33
|
+
*/
|
|
34
|
+
export function toReadable(value) {
|
|
35
|
+
return isReadable(value) ? value : readable(value);
|
|
36
|
+
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { type Readable } from 'svelte/store';
|
|
15
15
|
import type { AppModelDefinition, AppModeModelDefaults } from '@molecule/app-ai-models';
|
|
16
|
+
import { type MaybeReadable } from './maybe-readable.js';
|
|
16
17
|
/**
|
|
17
18
|
* Test-only: drops every cached model list so the next `useAIModels` call
|
|
18
19
|
* refetches. Exposed for unit tests; do not call from production code.
|
|
@@ -43,8 +44,13 @@ export interface UseAIModelsResult {
|
|
|
43
44
|
* subsequent mounts return the cached result, and a scope whose fetch failed
|
|
44
45
|
* does not refetch on a later mount.
|
|
45
46
|
*
|
|
47
|
+
* The project id may be a plain value or a readable store of one (a store
|
|
48
|
+
* holding `undefined` means the unscoped catalog): setting it resubscribes to
|
|
49
|
+
* the new scope's cache and fetches it if nobody has yet, on the same
|
|
50
|
+
* component, the way React's re-render does.
|
|
51
|
+
*
|
|
46
52
|
* @param projectId - Optional project scope: includes that project's custom
|
|
47
|
-
* ("bring your own AI") models on servers that support them.
|
|
53
|
+
* ("bring your own AI") models on servers that support them (or a store of it).
|
|
48
54
|
* @returns Models, free-tier model, loading flag, and error, as stores.
|
|
49
55
|
* @example
|
|
50
56
|
* ```svelte
|
|
@@ -54,5 +60,5 @@ export interface UseAIModelsResult {
|
|
|
54
60
|
* </script>
|
|
55
61
|
* ```
|
|
56
62
|
*/
|
|
57
|
-
export declare function useAIModels(projectId?: string): UseAIModelsResult;
|
|
63
|
+
export declare function useAIModels(projectId?: MaybeReadable<string | undefined>): UseAIModelsResult;
|
|
58
64
|
//# sourceMappingURL=useAIModels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAIModels.d.ts","sourceRoot":"","sources":["../../src/hooks/useAIModels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"useAIModels.d.ts","sourceRoot":"","sources":["../../src/hooks/useAIModels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAgB,KAAK,QAAQ,EAAY,MAAM,cAAc,CAAA;AAEpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAMvF,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,qBAAqB,CAAA;AA8FpE;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CASzC;AAWD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,8EAA8E;IAC9E,MAAM,EAAE,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAA;IACtC;;;OAGG;IACH,QAAQ,EAAE,QAAQ,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAAA;IACpD,gEAAgE;IAChE,aAAa,EAAE,QAAQ,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAA;IACvD,mDAAmD;IACnD,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC1B,+CAA+C;IAC/C,KAAK,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,iBAAiB,CAuD5F"}
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
* @module
|
|
13
13
|
*/
|
|
14
14
|
import { onDestroy } from 'svelte';
|
|
15
|
-
import { derived, writable } from 'svelte/store';
|
|
15
|
+
import { derived, get, writable } from 'svelte/store';
|
|
16
16
|
import { loadAIModelCatalog, pickFreeTierModel } from '@molecule/app-ai-models';
|
|
17
17
|
import { useHttpClient } from '../context.js';
|
|
18
18
|
import { fieldStore } from './live-store.js';
|
|
19
|
+
import { toReadable } from './maybe-readable.js';
|
|
19
20
|
/** One cache entry per scope — `''` for the unscoped catalog, else the projectId. */
|
|
20
21
|
const caches = new Map();
|
|
21
22
|
/**
|
|
@@ -111,8 +112,13 @@ export function resetAIModelsCache() {
|
|
|
111
112
|
* subsequent mounts return the cached result, and a scope whose fetch failed
|
|
112
113
|
* does not refetch on a later mount.
|
|
113
114
|
*
|
|
115
|
+
* The project id may be a plain value or a readable store of one (a store
|
|
116
|
+
* holding `undefined` means the unscoped catalog): setting it resubscribes to
|
|
117
|
+
* the new scope's cache and fetches it if nobody has yet, on the same
|
|
118
|
+
* component, the way React's re-render does.
|
|
119
|
+
*
|
|
114
120
|
* @param projectId - Optional project scope: includes that project's custom
|
|
115
|
-
* ("bring your own AI") models on servers that support them.
|
|
121
|
+
* ("bring your own AI") models on servers that support them (or a store of it).
|
|
116
122
|
* @returns Models, free-tier model, loading flag, and error, as stores.
|
|
117
123
|
* @example
|
|
118
124
|
* ```svelte
|
|
@@ -124,26 +130,47 @@ export function resetAIModelsCache() {
|
|
|
124
130
|
*/
|
|
125
131
|
export function useAIModels(projectId) {
|
|
126
132
|
const http = useHttpClient();
|
|
127
|
-
const
|
|
128
|
-
|
|
133
|
+
const projectIdStore = toReadable(projectId);
|
|
134
|
+
let scope = get(projectIdStore) ?? '';
|
|
135
|
+
const initialCache = cacheFor(scope);
|
|
129
136
|
const snapshot = writable({
|
|
130
|
-
models:
|
|
131
|
-
defaults:
|
|
132
|
-
error:
|
|
137
|
+
models: initialCache.models,
|
|
138
|
+
defaults: initialCache.defaults,
|
|
139
|
+
error: initialCache.error,
|
|
133
140
|
});
|
|
134
141
|
const listener = (next) => snapshot.set(next);
|
|
135
|
-
|
|
142
|
+
/** React's [http, scope] effect for one scope: resync, then fetch if new. */
|
|
143
|
+
const attachScope = (scopeToAttach) => {
|
|
144
|
+
const cache = cacheFor(scopeToAttach);
|
|
145
|
+
listenersFor(scopeToAttach).add(listener);
|
|
146
|
+
// Resync from the cache the scope now names (React's effect re-syncs what
|
|
147
|
+
// its lazy useState init may have raced).
|
|
148
|
+
snapshot.set({ models: cache.models, defaults: cache.defaults, error: cache.error });
|
|
149
|
+
if (!cache.models && !cache.error) {
|
|
150
|
+
void fetchOnce(http, scopeToAttach).catch((_error) => {
|
|
151
|
+
// fetchOnce mirrors the error into cache.error, which the listener delivers.
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
const detachScope = (scopeToDetach) => {
|
|
156
|
+
listenersFor(scopeToDetach).delete(listener);
|
|
157
|
+
};
|
|
158
|
+
attachScope(scope);
|
|
136
159
|
onDestroy(() => {
|
|
137
|
-
|
|
160
|
+
detachScope(scope);
|
|
138
161
|
});
|
|
139
|
-
//
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
162
|
+
// Follow the project id: a changed scope re-runs the effect — resubscribe,
|
|
163
|
+
// resync from that scope's cache, fetch it if nobody has. The store calls
|
|
164
|
+
// back at once with the id already read, which changes nothing.
|
|
165
|
+
const stopProjectId = projectIdStore.subscribe((next) => {
|
|
166
|
+
const nextScope = next ?? '';
|
|
167
|
+
if (Object.is(nextScope, scope))
|
|
168
|
+
return;
|
|
169
|
+
detachScope(scope);
|
|
170
|
+
scope = nextScope;
|
|
171
|
+
attachScope(scope);
|
|
172
|
+
});
|
|
173
|
+
onDestroy(stopProjectId);
|
|
147
174
|
const loading = derived(snapshot, (current) => !current.models && !current.error);
|
|
148
175
|
return {
|
|
149
176
|
models: derived(snapshot, (current) => current.models ?? []),
|
package/dist/hooks/useAuth.d.ts
CHANGED
|
@@ -5,11 +5,15 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
8
|
+
import { type Readable } from 'svelte/store';
|
|
9
9
|
import type { AuthClient, AuthState, RegisterExtraShape } from '@molecule/app-auth';
|
|
10
|
+
import { type MaybeReadable } from './maybe-readable.js';
|
|
10
11
|
/** Options for {@link useAuth}. */
|
|
11
12
|
export interface UseAuthOptions {
|
|
12
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Whether to automatically refresh the session on mount, and again whenever
|
|
15
|
+
* the flag turns on or the session decision changes while it is on.
|
|
16
|
+
*/
|
|
13
17
|
autoRefresh?: boolean;
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
@@ -63,7 +67,9 @@ export interface UseAuthResult<T = unknown, TRegister extends RegisterExtraShape
|
|
|
63
67
|
* app-owned mutation instead passes its canonical response to `setUser`. For
|
|
64
68
|
* a sign-in the app itself runs, call `setSession({ accessToken, user })`.
|
|
65
69
|
*
|
|
66
|
-
* @param options - Hook options (`autoRefresh`)
|
|
70
|
+
* @param options - Hook options (`autoRefresh`), or a store of them: setting
|
|
71
|
+
* `autoRefresh` later probes on the same component, the way React's
|
|
72
|
+
* re-render re-runs its effect.
|
|
67
73
|
* @returns Auth state as stores and the actions as functions.
|
|
68
74
|
* @example
|
|
69
75
|
* ```svelte
|
|
@@ -80,7 +86,7 @@ export interface UseAuthResult<T = unknown, TRegister extends RegisterExtraShape
|
|
|
80
86
|
* {/if}
|
|
81
87
|
* ```
|
|
82
88
|
*/
|
|
83
|
-
export declare function useAuth<T = unknown, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(options?: UseAuthOptions): UseAuthResult<T, TRegister>;
|
|
89
|
+
export declare function useAuth<T = unknown, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(options?: MaybeReadable<UseAuthOptions | undefined>): UseAuthResult<T, TRegister>;
|
|
84
90
|
/**
|
|
85
91
|
* The authenticated user, React's `useUser` in Svelte's idiom: a readable
|
|
86
92
|
* store of the cached profile (or null).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEjD,OAAO,KAAK,EACV,UAAU,EAEV,SAAS,EAGT,kBAAkB,EACnB,MAAM,oBAAoB,CAAA;AAI3B,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,qBAAqB,CAAA;AAEpE,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa,CAC5B,CAAC,GAAG,OAAO,EACX,SAAS,SAAS,kBAAkB,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC;IAEtE;;;;OAIG;IACH,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;IACxC,+BAA+B;IAC/B,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7B,4BAA4B;IAC5B,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;IAC7B,6BAA6B;IAC7B,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,QA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
import {
|
|
8
|
+
import { onDestroy } from 'svelte';
|
|
9
|
+
import { get } from 'svelte/store';
|
|
9
10
|
import { useAuthClient } from '../context.js';
|
|
10
11
|
import { fieldStore, liveStore } from './live-store.js';
|
|
12
|
+
import { toReadable } from './maybe-readable.js';
|
|
11
13
|
/**
|
|
12
14
|
* Authentication state and actions, React's `useAuth` in Svelte's idiom: call
|
|
13
15
|
* it during component init under `setMoleculeContext({ auth })`.
|
|
@@ -19,7 +21,9 @@ import { fieldStore, liveStore } from './live-store.js';
|
|
|
19
21
|
* app-owned mutation instead passes its canonical response to `setUser`. For
|
|
20
22
|
* a sign-in the app itself runs, call `setSession({ accessToken, user })`.
|
|
21
23
|
*
|
|
22
|
-
* @param options - Hook options (`autoRefresh`)
|
|
24
|
+
* @param options - Hook options (`autoRefresh`), or a store of them: setting
|
|
25
|
+
* `autoRefresh` later probes on the same component, the way React's
|
|
26
|
+
* re-render re-runs its effect.
|
|
23
27
|
* @returns Auth state as stores and the actions as functions.
|
|
24
28
|
* @example
|
|
25
29
|
* ```svelte
|
|
@@ -38,18 +42,40 @@ import { fieldStore, liveStore } from './live-store.js';
|
|
|
38
42
|
*/
|
|
39
43
|
export function useAuth(options) {
|
|
40
44
|
const client = useAuthClient();
|
|
41
|
-
const
|
|
45
|
+
const optionsStore = toReadable(options);
|
|
46
|
+
const autoRefresh = () => get(optionsStore)?.autoRefresh ?? false;
|
|
42
47
|
const state = liveStore(() => client.getState(), (notify) => client.onAuthChange(notify));
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
// React's autoRefresh effect, re-run when `autoRefresh`, `authenticated` or
|
|
49
|
+
// `loading` change (its dependency array): while autoRefresh is on and the
|
|
50
|
+
// session is neither signed in nor being decided, probe once per change.
|
|
51
|
+
let lastProbe = null;
|
|
52
|
+
const maybeProbe = () => {
|
|
53
|
+
const current = client.getState();
|
|
54
|
+
const next = {
|
|
55
|
+
autoRefresh: autoRefresh(),
|
|
56
|
+
authenticated: current.authenticated,
|
|
57
|
+
loading: current.loading,
|
|
58
|
+
};
|
|
59
|
+
if (lastProbe !== null &&
|
|
60
|
+
next.autoRefresh === lastProbe.autoRefresh &&
|
|
61
|
+
next.authenticated === lastProbe.authenticated &&
|
|
62
|
+
next.loading === lastProbe.loading) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
lastProbe = next;
|
|
66
|
+
if (next.autoRefresh && !next.authenticated && !next.loading) {
|
|
67
|
+
void client.refresh().catch((_error) => {
|
|
68
|
+
// No session to refresh: the state already says unauthenticated.
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
maybeProbe();
|
|
73
|
+
const stopState = state.subscribe(() => maybeProbe());
|
|
74
|
+
const stopOptions = optionsStore.subscribe(() => maybeProbe());
|
|
75
|
+
onDestroy(() => {
|
|
76
|
+
stopState();
|
|
77
|
+
stopOptions();
|
|
78
|
+
});
|
|
53
79
|
return {
|
|
54
80
|
status: fieldStore(state, 'status'),
|
|
55
81
|
state,
|
package/dist/hooks/useForm.d.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
import { type Readable } from 'svelte/store';
|
|
7
|
-
import type { FieldRegistration, FieldState, FormController, FormOptions, FormResetOptions, FormState, FormValuesConstraint, RegisterOptions } from '@molecule/app-forms';
|
|
7
|
+
import type { FieldRegistration, FieldState, FormController, FormOptions, FormResetOptions, FormState, FormUpdateOptions, FormValuesConstraint, RegisterOptions } from '@molecule/app-forms';
|
|
8
|
+
import { type MaybeReadable } from './maybe-readable.js';
|
|
8
9
|
/**
|
|
9
10
|
* Options for useForm hook.
|
|
10
11
|
*
|
|
@@ -58,7 +59,7 @@ export interface UseFormResult<T extends FormValuesConstraint<T>> {
|
|
|
58
59
|
/** Restores the baseline (optionally a new one) and clears touched, errors and submit state. */
|
|
59
60
|
reset: (values?: Partial<T>) => void;
|
|
60
61
|
/** Applies externally loaded values without clearing submission state. */
|
|
61
|
-
updateValues: (values: Partial<T>, resetOptions?:
|
|
62
|
+
updateValues: (values: Partial<T>, resetOptions?: FormUpdateOptions) => void;
|
|
62
63
|
/** Whole-form state tuple: edits mark only changed fields dirty; fills preserve them. */
|
|
63
64
|
asState(): readonly [
|
|
64
65
|
T,
|
|
@@ -87,8 +88,15 @@ export interface UseFormResult<T extends FormValuesConstraint<T>> {
|
|
|
87
88
|
* take the loaded values. A changed `resetKey` starts a fresh form; fresh
|
|
88
89
|
* `defaultValues` without one leave the drafts alone.
|
|
89
90
|
*
|
|
90
|
-
*
|
|
91
|
-
* `
|
|
91
|
+
* The options may be a plain value or a readable store of one (a store holding
|
|
92
|
+
* `undefined` means the options were omitted): setting the store re-runs the
|
|
93
|
+
* work React's re-render does, on the same controller — a changed `values`
|
|
94
|
+
* object is applied (dirty fields kept by default) and a changed `resetKey`
|
|
95
|
+
* replaces the controller with a fresh one. Edits, touched fields and pending
|
|
96
|
+
* submits survive every other change.
|
|
97
|
+
*
|
|
98
|
+
* @param options - Form options (or a store of them). `defaultValues`, `mode`
|
|
99
|
+
* and the form-level `validate` are forwarded to the provider.
|
|
92
100
|
* @returns Form state stores and methods
|
|
93
101
|
* @example
|
|
94
102
|
* ```svelte
|
|
@@ -105,7 +113,7 @@ export interface UseFormResult<T extends FormValuesConstraint<T>> {
|
|
|
105
113
|
* </form>
|
|
106
114
|
* ```
|
|
107
115
|
*/
|
|
108
|
-
export declare function useForm<T extends FormValuesConstraint<T> = Record<string, unknown>>(options?: UseFormOptions<T>): UseFormResult<T>;
|
|
116
|
+
export declare function useForm<T extends FormValuesConstraint<T> = Record<string, unknown>>(options?: MaybeReadable<UseFormOptions<T> | undefined>): UseFormResult<T>;
|
|
109
117
|
/**
|
|
110
118
|
* Hook to watch a specific field value, React's `useWatch` in Svelte's idiom:
|
|
111
119
|
* a readable store of the field's current value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../src/hooks/useForm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../src/hooks/useForm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAgB,KAAK,QAAQ,EAAY,MAAM,cAAc,CAAA;AAEpE,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAO5B,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,qBAAqB,CAAA;AAEpE;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACvF,+GAA+G;IAC/G,YAAY,CAAC,EAAE,gBAAgB,CAAA;IAC/B,+GAA+G;IAC/G,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;IACpD;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC,CAAA;CAC5D;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,CAAC;IAC9D,4BAA4B;IAC5B,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;IACjC,6CAA6C;IAC7C,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC1B,mDAAmD;IACnD,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC1B,mCAAmC;IACnC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