@anywayseo/tools 2.5.0 → 2.6.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.
@@ -1,5 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { IBonusCard } from '../../types';
3
- type BonusCardProps = IBonusCard;
3
+ type BonusCardProps = IBonusCard & {
4
+ className?: string;
5
+ };
4
6
  declare const BonusCard: FC<BonusCardProps>;
5
7
  export default BonusCard;
@@ -1,5 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { IGameCard } from '../../types';
3
- type GameCardProps = IGameCard;
3
+ type GameCardProps = IGameCard & {
4
+ height?: 'full' | 'auto';
5
+ };
4
6
  declare const GameCard: FC<GameCardProps>;
5
7
  export default GameCard;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-BR5dWoW7.js");
3
+ const index = require("../index-qgcoV14g.js");
4
4
  exports.Author = index.Author;
5
5
  exports.BonusCard = index.BonusCard;
6
6
  exports.Center = index.Center;
@@ -20,6 +20,7 @@ exports.LinkButton = index.LinkButton;
20
20
  exports.List = index.List;
21
21
  exports.ProsCons = index.ProsCons;
22
22
  exports.PulseButton = index.PulseButton;
23
+ exports.RichTextRenderer = index.RichTextRenderer;
23
24
  exports.Seo = index.Seo;
24
25
  exports.Table = index.Table;
25
26
  exports.Tabs = index.Tabs;
@@ -13,6 +13,7 @@ export { default as HowTo } from './how-to';
13
13
  export { default as Layout } from './layout';
14
14
  export { default as List } from './list';
15
15
  export { default as ProsCons } from './pros-cons';
16
+ export { default as RichTextRenderer } from './rich-text-renderer';
16
17
  export { default as Seo } from './seo';
17
18
  export { default as Table } from './table';
18
19
  export { default as Tabs } from './tabs';
@@ -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-BWm-60DT.mjs";
1
+ import { A, B, g, C, h, E, F, a, b, G, c, d, i, H, L, j, e, P, k, R, S, T, f } from "../index-Ct1pg92K.mjs";
2
2
  export {
3
3
  A as Author,
4
4
  B as BonusCard,
@@ -19,6 +19,7 @@ export {
19
19
  e as List,
20
20
  P as ProsCons,
21
21
  k as PulseButton,
22
+ R as RichTextRenderer,
22
23
  S as Seo,
23
24
  T as Table,
24
25
  f as Tabs
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ type RichTextRendererProps = {
3
+ content: string;
4
+ };
5
+ declare const RichTextRenderer: FC<RichTextRendererProps>;
6
+ export default RichTextRenderer;
@@ -4,13 +4,14 @@ 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-BqUBNm7v.mjs";
5
5
  import { a as GameCharacteristic } from "./index-F6_fGeRI.mjs";
6
6
  import "@ctrl/tinycolor";
7
- import "@mdx-js/react";
7
+ import { useMDXComponents } from "@mdx-js/react";
8
8
  import { u as useSiteContext } from "./index-BNb-P8a6.mjs";
9
9
  import { useRef, useState, useLayoutEffect, Fragment as Fragment$1, forwardRef, useEffect, useMemo } from "react";
10
10
  import { EmailIcon, StarIcon, CloseIcon, ExternalLinkIcon, ChevronRightIcon, ChevronDownIcon, HamburgerIcon, ChevronUpIcon, WarningIcon, CheckCircleIcon } from "@chakra-ui/icons";
11
11
  import { u as usePrimaryColors } from "./index-xuSxvz5z.mjs";
12
12
  import { t } from "i18next";
13
13
  import { Link as Link$1 } from "gatsby";
14
+ import Markdown from "react-markdown";
14
15
  const Center = ({ children, ...boxProps }) => {
15
16
  return /* @__PURE__ */ jsx(Center$1, { ...boxProps, children });
16
17
  };
@@ -143,12 +144,13 @@ const BonusCardTitle = ({ content }) => {
143
144
  }
144
145
  );
145
146
  };
146
- const BonusCard = ({ title, subtitle, content, link, image }) => {
147
+ const BonusCard = ({ title, subtitle, content, link, image, className }) => {
147
148
  return /* @__PURE__ */ jsxs(
148
149
  Card,
149
150
  {
150
151
  as: "article",
151
152
  h: "full",
153
+ color: "whiteAlpha.900",
152
154
  bg: "linear-gradient(90deg, #3b1f47, #731d58)",
153
155
  _before: image ? {
154
156
  content: '""',
@@ -163,6 +165,7 @@ const BonusCard = ({ title, subtitle, content, link, image }) => {
163
165
  filter: "blur(0.05em) opacity(50%)",
164
166
  zIndex: 0
165
167
  } : void 0,
168
+ className,
166
169
  children: [
167
170
  /* @__PURE__ */ jsxs(CardBody, { as: "section", pb: 0, flex: 1, children: [
168
171
  /* @__PURE__ */ jsx(BonusCardTitle, { content: title }),
@@ -304,7 +307,7 @@ const Features = ({ features, ...boxProps }) => {
304
307
  }
305
308
  );
306
309
  };
307
- const GameCard = ({ name, image, link }) => {
310
+ const GameCard = ({ name, description, image, link, height = "auto" }) => {
308
311
  return /* @__PURE__ */ jsxs(
309
312
  LinkBox,
310
313
  {
@@ -314,11 +317,15 @@ const GameCard = ({ name, image, link }) => {
314
317
  transition: "transform 0.2s ease",
315
318
  cursor: link ? "pointer" : "default",
316
319
  overflow: "hidden",
317
- bg: "blackAlpha.400",
320
+ bg: "blackAlpha.200",
321
+ height,
318
322
  _hover: { transform: "scale(1.1)" },
319
323
  children: [
320
324
  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 }),
321
- /* @__PURE__ */ jsx(Box, { as: "section", rounded: "md", p: 4, children: /* @__PURE__ */ jsx(Text, { as: "span", children: link ? /* @__PURE__ */ jsx(LinkOverlay, { href: link, children: name }) : name }) })
325
+ /* @__PURE__ */ jsxs(Box, { as: "section", rounded: "md", p: 4, children: [
326
+ /* @__PURE__ */ jsx(Text, { as: "span", children: link ? /* @__PURE__ */ jsx(LinkOverlay, { href: link, children: name }) : name }),
327
+ !!description && /* @__PURE__ */ jsx(Text, { fontSize: "sm", color: "gray.600", children: description })
328
+ ] })
322
329
  ]
323
330
  }
324
331
  );
@@ -921,6 +928,10 @@ const ProsCons = ({ items, ...boxProps }) => {
921
928
  /* @__PURE__ */ jsx(ProsConsCard, { itemType: "cons", items: cons })
922
929
  ] });
923
930
  };
931
+ const RichTextRenderer = ({ content }) => {
932
+ const components = useMDXComponents();
933
+ return /* @__PURE__ */ jsx(Markdown, { components, children: content });
934
+ };
924
935
  const Seo = ({ children, siteMetadata, title, description, lang }) => {
925
936
  const { title: defaultTitle, description: defaultDescription, lang: defaultLang, siteUrl } = siteMetadata;
926
937
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -994,6 +1005,7 @@ export {
994
1005
  HowTo as H,
995
1006
  Layout as L,
996
1007
  ProsCons as P,
1008
+ RichTextRenderer as R,
997
1009
  Seo as S,
998
1010
  Table as T,
999
1011
  FeatureCard as a,
@@ -5,13 +5,14 @@ const reactI18next = require("react-i18next");
5
5
  const index$1 = require("./index-D2APUOog.js");
6
6
  const i18n = require("./index-BEqFPNAt.js");
7
7
  require("@ctrl/tinycolor");
8
- require("@mdx-js/react");
8
+ const react$2 = require("@mdx-js/react");
9
9
  const index = require("./index-BhsXlbd8.js");
10
10
  const react$1 = require("react");
11
11
  const icons = require("@chakra-ui/icons");
12
12
  const index$2 = require("./index-IpSV-c71.js");
13
13
  const i18n$1 = require("i18next");
14
14
  const gatsby = require("gatsby");
15
+ const Markdown = require("react-markdown");
15
16
  const Center = ({ children, ...boxProps }) => {
16
17
  return /* @__PURE__ */ jsxRuntime.jsx(react.Center, { ...boxProps, children });
17
18
  };
@@ -144,12 +145,13 @@ const BonusCardTitle = ({ content }) => {
144
145
  }
145
146
  );
146
147
  };
147
- const BonusCard = ({ title, subtitle, content, link, image }) => {
148
+ const BonusCard = ({ title, subtitle, content, link, image, className }) => {
148
149
  return /* @__PURE__ */ jsxRuntime.jsxs(
149
150
  react.Card,
150
151
  {
151
152
  as: "article",
152
153
  h: "full",
154
+ color: "whiteAlpha.900",
153
155
  bg: "linear-gradient(90deg, #3b1f47, #731d58)",
154
156
  _before: image ? {
155
157
  content: '""',
@@ -164,6 +166,7 @@ const BonusCard = ({ title, subtitle, content, link, image }) => {
164
166
  filter: "blur(0.05em) opacity(50%)",
165
167
  zIndex: 0
166
168
  } : void 0,
169
+ className,
167
170
  children: [
168
171
  /* @__PURE__ */ jsxRuntime.jsxs(react.CardBody, { as: "section", pb: 0, flex: 1, children: [
169
172
  /* @__PURE__ */ jsxRuntime.jsx(BonusCardTitle, { content: title }),
@@ -305,7 +308,7 @@ const Features = ({ features, ...boxProps }) => {
305
308
  }
306
309
  );
307
310
  };
308
- const GameCard = ({ name, image, link }) => {
311
+ const GameCard = ({ name, description, image, link, height = "auto" }) => {
309
312
  return /* @__PURE__ */ jsxRuntime.jsxs(
310
313
  react.LinkBox,
311
314
  {
@@ -315,11 +318,15 @@ const GameCard = ({ name, image, link }) => {
315
318
  transition: "transform 0.2s ease",
316
319
  cursor: link ? "pointer" : "default",
317
320
  overflow: "hidden",
318
- bg: "blackAlpha.400",
321
+ bg: "blackAlpha.200",
322
+ height,
319
323
  _hover: { transform: "scale(1.1)" },
320
324
  children: [
321
325
  typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(react.Image, { src: image, alt: name, w: "100%", aspectRatio: "16/9", objectFit: "cover", objectPosition: "center" }) : !!image && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { w: "100%", aspectRatio: "16/9", children: image }),
322
- /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", rounded: "md", p: 4, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", children: link ? /* @__PURE__ */ jsxRuntime.jsx(react.LinkOverlay, { href: link, children: name }) : name }) })
326
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "section", rounded: "md", p: 4, children: [
327
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", children: link ? /* @__PURE__ */ jsxRuntime.jsx(react.LinkOverlay, { href: link, children: name }) : name }),
328
+ !!description && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: "gray.600", children: description })
329
+ ] })
323
330
  ]
324
331
  }
325
332
  );
@@ -922,6 +929,10 @@ const ProsCons = ({ items, ...boxProps }) => {
922
929
  /* @__PURE__ */ jsxRuntime.jsx(ProsConsCard, { itemType: "cons", items: cons })
923
930
  ] });
924
931
  };
932
+ const RichTextRenderer = ({ content }) => {
933
+ const components = react$2.useMDXComponents();
934
+ return /* @__PURE__ */ jsxRuntime.jsx(Markdown, { components, children: content });
935
+ };
925
936
  const Seo = ({ children, siteMetadata, title, description, lang }) => {
926
937
  const { title: defaultTitle, description: defaultDescription, lang: defaultLang, siteUrl } = siteMetadata;
927
938
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -1004,6 +1015,7 @@ exports.LinkButton = LinkButton;
1004
1015
  exports.List = List;
1005
1016
  exports.ProsCons = ProsCons;
1006
1017
  exports.PulseButton = PulseButton;
1018
+ exports.RichTextRenderer = RichTextRenderer;
1007
1019
  exports.Seo = Seo;
1008
1020
  exports.Table = Table;
1009
1021
  exports.Tabs = Tabs;
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-BR5dWoW7.js");
3
+ const index = require("./index-qgcoV14g.js");
4
4
  const index$1 = require("./index-IpSV-c71.js");
5
5
  const i18n$1 = require("./index-BEqFPNAt.js");
6
6
  const index$2 = require("./index-m97PmVsd.js");
@@ -27,6 +27,7 @@ exports.LinkButton = index.LinkButton;
27
27
  exports.List = index.List;
28
28
  exports.ProsCons = index.ProsCons;
29
29
  exports.PulseButton = index.PulseButton;
30
+ exports.RichTextRenderer = index.RichTextRenderer;
30
31
  exports.Seo = index.Seo;
31
32
  exports.Table = index.Table;
32
33
  exports.Tabs = index.Tabs;
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-BWm-60DT.mjs";
1
+ import { A, B, g, C, h, E, F, a, b, G, c, d, i, H, L, j, e, P, k, R, S, T, f } from "./index-Ct1pg92K.mjs";
2
2
  import { u } from "./index-xuSxvz5z.mjs";
3
3
  import { a as a2, G as G2, r } from "./index-F6_fGeRI.mjs";
4
4
  import { M } from "./index-C-e_0aJJ.mjs";
@@ -30,6 +30,7 @@ export {
30
30
  M as MdxProvider,
31
31
  P as ProsCons,
32
32
  k as PulseButton,
33
+ R as RichTextRenderer,
33
34
  S as Seo,
34
35
  S2 as SiteProvider,
35
36
  T as Table,
@@ -1,3 +1,4 @@
1
1
  export interface IGame {
2
2
  name: string;
3
+ description?: string;
3
4
  }
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": "2.5.0",
4
+ "version": "2.6.0",
5
5
  "keywords": [
6
6
  "react",
7
7
  "ui",
@@ -100,6 +100,7 @@
100
100
  "i18next": "^24.0.0",
101
101
  "react": "^18.3.1",
102
102
  "react-dom": "^18.3.1",
103
- "react-i18next": "^15.0.0"
103
+ "react-i18next": "^15.0.0",
104
+ "react-markdown": "^10.1.0"
104
105
  }
105
106
  }