@anywayseo/tools 3.1.2 → 4.0.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.
Files changed (39) hide show
  1. package/dist/components/base/grid/index.d.ts +3 -4
  2. package/dist/components/base/grid/utils.d.ts +2 -2
  3. package/dist/components/bonus-card/content/index.d.ts +2 -1
  4. package/dist/components/bonus-card/index.d.ts +2 -2
  5. package/dist/components/bonus-card/title/index.d.ts +3 -1
  6. package/dist/components/bonus-card-grid/index.d.ts +10 -0
  7. package/dist/components/feature-card-grid/index.d.ts +9 -0
  8. package/dist/components/game-card/index.d.ts +2 -2
  9. package/dist/components/game-card-grid/index.d.ts +12 -0
  10. package/dist/components/index.cjs +5 -3
  11. package/dist/components/index.d.ts +4 -2
  12. package/dist/components/index.mjs +16 -14
  13. package/dist/components/strapi-component/external-image/index.d.ts +7 -0
  14. package/dist/components/strapi-component/index.d.ts +9 -0
  15. package/dist/components/strapi-component/rich-text/index.d.ts +6 -0
  16. package/dist/components/strapi-component/utils.d.ts +3 -0
  17. package/dist/components/strapi-content-renderer/index.d.ts +8 -0
  18. package/dist/components/strapi-content-renderer/utils.d.ts +2 -0
  19. package/dist/{index-eta4hdHD.js → index-BIs07X4D.js} +202 -39
  20. package/dist/{index-Cte2-g6s.js → index-Bw7vqsyw.js} +15 -0
  21. package/dist/{index-Cin-9-As.mjs → index-CNKZLV-n.mjs} +213 -50
  22. package/dist/{index-25M8hPOF.mjs → index-DLy2LYCD.mjs} +15 -0
  23. package/dist/index.cjs +8 -4
  24. package/dist/index.mjs +21 -17
  25. package/dist/types/components/bonus-card/index.d.ts +7 -0
  26. package/dist/types/components/common/index.d.ts +2 -1
  27. package/dist/types/components/external-image/index.d.ts +14 -0
  28. package/dist/types/components/game-card/index.d.ts +1 -0
  29. package/dist/types/components/grid/index.d.ts +3 -0
  30. package/dist/types/components/index.d.ts +3 -0
  31. package/dist/types/components/strapi-component/index.d.ts +5 -0
  32. package/dist/utils/index.cjs +3 -1
  33. package/dist/utils/index.d.ts +1 -0
  34. package/dist/utils/index.mjs +5 -3
  35. package/dist/utils/sorting/index.d.ts +2 -0
  36. package/package.json +2 -1
  37. package/dist/components/base/grid/types.d.ts +0 -3
  38. package/dist/components/features/index.d.ts +0 -7
  39. package/dist/components/rich-text-renderer/index.d.ts +0 -6
@@ -1,16 +1,16 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
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";
3
3
  import { useTranslation } from "react-i18next";
4
- import { A as Animation, b as formatNumber, c as getCurrencySymbol, f as formatDate, g as getCurrentYear, a as getCurrentMonth } from "./index-25M8hPOF.mjs";
4
+ import { A as Animation, e as getSeedRandomComparator, d as randomComparator, b as formatNumber, c as getCurrencySymbol, f as formatDate, g as getCurrentYear, a as getCurrentMonth } from "./index-DLy2LYCD.mjs";
5
5
  import { a as GameCharacteristic } from "./index-DoBCANwf.mjs";
6
6
  import "@ctrl/tinycolor";
7
7
  import { useRef, useState, useLayoutEffect, Fragment as Fragment$1, forwardRef, useEffect, useMemo } from "react";
8
8
  import { EmailIcon, StarIcon, CloseIcon, ExternalLinkIcon, ChevronRightIcon, ChevronDownIcon, HamburgerIcon, ChevronUpIcon, WarningIcon, CheckCircleIcon } from "@chakra-ui/icons";
9
- import { u as usePrimaryColors } from "./index-xuSxvz5z.mjs";
10
9
  import { useMDXComponents } from "@mdx-js/react";
11
10
  import { u as useSiteContext } from "./index-BNb-P8a6.mjs";
12
- import { t } from "i18next";
13
11
  import { Link as Link$1 } from "gatsby";
12
+ import { u as usePrimaryColors } from "./index-xuSxvz5z.mjs";
13
+ import { t } from "i18next";
14
14
  import Markdown from "react-markdown";
15
15
  const ONE_LINE_HEIGHT = 24;
16
16
  const Bio = ({ content, maxLines = 1 }) => {
@@ -117,14 +117,14 @@ const AuthorCard = ({ author, ...boxProps }) => {
117
117
  )
118
118
  ] });
119
119
  };
120
- const BonusCardContent = ({ content }) => {
120
+ const BonusCardContent = ({ content, buttonColor }) => {
121
121
  const { t: t2 } = useTranslation("author");
122
122
  return /* @__PURE__ */ jsx(Popover, { autoFocus: false, isLazy: true, lazyBehavior: "keepMounted", children: ({ isOpen }) => /* @__PURE__ */ jsxs(Fragment, { children: [
123
- /* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsx(Button, { size: "sm", variant: "link", color: "white", children: isOpen ? t2("action.collapse") : t2("action.expand") }) }),
123
+ /* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsx(Button, { size: "sm", variant: "link", color: buttonColor, children: isOpen ? t2("action.collapse") : t2("action.expand") }) }),
124
124
  /* @__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 }) }) }) })
125
125
  ] }) });
126
126
  };
127
- const BonusCardTitle = ({ content }) => {
127
+ const BonusCardTitle = ({ content, color, textColor }) => {
128
128
  return /* @__PURE__ */ jsx(
129
129
  Text,
130
130
  {
@@ -133,22 +133,33 @@ const BonusCardTitle = ({ content }) => {
133
133
  py: 1,
134
134
  px: 2,
135
135
  borderRadius: "md",
136
- bg: "yellow",
137
- color: "black",
136
+ bg: color,
137
+ fontSize: "md",
138
138
  fontWeight: "bold",
139
- fontSize: "lg",
139
+ color: textColor,
140
140
  children: content
141
141
  }
142
142
  );
143
143
  };
144
- const BonusCard = ({ title, subtitle, content, link, image, className }) => {
144
+ const BonusCard = ({
145
+ title,
146
+ subtitle,
147
+ content,
148
+ link,
149
+ image,
150
+ color = "linear-gradient(90deg, #3b1f47, #731d58)",
151
+ textColor = "whiteAlpha.900",
152
+ titleColor = "yellow",
153
+ titleTextColor = "black",
154
+ className
155
+ }) => {
145
156
  return /* @__PURE__ */ jsxs(
146
157
  Card,
147
158
  {
148
159
  as: "article",
149
160
  h: "full",
150
- color: "whiteAlpha.900",
151
- bg: "linear-gradient(90deg, #3b1f47, #731d58)",
161
+ color: textColor,
162
+ bg: color,
152
163
  _before: image ? {
153
164
  content: '""',
154
165
  position: "absolute",
@@ -165,15 +176,33 @@ const BonusCard = ({ title, subtitle, content, link, image, className }) => {
165
176
  className,
166
177
  children: [
167
178
  /* @__PURE__ */ jsxs(CardBody, { as: "section", pb: 0, flex: 1, children: [
168
- /* @__PURE__ */ jsx(BonusCardTitle, { content: title }),
179
+ /* @__PURE__ */ jsx(BonusCardTitle, { content: title, color: titleColor, textColor: titleTextColor }),
169
180
  /* @__PURE__ */ jsx(Text, { fontSize: "2xl", fontWeight: "bold", my: 2, children: subtitle }),
170
- /* @__PURE__ */ jsx(BonusCardContent, { content })
181
+ /* @__PURE__ */ jsx(BonusCardContent, { content, buttonColor: textColor })
171
182
  ] }),
172
183
  /* @__PURE__ */ jsx(CardFooter, { as: "footer", p: 4, children: /* @__PURE__ */ jsx(LinkButton, { ...link, width: "full" }) })
173
184
  ]
174
185
  }
175
186
  );
176
187
  };
188
+ const BonusCardGrid = ({
189
+ items,
190
+ columns = { base: 1, md: 2, lg: 3 },
191
+ gap = 4,
192
+ cardCustomization,
193
+ ...boxProps
194
+ }) => {
195
+ return /* @__PURE__ */ jsx(
196
+ Grid,
197
+ {
198
+ items,
199
+ columns,
200
+ gap,
201
+ render: (item) => /* @__PURE__ */ jsx(BonusCard, { ...item, ...cardCustomization }),
202
+ ...boxProps
203
+ }
204
+ );
205
+ };
177
206
  const ContactForm = ({ ...boxProps }) => {
178
207
  const toast = useToast();
179
208
  const { t: t2 } = useTranslation("contactForm");
@@ -266,13 +295,18 @@ const FeatureCard = ({ title, description }) => {
266
295
  /* @__PURE__ */ jsx(CardBody, { as: "section", pt: 0, children: /* @__PURE__ */ jsx(Text, { color: "gray.500", children: description }) })
267
296
  ] });
268
297
  };
269
- const Features = ({ features, ...boxProps }) => {
298
+ const FeatureCardGrid = ({
299
+ items,
300
+ columns = { base: 1, md: 2, lg: 3 },
301
+ gap = 4,
302
+ ...boxProps
303
+ }) => {
270
304
  return /* @__PURE__ */ jsx(
271
305
  Grid,
272
306
  {
273
- items: features,
274
- columns: { base: 1, md: 2, lg: 3 },
275
- gap: 10,
307
+ items,
308
+ columns,
309
+ gap,
276
310
  getKey: ({ title }) => title,
277
311
  render: (item) => /* @__PURE__ */ jsx(FeatureCard, { ...item }),
278
312
  ...boxProps
@@ -302,6 +336,30 @@ const GameCard = ({ name, description, image, link, height = "auto" }) => {
302
336
  }
303
337
  );
304
338
  };
339
+ const GameCardGrid = ({
340
+ items,
341
+ columns = { base: 1, md: 2, lg: 3 },
342
+ gap = 4,
343
+ cardHeight = "full",
344
+ order = "default",
345
+ randomSeed,
346
+ ...boxProps
347
+ }) => {
348
+ let sortedItems = items;
349
+ if (order === "random") {
350
+ sortedItems = [...items].sort(randomSeed ? getSeedRandomComparator(randomSeed) : randomComparator);
351
+ }
352
+ return /* @__PURE__ */ jsx(
353
+ Grid,
354
+ {
355
+ items: sortedItems,
356
+ columns,
357
+ gap,
358
+ render: (item) => /* @__PURE__ */ jsx(GameCard, { ...item, height: cardHeight }),
359
+ ...boxProps
360
+ }
361
+ );
362
+ };
305
363
  const GameDemoContent = ({ src, isFullscreen, isLoaded, onLoad, onToggleFullscreen }) => {
306
364
  const { t: t2 } = useTranslation("gameDemo");
307
365
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -912,10 +970,6 @@ const ProsCons = ({ items, ...boxProps }) => {
912
970
  /* @__PURE__ */ jsx(ProsConsCard, { itemType: "cons", items: cons })
913
971
  ] });
914
972
  };
915
- const RichTextRenderer = ({ content }) => {
916
- const components = useMDXComponents();
917
- return /* @__PURE__ */ jsx(Markdown, { components, children: content });
918
- };
919
973
  function replacePlaceholders(text, placeholders) {
920
974
  Object.entries(placeholders).forEach(([placeholder, replacement]) => {
921
975
  const regex = new RegExp(`{{${placeholder}}}`, "g");
@@ -972,21 +1026,6 @@ const Table = ({
972
1026
  }
973
1027
  );
974
1028
  };
975
- const Tabs = ({ items, render, ...boxProps }) => {
976
- const { tabs, panels } = useMemo(() => {
977
- const tabs2 = [];
978
- const panels2 = [];
979
- items.forEach(({ content, ...tab }) => {
980
- tabs2.push(tab);
981
- panels2.push(content);
982
- });
983
- return { tabs: tabs2, panels: panels2 };
984
- }, []);
985
- return /* @__PURE__ */ jsxs(Tabs$1, { overflow: "hidden", colorScheme: "brand", ...boxProps, children: [
986
- /* @__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)) }),
987
- /* @__PURE__ */ jsx(TabPanels, { children: panels.map((panel, index) => /* @__PURE__ */ jsx(TabPanel, { children: render ? render(panel) : panel }, index)) })
988
- ] });
989
- };
990
1029
  const Tip = ({ tip, author = null, ...boxProps }) => {
991
1030
  return /* @__PURE__ */ jsxs(
992
1031
  Card,
@@ -1012,6 +1051,128 @@ const Tip = ({ tip, author = null, ...boxProps }) => {
1012
1051
  }
1013
1052
  );
1014
1053
  };
1054
+ const ExternalImage = ({ image, component: ImageComponent, alt = "", ...imageProps }) => {
1055
+ var _a, _b;
1056
+ const imageData = (_b = (_a = image == null ? void 0 : image.localFile) == null ? void 0 : _a.childImageSharp) == null ? void 0 : _b.gatsbyImageData;
1057
+ return imageData ? /* @__PURE__ */ jsx(ImageComponent, { image: imageData, alt, ...imageProps }) : /* @__PURE__ */ jsx(Fragment, {});
1058
+ };
1059
+ const RichText = ({ content }) => {
1060
+ const components = useMDXComponents();
1061
+ return /* @__PURE__ */ jsx(Markdown, { components, children: content });
1062
+ };
1063
+ function extractItemsFromJson(content) {
1064
+ return content.strapi_json_value;
1065
+ }
1066
+ const StrapiComponent = ({ type, props, imageComponent }) => {
1067
+ switch (type) {
1068
+ case "STRAPI__COMPONENT_CONTENT_FAQ":
1069
+ return /* @__PURE__ */ jsx(Faq, { items: props.items, mb: 4 });
1070
+ case "STRAPI__COMPONENT_CONTENT_FEATURES":
1071
+ return /* @__PURE__ */ jsx(FeatureCardGrid, { items: props.items, mb: 4 });
1072
+ case "STRAPI__COMPONENT_CONTENT_GAME_DEMO":
1073
+ return /* @__PURE__ */ jsx(
1074
+ GameDemo,
1075
+ {
1076
+ name: props.name,
1077
+ src: props.src,
1078
+ previewImage: /* @__PURE__ */ jsx(ExternalImage, { image: props.previewImage, alt: props.name, component: imageComponent }),
1079
+ mb: 4
1080
+ }
1081
+ );
1082
+ case "STRAPI__COMPONENT_CONTENT_GAME_INFO":
1083
+ return /* @__PURE__ */ jsx(GameInfo, { info: { ...props } });
1084
+ case "STRAPI__COMPONENT_CONTENT_HOW_TO":
1085
+ return /* @__PURE__ */ jsx(
1086
+ HowTo,
1087
+ {
1088
+ steps: props.steps.map((step) => {
1089
+ return {
1090
+ ...step,
1091
+ thumbnail: /* @__PURE__ */ jsx(ExternalImage, { image: step.thumbnail, alt: step.title, component: imageComponent })
1092
+ };
1093
+ }),
1094
+ mb: 4
1095
+ }
1096
+ );
1097
+ case "STRAPI__COMPONENT_CONTENT_LIST":
1098
+ return /* @__PURE__ */ jsx(List, { bullet: props.bullet, items: extractItemsFromJson(props.content) });
1099
+ case "STRAPI__COMPONENT_CONTENT_MEDIA":
1100
+ return /* @__PURE__ */ jsx(
1101
+ ExternalImage,
1102
+ {
1103
+ component: imageComponent,
1104
+ image: props.file,
1105
+ alt: props.alternativeText,
1106
+ style: { display: "inline-block", marginBottom: 16 }
1107
+ }
1108
+ );
1109
+ case "STRAPI__COMPONENT_CONTENT_PROS_CONS":
1110
+ return /* @__PURE__ */ jsx(ProsCons, { items: { ...props }, mb: 4 });
1111
+ case "STRAPI__COMPONENT_CONTENT_RICH_TEXT":
1112
+ return /* @__PURE__ */ jsx(RichText, { content: props.content.data.content });
1113
+ case "STRAPI__COMPONENT_CONTENT_TABLE":
1114
+ return /* @__PURE__ */ jsx(
1115
+ Table,
1116
+ {
1117
+ columnNumber: props.columnNumber,
1118
+ items: extractItemsFromJson(props.content),
1119
+ caption: props.caption,
1120
+ bordered: props.bordered,
1121
+ scrollable: props.scrollable,
1122
+ striped: props.striped,
1123
+ mb: 4
1124
+ }
1125
+ );
1126
+ case "STRAPI__COMPONENT_CONTENT_TIP":
1127
+ return /* @__PURE__ */ jsx(
1128
+ Tip,
1129
+ {
1130
+ tip: props.tip,
1131
+ author: props.author ? {
1132
+ ...props.author,
1133
+ avatar: /* @__PURE__ */ jsx(
1134
+ ExternalImage,
1135
+ {
1136
+ component: imageComponent,
1137
+ image: props.author.avatar,
1138
+ alt: props.author.name,
1139
+ style: { borderRadius: "50%" }
1140
+ }
1141
+ )
1142
+ } : null,
1143
+ mb: 4
1144
+ }
1145
+ );
1146
+ default:
1147
+ return null;
1148
+ }
1149
+ };
1150
+ function isStrapiContent(array) {
1151
+ return Array.isArray(array) && array.every(
1152
+ (item) => typeof item === "object" && item !== null && "__typename" in item && typeof item.__typename === "string"
1153
+ );
1154
+ }
1155
+ const StrapiContentRenderer = ({ content, imageComponent }) => {
1156
+ if (!isStrapiContent(content)) {
1157
+ return null;
1158
+ }
1159
+ return content.map(({ __typename: type, ...props }, index) => /* @__PURE__ */ jsx(StrapiComponent, { type, props, imageComponent }, index));
1160
+ };
1161
+ const Tabs = ({ items, render, ...boxProps }) => {
1162
+ const { tabs, panels } = useMemo(() => {
1163
+ const tabs2 = [];
1164
+ const panels2 = [];
1165
+ items.forEach(({ content, ...tab }) => {
1166
+ tabs2.push(tab);
1167
+ panels2.push(content);
1168
+ });
1169
+ return { tabs: tabs2, panels: panels2 };
1170
+ }, []);
1171
+ return /* @__PURE__ */ jsxs(Tabs$1, { overflow: "hidden", colorScheme: "brand", ...boxProps, children: [
1172
+ /* @__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)) }),
1173
+ /* @__PURE__ */ jsx(TabPanels, { children: panels.map((panel, index) => /* @__PURE__ */ jsx(TabPanel, { children: render ? render(panel) : panel }, index)) })
1174
+ ] });
1175
+ };
1015
1176
  export {
1016
1177
  AuthorCard as A,
1017
1178
  BonusCard as B,
@@ -1022,19 +1183,21 @@ export {
1022
1183
  Layout as L,
1023
1184
  NotFound as N,
1024
1185
  ProsCons as P,
1025
- RichTextRenderer as R,
1026
1186
  Seo as S,
1027
1187
  Table as T,
1028
- FeatureCard as a,
1029
- Features as b,
1030
- GameDemo as c,
1031
- GameInfo as d,
1032
- List as e,
1033
- Tabs as f,
1034
- Tip as g,
1035
- Author as h,
1036
- Center as i,
1037
- Grid as j,
1038
- LinkButton as k,
1039
- PulseButton as l
1188
+ BonusCardGrid as a,
1189
+ FeatureCard as b,
1190
+ FeatureCardGrid as c,
1191
+ GameCardGrid as d,
1192
+ GameDemo as e,
1193
+ GameInfo as f,
1194
+ List as g,
1195
+ StrapiContentRenderer as h,
1196
+ Tabs as i,
1197
+ Tip as j,
1198
+ Author as k,
1199
+ Center as l,
1200
+ Grid as m,
1201
+ LinkButton as n,
1202
+ PulseButton as o
1040
1203
  };
@@ -90,11 +90,26 @@ function getCurrencySymbol(currencyCode) {
90
90
  }).replace(/\d/g, "").trim();
91
91
  return symbol;
92
92
  }
93
+ function randomComparator() {
94
+ return Math.random() - 0.5;
95
+ }
96
+ function lcg(seed) {
97
+ const a = 1664525;
98
+ const c = 1013904223;
99
+ const m = 2 ** 31;
100
+ return (a * seed + c) % m / m;
101
+ }
102
+ function getSeedRandomComparator(seed) {
103
+ const safeSeed = Math.abs(seed) % Number.MAX_SAFE_INTEGER;
104
+ return () => lcg(safeSeed) - 0.5;
105
+ }
93
106
  export {
94
107
  Animation as A,
95
108
  getCurrentMonth as a,
96
109
  formatNumber as b,
97
110
  getCurrencySymbol as c,
111
+ randomComparator as d,
112
+ getSeedRandomComparator as e,
98
113
  formatDate as f,
99
114
  getCurrentYear as g,
100
115
  parseNumber as p,
package/dist/index.cjs CHANGED
@@ -1,22 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-eta4hdHD.js");
3
+ const index = require("./index-BIs07X4D.js");
4
4
  const index$1 = require("./index-IpSV-c71.js");
5
5
  const i18n$1 = require("./index-Biz1dDqA.js");
6
6
  const index$2 = require("./index-d3V0A4lN.js");
7
7
  const index$3 = require("./index-BhsXlbd8.js");
8
- const index$4 = require("./index-Cte2-g6s.js");
8
+ const index$4 = require("./index-Bw7vqsyw.js");
9
9
  const index$5 = require("./index-NsIHOkeN.js");
10
10
  const i18n = require("i18next");
11
11
  exports.Author = index.Author;
12
12
  exports.AuthorCard = index.AuthorCard;
13
13
  exports.BonusCard = index.BonusCard;
14
+ exports.BonusCardGrid = index.BonusCardGrid;
14
15
  exports.Center = index.Center;
15
16
  exports.ContactForm = index.ContactForm;
16
17
  exports.Faq = index.Faq;
17
18
  exports.FeatureCard = index.FeatureCard;
18
- exports.Features = index.Features;
19
+ exports.FeatureCardGrid = index.FeatureCardGrid;
19
20
  exports.GameCard = index.GameCard;
21
+ exports.GameCardGrid = index.GameCardGrid;
20
22
  exports.GameDemo = index.GameDemo;
21
23
  exports.GameInfo = index.GameInfo;
22
24
  exports.Grid = index.Grid;
@@ -27,8 +29,8 @@ exports.List = index.List;
27
29
  exports.NotFound = index.NotFound;
28
30
  exports.ProsCons = index.ProsCons;
29
31
  exports.PulseButton = index.PulseButton;
30
- exports.RichTextRenderer = index.RichTextRenderer;
31
32
  exports.Seo = index.Seo;
33
+ exports.StrapiContentRenderer = index.StrapiContentRenderer;
32
34
  exports.Table = index.Table;
33
35
  exports.Tabs = index.Tabs;
34
36
  exports.Tip = index.Tip;
@@ -45,7 +47,9 @@ exports.formatNumber = index$4.formatNumber;
45
47
  exports.getCurrencySymbol = index$4.getCurrencySymbol;
46
48
  exports.getCurrentMonth = index$4.getCurrentMonth;
47
49
  exports.getCurrentYear = index$4.getCurrentYear;
50
+ exports.getSeedRandomComparator = index$4.getSeedRandomComparator;
48
51
  exports.parseNumber = index$4.parseNumber;
52
+ exports.randomComparator = index$4.randomComparator;
49
53
  exports.round = index$4.round;
50
54
  exports.toFixedTwo = index$4.toFixedTwo;
51
55
  exports.extractTheme = index$5.extractTheme;
package/dist/index.mjs CHANGED
@@ -1,50 +1,54 @@
1
- import { h, A, B, i, C, F, a, b, G, c, d, j, H, L, k, e, N, P, l, R, S, T, f, g } from "./index-Cin-9-As.mjs";
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-CNKZLV-n.mjs";
2
2
  import { u } from "./index-xuSxvz5z.mjs";
3
3
  import { a as a2, G as G2, r } from "./index-DoBCANwf.mjs";
4
4
  import { M } from "./index-Bx3B21Dh.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, p, r as r2, t } from "./index-25M8hPOF.mjs";
7
- import { e as e2, g as g3, t as t2 } from "./index-DzEvPZny.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-DLy2LYCD.mjs";
7
+ import { e as e3, g as g3, t as t2 } from "./index-DzEvPZny.mjs";
8
8
  import { default as default2 } from "i18next";
9
9
  export {
10
10
  A2 as Animation,
11
- h as Author,
11
+ k as Author,
12
12
  A as AuthorCard,
13
13
  B as BonusCard,
14
- i as Center,
14
+ a as BonusCardGrid,
15
+ l as Center,
15
16
  C as ContactForm,
16
17
  F as Faq,
17
- a as FeatureCard,
18
- b as Features,
18
+ b as FeatureCard,
19
+ c as FeatureCardGrid,
19
20
  G as GameCard,
21
+ d as GameCardGrid,
20
22
  a2 as GameCharacteristic,
21
- c as GameDemo,
22
- d as GameInfo,
23
+ e as GameDemo,
24
+ f as GameInfo,
23
25
  G2 as GameVolatility,
24
- j as Grid,
26
+ m as Grid,
25
27
  H as HowTo,
26
28
  L as Layout,
27
- k as LinkButton,
28
- e as List,
29
+ n as LinkButton,
30
+ g as List,
29
31
  M as MdxProvider,
30
32
  N as NotFound,
31
33
  P as ProsCons,
32
- l as PulseButton,
33
- R as RichTextRenderer,
34
+ o as PulseButton,
34
35
  S as Seo,
35
36
  S2 as SiteProvider,
37
+ h as StrapiContentRenderer,
36
38
  T as Table,
37
- f as Tabs,
38
- g as Tip,
39
- e2 as extractTheme,
39
+ i as Tabs,
40
+ j as Tip,
41
+ e3 as extractTheme,
40
42
  f2 as formatDate,
41
43
  b2 as formatNumber,
42
44
  g3 as generateColorPalette,
43
45
  c2 as getCurrencySymbol,
44
46
  a3 as getCurrentMonth,
45
47
  g2 as getCurrentYear,
48
+ e2 as getSeedRandomComparator,
46
49
  default2 as i18n,
47
50
  p as parseNumber,
51
+ d2 as randomComparator,
48
52
  r as resources,
49
53
  r2 as round,
50
54
  t as toFixedTwo,
@@ -1,6 +1,13 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { IBonus, ILink } from '../../content';
3
+ import { Color } from '../common';
3
4
  type TextContent = string | ReactElement;
5
+ export interface IBonusCardCustomizationProps {
6
+ color?: Color;
7
+ textColor?: Color;
8
+ titleColor?: Color;
9
+ titleTextColor?: Color;
10
+ }
4
11
  export interface IBonusCard extends IBonus {
5
12
  link: ILink;
6
13
  content?: TextContent | TextContent[];
@@ -1,8 +1,9 @@
1
1
  import { Key, ReactElement } from 'react';
2
- import { BoxProps } from '@chakra-ui/react';
2
+ import { BoxProps, ColorProps } from '@chakra-ui/react';
3
3
  export type KeyGetter<T> = (item: T) => Key;
4
4
  export type RenderFunction<T> = (item: T) => ReactElement;
5
5
  type BoxPaddingProps = Pick<BoxProps, 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'ps' | 'pe'>;
6
6
  type BoxMarginProps = Pick<BoxProps, 'm' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'ms' | 'me'>;
7
7
  export type BoxPositionProps = BoxMarginProps & BoxPaddingProps;
8
+ export type Color = ColorProps['color'];
8
9
  export {};
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { GatsbyImageProps, IGatsbyImageData } from 'gatsby-plugin-image';
3
+ export { type IGatsbyImageData };
4
+ export interface IGatsbyImageFile {
5
+ localFile?: {
6
+ childImageSharp?: {
7
+ gatsbyImageData?: unknown;
8
+ };
9
+ };
10
+ }
11
+ export type ExternalImageComponentProps<T> = Omit<GatsbyImageProps, 'image'> & {
12
+ image: T;
13
+ };
14
+ export type ExternalImageComponent = FC<ExternalImageComponentProps<IGatsbyImageData>>;
@@ -4,3 +4,4 @@ export interface IGameCard extends IGame {
4
4
  link?: ILink['url'];
5
5
  image?: string | ReactElement;
6
6
  }
7
+ export type GameCardHeight = 'full' | 'auto';
@@ -0,0 +1,3 @@
1
+ import { ResponsiveObject } from '@chakra-ui/react';
2
+ export type GridColumns = ResponsiveObject<number>;
3
+ export type GridGap = ResponsiveObject<number> | number;
@@ -1,10 +1,13 @@
1
1
  export * from './bonus-card';
2
2
  export * from './common';
3
+ export * from './external-image';
3
4
  export * from './faq';
4
5
  export * from './game-card';
5
6
  export * from './game-info';
7
+ export * from './grid';
6
8
  export * from './how-to';
7
9
  export * from './image';
8
10
  export * from './navigation';
9
11
  export * from './pros-cons';
12
+ export * from './strapi-component';
10
13
  export * from './tabs';
@@ -0,0 +1,5 @@
1
+ export type StrapiComponentType = 'STRAPI__COMPONENT_CONTENT_FAQ' | 'STRAPI__COMPONENT_CONTENT_FEATURES' | 'STRAPI__COMPONENT_CONTENT_GAME_DEMO' | 'STRAPI__COMPONENT_CONTENT_GAME_INFO' | 'STRAPI__COMPONENT_CONTENT_HOW_TO' | 'STRAPI__COMPONENT_CONTENT_LIST' | 'STRAPI__COMPONENT_CONTENT_MEDIA' | 'STRAPI__COMPONENT_CONTENT_PROS_CONS' | 'STRAPI__COMPONENT_CONTENT_RICH_TEXT' | 'STRAPI__COMPONENT_CONTENT_TABLE' | 'STRAPI__COMPONENT_CONTENT_TIP';
2
+ export interface IStrapiComponentFragment {
3
+ __typename: StrapiComponentType;
4
+ [prop: string]: unknown;
5
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-Cte2-g6s.js");
3
+ const index = require("../index-Bw7vqsyw.js");
4
4
  const index$1 = require("../index-NsIHOkeN.js");
5
5
  exports.Animation = index.Animation;
6
6
  exports.formatDate = index.formatDate;
@@ -8,7 +8,9 @@ exports.formatNumber = index.formatNumber;
8
8
  exports.getCurrencySymbol = index.getCurrencySymbol;
9
9
  exports.getCurrentMonth = index.getCurrentMonth;
10
10
  exports.getCurrentYear = index.getCurrentYear;
11
+ exports.getSeedRandomComparator = index.getSeedRandomComparator;
11
12
  exports.parseNumber = index.parseNumber;
13
+ exports.randomComparator = index.randomComparator;
12
14
  exports.round = index.round;
13
15
  exports.toFixedTwo = index.toFixedTwo;
14
16
  exports.extractTheme = index$1.extractTheme;
@@ -2,4 +2,5 @@ export * from './animation';
2
2
  export * from './date';
3
3
  export * from './navigation';
4
4
  export * from './numbers';
5
+ export * from './sorting';
5
6
  export * from './theme';
@@ -1,15 +1,17 @@
1
- import { A, f, b, c, a, g, p, r, t } from "../index-25M8hPOF.mjs";
2
- import { e, g as g2, t as t2 } from "../index-DzEvPZny.mjs";
1
+ import { A, f, b, c, a, g, e, p, d, r, t } from "../index-DLy2LYCD.mjs";
2
+ import { e as e2, g as g2, t as t2 } from "../index-DzEvPZny.mjs";
3
3
  export {
4
4
  A as Animation,
5
- e as extractTheme,
5
+ e2 as extractTheme,
6
6
  f as formatDate,
7
7
  b as formatNumber,
8
8
  g2 as generateColorPalette,
9
9
  c as getCurrencySymbol,
10
10
  a as getCurrentMonth,
11
11
  g as getCurrentYear,
12
+ e as getSeedRandomComparator,
12
13
  p as parseNumber,
14
+ d as randomComparator,
13
15
  r as round,
14
16
  t as toFixedTwo,
15
17
  t2 as transformSiteNavigation
@@ -0,0 +1,2 @@
1
+ export declare function randomComparator(): number;
2
+ export declare function getSeedRandomComparator(seed: number): () => number;
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": "3.1.2",
4
+ "version": "4.0.1",
5
5
  "keywords": [
6
6
  "react",
7
7
  "ui",
@@ -97,6 +97,7 @@
97
97
  "@mdx-js/react": "^2.0.0",
98
98
  "framer-motion": "^12.0.6",
99
99
  "gatsby": "^5.0.0",
100
+ "gatsby-plugin-image": "^3.14.0",
100
101
  "i18next": "^24.0.0",
101
102
  "react": "^18.3.1",
102
103
  "react-dom": "^18.3.1",
@@ -1,3 +0,0 @@
1
- import { ResponsiveObject } from '@chakra-ui/react';
2
- export type ColumnsConfig = ResponsiveObject<number>;
3
- export type SpacingConfig = ResponsiveObject<number> | number;
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
- import { BoxPositionProps, IFeature } from '../../types';
3
- type FeaturesProps = {
4
- features: IFeature[];
5
- } & BoxPositionProps;
6
- declare const Features: FC<FeaturesProps>;
7
- export default Features;