@anywayseo/tools 1.5.4 → 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-C95D6IAi.mjs → index-CHSIkTv7.mjs} +138 -140
  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-BbMf3hdf.js +0 -967
  52. package/dist/index-Bs4zA1wD.mjs +0 -17
  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,
84
+ children: label
85
+ }
86
+ );
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,
112
98
  children: label
113
99
  }
114
100
  );
115
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,7 +139,7 @@ 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
  {
@@ -157,7 +159,6 @@ const BonusCard = ({ title, subtitle, content, link, image, className }) => {
157
159
  filter: "blur(0.05em) opacity(50%)",
158
160
  zIndex: 0
159
161
  } : void 0,
160
- className,
161
162
  children: [
162
163
  /* @__PURE__ */ jsxs(CardBody, { as: "section", pb: 0, flex: 1, children: [
163
164
  /* @__PURE__ */ jsx(BonusCardTitle, { content: title }),
@@ -169,7 +170,7 @@ const BonusCard = ({ title, subtitle, content, link, image, className }) => {
169
170
  }
170
171
  );
171
172
  };
172
- const ContactForm = () => {
173
+ const ContactForm = ({ ...boxProps }) => {
173
174
  const toast = useToast();
174
175
  const { t: t2 } = useTranslation("contactForm");
175
176
  function handleSubmit(event) {
@@ -203,6 +204,7 @@ const ContactForm = () => {
203
204
  bg: useColorModeValue("white", "gray.700"),
204
205
  shadow: "base",
205
206
  onSubmit: handleSubmit,
207
+ ...boxProps,
206
208
  children: /* @__PURE__ */ jsxs(VStack, { spacing: 4, children: [
207
209
  /* @__PURE__ */ jsxs(FormControl, { isRequired: true, children: [
208
210
  /* @__PURE__ */ jsx(FormLabel, { children: t2("field.name.label") }),
@@ -263,9 +265,9 @@ const ExpertTip = ({ tip, expert, ...boxProps }) => {
263
265
  }
264
266
  );
265
267
  };
266
- const Faq = ({ items, mb }) => {
268
+ const Faq = ({ items, ...boxProps }) => {
267
269
  const { bgColor, color } = usePrimaryColors();
268
- 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 }) => {
269
271
  return /* @__PURE__ */ jsxs(AccordionItem, { border: 0, children: [
270
272
  /* @__PURE__ */ jsx(Box, { as: "h3", children: /* @__PURE__ */ jsxs(AccordionButton, { _hover: { color, bgColor }, children: [
271
273
  /* @__PURE__ */ jsx(Box, { as: "span", flex: "1", textAlign: "left", fontWeight: "bold", children: question }),
@@ -275,17 +277,30 @@ const Faq = ({ items, mb }) => {
275
277
  ] }, question);
276
278
  }) });
277
279
  };
278
- const Features = ({ features, ...boxProps }) => {
279
- 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: [
280
282
  /* @__PURE__ */ jsxs(CardHeader, { as: "header", display: "flex", alignItems: "center", justifyContent: "center", gap: 2, pb: 2, children: [
281
283
  /* @__PURE__ */ jsx(StarIcon, { w: 8, h: 8, color: "yellow.400" }),
282
284
  /* @__PURE__ */ jsx(Text, { fontWeight: 600, children: title }),
283
285
  /* @__PURE__ */ jsx(StarIcon, { w: 8, h: 8, color: "yellow.400" })
284
286
  ] }),
285
- /* @__PURE__ */ jsx(CardBody, { as: "section", pt: 0, children: /* @__PURE__ */ jsx(Text, { color: "gray.600", children: description }) })
286
- ] }) }, 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
+ );
287
302
  };
288
- const GameCard = ({ name, image, link, className }) => {
303
+ const GameCard = ({ name, image, link }) => {
289
304
  return /* @__PURE__ */ jsxs(
290
305
  LinkBox,
291
306
  {
@@ -297,7 +312,6 @@ const GameCard = ({ name, image, link, className }) => {
297
312
  overflow: "hidden",
298
313
  bg: "blackAlpha.400",
299
314
  _hover: { transform: "scale(1.1)" },
300
- className,
301
315
  children: [
302
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 }),
303
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 }) })
@@ -344,37 +358,15 @@ const GameDemoContent = ({ src, isFullscreen, isLoaded, onLoad, onToggleFullscre
344
358
  /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsx(Spinner, { size: "xl", thickness: "0.6rem", display: isLoaded ? "none" : "block", color: "brand.100" }) })
345
359
  ] });
346
360
  };
347
- const pulse = keyframes`
348
- 0% {
349
- box-shadow: 0 0 0 0 var(--chakra-colors-brand-100);
350
- }
351
-
352
- 50% {
353
- box-shadow: 0 0 0 0.8rem rgba(0, 0, 0, 0);
354
- }
355
-
356
- 100% {
357
- box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
358
- }
359
- `;
360
- const GameDemoPreview = ({ gameName, onPlay }) => {
361
- const { gamePreviewImageData } = useSiteMetadataContext();
361
+ const GameDemoPreview = ({ alt, imageFit = "contain", onPlay }) => {
362
+ var _a;
363
+ const { assets } = useSiteContext();
362
364
  const { t: t2 } = useTranslation("gameDemo");
363
- 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;
364
367
  return /* @__PURE__ */ jsxs(Fragment, { children: [
365
- !!image && /* @__PURE__ */ jsx(GatsbyImage, { image, alt: `Play ${gameName} online`, objectFit: "contain" }),
366
- /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsx(
367
- Button,
368
- {
369
- size: { base: "sm", md: "lg" },
370
- color: "gray.200",
371
- bgColor: "brand.500",
372
- animation: `${pulse} 2s infinite linear`,
373
- _hover: { bgColor: "brand.200", color: "gray.700" },
374
- onClick: onPlay,
375
- children: t2("action.playForFree")
376
- }
377
- ) })
368
+ gamePreviewImageComponent,
369
+ /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsx(PulseButton, { label: t2("action.playForFree"), onClick: onPlay }) })
378
370
  ] });
379
371
  };
380
372
  const GameDemo = ({ name, src, previewImageFit, ...boxProps }) => {
@@ -409,7 +401,7 @@ const GameDemo = ({ name, src, previewImageFit, ...boxProps }) => {
409
401
  onLoad,
410
402
  onToggleFullscreen: handleToggleFullscreen
411
403
  }
412
- ) : /* @__PURE__ */ jsx(GameDemoPreview, { gameName: name, previewImageFit, onPlay: handlePlay })
404
+ ) : /* @__PURE__ */ jsx(GameDemoPreview, { alt: name, imageFit: previewImageFit, onPlay: handlePlay })
413
405
  }
414
406
  );
415
407
  };
@@ -470,8 +462,8 @@ function getGameInfoItemValue(key, value, currency) {
470
462
  return formattedValue;
471
463
  }
472
464
  const GameInfo = ({ info }) => {
473
- const { siteMetadata } = useSiteMetadataContext();
474
- const { currency } = siteMetadata;
465
+ const { metadata } = useSiteContext();
466
+ const { currency } = metadata;
475
467
  const { t: t2 } = useTranslation("gameInfo");
476
468
  return /* @__PURE__ */ jsx(
477
469
  Box,
@@ -513,37 +505,36 @@ const Content = ({ children }) => {
513
505
  return /* @__PURE__ */ jsx(Box, { as: "section", py: 4, children: /* @__PURE__ */ jsx(Container, { children }) });
514
506
  };
515
507
  const Logo = () => {
516
- const { logoImageData } = useSiteMetadataContext();
517
- 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;
518
511
  if (!image) {
519
512
  return null;
520
513
  }
521
- 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 });
522
515
  };
523
516
  const Brand$1 = ({ brand }) => {
524
517
  return /* @__PURE__ */ jsxs(Box, { position: "relative", my: 2, py: 8, children: [
525
518
  /* @__PURE__ */ jsx(Divider, {}),
526
- /* @__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 }) })
527
520
  ] });
528
521
  };
529
522
  const Copyright = () => {
530
- const { siteMetadata } = useSiteMetadataContext();
531
- const { siteUrl } = siteMetadata;
523
+ const { metadata } = useSiteContext();
524
+ const { siteUrl } = metadata;
532
525
  const { t: t2 } = useTranslation("footer");
533
526
  return /* @__PURE__ */ jsx(Text, { as: "small", colorScheme: "gray", display: "flex", align: "center", justifyContent: "center", children: t2("copyright", { year: getCurrentYear(), domain: getDomain(siteUrl) }) });
534
527
  };
535
528
  const Disclaimer = () => {
536
- const { siteMetadata } = useSiteMetadataContext();
537
- const { siteUrl } = siteMetadata;
529
+ const { metadata } = useSiteContext();
530
+ const { siteUrl } = metadata;
538
531
  const { t: t2 } = useTranslation("footer");
539
532
  return /* @__PURE__ */ jsxs(Text, { as: "small", colorScheme: "gray", fontSize: "sm", children: [
540
533
  /* @__PURE__ */ jsx(Text, { as: "span", fontWeight: "bold", color: "red.600", children: t2("disclaimer.title") }),
541
534
  t2("disclaimer.description", { domain: getDomain(siteUrl) })
542
535
  ] });
543
536
  };
544
- const Navigation$1 = () => {
545
- const { siteMetadata } = useSiteMetadataContext();
546
- const { footerMenuLinks } = siteMetadata;
537
+ const Navigation$1 = ({ menu }) => {
547
538
  return /* @__PURE__ */ jsx(
548
539
  SimpleGrid,
549
540
  {
@@ -553,7 +544,7 @@ const Navigation$1 = () => {
553
544
  spacing: 4,
554
545
  justifyItems: { base: "flex-start", md: "center" },
555
546
  justifyContent: "space-between",
556
- children: footerMenuLinks.map(({ url, title }) => /* @__PURE__ */ jsx(
547
+ children: menu.map(({ url, title }) => /* @__PURE__ */ jsx(
557
548
  Text,
558
549
  {
559
550
  as: Link$1,
@@ -570,6 +561,9 @@ const Navigation$1 = () => {
570
561
  );
571
562
  };
572
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) ?? [];
573
567
  return /* @__PURE__ */ jsx(
574
568
  Box,
575
569
  {
@@ -578,7 +572,7 @@ const Footer = () => {
578
572
  color: useColorModeValue("gray.700", "gray.200"),
579
573
  py: 4,
580
574
  children: /* @__PURE__ */ jsxs(Container, { children: [
581
- /* @__PURE__ */ jsx(Navigation$1, {}),
575
+ /* @__PURE__ */ jsx(Navigation$1, { menu: navigation }),
582
576
  /* @__PURE__ */ jsx(Disclaimer, {}),
583
577
  /* @__PURE__ */ jsx(Brand$1, { brand: /* @__PURE__ */ jsx(Logo, {}) }),
584
578
  /* @__PURE__ */ jsx(Copyright, {})
@@ -587,18 +581,7 @@ const Footer = () => {
587
581
  );
588
582
  };
589
583
  const Brand = ({ brand }) => {
590
- return /* @__PURE__ */ jsx(
591
- Box,
592
- {
593
- as: Link$1,
594
- to: "/",
595
- display: "flex",
596
- h: { base: "40px", md: "60px" },
597
- fontFamily: "heading",
598
- color: useColorModeValue("gray.800", "white"),
599
- children: brand
600
- }
601
- );
584
+ return /* @__PURE__ */ jsx(Link$1, { to: "/", children: brand });
602
585
  };
603
586
  const DesktopNavItem = ({ title, url, children }) => {
604
587
  const background = useColorModeValue("white", "gray.800");
@@ -616,7 +599,7 @@ const DesktopNavItem = ({ title, url, children }) => {
616
599
  children: title
617
600
  }
618
601
  ) }),
619
- !!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(
620
603
  Box,
621
604
  {
622
605
  as: "li",
@@ -651,7 +634,7 @@ const DesktopNavItem = ({ title, url, children }) => {
651
634
  ] });
652
635
  };
653
636
  const DesktopNavigation = ({ menu }) => {
654
- 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)) });
655
638
  };
656
639
  const MobileNavItem = ({ title, children, url }) => {
657
640
  const { isOpen, onToggle } = useDisclosure();
@@ -703,14 +686,11 @@ const Navigation = ({ menu }) => {
703
686
  const isDesktop = useBreakpointValue({ base: false, md: true });
704
687
  return isDesktop ? /* @__PURE__ */ jsx(DesktopNavigation, { menu }) : /* @__PURE__ */ jsx(MobileNavigation, { menu });
705
688
  };
706
- const Navbar = ({ brand }) => {
707
- const menu = [];
708
- return /* @__PURE__ */ jsxs(Flex, { as: "nav", gap: 2, py: 1, children: [
709
- /* @__PURE__ */ jsx(Brand, { brand }),
710
- /* @__PURE__ */ jsx(Flex, { as: "section", flex: 1, align: "center", justifyContent: "flex-end", gap: 2, children: /* @__PURE__ */ jsx(Navigation, { menu }) })
711
- ] });
712
- };
713
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;
714
694
  return /* @__PURE__ */ jsx(
715
695
  Box,
716
696
  {
@@ -721,7 +701,24 @@ const Header = () => {
721
701
  color: useColorModeValue("gray.700", "gray.200"),
722
702
  boxShadow: "sm",
723
703
  zIndex: 100,
724
- 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
+ ] }) })
725
722
  }
726
723
  );
727
724
  };
@@ -806,8 +803,8 @@ const Layout = ({ children }) => {
806
803
  /* @__PURE__ */ jsx(ScrollToTop, {})
807
804
  ] });
808
805
  };
809
- const List = ({ items, bullet = "—", render, className, ...boxProps }) => {
810
- 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: [
811
808
  /* @__PURE__ */ jsx(Box, { children: bullet }),
812
809
  render ? render(item) : item
813
810
  ] }, index)) });
@@ -908,7 +905,6 @@ const Table = ({
908
905
  bordered = false,
909
906
  striped = true,
910
907
  scrollable,
911
- className,
912
908
  ...boxProps
913
909
  }) => {
914
910
  const headerItems = items.slice(0, columnNumber);
@@ -918,7 +914,6 @@ const Table = ({
918
914
  {
919
915
  border: bordered ? void 0 : "none",
920
916
  ...scrollable ? { maxH: "50vh", overflowY: "auto" } : {},
921
- className,
922
917
  ...boxProps,
923
918
  children: [
924
919
  /* @__PURE__ */ jsxs(Table$1, { variant: striped ? "striped" : "simple", children: [
@@ -930,7 +925,7 @@ const Table = ({
930
925
  }
931
926
  );
932
927
  };
933
- const Tabs = ({ items, className, render, ...boxProps }) => {
928
+ const Tabs = ({ items, render, ...boxProps }) => {
934
929
  const { tabs, panels } = useMemo(() => {
935
930
  const tabs2 = [];
936
931
  const panels2 = [];
@@ -940,7 +935,7 @@ const Tabs = ({ items, className, render, ...boxProps }) => {
940
935
  });
941
936
  return { tabs: tabs2, panels: panels2 };
942
937
  }, []);
943
- return /* @__PURE__ */ jsxs(Tabs$1, { overflow: "hidden", colorScheme: "brand", className, ...boxProps, children: [
938
+ return /* @__PURE__ */ jsxs(Tabs$1, { overflow: "hidden", colorScheme: "brand", ...boxProps, children: [
944
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)) }),
945
940
  /* @__PURE__ */ jsx(TabPanels, { children: panels.map((panel, index) => /* @__PURE__ */ jsx(TabPanel, { children: render(panel) }, index)) })
946
941
  ] });
@@ -957,12 +952,15 @@ export {
957
952
  ProsCons as P,
958
953
  Seo as S,
959
954
  Table as T,
960
- Features as a,
961
- GameDemo as b,
962
- GameInfo as c,
963
- List as d,
964
- Tabs as e,
965
- Center as f,
966
- Grid as g,
967
- 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
968
966
  };