@anywayseo/tools 5.11.0 → 6.1.0
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/dist/components/game-demo/index.d.ts +2 -6
- package/dist/components/index.cjs +3 -3
- package/dist/components/index.mjs +3 -3
- package/dist/components/seo/href-langs/index.d.ts +8 -0
- package/dist/components/seo/index.d.ts +3 -2
- package/dist/components/seo/json-ld/index.d.ts +7 -0
- package/dist/components/seo/types.d.ts +4 -3
- package/dist/components/seo/utils.d.ts +1 -0
- package/dist/components/{strapi-component → strapi-content-renderer/strapi-component}/external-image/index.d.ts +1 -1
- package/dist/components/{strapi-component → strapi-content-renderer/strapi-component}/index.d.ts +1 -1
- package/dist/components/{strapi-component → strapi-content-renderer/strapi-component}/rich-text/index.d.ts +2 -1
- package/dist/components/{strapi-component → strapi-content-renderer/strapi-component}/utils.d.ts +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/i18n/index.cjs +24 -12
- package/dist/i18n/index.mjs +24 -12
- package/dist/i18n/resources/bn/index.d.ts +331 -0
- package/dist/i18n/resources/cs/index.d.ts +331 -0
- package/dist/i18n/resources/el/index.d.ts +331 -0
- package/dist/i18n/resources/hu/index.d.ts +331 -0
- package/dist/i18n/resources/nb/index.d.ts +331 -0
- package/dist/i18n/resources/nl/index.d.ts +331 -0
- package/dist/i18n/resources/pl/index.d.ts +331 -0
- package/dist/i18n/resources/ro/index.d.ts +331 -0
- package/dist/i18n/resources/sr/index.d.ts +331 -0
- package/dist/i18n/resources/sv/index.d.ts +331 -0
- package/dist/i18n/resources/tr/index.d.ts +331 -0
- package/dist/i18n/resources/uz/index.d.ts +331 -0
- package/dist/{index-DqMBmwe5.mjs → index-2sU4ya6z.mjs} +5 -6
- package/dist/{index-B6wLLS6t.mjs → index-B5WurBlm.mjs} +2 -2
- package/dist/{index-Ca9tsjT8.js → index-BAxlqkw0.js} +2 -2
- package/dist/{index-CG7F6SYt.mjs → index-BBU_vIrY.mjs} +68 -30
- package/dist/{index-C1kr7Vd-.mjs → index-BS5T9Il4.mjs} +1 -1
- package/dist/{index-RzByAgHO.mjs → index-C6A-3gBz.mjs} +4577 -432
- package/dist/{index-hGzNO4AL.js → index-C93pA9Jv.js} +69 -31
- package/dist/{index-C3n63_nP.js → index-CAjUjAgI.js} +1 -1
- package/dist/{index-CBRFCYhV.js → index-CMLDQbgR.js} +4577 -432
- package/dist/{index-DSP348cK.mjs → index-CQC6DRGf.mjs} +1 -1
- package/dist/index-CnVcCa5O.js +151 -0
- package/dist/index-CoNbTY7l.mjs +152 -0
- package/dist/{index-CVv755RW.js → index-CuIVcnIS.js} +1 -1
- package/dist/{index-DhhGhwm2.js → index-CxuOu0E2.js} +5 -6
- package/dist/{index-D-jM-cHx.js → index-DAPaiozu.js} +2 -2
- package/dist/index-MnQnVvsM.mjs +198 -0
- package/dist/index-P_fDAJVz.js +197 -0
- package/dist/{index-CPbWQKoT.mjs → index-TcBorTSf.mjs} +2 -2
- package/dist/index.cjs +20 -9
- package/dist/index.mjs +31 -20
- package/dist/layout/header/locale-switcher/icons/bangladesh/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/belgium/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/canada/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/czechia/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/greece/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/hungary/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/index.d.ts +20 -1
- package/dist/layout/header/locale-switcher/icons/india/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/morocco/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/netherlands/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/nigeria/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/norway/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/poland/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/romania/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/serbia/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/south-africa/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/sweden/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/switzerland/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/turkey/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/uzbekistan/index.d.ts +2 -0
- package/dist/layout/index.cjs +396 -52
- package/dist/layout/index.mjs +396 -52
- package/dist/providers/index.cjs +2 -2
- package/dist/providers/index.mjs +2 -2
- package/dist/providers/site-provider/index.d.ts +2 -1
- package/dist/types/api/index.d.ts +2 -16
- package/dist/types/api/strapi-navigation.d.ts +16 -0
- package/dist/types/api/strapi-page.d.ts +46 -0
- package/dist/types/components/game-demo/index.d.ts +5 -0
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/content/seo/index.d.ts +38 -1
- package/dist/types/i18n/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/json-ld/index.d.ts +162 -0
- package/dist/types/site/index.d.ts +9 -4
- package/dist/utils/api/index.d.ts +4 -2
- package/dist/utils/api/strapi-guards.d.ts +5 -0
- package/dist/utils/api/strapi-navigation.d.ts +2 -0
- package/dist/utils/api/strapi-seo.d.ts +13 -0
- package/dist/utils/index.cjs +14 -3
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.mjs +25 -14
- package/dist/utils/json-ld/index.d.ts +70 -0
- package/dist/utils/navigation/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/strapi-content-renderer/utils.d.ts +0 -2
- package/dist/index-Ba_pXx_e.js +0 -97
- package/dist/index-BeJTy4iY.mjs +0 -26
- package/dist/index-BfITsKAr.js +0 -25
- package/dist/index-CJANSiM5.mjs +0 -98
- package/dist/types/components/strapi-component/index.d.ts +0 -5
- package/dist/types/page/index.d.ts +0 -7
package/dist/index-BeJTy4iY.mjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_LANGUAGE } from "./i18n/index.mjs";
|
|
2
|
-
function getCurrencySymbol(currencyCode, locale = DEFAULT_LANGUAGE) {
|
|
3
|
-
const symbol = 0 .toLocaleString(locale, {
|
|
4
|
-
style: "currency",
|
|
5
|
-
currency: currencyCode,
|
|
6
|
-
minimumFractionDigits: 0,
|
|
7
|
-
maximumFractionDigits: 0
|
|
8
|
-
}).replace(/\d/g, "").trim();
|
|
9
|
-
return symbol;
|
|
10
|
-
}
|
|
11
|
-
function randomComparator() {
|
|
12
|
-
return Math.random() - 0.5;
|
|
13
|
-
}
|
|
14
|
-
function seededRandom(seed) {
|
|
15
|
-
return Math.abs(Math.sin(seed));
|
|
16
|
-
}
|
|
17
|
-
function getSeededRandomComparator(seed) {
|
|
18
|
-
const safeSeed = Math.abs(seed) % Number.MAX_SAFE_INTEGER;
|
|
19
|
-
let index = 0;
|
|
20
|
-
return () => seededRandom(safeSeed + index++) - 0.5;
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
getSeededRandomComparator as a,
|
|
24
|
-
getCurrencySymbol as g,
|
|
25
|
-
randomComparator as r
|
|
26
|
-
};
|
package/dist/index-BfITsKAr.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const i18n = require("./i18n/index.cjs");
|
|
3
|
-
function getCurrencySymbol(currencyCode, locale = i18n.DEFAULT_LANGUAGE) {
|
|
4
|
-
const symbol = 0 .toLocaleString(locale, {
|
|
5
|
-
style: "currency",
|
|
6
|
-
currency: currencyCode,
|
|
7
|
-
minimumFractionDigits: 0,
|
|
8
|
-
maximumFractionDigits: 0
|
|
9
|
-
}).replace(/\d/g, "").trim();
|
|
10
|
-
return symbol;
|
|
11
|
-
}
|
|
12
|
-
function randomComparator() {
|
|
13
|
-
return Math.random() - 0.5;
|
|
14
|
-
}
|
|
15
|
-
function seededRandom(seed) {
|
|
16
|
-
return Math.abs(Math.sin(seed));
|
|
17
|
-
}
|
|
18
|
-
function getSeededRandomComparator(seed) {
|
|
19
|
-
const safeSeed = Math.abs(seed) % Number.MAX_SAFE_INTEGER;
|
|
20
|
-
let index = 0;
|
|
21
|
-
return () => seededRandom(safeSeed + index++) - 0.5;
|
|
22
|
-
}
|
|
23
|
-
exports.getCurrencySymbol = getCurrencySymbol;
|
|
24
|
-
exports.getSeededRandomComparator = getSeededRandomComparator;
|
|
25
|
-
exports.randomComparator = randomComparator;
|
package/dist/index-CJANSiM5.mjs
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { i as isRelativePath } from "./index-DSP348cK.mjs";
|
|
2
|
-
const DUMMY_PAGE_TYPE = "DUMMY";
|
|
3
|
-
const NavigationSlug = {
|
|
4
|
-
HEADER: "header-navigation",
|
|
5
|
-
FOOTER: "footer-navigation"
|
|
6
|
-
};
|
|
7
|
-
function isValidPath(value) {
|
|
8
|
-
return typeof value === "string" && (value === "" || isRelativePath(value));
|
|
9
|
-
}
|
|
10
|
-
function isValidType(value) {
|
|
11
|
-
return typeof value === "string" && value.toUpperCase() !== DUMMY_PAGE_TYPE;
|
|
12
|
-
}
|
|
13
|
-
function isValidTitle(value) {
|
|
14
|
-
return typeof value === "string" && value.toUpperCase() !== DUMMY_PAGE_TYPE;
|
|
15
|
-
}
|
|
16
|
-
function transformNavItems(items) {
|
|
17
|
-
if (!items || !items.length) {
|
|
18
|
-
return [];
|
|
19
|
-
}
|
|
20
|
-
const transformed = [];
|
|
21
|
-
items.forEach((item) => {
|
|
22
|
-
var _a;
|
|
23
|
-
if (item && isValidTitle(item.title) && isValidType(item.type) && isValidPath(item.path)) {
|
|
24
|
-
const isNavGroup = (_a = item.items) == null ? void 0 : _a.length;
|
|
25
|
-
transformed.push({
|
|
26
|
-
label: item.title,
|
|
27
|
-
slug: isNavGroup ? "" : item.path.slice(1),
|
|
28
|
-
...isNavGroup && { children: transformNavItems(item.items) }
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
return transformed;
|
|
33
|
-
}
|
|
34
|
-
function transformSiteNavigation(strapiNavigation) {
|
|
35
|
-
const siteNavigation = {
|
|
36
|
-
header: {},
|
|
37
|
-
footer: {}
|
|
38
|
-
};
|
|
39
|
-
if (!strapiNavigation) {
|
|
40
|
-
return siteNavigation;
|
|
41
|
-
}
|
|
42
|
-
const groups = strapiNavigation.items;
|
|
43
|
-
for (const group of groups ?? []) {
|
|
44
|
-
const { slug, locale, items } = group ?? {};
|
|
45
|
-
if (locale && slug === NavigationSlug.HEADER) {
|
|
46
|
-
siteNavigation.header[locale] = transformNavItems(items ?? []);
|
|
47
|
-
}
|
|
48
|
-
if (locale && slug === NavigationSlug.FOOTER) {
|
|
49
|
-
siteNavigation.footer[locale] = transformNavItems(items ?? []);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return siteNavigation;
|
|
53
|
-
}
|
|
54
|
-
function getNavigation(fallback, strapiNavigation) {
|
|
55
|
-
const siteNavigation = {
|
|
56
|
-
header: fallback.header,
|
|
57
|
-
footer: fallback.footer
|
|
58
|
-
};
|
|
59
|
-
if (!strapiNavigation) {
|
|
60
|
-
return siteNavigation;
|
|
61
|
-
}
|
|
62
|
-
const navigation = transformSiteNavigation(strapiNavigation);
|
|
63
|
-
siteNavigation.header = { ...siteNavigation.header, ...navigation.header };
|
|
64
|
-
siteNavigation.footer = { ...siteNavigation.footer, ...navigation.footer };
|
|
65
|
-
return siteNavigation;
|
|
66
|
-
}
|
|
67
|
-
function getSiteName(url) {
|
|
68
|
-
if (!url) {
|
|
69
|
-
return "";
|
|
70
|
-
}
|
|
71
|
-
return url.replace(/^https?:\/\//, "");
|
|
72
|
-
}
|
|
73
|
-
function getLocale(defaultLocaleCode, locales) {
|
|
74
|
-
let locale = { code: "en", name: "Default" };
|
|
75
|
-
if (defaultLocaleCode && (locales == null ? void 0 : locales.length)) {
|
|
76
|
-
const foundLocale = locales.find(({ code }) => code === defaultLocaleCode);
|
|
77
|
-
if (foundLocale) {
|
|
78
|
-
locale = foundLocale;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return locale;
|
|
82
|
-
}
|
|
83
|
-
function getLocales(defaultLocaleCode, locales) {
|
|
84
|
-
if (!locales) {
|
|
85
|
-
return [];
|
|
86
|
-
}
|
|
87
|
-
return [...locales].sort((a, b) => {
|
|
88
|
-
if (a.code === defaultLocaleCode) return -1;
|
|
89
|
-
if (b.code === defaultLocaleCode) return 1;
|
|
90
|
-
return 0;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
export {
|
|
94
|
-
getSiteName as a,
|
|
95
|
-
getLocale as b,
|
|
96
|
-
getLocales as c,
|
|
97
|
-
getNavigation as g
|
|
98
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type StrapiComponentType = 'STRAPI__COMPONENT_CONTENT_ACTION_BUTTON' | 'STRAPI__COMPONENT_CONTENT_ARTICLE_CARDS' | 'STRAPI__COMPONENT_CONTENT_ARTICLE_INFO' | 'STRAPI__COMPONENT_CONTENT_CONTACTS_PAGE' | 'STRAPI__COMPONENT_CONTENT_COOKIE_POLICY_PAGE' | 'STRAPI__COMPONENT_CONTENT_FAQ' | 'STRAPI__COMPONENT_CONTENT_FEATURES' | 'STRAPI__COMPONENT_CONTENT_GAME_CARDS' | 'STRAPI__COMPONENT_CONTENT_GAME_CARD_TABS' | 'STRAPI__COMPONENT_CONTENT_GAME_DEMO' | 'STRAPI__COMPONENT_CONTENT_GAME_INFO' | 'STRAPI__COMPONENT_CONTENT_HOW_TO' | 'STRAPI__COMPONENT_CONTENT_INFORMER' | 'STRAPI__COMPONENT_CONTENT_LIST' | 'STRAPI__COMPONENT_CONTENT_MEDIA' | 'STRAPI__COMPONENT_CONTENT_PRIVACY_POLICY_PAGE' | 'STRAPI__COMPONENT_CONTENT_PROS_CONS' | 'STRAPI__COMPONENT_CONTENT_RICH_TEXT' | 'STRAPI__COMPONENT_CONTENT_TABLE' | 'STRAPI__COMPONENT_CONTENT_TERMS_CONDITIONS_PAGE' | 'STRAPI__COMPONENT_CONTENT_TIP';
|
|
2
|
-
export interface IStrapiComponentFragment {
|
|
3
|
-
__typename: StrapiComponentType;
|
|
4
|
-
[prop: string]: unknown;
|
|
5
|
-
}
|