@anywayseo/tools 5.4.0 → 5.4.2

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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-4Zb1neOM.js");
4
- const index$1 = require("../index-BltrZp3R.js");
3
+ const index = require("../index-fy0DKjZo.js");
4
+ const index$1 = require("../index-qNfIS8KH.js");
5
5
  exports.Author = index.Author;
6
6
  exports.AuthorCard = index.AuthorCard;
7
7
  exports.BonusCard = index.BonusCard;
@@ -1,5 +1,5 @@
1
- import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, S, o, p, h, T, i, j } from "../index-BM-_Lr_j.mjs";
2
- import { I, L as L2 } from "../index-Bwlxdh5F.mjs";
1
+ import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, S, o, p, h, T, i, j } from "../index-CrW7S4lK.mjs";
2
+ import { I, L as L2 } from "../index-DT2ARtRV.mjs";
3
3
  export {
4
4
  k as Author,
5
5
  A as AuthorCard,
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Text, UnorderedList, OrderedList, Heading, Link } from "@chakra-ui/react";
3
3
  import { MDXProvider } from "@mdx-js/react";
4
- import { I as Image, L as Link$1 } from "./index-Bwlxdh5F.mjs";
4
+ import { I as Image, L as Link$1 } from "./index-DT2ARtRV.mjs";
5
5
  import "react";
6
6
  import "react-i18next";
7
7
  import "./index-BJRvnR8Q.mjs";
@@ -2,7 +2,7 @@
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const react$1 = require("@chakra-ui/react");
4
4
  const react = require("@mdx-js/react");
5
- const index = require("./index-BltrZp3R.js");
5
+ const index = require("./index-qNfIS8KH.js");
6
6
  require("react");
7
7
  require("react-i18next");
8
8
  require("./index-C6MG_f24.js");
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { Flex, Box, Collapse, Text, Button, Stack, 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, Menu, MenuButton, HStack, Icon, MenuList, MenuItem, List as List$1, ListItem, ListIcon, TableContainer, Table as Table$1, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, TabPanels, TabPanel } from "@chakra-ui/react";
2
+ import { Link, Flex, Box, Collapse, Text, Button, Stack, Center as Center$1, SimpleGrid, 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, Menu, MenuButton, HStack, Icon, MenuList, MenuItem, List as List$1, ListItem, ListIcon, TableContainer, Table as Table$1, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, TabPanels, TabPanel } from "@chakra-ui/react";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import "react-medium-image-zoom";
5
- import { L as Link, I as Image, a as useSiteContext, u as usePageContext } from "./index-Bwlxdh5F.mjs";
5
+ import { I as Image, a as useSiteContext, L as Link$1, u as usePageContext } from "./index-DT2ARtRV.mjs";
6
6
  import { useRef, useState, useLayoutEffect, Fragment as Fragment$1, useMemo, forwardRef, useEffect } from "react";
7
7
  import { A as Animation } from "./index-BJRvnR8Q.mjs";
8
8
  import { a as GameCharacteristic } from "./index-Bts2DBYS.mjs";
@@ -90,7 +90,7 @@ const SocialNetworkMap = {
90
90
  };
91
91
  const SocialNetwork = ({ kind, url }) => {
92
92
  const Icon2 = SocialNetworkMap[kind];
93
- return /* @__PURE__ */ jsx(Link, { to: url, children: /* @__PURE__ */ jsx(Icon2, {}) });
93
+ return /* @__PURE__ */ jsx(Link, { href: url, target: "_blank", rel: "noopener noreferrer nofollow", children: /* @__PURE__ */ jsx(Icon2, {}) });
94
94
  };
95
95
  const SocialNetworks = ({ socialNetworks, ...flexProps }) => {
96
96
  const uniqueSocialNetworks = [...new Map(socialNetworks.map((item) => [item.kind, item])).values()];
@@ -168,7 +168,7 @@ const LinkButton = ({
168
168
  const isInvertedColor = (_a = config == null ? void 0 : config.theme) == null ? void 0 : _a.isInvertedColor;
169
169
  const isRedirectLink = linkType === "redirect";
170
170
  const isInternalLink = isRelativePath(href);
171
- const LinkComponent = isInternalLink ? Link : Link$1;
171
+ const LinkComponent = isInternalLink ? Link$1 : Link;
172
172
  const hrefKey = isInternalLink ? "to" : "href";
173
173
  const hrefValue = isRedirectLink ? `/follow?to=${href}` : href;
174
174
  return /* @__PURE__ */ jsx(
@@ -691,7 +691,7 @@ const Logo = () => {
691
691
  const Brand$1 = ({ brand }) => {
692
692
  return /* @__PURE__ */ jsxs(Box, { position: "relative", my: 2, py: 8, children: [
693
693
  /* @__PURE__ */ jsx(Divider, {}),
694
- /* @__PURE__ */ jsx(AbsoluteCenter, { display: "flex", bgColor: useColorModeValue("gray.50", "gray.900"), children: /* @__PURE__ */ jsx(Link, { to: "/", children: brand }) })
694
+ /* @__PURE__ */ jsx(AbsoluteCenter, { display: "flex", bgColor: useColorModeValue("gray.50", "gray.900"), children: /* @__PURE__ */ jsx(Link$1, { to: "/", children: brand }) })
695
695
  ] });
696
696
  };
697
697
  const Copyright = () => {
@@ -728,7 +728,7 @@ const Navigation$1 = ({ menu }) => {
728
728
  children: menu.map(({ slug, label }, index) => /* @__PURE__ */ jsx(Flex, { as: "li", children: /* @__PURE__ */ jsx(
729
729
  Text,
730
730
  {
731
- as: Link,
731
+ as: Link$1,
732
732
  to: slug,
733
733
  fontSize: "md",
734
734
  fontWeight: "semibold",
@@ -768,7 +768,7 @@ const Footer = () => {
768
768
  );
769
769
  };
770
770
  const Brand = ({ brand }) => {
771
- return /* @__PURE__ */ jsx(Link, { to: "/", children: brand });
771
+ return /* @__PURE__ */ jsx(Link$1, { to: "/", children: brand });
772
772
  };
773
773
  const FranceIcon = (props) => {
774
774
  return /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
@@ -863,7 +863,7 @@ const LocaleSwitcher = ({ currentLocale, locales }) => {
863
863
  ] })
864
864
  }
865
865
  ),
866
- /* @__PURE__ */ jsx(MenuList, { minW: "fit-content", children: localeMenuItems.map(({ code, name, icon }) => /* @__PURE__ */ jsx(MenuItem, { as: Link, to: `/${code}`, icon: /* @__PURE__ */ jsx(Icon, { as: icon, w: 4, h: 4 }), children: name }, code)) })
866
+ /* @__PURE__ */ jsx(MenuList, { minW: "fit-content", children: localeMenuItems.map(({ code, name, icon }) => /* @__PURE__ */ jsx(MenuItem, { as: Link$1, to: `/${code}`, icon: /* @__PURE__ */ jsx(Icon, { as: icon, w: 4, h: 4 }), children: name }, code)) })
867
867
  ] });
868
868
  };
869
869
  const NavLink = forwardRef(({ slug, label }, ref) => {
@@ -871,7 +871,7 @@ const NavLink = forwardRef(({ slug, label }, ref) => {
871
871
  Text,
872
872
  {
873
873
  ref,
874
- as: Link,
874
+ as: Link$1,
875
875
  to: slug,
876
876
  p: 2,
877
877
  fontWeight: "semibold",
@@ -908,7 +908,7 @@ const NavList$1 = ({ slug, label, children }) => {
908
908
  boxShadow: "xl",
909
909
  bg: background,
910
910
  children: /* @__PURE__ */ jsx(List$1, { spacing: 2, p: 0, children: children == null ? void 0 : children.map((child, index) => {
911
- return /* @__PURE__ */ jsx(ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxs(Flex, { as: Link, to: buildPath(child.slug, slug), p: 2, role: "group", children: [
911
+ return /* @__PURE__ */ jsx(ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxs(Flex, { as: Link$1, to: buildPath(child.slug, slug), p: 2, role: "group", children: [
912
912
  /* @__PURE__ */ jsx(Text, { fontWeight: 500, transition: "all .3s ease", _groupHover: { color: "brand.400" }, children: child.label }),
913
913
  /* @__PURE__ */ jsx(
914
914
  Flex,
@@ -972,7 +972,7 @@ const NavList = ({ slug, label, children, isExpanded, onExpand }) => {
972
972
  borderLeft: 1,
973
973
  borderStyle: "solid",
974
974
  borderColor: useColorModeValue("gray.200", "gray.700"),
975
- children: children == null ? void 0 : children.map((child, index) => /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: /* @__PURE__ */ jsx(Text, { as: Link, to: buildPath(child.slug, slug), p: 2, fontSize: "sm", children: child.label }) }, index))
975
+ children: children == null ? void 0 : children.map((child, index) => /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: /* @__PURE__ */ jsx(Text, { as: Link$1, to: buildPath(child.slug, slug), p: 2, fontSize: "sm", children: child.label }) }, index))
976
976
  }
977
977
  ) })
978
978
  ] });
@@ -1166,7 +1166,7 @@ const NotFound = () => {
1166
1166
  /* @__PURE__ */ jsxs(Text, { fontSize: "xl", children: [
1167
1167
  t2("description"),
1168
1168
  " ",
1169
- /* @__PURE__ */ jsx(Button, { as: Link, to: "/", variant: "link", colorScheme: "brand", fontSize: "xl", children: t2("action") })
1169
+ /* @__PURE__ */ jsx(Button, { as: Link$1, to: "/", variant: "link", colorScheme: "brand", fontSize: "xl", children: t2("action") })
1170
1170
  ] })
1171
1171
  ] });
1172
1172
  };
@@ -23,7 +23,7 @@ const Image = ({ src, mode = "default", hasZoom, ...plainImageProps }) => {
23
23
  ...plainImageProps
24
24
  }
25
25
  );
26
- } else if (src.props.image) {
26
+ } else if (src.props.image || src.props.src) {
27
27
  image = mode === "thumbnail" ? /* @__PURE__ */ jsx(Box, { aspectRatio: "16/9", children: src }) : src;
28
28
  } else {
29
29
  return null;
@@ -3,7 +3,7 @@ const jsxRuntime = require("react/jsx-runtime");
3
3
  const react = require("@chakra-ui/react");
4
4
  const reactI18next = require("react-i18next");
5
5
  require("react-medium-image-zoom");
6
- const index = require("./index-BltrZp3R.js");
6
+ const index = require("./index-qNfIS8KH.js");
7
7
  const react$1 = require("react");
8
8
  const index$3 = require("./index-C6MG_f24.js");
9
9
  const index$5 = require("./index-CJVr79Z2.js");
@@ -91,7 +91,7 @@ const SocialNetworkMap = {
91
91
  };
92
92
  const SocialNetwork = ({ kind, url }) => {
93
93
  const Icon = SocialNetworkMap[kind];
94
- return /* @__PURE__ */ jsxRuntime.jsx(index.Link, { to: url, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) });
94
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Link, { href: url, target: "_blank", rel: "noopener noreferrer nofollow", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) });
95
95
  };
96
96
  const SocialNetworks = ({ socialNetworks, ...flexProps }) => {
97
97
  const uniqueSocialNetworks = [...new Map(socialNetworks.map((item) => [item.kind, item])).values()];
@@ -24,7 +24,7 @@ const Image = ({ src, mode = "default", hasZoom, ...plainImageProps }) => {
24
24
  ...plainImageProps
25
25
  }
26
26
  );
27
- } else if (src.props.image) {
27
+ } else if (src.props.image || src.props.src) {
28
28
  image = mode === "thumbnail" ? /* @__PURE__ */ jsxRuntime.jsx(react.Box, { aspectRatio: "16/9", children: src }) : src;
29
29
  } else {
30
30
  return null;
package/dist/index.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-4Zb1neOM.js");
4
- const index$1 = require("./index-BltrZp3R.js");
3
+ const index = require("./index-fy0DKjZo.js");
4
+ const index$1 = require("./index-qNfIS8KH.js");
5
5
  const index$2 = require("./index-WFgDSB1A.js");
6
6
  const index$3 = require("./index-CAfBnNV6.js");
7
7
  const i18n = require("./i18n/index.cjs");
8
- const index$4 = require("./index-BbxOP7UY.js");
8
+ const index$4 = require("./index-ChXyJHJw.js");
9
9
  const index$5 = require("./index-CJVr79Z2.js");
10
10
  const index$6 = require("./index-C6MG_f24.js");
11
11
  const index$7 = require("./index-CYr1ct1t.js");
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, S, o, p, h, T, i, j } from "./index-BM-_Lr_j.mjs";
2
- import { I, L as L2, P as P2, S as S2, u, a as a2 } from "./index-Bwlxdh5F.mjs";
1
+ import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, S, o, p, h, T, i, j } from "./index-CrW7S4lK.mjs";
2
+ import { I, L as L2, P as P2, S as S2, u, a as a2 } from "./index-DT2ARtRV.mjs";
3
3
  import { u as u2 } from "./index-BzbpMLDD.mjs";
4
4
  import { u as u3 } from "./index-tj12BA6U.mjs";
5
5
  import { DEFAULT_LANGUAGE, resources } from "./i18n/index.mjs";
6
- import { M } from "./index-C4sJXfkN.mjs";
6
+ import { M } from "./index-3z6DUkQh.mjs";
7
7
  import { a as a3, G as G2 } from "./index-Bts2DBYS.mjs";
8
8
  import { A as A2 } from "./index-BJRvnR8Q.mjs";
9
9
  import { b as b2, c as c2, g as g2, a as a4 } from "./index-cQqALZIW.mjs";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-BbxOP7UY.js");
4
- const index$1 = require("../index-BltrZp3R.js");
3
+ const index = require("../index-ChXyJHJw.js");
4
+ const index$1 = require("../index-qNfIS8KH.js");
5
5
  exports.MdxProvider = index.MdxProvider;
6
6
  exports.PageProvider = index$1.PageProvider;
7
7
  exports.SiteProvider = index$1.SiteProvider;
@@ -1,5 +1,5 @@
1
- import { M } from "../index-C4sJXfkN.mjs";
2
- import { P, S, u, a } from "../index-Bwlxdh5F.mjs";
1
+ import { M } from "../index-3z6DUkQh.mjs";
2
+ import { P, S, u, a } from "../index-DT2ARtRV.mjs";
3
3
  export {
4
4
  M as MdxProvider,
5
5
  P as PageProvider,
@@ -2,7 +2,8 @@ import { ReactElement } from 'react';
2
2
  import { ImageProps } from '@chakra-ui/react';
3
3
  export type ImageUrl = string;
4
4
  export type ImageComponent = ReactElement<{
5
- image: unknown;
5
+ image?: unknown;
6
+ src?: unknown;
6
7
  }>;
7
8
  export type ImageType = ImageUrl | ImageComponent;
8
9
  export type ImageFit = ImageProps['objectFit'];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anywayseo/tools",
3
3
  "description": "Shared UI Components and Modules",
4
- "version": "5.4.0",
4
+ "version": "5.4.2",
5
5
  "keywords": [
6
6
  "react",
7
7
  "ui",