@anywayseo/tools 4.0.0 → 4.0.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.
- package/dist/components/bonus-card/index.d.ts +2 -6
- package/dist/components/bonus-card-grid/index.d.ts +2 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{index-DbwY2gVh.mjs → index-BZBc-e28.mjs} +13 -3
- package/dist/{index-Bw7vqsyw.js → index-CpjGjVVj.js} +6 -8
- package/dist/{index-DLy2LYCD.mjs → index-Db-ZIQ0A.mjs} +6 -8
- package/dist/{index-BmkMQFW1.js → index-DmOT7IZT.js} +13 -3
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/dist/types/components/bonus-card/index.d.ts +7 -0
- package/dist/utils/index.cjs +2 -2
- package/dist/utils/index.mjs +2 -2
- package/dist/utils/sorting/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { IBonusCard,
|
|
3
|
-
type BonusCardProps = IBonusCard & {
|
|
4
|
-
color?: Color;
|
|
5
|
-
textColor?: Color;
|
|
6
|
-
titleColor?: Color;
|
|
7
|
-
titleTextColor?: Color;
|
|
2
|
+
import { IBonusCard, IBonusCardCustomizationProps } from '../../types';
|
|
3
|
+
type BonusCardProps = IBonusCard & IBonusCardCustomizationProps & {
|
|
8
4
|
className?: string;
|
|
9
5
|
};
|
|
10
6
|
declare const BonusCard: FC<BonusCardProps>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { BoxPositionProps, GridColumns, GridGap, IBonusCard } from '../../types';
|
|
2
|
+
import { BoxPositionProps, GridColumns, GridGap, IBonusCard, IBonusCardCustomizationProps } from '../../types';
|
|
3
3
|
type BonusCardGridProps = {
|
|
4
4
|
items: IBonusCard[];
|
|
5
5
|
columns?: GridColumns;
|
|
6
6
|
gap?: GridGap;
|
|
7
|
+
cardCustomization?: IBonusCardCustomizationProps;
|
|
7
8
|
} & BoxPositionProps;
|
|
8
9
|
declare const BonusCardGrid: FC<BonusCardGridProps>;
|
|
9
10
|
export default BonusCardGrid;
|
|
@@ -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-DmOT7IZT.js");
|
|
4
4
|
exports.Author = index.Author;
|
|
5
5
|
exports.AuthorCard = index.AuthorCard;
|
|
6
6
|
exports.BonusCard = index.BonusCard;
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-BZBc-e28.mjs";
|
|
2
2
|
export {
|
|
3
3
|
k as Author,
|
|
4
4
|
A as AuthorCard,
|
|
@@ -1,7 +1,7 @@
|
|
|
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, e as
|
|
4
|
+
import { A as Animation, e as getSeededRandomComparator, d as randomComparator, b as formatNumber, c as getCurrencySymbol, f as formatDate, g as getCurrentYear, a as getCurrentMonth } from "./index-Db-ZIQ0A.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";
|
|
@@ -189,9 +189,19 @@ const BonusCardGrid = ({
|
|
|
189
189
|
items,
|
|
190
190
|
columns = { base: 1, md: 2, lg: 3 },
|
|
191
191
|
gap = 4,
|
|
192
|
+
cardCustomization,
|
|
192
193
|
...boxProps
|
|
193
194
|
}) => {
|
|
194
|
-
return /* @__PURE__ */ jsx(
|
|
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
|
+
);
|
|
195
205
|
};
|
|
196
206
|
const ContactForm = ({ ...boxProps }) => {
|
|
197
207
|
const toast = useToast();
|
|
@@ -337,7 +347,7 @@ const GameCardGrid = ({
|
|
|
337
347
|
}) => {
|
|
338
348
|
let sortedItems = items;
|
|
339
349
|
if (order === "random") {
|
|
340
|
-
sortedItems = [...items].sort(randomSeed ?
|
|
350
|
+
sortedItems = [...items].sort(randomSeed ? getSeededRandomComparator(randomSeed) : randomComparator);
|
|
341
351
|
}
|
|
342
352
|
return /* @__PURE__ */ jsx(
|
|
343
353
|
Grid,
|
|
@@ -94,15 +94,13 @@ function getCurrencySymbol(currencyCode) {
|
|
|
94
94
|
function randomComparator() {
|
|
95
95
|
return Math.random() - 0.5;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
const c = 1013904223;
|
|
100
|
-
const m = 2 ** 31;
|
|
101
|
-
return (a * seed + c) % m / m;
|
|
97
|
+
function seededRandom(seed) {
|
|
98
|
+
return Math.abs(Math.sin(seed));
|
|
102
99
|
}
|
|
103
|
-
function
|
|
100
|
+
function getSeededRandomComparator(seed) {
|
|
104
101
|
const safeSeed = Math.abs(seed) % Number.MAX_SAFE_INTEGER;
|
|
105
|
-
|
|
102
|
+
let index = 0;
|
|
103
|
+
return () => seededRandom(safeSeed + index++) - 0.5;
|
|
106
104
|
}
|
|
107
105
|
exports.Animation = Animation;
|
|
108
106
|
exports.formatDate = formatDate;
|
|
@@ -110,7 +108,7 @@ exports.formatNumber = formatNumber;
|
|
|
110
108
|
exports.getCurrencySymbol = getCurrencySymbol;
|
|
111
109
|
exports.getCurrentMonth = getCurrentMonth;
|
|
112
110
|
exports.getCurrentYear = getCurrentYear;
|
|
113
|
-
exports.
|
|
111
|
+
exports.getSeededRandomComparator = getSeededRandomComparator;
|
|
114
112
|
exports.parseNumber = parseNumber;
|
|
115
113
|
exports.randomComparator = randomComparator;
|
|
116
114
|
exports.round = round;
|
|
@@ -93,15 +93,13 @@ function getCurrencySymbol(currencyCode) {
|
|
|
93
93
|
function randomComparator() {
|
|
94
94
|
return Math.random() - 0.5;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
|
|
98
|
-
const c = 1013904223;
|
|
99
|
-
const m = 2 ** 31;
|
|
100
|
-
return (a * seed + c) % m / m;
|
|
96
|
+
function seededRandom(seed) {
|
|
97
|
+
return Math.abs(Math.sin(seed));
|
|
101
98
|
}
|
|
102
|
-
function
|
|
99
|
+
function getSeededRandomComparator(seed) {
|
|
103
100
|
const safeSeed = Math.abs(seed) % Number.MAX_SAFE_INTEGER;
|
|
104
|
-
|
|
101
|
+
let index = 0;
|
|
102
|
+
return () => seededRandom(safeSeed + index++) - 0.5;
|
|
105
103
|
}
|
|
106
104
|
export {
|
|
107
105
|
Animation as A,
|
|
@@ -109,7 +107,7 @@ export {
|
|
|
109
107
|
formatNumber as b,
|
|
110
108
|
getCurrencySymbol as c,
|
|
111
109
|
randomComparator as d,
|
|
112
|
-
|
|
110
|
+
getSeededRandomComparator as e,
|
|
113
111
|
formatDate as f,
|
|
114
112
|
getCurrentYear as g,
|
|
115
113
|
parseNumber as p,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const react$1 = require("@chakra-ui/react");
|
|
4
4
|
const reactI18next = require("react-i18next");
|
|
5
|
-
const index = require("./index-
|
|
5
|
+
const index = require("./index-CpjGjVVj.js");
|
|
6
6
|
const i18n = require("./index-Biz1dDqA.js");
|
|
7
7
|
require("@ctrl/tinycolor");
|
|
8
8
|
const react = require("react");
|
|
@@ -190,9 +190,19 @@ const BonusCardGrid = ({
|
|
|
190
190
|
items,
|
|
191
191
|
columns = { base: 1, md: 2, lg: 3 },
|
|
192
192
|
gap = 4,
|
|
193
|
+
cardCustomization,
|
|
193
194
|
...boxProps
|
|
194
195
|
}) => {
|
|
195
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
196
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
197
|
+
Grid,
|
|
198
|
+
{
|
|
199
|
+
items,
|
|
200
|
+
columns,
|
|
201
|
+
gap,
|
|
202
|
+
render: (item) => /* @__PURE__ */ jsxRuntime.jsx(BonusCard, { ...item, ...cardCustomization }),
|
|
203
|
+
...boxProps
|
|
204
|
+
}
|
|
205
|
+
);
|
|
196
206
|
};
|
|
197
207
|
const ContactForm = ({ ...boxProps }) => {
|
|
198
208
|
const toast = react$1.useToast();
|
|
@@ -338,7 +348,7 @@ const GameCardGrid = ({
|
|
|
338
348
|
}) => {
|
|
339
349
|
let sortedItems = items;
|
|
340
350
|
if (order === "random") {
|
|
341
|
-
sortedItems = [...items].sort(randomSeed ? index.
|
|
351
|
+
sortedItems = [...items].sort(randomSeed ? index.getSeededRandomComparator(randomSeed) : index.randomComparator);
|
|
342
352
|
}
|
|
343
353
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
344
354
|
Grid,
|
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-
|
|
3
|
+
const index = require("./index-DmOT7IZT.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-
|
|
8
|
+
const index$4 = require("./index-CpjGjVVj.js");
|
|
9
9
|
const index$5 = require("./index-NsIHOkeN.js");
|
|
10
10
|
const i18n = require("i18next");
|
|
11
11
|
exports.Author = index.Author;
|
|
@@ -47,7 +47,7 @@ exports.formatNumber = index$4.formatNumber;
|
|
|
47
47
|
exports.getCurrencySymbol = index$4.getCurrencySymbol;
|
|
48
48
|
exports.getCurrentMonth = index$4.getCurrentMonth;
|
|
49
49
|
exports.getCurrentYear = index$4.getCurrentYear;
|
|
50
|
-
exports.
|
|
50
|
+
exports.getSeededRandomComparator = index$4.getSeededRandomComparator;
|
|
51
51
|
exports.parseNumber = index$4.parseNumber;
|
|
52
52
|
exports.randomComparator = index$4.randomComparator;
|
|
53
53
|
exports.round = index$4.round;
|
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, o, S, h, T, i, j } from "./index-
|
|
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-BZBc-e28.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, e as e2, p, d as d2, r as r2, t } from "./index-
|
|
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-Db-ZIQ0A.mjs";
|
|
7
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 {
|
|
@@ -45,7 +45,7 @@ export {
|
|
|
45
45
|
c2 as getCurrencySymbol,
|
|
46
46
|
a3 as getCurrentMonth,
|
|
47
47
|
g2 as getCurrentYear,
|
|
48
|
-
e2 as
|
|
48
|
+
e2 as getSeededRandomComparator,
|
|
49
49
|
default2 as i18n,
|
|
50
50
|
p as parseNumber,
|
|
51
51
|
d2 as randomComparator,
|
|
@@ -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[];
|
package/dist/utils/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-CpjGjVVj.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,7 @@ exports.formatNumber = index.formatNumber;
|
|
|
8
8
|
exports.getCurrencySymbol = index.getCurrencySymbol;
|
|
9
9
|
exports.getCurrentMonth = index.getCurrentMonth;
|
|
10
10
|
exports.getCurrentYear = index.getCurrentYear;
|
|
11
|
-
exports.
|
|
11
|
+
exports.getSeededRandomComparator = index.getSeededRandomComparator;
|
|
12
12
|
exports.parseNumber = index.parseNumber;
|
|
13
13
|
exports.randomComparator = index.randomComparator;
|
|
14
14
|
exports.round = index.round;
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, f, b, c, a, g, e, p, d, r, t } from "../index-
|
|
1
|
+
import { A, f, b, c, a, g, e, p, d, r, t } from "../index-Db-ZIQ0A.mjs";
|
|
2
2
|
import { e as e2, g as g2, t as t2 } from "../index-DzEvPZny.mjs";
|
|
3
3
|
export {
|
|
4
4
|
A as Animation,
|
|
@@ -9,7 +9,7 @@ export {
|
|
|
9
9
|
c as getCurrencySymbol,
|
|
10
10
|
a as getCurrentMonth,
|
|
11
11
|
g as getCurrentYear,
|
|
12
|
-
e as
|
|
12
|
+
e as getSeededRandomComparator,
|
|
13
13
|
p as parseNumber,
|
|
14
14
|
d as randomComparator,
|
|
15
15
|
r as round,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function randomComparator(): number;
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getSeededRandomComparator(seed: number): () => number;
|