@molecule/app-svelte 3.3.0 → 3.5.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 +2393 -220
- package/dist/agent-identity.js +0 -1
- package/dist/context.d.ts +101 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +199 -3
- package/dist/hooks/external-store.d.ts +28 -0
- package/dist/hooks/external-store.d.ts.map +1 -0
- package/dist/hooks/external-store.js +95 -0
- package/dist/hooks/index.d.ts +37 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +36 -0
- package/dist/hooks/live-store.d.ts +68 -0
- package/dist/hooks/live-store.d.ts.map +1 -0
- package/dist/hooks/live-store.js +76 -0
- package/dist/hooks/useAIModels.d.ts +58 -0
- package/dist/hooks/useAIModels.d.ts.map +1 -0
- package/dist/hooks/useAIModels.js +155 -0
- package/dist/hooks/useAsyncState.d.ts +52 -0
- package/dist/hooks/useAsyncState.d.ts.map +1 -0
- package/dist/hooks/useAsyncState.js +80 -0
- package/dist/hooks/useAuth.d.ts +99 -0
- package/dist/hooks/useAuth.d.ts.map +1 -0
- package/dist/hooks/useAuth.js +88 -0
- package/dist/hooks/useCapacitorApp.d.ts +51 -0
- package/dist/hooks/useCapacitorApp.d.ts.map +1 -0
- package/dist/hooks/useCapacitorApp.js +57 -0
- package/dist/hooks/useChangePassword.d.ts +41 -0
- package/dist/hooks/useChangePassword.d.ts.map +1 -0
- package/dist/hooks/useChangePassword.js +40 -0
- package/dist/hooks/useDevice.d.ts +48 -0
- package/dist/hooks/useDevice.d.ts.map +1 -0
- package/dist/hooks/useDevice.js +37 -0
- package/dist/hooks/useEditor.d.ts +65 -0
- package/dist/hooks/useEditor.d.ts.map +1 -0
- package/dist/hooks/useEditor.js +86 -0
- package/dist/hooks/useForm.d.ts +137 -0
- package/dist/hooks/useForm.d.ts.map +1 -0
- package/dist/hooks/useForm.js +221 -0
- package/dist/hooks/useHttp.d.ts +122 -0
- package/dist/hooks/useHttp.d.ts.map +1 -0
- package/dist/hooks/useHttp.js +220 -0
- package/dist/hooks/useLogger.d.ts +52 -0
- package/dist/hooks/useLogger.d.ts.map +1 -0
- package/dist/hooks/useLogger.js +64 -0
- package/dist/hooks/useLogin.d.ts +47 -0
- package/dist/hooks/useLogin.d.ts.map +1 -0
- package/dist/hooks/useLogin.js +44 -0
- package/dist/hooks/useOAuth.d.ts +96 -0
- package/dist/hooks/useOAuth.d.ts.map +1 -0
- package/dist/hooks/useOAuth.js +363 -0
- package/dist/hooks/useOptimisticValue.d.ts +58 -0
- package/dist/hooks/useOptimisticValue.d.ts.map +1 -0
- package/dist/hooks/useOptimisticValue.js +98 -0
- package/dist/hooks/usePasswordReset.d.ts +50 -0
- package/dist/hooks/usePasswordReset.d.ts.map +1 -0
- package/dist/hooks/usePasswordReset.js +50 -0
- package/dist/hooks/usePlatform.d.ts +45 -0
- package/dist/hooks/usePlatform.d.ts.map +1 -0
- package/dist/hooks/usePlatform.js +35 -0
- package/dist/hooks/usePreview.d.ts +54 -0
- package/dist/hooks/usePreview.d.ts.map +1 -0
- package/dist/hooks/usePreview.js +61 -0
- package/dist/hooks/useProfileForm.d.ts +100 -0
- package/dist/hooks/useProfileForm.d.ts.map +1 -0
- package/dist/hooks/useProfileForm.js +267 -0
- package/dist/hooks/usePromise.d.ts +62 -0
- package/dist/hooks/usePromise.d.ts.map +1 -0
- package/dist/hooks/usePromise.js +105 -0
- package/dist/hooks/usePush.d.ts +68 -0
- package/dist/hooks/usePush.d.ts.map +1 -0
- package/dist/hooks/usePush.js +79 -0
- package/dist/hooks/useRouter.d.ts +169 -0
- package/dist/hooks/useRouter.d.ts.map +1 -0
- package/dist/hooks/useRouter.js +212 -0
- package/dist/hooks/useSignup.d.ts +52 -0
- package/dist/hooks/useSignup.d.ts.map +1 -0
- package/dist/hooks/useSignup.js +42 -0
- package/dist/hooks/useStorage.d.ts +133 -0
- package/dist/hooks/useStorage.d.ts.map +1 -0
- package/dist/hooks/useStorage.js +228 -0
- package/dist/hooks/useStore.d.ts +69 -0
- package/dist/hooks/useStore.d.ts.map +1 -0
- package/dist/hooks/useStore.js +82 -0
- package/dist/hooks/useTheme.d.ts +55 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/hooks/useTheme.js +102 -0
- package/dist/hooks/useTranslation.d.ts +106 -0
- package/dist/hooks/useTranslation.d.ts.map +1 -0
- package/dist/hooks/useTranslation.js +159 -0
- package/dist/hooks/useVerifyPaymentReturn.d.ts +91 -0
- package/dist/hooks/useVerifyPaymentReturn.d.ts.map +1 -0
- package/dist/hooks/useVerifyPaymentReturn.js +189 -0
- package/dist/hooks/useVersion.d.ts +53 -0
- package/dist/hooks/useVersion.d.ts.map +1 -0
- package/dist/hooks/useVersion.js +70 -0
- package/dist/hooks/useWorkspace.d.ts +47 -0
- package/dist/hooks/useWorkspace.d.ts.map +1 -0
- package/dist/hooks/useWorkspace.js +68 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/session-ready/SessionReady.svelte +20 -0
- package/dist/session-ready/SessionReady.svelte.d.ts +5 -0
- package/dist/session-ready/SessionReady.svelte.d.ts.map +1 -0
- package/dist/session-ready/index.d.ts +7 -0
- package/dist/session-ready/index.d.ts.map +1 -0
- package/dist/session-ready/index.js +6 -0
- package/dist/stores/async-state.js +0 -1
- package/dist/stores/auth.js +0 -1
- package/dist/stores/capacitor-app.js +0 -1
- package/dist/stores/change-password.js +0 -1
- package/dist/stores/chat.d.ts.map +1 -1
- package/dist/stores/chat.js +3 -10
- package/dist/stores/device.js +0 -1
- package/dist/stores/forms.js +0 -1
- package/dist/stores/http.js +0 -1
- package/dist/stores/i18n.d.ts +3 -2
- package/dist/stores/i18n.d.ts.map +1 -1
- package/dist/stores/i18n.js +2 -3
- package/dist/stores/index.js +0 -1
- package/dist/stores/logger.js +0 -1
- package/dist/stores/login.js +0 -1
- package/dist/stores/oauth.js +0 -1
- package/dist/stores/password-reset.js +0 -1
- package/dist/stores/platform.js +0 -1
- package/dist/stores/promise.js +0 -1
- package/dist/stores/push.js +0 -1
- package/dist/stores/router.js +0 -1
- package/dist/stores/signup.js +0 -1
- package/dist/stores/state.js +0 -1
- package/dist/stores/storage.js +0 -1
- package/dist/stores/theme.js +0 -1
- package/dist/stores/version.js +0 -1
- package/dist/types.d.ts +20 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/package.json +13 -8
- package/dist/agent-identity.js.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/stores/async-state.js.map +0 -1
- package/dist/stores/auth.js.map +0 -1
- package/dist/stores/capacitor-app.js.map +0 -1
- package/dist/stores/change-password.js.map +0 -1
- package/dist/stores/chat.js.map +0 -1
- package/dist/stores/device.js.map +0 -1
- package/dist/stores/forms.js.map +0 -1
- package/dist/stores/http.js.map +0 -1
- package/dist/stores/i18n.js.map +0 -1
- package/dist/stores/index.js.map +0 -1
- package/dist/stores/logger.js.map +0 -1
- package/dist/stores/login.js.map +0 -1
- package/dist/stores/oauth.js.map +0 -1
- package/dist/stores/password-reset.js.map +0 -1
- package/dist/stores/platform.js.map +0 -1
- package/dist/stores/promise.js.map +0 -1
- package/dist/stores/push.js.map +0 -1
- package/dist/stores/router.js.map +0 -1
- package/dist/stores/signup.js.map +0 -1
- package/dist/stores/state.js.map +0 -1
- package/dist/stores/storage.js.map +0 -1
- package/dist/stores/theme.js.map +0 -1
- package/dist/stores/version.js.map +0 -1
- package/dist/types.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCapacitorApp.d.ts","sourceRoot":"","sources":["../../src/hooks/useCapacitorApp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5C,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,wBAAwB,CAAA;AAKpF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,4CAA4C;IAC5C,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,sCAAsC;IACtC,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC9B,kDAAkD;IAClD,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC5B,wCAAwC;IACxC,KAAK,EAAE,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;CAC9B,GAAG;IACF,mDAAmD;IACnD,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAChC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,mBAAwB,GAAG,qBAAqB,CA4BxF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte hook for Capacitor app initialization, porting React's
|
|
3
|
+
* `useCapacitorApp`.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { onDestroy } from 'svelte';
|
|
8
|
+
import { createCapacitorApp } from '@molecule/app-platform';
|
|
9
|
+
import { fieldStore, liveStore } from './live-store.js';
|
|
10
|
+
/**
|
|
11
|
+
* Capacitor app initialization state and actions, React's `useCapacitorApp` in
|
|
12
|
+
* Svelte's idiom: called during component init, one coordinator per hook
|
|
13
|
+
* instance whose state fields are readable stores and whose `initialize` is a
|
|
14
|
+
* plain function.
|
|
15
|
+
*
|
|
16
|
+
* Creates the `CapacitorApp` coordinator during init, subscribes its state and
|
|
17
|
+
* auto-initializes (the way React's mount effect does); the component's
|
|
18
|
+
* destroy unsubscribes and calls `destroy()`, releasing the coordinator's
|
|
19
|
+
* deep-link subscription. Init errors land in the `error` store through the
|
|
20
|
+
* coordinator's own state, so the auto-init rejection is swallowed there.
|
|
21
|
+
*
|
|
22
|
+
* @param options - Capacitor app configuration options
|
|
23
|
+
* @returns Current app state stores and an `initialize` function for manual
|
|
24
|
+
* re-initialization
|
|
25
|
+
* @example
|
|
26
|
+
* ```svelte
|
|
27
|
+
* <script>
|
|
28
|
+
* import { useCapacitorApp } from '@molecule/app-svelte'
|
|
29
|
+
* const { ready, error } = useCapacitorApp({ pushNotifications: true })
|
|
30
|
+
* </script>
|
|
31
|
+
*
|
|
32
|
+
* {#if $ready} <p>Ready</p> {:else if $error} <p>{$error.message}</p> {/if}
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export function useCapacitorApp(options = {}) {
|
|
36
|
+
const app = createCapacitorApp(options);
|
|
37
|
+
// Registered BEFORE the state store's teardown so teardown runs in React's
|
|
38
|
+
// order: unsubscribe first (LIFO), then the coordinator's destroy().
|
|
39
|
+
onDestroy(() => {
|
|
40
|
+
app.destroy();
|
|
41
|
+
});
|
|
42
|
+
const state = liveStore(() => app.getState(), (notify) => app.subscribe(notify));
|
|
43
|
+
// Auto-initialize (React's mount effect): the coordinator reports a failed
|
|
44
|
+
// init through its state, so the rejection itself is swallowed here.
|
|
45
|
+
void app.initialize().catch((_error) => {
|
|
46
|
+
// The coordinator puts the error in state, which this hook returns.
|
|
47
|
+
});
|
|
48
|
+
return {
|
|
49
|
+
ready: fieldStore(state, 'ready'),
|
|
50
|
+
deviceReady: fieldStore(state, 'deviceReady'),
|
|
51
|
+
pushReady: fieldStore(state, 'pushReady'),
|
|
52
|
+
error: fieldStore(state, 'error'),
|
|
53
|
+
initialize: async () => {
|
|
54
|
+
await app.initialize();
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte hook for changing passwords with async state tracking, porting
|
|
3
|
+
* React's `useChangePassword`.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import type { Readable } from 'svelte/store';
|
|
8
|
+
import { type UsePromiseState } from './usePromise.js';
|
|
9
|
+
/** What {@link useChangePassword} returns. */
|
|
10
|
+
export interface UseChangePasswordResult {
|
|
11
|
+
/** The latest call's status. */
|
|
12
|
+
status: Readable<UsePromiseState<void>['status']>;
|
|
13
|
+
/** The latest call's rejection. */
|
|
14
|
+
error: Readable<UsePromiseState<void>['error']>;
|
|
15
|
+
/** Runs the password change. */
|
|
16
|
+
changePassword: (oldPassword: string, newPassword: string) => Promise<void>;
|
|
17
|
+
/** Returns the tracker to idle. */
|
|
18
|
+
reset: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Password change with async state tracking, React's `useChangePassword` in
|
|
22
|
+
* Svelte's idiom: call it during component init under
|
|
23
|
+
* `setMoleculeContext({ auth })`. There is no `value` field — the call
|
|
24
|
+
* resolves `void`.
|
|
25
|
+
*
|
|
26
|
+
* @returns Change-password state as stores and the action.
|
|
27
|
+
* @example
|
|
28
|
+
* ```svelte
|
|
29
|
+
* <script>
|
|
30
|
+
* import { useChangePassword } from '@molecule/app-svelte'
|
|
31
|
+
* const { status, error, changePassword } = useChangePassword()
|
|
32
|
+
* </script>
|
|
33
|
+
*
|
|
34
|
+
* <button onclick={() => changePassword(oldPassword, newPassword)} disabled={$status === 'pending'}>
|
|
35
|
+
* {$status === 'pending' ? 'Changing…' : 'Change password'}
|
|
36
|
+
* </button>
|
|
37
|
+
* {#if $error}<p>{$error.message}</p>{/if}
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function useChangePassword(): UseChangePasswordResult;
|
|
41
|
+
//# sourceMappingURL=useChangePassword.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChangePassword.d.ts","sourceRoot":"","sources":["../../src/hooks/useChangePassword.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAI5C,OAAO,EAAc,KAAK,eAAe,EAAwB,MAAM,iBAAiB,CAAA;AAExF,8CAA8C;AAC9C,MAAM,WAAW,uBAAuB;IACtC,gCAAgC;IAChC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;IACjD,mCAAmC;IACnC,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAC/C,gCAAgC;IAChC,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3E,mCAAmC;IACnC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,IAAI,uBAAuB,CAY3D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte hook for changing passwords with async state tracking, porting
|
|
3
|
+
* React's `useChangePassword`.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { useAuthClient } from '../context.js';
|
|
8
|
+
import { promiseFields } from './live-store.js';
|
|
9
|
+
import { usePromise } from './usePromise.js';
|
|
10
|
+
/**
|
|
11
|
+
* Password change with async state tracking, React's `useChangePassword` in
|
|
12
|
+
* Svelte's idiom: call it during component init under
|
|
13
|
+
* `setMoleculeContext({ auth })`. There is no `value` field — the call
|
|
14
|
+
* resolves `void`.
|
|
15
|
+
*
|
|
16
|
+
* @returns Change-password state as stores and the action.
|
|
17
|
+
* @example
|
|
18
|
+
* ```svelte
|
|
19
|
+
* <script>
|
|
20
|
+
* import { useChangePassword } from '@molecule/app-svelte'
|
|
21
|
+
* const { status, error, changePassword } = useChangePassword()
|
|
22
|
+
* </script>
|
|
23
|
+
*
|
|
24
|
+
* <button onclick={() => changePassword(oldPassword, newPassword)} disabled={$status === 'pending'}>
|
|
25
|
+
* {$status === 'pending' ? 'Changing…' : 'Change password'}
|
|
26
|
+
* </button>
|
|
27
|
+
* {#if $error}<p>{$error.message}</p>{/if}
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export function useChangePassword() {
|
|
31
|
+
const client = useAuthClient();
|
|
32
|
+
const tracker = usePromise((oldPassword, newPassword) => client.changePassword(oldPassword, newPassword));
|
|
33
|
+
const fields = promiseFields(tracker);
|
|
34
|
+
return {
|
|
35
|
+
status: fields.status,
|
|
36
|
+
error: fields.error,
|
|
37
|
+
changePassword: fields.call,
|
|
38
|
+
reset: fields.reset,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte hook for device information, porting React's `useDevice`.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type { DeviceInfo, FeatureSupport, HardwareInfo, ScreenInfo } from '@molecule/app-device';
|
|
7
|
+
/**
|
|
8
|
+
* Hook return type.
|
|
9
|
+
*/
|
|
10
|
+
export interface UseDeviceResult {
|
|
11
|
+
/** The parsed device identity. */
|
|
12
|
+
deviceInfo: DeviceInfo;
|
|
13
|
+
/** The screen dimensions and mode. */
|
|
14
|
+
screenInfo: ScreenInfo;
|
|
15
|
+
/** The hardware capabilities. */
|
|
16
|
+
hardwareInfo: HardwareInfo;
|
|
17
|
+
/** The feature flags. */
|
|
18
|
+
featureSupport: FeatureSupport;
|
|
19
|
+
/** Whether a feature is supported. */
|
|
20
|
+
supports: (feature: keyof FeatureSupport) => boolean;
|
|
21
|
+
/** Whether the device is online. */
|
|
22
|
+
isOnline: () => boolean;
|
|
23
|
+
/** Whether the app runs standalone. */
|
|
24
|
+
isStandalone: () => boolean;
|
|
25
|
+
/** The preferred language. */
|
|
26
|
+
language: string;
|
|
27
|
+
/** The preferred languages, best first. */
|
|
28
|
+
languages: string[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Device information and utility methods, React's `useDevice` in Svelte's
|
|
32
|
+
* idiom: called during component init; device info is static, so the result is
|
|
33
|
+
* a plain object (nothing reactive).
|
|
34
|
+
*
|
|
35
|
+
* Uses module-level `getProvider()` — device info is a singleton, not
|
|
36
|
+
* context-provided.
|
|
37
|
+
*
|
|
38
|
+
* @returns Device information and utility methods.
|
|
39
|
+
* @example
|
|
40
|
+
* ```svelte
|
|
41
|
+
* <script>
|
|
42
|
+
* import { useDevice } from '@molecule/app-svelte'
|
|
43
|
+
* const { deviceInfo, screenInfo, supports } = useDevice()
|
|
44
|
+
* </script>
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function useDevice(): UseDeviceResult;
|
|
48
|
+
//# sourceMappingURL=useDevice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDevice.d.ts","sourceRoot":"","sources":["../../src/hooks/useDevice.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGhG;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,UAAU,EAAE,UAAU,CAAA;IACtB,sCAAsC;IACtC,UAAU,EAAE,UAAU,CAAA;IACtB,iCAAiC;IACjC,YAAY,EAAE,YAAY,CAAA;IAC1B,yBAAyB;IACzB,cAAc,EAAE,cAAc,CAAA;IAC9B,sCAAsC;IACtC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,cAAc,KAAK,OAAO,CAAA;IACpD,oCAAoC;IACpC,QAAQ,EAAE,MAAM,OAAO,CAAA;IACvB,uCAAuC;IACvC,YAAY,EAAE,MAAM,OAAO,CAAA;IAC3B,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,IAAI,eAAe,CAa3C"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte hook for device information, porting React's `useDevice`.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { getProvider } from '@molecule/app-device';
|
|
7
|
+
/**
|
|
8
|
+
* Device information and utility methods, React's `useDevice` in Svelte's
|
|
9
|
+
* idiom: called during component init; device info is static, so the result is
|
|
10
|
+
* a plain object (nothing reactive).
|
|
11
|
+
*
|
|
12
|
+
* Uses module-level `getProvider()` — device info is a singleton, not
|
|
13
|
+
* context-provided.
|
|
14
|
+
*
|
|
15
|
+
* @returns Device information and utility methods.
|
|
16
|
+
* @example
|
|
17
|
+
* ```svelte
|
|
18
|
+
* <script>
|
|
19
|
+
* import { useDevice } from '@molecule/app-svelte'
|
|
20
|
+
* const { deviceInfo, screenInfo, supports } = useDevice()
|
|
21
|
+
* </script>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export function useDevice() {
|
|
25
|
+
const provider = getProvider();
|
|
26
|
+
return {
|
|
27
|
+
deviceInfo: provider.getDeviceInfo(),
|
|
28
|
+
screenInfo: provider.getScreenInfo(),
|
|
29
|
+
hardwareInfo: provider.getHardwareInfo(),
|
|
30
|
+
featureSupport: provider.getFeatureSupport(),
|
|
31
|
+
supports: (feature) => provider.supports(feature),
|
|
32
|
+
isOnline: () => provider.isOnline(),
|
|
33
|
+
isStandalone: () => provider.isStandalone(),
|
|
34
|
+
language: provider.getLanguage(),
|
|
35
|
+
languages: provider.getLanguages(),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte hook for code editor management, porting React's `useEditor`.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { type Readable } from 'svelte/store';
|
|
7
|
+
import type { DiffFile, EditorFile, EditorProvider, EditorTab, FixWithAIRequest } from '@molecule/app-code-editor';
|
|
8
|
+
/**
|
|
9
|
+
* Hook result for useEditor: the tab state as readable stores and the editor
|
|
10
|
+
* actions as plain functions.
|
|
11
|
+
*/
|
|
12
|
+
export interface UseEditorResult {
|
|
13
|
+
/** The provider's open tabs. */
|
|
14
|
+
tabs: Readable<EditorTab[]>;
|
|
15
|
+
/** The path of the tab marked active, or null when none is. */
|
|
16
|
+
activeFile: Readable<string | null>;
|
|
17
|
+
/** Opens a file in a tab and activates it. */
|
|
18
|
+
openFile: (file: EditorFile) => void;
|
|
19
|
+
/** Closes a tab. */
|
|
20
|
+
closeFile: (path: string) => void;
|
|
21
|
+
/** The active tab's content. */
|
|
22
|
+
getContent: () => string | null;
|
|
23
|
+
/** Writes a tab's content. */
|
|
24
|
+
setContent: (path: string, content: string) => void;
|
|
25
|
+
/** Activates the tab with the given path. */
|
|
26
|
+
setActiveTab: (path: string) => void;
|
|
27
|
+
/** Mounts the editor into an element. */
|
|
28
|
+
mount: EditorProvider['mount'];
|
|
29
|
+
/** Disposes the editor. */
|
|
30
|
+
dispose: () => void;
|
|
31
|
+
/** Focuses the editor. */
|
|
32
|
+
focus: () => void;
|
|
33
|
+
/** Opens a diff tab (provider optional method). */
|
|
34
|
+
openDiff: (file: DiffFile) => void;
|
|
35
|
+
/** Closes the diff tab (provider optional method). */
|
|
36
|
+
closeDiff: () => void;
|
|
37
|
+
/** Converts a preview tab into a normal one (provider optional method). */
|
|
38
|
+
pinTab: (path: string) => void;
|
|
39
|
+
/** Adds an extra type library (provider optional method). */
|
|
40
|
+
addExtraLib: (content: string, filePath: string) => void;
|
|
41
|
+
/** Subscribes a Fix-with-AI request listener; returns its unsubscribe. */
|
|
42
|
+
onFixWithAI: (callback: (request: FixWithAIRequest) => void) => () => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Code editor management, React's `useEditor` in Svelte's idiom: call it
|
|
46
|
+
* during component init under `setMoleculeContext({ editor })`.
|
|
47
|
+
*
|
|
48
|
+
* `tabs` and `activeFile` always come from the provider's own tab list:
|
|
49
|
+
* `activeFile` is the path of the tab marked `isActive`, or `null` when no
|
|
50
|
+
* tab is. They are read at mount (tabs opened before the component mounted
|
|
51
|
+
* show at once), on every provider change event, and after each action that
|
|
52
|
+
* changes the tab list (`openFile`, `closeFile`, `setActiveTab`, `openDiff`,
|
|
53
|
+
* `closeDiff`, `pinTab`).
|
|
54
|
+
*
|
|
55
|
+
* @returns Editor state stores and controls.
|
|
56
|
+
* @example
|
|
57
|
+
* ```svelte
|
|
58
|
+
* <script>
|
|
59
|
+
* import { useEditor } from '@molecule/app-svelte'
|
|
60
|
+
* const { tabs, activeFile, openFile } = useEditor()
|
|
61
|
+
* </script>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function useEditor(): UseEditorResult;
|
|
65
|
+
//# sourceMappingURL=useEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditor.d.ts","sourceRoot":"","sources":["../../src/hooks/useEditor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAW,KAAK,QAAQ,EAAY,MAAM,cAAc,CAAA;AAE/D,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAIlC;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,gCAAgC;IAChC,IAAI,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAA;IAC3B,+DAA+D;IAC/D,UAAU,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACnC,8CAA8C;IAC9C,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAA;IACpC,oBAAoB;IACpB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,gCAAgC;IAChC,UAAU,EAAE,MAAM,MAAM,GAAG,IAAI,CAAA;IAC/B,8BAA8B;IAC9B,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,6CAA6C;IAC7C,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,yCAAyC;IACzC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAC9B,2BAA2B;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,0BAA0B;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,mDAAmD;IACnD,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;IAClC,sDAAsD;IACtD,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,2EAA2E;IAC3E,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,6DAA6D;IAC7D,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACxD,0EAA0E;IAC1E,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,KAAK,MAAM,IAAI,CAAA;CAC3E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,SAAS,IAAI,eAAe,CAmE3C"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte hook for code editor management, porting React's `useEditor`.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { onDestroy } from 'svelte';
|
|
7
|
+
import { derived, writable } from 'svelte/store';
|
|
8
|
+
import { useEditorProvider } from '../context.js';
|
|
9
|
+
/**
|
|
10
|
+
* Code editor management, React's `useEditor` in Svelte's idiom: call it
|
|
11
|
+
* during component init under `setMoleculeContext({ editor })`.
|
|
12
|
+
*
|
|
13
|
+
* `tabs` and `activeFile` always come from the provider's own tab list:
|
|
14
|
+
* `activeFile` is the path of the tab marked `isActive`, or `null` when no
|
|
15
|
+
* tab is. They are read at mount (tabs opened before the component mounted
|
|
16
|
+
* show at once), on every provider change event, and after each action that
|
|
17
|
+
* changes the tab list (`openFile`, `closeFile`, `setActiveTab`, `openDiff`,
|
|
18
|
+
* `closeDiff`, `pinTab`).
|
|
19
|
+
*
|
|
20
|
+
* @returns Editor state stores and controls.
|
|
21
|
+
* @example
|
|
22
|
+
* ```svelte
|
|
23
|
+
* <script>
|
|
24
|
+
* import { useEditor } from '@molecule/app-svelte'
|
|
25
|
+
* const { tabs, activeFile, openFile } = useEditor()
|
|
26
|
+
* </script>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export function useEditor() {
|
|
30
|
+
const provider = useEditorProvider();
|
|
31
|
+
const tabs = writable(provider.getTabs());
|
|
32
|
+
const activeFile = derived(tabs, (list) => list.find((tab) => tab.isActive)?.path ?? null);
|
|
33
|
+
// Re-reads the provider's tab list, which also carries the active tab.
|
|
34
|
+
const syncTabs = () => {
|
|
35
|
+
tabs.set(provider.getTabs());
|
|
36
|
+
};
|
|
37
|
+
// Subscribe to changes to update tabs and active file. Read once on
|
|
38
|
+
// subscribing too: a change between the first read and this subscription,
|
|
39
|
+
// or a replaced provider, sends no event this subscription could see.
|
|
40
|
+
onDestroy(provider.onChange(syncTabs));
|
|
41
|
+
syncTabs();
|
|
42
|
+
const openFile = (file) => {
|
|
43
|
+
provider.openFile(file);
|
|
44
|
+
syncTabs();
|
|
45
|
+
};
|
|
46
|
+
const closeFile = (path) => {
|
|
47
|
+
provider.closeFile(path);
|
|
48
|
+
syncTabs();
|
|
49
|
+
};
|
|
50
|
+
const setContent = (path, content) => provider.setContent(path, content);
|
|
51
|
+
const setActiveTab = (path) => {
|
|
52
|
+
provider.setActiveTab(path);
|
|
53
|
+
syncTabs();
|
|
54
|
+
};
|
|
55
|
+
const openDiff = (file) => {
|
|
56
|
+
provider.openDiff?.(file);
|
|
57
|
+
syncTabs();
|
|
58
|
+
};
|
|
59
|
+
const closeDiff = () => {
|
|
60
|
+
provider.closeDiff?.();
|
|
61
|
+
syncTabs();
|
|
62
|
+
};
|
|
63
|
+
const pinTab = (path) => {
|
|
64
|
+
provider.pinTab?.(path);
|
|
65
|
+
syncTabs();
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
tabs: { subscribe: tabs.subscribe },
|
|
69
|
+
activeFile,
|
|
70
|
+
openFile,
|
|
71
|
+
closeFile,
|
|
72
|
+
getContent: () => provider.getContent(),
|
|
73
|
+
setContent,
|
|
74
|
+
setActiveTab,
|
|
75
|
+
mount: (...args) => provider.mount(...args),
|
|
76
|
+
dispose: () => provider.dispose(),
|
|
77
|
+
focus: () => provider.focus(),
|
|
78
|
+
openDiff,
|
|
79
|
+
closeDiff,
|
|
80
|
+
pinTab,
|
|
81
|
+
addExtraLib: (content, filePath) => {
|
|
82
|
+
provider.addExtraLib?.(content, filePath);
|
|
83
|
+
},
|
|
84
|
+
onFixWithAI: (callback) => provider.onFixWithAI?.(callback) ?? (() => { }),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte hooks for form handling, porting React's `useForm` family.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { type Readable } from 'svelte/store';
|
|
7
|
+
import type { FieldRegistration, FieldState, FormController, FormOptions, FormResetOptions, FormState, FormValuesConstraint, RegisterOptions } from '@molecule/app-forms';
|
|
8
|
+
/**
|
|
9
|
+
* Options for useForm hook.
|
|
10
|
+
*
|
|
11
|
+
* Every `FormOptions` field is supported. `createForm` is only an override —
|
|
12
|
+
* omit it and the hook creates the controller through the bonded forms
|
|
13
|
+
* provider (`createForm` from `@molecule/app-forms`), which uses the built-in
|
|
14
|
+
* native provider until the app bonds its own.
|
|
15
|
+
*/
|
|
16
|
+
export interface UseFormOptions<T extends FormValuesConstraint<T>> extends FormOptions<T> {
|
|
17
|
+
/** External values preserve dirty fields by default. Set keepDirtyValues: false to replace them explicitly. */
|
|
18
|
+
resetOptions?: FormResetOptions;
|
|
19
|
+
/** New record identity. Serialize composite keys; fresh objects/arrays must not reset drafts on each mount. */
|
|
20
|
+
resetKey?: string | number | boolean | bigint | null;
|
|
21
|
+
/**
|
|
22
|
+
* Explicit form factory for this one form. Defaults to the bonded forms
|
|
23
|
+
* provider; pass it only to pin a specific provider instance.
|
|
24
|
+
*/
|
|
25
|
+
createForm?: (options: FormOptions<T>) => FormController<T>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Result of useForm hook: the state fields as readable stores, the methods as
|
|
29
|
+
* plain functions.
|
|
30
|
+
*/
|
|
31
|
+
export interface UseFormResult<T extends FormValuesConstraint<T>> {
|
|
32
|
+
/** The whole form state. */
|
|
33
|
+
formState: Readable<FormState<T>>;
|
|
34
|
+
/** Whether every field passes validation. */
|
|
35
|
+
isValid: Readable<boolean>;
|
|
36
|
+
/** Whether any field differs from the baseline. */
|
|
37
|
+
isDirty: Readable<boolean>;
|
|
38
|
+
/** Whether a submit is running. */
|
|
39
|
+
isSubmitting: Readable<boolean>;
|
|
40
|
+
/** Registers a field; returns its native bindings. */
|
|
41
|
+
register: (name: keyof T, options?: Omit<RegisterOptions, 'name'> & {
|
|
42
|
+
name?: string;
|
|
43
|
+
}) => FieldRegistration;
|
|
44
|
+
/** Reads one field's value. */
|
|
45
|
+
getValue: <K extends keyof T>(name: K) => T[K];
|
|
46
|
+
/** Writes one field's value (marks it touched and dirty). */
|
|
47
|
+
setValue: <K extends keyof T>(name: K, value: T[K]) => void;
|
|
48
|
+
/** Reads one field's error. */
|
|
49
|
+
getError: (name: keyof T) => string | undefined;
|
|
50
|
+
/** Sets or clears one field's error. */
|
|
51
|
+
setError: (name: keyof T, error: string | undefined) => void;
|
|
52
|
+
/** Clears every field error. */
|
|
53
|
+
clearErrors: () => void;
|
|
54
|
+
/** Validates and runs the handler; returns the submit runner. */
|
|
55
|
+
handleSubmit: (onSubmit: (values: T) => void | Promise<void>, onError?: (errors: Partial<Record<keyof T, string>>) => void) => (event?: {
|
|
56
|
+
preventDefault?: () => void;
|
|
57
|
+
}) => Promise<void>;
|
|
58
|
+
/** Restores the baseline (optionally a new one) and clears touched, errors and submit state. */
|
|
59
|
+
reset: (values?: Partial<T>) => void;
|
|
60
|
+
/** Applies externally loaded values without clearing submission state. */
|
|
61
|
+
updateValues: (values: Partial<T>, resetOptions?: FormResetOptions) => void;
|
|
62
|
+
/** Whole-form state tuple: edits mark only changed fields dirty; fills preserve them. */
|
|
63
|
+
asState(): readonly [
|
|
64
|
+
T,
|
|
65
|
+
(value: T | ((previous: T) => T)) => void,
|
|
66
|
+
(value: Partial<T> | ((previous: T) => Partial<T>)) => void
|
|
67
|
+
];
|
|
68
|
+
/** One field as [value, edit, fill]. Fill preserves edits made before data arrives. */
|
|
69
|
+
asState<K extends keyof T>(name: K): readonly [
|
|
70
|
+
T[K],
|
|
71
|
+
(value: T[K] | ((previous: T[K]) => T[K])) => void,
|
|
72
|
+
(value: T[K] | ((previous: T[K]) => T[K])) => void
|
|
73
|
+
];
|
|
74
|
+
/** Runs every registered rule and publishes field errors. */
|
|
75
|
+
validate: () => Promise<boolean>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Hook for form state management, React's `useForm` in Svelte's idiom: call it
|
|
79
|
+
* during component init (no provider needed — the controller comes from the
|
|
80
|
+
* bonded forms provider).
|
|
81
|
+
*
|
|
82
|
+
* Creates its controller through the bonded forms provider, so an app wires a
|
|
83
|
+
* form library once (`setProvider` from `@molecule/app-forms`) and every form
|
|
84
|
+
* picks it up. Passing `createForm` overrides that for one form. When the
|
|
85
|
+
* `values` option changes by content, it becomes the new baseline;
|
|
86
|
+
* `resetOptions.keepDirtyValues` retains edited fields while pristine fields
|
|
87
|
+
* take the loaded values. A changed `resetKey` starts a fresh form; fresh
|
|
88
|
+
* `defaultValues` without one leave the drafts alone.
|
|
89
|
+
*
|
|
90
|
+
* @param options - Form options. `defaultValues`, `mode` and the form-level
|
|
91
|
+
* `validate` are forwarded to the provider.
|
|
92
|
+
* @returns Form state stores and methods
|
|
93
|
+
* @example
|
|
94
|
+
* ```svelte
|
|
95
|
+
* <script>
|
|
96
|
+
* import { useForm } from '@molecule/app-svelte'
|
|
97
|
+
* const { register, handleSubmit, formState, isSubmitting } = useForm({
|
|
98
|
+
* defaultValues: { email: '', password: '' },
|
|
99
|
+
* })
|
|
100
|
+
* const onSubmit = handleSubmit(async (values) => { await login(values) })
|
|
101
|
+
* </script>
|
|
102
|
+
*
|
|
103
|
+
* <form onsubmit={onSubmit}>
|
|
104
|
+
* <input {...$registerNotNeeded} />
|
|
105
|
+
* </form>
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export declare function useForm<T extends FormValuesConstraint<T> = Record<string, unknown>>(options?: UseFormOptions<T>): UseFormResult<T>;
|
|
109
|
+
/**
|
|
110
|
+
* Hook to watch a specific field value, React's `useWatch` in Svelte's idiom:
|
|
111
|
+
* a readable store of the field's current value.
|
|
112
|
+
*
|
|
113
|
+
* @param form - Form controller
|
|
114
|
+
* @param name - Field name to watch
|
|
115
|
+
* @returns A readable store of the current field value
|
|
116
|
+
* @example
|
|
117
|
+
* ```svelte
|
|
118
|
+
* <script>
|
|
119
|
+
* import { useForm, useWatch } from '@molecule/app-svelte'
|
|
120
|
+
* const { form } = useForm({ defaultValues: { country: '' } })
|
|
121
|
+
* const country = useWatch(form, 'country')
|
|
122
|
+
* </script>
|
|
123
|
+
*
|
|
124
|
+
* <p>{$country}</p>
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
export declare function useWatch<T extends FormValuesConstraint<T>, K extends keyof T>(form: FormController<T>, name: K): Readable<T[K]>;
|
|
128
|
+
/**
|
|
129
|
+
* Hook to get field-level state, React's `useFieldState` in Svelte's idiom: a
|
|
130
|
+
* readable store of the field's state.
|
|
131
|
+
*
|
|
132
|
+
* @param form - Form controller
|
|
133
|
+
* @param name - Field name
|
|
134
|
+
* @returns A readable store of the field state (value, error, touched, dirty, valid, validating)
|
|
135
|
+
*/
|
|
136
|
+
export declare function useFieldState<T extends FormValuesConstraint<T>>(form: FormController<T>, name: keyof T): Readable<FieldState<T[keyof T]>>;
|
|
137
|
+
//# sourceMappingURL=useForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../src/hooks/useForm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAW,KAAK,QAAQ,EAAY,MAAM,cAAc,CAAA;AAE/D,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,oBAAoB,EACpB,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAgC5B;;;;;;;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,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