@anywayseo/tools 1.5.3 → 2.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 (60) hide show
  1. package/dist/components/base/center/index.d.ts +1 -3
  2. package/dist/components/{expert → base/expert}/bio/index.d.ts +1 -1
  3. package/dist/components/{expert → base/expert}/index.d.ts +1 -1
  4. package/dist/components/base/grid/index.d.ts +3 -11
  5. package/dist/components/base/index.d.ts +2 -0
  6. package/dist/components/base/link-button/index.d.ts +2 -2
  7. package/dist/components/base/pulse-button/index.d.ts +8 -0
  8. package/dist/components/bonus-card/index.d.ts +1 -3
  9. package/dist/components/contact-form/index.d.ts +3 -1
  10. package/dist/components/expert-tip/index.d.ts +2 -3
  11. package/dist/components/faq/index.d.ts +2 -4
  12. package/dist/components/feature-card/index.d.ts +5 -0
  13. package/dist/components/features/index.d.ts +2 -3
  14. package/dist/components/game-card/index.d.ts +1 -3
  15. package/dist/components/game-demo/index.d.ts +3 -4
  16. package/dist/components/game-demo/preview/index.d.ts +3 -3
  17. package/dist/components/how-to/index.d.ts +2 -3
  18. package/dist/components/index.cjs +4 -1
  19. package/dist/components/index.d.ts +1 -0
  20. package/dist/components/index.mjs +12 -9
  21. package/dist/components/layout/footer/navigation/index.d.ts +5 -1
  22. package/dist/components/layout/header/{navbar/navigation → navigation}/desktop/item/index.d.ts +1 -1
  23. package/dist/components/layout/header/{navbar/navigation → navigation}/mobile/item/index.d.ts +1 -1
  24. package/dist/components/layout/header/{navbar/navigation → navigation}/types.d.ts +1 -1
  25. package/dist/components/list/index.d.ts +1 -2
  26. package/dist/components/pros-cons/index.d.ts +2 -3
  27. package/dist/components/table/index.d.ts +0 -1
  28. package/dist/components/tabs/index.d.ts +1 -2
  29. package/dist/index-BNb-P8a6.mjs +17 -0
  30. package/dist/index-BhsXlbd8.js +16 -0
  31. package/dist/{index-jvxaXXE3.js → index-BrTxsE2A.js} +18 -0
  32. package/dist/{index-DZkjaSoV.mjs → index-CHSIkTv7.mjs} +138 -141
  33. package/dist/index-CnohyDGd.js +965 -0
  34. package/dist/{index-CJvs4SfG.mjs → index-j8Vo42fz.mjs} +18 -0
  35. package/dist/index.cjs +9 -5
  36. package/dist/index.mjs +17 -13
  37. package/dist/providers/index.cjs +3 -3
  38. package/dist/providers/index.d.ts +1 -1
  39. package/dist/providers/index.mjs +3 -3
  40. package/dist/providers/site-provider/index.d.ts +11 -0
  41. package/dist/types/components/image/index.d.ts +2 -0
  42. package/dist/types/components/index.d.ts +1 -0
  43. package/dist/types/index.d.ts +1 -1
  44. package/dist/types/site/index.d.ts +32 -0
  45. package/dist/utils/animation/index.d.ts +8 -0
  46. package/dist/utils/index.cjs +2 -1
  47. package/dist/utils/index.d.ts +1 -0
  48. package/dist/utils/index.mjs +2 -1
  49. package/package.json +104 -105
  50. package/dist/components/layout/header/navbar/index.d.ts +0 -6
  51. package/dist/index-Bs4zA1wD.mjs +0 -17
  52. package/dist/index-C5pGuMKq.js +0 -968
  53. package/dist/index-D96zh94V.js +0 -16
  54. package/dist/providers/site-metadata-provider/index.d.ts +0 -14
  55. package/dist/types/site-metadata/index.d.ts +0 -10
  56. /package/dist/components/layout/header/{navbar/brand → brand}/index.d.ts +0 -0
  57. /package/dist/components/layout/header/{navbar/navigation → navigation}/desktop/index.d.ts +0 -0
  58. /package/dist/components/layout/header/{navbar/navigation → navigation}/index.d.ts +0 -0
  59. /package/dist/components/layout/header/{navbar/navigation → navigation}/mobile/index.d.ts +0 -0
  60. /package/dist/components/layout/header/{navbar/theme-toggler → theme-toggler}/index.d.ts +0 -0
@@ -1,18 +1,19 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { Box, Collapse, Text, Button, Flex, Stack, Card, CardHeader, Heading, CardBody, Center as Center$1, SimpleGrid, Link, Popover, PopoverTrigger, PopoverContent, PopoverBody, CardFooter, useToast, useColorModeValue, VStack, FormControl, FormLabel, InputGroup, InputLeftElement, Input, Textarea, Accordion, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, LinkBox, Image, LinkOverlay, IconButton, AbsoluteCenter, Spinner, useDisclosure, Divider, Circle, Container as Container$1, Icon, useBreakpointValue, List as List$1, ListItem, ListIcon, TableContainer, Table as Table$1, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, TabPanels, TabPanel } from "@chakra-ui/react";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { Center as Center$1, Box, Collapse, Text, Button, Flex, Stack, Image, SimpleGrid, Link, Card, CardHeader, Heading, CardBody, Popover, PopoverTrigger, PopoverContent, PopoverBody, CardFooter, useToast, useColorModeValue, VStack, FormControl, FormLabel, InputGroup, InputLeftElement, Input, Textarea, Accordion, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, LinkBox, LinkOverlay, IconButton, AbsoluteCenter, Spinner, useDisclosure, Divider, Circle, Container as Container$1, Icon, useBreakpointValue, List as List$1, ListItem, ListIcon, TableContainer, Table as Table$1, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, TabPanels, TabPanel } from "@chakra-ui/react";
3
3
  import { useTranslation } from "react-i18next";
4
- import { EmailIcon, StarIcon, CloseIcon, ExternalLinkIcon, ChevronRightIcon, ChevronDownIcon, HamburgerIcon, ChevronUpIcon, WarningIcon, CheckCircleIcon } from "@chakra-ui/icons";
5
- import { getImage, GatsbyImage } from "gatsby-plugin-image";
4
+ import { A as Animation, b as formatNumber, c as getCurrencySymbol, f as formatDate, d as getDomain, g as getCurrentYear, a as getCurrentMonth } from "./index-j8Vo42fz.mjs";
5
+ import { a as GameCharacteristic } from "./index-DxLcykuT.mjs";
6
+ import "@ctrl/tinycolor";
6
7
  import "@mdx-js/react";
7
- import { u as useSiteMetadataContext } from "./index-Bs4zA1wD.mjs";
8
+ import { u as useSiteContext } from "./index-BNb-P8a6.mjs";
8
9
  import { useRef, useState, useLayoutEffect, Fragment as Fragment$1, useEffect, useMemo } from "react";
10
+ import { EmailIcon, StarIcon, CloseIcon, ExternalLinkIcon, ChevronRightIcon, ChevronDownIcon, HamburgerIcon, ChevronUpIcon, WarningIcon, CheckCircleIcon } from "@chakra-ui/icons";
9
11
  import { u as usePrimaryColors } from "./index-xuSxvz5z.mjs";
10
- import { keyframes } from "@emotion/react";
11
- import { a as GameCharacteristic } from "./index-DxLcykuT.mjs";
12
12
  import { t } from "i18next";
13
- import { b as formatNumber, c as getCurrencySymbol, f as formatDate, d as getDomain, g as getCurrentYear, a as getCurrentMonth } from "./index-CJvs4SfG.mjs";
14
- import "@ctrl/tinycolor";
15
13
  import { Link as Link$1 } from "gatsby";
14
+ const Center = ({ children, ...boxProps }) => {
15
+ return /* @__PURE__ */ jsx(Center$1, { ...boxProps, children });
16
+ };
16
17
  const ONE_LINE_HEIGHT = 24;
17
18
  const Bio = ({ content, maxLines = 1 }) => {
18
19
  const ref = useRef(null);
@@ -38,13 +39,15 @@ const Bio = ({ content, maxLines = 1 }) => {
38
39
  ] });
39
40
  };
40
41
  const Expert = ({ expert, variant }) => {
42
+ var _a;
41
43
  const { firstName, lastName, jobTitle, bio } = expert;
42
- const { expertImageData } = useSiteMetadataContext();
43
- const image = getImage(expertImageData);
44
+ const { assets } = useSiteContext();
44
45
  const fullName = `${firstName} ${lastName}`;
46
+ const image = (_a = assets == null ? void 0 : assets.images) == null ? void 0 : _a.expert;
47
+ const imageComponent = typeof image === "string" ? /* @__PURE__ */ jsx(Image, { src: image, alt: fullName, rounded: "full" }) : image;
45
48
  if (variant === "short") {
46
49
  return /* @__PURE__ */ jsxs(Flex, { as: "article", align: "center", gap: 4, children: [
47
- !!image && /* @__PURE__ */ jsx(Box, { w: 12, h: 12, children: /* @__PURE__ */ jsx(GatsbyImage, { image, alt: fullName, style: { borderRadius: "50%" } }) }),
50
+ !!imageComponent && /* @__PURE__ */ jsx(Box, { w: 12, h: 12, children: imageComponent }),
48
51
  /* @__PURE__ */ jsxs(Box, { fontWeight: "semibold", children: [
49
52
  /* @__PURE__ */ jsx(Text, { children: fullName }),
50
53
  /* @__PURE__ */ jsx(Text, { color: "gray.500", children: expert.jobTitle })
@@ -52,7 +55,7 @@ const Expert = ({ expert, variant }) => {
52
55
  ] });
53
56
  }
54
57
  return /* @__PURE__ */ jsxs(Fragment, { children: [
55
- !!image && /* @__PURE__ */ jsx(Flex, { grow: 1, maxW: { base: 48, sm: 32 }, children: /* @__PURE__ */ jsx(GatsbyImage, { image, alt: fullName, style: { borderRadius: "50%" } }) }),
58
+ !!imageComponent && /* @__PURE__ */ jsx(Flex, { grow: 1, maxW: { base: 48, sm: 32 }, children: imageComponent }),
56
59
  /* @__PURE__ */ jsx(Flex, { w: "100%", children: /* @__PURE__ */ jsxs(Stack, { children: [
57
60
  /* @__PURE__ */ jsxs(Text, { fontSize: "lg", fontWeight: 600, children: [
58
61
  `${fullName}, `,
@@ -62,43 +65,11 @@ const Expert = ({ expert, variant }) => {
62
65
  ] }) })
63
66
  ] });
64
67
  };
65
- const Author = ({ author, ...cardProps }) => {
66
- const { t: t2 } = useTranslation("author");
67
- return /* @__PURE__ */ jsxs(Card, { as: "article", variant: "filled", ...cardProps, children: [
68
- /* @__PURE__ */ jsx(CardHeader, { pb: 0, children: /* @__PURE__ */ jsx(Heading, { size: "md", children: t2("title") }) }),
69
- /* @__PURE__ */ jsx(
70
- CardBody,
71
- {
72
- display: "flex",
73
- flexDirection: { base: "column", sm: "row" },
74
- alignItems: { base: "center", sm: "flex-start" },
75
- gap: 4,
76
- children: /* @__PURE__ */ jsx(Expert, { expert: author, variant: "full" })
77
- }
78
- )
79
- ] });
80
- };
81
- const Center = ({ children, className, ...boxProps }) => {
82
- return /* @__PURE__ */ jsx(Center$1, { className, ...boxProps, children });
83
- };
84
68
  const defaultColumns = { base: 1, sm: 2, md: 3, lg: 4, xl: 5 };
85
- const Grid = ({ items, columns = defaultColumns, gap, render, getKey, className, ...boxProps }) => {
86
- return /* @__PURE__ */ jsx(
87
- SimpleGrid,
88
- {
89
- as: "ul",
90
- columns,
91
- spacing: gap,
92
- p: 0,
93
- m: 0,
94
- listStyleType: "none",
95
- className,
96
- ...boxProps,
97
- children: items.map((item, index) => /* @__PURE__ */ jsx(Box, { as: "li", children: render(item) }, getKey ? getKey(item) : index))
98
- }
99
- );
69
+ const Grid = ({ items, columns = defaultColumns, gap, render, getKey, ...boxProps }) => {
70
+ return /* @__PURE__ */ jsx(SimpleGrid, { as: "ul", columns, spacing: gap, p: 0, m: 0, listStyleType: "none", ...boxProps, children: items.map((item, index) => /* @__PURE__ */ jsx(Box, { as: "li", children: render(item) }, getKey ? getKey(item) : index)) });
100
71
  };
101
- const LinkButton = ({ label, url, width = "auto" }) => {
72
+ const LinkButton = ({ label, url, width = "auto", ...boxProps }) => {
102
73
  return /* @__PURE__ */ jsx(
103
74
  Button,
104
75
  {
@@ -109,10 +80,41 @@ const LinkButton = ({ label, url, width = "auto" }) => {
109
80
  textTransform: "uppercase",
110
81
  _hover: { textDecoration: "none", bg: "brand.300" },
111
82
  _active: { transform: "scale(0.95)" },
83
+ ...boxProps,
112
84
  children: label
113
85
  }
114
86
  );
115
87
  };
88
+ const PulseButton = ({ label, onClick }) => {
89
+ return /* @__PURE__ */ jsx(
90
+ Button,
91
+ {
92
+ size: { base: "sm", md: "lg" },
93
+ color: "gray.200",
94
+ bgColor: "brand.500",
95
+ animation: `${Animation.pulse} 2s infinite linear`,
96
+ _hover: { bgColor: "brand.200", color: "gray.700" },
97
+ onClick,
98
+ children: label
99
+ }
100
+ );
101
+ };
102
+ const Author = ({ author, ...cardProps }) => {
103
+ const { t: t2 } = useTranslation("author");
104
+ return /* @__PURE__ */ jsxs(Card, { as: "article", variant: "filled", ...cardProps, children: [
105
+ /* @__PURE__ */ jsx(CardHeader, { pb: 0, children: /* @__PURE__ */ jsx(Heading, { size: "md", children: t2("title") }) }),
106
+ /* @__PURE__ */ jsx(
107
+ CardBody,
108
+ {
109
+ display: "flex",
110
+ flexDirection: { base: "column", sm: "row" },
111
+ alignItems: { base: "center", sm: "flex-start" },
112
+ gap: 4,
113
+ children: /* @__PURE__ */ jsx(Expert, { expert: author, variant: "full" })
114
+ }
115
+ )
116
+ ] });
117
+ };
116
118
  const BonusCardContent = ({ content }) => {
117
119
  const { t: t2 } = useTranslation("author");
118
120
  return /* @__PURE__ */ jsx(Popover, { flip: false, matchWidth: false, placement: "bottom", children: ({ isOpen }) => /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -137,14 +139,13 @@ const BonusCardTitle = ({ content }) => {
137
139
  }
138
140
  );
139
141
  };
140
- const BonusCard = ({ title, subtitle, content, link, image, className }) => {
142
+ const BonusCard = ({ title, subtitle, content, link, image }) => {
141
143
  return /* @__PURE__ */ jsxs(
142
144
  Card,
143
145
  {
144
146
  as: "article",
145
147
  h: "full",
146
148
  bg: "linear-gradient(90deg, #3b1f47, #731d58)",
147
- overflow: "hidden",
148
149
  _before: image ? {
149
150
  content: '""',
150
151
  position: "absolute",
@@ -158,7 +159,6 @@ const BonusCard = ({ title, subtitle, content, link, image, className }) => {
158
159
  filter: "blur(0.05em) opacity(50%)",
159
160
  zIndex: 0
160
161
  } : void 0,
161
- className,
162
162
  children: [
163
163
  /* @__PURE__ */ jsxs(CardBody, { as: "section", pb: 0, flex: 1, children: [
164
164
  /* @__PURE__ */ jsx(BonusCardTitle, { content: title }),
@@ -170,7 +170,7 @@ const BonusCard = ({ title, subtitle, content, link, image, className }) => {
170
170
  }
171
171
  );
172
172
  };
173
- const ContactForm = () => {
173
+ const ContactForm = ({ ...boxProps }) => {
174
174
  const toast = useToast();
175
175
  const { t: t2 } = useTranslation("contactForm");
176
176
  function handleSubmit(event) {
@@ -204,6 +204,7 @@ const ContactForm = () => {
204
204
  bg: useColorModeValue("white", "gray.700"),
205
205
  shadow: "base",
206
206
  onSubmit: handleSubmit,
207
+ ...boxProps,
207
208
  children: /* @__PURE__ */ jsxs(VStack, { spacing: 4, children: [
208
209
  /* @__PURE__ */ jsxs(FormControl, { isRequired: true, children: [
209
210
  /* @__PURE__ */ jsx(FormLabel, { children: t2("field.name.label") }),
@@ -264,9 +265,9 @@ const ExpertTip = ({ tip, expert, ...boxProps }) => {
264
265
  }
265
266
  );
266
267
  };
267
- const Faq = ({ items, mb }) => {
268
+ const Faq = ({ items, ...boxProps }) => {
268
269
  const { bgColor, color } = usePrimaryColors();
269
- return /* @__PURE__ */ jsx(Accordion, { allowToggle: true, mb, children: items.map(({ question, answer }) => {
270
+ return /* @__PURE__ */ jsx(Accordion, { allowToggle: true, ...boxProps, children: items.map(({ question, answer }) => {
270
271
  return /* @__PURE__ */ jsxs(AccordionItem, { border: 0, children: [
271
272
  /* @__PURE__ */ jsx(Box, { as: "h3", children: /* @__PURE__ */ jsxs(AccordionButton, { _hover: { color, bgColor }, children: [
272
273
  /* @__PURE__ */ jsx(Box, { as: "span", flex: "1", textAlign: "left", fontWeight: "bold", children: question }),
@@ -276,17 +277,30 @@ const Faq = ({ items, mb }) => {
276
277
  ] }, question);
277
278
  }) });
278
279
  };
279
- const Features = ({ features, ...boxProps }) => {
280
- return /* @__PURE__ */ jsx(SimpleGrid, { as: "ul", columns: { base: 1, md: 2, lg: 3 }, spacing: 10, p: 0, ...boxProps, children: features.map(({ title, description }) => /* @__PURE__ */ jsx(Stack, { as: "li", children: /* @__PURE__ */ jsxs(Card, { as: "article", variant: "outline", textAlign: "center", h: "100%", children: [
280
+ const FeatureCard = ({ title, description }) => {
281
+ return /* @__PURE__ */ jsxs(Card, { as: "article", variant: "outline", textAlign: "center", h: "100%", children: [
281
282
  /* @__PURE__ */ jsxs(CardHeader, { as: "header", display: "flex", alignItems: "center", justifyContent: "center", gap: 2, pb: 2, children: [
282
283
  /* @__PURE__ */ jsx(StarIcon, { w: 8, h: 8, color: "yellow.400" }),
283
284
  /* @__PURE__ */ jsx(Text, { fontWeight: 600, children: title }),
284
285
  /* @__PURE__ */ jsx(StarIcon, { w: 8, h: 8, color: "yellow.400" })
285
286
  ] }),
286
- /* @__PURE__ */ jsx(CardBody, { as: "section", pt: 0, children: /* @__PURE__ */ jsx(Text, { color: "gray.600", children: description }) })
287
- ] }) }, title)) });
287
+ /* @__PURE__ */ jsx(CardBody, { as: "section", pt: 0, children: /* @__PURE__ */ jsx(Text, { color: "gray.200", children: description }) })
288
+ ] });
289
+ };
290
+ const Features = ({ features, ...boxProps }) => {
291
+ return /* @__PURE__ */ jsx(
292
+ Grid,
293
+ {
294
+ items: features,
295
+ columns: { base: 1, md: 2, lg: 3 },
296
+ gap: 10,
297
+ getKey: ({ title }) => title,
298
+ render: (item) => /* @__PURE__ */ jsx(FeatureCard, { ...item }),
299
+ ...boxProps
300
+ }
301
+ );
288
302
  };
289
- const GameCard = ({ name, image, link, className }) => {
303
+ const GameCard = ({ name, image, link }) => {
290
304
  return /* @__PURE__ */ jsxs(
291
305
  LinkBox,
292
306
  {
@@ -298,7 +312,6 @@ const GameCard = ({ name, image, link, className }) => {
298
312
  overflow: "hidden",
299
313
  bg: "blackAlpha.400",
300
314
  _hover: { transform: "scale(1.1)" },
301
- className,
302
315
  children: [
303
316
  typeof image === "string" ? /* @__PURE__ */ jsx(Image, { src: image, alt: name, w: "100%", aspectRatio: "16/9", objectFit: "cover", objectPosition: "center" }) : !!image && /* @__PURE__ */ jsx(Box, { w: "100%", aspectRatio: "16/9", children: image }),
304
317
  /* @__PURE__ */ jsx(Box, { as: "section", rounded: "md", p: 4, children: /* @__PURE__ */ jsx(Text, { as: "span", children: link ? /* @__PURE__ */ jsx(LinkOverlay, { href: link, children: name }) : name }) })
@@ -345,37 +358,15 @@ const GameDemoContent = ({ src, isFullscreen, isLoaded, onLoad, onToggleFullscre
345
358
  /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsx(Spinner, { size: "xl", thickness: "0.6rem", display: isLoaded ? "none" : "block", color: "brand.100" }) })
346
359
  ] });
347
360
  };
348
- const pulse = keyframes`
349
- 0% {
350
- box-shadow: 0 0 0 0 var(--chakra-colors-brand-100);
351
- }
352
-
353
- 50% {
354
- box-shadow: 0 0 0 0.8rem rgba(0, 0, 0, 0);
355
- }
356
-
357
- 100% {
358
- box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
359
- }
360
- `;
361
- const GameDemoPreview = ({ gameName, onPlay }) => {
362
- const { gamePreviewImageData } = useSiteMetadataContext();
361
+ const GameDemoPreview = ({ alt, imageFit = "contain", onPlay }) => {
362
+ var _a;
363
+ const { assets } = useSiteContext();
363
364
  const { t: t2 } = useTranslation("gameDemo");
364
- const image = getImage(gamePreviewImageData);
365
+ const gamePreviewImage = (_a = assets == null ? void 0 : assets.images) == null ? void 0 : _a.gamePreview;
366
+ const gamePreviewImageComponent = typeof gamePreviewImage === "string" ? /* @__PURE__ */ jsx(Image, { src: gamePreviewImage, alt, objectFit: imageFit }) : gamePreviewImage;
365
367
  return /* @__PURE__ */ jsxs(Fragment, { children: [
366
- !!image && /* @__PURE__ */ jsx(GatsbyImage, { image, alt: `Play ${gameName} online`, objectFit: "contain" }),
367
- /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsx(
368
- Button,
369
- {
370
- size: { base: "sm", md: "lg" },
371
- color: "gray.200",
372
- bgColor: "brand.500",
373
- animation: `${pulse} 2s infinite linear`,
374
- _hover: { bgColor: "brand.200", color: "gray.700" },
375
- onClick: onPlay,
376
- children: t2("action.playForFree")
377
- }
378
- ) })
368
+ gamePreviewImageComponent,
369
+ /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsx(PulseButton, { label: t2("action.playForFree"), onClick: onPlay }) })
379
370
  ] });
380
371
  };
381
372
  const GameDemo = ({ name, src, previewImageFit, ...boxProps }) => {
@@ -410,7 +401,7 @@ const GameDemo = ({ name, src, previewImageFit, ...boxProps }) => {
410
401
  onLoad,
411
402
  onToggleFullscreen: handleToggleFullscreen
412
403
  }
413
- ) : /* @__PURE__ */ jsx(GameDemoPreview, { gameName: name, previewImageFit, onPlay: handlePlay })
404
+ ) : /* @__PURE__ */ jsx(GameDemoPreview, { alt: name, imageFit: previewImageFit, onPlay: handlePlay })
414
405
  }
415
406
  );
416
407
  };
@@ -471,8 +462,8 @@ function getGameInfoItemValue(key, value, currency) {
471
462
  return formattedValue;
472
463
  }
473
464
  const GameInfo = ({ info }) => {
474
- const { siteMetadata } = useSiteMetadataContext();
475
- const { currency } = siteMetadata;
465
+ const { metadata } = useSiteContext();
466
+ const { currency } = metadata;
476
467
  const { t: t2 } = useTranslation("gameInfo");
477
468
  return /* @__PURE__ */ jsx(
478
469
  Box,
@@ -514,37 +505,36 @@ const Content = ({ children }) => {
514
505
  return /* @__PURE__ */ jsx(Box, { as: "section", py: 4, children: /* @__PURE__ */ jsx(Container, { children }) });
515
506
  };
516
507
  const Logo = () => {
517
- const { logoImageData } = useSiteMetadataContext();
518
- const image = getImage(logoImageData);
508
+ var _a;
509
+ const { assets } = useSiteContext();
510
+ const image = (_a = assets == null ? void 0 : assets.images) == null ? void 0 : _a.logo;
519
511
  if (!image) {
520
512
  return null;
521
513
  }
522
- return /* @__PURE__ */ jsx(GatsbyImage, { image, objectFit: "contain", alt: "Logo" });
514
+ return /* @__PURE__ */ jsx(Box, { display: "flex", h: { base: 10, md: 14 }, overflow: "hidden", children: typeof image === "string" ? /* @__PURE__ */ jsx(Image, { src: image, alt: "Logo", objectFit: "contain" }) : image });
523
515
  };
524
516
  const Brand$1 = ({ brand }) => {
525
517
  return /* @__PURE__ */ jsxs(Box, { position: "relative", my: 2, py: 8, children: [
526
518
  /* @__PURE__ */ jsx(Divider, {}),
527
- /* @__PURE__ */ jsx(AbsoluteCenter, { display: "flex", bgColor: useColorModeValue("gray.50", "gray.900"), children: /* @__PURE__ */ jsx(Box, { as: Link$1, to: "/", children: brand }) })
519
+ /* @__PURE__ */ jsx(AbsoluteCenter, { display: "flex", bgColor: useColorModeValue("gray.50", "gray.900"), children: /* @__PURE__ */ jsx(Link$1, { to: "/", children: brand }) })
528
520
  ] });
529
521
  };
530
522
  const Copyright = () => {
531
- const { siteMetadata } = useSiteMetadataContext();
532
- const { siteUrl } = siteMetadata;
523
+ const { metadata } = useSiteContext();
524
+ const { siteUrl } = metadata;
533
525
  const { t: t2 } = useTranslation("footer");
534
526
  return /* @__PURE__ */ jsx(Text, { as: "small", colorScheme: "gray", display: "flex", align: "center", justifyContent: "center", children: t2("copyright", { year: getCurrentYear(), domain: getDomain(siteUrl) }) });
535
527
  };
536
528
  const Disclaimer = () => {
537
- const { siteMetadata } = useSiteMetadataContext();
538
- const { siteUrl } = siteMetadata;
529
+ const { metadata } = useSiteContext();
530
+ const { siteUrl } = metadata;
539
531
  const { t: t2 } = useTranslation("footer");
540
532
  return /* @__PURE__ */ jsxs(Text, { as: "small", colorScheme: "gray", fontSize: "sm", children: [
541
533
  /* @__PURE__ */ jsx(Text, { as: "span", fontWeight: "bold", color: "red.600", children: t2("disclaimer.title") }),
542
534
  t2("disclaimer.description", { domain: getDomain(siteUrl) })
543
535
  ] });
544
536
  };
545
- const Navigation$1 = () => {
546
- const { siteMetadata } = useSiteMetadataContext();
547
- const { footerMenuLinks } = siteMetadata;
537
+ const Navigation$1 = ({ menu }) => {
548
538
  return /* @__PURE__ */ jsx(
549
539
  SimpleGrid,
550
540
  {
@@ -554,7 +544,7 @@ const Navigation$1 = () => {
554
544
  spacing: 4,
555
545
  justifyItems: { base: "flex-start", md: "center" },
556
546
  justifyContent: "space-between",
557
- children: footerMenuLinks.map(({ url, title }) => /* @__PURE__ */ jsx(
547
+ children: menu.map(({ url, title }) => /* @__PURE__ */ jsx(
558
548
  Text,
559
549
  {
560
550
  as: Link$1,
@@ -571,6 +561,9 @@ const Navigation$1 = () => {
571
561
  );
572
562
  };
573
563
  const Footer = () => {
564
+ var _a;
565
+ const { configs } = useSiteContext();
566
+ const navigation = ((_a = configs == null ? void 0 : configs.footer) == null ? void 0 : _a.navigation) ?? [];
574
567
  return /* @__PURE__ */ jsx(
575
568
  Box,
576
569
  {
@@ -579,7 +572,7 @@ const Footer = () => {
579
572
  color: useColorModeValue("gray.700", "gray.200"),
580
573
  py: 4,
581
574
  children: /* @__PURE__ */ jsxs(Container, { children: [
582
- /* @__PURE__ */ jsx(Navigation$1, {}),
575
+ /* @__PURE__ */ jsx(Navigation$1, { menu: navigation }),
583
576
  /* @__PURE__ */ jsx(Disclaimer, {}),
584
577
  /* @__PURE__ */ jsx(Brand$1, { brand: /* @__PURE__ */ jsx(Logo, {}) }),
585
578
  /* @__PURE__ */ jsx(Copyright, {})
@@ -588,18 +581,7 @@ const Footer = () => {
588
581
  );
589
582
  };
590
583
  const Brand = ({ brand }) => {
591
- return /* @__PURE__ */ jsx(
592
- Box,
593
- {
594
- as: Link$1,
595
- to: "/",
596
- display: "flex",
597
- h: { base: "40px", md: "60px" },
598
- fontFamily: "heading",
599
- color: useColorModeValue("gray.800", "white"),
600
- children: brand
601
- }
602
- );
584
+ return /* @__PURE__ */ jsx(Link$1, { to: "/", children: brand });
603
585
  };
604
586
  const DesktopNavItem = ({ title, url, children }) => {
605
587
  const background = useColorModeValue("white", "gray.800");
@@ -617,7 +599,7 @@ const DesktopNavItem = ({ title, url, children }) => {
617
599
  children: title
618
600
  }
619
601
  ) }),
620
- !!children && /* @__PURE__ */ jsx(PopoverContent, { p: 4, border: 0, minW: "sm", rounded: "xl", boxShadow: "xl", bg: background, children: /* @__PURE__ */ jsx(Stack, { as: "ul", children: children.map((child) => /* @__PURE__ */ jsx(
602
+ !!children && /* @__PURE__ */ jsx(PopoverContent, { p: 2, border: 0, minW: "sm", rounded: "xl", boxShadow: "xl", bg: background, children: /* @__PURE__ */ jsx(Stack, { as: "ul", p: 0, children: children.map((child) => /* @__PURE__ */ jsx(
621
603
  Box,
622
604
  {
623
605
  as: "li",
@@ -652,7 +634,7 @@ const DesktopNavItem = ({ title, url, children }) => {
652
634
  ] });
653
635
  };
654
636
  const DesktopNavigation = ({ menu }) => {
655
- return /* @__PURE__ */ jsx(Stack, { as: "ul", direction: "row", spacing: 4, children: menu.map((item) => /* @__PURE__ */ jsx(Flex, { as: "li", children: /* @__PURE__ */ jsx(DesktopNavItem, { ...item }) }, item.url)) });
637
+ return /* @__PURE__ */ jsx(Flex, { as: "ul", direction: "row", gap: 4, p: 0, children: menu.map((item) => /* @__PURE__ */ jsx(Flex, { as: "li", children: /* @__PURE__ */ jsx(DesktopNavItem, { ...item }) }, item.url)) });
656
638
  };
657
639
  const MobileNavItem = ({ title, children, url }) => {
658
640
  const { isOpen, onToggle } = useDisclosure();
@@ -704,14 +686,11 @@ const Navigation = ({ menu }) => {
704
686
  const isDesktop = useBreakpointValue({ base: false, md: true });
705
687
  return isDesktop ? /* @__PURE__ */ jsx(DesktopNavigation, { menu }) : /* @__PURE__ */ jsx(MobileNavigation, { menu });
706
688
  };
707
- const Navbar = ({ brand }) => {
708
- const menu = [];
709
- return /* @__PURE__ */ jsxs(Flex, { as: "nav", gap: 2, py: 1, children: [
710
- /* @__PURE__ */ jsx(Brand, { brand }),
711
- /* @__PURE__ */ jsx(Flex, { as: "section", flex: 1, align: "center", justifyContent: "flex-end", gap: 2, children: /* @__PURE__ */ jsx(Navigation, { menu }) })
712
- ] });
713
- };
714
689
  const Header = () => {
690
+ var _a, _b;
691
+ const { configs } = useSiteContext();
692
+ const navigation = ((_a = configs == null ? void 0 : configs.header) == null ? void 0 : _a.navigation) ?? [];
693
+ const toolbar = (_b = configs == null ? void 0 : configs.header) == null ? void 0 : _b.toolbar;
715
694
  return /* @__PURE__ */ jsx(
716
695
  Box,
717
696
  {
@@ -722,7 +701,24 @@ const Header = () => {
722
701
  color: useColorModeValue("gray.700", "gray.200"),
723
702
  boxShadow: "sm",
724
703
  zIndex: 100,
725
- children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(Navbar, { brand: /* @__PURE__ */ jsx(Logo, {}) }) })
704
+ children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs(Flex, { as: "nav", gap: 2, py: 1, children: [
705
+ /* @__PURE__ */ jsx(Brand, { brand: /* @__PURE__ */ jsx(Logo, {}) }),
706
+ (!!navigation.length || !!toolbar) && /* @__PURE__ */ jsxs(
707
+ Flex,
708
+ {
709
+ as: "section",
710
+ flex: 1,
711
+ flexDir: { base: "row-reverse", md: "row" },
712
+ justifyContent: { base: "flex-end", md: "flex-start" },
713
+ align: "center",
714
+ gap: 2,
715
+ children: [
716
+ !!navigation.length && /* @__PURE__ */ jsx(Flex, { flex: { base: 0, md: 1 }, children: /* @__PURE__ */ jsx(Navigation, { menu: navigation }) }),
717
+ !!toolbar && /* @__PURE__ */ jsx(Flex, { gap: 2, flex: { base: 1, md: 0 }, justifyContent: "flex-end", children: toolbar })
718
+ ]
719
+ }
720
+ )
721
+ ] }) })
726
722
  }
727
723
  );
728
724
  };
@@ -807,8 +803,8 @@ const Layout = ({ children }) => {
807
803
  /* @__PURE__ */ jsx(ScrollToTop, {})
808
804
  ] });
809
805
  };
810
- const List = ({ items, bullet = "—", render, className, ...boxProps }) => {
811
- return /* @__PURE__ */ jsx(List$1, { pl: 0, ml: 2, mb: 4, className, ...boxProps, children: items.map((item, index) => /* @__PURE__ */ jsxs(ListItem, { display: "flex", gap: 1, children: [
806
+ const List = ({ items, bullet = "—", render, ...boxProps }) => {
807
+ return /* @__PURE__ */ jsx(List$1, { pl: 0, ml: 2, mb: 4, ...boxProps, children: items.map((item, index) => /* @__PURE__ */ jsxs(ListItem, { display: "flex", gap: 1, children: [
812
808
  /* @__PURE__ */ jsx(Box, { children: bullet }),
813
809
  render ? render(item) : item
814
810
  ] }, index)) });
@@ -909,7 +905,6 @@ const Table = ({
909
905
  bordered = false,
910
906
  striped = true,
911
907
  scrollable,
912
- className,
913
908
  ...boxProps
914
909
  }) => {
915
910
  const headerItems = items.slice(0, columnNumber);
@@ -919,7 +914,6 @@ const Table = ({
919
914
  {
920
915
  border: bordered ? void 0 : "none",
921
916
  ...scrollable ? { maxH: "50vh", overflowY: "auto" } : {},
922
- className,
923
917
  ...boxProps,
924
918
  children: [
925
919
  /* @__PURE__ */ jsxs(Table$1, { variant: striped ? "striped" : "simple", children: [
@@ -931,7 +925,7 @@ const Table = ({
931
925
  }
932
926
  );
933
927
  };
934
- const Tabs = ({ items, className, render, ...boxProps }) => {
928
+ const Tabs = ({ items, render, ...boxProps }) => {
935
929
  const { tabs, panels } = useMemo(() => {
936
930
  const tabs2 = [];
937
931
  const panels2 = [];
@@ -941,7 +935,7 @@ const Tabs = ({ items, className, render, ...boxProps }) => {
941
935
  });
942
936
  return { tabs: tabs2, panels: panels2 };
943
937
  }, []);
944
- return /* @__PURE__ */ jsxs(Tabs$1, { overflow: "hidden", colorScheme: "brand", className, ...boxProps, children: [
938
+ return /* @__PURE__ */ jsxs(Tabs$1, { overflow: "hidden", colorScheme: "brand", ...boxProps, children: [
945
939
  /* @__PURE__ */ jsx(TabList, { overflow: "auto hidden", children: tabs.map(({ label, icon }, index) => /* @__PURE__ */ jsx(Tab, { children: /* @__PURE__ */ jsx(Text, { as: "h3", isTruncated: true, children: icon ? `${icon} ${label}` : label }) }, index)) }),
946
940
  /* @__PURE__ */ jsx(TabPanels, { children: panels.map((panel, index) => /* @__PURE__ */ jsx(TabPanel, { children: render(panel) }, index)) })
947
941
  ] });
@@ -958,12 +952,15 @@ export {
958
952
  ProsCons as P,
959
953
  Seo as S,
960
954
  Table as T,
961
- Features as a,
962
- GameDemo as b,
963
- GameInfo as c,
964
- List as d,
965
- Tabs as e,
966
- Center as f,
967
- Grid as g,
968
- LinkButton as h
955
+ FeatureCard as a,
956
+ Features as b,
957
+ GameDemo as c,
958
+ GameInfo as d,
959
+ List as e,
960
+ Tabs as f,
961
+ Center as g,
962
+ Expert as h,
963
+ Grid as i,
964
+ LinkButton as j,
965
+ PulseButton as k
969
966
  };