@donotdev/core 0.0.27 → 0.0.29
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/i18n/locales/eager/dndev_ar.json +29 -0
- package/i18n/locales/eager/dndev_da.json +29 -0
- package/i18n/locales/eager/dndev_de.json +29 -0
- package/i18n/locales/eager/dndev_en.json +179 -0
- package/i18n/locales/eager/dndev_es.json +29 -0
- package/i18n/locales/eager/dndev_fr.json +29 -0
- package/i18n/locales/eager/dndev_it.json +29 -0
- package/i18n/locales/eager/dndev_ja.json +29 -0
- package/i18n/locales/eager/dndev_ko.json +29 -0
- package/i18n/locales/eager/dndev_nl.json +29 -0
- package/i18n/locales/lazy/crud_ar.json +7 -1
- package/i18n/locales/lazy/crud_da.json +7 -1
- package/i18n/locales/lazy/crud_de.json +7 -1
- package/i18n/locales/lazy/crud_en.json +7 -1
- package/i18n/locales/lazy/crud_es.json +7 -1
- package/i18n/locales/lazy/crud_fr.json +7 -1
- package/i18n/locales/lazy/crud_it.json +7 -1
- package/i18n/locales/lazy/crud_ja.json +7 -1
- package/i18n/locales/lazy/crud_ko.json +7 -1
- package/i18n/locales/lazy/crud_nl.json +7 -1
- package/index.d.ts +5687 -5451
- package/index.js +40 -40
- package/next/index.d.ts +154 -154
- package/next/index.js +2 -2
- package/package.json +2 -2
- package/server.d.ts +6505 -6288
- package/server.js +1 -1
- package/vite/index.d.ts +154 -154
- package/vite/index.js +12 -12
package/vite/index.d.ts
CHANGED
|
@@ -1,159 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
type $MergeBy<T, K> = Omit<T, keyof K> & K;
|
|
4
|
-
|
|
5
|
-
type $PreservedValue<Value, Fallback> = [Value] extends [never] ? Fallback : Value;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* This interface can be augmented by users to add types to `i18next` default TypeOptions.
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* ```ts
|
|
12
|
-
* // i18next.d.ts
|
|
13
|
-
* import 'i18next';
|
|
14
|
-
* declare module 'i18next' {
|
|
15
|
-
* interface CustomTypeOptions {
|
|
16
|
-
* defaultNS: 'custom';
|
|
17
|
-
* returnNull: false;
|
|
18
|
-
* returnObjects: false;
|
|
19
|
-
* nsSeparator: ':';
|
|
20
|
-
* keySeparator: '.';
|
|
21
|
-
* compatibilityJSON: 'v4';
|
|
22
|
-
* allowObjectInHTMLChildren: false;
|
|
23
|
-
* resources: {
|
|
24
|
-
* custom: {
|
|
25
|
-
* foo: 'foo';
|
|
26
|
-
* };
|
|
27
|
-
* };
|
|
28
|
-
* }
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
interface CustomTypeOptions {}
|
|
33
|
-
|
|
34
|
-
type TypeOptions = $MergeBy<
|
|
35
|
-
{
|
|
36
|
-
/** @see {InitOptions.returnNull} */
|
|
37
|
-
returnNull: false;
|
|
38
|
-
|
|
39
|
-
/** @see {InitOptions.returnEmptyString} */
|
|
40
|
-
returnEmptyString: true;
|
|
41
|
-
|
|
42
|
-
/** @see {InitOptions.returnObjects} */
|
|
43
|
-
returnObjects: false;
|
|
44
|
-
|
|
45
|
-
/** @see {InitOptions.keySeparator} */
|
|
46
|
-
keySeparator: '.';
|
|
47
|
-
|
|
48
|
-
/** @see {InitOptions.nsSeparator} */
|
|
49
|
-
nsSeparator: ':';
|
|
50
|
-
|
|
51
|
-
/** @see {InitOptions.pluralSeparator} */
|
|
52
|
-
pluralSeparator: '_';
|
|
53
|
-
|
|
54
|
-
/** @see {InitOptions.contextSeparator} */
|
|
55
|
-
contextSeparator: '_';
|
|
56
|
-
|
|
57
|
-
/** @see {InitOptions.defaultNS} */
|
|
58
|
-
defaultNS: 'translation';
|
|
59
|
-
|
|
60
|
-
/** @see {InitOptions.fallbackNS} */
|
|
61
|
-
fallbackNS: false;
|
|
62
|
-
|
|
63
|
-
/** @see {InitOptions.compatibilityJSON} */
|
|
64
|
-
compatibilityJSON: 'v4';
|
|
65
|
-
|
|
66
|
-
/** @see {InitOptions.resources} */
|
|
67
|
-
resources: object;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Flag that allows HTML elements to receive objects. This is only useful for React applications
|
|
71
|
-
* where you pass objects to HTML elements so they can be replaced to their respective interpolation
|
|
72
|
-
* values (mostly with Trans component)
|
|
73
|
-
*/
|
|
74
|
-
allowObjectInHTMLChildren: false;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Flag that enables strict key checking even if a `defaultValue` has been provided.
|
|
78
|
-
* This ensures all calls of `t` function don't accidentally use implicitly missing keys.
|
|
79
|
-
*/
|
|
80
|
-
strictKeyChecks: false;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Prefix for interpolation
|
|
84
|
-
*/
|
|
85
|
-
interpolationPrefix: '{{';
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Suffix for interpolation
|
|
89
|
-
*/
|
|
90
|
-
interpolationSuffix: '}}';
|
|
91
|
-
|
|
92
|
-
/** @see {InterpolationOptions.unescapePrefix} */
|
|
93
|
-
unescapePrefix: '-';
|
|
94
|
-
|
|
95
|
-
/** @see {InterpolationOptions.unescapeSuffix} */
|
|
96
|
-
unescapeSuffix: '';
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Use a proxy-based selector to select a translation.
|
|
100
|
-
*
|
|
101
|
-
* Enables features like go-to definition, and better DX/faster autocompletion
|
|
102
|
-
* for TypeScript developers.
|
|
103
|
-
*
|
|
104
|
-
* If you're working with an especially large set of translations and aren't
|
|
105
|
-
* using context, you set `enableSelector` to `"optimize"` and i18next won't do
|
|
106
|
-
* any type-level processing of your translations at all.
|
|
107
|
-
*
|
|
108
|
-
* With `enableSelector` set to `"optimize"`, i18next is capable of supporting
|
|
109
|
-
* arbitrarily large/deep translation sets without causing any IDE slowdown
|
|
110
|
-
* whatsoever.
|
|
111
|
-
*
|
|
112
|
-
* @default false
|
|
113
|
-
*/
|
|
114
|
-
enableSelector: false;
|
|
115
|
-
},
|
|
116
|
-
CustomTypeOptions
|
|
117
|
-
>;
|
|
118
|
-
|
|
119
|
-
type FlatNamespace = $PreservedValue<keyof TypeOptions['resources'], string>;
|
|
120
|
-
type Namespace<T = FlatNamespace> = T | readonly T[];
|
|
121
|
-
|
|
122
|
-
interface ReportNamespaces {
|
|
123
|
-
addUsedNamespaces(namespaces: Namespace): void;
|
|
124
|
-
getUsedNamespaces(): string[];
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
declare module 'i18next' {
|
|
128
|
-
// interface i18n {
|
|
129
|
-
// reportNamespaces?: ReportNamespaces;
|
|
130
|
-
// }
|
|
131
|
-
interface CustomInstanceExtensions {
|
|
132
|
-
reportNamespaces?: ReportNamespaces;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
type ObjectOrNever = TypeOptions['allowObjectInHTMLChildren'] extends true
|
|
137
|
-
? Record<string, unknown>
|
|
138
|
-
: never;
|
|
139
|
-
|
|
140
|
-
type ReactI18NextChildren = React.ReactNode | ObjectOrNever;
|
|
141
|
-
|
|
142
|
-
declare module 'react' {
|
|
143
|
-
namespace JSX {
|
|
144
|
-
interface IntrinsicAttributes {
|
|
145
|
-
i18nIsDynamicList?: boolean;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
interface HTMLAttributes<T> {
|
|
150
|
-
// This union is inspired by the typings for React.ReactNode. We do this to fix "This JSX tag's 'children' prop
|
|
151
|
-
// expects a single child of type 'ReactI18NextChildren', but multiple children were provided":
|
|
152
|
-
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5a1e9f91ed0143adede394adb3f540e650455f71/types/react/index.d.ts#L268
|
|
153
|
-
children?: ReactI18NextChildren | Iterable<ReactI18NextChildren>;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
3
|
// packages/core/types/src/layout/layoutTypes.ts
|
|
158
4
|
|
|
159
5
|
|
|
@@ -534,6 +380,160 @@ interface AppConfig {
|
|
|
534
380
|
query?: QueryConfig;
|
|
535
381
|
}
|
|
536
382
|
|
|
383
|
+
type $MergeBy<T, K> = Omit<T, keyof K> & K;
|
|
384
|
+
|
|
385
|
+
type $PreservedValue<Value, Fallback> = [Value] extends [never] ? Fallback : Value;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* This interface can be augmented by users to add types to `i18next` default TypeOptions.
|
|
389
|
+
*
|
|
390
|
+
* Usage:
|
|
391
|
+
* ```ts
|
|
392
|
+
* // i18next.d.ts
|
|
393
|
+
* import 'i18next';
|
|
394
|
+
* declare module 'i18next' {
|
|
395
|
+
* interface CustomTypeOptions {
|
|
396
|
+
* defaultNS: 'custom';
|
|
397
|
+
* returnNull: false;
|
|
398
|
+
* returnObjects: false;
|
|
399
|
+
* nsSeparator: ':';
|
|
400
|
+
* keySeparator: '.';
|
|
401
|
+
* compatibilityJSON: 'v4';
|
|
402
|
+
* allowObjectInHTMLChildren: false;
|
|
403
|
+
* resources: {
|
|
404
|
+
* custom: {
|
|
405
|
+
* foo: 'foo';
|
|
406
|
+
* };
|
|
407
|
+
* };
|
|
408
|
+
* }
|
|
409
|
+
* }
|
|
410
|
+
* ```
|
|
411
|
+
*/
|
|
412
|
+
interface CustomTypeOptions {}
|
|
413
|
+
|
|
414
|
+
type TypeOptions = $MergeBy<
|
|
415
|
+
{
|
|
416
|
+
/** @see {InitOptions.returnNull} */
|
|
417
|
+
returnNull: false;
|
|
418
|
+
|
|
419
|
+
/** @see {InitOptions.returnEmptyString} */
|
|
420
|
+
returnEmptyString: true;
|
|
421
|
+
|
|
422
|
+
/** @see {InitOptions.returnObjects} */
|
|
423
|
+
returnObjects: false;
|
|
424
|
+
|
|
425
|
+
/** @see {InitOptions.keySeparator} */
|
|
426
|
+
keySeparator: '.';
|
|
427
|
+
|
|
428
|
+
/** @see {InitOptions.nsSeparator} */
|
|
429
|
+
nsSeparator: ':';
|
|
430
|
+
|
|
431
|
+
/** @see {InitOptions.pluralSeparator} */
|
|
432
|
+
pluralSeparator: '_';
|
|
433
|
+
|
|
434
|
+
/** @see {InitOptions.contextSeparator} */
|
|
435
|
+
contextSeparator: '_';
|
|
436
|
+
|
|
437
|
+
/** @see {InitOptions.defaultNS} */
|
|
438
|
+
defaultNS: 'translation';
|
|
439
|
+
|
|
440
|
+
/** @see {InitOptions.fallbackNS} */
|
|
441
|
+
fallbackNS: false;
|
|
442
|
+
|
|
443
|
+
/** @see {InitOptions.compatibilityJSON} */
|
|
444
|
+
compatibilityJSON: 'v4';
|
|
445
|
+
|
|
446
|
+
/** @see {InitOptions.resources} */
|
|
447
|
+
resources: object;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Flag that allows HTML elements to receive objects. This is only useful for React applications
|
|
451
|
+
* where you pass objects to HTML elements so they can be replaced to their respective interpolation
|
|
452
|
+
* values (mostly with Trans component)
|
|
453
|
+
*/
|
|
454
|
+
allowObjectInHTMLChildren: false;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Flag that enables strict key checking even if a `defaultValue` has been provided.
|
|
458
|
+
* This ensures all calls of `t` function don't accidentally use implicitly missing keys.
|
|
459
|
+
*/
|
|
460
|
+
strictKeyChecks: false;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Prefix for interpolation
|
|
464
|
+
*/
|
|
465
|
+
interpolationPrefix: '{{';
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Suffix for interpolation
|
|
469
|
+
*/
|
|
470
|
+
interpolationSuffix: '}}';
|
|
471
|
+
|
|
472
|
+
/** @see {InterpolationOptions.unescapePrefix} */
|
|
473
|
+
unescapePrefix: '-';
|
|
474
|
+
|
|
475
|
+
/** @see {InterpolationOptions.unescapeSuffix} */
|
|
476
|
+
unescapeSuffix: '';
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Use a proxy-based selector to select a translation.
|
|
480
|
+
*
|
|
481
|
+
* Enables features like go-to definition, and better DX/faster autocompletion
|
|
482
|
+
* for TypeScript developers.
|
|
483
|
+
*
|
|
484
|
+
* If you're working with an especially large set of translations and aren't
|
|
485
|
+
* using context, you set `enableSelector` to `"optimize"` and i18next won't do
|
|
486
|
+
* any type-level processing of your translations at all.
|
|
487
|
+
*
|
|
488
|
+
* With `enableSelector` set to `"optimize"`, i18next is capable of supporting
|
|
489
|
+
* arbitrarily large/deep translation sets without causing any IDE slowdown
|
|
490
|
+
* whatsoever.
|
|
491
|
+
*
|
|
492
|
+
* @default false
|
|
493
|
+
*/
|
|
494
|
+
enableSelector: false;
|
|
495
|
+
},
|
|
496
|
+
CustomTypeOptions
|
|
497
|
+
>;
|
|
498
|
+
|
|
499
|
+
type FlatNamespace = $PreservedValue<keyof TypeOptions['resources'], string>;
|
|
500
|
+
type Namespace<T = FlatNamespace> = T | readonly T[];
|
|
501
|
+
|
|
502
|
+
interface ReportNamespaces {
|
|
503
|
+
addUsedNamespaces(namespaces: Namespace): void;
|
|
504
|
+
getUsedNamespaces(): string[];
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
declare module 'i18next' {
|
|
508
|
+
// interface i18n {
|
|
509
|
+
// reportNamespaces?: ReportNamespaces;
|
|
510
|
+
// }
|
|
511
|
+
interface CustomInstanceExtensions {
|
|
512
|
+
reportNamespaces?: ReportNamespaces;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
type ObjectOrNever = TypeOptions['allowObjectInHTMLChildren'] extends true
|
|
517
|
+
? Record<string, unknown>
|
|
518
|
+
: never;
|
|
519
|
+
|
|
520
|
+
type ReactI18NextChildren = React.ReactNode | ObjectOrNever;
|
|
521
|
+
|
|
522
|
+
declare module 'react' {
|
|
523
|
+
namespace JSX {
|
|
524
|
+
interface IntrinsicAttributes {
|
|
525
|
+
i18nIsDynamicList?: boolean;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
interface HTMLAttributes<T> {
|
|
530
|
+
// This union is inspired by the typings for React.ReactNode. We do this to fix "This JSX tag's 'children' prop
|
|
531
|
+
// expects a single child of type 'ReactI18NextChildren', but multiple children were provided":
|
|
532
|
+
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5a1e9f91ed0143adede394adb3f540e650455f71/types/react/index.d.ts#L268
|
|
533
|
+
children?: ReactI18NextChildren | Iterable<ReactI18NextChildren>;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
537
|
// packages/core/config/index.d.ts
|
|
538
538
|
|
|
539
539
|
/**
|