@molecule/app-angular 3.3.1 → 3.6.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.
Files changed (114) hide show
  1. package/README.md +4049 -1255
  2. package/dist/chat.d.ts.map +1 -1
  3. package/dist/chat.js +3 -2
  4. package/dist/chat.js.map +1 -1
  5. package/dist/hooks/external-store.d.ts +32 -0
  6. package/dist/hooks/external-store.d.ts.map +1 -0
  7. package/dist/hooks/external-store.js +62 -0
  8. package/dist/hooks/external-store.js.map +1 -0
  9. package/dist/hooks/index.d.ts +24 -0
  10. package/dist/hooks/index.d.ts.map +1 -0
  11. package/dist/hooks/index.js +24 -0
  12. package/dist/hooks/index.js.map +1 -0
  13. package/dist/hooks/use-ai-models.d.ts +53 -0
  14. package/dist/hooks/use-ai-models.d.ts.map +1 -0
  15. package/dist/hooks/use-ai-models.js +167 -0
  16. package/dist/hooks/use-ai-models.js.map +1 -0
  17. package/dist/hooks/use-async.d.ts +129 -0
  18. package/dist/hooks/use-async.d.ts.map +1 -0
  19. package/dist/hooks/use-async.js +194 -0
  20. package/dist/hooks/use-async.js.map +1 -0
  21. package/dist/hooks/use-auth-flows.d.ts +226 -0
  22. package/dist/hooks/use-auth-flows.d.ts.map +1 -0
  23. package/dist/hooks/use-auth-flows.js +481 -0
  24. package/dist/hooks/use-auth-flows.js.map +1 -0
  25. package/dist/hooks/use-auth.d.ts +85 -0
  26. package/dist/hooks/use-auth.d.ts.map +1 -0
  27. package/dist/hooks/use-auth.js +104 -0
  28. package/dist/hooks/use-auth.js.map +1 -0
  29. package/dist/hooks/use-forms.d.ts +174 -0
  30. package/dist/hooks/use-forms.d.ts.map +1 -0
  31. package/dist/hooks/use-forms.js +221 -0
  32. package/dist/hooks/use-forms.js.map +1 -0
  33. package/dist/hooks/use-http.d.ts +163 -0
  34. package/dist/hooks/use-http.d.ts.map +1 -0
  35. package/dist/hooks/use-http.js +198 -0
  36. package/dist/hooks/use-http.js.map +1 -0
  37. package/dist/hooks/use-ide.d.ts +208 -0
  38. package/dist/hooks/use-ide.d.ts.map +1 -0
  39. package/dist/hooks/use-ide.js +217 -0
  40. package/dist/hooks/use-ide.js.map +1 -0
  41. package/dist/hooks/use-logger.d.ts +40 -0
  42. package/dist/hooks/use-logger.d.ts.map +1 -0
  43. package/dist/hooks/use-logger.js +56 -0
  44. package/dist/hooks/use-logger.js.map +1 -0
  45. package/dist/hooks/use-native.d.ts +218 -0
  46. package/dist/hooks/use-native.d.ts.map +1 -0
  47. package/dist/hooks/use-native.js +173 -0
  48. package/dist/hooks/use-native.js.map +1 -0
  49. package/dist/hooks/use-profile-form.d.ts +113 -0
  50. package/dist/hooks/use-profile-form.d.ts.map +1 -0
  51. package/dist/hooks/use-profile-form.js +253 -0
  52. package/dist/hooks/use-profile-form.js.map +1 -0
  53. package/dist/hooks/use-router.d.ts +219 -0
  54. package/dist/hooks/use-router.d.ts.map +1 -0
  55. package/dist/hooks/use-router.js +266 -0
  56. package/dist/hooks/use-router.js.map +1 -0
  57. package/dist/hooks/use-storage.d.ts +142 -0
  58. package/dist/hooks/use-storage.d.ts.map +1 -0
  59. package/dist/hooks/use-storage.js +299 -0
  60. package/dist/hooks/use-storage.js.map +1 -0
  61. package/dist/hooks/use-store.d.ts +81 -0
  62. package/dist/hooks/use-store.d.ts.map +1 -0
  63. package/dist/hooks/use-store.js +143 -0
  64. package/dist/hooks/use-store.js.map +1 -0
  65. package/dist/hooks/use-theme.d.ts +59 -0
  66. package/dist/hooks/use-theme.d.ts.map +1 -0
  67. package/dist/hooks/use-theme.js +117 -0
  68. package/dist/hooks/use-theme.js.map +1 -0
  69. package/dist/hooks/use-translation.d.ts +91 -0
  70. package/dist/hooks/use-translation.d.ts.map +1 -0
  71. package/dist/hooks/use-translation.js +152 -0
  72. package/dist/hooks/use-translation.js.map +1 -0
  73. package/dist/hooks/use-verify-payment-return.d.ts +86 -0
  74. package/dist/hooks/use-verify-payment-return.d.ts.map +1 -0
  75. package/dist/hooks/use-verify-payment-return.js +167 -0
  76. package/dist/hooks/use-verify-payment-return.js.map +1 -0
  77. package/dist/hooks/use-version.d.ts +49 -0
  78. package/dist/hooks/use-version.d.ts.map +1 -0
  79. package/dist/hooks/use-version.js +70 -0
  80. package/dist/hooks/use-version.js.map +1 -0
  81. package/dist/i18n-reactive.d.ts +2 -5
  82. package/dist/i18n-reactive.d.ts.map +1 -1
  83. package/dist/i18n-reactive.js.map +1 -1
  84. package/dist/index.d.ts +8 -0
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +8 -0
  87. package/dist/index.js.map +1 -1
  88. package/dist/inject.d.ts +24 -0
  89. package/dist/inject.d.ts.map +1 -0
  90. package/dist/inject.js +33 -0
  91. package/dist/inject.js.map +1 -0
  92. package/dist/link.d.ts +63 -0
  93. package/dist/link.d.ts.map +1 -0
  94. package/dist/link.js +82 -0
  95. package/dist/link.js.map +1 -0
  96. package/dist/maybe-signal.d.ts +26 -0
  97. package/dist/maybe-signal.d.ts.map +1 -0
  98. package/dist/maybe-signal.js +20 -0
  99. package/dist/maybe-signal.js.map +1 -0
  100. package/dist/providers.d.ts +24 -0
  101. package/dist/providers.d.ts.map +1 -1
  102. package/dist/providers.js +44 -3
  103. package/dist/providers.js.map +1 -1
  104. package/dist/session-ready.d.ts +41 -0
  105. package/dist/session-ready.d.ts.map +1 -0
  106. package/dist/session-ready.js +79 -0
  107. package/dist/session-ready.js.map +1 -0
  108. package/dist/tokens.d.ts +15 -0
  109. package/dist/tokens.d.ts.map +1 -1
  110. package/dist/tokens.js +12 -0
  111. package/dist/tokens.js.map +1 -1
  112. package/dist/types.d.ts +14 -1
  113. package/dist/types.d.ts.map +1 -1
  114. package/package.json +5 -5
@@ -0,0 +1,163 @@
1
+ /**
2
+ * Angular functions for HTTP requests, mirroring `useHttpClient`, `useHttp`,
3
+ * `useGet`, `usePost`, `usePut`, `usePatch` and `useDelete` from
4
+ * `@molecule/app-react`.
5
+ *
6
+ * @module
7
+ */
8
+ import { type Signal } from '@angular/core';
9
+ import type { HttpClient, RequestConfig } from '@molecule/app-http';
10
+ import { type MaybeSignal } from '../maybe-signal.js';
11
+ /**
12
+ * The HTTP client registered by `provideMolecule({ http })` or `provideHttp`.
13
+ * Call it in an injection context.
14
+ *
15
+ * @returns The HTTP client.
16
+ * @throws {Error} When no HTTP client is registered.
17
+ */
18
+ export declare function useHttpClient(): HttpClient;
19
+ /**
20
+ * State for async HTTP operations.
21
+ *
22
+ * @template T - The response data's shape.
23
+ */
24
+ export interface UseHttpState<T> {
25
+ /** The latest successful response's data, `null` before one and after a reset. */
26
+ data: T | null;
27
+ /** Whether a request is in flight. */
28
+ loading: boolean;
29
+ /** The failure of the newest owned request. */
30
+ error: Error | null;
31
+ }
32
+ /**
33
+ * Result of {@link useHttp}: every state field as a signal (the same fields
34
+ * React's result carries as plain values) and the two controls as plain
35
+ * functions.
36
+ *
37
+ * @template T - The response data's shape.
38
+ */
39
+ export interface UseHttpResult<T> {
40
+ /** The latest successful response's data, `null` before one and after a reset. */
41
+ readonly data: Signal<T | null>;
42
+ /** Whether a request is in flight. */
43
+ readonly loading: Signal<boolean>;
44
+ /** The failure of the newest owned request. */
45
+ readonly error: Signal<Error | null>;
46
+ /**
47
+ * Runs the request and resolves with its own data, or `null` on failure,
48
+ * even when a newer request or `reset` has superseded its displayed state.
49
+ *
50
+ * This function is IDENTITY-STABLE for the component's lifetime — the
51
+ * request it performs is the one the `method`, `url` and `options` sources
52
+ * hold when it is CALLED, as React reads the latest committed render's
53
+ * arguments when its `execute` runs. Its request options are read when it
54
+ * is CALLED.
55
+ *
56
+ * @returns The response data, or `null` on failure.
57
+ */
58
+ execute: () => Promise<T | null>;
59
+ /** Supersedes every pending request and clears the state. */
60
+ reset: () => void;
61
+ }
62
+ /**
63
+ * Options for {@link useHttp} and the verb hooks.
64
+ *
65
+ * Every request option — headers, params, body `data`, `signal`, `onSuccess`,
66
+ * `onError` — is read at the moment `execute` runs, not when the hook mounted,
67
+ * so an inline object or callback needs no memoizing. Only `immediate` is read
68
+ * on mount.
69
+ *
70
+ * @template T - The response data's shape.
71
+ */
72
+ export interface UseHttpOptions<T> extends RequestConfig {
73
+ /**
74
+ * Whether to execute the request immediately on mount.
75
+ */
76
+ immediate?: boolean;
77
+ /**
78
+ * Callback for each request that succeeds while mounted, including a request
79
+ * superseded by another `execute` or `reset`. Read `data` from the hook when
80
+ * only the newest request's result should drive the UI.
81
+ *
82
+ * @param data - The response data.
83
+ */
84
+ onSuccess?: (data: T) => void;
85
+ /**
86
+ * Callback for each request that fails while mounted, including a request
87
+ * superseded by another `execute` or `reset`.
88
+ *
89
+ * @param error - The failure.
90
+ */
91
+ onError?: (error: Error) => void;
92
+ }
93
+ /**
94
+ * HTTP requests with state management. Call it in an injection context (a
95
+ * component field initializer or constructor).
96
+ *
97
+ * `execute` keeps one identity for the component's lifetime; the request it
98
+ * performs is the one the `method`, `url` and `options` sources hold when it
99
+ * is called. The current headers, body, `signal` and callbacks are read when
100
+ * `execute` is called, so an inline options object or callback needs no
101
+ * memoizing.
102
+ *
103
+ * The arguments may be signals: `execute` then sends to the url the signal
104
+ * holds at the moment it is called, the way React's re-rendered `useHttp`
105
+ * sends to the latest url. The hook's state (an in-flight request, loaded
106
+ * data) survives an argument change, as React's survives a re-render.
107
+ *
108
+ * The newest request owns the state: an older request that answers after a
109
+ * newer one (or after `reset`) cannot repopulate the displayed state, though
110
+ * its own callbacks still report its outcome.
111
+ *
112
+ * @param method - HTTP method (or a signal of it).
113
+ * @param url - Request URL (or a signal of it).
114
+ * @param options - Request options, read at call time (or a signal of them).
115
+ * @returns The request state as signals and the execute/reset functions.
116
+ */
117
+ export declare function useHttp<T>(method: MaybeSignal<'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'>, url: MaybeSignal<string>, options?: MaybeSignal<UseHttpOptions<T>>): UseHttpResult<T>;
118
+ /**
119
+ * GET requests.
120
+ *
121
+ * @param url - Request URL to fetch from (or a signal of it).
122
+ * @param options - HTTP request options including callbacks and request config
123
+ * (or a signal of them).
124
+ * @returns Request state (data, loading, error) and controls (execute, reset).
125
+ */
126
+ export declare function useGet<T>(url: MaybeSignal<string>, options?: MaybeSignal<UseHttpOptions<T>>): UseHttpResult<T>;
127
+ /**
128
+ * POST requests, with the body in `options.data`.
129
+ *
130
+ * @param url - Request URL to post to (or a signal of it).
131
+ * @param options - HTTP request options including body data and callbacks (or
132
+ * a signal of them).
133
+ * @returns Request state (data, loading, error) and controls (execute, reset).
134
+ */
135
+ export declare function usePost<T>(url: MaybeSignal<string>, options?: MaybeSignal<UseHttpOptions<T>>): UseHttpResult<T>;
136
+ /**
137
+ * PUT requests, with the replacement body.
138
+ *
139
+ * @param url - Request URL to send the PUT request to (or a signal of it).
140
+ * @param options - HTTP request options including body data and callbacks (or
141
+ * a signal of them).
142
+ * @returns Request state (data, loading, error) and controls (execute, reset).
143
+ */
144
+ export declare function usePut<T>(url: MaybeSignal<string>, options?: MaybeSignal<UseHttpOptions<T>>): UseHttpResult<T>;
145
+ /**
146
+ * PATCH requests, with the partial body.
147
+ *
148
+ * @param url - Request URL to send the PATCH request to (or a signal of it).
149
+ * @param options - HTTP request options including partial body data and
150
+ * callbacks (or a signal of them).
151
+ * @returns Request state (data, loading, error) and controls (execute, reset).
152
+ */
153
+ export declare function usePatch<T>(url: MaybeSignal<string>, options?: MaybeSignal<UseHttpOptions<T>>): UseHttpResult<T>;
154
+ /**
155
+ * DELETE requests; a body travels in `options.data`.
156
+ *
157
+ * @param url - Request URL of the resource to delete (or a signal of it).
158
+ * @param options - HTTP request options including callbacks (or a signal of
159
+ * them).
160
+ * @returns Request state (data, loading, error) and controls (execute, reset).
161
+ */
162
+ export declare function useDelete<T>(url: MaybeSignal<string>, options?: MaybeSignal<UseHttpOptions<T>>): UseHttpResult<T>;
163
+ //# sourceMappingURL=use-http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-http.d.ts","sourceRoot":"","sources":["../../src/hooks/use-http.ts"],"names":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AAC,CAAC,GACvC,aAAa,CAAC,CAAC,CAAC,CAElB"}
@@ -0,0 +1,198 @@
1
+ /**
2
+ * Angular functions for HTTP requests, mirroring `useHttpClient`, `useHttp`,
3
+ * `useGet`, `usePost`, `usePut`, `usePatch` and `useDelete` from
4
+ * `@molecule/app-react`.
5
+ *
6
+ * @module
7
+ */
8
+ import { DestroyRef, inject, signal } from '@angular/core';
9
+ import { t } from '@molecule/app-i18n';
10
+ import { injectProvider } from '../inject.js';
11
+ import { readMaybeSignal } from '../maybe-signal.js';
12
+ import { HTTP_CLIENT } from '../tokens.js';
13
+ /**
14
+ * The HTTP client registered by `provideMolecule({ http })` or `provideHttp`.
15
+ * Call it in an injection context.
16
+ *
17
+ * @returns The HTTP client.
18
+ * @throws {Error} When no HTTP client is registered.
19
+ */
20
+ export function useHttpClient() {
21
+ return injectProvider(HTTP_CLIENT, 'useHttpOutsideProvider', 'useHttpClient must be used within an HttpProvider');
22
+ }
23
+ /**
24
+ * HTTP requests with state management. Call it in an injection context (a
25
+ * component field initializer or constructor).
26
+ *
27
+ * `execute` keeps one identity for the component's lifetime; the request it
28
+ * performs is the one the `method`, `url` and `options` sources hold when it
29
+ * is called. The current headers, body, `signal` and callbacks are read when
30
+ * `execute` is called, so an inline options object or callback needs no
31
+ * memoizing.
32
+ *
33
+ * The arguments may be signals: `execute` then sends to the url the signal
34
+ * holds at the moment it is called, the way React's re-rendered `useHttp`
35
+ * sends to the latest url. The hook's state (an in-flight request, loaded
36
+ * data) survives an argument change, as React's survives a re-render.
37
+ *
38
+ * The newest request owns the state: an older request that answers after a
39
+ * newer one (or after `reset`) cannot repopulate the displayed state, though
40
+ * its own callbacks still report its outcome.
41
+ *
42
+ * @param method - HTTP method (or a signal of it).
43
+ * @param url - Request URL (or a signal of it).
44
+ * @param options - Request options, read at call time (or a signal of them).
45
+ * @returns The request state as signals and the execute/reset functions.
46
+ */
47
+ export function useHttp(method, url, options) {
48
+ const client = useHttpClient();
49
+ const destroyRef = inject(DestroyRef);
50
+ const immediate = readMaybeSignal(options)?.immediate ?? false;
51
+ // React keeps this state in useState/useRef, so a re-render with new
52
+ // arguments leaves an in-flight request and its loaded data alone; the
53
+ // signals below live for this component instance's lifetime the same way.
54
+ const state = {
55
+ data: signal(null),
56
+ loading: signal(immediate),
57
+ error: signal(null),
58
+ latestRequest: 0,
59
+ mounted: true,
60
+ };
61
+ destroyRef.onDestroy(() => {
62
+ state.mounted = false;
63
+ });
64
+ const execute = async () => {
65
+ if (!state.mounted)
66
+ return null;
67
+ // Options describe the request being sent; method/url decide WHICH request
68
+ // execute performs. Reading them here, at call time, is what React's
69
+ // optionsRef-equivalent gives its re-rendered hook.
70
+ const { immediate: _immediate, onSuccess, onError, ...requestConfig } = readMaybeSignal(options) ?? {};
71
+ const requestMethod = readMaybeSignal(method);
72
+ const requestUrl = readMaybeSignal(url);
73
+ const request = ++state.latestRequest;
74
+ // Callbacks report THIS request's outcome (a submit's onSuccess still runs);
75
+ // only the newest request may change what the hook shows.
76
+ const ownsState = () => state.mounted && request === state.latestRequest;
77
+ state.loading.set(true);
78
+ state.error.set(null);
79
+ try {
80
+ let response;
81
+ switch (requestMethod) {
82
+ case 'GET':
83
+ response = await client.get(requestUrl, requestConfig);
84
+ break;
85
+ case 'POST':
86
+ response = await client.post(requestUrl, requestConfig.data, requestConfig);
87
+ break;
88
+ case 'PUT':
89
+ response = await client.put(requestUrl, requestConfig.data, requestConfig);
90
+ break;
91
+ case 'PATCH':
92
+ response = await client.patch(requestUrl, requestConfig.data, requestConfig);
93
+ break;
94
+ case 'DELETE':
95
+ response = await client.delete(requestUrl, requestConfig);
96
+ break;
97
+ default:
98
+ throw new Error(t('angular.error.unsupportedMethod', { method: requestMethod }, { defaultValue: 'Unsupported method: {{method}}' }));
99
+ }
100
+ if (state.mounted) {
101
+ if (ownsState()) {
102
+ state.data.set(response.data);
103
+ state.loading.set(false);
104
+ state.error.set(null);
105
+ }
106
+ onSuccess?.(response.data);
107
+ }
108
+ return response.data;
109
+ }
110
+ catch (error) {
111
+ const err = error instanceof Error ? error : new Error(String(error));
112
+ if (state.mounted) {
113
+ if (ownsState()) {
114
+ state.data.set(null);
115
+ state.loading.set(false);
116
+ state.error.set(err);
117
+ }
118
+ onError?.(err);
119
+ }
120
+ return null;
121
+ }
122
+ };
123
+ const reset = () => {
124
+ state.latestRequest++;
125
+ state.data.set(null);
126
+ state.loading.set(false);
127
+ state.error.set(null);
128
+ };
129
+ // Execute immediately if requested — mount only, as it has always been and
130
+ // as React's empty dependency array pins it: a later argument change (a new
131
+ // url through a signal) does not repeat it.
132
+ if (immediate) {
133
+ void execute();
134
+ }
135
+ return {
136
+ data: state.data.asReadonly(),
137
+ loading: state.loading.asReadonly(),
138
+ error: state.error.asReadonly(),
139
+ execute,
140
+ reset,
141
+ };
142
+ }
143
+ /**
144
+ * GET requests.
145
+ *
146
+ * @param url - Request URL to fetch from (or a signal of it).
147
+ * @param options - HTTP request options including callbacks and request config
148
+ * (or a signal of them).
149
+ * @returns Request state (data, loading, error) and controls (execute, reset).
150
+ */
151
+ export function useGet(url, options) {
152
+ return useHttp('GET', url, options);
153
+ }
154
+ /**
155
+ * POST requests, with the body in `options.data`.
156
+ *
157
+ * @param url - Request URL to post to (or a signal of it).
158
+ * @param options - HTTP request options including body data and callbacks (or
159
+ * a signal of them).
160
+ * @returns Request state (data, loading, error) and controls (execute, reset).
161
+ */
162
+ export function usePost(url, options) {
163
+ return useHttp('POST', url, options);
164
+ }
165
+ /**
166
+ * PUT requests, with the replacement body.
167
+ *
168
+ * @param url - Request URL to send the PUT request to (or a signal of it).
169
+ * @param options - HTTP request options including body data and callbacks (or
170
+ * a signal of them).
171
+ * @returns Request state (data, loading, error) and controls (execute, reset).
172
+ */
173
+ export function usePut(url, options) {
174
+ return useHttp('PUT', url, options);
175
+ }
176
+ /**
177
+ * PATCH requests, with the partial body.
178
+ *
179
+ * @param url - Request URL to send the PATCH request to (or a signal of it).
180
+ * @param options - HTTP request options including partial body data and
181
+ * callbacks (or a signal of them).
182
+ * @returns Request state (data, loading, error) and controls (execute, reset).
183
+ */
184
+ export function usePatch(url, options) {
185
+ return useHttp('PATCH', url, options);
186
+ }
187
+ /**
188
+ * DELETE requests; a body travels in `options.data`.
189
+ *
190
+ * @param url - Request URL of the resource to delete (or a signal of it).
191
+ * @param options - HTTP request options including callbacks (or a signal of
192
+ * them).
193
+ * @returns Request state (data, loading, error) and controls (execute, reset).
194
+ */
195
+ export function useDelete(url, options) {
196
+ return useHttp('DELETE', url, options);
197
+ }
198
+ //# sourceMappingURL=use-http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-http.js","sourceRoot":"","sources":["../../src/hooks/use-http.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAe,MAAM,EAAuB,MAAM,eAAe,CAAA;AAG5F,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AAEtC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAoB,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C;;;;;;GAMG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,cAAc,CACnB,WAAW,EACX,wBAAwB,EACxB,mDAAmD,CACpD,CAAA;AACH,CAAC;AAkGD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,OAAO,CACrB,MAAgE,EAChE,GAAwB,EACxB,OAAwC;IAExC,MAAM,MAAM,GAAG,aAAa,EAAE,CAAA;IAC9B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;IACrC,MAAM,SAAS,GAAG,eAAe,CAAC,OAAO,CAAC,EAAE,SAAS,IAAI,KAAK,CAAA;IAE9D,qEAAqE;IACrE,uEAAuE;IACvE,0EAA0E;IAC1E,MAAM,KAAK,GAAiB;QAC1B,IAAI,EAAE,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;;;;;GAOG;AACH,MAAM,UAAU,MAAM,CACpB,GAAwB,EACxB,OAAwC;IAExC,OAAO,OAAO,CAAI,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;AACxC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CACtB,GAAwB,EACxB,OAAwC;IAExC,OAAO,OAAO,CAAI,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;AAC1C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CACvB,GAAwB,EACxB,OAAwC;IAExC,OAAO,OAAO,CAAI,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;AAC3C,CAAC"}
@@ -0,0 +1,208 @@
1
+ /**
2
+ * Angular functions for the IDE services, mirroring `useWorkspace`,
3
+ * `useWorkspaceProvider`, `useEditor`, `useEditorProvider`, `usePreview` and
4
+ * `usePreviewProvider` from `@molecule/app-react`.
5
+ *
6
+ * @module
7
+ */
8
+ import { type Signal } from '@angular/core';
9
+ import type { DiffFile, EditorFile, EditorProvider, EditorTab, FixWithAIRequest } from '@molecule/app-code-editor';
10
+ import type { PanelId, WorkspaceProvider, WorkspaceState } from '@molecule/app-ide';
11
+ import type { DeviceFrame, PreviewProvider, PreviewState } from '@molecule/app-live-preview';
12
+ /**
13
+ * The workspace provider registered by `provideMolecule({ workspace })` or
14
+ * `provideWorkspace`. Call it in an injection context.
15
+ *
16
+ * @returns The workspace provider.
17
+ * @throws {Error} When no workspace provider is registered.
18
+ */
19
+ export declare function useWorkspaceProvider(): WorkspaceProvider;
20
+ /**
21
+ * IDE workspace layout management. Call it in an injection context (a
22
+ * component field initializer or constructor).
23
+ *
24
+ * @returns The workspace state as signals and the layout actions.
25
+ */
26
+ export declare function useWorkspace(): {
27
+ /** The current panel layout. */
28
+ readonly layout: Signal<WorkspaceState['layout']>;
29
+ /** The active panel id, or `null`. */
30
+ readonly activePanel: Signal<WorkspaceState['activePanel']>;
31
+ /** The collapsed panel ids. */
32
+ readonly collapsedPanels: Signal<WorkspaceState['collapsedPanels']>;
33
+ /**
34
+ * Shows or hides one panel.
35
+ *
36
+ * @param panelId - The panel to toggle.
37
+ */
38
+ togglePanel: (panelId: PanelId) => void;
39
+ /**
40
+ * Rewrites one panel's size.
41
+ *
42
+ * @param panelId - The panel to resize.
43
+ * @param size - The new size.
44
+ */
45
+ resizePanel: (panelId: PanelId, size: number) => void;
46
+ /**
47
+ * Sets the active panel.
48
+ *
49
+ * @param panelId - The panel to activate.
50
+ */
51
+ setActivePanel: (panelId: PanelId) => void;
52
+ /** Restores the default layout. */
53
+ resetLayout: () => void;
54
+ };
55
+ /**
56
+ * The editor provider registered by `provideMolecule({ editor })` or
57
+ * `provideEditor`. Call it in an injection context.
58
+ *
59
+ * @returns The editor provider.
60
+ * @throws {Error} When no editor provider is registered.
61
+ */
62
+ export declare function useEditorProvider(): EditorProvider;
63
+ /**
64
+ * What {@link useEditor} returns: the tab list and active file as signals and
65
+ * every editor action as a plain function.
66
+ */
67
+ export interface UseEditorResult {
68
+ /** The provider's tab list. */
69
+ readonly tabs: Signal<EditorTab[]>;
70
+ /** The path of the active tab, or `null` when no tab is active. */
71
+ readonly activeFile: Signal<string | null>;
72
+ /**
73
+ * Opens a file (and makes it active).
74
+ *
75
+ * @param file - The file to open.
76
+ */
77
+ openFile: (file: EditorFile) => void;
78
+ /**
79
+ * Closes a file's tab.
80
+ *
81
+ * @param path - The path to close.
82
+ */
83
+ closeFile: (path: string) => void;
84
+ /**
85
+ * Reads the active tab's content.
86
+ *
87
+ * @returns The content, or `null` with no active tab.
88
+ */
89
+ getContent: () => string | null;
90
+ /**
91
+ * Writes one tab's content.
92
+ *
93
+ * @param path - The tab's path.
94
+ * @param content - The new content.
95
+ */
96
+ setContent: (path: string, content: string) => void;
97
+ /**
98
+ * Activates one tab.
99
+ *
100
+ * @param path - The tab to activate.
101
+ */
102
+ setActiveTab: (path: string) => void;
103
+ /**
104
+ * Mounts the editor into an element.
105
+ *
106
+ * @param element - The host element.
107
+ * @param config - The editor config.
108
+ * @returns Whatever the provider's mount returns.
109
+ */
110
+ mount: (...args: Parameters<EditorProvider['mount']>) => ReturnType<EditorProvider['mount']>;
111
+ /** Disposes the editor. */
112
+ dispose: () => void;
113
+ /** Focuses the editor. */
114
+ focus: () => void;
115
+ /**
116
+ * Opens a diff tab.
117
+ *
118
+ * @param file - The diff to show.
119
+ */
120
+ openDiff: (file: DiffFile) => void;
121
+ /** Closes the diff tab. */
122
+ closeDiff: () => void;
123
+ /**
124
+ * Converts a preview tab into a normal one.
125
+ *
126
+ * @param path - The tab to pin.
127
+ */
128
+ pinTab: (path: string) => void;
129
+ /**
130
+ * Adds a type definition file to the editor's language service.
131
+ *
132
+ * @param content - The declaration content.
133
+ * @param filePath - The virtual file path.
134
+ */
135
+ addExtraLib: (content: string, filePath: string) => void;
136
+ /**
137
+ * Subscribes to fix-with-AI requests.
138
+ *
139
+ * @param callback - Called for every request.
140
+ * @returns A function that removes the subscription.
141
+ */
142
+ onFixWithAI: (callback: (request: FixWithAIRequest) => void) => () => void;
143
+ }
144
+ /**
145
+ * Code editor management. Call it in an injection context (a component field
146
+ * initializer or constructor).
147
+ *
148
+ * `tabs` and `activeFile` always come from the provider's own tab list:
149
+ * `activeFile` is the path of the tab marked `isActive`, or `null` when no
150
+ * tab is. They are read at mount (tabs opened before the component mounted
151
+ * show at once), on every provider change event, and after each action that
152
+ * changes the tab list (`openFile`, `closeFile`, `setActiveTab`, `openDiff`,
153
+ * `closeDiff`, `pinTab`).
154
+ *
155
+ * @returns Editor state as signals and the editor actions.
156
+ */
157
+ export declare function useEditor(): UseEditorResult;
158
+ /**
159
+ * The preview provider registered by `provideMolecule({ preview })` or
160
+ * `providePreview`. Call it in an injection context.
161
+ *
162
+ * @returns The preview provider.
163
+ * @throws {Error} When no preview provider is registered.
164
+ */
165
+ export declare function usePreviewProvider(): PreviewProvider;
166
+ /**
167
+ * What {@link usePreview} returns: the preview state as a signal and every
168
+ * preview action as a plain function.
169
+ */
170
+ export interface UsePreviewResult {
171
+ /** The preview state (url, device, connection, history flags). */
172
+ readonly state: Signal<PreviewState>;
173
+ /**
174
+ * Loads a new document.
175
+ *
176
+ * @param url - The url to load.
177
+ */
178
+ setUrl: (url: string) => void;
179
+ /** Reloads the current document. */
180
+ refresh: () => void;
181
+ /**
182
+ * Switches the device frame.
183
+ *
184
+ * @param device - The device frame to show.
185
+ */
186
+ setDevice: (device: DeviceFrame) => void;
187
+ /** Opens the current url outside the preview. */
188
+ openExternal: () => void;
189
+ /**
190
+ * Records an in-app navigation without reloading.
191
+ *
192
+ * @param url - The displayed url.
193
+ * @param isReplace - Whether the current history entry is replaced.
194
+ */
195
+ recordNavigation: (url: string, isReplace?: boolean) => void;
196
+ /** Goes back one navigation entry. */
197
+ back: () => void;
198
+ /** Goes forward one navigation entry. */
199
+ forward: () => void;
200
+ }
201
+ /**
202
+ * Live preview management. Call it in an injection context (a component field
203
+ * initializer or constructor).
204
+ *
205
+ * @returns The preview state as a signal and the preview actions.
206
+ */
207
+ export declare function usePreview(): UsePreviewResult;
208
+ //# sourceMappingURL=use-ide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-ide.d.ts","sourceRoot":"","sources":["../../src/hooks/use-ide.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAgC,KAAK,MAAM,EAAU,MAAM,eAAe,CAAA;AAEjF,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAM5F;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CAMxD;AAED;;;;;GAKG;AAC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