@anywayseo/tools 4.0.2 → 4.2.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 (56) hide show
  1. package/dist/components/base/index.d.ts +0 -1
  2. package/dist/components/base/link-button/index.d.ts +3 -3
  3. package/dist/components/game-demo/content/index.d.ts +1 -0
  4. package/dist/components/game-demo/index.d.ts +1 -0
  5. package/dist/components/game-demo/preview/index.d.ts +5 -4
  6. package/dist/components/index.cjs +1 -2
  7. package/dist/components/index.mjs +1 -2
  8. package/dist/hooks/index.cjs +1 -1
  9. package/dist/hooks/index.mjs +1 -1
  10. package/dist/hooks/use-primary-colors/index.d.ts +1 -0
  11. package/dist/i18n/index.cjs +1 -1
  12. package/dist/i18n/index.mjs +1 -1
  13. package/dist/i18n/resources/de/index.d.ts +2 -0
  14. package/dist/i18n/resources/en/index.d.ts +2 -0
  15. package/dist/i18n/resources/it/index.d.ts +2 -0
  16. package/dist/i18n/resources/ru/index.d.ts +2 -0
  17. package/dist/{index-NsIHOkeN.js → index-BClxYYix.js} +0 -46
  18. package/dist/{index-DoBCANwf.mjs → index-BE9gNdXx.mjs} +15 -7
  19. package/dist/{index-Biz1dDqA.js → index-BPLxhZG_.js} +15 -7
  20. package/dist/index-BV0hDmYP.js +11 -0
  21. package/dist/{index-DzEvPZny.mjs → index-Ca_M-II5.mjs} +0 -46
  22. package/dist/index-CcsbqDXL.mjs +49 -0
  23. package/dist/index-CkTgVjZS.mjs +12 -0
  24. package/dist/index-DF_u_tzx.js +48 -0
  25. package/dist/{index-Db-ZIQ0A.mjs → index-DPO0aIC3.mjs} +1 -19
  26. package/dist/index-DVcQxWMZ.js +36 -0
  27. package/dist/{index-CpjGjVVj.js → index-DuQjQMNN.js} +1 -19
  28. package/dist/{index-DmOT7IZT.js → index-FzrDuS6r.js} +136 -88
  29. package/dist/{index-BZBc-e28.mjs → index-HjgJxxVi.mjs} +130 -82
  30. package/dist/index-MpNfBHkQ.mjs +37 -0
  31. package/dist/index.cjs +20 -20
  32. package/dist/index.mjs +9 -9
  33. package/dist/providers/index.cjs +1 -1
  34. package/dist/providers/index.mjs +1 -1
  35. package/dist/providers/mdx-provider/types.d.ts +3 -0
  36. package/dist/providers/mdx-provider/utils.d.ts +3 -0
  37. package/dist/types/components/bonus-card/index.d.ts +2 -1
  38. package/dist/types/components/button/index.d.ts +6 -0
  39. package/dist/types/components/common/index.d.ts +12 -0
  40. package/dist/types/components/game-card/index.d.ts +3 -2
  41. package/dist/types/components/index.d.ts +2 -0
  42. package/dist/types/components/link/index.d.ts +5 -0
  43. package/dist/types/content/index.d.ts +0 -1
  44. package/dist/types/site/index.d.ts +4 -0
  45. package/dist/utils/animation/index.d.ts +2 -8
  46. package/dist/utils/index.cjs +16 -15
  47. package/dist/utils/index.mjs +5 -4
  48. package/dist/utils/theme/index.d.ts +2 -3
  49. package/package.json +1 -1
  50. package/dist/components/base/pulse-button/index.d.ts +0 -15
  51. package/dist/components/base/pulse-button/utils.d.ts +0 -4
  52. package/dist/index-Bx3B21Dh.mjs +0 -36
  53. package/dist/index-IpSV-c71.js +0 -8
  54. package/dist/index-d3V0A4lN.js +0 -35
  55. package/dist/index-xuSxvz5z.mjs +0 -9
  56. package/dist/types/content/link/index.d.ts +0 -4
@@ -1,15 +1,15 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { Box, Collapse, Text, Button, Flex, Stack, Image, Center as Center$1, SimpleGrid, Link, Card, CardHeader, Heading, CardBody, Popover, PopoverTrigger, Portal, 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, List as List$1, ListItem, Icon, ListIcon, TableContainer, Table as Table$1, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, TabPanels, TabPanel } from "@chakra-ui/react";
2
+ import { Box, Collapse, Text, Button, Flex, Stack, Image, Center as Center$1, SimpleGrid, Link as Link$1, Card, CardHeader, Heading, CardBody, Popover, PopoverTrigger, Portal, 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, List as List$1, ListItem, Icon, 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 { A as Animation, e as getSeededRandomComparator, d as randomComparator, b as formatNumber, c as getCurrencySymbol, f as formatDate, g as getCurrentYear, a as getCurrentMonth } from "./index-Db-ZIQ0A.mjs";
5
- import { a as GameCharacteristic } from "./index-DoBCANwf.mjs";
6
- import "@ctrl/tinycolor";
7
- import { useRef, useState, useLayoutEffect, Fragment as Fragment$1, forwardRef, useEffect, useMemo } from "react";
8
- import { EmailIcon, StarIcon, CloseIcon, ExternalLinkIcon, ChevronRightIcon, ChevronDownIcon, HamburgerIcon, ChevronUpIcon, WarningIcon, CheckCircleIcon } from "@chakra-ui/icons";
4
+ import { Link } from "gatsby";
5
+ import { A as Animation } from "./index-MpNfBHkQ.mjs";
6
+ import { a as GameCharacteristic } from "./index-BE9gNdXx.mjs";
9
7
  import { useMDXComponents } from "@mdx-js/react";
10
8
  import { u as useSiteContext } from "./index-BNb-P8a6.mjs";
11
- import { Link as Link$1 } from "gatsby";
12
- import { u as usePrimaryColors } from "./index-xuSxvz5z.mjs";
9
+ import { useRef, useState, useLayoutEffect, Fragment as Fragment$1, forwardRef, useEffect, useMemo } from "react";
10
+ import { EmailIcon, StarIcon, CloseIcon, ViewOffIcon, ViewIcon, ChevronRightIcon, ChevronDownIcon, HamburgerIcon, ChevronUpIcon, WarningIcon, CheckCircleIcon } from "@chakra-ui/icons";
11
+ import { e as getSeededRandomComparator, d as randomComparator, b as formatNumber, c as getCurrencySymbol, f as formatDate, g as getCurrentYear, a as getCurrentMonth } from "./index-DPO0aIC3.mjs";
12
+ import { u as usePrimaryColors } from "./index-CkTgVjZS.mjs";
13
13
  import { t } from "i18next";
14
14
  import Markdown from "react-markdown";
15
15
  const ONE_LINE_HEIGHT = 24;
@@ -67,36 +67,44 @@ const defaultColumns = { base: 1, sm: 2, md: 3, lg: 4, xl: 5 };
67
67
  const Grid = ({ items, columns = defaultColumns, gap, render, getKey, ...boxProps }) => {
68
68
  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)) });
69
69
  };
70
- const LinkButton = ({ label, url, width = "auto", ...boxProps }) => {
70
+ const LinkButton = ({
71
+ label,
72
+ href,
73
+ linkType = "redirect",
74
+ size = "auto",
75
+ width = "auto",
76
+ textTransform,
77
+ textDecoration,
78
+ animation,
79
+ onClick,
80
+ ...boxProps
81
+ }) => {
82
+ var _a;
83
+ const { configs } = useSiteContext();
84
+ const { color, invertedColor } = usePrimaryColors();
85
+ const isInvertedColor = (_a = configs == null ? void 0 : configs.theme) == null ? void 0 : _a.isInvertedColor;
86
+ const isInternalLink = linkType === "redirect" || (href == null ? void 0 : href.startsWith("/"));
87
+ const LinkComponent = isInternalLink ? Link : Link$1;
88
+ const hrefKey = isInternalLink ? "to" : "href";
89
+ const hrefValue = linkType === "redirect" ? `/follow?to=${href}` : href;
71
90
  return /* @__PURE__ */ jsx(
72
91
  Button,
73
92
  {
74
- as: Link,
75
- href: url,
76
93
  w: width,
77
- bg: "brand.600",
78
- textTransform: "uppercase",
79
- _hover: { textDecoration: "none", bg: "brand.300" },
94
+ size: size === "auto" ? { base: "sm", md: "lg" } : size,
95
+ bg: "brand.500",
96
+ color: isInvertedColor ? invertedColor : color,
97
+ animation: animation ? Animation[animation.type](animation.params) : void 0,
98
+ textTransform,
99
+ _hover: { textDecoration, bg: "brand.200" },
80
100
  _active: { transform: "scale(0.95)" },
101
+ onClick,
81
102
  ...boxProps,
82
- children: label
83
- }
84
- );
85
- };
86
- const ColorMap = {
87
- light: "gray.200",
88
- dark: "gray.700"
89
- };
90
- const PulseButton = ({ label, colorScheme = "light", to, onClick }) => {
91
- return /* @__PURE__ */ jsx(
92
- Button,
93
- {
94
- size: { base: "sm", md: "lg" },
95
- color: ColorMap[colorScheme],
96
- bgColor: "brand.500",
97
- animation: `${Animation.pulse} 2s infinite linear`,
98
- _hover: { bgColor: "brand.200", color: "gray.700" },
99
- ...to ? { as: Link, href: to } : { onClick },
103
+ ...href ? {
104
+ as: LinkComponent,
105
+ [hrefKey]: hrefValue,
106
+ rel: "nofollow"
107
+ } : {},
100
108
  children: label
101
109
  }
102
110
  );
@@ -180,7 +188,7 @@ const BonusCard = ({
180
188
  /* @__PURE__ */ jsx(Text, { fontSize: "2xl", fontWeight: "bold", my: 2, children: subtitle }),
181
189
  /* @__PURE__ */ jsx(BonusCardContent, { content, buttonColor: textColor })
182
190
  ] }),
183
- /* @__PURE__ */ jsx(CardFooter, { as: "footer", p: 4, children: /* @__PURE__ */ jsx(LinkButton, { ...link, width: "full" }) })
191
+ /* @__PURE__ */ jsx(CardFooter, { as: "footer", p: 4, children: /* @__PURE__ */ jsx(LinkButton, { ...link, width: "full", size: "md", textDecoration: "none" }) })
184
192
  ]
185
193
  }
186
194
  );
@@ -274,10 +282,10 @@ const ContactForm = ({ ...boxProps }) => {
274
282
  );
275
283
  };
276
284
  const Faq = ({ items, ...boxProps }) => {
277
- const { bgColor, color } = usePrimaryColors();
285
+ const { bgColor, invertedColor } = usePrimaryColors();
278
286
  return /* @__PURE__ */ jsx(Accordion, { allowToggle: true, ...boxProps, children: items.map(({ question, answer }) => {
279
287
  return /* @__PURE__ */ jsxs(AccordionItem, { border: 0, children: [
280
- /* @__PURE__ */ jsx(Box, { as: "h3", children: /* @__PURE__ */ jsxs(AccordionButton, { _hover: { color, bgColor }, children: [
288
+ /* @__PURE__ */ jsx(Box, { as: "h3", children: /* @__PURE__ */ jsxs(AccordionButton, { _hover: { color: invertedColor, bgColor }, children: [
281
289
  /* @__PURE__ */ jsx(Box, { as: "span", flex: "1", textAlign: "left", fontWeight: "bold", children: question }),
282
290
  /* @__PURE__ */ jsx(AccordionIcon, {})
283
291
  ] }) }),
@@ -313,7 +321,7 @@ const FeatureCardGrid = ({
313
321
  }
314
322
  );
315
323
  };
316
- const GameCard = ({ name, description, image, link, height = "auto" }) => {
324
+ const GameCard = ({ name, description, image, href, height = "auto" }) => {
317
325
  return /* @__PURE__ */ jsxs(
318
326
  LinkBox,
319
327
  {
@@ -321,15 +329,15 @@ const GameCard = ({ name, description, image, link, height = "auto" }) => {
321
329
  rounded: "md",
322
330
  borderWidth: 1,
323
331
  transition: "transform 0.2s ease",
324
- cursor: link ? "pointer" : "default",
332
+ cursor: href ? "pointer" : "default",
325
333
  overflow: "hidden",
326
334
  bg: "blackAlpha.200",
327
335
  height,
328
- _hover: { transform: "scale(1.1)" },
336
+ _hover: { transform: "scale(1.05)" },
329
337
  children: [
330
338
  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 }),
331
339
  /* @__PURE__ */ jsxs(Box, { as: "section", rounded: "md", p: 4, children: [
332
- /* @__PURE__ */ jsx(Text, { as: "span", children: link ? /* @__PURE__ */ jsx(LinkOverlay, { href: link, children: name }) : name }),
340
+ /* @__PURE__ */ jsx(Text, { as: "span", children: href ? /* @__PURE__ */ jsx(LinkOverlay, { href, children: name }) : name }),
333
341
  !!description && /* @__PURE__ */ jsx(Text, { fontSize: "sm", color: "gray.600", children: description })
334
342
  ] })
335
343
  ]
@@ -338,7 +346,7 @@ const GameCard = ({ name, description, image, link, height = "auto" }) => {
338
346
  };
339
347
  const GameCardGrid = ({
340
348
  items,
341
- columns = { base: 1, md: 2, lg: 3 },
349
+ columns = { base: 1, sm: 2, md: 3, lg: 4 },
342
350
  gap = 4,
343
351
  cardHeight = "full",
344
352
  order = "default",
@@ -360,7 +368,14 @@ const GameCardGrid = ({
360
368
  }
361
369
  );
362
370
  };
363
- const GameDemoContent = ({ src, isFullscreen, isLoaded, onLoad, onToggleFullscreen }) => {
371
+ const GameDemoContent = ({
372
+ src,
373
+ isFullscreen,
374
+ isLoaded,
375
+ onLoad,
376
+ onExit,
377
+ onToggleFullscreen
378
+ }) => {
364
379
  const { t: t2 } = useTranslation("gameDemo");
365
380
  return /* @__PURE__ */ jsxs(Fragment, { children: [
366
381
  /* @__PURE__ */ jsx(
@@ -377,50 +392,73 @@ const GameDemoContent = ({ src, isFullscreen, isLoaded, onLoad, onToggleFullscre
377
392
  children: /* @__PURE__ */ jsx("p", { children: t2("warning") })
378
393
  }
379
394
  ),
380
- /* @__PURE__ */ jsx(
381
- IconButton,
382
- {
383
- icon: isFullscreen ? /* @__PURE__ */ jsx(CloseIcon, { w: 3, h: 3 }) : /* @__PURE__ */ jsx(ExternalLinkIcon, { w: 4, h: 4 }),
384
- size: "sm",
385
- variant: "outline",
386
- title: t2(isFullscreen ? "action.deactivateFullscreen" : "action.activateFullscreen"),
387
- "aria-label": "Fullscreen mode Toggle",
388
- isRound: true,
389
- disabled: !isLoaded,
390
- position: "absolute",
391
- top: 2,
392
- left: 2,
393
- border: "none",
394
- color: "white",
395
- _hover: { bgColor: "whiteAlpha.400" },
396
- onClick: onToggleFullscreen
397
- }
398
- ),
395
+ /* @__PURE__ */ jsxs(Flex, { position: "absolute", top: 2, left: 2, gap: 2, children: [
396
+ /* @__PURE__ */ jsx(
397
+ IconButton,
398
+ {
399
+ icon: /* @__PURE__ */ jsx(CloseIcon, { w: 3, h: 3 }),
400
+ title: t2("action.exit"),
401
+ "aria-label": t2("action.exit"),
402
+ size: "sm",
403
+ color: "white",
404
+ variant: "ghost",
405
+ disabled: !isLoaded,
406
+ isRound: true,
407
+ onClick: onExit
408
+ }
409
+ ),
410
+ /* @__PURE__ */ jsx(
411
+ IconButton,
412
+ {
413
+ icon: isFullscreen ? /* @__PURE__ */ jsx(ViewOffIcon, { w: 3, h: 3 }) : /* @__PURE__ */ jsx(ViewIcon, { w: 4, h: 4 }),
414
+ title: t2(isFullscreen ? "action.deactivateFullscreen" : "action.activateFullscreen"),
415
+ "aria-label": t2(isFullscreen ? "action.deactivateFullscreen" : "action.activateFullscreen"),
416
+ size: "sm",
417
+ color: "white",
418
+ variant: "ghost",
419
+ disabled: !isLoaded,
420
+ isRound: true,
421
+ onClick: onToggleFullscreen
422
+ }
423
+ )
424
+ ] }),
399
425
  /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsx(Spinner, { size: "xl", thickness: "0.6rem", display: isLoaded ? "none" : "block", color: "brand.100" }) })
400
426
  ] });
401
427
  };
402
- const GameDemoPreview = ({ image, alt, imageFit = "contain", onPlay }) => {
428
+ const GameDemoPreview = ({ image, alt, href, imageFit = "contain", onPlayDemo }) => {
403
429
  const { t: t2 } = useTranslation("gameDemo");
404
- const imageComponent = typeof image === "string" ? /* @__PURE__ */ jsx(Image, { src: image, alt, objectFit: imageFit }) : image;
430
+ const imageComponent = typeof image === "string" ? /* @__PURE__ */ jsx(Image, { src: image, alt, objectFit: imageFit, w: "100%", h: "100%" }) : image;
405
431
  return /* @__PURE__ */ jsxs(Fragment, { children: [
406
432
  imageComponent,
407
- /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsx(PulseButton, { label: t2("action.playForFree"), onClick: onPlay }) })
433
+ /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsxs(Stack, { spacing: 4, children: [
434
+ /* @__PURE__ */ jsx(
435
+ LinkButton,
436
+ {
437
+ animation: { type: "pulse", params: { duration: 2, timingFunction: "ease-out", isInfinite: true } },
438
+ ...href ? { label: t2("action.playForReal"), href } : { label: t2("action.playForFree"), onClick: onPlayDemo }
439
+ }
440
+ ),
441
+ !!href && /* @__PURE__ */ jsx(Button, { variant: "outline", colorScheme: "brand", size: { base: "sm", md: "md" }, onClick: onPlayDemo, children: t2("action.playForFree") })
442
+ ] }) })
408
443
  ] });
409
444
  };
410
- const GameDemo = ({ name, src, previewImage, previewImageFit, ...boxProps }) => {
445
+ const GameDemo = ({ name, src, href, previewImage, previewImageFit, ...boxProps }) => {
411
446
  const [isRunning, setIsRunning] = useState(false);
412
447
  const [isLoaded, setIsLoaded] = useState(false);
413
448
  const { isOpen: isFullscreen, onToggle } = useDisclosure({ defaultIsOpen: false });
414
- function handlePlay() {
415
- setIsRunning(true);
416
- }
417
- function onLoad() {
449
+ function handleLoad() {
418
450
  setIsLoaded(true);
419
451
  }
452
+ function handleExit() {
453
+ setIsRunning(false);
454
+ }
420
455
  function handleToggleFullscreen() {
421
456
  document.body.style.overflowY = isFullscreen ? "auto" : "hidden";
422
457
  onToggle();
423
458
  }
459
+ function handlePlayDemo() {
460
+ setIsRunning(true);
461
+ }
424
462
  return /* @__PURE__ */ jsx(
425
463
  Box,
426
464
  {
@@ -436,10 +474,20 @@ const GameDemo = ({ name, src, previewImage, previewImageFit, ...boxProps }) =>
436
474
  src,
437
475
  isFullscreen,
438
476
  isLoaded,
439
- onLoad,
477
+ onLoad: handleLoad,
478
+ onExit: handleExit,
440
479
  onToggleFullscreen: handleToggleFullscreen
441
480
  }
442
- ) : /* @__PURE__ */ jsx(GameDemoPreview, { image: previewImage, alt: name, imageFit: previewImageFit, onPlay: handlePlay })
481
+ ) : /* @__PURE__ */ jsx(
482
+ GameDemoPreview,
483
+ {
484
+ image: previewImage,
485
+ alt: name,
486
+ href,
487
+ imageFit: previewImageFit,
488
+ onPlayDemo: handlePlayDemo
489
+ }
490
+ )
443
491
  }
444
492
  );
445
493
  };
@@ -532,9 +580,9 @@ const GameInfo = ({ info }) => {
532
580
  );
533
581
  };
534
582
  const HowTo = ({ steps, ...boxProps }) => {
535
- const { color, bgColor } = usePrimaryColors();
583
+ const { bgColor, invertedColor } = usePrimaryColors();
536
584
  return /* @__PURE__ */ jsx(SimpleGrid, { as: "ol", columns: { base: 1, md: 2, lg: 3 }, gap: 4, p: 0, ...boxProps, children: steps.map(({ title, description, thumbnail }, index) => /* @__PURE__ */ jsxs(Flex, { as: "li", alignItems: "flex-start", gap: 4, children: [
537
- /* @__PURE__ */ jsx(Circle, { size: 12, bgColor, color, fontSize: "lg", fontWeight: "bold", children: String(index + 1) }),
585
+ /* @__PURE__ */ jsx(Circle, { size: 12, bgColor, color: invertedColor, fontSize: "lg", fontWeight: "bold", children: String(index + 1) }),
538
586
  /* @__PURE__ */ jsxs(Stack, { flex: 1, children: [
539
587
  /* @__PURE__ */ jsx(Text, { fontSize: "lg", fontWeight: "bold", children: title }),
540
588
  typeof thumbnail === "string" ? /* @__PURE__ */ jsx(Image, { src: thumbnail, alt: title, aspectRatio: "16/9", objectFit: "cover" }) : thumbnail,
@@ -556,7 +604,7 @@ const Logo = () => {
556
604
  const Brand$1 = ({ brand }) => {
557
605
  return /* @__PURE__ */ jsxs(Box, { position: "relative", my: 2, py: 8, children: [
558
606
  /* @__PURE__ */ jsx(Divider, {}),
559
- /* @__PURE__ */ jsx(AbsoluteCenter, { display: "flex", bgColor: useColorModeValue("gray.50", "gray.900"), children: /* @__PURE__ */ jsx(Link$1, { to: "/", children: brand }) })
607
+ /* @__PURE__ */ jsx(AbsoluteCenter, { display: "flex", bgColor: useColorModeValue("gray.50", "gray.900"), children: /* @__PURE__ */ jsx(Link, { to: "/", children: brand }) })
560
608
  ] });
561
609
  };
562
610
  const Copyright = () => {
@@ -592,7 +640,7 @@ const Navigation$1 = ({ menu }) => {
592
640
  children: menu.map(({ path, label }, index) => /* @__PURE__ */ jsx(Flex, { as: "li", children: /* @__PURE__ */ jsx(
593
641
  Text,
594
642
  {
595
- as: Link$1,
643
+ as: Link,
596
644
  to: path,
597
645
  fontSize: "md",
598
646
  fontWeight: "semibold",
@@ -631,14 +679,14 @@ const Footer = () => {
631
679
  );
632
680
  };
633
681
  const Brand = ({ brand }) => {
634
- return /* @__PURE__ */ jsx(Link$1, { to: "/", children: brand });
682
+ return /* @__PURE__ */ jsx(Link, { to: "/", children: brand });
635
683
  };
636
684
  const NavLink = forwardRef(({ path, label }, ref) => {
637
685
  return /* @__PURE__ */ jsx(
638
686
  Text,
639
687
  {
640
688
  ref,
641
- as: Link$1,
689
+ as: Link,
642
690
  to: path,
643
691
  p: 2,
644
692
  fontWeight: "semibold",
@@ -663,7 +711,7 @@ const NavList$1 = ({ path, label, children }) => {
663
711
  children: label
664
712
  }
665
713
  ) }),
666
- /* @__PURE__ */ jsx(PopoverContent, { p: 2, border: 0, minW: "sm", rounded: "xl", boxShadow: "xl", bg: background, children: /* @__PURE__ */ jsx(List$1, { spacing: 2, p: 0, children: children == null ? void 0 : children.map((child, index) => /* @__PURE__ */ jsx(ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxs(Flex, { as: Link$1, to: `${path}${child.path}`, p: 2, role: "group", children: [
714
+ /* @__PURE__ */ jsx(PopoverContent, { p: 2, border: 0, minW: "sm", rounded: "xl", boxShadow: "xl", bg: background, children: /* @__PURE__ */ jsx(List$1, { spacing: 2, p: 0, children: children == null ? void 0 : children.map((child, index) => /* @__PURE__ */ jsx(ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxs(Flex, { as: Link, to: `${path}${child.path}`, p: 2, role: "group", children: [
667
715
  /* @__PURE__ */ jsx(Text, { fontWeight: 500, transition: "all .3s ease", _groupHover: { color: "brand.400" }, children: child.label }),
668
716
  /* @__PURE__ */ jsx(
669
717
  Flex,
@@ -714,7 +762,7 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
714
762
  ]
715
763
  }
716
764
  ),
717
- /* @__PURE__ */ jsx(Collapse, { in: isExpanded, transition: { enter: { ease: "easeIn" }, exit: { duration: 0.2 } }, children: /* @__PURE__ */ jsx(List$1, { ml: 2, pl: 0, borderLeft: 1, borderStyle: "solid", borderColor: useColorModeValue("gray.200", "gray.700"), children: children == null ? void 0 : children.map((child, index) => /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: /* @__PURE__ */ jsx(Text, { as: Link$1, to: `${path}${child.path}`, p: 2, fontSize: "sm", children: child.label }) }, index)) }) })
765
+ /* @__PURE__ */ jsx(Collapse, { in: isExpanded, transition: { enter: { ease: "easeIn" }, exit: { duration: 0.2 } }, children: /* @__PURE__ */ jsx(List$1, { ml: 2, pl: 0, borderLeft: 1, borderStyle: "solid", borderColor: useColorModeValue("gray.200", "gray.700"), children: children == null ? void 0 : children.map((child, index) => /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: /* @__PURE__ */ jsx(Text, { as: Link, to: `${path}${child.path}`, p: 2, fontSize: "sm", children: child.label }) }, index)) }) })
718
766
  ] });
719
767
  };
720
768
  const CLOSE_ICON_SIZE = "0.75rem";
@@ -817,7 +865,7 @@ const Hero = ({ title, subtitle, content, link, image }) => {
817
865
  /* @__PURE__ */ jsx(Text, { as: "span", display: "block", color: "brand.400", children: subtitle })
818
866
  ] }),
819
867
  /* @__PURE__ */ jsx(Text, { fontSize: { base: "md", lg: "lg" }, color: "gray.500", children: content }),
820
- !!link && /* @__PURE__ */ jsx(Flex, { direction: { base: "column", md: "row" }, children: /* @__PURE__ */ jsx(LinkButton, { ...link }) })
868
+ !!link && /* @__PURE__ */ jsx(Flex, { direction: { base: "column", md: "row" }, children: /* @__PURE__ */ jsx(LinkButton, { ...link, size: "md", textDecoration: "none" }) })
821
869
  ] }) }),
822
870
  image && /* @__PURE__ */ jsx(Flex, { display: { base: "none", md: "flex" }, flex: 1, children: image })
823
871
  ] }) }) });
@@ -900,7 +948,7 @@ const NotFound = () => {
900
948
  /* @__PURE__ */ jsxs(Text, { fontSize: "xl", children: [
901
949
  t2("description"),
902
950
  " ",
903
- /* @__PURE__ */ jsx(Button, { as: Link$1, to: "/", variant: "link", colorScheme: "brand", fontSize: "xl", children: t2("action") })
951
+ /* @__PURE__ */ jsx(Button, { as: Link, to: "/", variant: "link", colorScheme: "brand", fontSize: "xl", children: t2("action") })
904
952
  ] })
905
953
  ] });
906
954
  };
@@ -1075,6 +1123,7 @@ const StrapiComponent = ({ type, props, imageComponent }) => {
1075
1123
  {
1076
1124
  name: props.name,
1077
1125
  src: props.src,
1126
+ href: props.href,
1078
1127
  previewImage: /* @__PURE__ */ jsx(ExternalImage, { image: props.previewImage, alt: props.name, component: imageComponent }),
1079
1128
  mb: 4
1080
1129
  }
@@ -1198,6 +1247,5 @@ export {
1198
1247
  Author as k,
1199
1248
  Center as l,
1200
1249
  Grid as m,
1201
- LinkButton as n,
1202
- PulseButton as o
1250
+ LinkButton as n
1203
1251
  };
@@ -0,0 +1,37 @@
1
+ import { keyframes } from "@emotion/react";
2
+ const pulse = keyframes`
3
+ 0% {
4
+ box-shadow: 0 0 0 0 var(--chakra-colors-brand-100);
5
+ }
6
+
7
+ 50% {
8
+ box-shadow: 0 0 0 0.8rem rgba(0, 0, 0, 0);
9
+ }
10
+
11
+ 100% {
12
+ box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
13
+ }
14
+ `;
15
+ const defaultAnimationParams = {
16
+ duration: 1,
17
+ timingFunction: "linear",
18
+ isInfinite: false
19
+ };
20
+ function animation(keyframes2) {
21
+ return (params) => {
22
+ const duration = (params == null ? void 0 : params.duration) || defaultAnimationParams.duration;
23
+ const timingFunction = (params == null ? void 0 : params.timingFunction) || defaultAnimationParams.timingFunction;
24
+ const isInfinite = (params == null ? void 0 : params.isInfinite) || defaultAnimationParams.isInfinite;
25
+ return `${keyframes2} ${duration}s ${timingFunction} ${isInfinite ? "infinite" : ""}`.trim();
26
+ };
27
+ }
28
+ const Animation = {
29
+ pulse: animation(pulse)
30
+ };
31
+ const DARK_THEME_COLOR = "white";
32
+ const LIGHT_THEME_COLOR = "gray.800";
33
+ export {
34
+ Animation as A,
35
+ DARK_THEME_COLOR as D,
36
+ LIGHT_THEME_COLOR as L
37
+ };
package/dist/index.cjs CHANGED
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-DmOT7IZT.js");
4
- const index$1 = require("./index-IpSV-c71.js");
5
- const i18n$1 = require("./index-Biz1dDqA.js");
6
- const index$2 = require("./index-d3V0A4lN.js");
3
+ const index = require("./index-FzrDuS6r.js");
4
+ const index$1 = require("./index-BV0hDmYP.js");
5
+ const i18n$1 = require("./index-BPLxhZG_.js");
6
+ const index$2 = require("./index-DF_u_tzx.js");
7
7
  const index$3 = require("./index-BhsXlbd8.js");
8
- const index$4 = require("./index-CpjGjVVj.js");
9
- const index$5 = require("./index-NsIHOkeN.js");
8
+ const index$4 = require("./index-DVcQxWMZ.js");
9
+ const index$5 = require("./index-DuQjQMNN.js");
10
+ const index$6 = require("./index-BClxYYix.js");
10
11
  const i18n = require("i18next");
11
12
  exports.Author = index.Author;
12
13
  exports.AuthorCard = index.AuthorCard;
@@ -28,7 +29,6 @@ exports.LinkButton = index.LinkButton;
28
29
  exports.List = index.List;
29
30
  exports.NotFound = index.NotFound;
30
31
  exports.ProsCons = index.ProsCons;
31
- exports.PulseButton = index.PulseButton;
32
32
  exports.Seo = index.Seo;
33
33
  exports.StrapiContentRenderer = index.StrapiContentRenderer;
34
34
  exports.Table = index.Table;
@@ -42,17 +42,17 @@ exports.MdxProvider = index$2.MdxProvider;
42
42
  exports.SiteProvider = index$3.SiteProvider;
43
43
  exports.useSiteContext = index$3.useSiteContext;
44
44
  exports.Animation = index$4.Animation;
45
- exports.formatDate = index$4.formatDate;
46
- exports.formatNumber = index$4.formatNumber;
47
- exports.getCurrencySymbol = index$4.getCurrencySymbol;
48
- exports.getCurrentMonth = index$4.getCurrentMonth;
49
- exports.getCurrentYear = index$4.getCurrentYear;
50
- exports.getSeededRandomComparator = index$4.getSeededRandomComparator;
51
- exports.parseNumber = index$4.parseNumber;
52
- exports.randomComparator = index$4.randomComparator;
53
- exports.round = index$4.round;
54
- exports.toFixedTwo = index$4.toFixedTwo;
55
- exports.extractTheme = index$5.extractTheme;
56
- exports.generateColorPalette = index$5.generateColorPalette;
57
- exports.transformSiteNavigation = index$5.transformSiteNavigation;
45
+ exports.DARK_THEME_COLOR = index$4.DARK_THEME_COLOR;
46
+ exports.LIGHT_THEME_COLOR = index$4.LIGHT_THEME_COLOR;
47
+ exports.formatDate = index$5.formatDate;
48
+ exports.formatNumber = index$5.formatNumber;
49
+ exports.getCurrencySymbol = index$5.getCurrencySymbol;
50
+ exports.getCurrentMonth = index$5.getCurrentMonth;
51
+ exports.getCurrentYear = index$5.getCurrentYear;
52
+ exports.getSeededRandomComparator = index$5.getSeededRandomComparator;
53
+ exports.parseNumber = index$5.parseNumber;
54
+ exports.randomComparator = index$5.randomComparator;
55
+ exports.round = index$5.round;
56
+ exports.toFixedTwo = index$5.toFixedTwo;
57
+ exports.transformSiteNavigation = index$6.transformSiteNavigation;
58
58
  exports.i18n = i18n;
package/dist/index.mjs CHANGED
@@ -1,10 +1,11 @@
1
- import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, o, S, h, T, i, j } from "./index-BZBc-e28.mjs";
2
- import { u } from "./index-xuSxvz5z.mjs";
3
- import { a as a2, G as G2, r } from "./index-DoBCANwf.mjs";
4
- import { M } from "./index-Bx3B21Dh.mjs";
1
+ import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, S, h, T, i, j } from "./index-HjgJxxVi.mjs";
2
+ import { u } from "./index-CkTgVjZS.mjs";
3
+ import { a as a2, G as G2, r } from "./index-BE9gNdXx.mjs";
4
+ import { M } from "./index-CcsbqDXL.mjs";
5
5
  import { S as S2, u as u2 } from "./index-BNb-P8a6.mjs";
6
- import { A as A2, f as f2, b as b2, c as c2, a as a3, g as g2, e as e2, p, d as d2, r as r2, t } from "./index-Db-ZIQ0A.mjs";
7
- import { e as e3, g as g3, t as t2 } from "./index-DzEvPZny.mjs";
6
+ import { A as A2, D, L as L2 } from "./index-MpNfBHkQ.mjs";
7
+ import { f as f2, b as b2, c as c2, a as a3, g as g2, e as e2, p, d as d2, r as r2, t } from "./index-DPO0aIC3.mjs";
8
+ import { t as t2 } from "./index-Ca_M-II5.mjs";
8
9
  import { default as default2 } from "i18next";
9
10
  export {
10
11
  A2 as Animation,
@@ -14,6 +15,7 @@ export {
14
15
  a as BonusCardGrid,
15
16
  l as Center,
16
17
  C as ContactForm,
18
+ D as DARK_THEME_COLOR,
17
19
  F as Faq,
18
20
  b as FeatureCard,
19
21
  c as FeatureCardGrid,
@@ -25,23 +27,21 @@ export {
25
27
  G2 as GameVolatility,
26
28
  m as Grid,
27
29
  H as HowTo,
30
+ L2 as LIGHT_THEME_COLOR,
28
31
  L as Layout,
29
32
  n as LinkButton,
30
33
  g as List,
31
34
  M as MdxProvider,
32
35
  N as NotFound,
33
36
  P as ProsCons,
34
- o as PulseButton,
35
37
  S as Seo,
36
38
  S2 as SiteProvider,
37
39
  h as StrapiContentRenderer,
38
40
  T as Table,
39
41
  i as Tabs,
40
42
  j as Tip,
41
- e3 as extractTheme,
42
43
  f2 as formatDate,
43
44
  b2 as formatNumber,
44
- g3 as generateColorPalette,
45
45
  c2 as getCurrencySymbol,
46
46
  a3 as getCurrentMonth,
47
47
  g2 as getCurrentYear,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-d3V0A4lN.js");
3
+ const index = require("../index-DF_u_tzx.js");
4
4
  const index$1 = require("../index-BhsXlbd8.js");
5
5
  exports.MdxProvider = index.MdxProvider;
6
6
  exports.SiteProvider = index$1.SiteProvider;
@@ -1,4 +1,4 @@
1
- import { M } from "../index-Bx3B21Dh.mjs";
1
+ import { M } from "../index-CcsbqDXL.mjs";
2
2
  import { S, u } from "../index-BNb-P8a6.mjs";
3
3
  export {
4
4
  M as MdxProvider,
@@ -0,0 +1,3 @@
1
+ import { DetailedHTMLProps, HTMLAttributes, ReactElement } from 'react';
2
+ export type Props<E extends HTMLElement, A extends HTMLAttributes<E> = HTMLAttributes<E>> = DetailedHTMLProps<A, E>;
3
+ export type ComponentCallback<T extends HTMLElement> = (props: Props<T>) => ReactElement;
@@ -0,0 +1,3 @@
1
+ import { ComponentCallback, Props } from './types';
2
+ export declare function omitProps<T extends HTMLElement>(props: Props<T>, omittedKeys: string[]): Props<T>;
3
+ export declare function preprocessProps<T extends HTMLElement>(callback: ComponentCallback<T>): ComponentCallback<T>;
@@ -1,6 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
- import { IBonus, ILink } from '../../content';
2
+ import { IBonus } from '../../content';
3
3
  import { Color } from '../common';
4
+ import { ILink } from '../link';
4
5
  type TextContent = string | ReactElement;
5
6
  export interface IBonusCardCustomizationProps {
6
7
  color?: Color;
@@ -0,0 +1,6 @@
1
+ import { ButtonProps } from '@chakra-ui/react';
2
+ import { BaseSize, IAnimation } from '../common';
3
+ export type BaseButtonProps = Pick<ButtonProps, 'width' | 'textTransform' | 'textDecoration' | 'onClick'> & {
4
+ size?: 'xs' | BaseSize | 'auto';
5
+ animation?: IAnimation;
6
+ };
@@ -6,4 +6,16 @@ type BoxPaddingProps = Pick<BoxProps, 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | '
6
6
  type BoxMarginProps = Pick<BoxProps, 'm' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'ms' | 'me'>;
7
7
  export type BoxPositionProps = BoxMarginProps & BoxPaddingProps;
8
8
  export type Color = ColorProps['color'];
9
+ export type BaseSize = 'sm' | 'md' | 'lg';
10
+ export type AnimationType = 'pulse';
11
+ export interface IAnimationParams {
12
+ duration?: number;
13
+ timingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out';
14
+ isInfinite?: boolean;
15
+ }
16
+ export interface IAnimation {
17
+ type: AnimationType;
18
+ params?: IAnimationParams;
19
+ }
20
+ export type AnimationGetter = (params?: IAnimationParams) => string;
9
21
  export {};
@@ -1,7 +1,8 @@
1
1
  import { ReactElement } from 'react';
2
- import { IGame, ILink } from '../../content';
2
+ import { IGame } from '../../content';
3
+ import { ILink } from '../link';
3
4
  export interface IGameCard extends IGame {
4
- link?: ILink['url'];
5
+ href?: ILink['href'];
5
6
  image?: string | ReactElement;
6
7
  }
7
8
  export type GameCardHeight = 'full' | 'auto';
@@ -1,4 +1,5 @@
1
1
  export * from './bonus-card';
2
+ export * from './button';
2
3
  export * from './common';
3
4
  export * from './external-image';
4
5
  export * from './faq';
@@ -7,6 +8,7 @@ export * from './game-info';
7
8
  export * from './grid';
8
9
  export * from './how-to';
9
10
  export * from './image';
11
+ export * from './link';
10
12
  export * from './navigation';
11
13
  export * from './pros-cons';
12
14
  export * from './strapi-component';
@@ -0,0 +1,5 @@
1
+ export interface ILink {
2
+ label: string;
3
+ href: string;
4
+ }
5
+ export type LinkType = 'direct' | 'redirect';
@@ -2,5 +2,4 @@ export * from './author';
2
2
  export * from './bonus';
3
3
  export * from './feature';
4
4
  export * from './game';
5
- export * from './link';
6
5
  export * from './seo';