@anywayseo/tools 2.3.0 → 2.4.1
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/pulse-button/index.d.ts +8 -2
- package/dist/components/game-demo/index.d.ts +9 -3
- package/dist/components/game-demo/preview/index.d.ts +2 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/tabs/index.d.ts +4 -1
- package/dist/{index-DaSzU8Hb.mjs → index-5_hCvFkU.mjs} +21 -20
- package/dist/{index-C5BWCSo_.js → index-CupM-mJk.js} +20 -19
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types/components/how-to/index.d.ts +2 -1
- package/dist/types/site/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { BoxPositionProps } from '../../../types';
|
|
3
|
+
type PulseButtonActionProps = {
|
|
4
|
+
to?: never;
|
|
5
|
+
onClick: VoidFunction;
|
|
6
|
+
} | {
|
|
7
|
+
to: string;
|
|
8
|
+
onClick?: never;
|
|
9
|
+
};
|
|
3
10
|
type PulseButtonProps = {
|
|
4
11
|
label: string;
|
|
5
12
|
colorScheme?: 'dark' | 'light';
|
|
6
|
-
|
|
7
|
-
} & BoxPositionProps;
|
|
13
|
+
} & PulseButtonActionProps & BoxPositionProps;
|
|
8
14
|
declare const PulseButton: FC<PulseButtonProps>;
|
|
9
15
|
export default PulseButton;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, ReactElement } from 'react';
|
|
2
2
|
import { BoxPositionProps, ImageFit } from '../../types';
|
|
3
|
+
type GamePreviewImageProps = {
|
|
4
|
+
previewImage: string;
|
|
5
|
+
previewImageFit?: ImageFit;
|
|
6
|
+
} | {
|
|
7
|
+
previewImage: ReactElement;
|
|
8
|
+
previewImageFit?: never;
|
|
9
|
+
};
|
|
3
10
|
type GameDemoProps = {
|
|
4
11
|
name: string;
|
|
5
12
|
src: string;
|
|
6
|
-
|
|
7
|
-
} & BoxPositionProps;
|
|
13
|
+
} & BoxPositionProps & GamePreviewImageProps;
|
|
8
14
|
declare const GameDemo: FC<GameDemoProps>;
|
|
9
15
|
export default GameDemo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../index-
|
|
3
|
+
const index = require("../index-CupM-mJk.js");
|
|
4
4
|
exports.Author = index.Author;
|
|
5
5
|
exports.BonusCard = index.BonusCard;
|
|
6
6
|
exports.Center = index.Center;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { BoxPositionProps, ITabItem, RenderFunction } from '../../types';
|
|
2
2
|
type TabsProps<T> = {
|
|
3
3
|
items: ITabItem<T>[];
|
|
4
|
+
} & BoxPositionProps & (T extends unknown[] ? {
|
|
4
5
|
render: RenderFunction<T>;
|
|
5
|
-
}
|
|
6
|
+
} : {
|
|
7
|
+
render?: never;
|
|
8
|
+
});
|
|
6
9
|
declare const Tabs: <T>({ items, render, ...boxProps }: TabsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
7
10
|
export default Tabs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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, 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 { Center as Center$1, Box, Collapse, Text, Button, Flex, Stack, Image, 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";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
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-CxCmXGhl.mjs";
|
|
5
5
|
import { a as GameCharacteristic } from "./index-DjBQjd1k.mjs";
|
|
@@ -89,7 +89,7 @@ const ColorMap = {
|
|
|
89
89
|
light: "gray.200",
|
|
90
90
|
dark: "gray.700"
|
|
91
91
|
};
|
|
92
|
-
const PulseButton = ({ label, colorScheme = "light", onClick }) => {
|
|
92
|
+
const PulseButton = ({ label, colorScheme = "light", to, onClick }) => {
|
|
93
93
|
return /* @__PURE__ */ jsx(
|
|
94
94
|
Button,
|
|
95
95
|
{
|
|
@@ -98,7 +98,7 @@ const PulseButton = ({ label, colorScheme = "light", onClick }) => {
|
|
|
98
98
|
bgColor: "brand.500",
|
|
99
99
|
animation: `${Animation.pulse} 2s infinite linear`,
|
|
100
100
|
_hover: { bgColor: "brand.200", color: "gray.700" },
|
|
101
|
-
onClick,
|
|
101
|
+
...to ? { as: Link, href: to } : { onClick },
|
|
102
102
|
children: label
|
|
103
103
|
}
|
|
104
104
|
);
|
|
@@ -121,9 +121,9 @@ const Author = ({ author, ...cardProps }) => {
|
|
|
121
121
|
};
|
|
122
122
|
const BonusCardContent = ({ content }) => {
|
|
123
123
|
const { t: t2 } = useTranslation("author");
|
|
124
|
-
return /* @__PURE__ */ jsx(Popover, {
|
|
124
|
+
return /* @__PURE__ */ jsx(Popover, { autoFocus: false, isLazy: true, lazyBehavior: "keepMounted", children: ({ isOpen }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
125
125
|
/* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsx(Button, { size: "sm", variant: "link", color: "white", children: isOpen ? t2("action.collapse") : t2("action.expand") }) }),
|
|
126
|
-
/* @__PURE__ */ jsx(
|
|
126
|
+
/* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(PopoverContent, { children: /* @__PURE__ */ jsx(PopoverBody, { children: Array.isArray(content) ? /* @__PURE__ */ jsx(Stack, { children: content.map((paragraph, index) => /* @__PURE__ */ jsx(Text, { as: "span", children: paragraph }, index)) }) : /* @__PURE__ */ jsx(Text, { children: content }) }) }) })
|
|
127
127
|
] }) });
|
|
128
128
|
};
|
|
129
129
|
const BonusCardTitle = ({ content }) => {
|
|
@@ -362,18 +362,15 @@ const GameDemoContent = ({ src, isFullscreen, isLoaded, onLoad, onToggleFullscre
|
|
|
362
362
|
/* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsx(Spinner, { size: "xl", thickness: "0.6rem", display: isLoaded ? "none" : "block", color: "brand.100" }) })
|
|
363
363
|
] });
|
|
364
364
|
};
|
|
365
|
-
const GameDemoPreview = ({ alt, imageFit = "contain", onPlay }) => {
|
|
366
|
-
var _a;
|
|
367
|
-
const { assets } = useSiteContext();
|
|
365
|
+
const GameDemoPreview = ({ image, alt, imageFit = "contain", onPlay }) => {
|
|
368
366
|
const { t: t2 } = useTranslation("gameDemo");
|
|
369
|
-
const
|
|
370
|
-
const gamePreviewImageComponent = typeof gamePreviewImage === "string" ? /* @__PURE__ */ jsx(Image, { src: gamePreviewImage, alt, objectFit: imageFit }) : gamePreviewImage;
|
|
367
|
+
const imageComponent = typeof image === "string" ? /* @__PURE__ */ jsx(Image, { src: image, alt, objectFit: imageFit }) : image;
|
|
371
368
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
372
|
-
|
|
369
|
+
imageComponent,
|
|
373
370
|
/* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsx(PulseButton, { label: t2("action.playForFree"), onClick: onPlay }) })
|
|
374
371
|
] });
|
|
375
372
|
};
|
|
376
|
-
const GameDemo = ({ name, src, previewImageFit, ...boxProps }) => {
|
|
373
|
+
const GameDemo = ({ name, src, previewImage, previewImageFit, ...boxProps }) => {
|
|
377
374
|
const [isRunning, setIsRunning] = useState(false);
|
|
378
375
|
const [isLoaded, setIsLoaded] = useState(false);
|
|
379
376
|
const { isOpen: isFullscreen, onToggle } = useDisclosure({ defaultIsOpen: false });
|
|
@@ -405,7 +402,7 @@ const GameDemo = ({ name, src, previewImageFit, ...boxProps }) => {
|
|
|
405
402
|
onLoad,
|
|
406
403
|
onToggleFullscreen: handleToggleFullscreen
|
|
407
404
|
}
|
|
408
|
-
) : /* @__PURE__ */ jsx(GameDemoPreview, { alt: name, imageFit: previewImageFit, onPlay: handlePlay })
|
|
405
|
+
) : /* @__PURE__ */ jsx(GameDemoPreview, { image: previewImage, alt: name, imageFit: previewImageFit, onPlay: handlePlay })
|
|
409
406
|
}
|
|
410
407
|
);
|
|
411
408
|
};
|
|
@@ -494,10 +491,11 @@ const GameInfo = ({ info }) => {
|
|
|
494
491
|
};
|
|
495
492
|
const HowTo = ({ steps, ...boxProps }) => {
|
|
496
493
|
const { color, bgColor } = usePrimaryColors();
|
|
497
|
-
return /* @__PURE__ */ jsx(SimpleGrid, { as: "ol", columns: { base: 1, md: 2, lg: 3 }, gap: 4, p: 0, ...boxProps, children: steps.map(({ title, description }, index) => /* @__PURE__ */ jsxs(Flex, { as: "li", alignItems: "flex-start", gap: 4, children: [
|
|
494
|
+
return /* @__PURE__ */ jsx(SimpleGrid, { as: "ol", columns: { base: 1, md: 2, lg: 3 }, gap: 4, p: 0, ...boxProps, children: steps.map(({ title, description, image }, index) => /* @__PURE__ */ jsxs(Flex, { as: "li", alignItems: "flex-start", gap: 4, children: [
|
|
498
495
|
/* @__PURE__ */ jsx(Circle, { size: 12, bgColor, color, fontSize: "lg", fontWeight: "bold", children: String(index + 1) }),
|
|
499
496
|
/* @__PURE__ */ jsxs(Stack, { flex: 1, children: [
|
|
500
497
|
/* @__PURE__ */ jsx(Text, { fontSize: "lg", fontWeight: "bold", children: title }),
|
|
498
|
+
typeof image === "string" ? /* @__PURE__ */ jsx(Image, { src: image, alt: title, aspectRatio: "16/9", objectFit: "cover" }) : image,
|
|
501
499
|
/* @__PURE__ */ jsx(Text, { children: description })
|
|
502
500
|
] })
|
|
503
501
|
] }, index)) });
|
|
@@ -570,10 +568,13 @@ const Navigation$1 = ({ menu }) => {
|
|
|
570
568
|
);
|
|
571
569
|
};
|
|
572
570
|
const Footer = () => {
|
|
573
|
-
var _a, _b;
|
|
571
|
+
var _a, _b, _c;
|
|
574
572
|
const { configs } = useSiteContext();
|
|
575
573
|
const navigation = ((_a = configs == null ? void 0 : configs.footer) == null ? void 0 : _a.navigation) ?? [];
|
|
576
574
|
const extra = (_b = configs == null ? void 0 : configs.footer) == null ? void 0 : _b.extra;
|
|
575
|
+
const showDisclaimer = ((_c = configs == null ? void 0 : configs.footer) == null ? void 0 : _c.showDisclaimer) ?? true;
|
|
576
|
+
const hasNavigation = !!navigation.length;
|
|
577
|
+
const hasExtra = !!extra;
|
|
577
578
|
return /* @__PURE__ */ jsx(
|
|
578
579
|
Box,
|
|
579
580
|
{
|
|
@@ -582,9 +583,9 @@ const Footer = () => {
|
|
|
582
583
|
color: useColorModeValue("gray.700", "gray.200"),
|
|
583
584
|
py: 4,
|
|
584
585
|
children: /* @__PURE__ */ jsxs(Container, { children: [
|
|
585
|
-
/* @__PURE__ */ jsx(Navigation$1, { menu: navigation }),
|
|
586
|
-
|
|
587
|
-
/* @__PURE__ */ jsx(Disclaimer, {}),
|
|
586
|
+
hasNavigation && /* @__PURE__ */ jsx(Navigation$1, { menu: navigation }),
|
|
587
|
+
hasExtra && /* @__PURE__ */ jsx(Extra, { children: extra }),
|
|
588
|
+
showDisclaimer && /* @__PURE__ */ jsx(Disclaimer, {}),
|
|
588
589
|
/* @__PURE__ */ jsx(Brand$1, { brand: /* @__PURE__ */ jsx(Logo, {}) }),
|
|
589
590
|
/* @__PURE__ */ jsx(Copyright, {})
|
|
590
591
|
] })
|
|
@@ -735,7 +736,7 @@ const Header = () => {
|
|
|
735
736
|
const navigation = ((_a = configs == null ? void 0 : configs.header) == null ? void 0 : _a.navigation) ?? [];
|
|
736
737
|
const toolbar = (_b = configs == null ? void 0 : configs.header) == null ? void 0 : _b.toolbar;
|
|
737
738
|
const hasToolbar = !!toolbar;
|
|
738
|
-
const hasNavigation = navigation.length;
|
|
739
|
+
const hasNavigation = !!navigation.length;
|
|
739
740
|
return /* @__PURE__ */ jsx(
|
|
740
741
|
Box,
|
|
741
742
|
{
|
|
@@ -980,7 +981,7 @@ const Tabs = ({ items, render, ...boxProps }) => {
|
|
|
980
981
|
}, []);
|
|
981
982
|
return /* @__PURE__ */ jsxs(Tabs$1, { overflow: "hidden", colorScheme: "brand", ...boxProps, children: [
|
|
982
983
|
/* @__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)) }),
|
|
983
|
-
/* @__PURE__ */ jsx(TabPanels, { children: panels.map((panel, index) => /* @__PURE__ */ jsx(TabPanel, { children: render(panel) }, index)) })
|
|
984
|
+
/* @__PURE__ */ jsx(TabPanels, { children: panels.map((panel, index) => /* @__PURE__ */ jsx(TabPanel, { children: render ? render(panel) : panel }, index)) })
|
|
984
985
|
] });
|
|
985
986
|
};
|
|
986
987
|
export {
|
|
@@ -90,7 +90,7 @@ const ColorMap = {
|
|
|
90
90
|
light: "gray.200",
|
|
91
91
|
dark: "gray.700"
|
|
92
92
|
};
|
|
93
|
-
const PulseButton = ({ label, colorScheme = "light", onClick }) => {
|
|
93
|
+
const PulseButton = ({ label, colorScheme = "light", to, onClick }) => {
|
|
94
94
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
95
95
|
react.Button,
|
|
96
96
|
{
|
|
@@ -99,7 +99,7 @@ const PulseButton = ({ label, colorScheme = "light", onClick }) => {
|
|
|
99
99
|
bgColor: "brand.500",
|
|
100
100
|
animation: `${index$1.Animation.pulse} 2s infinite linear`,
|
|
101
101
|
_hover: { bgColor: "brand.200", color: "gray.700" },
|
|
102
|
-
onClick,
|
|
102
|
+
...to ? { as: react.Link, href: to } : { onClick },
|
|
103
103
|
children: label
|
|
104
104
|
}
|
|
105
105
|
);
|
|
@@ -122,9 +122,9 @@ const Author = ({ author, ...cardProps }) => {
|
|
|
122
122
|
};
|
|
123
123
|
const BonusCardContent = ({ content }) => {
|
|
124
124
|
const { t } = reactI18next.useTranslation("author");
|
|
125
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Popover, {
|
|
125
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Popover, { autoFocus: false, isLazy: true, lazyBehavior: "keepMounted", children: ({ isOpen }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
126
126
|
/* @__PURE__ */ jsxRuntime.jsx(react.PopoverTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Button, { size: "sm", variant: "link", color: "white", children: isOpen ? t("action.collapse") : t("action.expand") }) }),
|
|
127
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.
|
|
127
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverContent, { children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverBody, { children: Array.isArray(content) ? /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { children: content.map((paragraph, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", children: paragraph }, index2)) }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: content }) }) }) })
|
|
128
128
|
] }) });
|
|
129
129
|
};
|
|
130
130
|
const BonusCardTitle = ({ content }) => {
|
|
@@ -363,18 +363,15 @@ const GameDemoContent = ({ src, isFullscreen, isLoaded, onLoad, onToggleFullscre
|
|
|
363
363
|
/* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, { size: "xl", thickness: "0.6rem", display: isLoaded ? "none" : "block", color: "brand.100" }) })
|
|
364
364
|
] });
|
|
365
365
|
};
|
|
366
|
-
const GameDemoPreview = ({ alt, imageFit = "contain", onPlay }) => {
|
|
367
|
-
var _a;
|
|
368
|
-
const { assets } = index.useSiteContext();
|
|
366
|
+
const GameDemoPreview = ({ image, alt, imageFit = "contain", onPlay }) => {
|
|
369
367
|
const { t } = reactI18next.useTranslation("gameDemo");
|
|
370
|
-
const
|
|
371
|
-
const gamePreviewImageComponent = typeof gamePreviewImage === "string" ? /* @__PURE__ */ jsxRuntime.jsx(react.Image, { src: gamePreviewImage, alt, objectFit: imageFit }) : gamePreviewImage;
|
|
368
|
+
const imageComponent = typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(react.Image, { src: image, alt, objectFit: imageFit }) : image;
|
|
372
369
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
373
|
-
|
|
370
|
+
imageComponent,
|
|
374
371
|
/* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsx(PulseButton, { label: t("action.playForFree"), onClick: onPlay }) })
|
|
375
372
|
] });
|
|
376
373
|
};
|
|
377
|
-
const GameDemo = ({ name, src, previewImageFit, ...boxProps }) => {
|
|
374
|
+
const GameDemo = ({ name, src, previewImage, previewImageFit, ...boxProps }) => {
|
|
378
375
|
const [isRunning, setIsRunning] = react$1.useState(false);
|
|
379
376
|
const [isLoaded, setIsLoaded] = react$1.useState(false);
|
|
380
377
|
const { isOpen: isFullscreen, onToggle } = react.useDisclosure({ defaultIsOpen: false });
|
|
@@ -406,7 +403,7 @@ const GameDemo = ({ name, src, previewImageFit, ...boxProps }) => {
|
|
|
406
403
|
onLoad,
|
|
407
404
|
onToggleFullscreen: handleToggleFullscreen
|
|
408
405
|
}
|
|
409
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(GameDemoPreview, { alt: name, imageFit: previewImageFit, onPlay: handlePlay })
|
|
406
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(GameDemoPreview, { image: previewImage, alt: name, imageFit: previewImageFit, onPlay: handlePlay })
|
|
410
407
|
}
|
|
411
408
|
);
|
|
412
409
|
};
|
|
@@ -495,10 +492,11 @@ const GameInfo = ({ info }) => {
|
|
|
495
492
|
};
|
|
496
493
|
const HowTo = ({ steps, ...boxProps }) => {
|
|
497
494
|
const { color, bgColor } = index$2.usePrimaryColors();
|
|
498
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.SimpleGrid, { as: "ol", columns: { base: 1, md: 2, lg: 3 }, gap: 4, p: 0, ...boxProps, children: steps.map(({ title, description }, index2) => /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "li", alignItems: "flex-start", gap: 4, children: [
|
|
495
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.SimpleGrid, { as: "ol", columns: { base: 1, md: 2, lg: 3 }, gap: 4, p: 0, ...boxProps, children: steps.map(({ title, description, image }, index2) => /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "li", alignItems: "flex-start", gap: 4, children: [
|
|
499
496
|
/* @__PURE__ */ jsxRuntime.jsx(react.Circle, { size: 12, bgColor, color, fontSize: "lg", fontWeight: "bold", children: String(index2 + 1) }),
|
|
500
497
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { flex: 1, children: [
|
|
501
498
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "lg", fontWeight: "bold", children: title }),
|
|
499
|
+
typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(react.Image, { src: image, alt: title, aspectRatio: "16/9", objectFit: "cover" }) : image,
|
|
502
500
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: description })
|
|
503
501
|
] })
|
|
504
502
|
] }, index2)) });
|
|
@@ -571,10 +569,13 @@ const Navigation$1 = ({ menu }) => {
|
|
|
571
569
|
);
|
|
572
570
|
};
|
|
573
571
|
const Footer = () => {
|
|
574
|
-
var _a, _b;
|
|
572
|
+
var _a, _b, _c;
|
|
575
573
|
const { configs } = index.useSiteContext();
|
|
576
574
|
const navigation = ((_a = configs == null ? void 0 : configs.footer) == null ? void 0 : _a.navigation) ?? [];
|
|
577
575
|
const extra = (_b = configs == null ? void 0 : configs.footer) == null ? void 0 : _b.extra;
|
|
576
|
+
const showDisclaimer = ((_c = configs == null ? void 0 : configs.footer) == null ? void 0 : _c.showDisclaimer) ?? true;
|
|
577
|
+
const hasNavigation = !!navigation.length;
|
|
578
|
+
const hasExtra = !!extra;
|
|
578
579
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
579
580
|
react.Box,
|
|
580
581
|
{
|
|
@@ -583,9 +584,9 @@ const Footer = () => {
|
|
|
583
584
|
color: react.useColorModeValue("gray.700", "gray.200"),
|
|
584
585
|
py: 4,
|
|
585
586
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
|
|
586
|
-
/* @__PURE__ */ jsxRuntime.jsx(Navigation$1, { menu: navigation }),
|
|
587
|
-
|
|
588
|
-
/* @__PURE__ */ jsxRuntime.jsx(Disclaimer, {}),
|
|
587
|
+
hasNavigation && /* @__PURE__ */ jsxRuntime.jsx(Navigation$1, { menu: navigation }),
|
|
588
|
+
hasExtra && /* @__PURE__ */ jsxRuntime.jsx(Extra, { children: extra }),
|
|
589
|
+
showDisclaimer && /* @__PURE__ */ jsxRuntime.jsx(Disclaimer, {}),
|
|
589
590
|
/* @__PURE__ */ jsxRuntime.jsx(Brand$1, { brand: /* @__PURE__ */ jsxRuntime.jsx(Logo, {}) }),
|
|
590
591
|
/* @__PURE__ */ jsxRuntime.jsx(Copyright, {})
|
|
591
592
|
] })
|
|
@@ -736,7 +737,7 @@ const Header = () => {
|
|
|
736
737
|
const navigation = ((_a = configs == null ? void 0 : configs.header) == null ? void 0 : _a.navigation) ?? [];
|
|
737
738
|
const toolbar = (_b = configs == null ? void 0 : configs.header) == null ? void 0 : _b.toolbar;
|
|
738
739
|
const hasToolbar = !!toolbar;
|
|
739
|
-
const hasNavigation = navigation.length;
|
|
740
|
+
const hasNavigation = !!navigation.length;
|
|
740
741
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
741
742
|
react.Box,
|
|
742
743
|
{
|
|
@@ -981,7 +982,7 @@ const Tabs = ({ items, render, ...boxProps }) => {
|
|
|
981
982
|
}, []);
|
|
982
983
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Tabs, { overflow: "hidden", colorScheme: "brand", ...boxProps, children: [
|
|
983
984
|
/* @__PURE__ */ jsxRuntime.jsx(react.TabList, { overflow: "auto hidden", children: tabs.map(({ label, icon }, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Tab, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "h3", isTruncated: true, children: icon ? `${icon} ${label}` : label }) }, index2)) }),
|
|
984
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.TabPanels, { children: panels.map((panel, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.TabPanel, { children: render(panel) }, index2)) })
|
|
985
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.TabPanels, { children: panels.map((panel, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.TabPanel, { children: render ? render(panel) : panel }, index2)) })
|
|
985
986
|
] });
|
|
986
987
|
};
|
|
987
988
|
exports.Author = Author;
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-CupM-mJk.js");
|
|
4
4
|
const index$1 = require("./index-IpSV-c71.js");
|
|
5
5
|
const i18n$1 = require("./index-uq_uSyaC.js");
|
|
6
6
|
const index$2 = require("./index-m97PmVsd.js");
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, B, g, C, h, E, F, a, b, G, c, d, i, H, L, j, e, P, k, S, T, f } from "./index-
|
|
1
|
+
import { A, B, g, C, h, E, F, a, b, G, c, d, i, H, L, j, e, P, k, S, T, f } from "./index-5_hCvFkU.mjs";
|
|
2
2
|
import { u } from "./index-xuSxvz5z.mjs";
|
|
3
3
|
import { a as a2, G as G2, r } from "./index-DjBQjd1k.mjs";
|
|
4
4
|
import { M } from "./index-C-e_0aJJ.mjs";
|
|
@@ -7,7 +7,6 @@ type Image = ImageUrl | ImageComponent;
|
|
|
7
7
|
export interface ISiteAssets {
|
|
8
8
|
images?: {
|
|
9
9
|
logo?: Image;
|
|
10
|
-
gamePreview?: Image;
|
|
11
10
|
expert?: Image;
|
|
12
11
|
};
|
|
13
12
|
}
|
|
@@ -18,6 +17,7 @@ interface ISiteHeaderConfig {
|
|
|
18
17
|
interface ISiteFooterConfig {
|
|
19
18
|
navigation?: INavItem[];
|
|
20
19
|
extra?: ReactNode;
|
|
20
|
+
showDisclaimer?: boolean;
|
|
21
21
|
}
|
|
22
22
|
export interface ISiteConfigs {
|
|
23
23
|
header?: ISiteHeaderConfig;
|