@anywayseo/tools 5.10.0 → 6.0.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.
Files changed (61) hide show
  1. package/dist/components/base/article-meta/item/index.d.ts +2 -0
  2. package/dist/components/game-demo/index.d.ts +2 -6
  3. package/dist/components/index.cjs +3 -3
  4. package/dist/components/index.mjs +3 -3
  5. package/dist/components/seo/href-langs/index.d.ts +8 -0
  6. package/dist/components/seo/index.d.ts +8 -6
  7. package/dist/components/seo/json-ld/index.d.ts +7 -0
  8. package/dist/components/seo/types.d.ts +10 -2
  9. package/dist/components/seo/utils.d.ts +3 -2
  10. package/dist/components/{strapi-component → strapi-content-renderer/strapi-component}/external-image/index.d.ts +1 -1
  11. package/dist/components/{strapi-component → strapi-content-renderer/strapi-component}/index.d.ts +1 -1
  12. package/dist/components/{strapi-component → strapi-content-renderer/strapi-component}/rich-text/index.d.ts +2 -1
  13. package/dist/components/{strapi-component → strapi-content-renderer/strapi-component}/utils.d.ts +1 -1
  14. package/dist/index-0AAkKSsc.mjs +146 -0
  15. package/dist/{index-D1gNEJUA.mjs → index-B5C9u9UE.mjs} +2 -2
  16. package/dist/{index-CAhVRVmv.js → index-B5SWTYZm.js} +90 -40
  17. package/dist/index-BJsA8Upb.js +192 -0
  18. package/dist/{index-DzOucsVx.js → index-BSAasfl2.js} +4 -5
  19. package/dist/index-BU1gLt1p.js +145 -0
  20. package/dist/{index-C2HtVL6w.mjs → index-BhzKUTPZ.mjs} +91 -41
  21. package/dist/{index-D9i6mZaH.mjs → index-C7buhUOk.mjs} +4 -5
  22. package/dist/{index-DgrIJs-a.js → index-CAjUjAgI.js} +5 -0
  23. package/dist/{index-Bph7a3PR.mjs → index-CQC6DRGf.mjs} +6 -1
  24. package/dist/index-CUDzMwnz.mjs +193 -0
  25. package/dist/{index-DXTC3R_J.js → index-DJSBjQzq.js} +2 -2
  26. package/dist/{index-B4M1IKzL.js → index-DZc8PJET.js} +1 -1
  27. package/dist/{index-ClIPWZ3z.mjs → index-U-DmPFa7.mjs} +1 -1
  28. package/dist/index.cjs +18 -7
  29. package/dist/index.mjs +29 -18
  30. package/dist/layout/index.cjs +7 -7
  31. package/dist/layout/index.mjs +7 -7
  32. package/dist/providers/index.cjs +2 -2
  33. package/dist/providers/index.mjs +2 -2
  34. package/dist/providers/site-provider/index.d.ts +2 -1
  35. package/dist/types/api/index.d.ts +2 -16
  36. package/dist/types/api/strapi-navigation.d.ts +16 -0
  37. package/dist/types/api/strapi-page.d.ts +45 -0
  38. package/dist/types/common/index.d.ts +1 -0
  39. package/dist/types/components/game-demo/index.d.ts +5 -0
  40. package/dist/types/components/index.d.ts +1 -1
  41. package/dist/types/content/seo/index.d.ts +38 -1
  42. package/dist/types/index.d.ts +2 -1
  43. package/dist/types/json-ld/index.d.ts +162 -0
  44. package/dist/types/site/index.d.ts +9 -4
  45. package/dist/utils/api/index.d.ts +4 -2
  46. package/dist/utils/api/strapi-guards.d.ts +4 -0
  47. package/dist/utils/api/strapi-navigation.d.ts +2 -0
  48. package/dist/utils/api/strapi-seo.d.ts +13 -0
  49. package/dist/utils/index.cjs +14 -3
  50. package/dist/utils/index.d.ts +1 -0
  51. package/dist/utils/index.mjs +25 -14
  52. package/dist/utils/json-ld/index.d.ts +70 -0
  53. package/dist/utils/navigation/index.d.ts +1 -0
  54. package/package.json +1 -1
  55. package/dist/components/strapi-content-renderer/utils.d.ts +0 -2
  56. package/dist/index-BeJTy4iY.mjs +0 -26
  57. package/dist/index-BfITsKAr.js +0 -25
  58. package/dist/index-CYr1ct1t.js +0 -93
  59. package/dist/index-cQqALZIW.mjs +0 -94
  60. package/dist/types/components/strapi-component/index.d.ts +0 -5
  61. package/dist/types/page/index.d.ts +0 -7
@@ -0,0 +1,193 @@
1
+ import { i as isRelativePath } from "./index-CQC6DRGf.mjs";
2
+ import { b as isStrapiPageContext, a as isStrapiPageData, i as isStrapiContent } from "./index-0AAkKSsc.mjs";
3
+ const DUMMY_PAGE_TYPE = "DUMMY";
4
+ const NavigationSlug = {
5
+ HEADER: "header-navigation",
6
+ FOOTER: "footer-navigation"
7
+ };
8
+ function isValidPath(value) {
9
+ return typeof value === "string" && (value === "" || isRelativePath(value));
10
+ }
11
+ function isValidType(value) {
12
+ return typeof value === "string" && value.toUpperCase() !== DUMMY_PAGE_TYPE;
13
+ }
14
+ function isValidTitle(value) {
15
+ return typeof value === "string" && value.toUpperCase() !== DUMMY_PAGE_TYPE;
16
+ }
17
+ function transformNavItems(items) {
18
+ if (!items || !items.length) {
19
+ return [];
20
+ }
21
+ const transformed = [];
22
+ items.forEach((item) => {
23
+ var _a;
24
+ if (item && isValidTitle(item.title) && isValidType(item.type) && isValidPath(item.path)) {
25
+ const isNavGroup = (_a = item.items) == null ? void 0 : _a.length;
26
+ transformed.push({
27
+ label: item.title,
28
+ slug: isNavGroup ? "" : item.path.slice(1),
29
+ ...isNavGroup && { children: transformNavItems(item.items) }
30
+ });
31
+ }
32
+ });
33
+ return transformed;
34
+ }
35
+ function transformSiteNavigation(strapiNavigation) {
36
+ const siteNavigation = {
37
+ header: {},
38
+ footer: {}
39
+ };
40
+ if (!strapiNavigation) {
41
+ return siteNavigation;
42
+ }
43
+ const groups = strapiNavigation.items;
44
+ for (const group of groups ?? []) {
45
+ const { slug, locale, items } = group ?? {};
46
+ if (locale && slug === NavigationSlug.HEADER) {
47
+ siteNavigation.header[locale] = transformNavItems(items ?? []);
48
+ }
49
+ if (locale && slug === NavigationSlug.FOOTER) {
50
+ siteNavigation.footer[locale] = transformNavItems(items ?? []);
51
+ }
52
+ }
53
+ return siteNavigation;
54
+ }
55
+ function getNavigation(fallback, strapiNavigation) {
56
+ const siteNavigation = {
57
+ header: fallback.header,
58
+ footer: fallback.footer
59
+ };
60
+ if (!strapiNavigation) {
61
+ return siteNavigation;
62
+ }
63
+ const navigation = transformSiteNavigation(strapiNavigation);
64
+ siteNavigation.header = { ...siteNavigation.header, ...navigation.header };
65
+ siteNavigation.footer = { ...siteNavigation.footer, ...navigation.footer };
66
+ return siteNavigation;
67
+ }
68
+ function extractAuthor(author) {
69
+ if (author == null ? void 0 : author.name) {
70
+ return { name: author.name };
71
+ }
72
+ return null;
73
+ }
74
+ function extractGame(content) {
75
+ var _a, _b;
76
+ if (content) {
77
+ const gameInfo = content.find(
78
+ (component) => (component == null ? void 0 : component.__typename) === "STRAPI__COMPONENT_CONTENT_GAME_INFO"
79
+ );
80
+ const gameDemo = content.find(
81
+ (component) => (component == null ? void 0 : component.__typename) === "STRAPI__COMPONENT_CONTENT_GAME_DEMO"
82
+ );
83
+ const name = (gameDemo == null ? void 0 : gameDemo.name) ?? ((_a = gameInfo == null ? void 0 : gameInfo.general) == null ? void 0 : _a.NAME);
84
+ const genre = (_b = gameInfo == null ? void 0 : gameInfo.general) == null ? void 0 : _b.TYPE;
85
+ if (name) {
86
+ return {
87
+ name,
88
+ ...genre ? { genre } : {}
89
+ };
90
+ }
91
+ }
92
+ return null;
93
+ }
94
+ function parseReviewHeading(content) {
95
+ const firstComponent = content ? content[0] : null;
96
+ const firstRichText = firstComponent && (firstComponent == null ? void 0 : firstComponent.__typename) === "STRAPI__COMPONENT_CONTENT_RICH_TEXT" ? firstComponent.content.data.content : null;
97
+ if (firstRichText) {
98
+ const [title, description] = firstRichText.split("\n");
99
+ if (title.startsWith("#")) {
100
+ return { title: title.slice(1).trim(), description: description.trim() };
101
+ }
102
+ }
103
+ return null;
104
+ }
105
+ function extractReview(content, seo, createdAt, updatedAt) {
106
+ if (content) {
107
+ const articleInfo = content.find(
108
+ (component) => (component == null ? void 0 : component.__typename) === "STRAPI__COMPONENT_CONTENT_ARTICLE_INFO"
109
+ );
110
+ const maybeHeading = parseReviewHeading(content);
111
+ const title = (articleInfo == null ? void 0 : articleInfo.title) || (maybeHeading == null ? void 0 : maybeHeading.title) || (seo == null ? void 0 : seo.metaTitle);
112
+ const description = (articleInfo == null ? void 0 : articleInfo.description) || (maybeHeading == null ? void 0 : maybeHeading.description) || (seo == null ? void 0 : seo.metaDescription);
113
+ if (title && description && createdAt)
114
+ return {
115
+ title,
116
+ description,
117
+ publishedAt: createdAt,
118
+ updatedAt: updatedAt || createdAt
119
+ };
120
+ }
121
+ return null;
122
+ }
123
+ function extractSeoData(pageData, pageContext) {
124
+ const result = {
125
+ locale: null,
126
+ meta: { title: null, description: null },
127
+ canonicalUrl: null,
128
+ hrefLangs: [],
129
+ structuredData: null
130
+ };
131
+ if (isStrapiPageContext(pageContext)) {
132
+ result.hrefLangs = pageContext.hrefLangs ?? [];
133
+ }
134
+ if (isStrapiPageData(pageData)) {
135
+ const { locale, seo, canonicalUrl, author, content, createdAt, updatedAt } = pageData ?? {};
136
+ const { metaTitle, metaDescription } = seo ?? {};
137
+ result.locale = locale ?? null;
138
+ result.canonicalUrl = canonicalUrl ?? null;
139
+ result.meta = { title: metaTitle ?? null, description: metaDescription ?? null };
140
+ const structuredDataContent = {};
141
+ if (isStrapiContent(content)) {
142
+ const review = extractReview(content, seo ?? null, createdAt ?? null, updatedAt ?? null);
143
+ const game = extractGame(content);
144
+ if (review && game) {
145
+ structuredDataContent.review = review;
146
+ structuredDataContent.game = game;
147
+ const reviewAuthor = extractAuthor(author ?? null);
148
+ if (reviewAuthor) {
149
+ structuredDataContent.author = reviewAuthor;
150
+ }
151
+ }
152
+ }
153
+ result.structuredData = structuredDataContent ? {
154
+ format: "json-ld",
155
+ entity: "game-review",
156
+ content: structuredDataContent
157
+ } : null;
158
+ }
159
+ return result;
160
+ }
161
+ function getSiteName(url) {
162
+ if (!url) {
163
+ return "";
164
+ }
165
+ return url.replace(/^https?:\/\//, "");
166
+ }
167
+ function getLocale(defaultLocaleCode, locales) {
168
+ let locale = { code: "en", name: "Default" };
169
+ if (defaultLocaleCode && (locales == null ? void 0 : locales.length)) {
170
+ const foundLocale = locales.find(({ code }) => code === defaultLocaleCode);
171
+ if (foundLocale) {
172
+ locale = foundLocale;
173
+ }
174
+ }
175
+ return locale;
176
+ }
177
+ function getLocales(defaultLocaleCode, locales) {
178
+ if (!locales) {
179
+ return [];
180
+ }
181
+ return [...locales].sort((a, b) => {
182
+ if (a.code === defaultLocaleCode) return -1;
183
+ if (b.code === defaultLocaleCode) return 1;
184
+ return 0;
185
+ });
186
+ }
187
+ export {
188
+ getLocale as a,
189
+ getLocales as b,
190
+ getNavigation as c,
191
+ extractSeoData as e,
192
+ getSiteName as g
193
+ };
@@ -3,11 +3,11 @@ const jsxRuntime = require("react/jsx-runtime");
3
3
  const react = require("@mdx-js/react");
4
4
  require("react-i18next");
5
5
  require("@chakra-ui/react");
6
- const index$1 = require("./index-B4M1IKzL.js");
6
+ const index$1 = require("./index-DZc8PJET.js");
7
7
  require("./index-C6MG_f24.js");
8
8
  require("./index-CBRFCYhV.js");
9
- require("react");
10
9
  require("@chakra-ui/icons");
10
+ require("react");
11
11
  const index = require("./index-DDg_PkD2.js");
12
12
  function omitProps(props, omittedKeys) {
13
13
  const result = { ...props };
@@ -10,7 +10,7 @@ require("./index-C6MG_f24.js");
10
10
  require("./index-CBRFCYhV.js");
11
11
  require("@chakra-ui/icons");
12
12
  const index = require("./index-ma-iV7GU.js");
13
- const index$1 = require("./index-DgrIJs-a.js");
13
+ const index$1 = require("./index-CAjUjAgI.js");
14
14
  const SiteContext = react.createContext(null);
15
15
  const SiteProvider = ({ children, ...context }) => {
16
16
  const value = react.useMemo(() => context, []);
@@ -9,7 +9,7 @@ import "./index-BJRvnR8Q.mjs";
9
9
  import "./index-RzByAgHO.mjs";
10
10
  import "@chakra-ui/icons";
11
11
  import { u as useLocalization } from "./index-DHURrUMW.mjs";
12
- import { a as isAbsolutePath, i as isRelativePath } from "./index-Bph7a3PR.mjs";
12
+ import { c as isAbsolutePath, i as isRelativePath } from "./index-CQC6DRGf.mjs";
13
13
  const SiteContext = createContext(null);
14
14
  const SiteProvider = ({ children, ...context }) => {
15
15
  const value = useMemo(() => context, []);
package/dist/index.cjs CHANGED
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-CAhVRVmv.js");
4
- const index$1 = require("./index-DzOucsVx.js");
3
+ const index = require("./index-B5SWTYZm.js");
4
+ const index$1 = require("./index-BSAasfl2.js");
5
5
  const index$2 = require("./index-DDg_PkD2.js");
6
- const index$3 = require("./index-B4M1IKzL.js");
6
+ const index$3 = require("./index-DZc8PJET.js");
7
7
  const index$4 = require("./index-ma-iV7GU.js");
8
8
  const index$5 = require("./index-CVv755RW.js");
9
9
  const i18n = require("./i18n/index.cjs");
10
10
  const layout = require("./layout/index.cjs");
11
- const index$6 = require("./index-DXTC3R_J.js");
11
+ const index$6 = require("./index-DJSBjQzq.js");
12
12
  const index$7 = require("./index-CBRFCYhV.js");
13
13
  const index$8 = require("./index-C6MG_f24.js");
14
- const index$9 = require("./index-CYr1ct1t.js");
15
- const index$a = require("./index-BfITsKAr.js");
14
+ const index$9 = require("./index-BJsA8Upb.js");
15
+ const index$a = require("./index-BU1gLt1p.js");
16
16
  const index$b = require("./index-ov4J7p3D.js");
17
- const index$c = require("./index-DgrIJs-a.js");
17
+ const index$c = require("./index-CAjUjAgI.js");
18
18
  const index$d = require("./index-CbuiYkSg.js");
19
19
  exports.ActionButton = index.ActionButton;
20
20
  exports.ArticleCard = index.ArticleCard;
@@ -80,12 +80,22 @@ exports.GameCharacteristic = index$7.GameCharacteristic;
80
80
  exports.GameVolatility = index$7.GameVolatility;
81
81
  exports.InformerType = index$7.InformerType;
82
82
  exports.Animation = index$8.Animation;
83
+ exports.extractSeoData = index$9.extractSeoData;
83
84
  exports.getLocale = index$9.getLocale;
84
85
  exports.getLocales = index$9.getLocales;
85
86
  exports.getNavigation = index$9.getNavigation;
86
87
  exports.getSiteName = index$9.getSiteName;
88
+ exports.buildGameReviewSchema = index$a.buildGameReviewSchema;
89
+ exports.buildGraph = index$a.buildGraph;
90
+ exports.buildOrganizationSchema = index$a.buildOrganizationSchema;
91
+ exports.buildWebpageSchema = index$a.buildWebpageSchema;
92
+ exports.buildWebsiteSchema = index$a.buildWebsiteSchema;
87
93
  exports.getCurrencySymbol = index$a.getCurrencySymbol;
94
+ exports.getEntitySchema = index$a.getEntitySchema;
88
95
  exports.getSeededRandomComparator = index$a.getSeededRandomComparator;
96
+ exports.isStrapiContent = index$a.isStrapiContent;
97
+ exports.isStrapiPageContext = index$a.isStrapiPageContext;
98
+ exports.isStrapiPageData = index$a.isStrapiPageData;
89
99
  exports.randomComparator = index$a.randomComparator;
90
100
  exports.formatDate = index$b.formatDate;
91
101
  exports.formatNumber = index$b.formatNumber;
@@ -93,6 +103,7 @@ exports.getCurrentMonth = index$b.getCurrentMonth;
93
103
  exports.getCurrentYear = index$b.getCurrentYear;
94
104
  exports.round = index$b.round;
95
105
  exports.toFixedTwo = index$b.toFixedTwo;
106
+ exports.buildCanonicalUrl = index$c.buildCanonicalUrl;
96
107
  exports.buildPath = index$c.buildPath;
97
108
  exports.isAbsolutePath = index$c.isAbsolutePath;
98
109
  exports.isRelativePath = index$c.isRelativePath;
package/dist/index.mjs CHANGED
@@ -1,18 +1,18 @@
1
- import { A, a, b, c, n, o, d, B, e, C, r, q, F, f, g, G, h, i, j, p, H, I, L, N, s, P, S, k, T, l, t, m } from "./index-C2HtVL6w.mjs";
2
- import { C as C2, a as a2, b as b2, L as L2, c as c2, R, S as S2, d as d2 } from "./index-D9i6mZaH.mjs";
1
+ import { A, a, b, c, n, o, d, B, e, C, r, q, F, f, g, G, h, i, j, p, H, I, L, N, s, P, S, k, T, l, t, m } from "./index-BhzKUTPZ.mjs";
2
+ import { C as C2, a as a2, b as b2, L as L2, c as c2, R, S as S2, d as d2 } from "./index-C7buhUOk.mjs";
3
3
  import { H as H2, a as a3, b as b3, O, P as P2, U } from "./index-BEjKnOZA.mjs";
4
- import { I as I2, L as L3, P as P3, S as S3, u, a as a4 } from "./index-ClIPWZ3z.mjs";
4
+ import { I as I2, L as L3, P as P3, S as S3, u, a as a4 } from "./index-U-DmPFa7.mjs";
5
5
  import { u as u2 } from "./index-DHURrUMW.mjs";
6
6
  import { u as u3 } from "./index-C1kr7Vd-.mjs";
7
7
  import { DEFAULT_LANGUAGE, resources } from "./i18n/index.mjs";
8
8
  import { default as default2 } from "./layout/index.mjs";
9
- import { M } from "./index-D1gNEJUA.mjs";
9
+ import { M } from "./index-B5C9u9UE.mjs";
10
10
  import { a as a5, C as C3, b as b4, G as G2, I as I3 } from "./index-RzByAgHO.mjs";
11
11
  import { A as A2 } from "./index-BJRvnR8Q.mjs";
12
- import { b as b5, c as c3, g as g2, a as a6 } from "./index-cQqALZIW.mjs";
13
- import { g as g3, a as a7, r as r2 } from "./index-BeJTy4iY.mjs";
14
- import { f as f2, b as b6, a as a8, g as g4, r as r3, t as t2 } from "./index-BPthShL-.mjs";
15
- import { b as b7, a as a9, i as i2 } from "./index-Bph7a3PR.mjs";
12
+ import { e as e2, a as a6, b as b5, c as c3, g as g2 } from "./index-CUDzMwnz.mjs";
13
+ import { j as j2, c as c4, d as d3, h as h2, e as e3, g as g3, f as f2, k as k2, i as i2, b as b6, a as a7, r as r2 } from "./index-0AAkKSsc.mjs";
14
+ import { f as f3, b as b7, a as a8, g as g4, r as r3, t as t2 } from "./index-BPthShL-.mjs";
15
+ import { a as a9, b as b8, c as c5, i as i3 } from "./index-CQC6DRGf.mjs";
16
16
  import { D, L as L4 } from "./index-BRVKhbs6.mjs";
17
17
  export {
18
18
  A as ActionButton,
@@ -76,19 +76,30 @@ export {
76
76
  t as TermsAndConditions,
77
77
  m as Tip,
78
78
  U as UL,
79
- b7 as buildPath,
80
- f2 as formatDate,
81
- b6 as formatNumber,
79
+ a9 as buildCanonicalUrl,
80
+ j2 as buildGameReviewSchema,
81
+ c4 as buildGraph,
82
+ d3 as buildOrganizationSchema,
83
+ b8 as buildPath,
84
+ h2 as buildWebpageSchema,
85
+ e3 as buildWebsiteSchema,
86
+ e2 as extractSeoData,
87
+ f3 as formatDate,
88
+ b7 as formatNumber,
82
89
  g3 as getCurrencySymbol,
83
90
  a8 as getCurrentMonth,
84
91
  g4 as getCurrentYear,
85
- b5 as getLocale,
86
- c3 as getLocales,
87
- g2 as getNavigation,
88
- a7 as getSeededRandomComparator,
89
- a6 as getSiteName,
90
- a9 as isAbsolutePath,
91
- i2 as isRelativePath,
92
+ f2 as getEntitySchema,
93
+ a6 as getLocale,
94
+ b5 as getLocales,
95
+ c3 as getNavigation,
96
+ k2 as getSeededRandomComparator,
97
+ g2 as getSiteName,
98
+ c5 as isAbsolutePath,
99
+ i3 as isRelativePath,
100
+ i2 as isStrapiContent,
101
+ b6 as isStrapiPageContext,
102
+ a7 as isStrapiPageData,
92
103
  r2 as randomComparator,
93
104
  resources,
94
105
  r3 as round,
@@ -3,17 +3,17 @@ const jsxRuntime = require("react/jsx-runtime");
3
3
  const react = require("@chakra-ui/react");
4
4
  const reactI18next = require("react-i18next");
5
5
  require("@mdx-js/react");
6
- const index$1 = require("../index-B4M1IKzL.js");
6
+ const index$1 = require("../index-DZc8PJET.js");
7
7
  require("../index-C6MG_f24.js");
8
8
  require("../index-CBRFCYhV.js");
9
+ const icons = require("@chakra-ui/icons");
9
10
  require("react-medium-image-zoom");
10
11
  const react$1 = require("react");
11
- const index = require("../index-DzOucsVx.js");
12
- const icons = require("@chakra-ui/icons");
12
+ const index = require("../index-BSAasfl2.js");
13
13
  require("i18next");
14
14
  require("react-markdown");
15
15
  const index$2 = require("../index-ov4J7p3D.js");
16
- const index$3 = require("../index-DgrIJs-a.js");
16
+ const index$3 = require("../index-CAjUjAgI.js");
17
17
  const Content = ({ children }) => {
18
18
  return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", py: 4, children: /* @__PURE__ */ jsxRuntime.jsx(index.Container, { children }) });
19
19
  };
@@ -24,11 +24,11 @@ const Brand$1 = ({ brand }) => {
24
24
  ] });
25
25
  };
26
26
  const Copyright = () => {
27
- const { metadata } = index$1.useSiteContext();
27
+ const { metadata, localization } = index$1.useSiteContext();
28
28
  const { t } = reactI18next.useTranslation("footer");
29
29
  const siteName = metadata.name;
30
- const lang = metadata.lang;
31
- return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "small", colorScheme: "gray", display: "flex", align: "center", justifyContent: "center", children: t("copyright", { year: index$2.getCurrentYear(lang), siteName }) });
30
+ const defaultLocale = localization.defaultLocale.code;
31
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "small", colorScheme: "gray", display: "flex", align: "center", justifyContent: "center", children: t("copyright", { year: index$2.getCurrentYear(defaultLocale), siteName }) });
32
32
  };
33
33
  const Disclaimer = () => {
34
34
  const { metadata } = index$1.useSiteContext();
@@ -2,17 +2,17 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { Box, Divider, AbsoluteCenter, useColorModeValue, Text, SimpleGrid, Flex, Menu, MenuButton, Button, HStack, Icon, MenuList, MenuItem, Popover, PopoverTrigger, PopoverContent, List, ListItem, Stack, Collapse, useDisclosure, IconButton, Heading } from "@chakra-ui/react";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import "@mdx-js/react";
5
- import { L as Link, a as useSiteContext, u as usePageContext } from "../index-ClIPWZ3z.mjs";
5
+ import { L as Link, a as useSiteContext, u as usePageContext } from "../index-U-DmPFa7.mjs";
6
6
  import "../index-BJRvnR8Q.mjs";
7
7
  import "../index-RzByAgHO.mjs";
8
+ import { ChevronDownIcon, ChevronRightIcon, CloseIcon, HamburgerIcon, ChevronUpIcon } from "@chakra-ui/icons";
8
9
  import "react-medium-image-zoom";
9
10
  import { useMemo, forwardRef, useState, useEffect } from "react";
10
- import { a as Container, c as Logo, d as SocialNetworks, L as LinkButton } from "../index-D9i6mZaH.mjs";
11
- import { ChevronDownIcon, ChevronRightIcon, CloseIcon, HamburgerIcon, ChevronUpIcon } from "@chakra-ui/icons";
11
+ import { a as Container, c as Logo, d as SocialNetworks, L as LinkButton } from "../index-C7buhUOk.mjs";
12
12
  import "i18next";
13
13
  import "react-markdown";
14
14
  import { g as getCurrentYear } from "../index-BPthShL-.mjs";
15
- import { b as buildPath } from "../index-Bph7a3PR.mjs";
15
+ import { b as buildPath } from "../index-CQC6DRGf.mjs";
16
16
  const Content = ({ children }) => {
17
17
  return /* @__PURE__ */ jsx(Box, { as: "section", py: 4, children: /* @__PURE__ */ jsx(Container, { children }) });
18
18
  };
@@ -23,11 +23,11 @@ const Brand$1 = ({ brand }) => {
23
23
  ] });
24
24
  };
25
25
  const Copyright = () => {
26
- const { metadata } = useSiteContext();
26
+ const { metadata, localization } = useSiteContext();
27
27
  const { t } = useTranslation("footer");
28
28
  const siteName = metadata.name;
29
- const lang = metadata.lang;
30
- return /* @__PURE__ */ jsx(Text, { as: "small", colorScheme: "gray", display: "flex", align: "center", justifyContent: "center", children: t("copyright", { year: getCurrentYear(lang), siteName }) });
29
+ const defaultLocale = localization.defaultLocale.code;
30
+ return /* @__PURE__ */ jsx(Text, { as: "small", colorScheme: "gray", display: "flex", align: "center", justifyContent: "center", children: t("copyright", { year: getCurrentYear(defaultLocale), siteName }) });
31
31
  };
32
32
  const Disclaimer = () => {
33
33
  const { metadata } = useSiteContext();
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-DXTC3R_J.js");
4
- const index$1 = require("../index-B4M1IKzL.js");
3
+ const index = require("../index-DJSBjQzq.js");
4
+ const index$1 = require("../index-DZc8PJET.js");
5
5
  exports.MdxProvider = index.MdxProvider;
6
6
  exports.PageProvider = index$1.PageProvider;
7
7
  exports.SiteProvider = index$1.SiteProvider;
@@ -1,5 +1,5 @@
1
- import { M } from "../index-D1gNEJUA.mjs";
2
- import { P, S, u, a } from "../index-ClIPWZ3z.mjs";
1
+ import { M } from "../index-B5C9u9UE.mjs";
2
+ import { P, S, u, a } from "../index-U-DmPFa7.mjs";
3
3
  export {
4
4
  M as MdxProvider,
5
5
  P as PageProvider,
@@ -1,7 +1,8 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { ISiteConfig, ISiteLocalization, ISiteMetadata, ISiteNavigation } from '../../types';
2
+ import { ISiteConfig, ISiteLocalization, ISiteLogo, ISiteMetadata, ISiteNavigation } from '../../types';
3
3
  interface ISiteContext {
4
4
  metadata: ISiteMetadata;
5
+ logo: ISiteLogo;
5
6
  navigation: ISiteNavigation;
6
7
  localization: ISiteLocalization;
7
8
  config: ISiteConfig;
@@ -1,16 +1,2 @@
1
- export interface IStrapiNavigation {
2
- readonly items: ReadonlyArray<IStrapiNavigationGroup | null> | null;
3
- }
4
- export interface IStrapiNavigationGroup {
5
- readonly locale: string | null;
6
- readonly slug: string | null;
7
- readonly items: ReadonlyArray<IStrapiNavigationItem | null> | null;
8
- }
9
- export interface IStrapiNavigationItem {
10
- readonly type: string | null;
11
- readonly title: string | null;
12
- readonly slug: string | null;
13
- readonly path: string | null;
14
- readonly items: ReadonlyArray<IStrapiNavigationItem | null> | null;
15
- readonly menuAttached?: boolean | null;
16
- }
1
+ export * from './strapi-navigation';
2
+ export * from './strapi-page';
@@ -0,0 +1,16 @@
1
+ export interface IStrapiNavigation {
2
+ readonly items: ReadonlyArray<IStrapiNavigationGroup | null> | null;
3
+ }
4
+ export interface IStrapiNavigationGroup {
5
+ readonly locale: string | null;
6
+ readonly slug: string | null;
7
+ readonly items: ReadonlyArray<IStrapiNavigationItem | null> | null;
8
+ }
9
+ export interface IStrapiNavigationItem {
10
+ readonly type: string | null;
11
+ readonly title: string | null;
12
+ readonly slug: string | null;
13
+ readonly path: string | null;
14
+ readonly items: ReadonlyArray<IStrapiNavigationItem | null> | null;
15
+ readonly menuAttached?: boolean | null;
16
+ }
@@ -0,0 +1,45 @@
1
+ import { IGatsbyImageData } from '../components';
2
+ import { IHrefLang } from '../content';
3
+ export interface IStrapiAuthor {
4
+ readonly name: string;
5
+ readonly role: string;
6
+ readonly bio: string;
7
+ readonly avatar: {
8
+ readonly localFile: {
9
+ readonly childImageSharp: {
10
+ readonly gatsbyImageData: IGatsbyImageData | null;
11
+ } | null;
12
+ } | null;
13
+ };
14
+ readonly socialNetworks: {
15
+ readonly items: ReadonlyArray<{
16
+ readonly kind: string;
17
+ readonly url: string;
18
+ }> | null;
19
+ } | null;
20
+ }
21
+ 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';
22
+ export interface IStrapiComponentFragment {
23
+ __typename: StrapiComponentType;
24
+ [prop: string]: unknown;
25
+ }
26
+ export interface IStrapiRichText {
27
+ data: {
28
+ content: string;
29
+ };
30
+ }
31
+ export interface IStrapiPageData {
32
+ readonly locale: string | null;
33
+ readonly createdAt: string | null;
34
+ readonly updatedAt: string | null;
35
+ readonly canonicalUrl: string | null;
36
+ readonly seo: {
37
+ readonly metaTitle: string | null;
38
+ readonly metaDescription: string | null;
39
+ } | null;
40
+ readonly author: IStrapiAuthor | null;
41
+ readonly content: (IStrapiComponentFragment | null)[] | null;
42
+ }
43
+ export interface IStrapiPageContext {
44
+ hrefLangs?: IHrefLang[];
45
+ }
@@ -0,0 +1 @@
1
+ export type Nullable<T> = T | null;
@@ -0,0 +1,5 @@
1
+ export interface IGameDemo {
2
+ name: string;
3
+ src?: string;
4
+ refLink?: string;
5
+ }
@@ -7,6 +7,7 @@ export * from './common';
7
7
  export * from './external-image';
8
8
  export * from './faq';
9
9
  export * from './game-card';
10
+ export * from './game-demo';
10
11
  export * from './game-info';
11
12
  export * from './grid';
12
13
  export * from './how-to';
@@ -18,5 +19,4 @@ export * from './locale-switcher';
18
19
  export * from './navigation';
19
20
  export * from './pros-cons';
20
21
  export * from './social-network';
21
- export * from './strapi-component';
22
22
  export * from './tabs';
@@ -1,4 +1,41 @@
1
- export interface ISeo {
1
+ export interface ISeoMetadata {
2
2
  title: string;
3
3
  description: string;
4
4
  }
5
+ export interface IHrefLang {
6
+ href: string;
7
+ hrefLang: string;
8
+ }
9
+ interface IStructuredDataAuthor {
10
+ name: string;
11
+ url?: string;
12
+ }
13
+ interface IStructuredDataRating {
14
+ value: number;
15
+ min?: number;
16
+ max?: number;
17
+ }
18
+ interface IStructuredDataReview {
19
+ title: string;
20
+ description: string;
21
+ publishedAt: string;
22
+ updatedAt?: string;
23
+ rating?: IStructuredDataRating;
24
+ }
25
+ interface IStructuredDataGame {
26
+ name: string;
27
+ genre?: string;
28
+ }
29
+ export interface IStructuredDataContent {
30
+ author?: IStructuredDataAuthor;
31
+ review?: IStructuredDataReview;
32
+ game?: IStructuredDataGame;
33
+ }
34
+ type StructuredDataFormat = 'json-ld';
35
+ type StructuredDataEntity = 'game-review';
36
+ export interface IStructuredData {
37
+ format: StructuredDataFormat;
38
+ entity: StructuredDataEntity;
39
+ content: IStructuredDataContent;
40
+ }
41
+ export {};
@@ -1,7 +1,8 @@
1
1
  export * from './api';
2
+ export * from './common';
2
3
  export * from './components';
3
4
  export * from './content';
4
5
  export * from './i18n';
5
- export * from './page';
6
+ export * from './json-ld';
6
7
  export * from './site';
7
8
  export * from './theme';