@theguild/components 9.0.0 → 9.1.0-alpha-20250115162659-07dd7a8867a83235ccc4f630fe6bfcb6d9ef54b3
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/server/index.d.mts +9 -1
- package/dist/server/index.js +2 -3
- package/dist/server/mdx-components/hive-mdx-components.d.mts +8 -0
- package/dist/server/mdx-components/hive-mdx-components.js +9 -0
- package/dist/server/mdx-components/index.d.mts +14 -0
- package/dist/server/mdx-components/index.js +3 -0
- package/dist/server/{mdx-components.js → mdx-components/mdx-components.js} +1 -1
- package/dist/server/mdx-components/mdx-link.d.mts +15 -0
- package/dist/server/mdx-components/mdx-link.js +25 -0
- package/package.json +1 -1
- /package/dist/server/{mdx-components.d.mts → mdx-components/mdx-components.d.mts} +0 -0
package/dist/server/index.d.mts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { useMDXComponents } from './mdx-components.mjs';
|
|
1
|
+
export { useMDXComponents } from './mdx-components/mdx-components.mjs';
|
|
2
|
+
export { useHiveMDXComponents } from './mdx-components/hive-mdx-components.mjs';
|
|
3
|
+
export { MDXLink, MDXLinkProps } from './mdx-components/mdx-link.mjs';
|
|
2
4
|
export { MDXRemote } from 'nextra/mdx-remote';
|
|
3
5
|
export { fetchFilePathsFromGitHub } from 'nextra/fetch-filepaths-from-github';
|
|
4
6
|
export { compileMdx } from 'nextra/compile';
|
|
@@ -14,6 +16,12 @@ import 'nextra';
|
|
|
14
16
|
import 'nextra/mdx-components/pre/index';
|
|
15
17
|
import 'react/jsx-runtime';
|
|
16
18
|
import 'react';
|
|
19
|
+
import 'nextra/mdx-components';
|
|
20
|
+
import '../components/anchor.mjs';
|
|
21
|
+
import 'url';
|
|
22
|
+
import '../types/components.mjs';
|
|
23
|
+
import 'next/link';
|
|
24
|
+
import 'react-player';
|
|
17
25
|
import '../products.mjs';
|
|
18
26
|
import 'mdast';
|
|
19
27
|
import 'unified';
|
package/dist/server/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./mdx-components/index.js";
|
|
2
2
|
import { MDXRemote } from "nextra/mdx-remote";
|
|
3
3
|
import { fetchFilePathsFromGitHub } from "nextra/fetch-filepaths-from-github";
|
|
4
4
|
import { compileMdx } from "nextra/compile";
|
|
@@ -30,6 +30,5 @@ export {
|
|
|
30
30
|
mergeMetaWithPageMap,
|
|
31
31
|
normalizePageMap,
|
|
32
32
|
remarkLinkRewrite,
|
|
33
|
-
sharedMetaItems
|
|
34
|
-
useMDXComponents
|
|
33
|
+
sharedMetaItems
|
|
35
34
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { useMDXComponents } from './mdx-components.mjs';
|
|
2
|
+
export { useHiveMDXComponents } from './hive-mdx-components.mjs';
|
|
3
|
+
export { MDXLink, MDXLinkProps } from './mdx-link.mjs';
|
|
4
|
+
import 'next/image';
|
|
5
|
+
import 'nextra';
|
|
6
|
+
import 'nextra/mdx-components/pre/index';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
8
|
+
import 'react';
|
|
9
|
+
import 'nextra/mdx-components';
|
|
10
|
+
import '../../components/anchor.mjs';
|
|
11
|
+
import 'url';
|
|
12
|
+
import '../../types/components.mjs';
|
|
13
|
+
import 'next/link';
|
|
14
|
+
import 'react-player';
|
|
@@ -15,7 +15,7 @@ const docsComponents = getDocsMDXComponents({
|
|
|
15
15
|
await fs.access(filePath);
|
|
16
16
|
} catch (error) {
|
|
17
17
|
const relativePath = path.relative(process.cwd(), filePath);
|
|
18
|
-
if (error.code === "ENOENT") {
|
|
18
|
+
if (typeof error === "object" && error && "code" in error && error.code === "ENOENT") {
|
|
19
19
|
throw new Error(`File doesn't exist: ${relativePath}`);
|
|
20
20
|
}
|
|
21
21
|
throw new Error(`Error checking file: ${relativePath}`);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { Anchor } from '../../components/anchor.mjs';
|
|
3
|
+
import 'url';
|
|
4
|
+
import '../../types/components.mjs';
|
|
5
|
+
import 'next/image';
|
|
6
|
+
import 'next/link';
|
|
7
|
+
import 'react-player';
|
|
8
|
+
|
|
9
|
+
interface MDXLinkProps extends Omit<React.ComponentProps<typeof Anchor>, 'href' | 'children'> {
|
|
10
|
+
href?: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const MDXLink: react.ForwardRefExoticComponent<Omit<MDXLinkProps, "ref"> & react.RefAttributes<HTMLAnchorElement>>;
|
|
14
|
+
|
|
15
|
+
export { MDXLink, type MDXLinkProps };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../../cn";
|
|
4
|
+
import { Anchor } from "../../components/anchor";
|
|
5
|
+
const MDXLink = forwardRef(
|
|
6
|
+
({ className, href, children, ...rest }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
Anchor,
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
className: cn(
|
|
12
|
+
"hive-focus -mx-1 -my-0.5 rounded px-1 py-0.5 font-medium text-blue-700 underline underline-offset-2 hover:no-underline focus-visible:no-underline focus-visible:ring-current focus-visible:ring-offset-blue-200 dark:text-primary/90 dark:focus-visible:ring-primary/50",
|
|
13
|
+
className
|
|
14
|
+
),
|
|
15
|
+
href: href || "",
|
|
16
|
+
...rest,
|
|
17
|
+
children
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
MDXLink.displayName = "MDXLink";
|
|
23
|
+
export {
|
|
24
|
+
MDXLink
|
|
25
|
+
};
|
package/package.json
CHANGED
|
File without changes
|