alepha 0.9.4 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +93 -93
- package/batch.d.ts +489 -13
- package/bucket.d.ts +446 -9
- package/cache.d.ts +132 -1
- package/command.d.ts +2 -0
- package/core.d.ts +101 -53
- package/email.cjs +8 -0
- package/email.d.ts +246 -0
- package/email.js +1 -0
- package/lock.d.ts +412 -23
- package/logger.d.ts +42 -37
- package/package.json +50 -43
- package/postgres.d.ts +1670 -108
- package/queue.d.ts +651 -2
- package/react/auth.d.ts +109 -112
- package/react/form.d.ts +11 -4
- package/react/head.d.ts +1 -1
- package/react/i18n.d.ts +5 -2
- package/react.d.ts +219 -174
- package/redis.d.ts +6 -6
- package/router.d.ts +1 -0
- package/security.d.ts +5 -5
- package/server/links.d.ts +40 -29
- package/server/proxy.d.ts +192 -0
- package/server.d.ts +601 -29
- package/topic.d.ts +803 -11
- package/vite.d.ts +8 -4
package/react/auth.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _alepha_core4 from "alepha";
|
|
2
2
|
import { Alepha, AlephaError, Async, Descriptor, KIND, Static } from "alepha";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _alepha_server_cookies0 from "alepha/server/cookies";
|
|
4
4
|
import { Cookies, ServerCookiesProvider } from "alepha/server/cookies";
|
|
5
5
|
import { DateTimeProvider } from "alepha/datetime";
|
|
6
6
|
import { AccessTokenResponse, RealmDescriptor, SecurityProvider, UserAccount, UserAccountToken } from "alepha/security";
|
|
@@ -8,22 +8,22 @@ import { Configuration } from "openid-client";
|
|
|
8
8
|
import * as _alepha_logger0 from "alepha/logger";
|
|
9
9
|
import * as _alepha_server0 from "alepha/server";
|
|
10
10
|
import { HttpClient } from "alepha/server";
|
|
11
|
-
import { HttpVirtualClient,
|
|
12
|
-
import * as
|
|
11
|
+
import { HttpVirtualClient, ServerLinksProvider } from "alepha/server/links";
|
|
12
|
+
import * as _sinclair_typebox155 from "@sinclair/typebox";
|
|
13
13
|
|
|
14
14
|
//#region src/schemas/tokensSchema.d.ts
|
|
15
|
-
declare const tokensSchema:
|
|
16
|
-
provider:
|
|
17
|
-
access_token:
|
|
18
|
-
issued_at:
|
|
19
|
-
expires_in:
|
|
20
|
-
refresh_token:
|
|
21
|
-
refresh_token_expires_in:
|
|
22
|
-
refresh_expires_in:
|
|
23
|
-
id_token:
|
|
24
|
-
scope:
|
|
25
|
-
token:
|
|
26
|
-
realm:
|
|
15
|
+
declare const tokensSchema: _sinclair_typebox155.TObject<{
|
|
16
|
+
provider: _sinclair_typebox155.TString;
|
|
17
|
+
access_token: _sinclair_typebox155.TString;
|
|
18
|
+
issued_at: _sinclair_typebox155.TNumber;
|
|
19
|
+
expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
20
|
+
refresh_token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
21
|
+
refresh_token_expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
22
|
+
refresh_expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
23
|
+
id_token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
24
|
+
scope: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
25
|
+
token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
26
|
+
realm: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
27
27
|
}>;
|
|
28
28
|
type Tokens = Static<typeof tokensSchema>;
|
|
29
29
|
//#endregion
|
|
@@ -34,7 +34,6 @@ type Tokens = Static<typeof tokensSchema>;
|
|
|
34
34
|
declare class ReactAuth {
|
|
35
35
|
protected readonly log: _alepha_logger0.Logger;
|
|
36
36
|
protected readonly alepha: Alepha;
|
|
37
|
-
protected readonly linkProvider: LinkProvider;
|
|
38
37
|
protected readonly httpClient: HttpClient;
|
|
39
38
|
static path: {
|
|
40
39
|
login: string;
|
|
@@ -45,7 +44,6 @@ declare class ReactAuth {
|
|
|
45
44
|
userinfo: string;
|
|
46
45
|
};
|
|
47
46
|
protected readonly onBeginTransition: _alepha_core4.HookDescriptor<"react:transition:begin">;
|
|
48
|
-
csrfCookie: _alepha_server_cookies1.AbstractCookieDescriptor<_sinclair_typebox156.TString>;
|
|
49
47
|
protected readonly onFetchRequest: _alepha_core4.HookDescriptor<"client:onRequest">;
|
|
50
48
|
get user(): UserAccountToken | undefined;
|
|
51
49
|
ping(): Promise<{
|
|
@@ -76,25 +74,25 @@ declare class ReactAuthProvider {
|
|
|
76
74
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
77
75
|
protected readonly serverLinksProvider: ServerLinksProvider;
|
|
78
76
|
protected readonly reactAuth: ReactAuth;
|
|
79
|
-
protected readonly authorizationCode:
|
|
80
|
-
provider:
|
|
81
|
-
codeVerifier:
|
|
82
|
-
redirectUri:
|
|
83
|
-
state:
|
|
84
|
-
nonce:
|
|
77
|
+
protected readonly authorizationCode: _alepha_server_cookies0.AbstractCookieDescriptor<_sinclair_typebox155.TObject<{
|
|
78
|
+
provider: _sinclair_typebox155.TString;
|
|
79
|
+
codeVerifier: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
80
|
+
redirectUri: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
81
|
+
state: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
82
|
+
nonce: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
85
83
|
}>>;
|
|
86
|
-
readonly tokens:
|
|
87
|
-
provider:
|
|
88
|
-
access_token:
|
|
89
|
-
issued_at:
|
|
90
|
-
expires_in:
|
|
91
|
-
refresh_token:
|
|
92
|
-
refresh_token_expires_in:
|
|
93
|
-
refresh_expires_in:
|
|
94
|
-
id_token:
|
|
95
|
-
scope:
|
|
96
|
-
token:
|
|
97
|
-
realm:
|
|
84
|
+
readonly tokens: _alepha_server_cookies0.AbstractCookieDescriptor<_sinclair_typebox155.TObject<{
|
|
85
|
+
provider: _sinclair_typebox155.TString;
|
|
86
|
+
access_token: _sinclair_typebox155.TString;
|
|
87
|
+
issued_at: _sinclair_typebox155.TNumber;
|
|
88
|
+
expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
89
|
+
refresh_token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
90
|
+
refresh_token_expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
91
|
+
refresh_expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
92
|
+
id_token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
93
|
+
scope: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
94
|
+
token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
95
|
+
realm: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
98
96
|
}>>;
|
|
99
97
|
readonly onRender: _alepha_core4.HookDescriptor<"react:server:render:begin">;
|
|
100
98
|
get identities(): Array<AuthDescriptor>;
|
|
@@ -109,32 +107,31 @@ declare class ReactAuthProvider {
|
|
|
109
107
|
* If the tokens are expired, try to refresh them using the refresh token.
|
|
110
108
|
*/
|
|
111
109
|
protected cookiesToTokens(cookies: Cookies): Promise<Tokens | undefined>;
|
|
112
|
-
protected checkCsrf(cookies: Cookies, csrfHeader: string): Promise<void>;
|
|
113
110
|
protected refreshTokens(tokens: Tokens): Promise<Tokens | undefined>;
|
|
114
111
|
/**
|
|
115
112
|
* Get user information.
|
|
116
113
|
*/
|
|
117
114
|
readonly userinfo: _alepha_server0.RouteDescriptor<{
|
|
118
|
-
response:
|
|
119
|
-
user:
|
|
120
|
-
id:
|
|
121
|
-
name:
|
|
122
|
-
email:
|
|
123
|
-
username:
|
|
124
|
-
picture:
|
|
125
|
-
sessionId:
|
|
126
|
-
organizations:
|
|
127
|
-
roles:
|
|
115
|
+
response: _sinclair_typebox155.TObject<{
|
|
116
|
+
user: _sinclair_typebox155.TOptional<_sinclair_typebox155.TObject<{
|
|
117
|
+
id: _sinclair_typebox155.TString;
|
|
118
|
+
name: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
119
|
+
email: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
120
|
+
username: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
121
|
+
picture: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
122
|
+
sessionId: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
123
|
+
organizations: _sinclair_typebox155.TOptional<_sinclair_typebox155.TArray<_sinclair_typebox155.TString>>;
|
|
124
|
+
roles: _sinclair_typebox155.TOptional<_sinclair_typebox155.TArray<_sinclair_typebox155.TString>>;
|
|
128
125
|
}>>;
|
|
129
|
-
api:
|
|
130
|
-
prefix:
|
|
131
|
-
links:
|
|
132
|
-
name:
|
|
133
|
-
group:
|
|
134
|
-
path:
|
|
135
|
-
method:
|
|
136
|
-
requestBodyType:
|
|
137
|
-
service:
|
|
126
|
+
api: _sinclair_typebox155.TObject<{
|
|
127
|
+
prefix: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
128
|
+
links: _sinclair_typebox155.TArray<_sinclair_typebox155.TObject<{
|
|
129
|
+
name: _sinclair_typebox155.TString;
|
|
130
|
+
group: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
131
|
+
path: _sinclair_typebox155.TString;
|
|
132
|
+
method: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
133
|
+
requestBodyType: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
134
|
+
service: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
138
135
|
}>>;
|
|
139
136
|
}>;
|
|
140
137
|
}>;
|
|
@@ -143,69 +140,69 @@ declare class ReactAuthProvider {
|
|
|
143
140
|
* Refresh a token for internal providers.
|
|
144
141
|
*/
|
|
145
142
|
readonly refresh: _alepha_server0.RouteDescriptor<{
|
|
146
|
-
query:
|
|
147
|
-
provider:
|
|
143
|
+
query: _sinclair_typebox155.TObject<{
|
|
144
|
+
provider: _sinclair_typebox155.TString;
|
|
148
145
|
}>;
|
|
149
|
-
body:
|
|
150
|
-
refresh_token:
|
|
151
|
-
access_token:
|
|
146
|
+
body: _sinclair_typebox155.TObject<{
|
|
147
|
+
refresh_token: _sinclair_typebox155.TString;
|
|
148
|
+
access_token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
152
149
|
}>;
|
|
153
|
-
response:
|
|
154
|
-
provider:
|
|
155
|
-
access_token:
|
|
156
|
-
issued_at:
|
|
157
|
-
expires_in:
|
|
158
|
-
refresh_token:
|
|
159
|
-
refresh_token_expires_in:
|
|
160
|
-
refresh_expires_in:
|
|
161
|
-
id_token:
|
|
162
|
-
scope:
|
|
163
|
-
token:
|
|
164
|
-
realm:
|
|
150
|
+
response: _sinclair_typebox155.TObject<{
|
|
151
|
+
provider: _sinclair_typebox155.TString;
|
|
152
|
+
access_token: _sinclair_typebox155.TString;
|
|
153
|
+
issued_at: _sinclair_typebox155.TNumber;
|
|
154
|
+
expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
155
|
+
refresh_token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
156
|
+
refresh_token_expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
157
|
+
refresh_expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
158
|
+
id_token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
159
|
+
scope: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
160
|
+
token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
161
|
+
realm: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
165
162
|
}>;
|
|
166
163
|
}>;
|
|
167
164
|
/**
|
|
168
165
|
* Login for local password-based authentication.
|
|
169
166
|
*/
|
|
170
167
|
readonly token: _alepha_server0.RouteDescriptor<{
|
|
171
|
-
query:
|
|
172
|
-
provider:
|
|
168
|
+
query: _sinclair_typebox155.TObject<{
|
|
169
|
+
provider: _sinclair_typebox155.TString;
|
|
173
170
|
}>;
|
|
174
|
-
body:
|
|
175
|
-
username:
|
|
176
|
-
password:
|
|
171
|
+
body: _sinclair_typebox155.TObject<{
|
|
172
|
+
username: _sinclair_typebox155.TString;
|
|
173
|
+
password: _sinclair_typebox155.TString;
|
|
177
174
|
}>;
|
|
178
|
-
response:
|
|
179
|
-
provider:
|
|
180
|
-
access_token:
|
|
181
|
-
issued_at:
|
|
182
|
-
expires_in:
|
|
183
|
-
refresh_token:
|
|
184
|
-
refresh_token_expires_in:
|
|
185
|
-
refresh_expires_in:
|
|
186
|
-
id_token:
|
|
187
|
-
scope:
|
|
188
|
-
token:
|
|
189
|
-
realm:
|
|
190
|
-
user:
|
|
191
|
-
id:
|
|
192
|
-
name:
|
|
193
|
-
email:
|
|
194
|
-
username:
|
|
195
|
-
picture:
|
|
196
|
-
sessionId:
|
|
197
|
-
organizations:
|
|
198
|
-
roles:
|
|
175
|
+
response: _sinclair_typebox155.TObject<{
|
|
176
|
+
provider: _sinclair_typebox155.TString;
|
|
177
|
+
access_token: _sinclair_typebox155.TString;
|
|
178
|
+
issued_at: _sinclair_typebox155.TNumber;
|
|
179
|
+
expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
180
|
+
refresh_token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
181
|
+
refresh_token_expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
182
|
+
refresh_expires_in: _sinclair_typebox155.TOptional<_sinclair_typebox155.TNumber>;
|
|
183
|
+
id_token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
184
|
+
scope: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
185
|
+
token: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
186
|
+
realm: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
187
|
+
user: _sinclair_typebox155.TObject<{
|
|
188
|
+
id: _sinclair_typebox155.TString;
|
|
189
|
+
name: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
190
|
+
email: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
191
|
+
username: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
192
|
+
picture: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
193
|
+
sessionId: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
194
|
+
organizations: _sinclair_typebox155.TOptional<_sinclair_typebox155.TArray<_sinclair_typebox155.TString>>;
|
|
195
|
+
roles: _sinclair_typebox155.TOptional<_sinclair_typebox155.TArray<_sinclair_typebox155.TString>>;
|
|
199
196
|
}>;
|
|
200
|
-
api:
|
|
201
|
-
prefix:
|
|
202
|
-
links:
|
|
203
|
-
name:
|
|
204
|
-
group:
|
|
205
|
-
path:
|
|
206
|
-
method:
|
|
207
|
-
requestBodyType:
|
|
208
|
-
service:
|
|
197
|
+
api: _sinclair_typebox155.TObject<{
|
|
198
|
+
prefix: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
199
|
+
links: _sinclair_typebox155.TArray<_sinclair_typebox155.TObject<{
|
|
200
|
+
name: _sinclair_typebox155.TString;
|
|
201
|
+
group: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
202
|
+
path: _sinclair_typebox155.TString;
|
|
203
|
+
method: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
204
|
+
requestBodyType: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
205
|
+
service: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
209
206
|
}>>;
|
|
210
207
|
}>;
|
|
211
208
|
}>;
|
|
@@ -214,9 +211,9 @@ declare class ReactAuthProvider {
|
|
|
214
211
|
* Oauth2/OIDC login route.
|
|
215
212
|
*/
|
|
216
213
|
readonly login: _alepha_server0.RouteDescriptor<{
|
|
217
|
-
query:
|
|
218
|
-
provider:
|
|
219
|
-
redirect_uri:
|
|
214
|
+
query: _sinclair_typebox155.TObject<{
|
|
215
|
+
provider: _sinclair_typebox155.TString;
|
|
216
|
+
redirect_uri: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
220
217
|
}>;
|
|
221
218
|
}>;
|
|
222
219
|
/**
|
|
@@ -228,8 +225,8 @@ declare class ReactAuthProvider {
|
|
|
228
225
|
* Logout route for OAuth2/OIDC providers.
|
|
229
226
|
*/
|
|
230
227
|
readonly logout: _alepha_server0.RouteDescriptor<{
|
|
231
|
-
query:
|
|
232
|
-
post_logout_redirect_uri:
|
|
228
|
+
query: _sinclair_typebox155.TObject<{
|
|
229
|
+
post_logout_redirect_uri: _sinclair_typebox155.TOptional<_sinclair_typebox155.TString>;
|
|
233
230
|
}>;
|
|
234
231
|
}>;
|
|
235
232
|
protected provider(opts: string | {
|
package/react/form.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare class FormModel<T extends TObject> {
|
|
|
19
19
|
parent: string;
|
|
20
20
|
store: Record<string, any>;
|
|
21
21
|
}): SchemaToInput<T>;
|
|
22
|
-
protected createInputFromSchema<T extends TObject>(name: keyof Static<T> & string, options: FormCtrlOptions<T>, schema: TSchema, context: {
|
|
22
|
+
protected createInputFromSchema<T extends TObject>(name: keyof Static<T> & string, options: FormCtrlOptions<T>, schema: TSchema, required: boolean, context: {
|
|
23
23
|
parent: string;
|
|
24
24
|
store: Record<string, any>;
|
|
25
25
|
}): InputField;
|
|
@@ -28,15 +28,17 @@ declare class FormModel<T extends TObject> {
|
|
|
28
28
|
}
|
|
29
29
|
type SchemaToInput<T extends TObject> = { [K in keyof T["properties"]]: T["properties"][K] extends TObject ? SchemaToInput<T["properties"][K]> : InputField };
|
|
30
30
|
interface FormEventLike {
|
|
31
|
-
currentTarget:
|
|
31
|
+
currentTarget: any;
|
|
32
32
|
preventDefault: () => void;
|
|
33
33
|
stopPropagation: () => void;
|
|
34
34
|
}
|
|
35
35
|
interface InputField {
|
|
36
36
|
path: string;
|
|
37
|
+
required: boolean;
|
|
37
38
|
props: InputHTMLAttributesLike;
|
|
38
39
|
schema: TSchema;
|
|
39
40
|
set: (value: any) => void;
|
|
41
|
+
form: FormModel<any>;
|
|
40
42
|
}
|
|
41
43
|
type InputHTMLAttributesLike = Pick<InputHTMLAttributes<unknown>, "id" | "name" | "type" | "value" | "defaultValue" | "required" | "maxLength" | "minLength" | "aria-label"> & {
|
|
42
44
|
value?: any;
|
|
@@ -127,13 +129,18 @@ interface UseFormStateReturn<T extends TObject> {
|
|
|
127
129
|
values?: T;
|
|
128
130
|
error?: Error;
|
|
129
131
|
}
|
|
130
|
-
|
|
132
|
+
type FormStateEvent = "change" | "submit" | "error";
|
|
133
|
+
declare const useFormState: <T extends TObject>(target: FormModel<T> | {
|
|
134
|
+
form: FormModel<T>;
|
|
135
|
+
path: string;
|
|
136
|
+
}, events?: FormStateEvent[]) => UseFormStateReturn<T>;
|
|
131
137
|
//#endregion
|
|
132
138
|
//#region src/index.d.ts
|
|
133
139
|
declare module "alepha" {
|
|
134
140
|
interface Hooks {
|
|
135
141
|
"form:change": {
|
|
136
142
|
id: string;
|
|
143
|
+
path: string;
|
|
137
144
|
};
|
|
138
145
|
"form:submit:begin": {
|
|
139
146
|
id: string;
|
|
@@ -163,5 +170,5 @@ declare module "alepha" {
|
|
|
163
170
|
*/
|
|
164
171
|
declare const AlephaReactForm: _alepha_core0.Service<_alepha_core0.Module>;
|
|
165
172
|
//#endregion
|
|
166
|
-
export { AlephaReactForm, FormCtrlOptions, FormEventLike, FormModel, FormState, InputField, InputHTMLAttributesLike, SchemaToInput, UseFormStateReturn, useForm, useFormState };
|
|
173
|
+
export { AlephaReactForm, FormCtrlOptions, FormEventLike, FormModel, FormState, FormStateEvent, InputField, InputHTMLAttributesLike, SchemaToInput, UseFormStateReturn, useForm, useFormState };
|
|
167
174
|
//# sourceMappingURL=index.d.ts.map
|
package/react/head.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ declare class HeadDescriptor extends Descriptor<HeadDescriptorOptions> {
|
|
|
84
84
|
* }
|
|
85
85
|
* ```
|
|
86
86
|
*/
|
|
87
|
-
declare const useHead: (options?: UseHeadOptions) =>
|
|
87
|
+
declare const useHead: (options?: UseHeadOptions) => UseHeadReturn;
|
|
88
88
|
type UseHeadOptions = Head | ((previous?: Head) => Head);
|
|
89
89
|
type UseHeadReturn = [Head, (head?: Head | ((previous?: Head) => Head)) => void];
|
|
90
90
|
//#endregion
|
package/react/i18n.d.ts
CHANGED
|
@@ -36,7 +36,10 @@ declare class I18nProvider<S extends object, K extends keyof ServiceDictionary<S
|
|
|
36
36
|
protected readonly mutate: _alepha_core1.HookDescriptor<"state:mutate">;
|
|
37
37
|
get lang(): string;
|
|
38
38
|
translate: (key: string, args?: string[]) => string;
|
|
39
|
-
readonly tr: (key: keyof ServiceDictionary<S>[K] | string,
|
|
39
|
+
readonly tr: (key: keyof ServiceDictionary<S>[K] | string, options?: {
|
|
40
|
+
args?: string[];
|
|
41
|
+
default?: string;
|
|
42
|
+
}) => string;
|
|
40
43
|
protected render(item: string, args: string[]): string;
|
|
41
44
|
}
|
|
42
45
|
//#endregion
|
|
@@ -49,7 +52,7 @@ declare class I18nProvider<S extends object, K extends keyof ServiceDictionary<S
|
|
|
49
52
|
*
|
|
50
53
|
* @example
|
|
51
54
|
* ```ts
|
|
52
|
-
* import { $dictionary } from "alepha/react
|
|
55
|
+
* import { $dictionary } from "alepha/react-i18n";
|
|
53
56
|
*
|
|
54
57
|
* const Example = () => {
|
|
55
58
|
* const { tr } = useI18n<App, "en">();
|