@anywayseo/tools 4.0.2 → 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-CcsbqDXL.mjs +49 -0
- package/dist/index-DF_u_tzx.js +48 -0
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- 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/package.json +1 -1
- package/dist/index-Bx3B21Dh.mjs +0 -36
- package/dist/index-d3V0A4lN.js +0 -35
- package/dist/{index-BZBc-e28.mjs → index-BKg1_9Hw.mjs} +1 -1
- package/dist/{index-DmOT7IZT.js → index-BxPYJ5OB.js} +1 -1
|
@@ -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,
|
|
@@ -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
|
+
};
|
|
@@ -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;
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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
8
|
const index$4 = require("./index-CpjGjVVj.js");
|
|
9
9
|
const index$5 = require("./index-NsIHOkeN.js");
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
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";
|
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/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;
|
|
@@ -7,8 +7,8 @@ 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";
|
|
@@ -8,8 +8,8 @@ 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");
|