@kerne/react 0.1.1 → 0.1.3

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.
@@ -0,0 +1,257 @@
1
+ interface KerneLocalization {
2
+ common: {
3
+ email: string;
4
+ emailPlaceholder: string;
5
+ password: string;
6
+ passwordPlaceholder: string;
7
+ name: string;
8
+ namePlaceholder: string;
9
+ cancel: string;
10
+ continue: string;
11
+ or: string;
12
+ /** Fallback for the tenant's app name when the config carries none. */
13
+ thisApp: string;
14
+ backToSignIn: string;
15
+ sending: string;
16
+ continueWith: string;
17
+ securedByKerne: string;
18
+ loading: string;
19
+ showPassword: string;
20
+ hidePassword: string;
21
+ capsLockOn: string;
22
+ /**
23
+ * The tenant's password rules, stated before the server can reject them.
24
+ * Only the rules that tenant actually enforces are rendered.
25
+ */
26
+ passwordHint: string;
27
+ passwordRequireUppercase: string;
28
+ passwordRequireNumber: string;
29
+ passwordRequireSymbol: string;
30
+ strengthLabel: string;
31
+ strengthWeak: string;
32
+ strengthFair: string;
33
+ strengthGood: string;
34
+ strengthStrong: string;
35
+ };
36
+ signIn: {
37
+ title: string;
38
+ signUpPrompt: string;
39
+ signUpLink: string;
40
+ signUpForApp: string;
41
+ submit: string;
42
+ submitting: string;
43
+ magicSubmit: string;
44
+ magicSubmitting: string;
45
+ magicSubtitle: string;
46
+ forgotPassword: string;
47
+ useMagicLink: string;
48
+ usePassword: string;
49
+ linkSent: string;
50
+ unavailable: string;
51
+ loadFailed: string;
52
+ };
53
+ signUp: {
54
+ title: string;
55
+ titleWithApp: string;
56
+ signInPrompt: string;
57
+ signInLink: string;
58
+ submit: string;
59
+ submitting: string;
60
+ magicSubmit: string;
61
+ magicSubmitting: string;
62
+ invitationCode: string;
63
+ invitationNeeded: string;
64
+ closedTitle: string;
65
+ closedBody: string;
66
+ linkSent: string;
67
+ useMagicLink: string;
68
+ usePassword: string;
69
+ unavailable: string;
70
+ loadFailed: string;
71
+ };
72
+ resetPassword: {
73
+ requestTitle: string;
74
+ requestSubtitle: string;
75
+ requestSubmit: string;
76
+ requestSubmitting: string;
77
+ requestSent: string;
78
+ rememberedPrompt: string;
79
+ title: string;
80
+ subtitle: string;
81
+ newPassword: string;
82
+ confirmPassword: string;
83
+ mismatch: string;
84
+ submit: string;
85
+ submitting: string;
86
+ doneTitle: string;
87
+ doneBody: string;
88
+ incompleteTitle: string;
89
+ incompleteBody: string;
90
+ };
91
+ magicLink: {
92
+ pendingTitle: string;
93
+ pendingBody: string;
94
+ doneTitle: string;
95
+ doneBody: string;
96
+ failedTitle: string;
97
+ missingToken: string;
98
+ };
99
+ verifyEmail: {
100
+ title: string;
101
+ subtitle: string;
102
+ code: string;
103
+ submit: string;
104
+ submitting: string;
105
+ resend: string;
106
+ resent: string;
107
+ verifyingTitle: string;
108
+ verifyingBody: string;
109
+ doneTitle: string;
110
+ doneBody: string;
111
+ failedTitle: string;
112
+ newCode: string;
113
+ };
114
+ activate: {
115
+ title: string;
116
+ credentialsSubtitle: string;
117
+ magicSubtitle: string;
118
+ confirmPassword: string;
119
+ mismatch: string;
120
+ submit: string;
121
+ submitting: string;
122
+ failedTitle: string;
123
+ missingToken: string;
124
+ goToSignIn: string;
125
+ };
126
+ waitlist: {
127
+ title: string;
128
+ subtitle: string;
129
+ submit: string;
130
+ submitting: string;
131
+ joined: string;
132
+ };
133
+ profile: {
134
+ navLabel: string;
135
+ tabProfile: string;
136
+ tabSecurity: string;
137
+ tabBilling: string;
138
+ profileTitle: string;
139
+ profileDesc: string;
140
+ securityTitle: string;
141
+ securityDesc: string;
142
+ billingTitle: string;
143
+ billingDesc: string;
144
+ firstName: string;
145
+ firstNamePlaceholder: string;
146
+ lastName: string;
147
+ lastNamePlaceholder: string;
148
+ save: string;
149
+ saving: string;
150
+ saved: string;
151
+ emailSectionTitle: string;
152
+ emailSectionDesc: string;
153
+ verified: string;
154
+ unverified: string;
155
+ verify: string;
156
+ verificationSent: string;
157
+ unnamed: string;
158
+ };
159
+ security: {
160
+ passwordTitle: string;
161
+ passwordDesc: string;
162
+ currentPassword: string;
163
+ newPassword: string;
164
+ confirmPassword: string;
165
+ submit: string;
166
+ submitting: string;
167
+ changed: string;
168
+ mismatch: string;
169
+ sameAsCurrent: string;
170
+ deleteTitle: string;
171
+ deleteDesc: string;
172
+ deleteAction: string;
173
+ deleteConfirm: string;
174
+ deleting: string;
175
+ };
176
+ billing: {
177
+ currentPlan: string;
178
+ plan: string;
179
+ price: string;
180
+ status: string;
181
+ renews: string;
182
+ ends: string;
183
+ trialEnds: string;
184
+ managePortal: string;
185
+ opening: string;
186
+ freePlan: string;
187
+ seePlans: string;
188
+ cancelNotice: string;
189
+ changePlan: string;
190
+ current: string;
191
+ switchTo: string;
192
+ noPlans: string;
193
+ notOnInterval: string;
194
+ loadFailed: string;
195
+ loadingPlan: string;
196
+ loadingPlans: string;
197
+ intervalGroupLabel: string;
198
+ intervalMonth: string;
199
+ intervalYear: string;
200
+ intervalWeek: string;
201
+ intervalDay: string;
202
+ statusActive: string;
203
+ statusTrialing: string;
204
+ statusPastDue: string;
205
+ statusCanceled: string;
206
+ statusUnpaid: string;
207
+ statusPaused: string;
208
+ };
209
+ usage: {
210
+ title: string;
211
+ subtitle: string;
212
+ used: string;
213
+ nothingMetered: string;
214
+ overage: string;
215
+ limitReached: string;
216
+ loading: string;
217
+ loadFailed: string;
218
+ };
219
+ checkout: {
220
+ confirmingTitle: string;
221
+ confirmingBody: string;
222
+ pendingTitle: string;
223
+ pendingBody: string;
224
+ doneTitle: string;
225
+ doneBody: string;
226
+ cancelTitle: string;
227
+ cancelBody: string;
228
+ backToPlans: string;
229
+ };
230
+ upgrade: {
231
+ quotaTitle: string;
232
+ quotaBody: string;
233
+ featureTitle: string;
234
+ featureBody: string;
235
+ action: string;
236
+ checking: string;
237
+ };
238
+ account: {
239
+ menuLabel: string;
240
+ signOut: string;
241
+ };
242
+ /**
243
+ * Keyed by the API's stable ErrorCode (see packages/core/src/errors).
244
+ * Anything absent falls back to `generic` - never to the raw server message,
245
+ * which is written for an integrator and is always English.
246
+ */
247
+ errors: Record<string, string> & {
248
+ generic: string;
249
+ };
250
+ }
251
+ declare const defaultLocalization: KerneLocalization;
252
+ type DeepPartial<T> = {
253
+ [K in keyof T]?: Partial<T[K]>;
254
+ };
255
+ declare function useLocalization(): KerneLocalization;
256
+
257
+ export { type DeepPartial as D, type KerneLocalization as K, defaultLocalization as d, useLocalization as u };
@@ -0,0 +1,257 @@
1
+ interface KerneLocalization {
2
+ common: {
3
+ email: string;
4
+ emailPlaceholder: string;
5
+ password: string;
6
+ passwordPlaceholder: string;
7
+ name: string;
8
+ namePlaceholder: string;
9
+ cancel: string;
10
+ continue: string;
11
+ or: string;
12
+ /** Fallback for the tenant's app name when the config carries none. */
13
+ thisApp: string;
14
+ backToSignIn: string;
15
+ sending: string;
16
+ continueWith: string;
17
+ securedByKerne: string;
18
+ loading: string;
19
+ showPassword: string;
20
+ hidePassword: string;
21
+ capsLockOn: string;
22
+ /**
23
+ * The tenant's password rules, stated before the server can reject them.
24
+ * Only the rules that tenant actually enforces are rendered.
25
+ */
26
+ passwordHint: string;
27
+ passwordRequireUppercase: string;
28
+ passwordRequireNumber: string;
29
+ passwordRequireSymbol: string;
30
+ strengthLabel: string;
31
+ strengthWeak: string;
32
+ strengthFair: string;
33
+ strengthGood: string;
34
+ strengthStrong: string;
35
+ };
36
+ signIn: {
37
+ title: string;
38
+ signUpPrompt: string;
39
+ signUpLink: string;
40
+ signUpForApp: string;
41
+ submit: string;
42
+ submitting: string;
43
+ magicSubmit: string;
44
+ magicSubmitting: string;
45
+ magicSubtitle: string;
46
+ forgotPassword: string;
47
+ useMagicLink: string;
48
+ usePassword: string;
49
+ linkSent: string;
50
+ unavailable: string;
51
+ loadFailed: string;
52
+ };
53
+ signUp: {
54
+ title: string;
55
+ titleWithApp: string;
56
+ signInPrompt: string;
57
+ signInLink: string;
58
+ submit: string;
59
+ submitting: string;
60
+ magicSubmit: string;
61
+ magicSubmitting: string;
62
+ invitationCode: string;
63
+ invitationNeeded: string;
64
+ closedTitle: string;
65
+ closedBody: string;
66
+ linkSent: string;
67
+ useMagicLink: string;
68
+ usePassword: string;
69
+ unavailable: string;
70
+ loadFailed: string;
71
+ };
72
+ resetPassword: {
73
+ requestTitle: string;
74
+ requestSubtitle: string;
75
+ requestSubmit: string;
76
+ requestSubmitting: string;
77
+ requestSent: string;
78
+ rememberedPrompt: string;
79
+ title: string;
80
+ subtitle: string;
81
+ newPassword: string;
82
+ confirmPassword: string;
83
+ mismatch: string;
84
+ submit: string;
85
+ submitting: string;
86
+ doneTitle: string;
87
+ doneBody: string;
88
+ incompleteTitle: string;
89
+ incompleteBody: string;
90
+ };
91
+ magicLink: {
92
+ pendingTitle: string;
93
+ pendingBody: string;
94
+ doneTitle: string;
95
+ doneBody: string;
96
+ failedTitle: string;
97
+ missingToken: string;
98
+ };
99
+ verifyEmail: {
100
+ title: string;
101
+ subtitle: string;
102
+ code: string;
103
+ submit: string;
104
+ submitting: string;
105
+ resend: string;
106
+ resent: string;
107
+ verifyingTitle: string;
108
+ verifyingBody: string;
109
+ doneTitle: string;
110
+ doneBody: string;
111
+ failedTitle: string;
112
+ newCode: string;
113
+ };
114
+ activate: {
115
+ title: string;
116
+ credentialsSubtitle: string;
117
+ magicSubtitle: string;
118
+ confirmPassword: string;
119
+ mismatch: string;
120
+ submit: string;
121
+ submitting: string;
122
+ failedTitle: string;
123
+ missingToken: string;
124
+ goToSignIn: string;
125
+ };
126
+ waitlist: {
127
+ title: string;
128
+ subtitle: string;
129
+ submit: string;
130
+ submitting: string;
131
+ joined: string;
132
+ };
133
+ profile: {
134
+ navLabel: string;
135
+ tabProfile: string;
136
+ tabSecurity: string;
137
+ tabBilling: string;
138
+ profileTitle: string;
139
+ profileDesc: string;
140
+ securityTitle: string;
141
+ securityDesc: string;
142
+ billingTitle: string;
143
+ billingDesc: string;
144
+ firstName: string;
145
+ firstNamePlaceholder: string;
146
+ lastName: string;
147
+ lastNamePlaceholder: string;
148
+ save: string;
149
+ saving: string;
150
+ saved: string;
151
+ emailSectionTitle: string;
152
+ emailSectionDesc: string;
153
+ verified: string;
154
+ unverified: string;
155
+ verify: string;
156
+ verificationSent: string;
157
+ unnamed: string;
158
+ };
159
+ security: {
160
+ passwordTitle: string;
161
+ passwordDesc: string;
162
+ currentPassword: string;
163
+ newPassword: string;
164
+ confirmPassword: string;
165
+ submit: string;
166
+ submitting: string;
167
+ changed: string;
168
+ mismatch: string;
169
+ sameAsCurrent: string;
170
+ deleteTitle: string;
171
+ deleteDesc: string;
172
+ deleteAction: string;
173
+ deleteConfirm: string;
174
+ deleting: string;
175
+ };
176
+ billing: {
177
+ currentPlan: string;
178
+ plan: string;
179
+ price: string;
180
+ status: string;
181
+ renews: string;
182
+ ends: string;
183
+ trialEnds: string;
184
+ managePortal: string;
185
+ opening: string;
186
+ freePlan: string;
187
+ seePlans: string;
188
+ cancelNotice: string;
189
+ changePlan: string;
190
+ current: string;
191
+ switchTo: string;
192
+ noPlans: string;
193
+ notOnInterval: string;
194
+ loadFailed: string;
195
+ loadingPlan: string;
196
+ loadingPlans: string;
197
+ intervalGroupLabel: string;
198
+ intervalMonth: string;
199
+ intervalYear: string;
200
+ intervalWeek: string;
201
+ intervalDay: string;
202
+ statusActive: string;
203
+ statusTrialing: string;
204
+ statusPastDue: string;
205
+ statusCanceled: string;
206
+ statusUnpaid: string;
207
+ statusPaused: string;
208
+ };
209
+ usage: {
210
+ title: string;
211
+ subtitle: string;
212
+ used: string;
213
+ nothingMetered: string;
214
+ overage: string;
215
+ limitReached: string;
216
+ loading: string;
217
+ loadFailed: string;
218
+ };
219
+ checkout: {
220
+ confirmingTitle: string;
221
+ confirmingBody: string;
222
+ pendingTitle: string;
223
+ pendingBody: string;
224
+ doneTitle: string;
225
+ doneBody: string;
226
+ cancelTitle: string;
227
+ cancelBody: string;
228
+ backToPlans: string;
229
+ };
230
+ upgrade: {
231
+ quotaTitle: string;
232
+ quotaBody: string;
233
+ featureTitle: string;
234
+ featureBody: string;
235
+ action: string;
236
+ checking: string;
237
+ };
238
+ account: {
239
+ menuLabel: string;
240
+ signOut: string;
241
+ };
242
+ /**
243
+ * Keyed by the API's stable ErrorCode (see packages/core/src/errors).
244
+ * Anything absent falls back to `generic` - never to the raw server message,
245
+ * which is written for an integrator and is always English.
246
+ */
247
+ errors: Record<string, string> & {
248
+ generic: string;
249
+ };
250
+ }
251
+ declare const defaultLocalization: KerneLocalization;
252
+ type DeepPartial<T> = {
253
+ [K in keyof T]?: Partial<T[K]>;
254
+ };
255
+ declare function useLocalization(): KerneLocalization;
256
+
257
+ export { type DeepPartial as D, type KerneLocalization as K, defaultLocalization as d, useLocalization as u };