@anywayseo/tools 4.1.0 → 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.
- package/dist/components/base/index.d.ts +0 -1
- package/dist/components/base/link-button/index.d.ts +3 -3
- package/dist/components/game-demo/content/index.d.ts +1 -0
- package/dist/components/game-demo/index.d.ts +1 -0
- package/dist/components/game-demo/preview/index.d.ts +5 -4
- package/dist/components/index.cjs +1 -2
- package/dist/components/index.mjs +1 -2
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/use-primary-colors/index.d.ts +1 -0
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.mjs +1 -1
- package/dist/i18n/resources/de/index.d.ts +2 -0
- package/dist/i18n/resources/en/index.d.ts +2 -0
- package/dist/i18n/resources/it/index.d.ts +2 -0
- package/dist/i18n/resources/ru/index.d.ts +2 -0
- package/dist/{index-NsIHOkeN.js → index-BClxYYix.js} +0 -46
- package/dist/{index-DoBCANwf.mjs → index-BE9gNdXx.mjs} +15 -7
- package/dist/{index-Biz1dDqA.js → index-BPLxhZG_.js} +15 -7
- package/dist/index-BV0hDmYP.js +11 -0
- package/dist/{index-DzEvPZny.mjs → index-Ca_M-II5.mjs} +0 -46
- package/dist/index-CkTgVjZS.mjs +12 -0
- package/dist/{index-Db-ZIQ0A.mjs → index-DPO0aIC3.mjs} +1 -19
- package/dist/index-DVcQxWMZ.js +36 -0
- package/dist/{index-CpjGjVVj.js → index-DuQjQMNN.js} +1 -19
- package/dist/{index-BxPYJ5OB.js → index-FzrDuS6r.js} +136 -88
- package/dist/{index-BKg1_9Hw.mjs → index-HjgJxxVi.mjs} +130 -82
- package/dist/index-MpNfBHkQ.mjs +37 -0
- package/dist/index.cjs +19 -19
- package/dist/index.mjs +8 -8
- package/dist/types/components/bonus-card/index.d.ts +2 -1
- package/dist/types/components/button/index.d.ts +6 -0
- package/dist/types/components/common/index.d.ts +12 -0
- package/dist/types/components/game-card/index.d.ts +3 -2
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/link/index.d.ts +5 -0
- package/dist/types/content/index.d.ts +0 -1
- package/dist/types/site/index.d.ts +4 -0
- package/dist/utils/animation/index.d.ts +2 -8
- package/dist/utils/index.cjs +16 -15
- package/dist/utils/index.mjs +5 -4
- package/dist/utils/theme/index.d.ts +2 -3
- package/package.json +1 -1
- package/dist/components/base/pulse-button/index.d.ts +0 -15
- package/dist/components/base/pulse-button/utils.d.ts +0 -4
- package/dist/index-IpSV-c71.js +0 -8
- package/dist/index-xuSxvz5z.mjs +0 -9
- 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 {
|
|
5
|
-
import {
|
|
6
|
-
import "
|
|
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
|
-
import { Link as Link$1 } from "gatsby";
|
|
11
8
|
import { u as useSiteContext } from "./index-BNb-P8a6.mjs";
|
|
12
|
-
import {
|
|
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 = ({
|
|
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
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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,
|
|
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,
|
|
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:
|
|
332
|
+
cursor: href ? "pointer" : "default",
|
|
325
333
|
overflow: "hidden",
|
|
326
334
|
bg: "blackAlpha.200",
|
|
327
335
|
height,
|
|
328
|
-
_hover: { transform: "scale(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:
|
|
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,
|
|
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 = ({
|
|
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__ */
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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",
|
|
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__ */
|
|
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
|
|
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(
|
|
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 {
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
4
|
-
const index$1 = require("./index-
|
|
5
|
-
const i18n$1 = require("./index-
|
|
3
|
+
const index = require("./index-FzrDuS6r.js");
|
|
4
|
+
const index$1 = require("./index-BV0hDmYP.js");
|
|
5
|
+
const i18n$1 = require("./index-BPLxhZG_.js");
|
|
6
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-
|
|
9
|
-
const index$5 = require("./index-
|
|
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.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
57
|
-
exports.transformSiteNavigation = index$
|
|
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,
|
|
2
|
-
import { u } from "./index-
|
|
3
|
-
import { a as a2, G as G2, r } from "./index-
|
|
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
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,
|
|
7
|
-
import {
|
|
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,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { IBonus
|
|
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
|
|
2
|
+
import { IGame } from '../../content';
|
|
3
|
+
import { ILink } from '../link';
|
|
3
4
|
export interface IGameCard extends IGame {
|
|
4
|
-
|
|
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';
|
|
@@ -11,9 +11,13 @@ interface ISiteFooterConfig {
|
|
|
11
11
|
extra?: ReactNode;
|
|
12
12
|
showDisclaimer?: boolean;
|
|
13
13
|
}
|
|
14
|
+
interface ISiteThemeConfig {
|
|
15
|
+
isInvertedColor?: boolean;
|
|
16
|
+
}
|
|
14
17
|
export interface ISiteConfigs {
|
|
15
18
|
header?: ISiteHeaderConfig;
|
|
16
19
|
footer?: ISiteFooterConfig;
|
|
20
|
+
theme?: ISiteThemeConfig;
|
|
17
21
|
}
|
|
18
22
|
export interface ISiteMetadata {
|
|
19
23
|
name: string;
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
styles: string;
|
|
5
|
-
anim: 1;
|
|
6
|
-
toString: () => string;
|
|
7
|
-
} & string;
|
|
8
|
-
};
|
|
1
|
+
import { AnimationGetter, AnimationType } from '../../types';
|
|
2
|
+
export declare const Animation: Record<AnimationType, AnimationGetter>;
|