@donotdev/core 0.0.17 → 0.0.18
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/functions/index.js +8 -8
- package/i18n/locales/lazy/crud_ar.json +101 -0
- package/i18n/locales/lazy/crud_de.json +101 -0
- package/i18n/locales/lazy/crud_en.json +51 -2
- package/i18n/locales/lazy/crud_es.json +101 -0
- package/i18n/locales/lazy/crud_fr.json +101 -0
- package/i18n/locales/lazy/crud_it.json +101 -0
- package/i18n/locales/lazy/crud_ja.json +101 -0
- package/i18n/locales/lazy/crud_ko.json +101 -0
- package/index.d.ts +5877 -5829
- package/index.js +44 -44
- package/next/index.d.ts +159 -154
- package/next/index.js +24 -24
- package/package.json +1 -1
- package/server.d.ts +4075 -4037
- package/server.js +384 -1
- package/vite/index.d.ts +159 -154
- package/vite/index.js +42 -42
package/vite/index.d.ts
CHANGED
|
@@ -759,6 +759,160 @@ declare global {
|
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
|
|
762
|
+
type $MergeBy<T, K> = Omit<T, keyof K> & K;
|
|
763
|
+
|
|
764
|
+
type $PreservedValue<Value, Fallback> = [Value] extends [never] ? Fallback : Value;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* This interface can be augmented by users to add types to `i18next` default TypeOptions.
|
|
768
|
+
*
|
|
769
|
+
* Usage:
|
|
770
|
+
* ```ts
|
|
771
|
+
* // i18next.d.ts
|
|
772
|
+
* import 'i18next';
|
|
773
|
+
* declare module 'i18next' {
|
|
774
|
+
* interface CustomTypeOptions {
|
|
775
|
+
* defaultNS: 'custom';
|
|
776
|
+
* returnNull: false;
|
|
777
|
+
* returnObjects: false;
|
|
778
|
+
* nsSeparator: ':';
|
|
779
|
+
* keySeparator: '.';
|
|
780
|
+
* compatibilityJSON: 'v4';
|
|
781
|
+
* allowObjectInHTMLChildren: false;
|
|
782
|
+
* resources: {
|
|
783
|
+
* custom: {
|
|
784
|
+
* foo: 'foo';
|
|
785
|
+
* };
|
|
786
|
+
* };
|
|
787
|
+
* }
|
|
788
|
+
* }
|
|
789
|
+
* ```
|
|
790
|
+
*/
|
|
791
|
+
interface CustomTypeOptions {}
|
|
792
|
+
|
|
793
|
+
type TypeOptions = $MergeBy<
|
|
794
|
+
{
|
|
795
|
+
/** @see {InitOptions.returnNull} */
|
|
796
|
+
returnNull: false;
|
|
797
|
+
|
|
798
|
+
/** @see {InitOptions.returnEmptyString} */
|
|
799
|
+
returnEmptyString: true;
|
|
800
|
+
|
|
801
|
+
/** @see {InitOptions.returnObjects} */
|
|
802
|
+
returnObjects: false;
|
|
803
|
+
|
|
804
|
+
/** @see {InitOptions.keySeparator} */
|
|
805
|
+
keySeparator: '.';
|
|
806
|
+
|
|
807
|
+
/** @see {InitOptions.nsSeparator} */
|
|
808
|
+
nsSeparator: ':';
|
|
809
|
+
|
|
810
|
+
/** @see {InitOptions.pluralSeparator} */
|
|
811
|
+
pluralSeparator: '_';
|
|
812
|
+
|
|
813
|
+
/** @see {InitOptions.contextSeparator} */
|
|
814
|
+
contextSeparator: '_';
|
|
815
|
+
|
|
816
|
+
/** @see {InitOptions.defaultNS} */
|
|
817
|
+
defaultNS: 'translation';
|
|
818
|
+
|
|
819
|
+
/** @see {InitOptions.fallbackNS} */
|
|
820
|
+
fallbackNS: false;
|
|
821
|
+
|
|
822
|
+
/** @see {InitOptions.compatibilityJSON} */
|
|
823
|
+
compatibilityJSON: 'v4';
|
|
824
|
+
|
|
825
|
+
/** @see {InitOptions.resources} */
|
|
826
|
+
resources: object;
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Flag that allows HTML elements to receive objects. This is only useful for React applications
|
|
830
|
+
* where you pass objects to HTML elements so they can be replaced to their respective interpolation
|
|
831
|
+
* values (mostly with Trans component)
|
|
832
|
+
*/
|
|
833
|
+
allowObjectInHTMLChildren: false;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Flag that enables strict key checking even if a `defaultValue` has been provided.
|
|
837
|
+
* This ensures all calls of `t` function don't accidentally use implicitly missing keys.
|
|
838
|
+
*/
|
|
839
|
+
strictKeyChecks: false;
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Prefix for interpolation
|
|
843
|
+
*/
|
|
844
|
+
interpolationPrefix: '{{';
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Suffix for interpolation
|
|
848
|
+
*/
|
|
849
|
+
interpolationSuffix: '}}';
|
|
850
|
+
|
|
851
|
+
/** @see {InterpolationOptions.unescapePrefix} */
|
|
852
|
+
unescapePrefix: '-';
|
|
853
|
+
|
|
854
|
+
/** @see {InterpolationOptions.unescapeSuffix} */
|
|
855
|
+
unescapeSuffix: '';
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Use a proxy-based selector to select a translation.
|
|
859
|
+
*
|
|
860
|
+
* Enables features like go-to definition, and better DX/faster autocompletion
|
|
861
|
+
* for TypeScript developers.
|
|
862
|
+
*
|
|
863
|
+
* If you're working with an especially large set of translations and aren't
|
|
864
|
+
* using context, you set `enableSelector` to `"optimize"` and i18next won't do
|
|
865
|
+
* any type-level processing of your translations at all.
|
|
866
|
+
*
|
|
867
|
+
* With `enableSelector` set to `"optimize"`, i18next is capable of supporting
|
|
868
|
+
* arbitrarily large/deep translation sets without causing any IDE slowdown
|
|
869
|
+
* whatsoever.
|
|
870
|
+
*
|
|
871
|
+
* @default false
|
|
872
|
+
*/
|
|
873
|
+
enableSelector: false;
|
|
874
|
+
},
|
|
875
|
+
CustomTypeOptions
|
|
876
|
+
>;
|
|
877
|
+
|
|
878
|
+
type FlatNamespace = $PreservedValue<keyof TypeOptions['resources'], string>;
|
|
879
|
+
type Namespace<T = FlatNamespace> = T | readonly T[];
|
|
880
|
+
|
|
881
|
+
interface ReportNamespaces {
|
|
882
|
+
addUsedNamespaces(namespaces: Namespace): void;
|
|
883
|
+
getUsedNamespaces(): string[];
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
declare module 'i18next' {
|
|
887
|
+
// interface i18n {
|
|
888
|
+
// reportNamespaces?: ReportNamespaces;
|
|
889
|
+
// }
|
|
890
|
+
interface CustomInstanceExtensions {
|
|
891
|
+
reportNamespaces?: ReportNamespaces;
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
type ObjectOrNever = TypeOptions['allowObjectInHTMLChildren'] extends true
|
|
896
|
+
? Record<string, unknown>
|
|
897
|
+
: never;
|
|
898
|
+
|
|
899
|
+
type ReactI18NextChildren = React.ReactNode | ObjectOrNever;
|
|
900
|
+
|
|
901
|
+
declare module 'react' {
|
|
902
|
+
namespace JSX {
|
|
903
|
+
interface IntrinsicAttributes {
|
|
904
|
+
i18nIsDynamicList?: boolean;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
interface HTMLAttributes<T> {
|
|
909
|
+
// This union is inspired by the typings for React.ReactNode. We do this to fix "This JSX tag's 'children' prop
|
|
910
|
+
// expects a single child of type 'ReactI18NextChildren', but multiple children were provided":
|
|
911
|
+
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5a1e9f91ed0143adede394adb3f540e650455f71/types/react/index.d.ts#L268
|
|
912
|
+
children?: ReactI18NextChildren | Iterable<ReactI18NextChildren>;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
|
|
762
916
|
// packages/core/types/src/layout/layoutTypes.ts
|
|
763
917
|
|
|
764
918
|
|
|
@@ -1142,160 +1296,6 @@ interface AppConfig {
|
|
|
1142
1296
|
query?: QueryConfig;
|
|
1143
1297
|
}
|
|
1144
1298
|
|
|
1145
|
-
type $MergeBy<T, K> = Omit<T, keyof K> & K;
|
|
1146
|
-
|
|
1147
|
-
type $PreservedValue<Value, Fallback> = [Value] extends [never] ? Fallback : Value;
|
|
1148
|
-
|
|
1149
|
-
/**
|
|
1150
|
-
* This interface can be augmented by users to add types to `i18next` default TypeOptions.
|
|
1151
|
-
*
|
|
1152
|
-
* Usage:
|
|
1153
|
-
* ```ts
|
|
1154
|
-
* // i18next.d.ts
|
|
1155
|
-
* import 'i18next';
|
|
1156
|
-
* declare module 'i18next' {
|
|
1157
|
-
* interface CustomTypeOptions {
|
|
1158
|
-
* defaultNS: 'custom';
|
|
1159
|
-
* returnNull: false;
|
|
1160
|
-
* returnObjects: false;
|
|
1161
|
-
* nsSeparator: ':';
|
|
1162
|
-
* keySeparator: '.';
|
|
1163
|
-
* compatibilityJSON: 'v4';
|
|
1164
|
-
* allowObjectInHTMLChildren: false;
|
|
1165
|
-
* resources: {
|
|
1166
|
-
* custom: {
|
|
1167
|
-
* foo: 'foo';
|
|
1168
|
-
* };
|
|
1169
|
-
* };
|
|
1170
|
-
* }
|
|
1171
|
-
* }
|
|
1172
|
-
* ```
|
|
1173
|
-
*/
|
|
1174
|
-
interface CustomTypeOptions {}
|
|
1175
|
-
|
|
1176
|
-
type TypeOptions = $MergeBy<
|
|
1177
|
-
{
|
|
1178
|
-
/** @see {InitOptions.returnNull} */
|
|
1179
|
-
returnNull: false;
|
|
1180
|
-
|
|
1181
|
-
/** @see {InitOptions.returnEmptyString} */
|
|
1182
|
-
returnEmptyString: true;
|
|
1183
|
-
|
|
1184
|
-
/** @see {InitOptions.returnObjects} */
|
|
1185
|
-
returnObjects: false;
|
|
1186
|
-
|
|
1187
|
-
/** @see {InitOptions.keySeparator} */
|
|
1188
|
-
keySeparator: '.';
|
|
1189
|
-
|
|
1190
|
-
/** @see {InitOptions.nsSeparator} */
|
|
1191
|
-
nsSeparator: ':';
|
|
1192
|
-
|
|
1193
|
-
/** @see {InitOptions.pluralSeparator} */
|
|
1194
|
-
pluralSeparator: '_';
|
|
1195
|
-
|
|
1196
|
-
/** @see {InitOptions.contextSeparator} */
|
|
1197
|
-
contextSeparator: '_';
|
|
1198
|
-
|
|
1199
|
-
/** @see {InitOptions.defaultNS} */
|
|
1200
|
-
defaultNS: 'translation';
|
|
1201
|
-
|
|
1202
|
-
/** @see {InitOptions.fallbackNS} */
|
|
1203
|
-
fallbackNS: false;
|
|
1204
|
-
|
|
1205
|
-
/** @see {InitOptions.compatibilityJSON} */
|
|
1206
|
-
compatibilityJSON: 'v4';
|
|
1207
|
-
|
|
1208
|
-
/** @see {InitOptions.resources} */
|
|
1209
|
-
resources: object;
|
|
1210
|
-
|
|
1211
|
-
/**
|
|
1212
|
-
* Flag that allows HTML elements to receive objects. This is only useful for React applications
|
|
1213
|
-
* where you pass objects to HTML elements so they can be replaced to their respective interpolation
|
|
1214
|
-
* values (mostly with Trans component)
|
|
1215
|
-
*/
|
|
1216
|
-
allowObjectInHTMLChildren: false;
|
|
1217
|
-
|
|
1218
|
-
/**
|
|
1219
|
-
* Flag that enables strict key checking even if a `defaultValue` has been provided.
|
|
1220
|
-
* This ensures all calls of `t` function don't accidentally use implicitly missing keys.
|
|
1221
|
-
*/
|
|
1222
|
-
strictKeyChecks: false;
|
|
1223
|
-
|
|
1224
|
-
/**
|
|
1225
|
-
* Prefix for interpolation
|
|
1226
|
-
*/
|
|
1227
|
-
interpolationPrefix: '{{';
|
|
1228
|
-
|
|
1229
|
-
/**
|
|
1230
|
-
* Suffix for interpolation
|
|
1231
|
-
*/
|
|
1232
|
-
interpolationSuffix: '}}';
|
|
1233
|
-
|
|
1234
|
-
/** @see {InterpolationOptions.unescapePrefix} */
|
|
1235
|
-
unescapePrefix: '-';
|
|
1236
|
-
|
|
1237
|
-
/** @see {InterpolationOptions.unescapeSuffix} */
|
|
1238
|
-
unescapeSuffix: '';
|
|
1239
|
-
|
|
1240
|
-
/**
|
|
1241
|
-
* Use a proxy-based selector to select a translation.
|
|
1242
|
-
*
|
|
1243
|
-
* Enables features like go-to definition, and better DX/faster autocompletion
|
|
1244
|
-
* for TypeScript developers.
|
|
1245
|
-
*
|
|
1246
|
-
* If you're working with an especially large set of translations and aren't
|
|
1247
|
-
* using context, you set `enableSelector` to `"optimize"` and i18next won't do
|
|
1248
|
-
* any type-level processing of your translations at all.
|
|
1249
|
-
*
|
|
1250
|
-
* With `enableSelector` set to `"optimize"`, i18next is capable of supporting
|
|
1251
|
-
* arbitrarily large/deep translation sets without causing any IDE slowdown
|
|
1252
|
-
* whatsoever.
|
|
1253
|
-
*
|
|
1254
|
-
* @default false
|
|
1255
|
-
*/
|
|
1256
|
-
enableSelector: false;
|
|
1257
|
-
},
|
|
1258
|
-
CustomTypeOptions
|
|
1259
|
-
>;
|
|
1260
|
-
|
|
1261
|
-
type FlatNamespace = $PreservedValue<keyof TypeOptions['resources'], string>;
|
|
1262
|
-
type Namespace<T = FlatNamespace> = T | readonly T[];
|
|
1263
|
-
|
|
1264
|
-
interface ReportNamespaces {
|
|
1265
|
-
addUsedNamespaces(namespaces: Namespace): void;
|
|
1266
|
-
getUsedNamespaces(): string[];
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
declare module 'i18next' {
|
|
1270
|
-
// interface i18n {
|
|
1271
|
-
// reportNamespaces?: ReportNamespaces;
|
|
1272
|
-
// }
|
|
1273
|
-
interface CustomInstanceExtensions {
|
|
1274
|
-
reportNamespaces?: ReportNamespaces;
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
type ObjectOrNever = TypeOptions['allowObjectInHTMLChildren'] extends true
|
|
1279
|
-
? Record<string, unknown>
|
|
1280
|
-
: never;
|
|
1281
|
-
|
|
1282
|
-
type ReactI18NextChildren = React.ReactNode | ObjectOrNever;
|
|
1283
|
-
|
|
1284
|
-
declare module 'react' {
|
|
1285
|
-
namespace JSX {
|
|
1286
|
-
interface IntrinsicAttributes {
|
|
1287
|
-
i18nIsDynamicList?: boolean;
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
interface HTMLAttributes<T> {
|
|
1292
|
-
// This union is inspired by the typings for React.ReactNode. We do this to fix "This JSX tag's 'children' prop
|
|
1293
|
-
// expects a single child of type 'ReactI18NextChildren', but multiple children were provided":
|
|
1294
|
-
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5a1e9f91ed0143adede394adb3f540e650455f71/types/react/index.d.ts#L268
|
|
1295
|
-
children?: ReactI18NextChildren | Iterable<ReactI18NextChildren>;
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
1299
|
// packages/core/config/index.d.ts
|
|
1300
1300
|
|
|
1301
1301
|
/**
|
|
@@ -1480,6 +1480,11 @@ interface I18nOptions extends BaseDiscoveryOptions {
|
|
|
1480
1480
|
fallbackLanguage?: string;
|
|
1481
1481
|
namespaces?: string[];
|
|
1482
1482
|
virtualMapping?: I18nVirtualMappingOptions;
|
|
1483
|
+
/** Additional locale paths from workspace packages (e.g., shared entities) */
|
|
1484
|
+
/** Paths are relative to app root. Useful for custom shared translation locations. */
|
|
1485
|
+
/** Example: ['../../packages/shared/locales'] */
|
|
1486
|
+
/** Note: '../../entities/locales' is auto-detected by default, no config needed */
|
|
1487
|
+
additionalPaths?: string[];
|
|
1483
1488
|
}
|
|
1484
1489
|
|
|
1485
1490
|
/**
|