@prezly/theme-kit-nextjs 1.6.4-1 → 1.6.4-2
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/build/intl/index.d.ts +2 -1
- package/build/intl/index.js +2 -1
- package/build/intl/index.js.map +1 -1
- package/build/intl/localeConfig.d.ts +1 -2
- package/build/intl/localeConfig.js +3 -4
- package/build/intl/localeConfig.js.map +1 -1
- package/build/intl/localeList.d.ts +4 -56
- package/build/intl/localeList.js +1 -2
- package/build/intl/localeList.js.map +1 -1
- package/build/intl/localeObject.js +1 -1
- package/build/intl/localeObject.js.map +1 -1
- package/package.json +1 -1
- package/src/intl/index.ts +2 -1
- package/src/intl/{localeConfig.js → localeConfig.ts} +3 -3
- package/src/intl/{localeList.js → localeList.ts} +1 -1
- package/src/intl/localeObject.ts +1 -1
package/build/intl/index.d.ts
CHANGED
package/build/intl/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './lang';
|
|
2
2
|
export * from './locale';
|
|
3
|
-
export {
|
|
3
|
+
export { localeConfig } from './localeConfig';
|
|
4
|
+
export { localeList } from './localeList';
|
|
4
5
|
export * from './localeObject';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/build/intl/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/intl/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/intl/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
declare const lowercaseLocalPermutations: string[];
|
|
1
|
+
export declare const localeConfig: string[];
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* This list is pulled from the main Prezly application. The underscores are replaced with dashes.
|
|
4
3
|
* Together with permutation performed lower in the code,
|
|
5
4
|
* the exported list represents all of the possible locale codes that Next.js theme application might accept.
|
|
6
5
|
*/
|
|
7
|
-
|
|
8
|
-
const lowercaseLocales =
|
|
6
|
+
import { localeList } from './localeList';
|
|
7
|
+
const lowercaseLocales = localeList.map((l) => l.toLowerCase());
|
|
9
8
|
// Get all permutations for the shorter locale codes supported by Prezly (e.g. short region codes and neutral language codes)
|
|
10
9
|
const lowercaseLocalPermutations = Array.from(new Set([
|
|
11
10
|
...lowercaseLocales,
|
|
12
11
|
...lowercaseLocales.map((code) => code.split('-')[0]),
|
|
13
12
|
...lowercaseLocales.map((code) => code.split('-')[1]).filter(Boolean),
|
|
14
13
|
])).sort();
|
|
15
|
-
|
|
14
|
+
export const localeConfig = lowercaseLocalPermutations;
|
|
16
15
|
//# sourceMappingURL=localeConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localeConfig.js","sourceRoot":"","sources":["../../src/intl/localeConfig.
|
|
1
|
+
{"version":3,"file":"localeConfig.js","sourceRoot":"","sources":["../../src/intl/localeConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,gBAAgB,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAEhE,6HAA6H;AAC7H,MAAM,0BAA0B,GAAG,KAAK,CAAC,IAAI,CACzC,IAAI,GAAG,CAAC;IACJ,GAAG,gBAAgB;IACnB,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;CACxE,CAAC,CACL,CAAC,IAAI,EAAE,CAAC;AAET,MAAM,CAAC,MAAM,YAAY,GAAG,0BAA0B,CAAC"}
|
|
@@ -1,56 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
toLocaleString(): string;
|
|
6
|
-
pop(): string | undefined;
|
|
7
|
-
push(...items: string[]): number;
|
|
8
|
-
concat(...items: ConcatArray<string>[]): string[];
|
|
9
|
-
concat(...items: (string | ConcatArray<string>)[]): string[];
|
|
10
|
-
join(separator?: string | undefined): string;
|
|
11
|
-
reverse(): string[];
|
|
12
|
-
shift(): string | undefined;
|
|
13
|
-
slice(start?: number | undefined, end?: number | undefined): string[];
|
|
14
|
-
sort(compareFn?: ((a: string, b: string) => number) | undefined): string[];
|
|
15
|
-
splice(start: number, deleteCount?: number | undefined): string[];
|
|
16
|
-
splice(start: number, deleteCount: number, ...items: string[]): string[];
|
|
17
|
-
unshift(...items: string[]): number;
|
|
18
|
-
indexOf(searchElement: string, fromIndex?: number | undefined): number;
|
|
19
|
-
lastIndexOf(searchElement: string, fromIndex?: number | undefined): number;
|
|
20
|
-
every<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[];
|
|
21
|
-
every(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
|
|
22
|
-
some(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
|
|
23
|
-
forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
|
|
24
|
-
map<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[];
|
|
25
|
-
filter<S_1 extends string>(predicate: (value: string, index: number, array: string[]) => value is S_1, thisArg?: any): S_1[];
|
|
26
|
-
filter(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
|
|
27
|
-
reduce(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
|
|
28
|
-
reduce(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
|
|
29
|
-
reduce<U_1>(callbackfn: (previousValue: U_1, currentValue: string, currentIndex: number, array: string[]) => U_1, initialValue: U_1): U_1;
|
|
30
|
-
reduceRight(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
|
|
31
|
-
reduceRight(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
|
|
32
|
-
reduceRight<U_2>(callbackfn: (previousValue: U_2, currentValue: string, currentIndex: number, array: string[]) => U_2, initialValue: U_2): U_2;
|
|
33
|
-
find<S_2 extends string>(predicate: (this: void, value: string, index: number, obj: string[]) => value is S_2, thisArg?: any): S_2 | undefined;
|
|
34
|
-
find(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
|
|
35
|
-
findIndex(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): number;
|
|
36
|
-
fill(value: string, start?: number | undefined, end?: number | undefined): string[];
|
|
37
|
-
copyWithin(target: number, start: number, end?: number | undefined): string[];
|
|
38
|
-
entries(): IterableIterator<[number, string]>;
|
|
39
|
-
keys(): IterableIterator<number>;
|
|
40
|
-
values(): IterableIterator<string>;
|
|
41
|
-
includes(searchElement: string, fromIndex?: number | undefined): boolean;
|
|
42
|
-
flatMap<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined): U_3[];
|
|
43
|
-
flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
|
|
44
|
-
[Symbol.iterator](): IterableIterator<string>;
|
|
45
|
-
[Symbol.unscopables](): {
|
|
46
|
-
copyWithin: boolean;
|
|
47
|
-
entries: boolean;
|
|
48
|
-
fill: boolean;
|
|
49
|
-
find: boolean;
|
|
50
|
-
findIndex: boolean;
|
|
51
|
-
keys: boolean;
|
|
52
|
-
values: boolean;
|
|
53
|
-
};
|
|
54
|
-
at(index: number): string | undefined;
|
|
55
|
-
};
|
|
56
|
-
export = _exports;
|
|
1
|
+
/**
|
|
2
|
+
* This list is pulled from the main Prezly application. The underscores are replaced with dashes.
|
|
3
|
+
*/
|
|
4
|
+
export declare const localeList: string[];
|
package/build/intl/localeList.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localeList.js","sourceRoot":"","sources":["../../src/intl/localeList.
|
|
1
|
+
{"version":3,"file":"localeList.js","sourceRoot":"","sources":["../../src/intl/localeList.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,OAAO;IACP,KAAK;IACL,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,SAAS;IACT,OAAO;IACP,OAAO;IACP,OAAO;CACV,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import localeConfig from './localeConfig';
|
|
1
|
+
import { localeConfig } from './localeConfig';
|
|
2
2
|
/**
|
|
3
3
|
* This class is created to simplify working with locales and transforming between different locale code formats.
|
|
4
4
|
* Prezly API uses underscore-codes, while most frontend application tend to use hyphen-codes or slugs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localeObject.js","sourceRoot":"","sources":["../../src/intl/localeObject.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"localeObject.js","sourceRoot":"","sources":["../../src/intl/localeObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,OAAO,YAAY;IACrB;;;OAGG;IACK,UAAU,CAAS;IAE3B,YAAoB,UAAkB;QAClC,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,+BAA+B,C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AAC,CAAC;QAE9C,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;OAEG;IACI,YAAY;QACf,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEtD,IAAI,CAAC,MAAM,EAAE;YACT,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;SACjC;QAED,OAAO,MAAM,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC;IAED;;OAEG;IACI,OAAO,CAAC,aAA2B;QACtC,OAAO,aAAa,CAAC,YAAY,EAAE,KAAK,IAAI,CAAC,UAAU,CAAC;IAC5D,CAAC;CACJ"}
|
package/package.json
CHANGED
package/src/intl/index.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Together with permutation performed lower in the code,
|
|
4
4
|
* the exported list represents all of the possible locale codes that Next.js theme application might accept.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
import { localeList } from './localeList';
|
|
7
7
|
|
|
8
|
-
const lowercaseLocales =
|
|
8
|
+
const lowercaseLocales = localeList.map((l) => l.toLowerCase());
|
|
9
9
|
|
|
10
10
|
// Get all permutations for the shorter locale codes supported by Prezly (e.g. short region codes and neutral language codes)
|
|
11
11
|
const lowercaseLocalPermutations = Array.from(
|
|
@@ -16,4 +16,4 @@ const lowercaseLocalPermutations = Array.from(
|
|
|
16
16
|
]),
|
|
17
17
|
).sort();
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
export const localeConfig = lowercaseLocalPermutations;
|
package/src/intl/localeObject.ts
CHANGED