@anywayseo/tools 4.0.1 → 4.1.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.
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{index-CNKZLV-n.mjs → index-BKg1_9Hw.mjs} +3 -3
- package/dist/{index-BIs07X4D.js → index-BxPYJ5OB.js} +3 -3
- package/dist/index-CcsbqDXL.mjs +49 -0
- package/dist/{index-Bw7vqsyw.js → index-CpjGjVVj.js} +6 -8
- package/dist/index-DF_u_tzx.js +48 -0
- package/dist/{index-DLy2LYCD.mjs → index-Db-ZIQ0A.mjs} +6 -8
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/providers/index.cjs +1 -1
- package/dist/providers/index.mjs +1 -1
- package/dist/providers/mdx-provider/types.d.ts +3 -0
- package/dist/providers/mdx-provider/utils.d.ts +3 -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
- package/dist/index-Bx3B21Dh.mjs +0 -36
- package/dist/index-d3V0A4lN.js +0 -35
|
@@ -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-BxPYJ5OB.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-BKg1_9Hw.mjs";
|
|
2
2
|
export {
|
|
3
3
|
k as Author,
|
|
4
4
|
A as AuthorCard,
|
|
@@ -1,14 +1,14 @@
|
|
|
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";
|
|
8
8
|
import { EmailIcon, StarIcon, CloseIcon, ExternalLinkIcon, ChevronRightIcon, ChevronDownIcon, HamburgerIcon, ChevronUpIcon, WarningIcon, CheckCircleIcon } from "@chakra-ui/icons";
|
|
9
9
|
import { useMDXComponents } from "@mdx-js/react";
|
|
10
|
-
import { u as useSiteContext } from "./index-BNb-P8a6.mjs";
|
|
11
10
|
import { Link as Link$1 } from "gatsby";
|
|
11
|
+
import { u as useSiteContext } from "./index-BNb-P8a6.mjs";
|
|
12
12
|
import { u as usePrimaryColors } from "./index-xuSxvz5z.mjs";
|
|
13
13
|
import { t } from "i18next";
|
|
14
14
|
import Markdown from "react-markdown";
|
|
@@ -347,7 +347,7 @@ const GameCardGrid = ({
|
|
|
347
347
|
}) => {
|
|
348
348
|
let sortedItems = items;
|
|
349
349
|
if (order === "random") {
|
|
350
|
-
sortedItems = [...items].sort(randomSeed ?
|
|
350
|
+
sortedItems = [...items].sort(randomSeed ? getSeededRandomComparator(randomSeed) : randomComparator);
|
|
351
351
|
}
|
|
352
352
|
return /* @__PURE__ */ jsx(
|
|
353
353
|
Grid,
|
|
@@ -2,14 +2,14 @@
|
|
|
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");
|
|
9
9
|
const icons = require("@chakra-ui/icons");
|
|
10
10
|
const react$2 = require("@mdx-js/react");
|
|
11
|
-
const index$2 = require("./index-BhsXlbd8.js");
|
|
12
11
|
const gatsby = require("gatsby");
|
|
12
|
+
const index$2 = require("./index-BhsXlbd8.js");
|
|
13
13
|
const index$1 = require("./index-IpSV-c71.js");
|
|
14
14
|
const i18n$1 = require("i18next");
|
|
15
15
|
const Markdown = require("react-markdown");
|
|
@@ -348,7 +348,7 @@ const GameCardGrid = ({
|
|
|
348
348
|
}) => {
|
|
349
349
|
let sortedItems = items;
|
|
350
350
|
if (order === "random") {
|
|
351
|
-
sortedItems = [...items].sort(randomSeed ? index.
|
|
351
|
+
sortedItems = [...items].sort(randomSeed ? index.getSeededRandomComparator(randomSeed) : index.randomComparator);
|
|
352
352
|
}
|
|
353
353
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
354
354
|
Grid,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text, UnorderedList, OrderedList, Heading, Link } from "@chakra-ui/react";
|
|
3
|
+
import { MDXProvider } from "@mdx-js/react";
|
|
4
|
+
import { Link as Link$1 } from "gatsby";
|
|
5
|
+
function omitProps(props, omittedKeys) {
|
|
6
|
+
const result = { ...props };
|
|
7
|
+
omittedKeys.forEach((key) => {
|
|
8
|
+
if (key in result) {
|
|
9
|
+
delete result[key];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
return result;
|
|
13
|
+
}
|
|
14
|
+
function preprocessProps(callback) {
|
|
15
|
+
const omittedKeys = ["node"];
|
|
16
|
+
return (props) => callback(omitProps(props, omittedKeys));
|
|
17
|
+
}
|
|
18
|
+
function renderLink({
|
|
19
|
+
href,
|
|
20
|
+
...props
|
|
21
|
+
}) {
|
|
22
|
+
const isInternalLink = href == null ? void 0 : href.startsWith("/");
|
|
23
|
+
return isInternalLink ? /* @__PURE__ */ jsx(Link, { as: Link$1, to: href, color: "brand.400", ...props }) : /* @__PURE__ */ jsx(
|
|
24
|
+
Link,
|
|
25
|
+
{
|
|
26
|
+
href,
|
|
27
|
+
target: "_blank",
|
|
28
|
+
rel: "noopener noreferrer",
|
|
29
|
+
referrerPolicy: "no-referrer",
|
|
30
|
+
color: "brand.400",
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
const components = {
|
|
36
|
+
h1: preprocessProps((props) => /* @__PURE__ */ jsx(Heading, { as: "h1", size: "xl", mb: 4, ...props })),
|
|
37
|
+
h2: preprocessProps((props) => /* @__PURE__ */ jsx(Heading, { as: "h2", size: "lg", mt: 6, mb: 4, ...props })),
|
|
38
|
+
h3: preprocessProps((props) => /* @__PURE__ */ jsx(Heading, { as: "h3", size: "md", mt: 4, mb: 4, ...props })),
|
|
39
|
+
ol: preprocessProps((props) => /* @__PURE__ */ jsx(OrderedList, { mb: 4, ...props })),
|
|
40
|
+
ul: preprocessProps((props) => /* @__PURE__ */ jsx(UnorderedList, { mb: 4, ...props })),
|
|
41
|
+
p: preprocessProps((props) => /* @__PURE__ */ jsx(Text, { mb: 4, ...props })),
|
|
42
|
+
a: preprocessProps((props) => renderLink(props))
|
|
43
|
+
};
|
|
44
|
+
const MdxProvider = ({ children }) => {
|
|
45
|
+
return /* @__PURE__ */ jsx(MDXProvider, { components, children });
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
MdxProvider as M
|
|
49
|
+
};
|
|
@@ -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;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const react$1 = require("@chakra-ui/react");
|
|
4
|
+
const react = require("@mdx-js/react");
|
|
5
|
+
const gatsby = require("gatsby");
|
|
6
|
+
function omitProps(props, omittedKeys) {
|
|
7
|
+
const result = { ...props };
|
|
8
|
+
omittedKeys.forEach((key) => {
|
|
9
|
+
if (key in result) {
|
|
10
|
+
delete result[key];
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
function preprocessProps(callback) {
|
|
16
|
+
const omittedKeys = ["node"];
|
|
17
|
+
return (props) => callback(omitProps(props, omittedKeys));
|
|
18
|
+
}
|
|
19
|
+
function renderLink({
|
|
20
|
+
href,
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
const isInternalLink = href == null ? void 0 : href.startsWith("/");
|
|
24
|
+
return isInternalLink ? /* @__PURE__ */ jsxRuntime.jsx(react$1.Link, { as: gatsby.Link, to: href, color: "brand.400", ...props }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
25
|
+
react$1.Link,
|
|
26
|
+
{
|
|
27
|
+
href,
|
|
28
|
+
target: "_blank",
|
|
29
|
+
rel: "noopener noreferrer",
|
|
30
|
+
referrerPolicy: "no-referrer",
|
|
31
|
+
color: "brand.400",
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
const components = {
|
|
37
|
+
h1: preprocessProps((props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Heading, { as: "h1", size: "xl", mb: 4, ...props })),
|
|
38
|
+
h2: preprocessProps((props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Heading, { as: "h2", size: "lg", mt: 6, mb: 4, ...props })),
|
|
39
|
+
h3: preprocessProps((props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Heading, { as: "h3", size: "md", mt: 4, mb: 4, ...props })),
|
|
40
|
+
ol: preprocessProps((props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.OrderedList, { mb: 4, ...props })),
|
|
41
|
+
ul: preprocessProps((props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.UnorderedList, { mb: 4, ...props })),
|
|
42
|
+
p: preprocessProps((props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { mb: 4, ...props })),
|
|
43
|
+
a: preprocessProps((props) => renderLink(props))
|
|
44
|
+
};
|
|
45
|
+
const MdxProvider = ({ children }) => {
|
|
46
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.MDXProvider, { components, children });
|
|
47
|
+
};
|
|
48
|
+
exports.MdxProvider = MdxProvider;
|
|
@@ -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,
|
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-BxPYJ5OB.js");
|
|
4
4
|
const index$1 = require("./index-IpSV-c71.js");
|
|
5
5
|
const i18n$1 = require("./index-Biz1dDqA.js");
|
|
6
|
-
const index$2 = require("./index-
|
|
6
|
+
const index$2 = require("./index-DF_u_tzx.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-BKg1_9Hw.mjs";
|
|
2
2
|
import { u } from "./index-xuSxvz5z.mjs";
|
|
3
3
|
import { a as a2, G as G2, r } from "./index-DoBCANwf.mjs";
|
|
4
|
-
import { M } from "./index-
|
|
4
|
+
import { M } from "./index-CcsbqDXL.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,
|
package/dist/providers/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-DF_u_tzx.js");
|
|
4
4
|
const index$1 = require("../index-BhsXlbd8.js");
|
|
5
5
|
exports.MdxProvider = index.MdxProvider;
|
|
6
6
|
exports.SiteProvider = index$1.SiteProvider;
|
package/dist/providers/index.mjs
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DetailedHTMLProps, HTMLAttributes, ReactElement } from 'react';
|
|
2
|
+
export type Props<E extends HTMLElement, A extends HTMLAttributes<E> = HTMLAttributes<E>> = DetailedHTMLProps<A, E>;
|
|
3
|
+
export type ComponentCallback<T extends HTMLElement> = (props: Props<T>) => ReactElement;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ComponentCallback, Props } from './types';
|
|
2
|
+
export declare function omitProps<T extends HTMLElement>(props: Props<T>, omittedKeys: string[]): Props<T>;
|
|
3
|
+
export declare function preprocessProps<T extends HTMLElement>(callback: ComponentCallback<T>): ComponentCallback<T>;
|
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;
|
package/package.json
CHANGED
package/dist/index-Bx3B21Dh.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Link, Text, UnorderedList, OrderedList, Heading } from "@chakra-ui/react";
|
|
3
|
-
import { MDXProvider } from "@mdx-js/react";
|
|
4
|
-
function omitProps(props, keysToOmit) {
|
|
5
|
-
const result = { ...props };
|
|
6
|
-
keysToOmit.forEach((key) => {
|
|
7
|
-
if (key in result) {
|
|
8
|
-
delete result[key];
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
return result;
|
|
12
|
-
}
|
|
13
|
-
const components = {
|
|
14
|
-
h1: (props) => /* @__PURE__ */ jsx(Heading, { as: "h1", size: "xl", mb: 4, ...omitProps(props, ["node"]) }),
|
|
15
|
-
h2: (props) => /* @__PURE__ */ jsx(Heading, { as: "h2", size: "lg", mt: 6, mb: 4, ...omitProps(props, ["node"]) }),
|
|
16
|
-
h3: (props) => /* @__PURE__ */ jsx(Heading, { as: "h3", size: "md", mt: 4, mb: 4, ...omitProps(props, ["node"]) }),
|
|
17
|
-
ol: (props) => /* @__PURE__ */ jsx(OrderedList, { mb: 4, ...omitProps(props, ["node"]) }),
|
|
18
|
-
ul: (props) => /* @__PURE__ */ jsx(UnorderedList, { mb: 4, ...omitProps(props, ["node"]) }),
|
|
19
|
-
p: (props) => /* @__PURE__ */ jsx(Text, { mb: 4, ...omitProps(props, ["node"]) }),
|
|
20
|
-
a: (props) => /* @__PURE__ */ jsx(
|
|
21
|
-
Link,
|
|
22
|
-
{
|
|
23
|
-
target: "_blank",
|
|
24
|
-
rel: "noopener noreferrer",
|
|
25
|
-
referrerPolicy: "no-referrer",
|
|
26
|
-
color: "brand.400",
|
|
27
|
-
...omitProps(props, ["node"])
|
|
28
|
-
}
|
|
29
|
-
)
|
|
30
|
-
};
|
|
31
|
-
const MdxProvider = ({ children }) => {
|
|
32
|
-
return /* @__PURE__ */ jsx(MDXProvider, { components, children });
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
MdxProvider as M
|
|
36
|
-
};
|
package/dist/index-d3V0A4lN.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const react$1 = require("@chakra-ui/react");
|
|
4
|
-
const react = require("@mdx-js/react");
|
|
5
|
-
function omitProps(props, keysToOmit) {
|
|
6
|
-
const result = { ...props };
|
|
7
|
-
keysToOmit.forEach((key) => {
|
|
8
|
-
if (key in result) {
|
|
9
|
-
delete result[key];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
return result;
|
|
13
|
-
}
|
|
14
|
-
const components = {
|
|
15
|
-
h1: (props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Heading, { as: "h1", size: "xl", mb: 4, ...omitProps(props, ["node"]) }),
|
|
16
|
-
h2: (props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Heading, { as: "h2", size: "lg", mt: 6, mb: 4, ...omitProps(props, ["node"]) }),
|
|
17
|
-
h3: (props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Heading, { as: "h3", size: "md", mt: 4, mb: 4, ...omitProps(props, ["node"]) }),
|
|
18
|
-
ol: (props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.OrderedList, { mb: 4, ...omitProps(props, ["node"]) }),
|
|
19
|
-
ul: (props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.UnorderedList, { mb: 4, ...omitProps(props, ["node"]) }),
|
|
20
|
-
p: (props) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { mb: 4, ...omitProps(props, ["node"]) }),
|
|
21
|
-
a: (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
-
react$1.Link,
|
|
23
|
-
{
|
|
24
|
-
target: "_blank",
|
|
25
|
-
rel: "noopener noreferrer",
|
|
26
|
-
referrerPolicy: "no-referrer",
|
|
27
|
-
color: "brand.400",
|
|
28
|
-
...omitProps(props, ["node"])
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
};
|
|
32
|
-
const MdxProvider = ({ children }) => {
|
|
33
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.MDXProvider, { components, children });
|
|
34
|
-
};
|
|
35
|
-
exports.MdxProvider = MdxProvider;
|