@readme/markdown 8.2.0 → 8.4.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/components/Accordion/index.tsx +5 -2
- package/components/Anchor.jsx +1 -1
- package/components/Callout/index.tsx +5 -4
- package/components/Cards/index.tsx +17 -5
- package/components/Code/index.tsx +11 -2
- package/components/CodeTabs/index.tsx +5 -1
- package/components/Columns/index.tsx +7 -6
- package/components/Embed/index.tsx +10 -7
- package/components/Glossary/index.tsx +8 -4
- package/components/HTMLBlock/index.tsx +10 -2
- package/components/Heading/index.tsx +6 -2
- package/components/Image/index.tsx +15 -13
- package/components/Table/index.tsx +2 -2
- package/components/Tabs/index.tsx +21 -14
- package/components/TailwindRoot/index.tsx +6 -2
- package/dist/components/Accordion/index.d.ts +7 -6
- package/dist/components/Callout/index.d.ts +2 -2
- package/dist/components/Cards/index.d.ts +13 -11
- package/dist/components/CodeTabs/index.d.ts +5 -1
- package/dist/components/Columns/index.d.ts +6 -7
- package/dist/components/Embed/index.d.ts +6 -6
- package/dist/components/Glossary/index.d.ts +4 -3
- package/dist/components/HTMLBlock/index.d.ts +5 -4
- package/dist/components/Heading/index.d.ts +1 -1
- package/dist/components/Image/index.d.ts +2 -2
- package/dist/components/Table/index.d.ts +2 -2
- package/dist/components/Tabs/index.d.ts +5 -6
- package/dist/components/TailwindRoot/index.d.ts +5 -4
- package/dist/contexts/GlossaryTerms.d.ts +4 -4
- package/dist/contexts/index.d.ts +2 -2
- package/dist/errors/mdx-syntax-error.d.ts +1 -1
- package/dist/example/RenderError.d.ts +5 -4
- package/dist/lib/ast-processor.d.ts +5 -5
- package/dist/lib/compile.d.ts +3 -4
- package/dist/lib/hast.d.ts +1 -1
- package/dist/lib/mdast.d.ts +3 -1
- package/dist/lib/mdastV6.d.ts +4 -1
- package/dist/lib/mdx.d.ts +3 -1
- package/dist/lib/plain.d.ts +1 -1
- package/dist/lib/run.d.ts +6 -12
- package/dist/main.js +24553 -24400
- package/dist/main.node.js +22070 -21917
- package/dist/main.node.js.map +1 -1
- package/dist/processor/compile/callout.d.ts +1 -1
- package/dist/processor/compile/code-tabs.d.ts +1 -1
- package/dist/processor/compile/compatibility.d.ts +20 -31
- package/dist/processor/compile/embed.d.ts +1 -1
- package/dist/processor/compile/gemoji.d.ts +1 -1
- package/dist/processor/compile/html-block.d.ts +1 -1
- package/dist/processor/compile/variable.d.ts +1 -1
- package/dist/processor/plugin/toc.d.ts +4 -4
- package/dist/processor/transform/callouts.d.ts +2 -1
- package/dist/processor/transform/code-tabs.d.ts +1 -1
- package/dist/processor/transform/compatability.d.ts +1 -1
- package/dist/processor/transform/div.d.ts +1 -1
- package/dist/processor/transform/embeds.d.ts +1 -1
- package/dist/processor/transform/gemoji+.d.ts +1 -1
- package/dist/processor/transform/images.d.ts +1 -1
- package/dist/processor/transform/index.d.ts +4 -4
- package/dist/processor/transform/inject-components.d.ts +2 -2
- package/dist/processor/transform/mdx-to-hast.d.ts +1 -1
- package/dist/processor/transform/mermaid.d.ts +1 -1
- package/dist/processor/transform/readme-components.d.ts +1 -1
- package/dist/processor/transform/readme-to-mdx.d.ts +1 -1
- package/dist/processor/transform/tables-to-jsx.d.ts +1 -1
- package/dist/processor/transform/tailwind.d.ts +2 -1
- package/dist/processor/transform/variables.d.ts +1 -1
- package/dist/processor/utils.d.ts +8 -8
- package/dist/utils/consts.d.ts +1 -0
- package/dist/utils/user.d.ts +2 -2
- package/package.json +4 -1
package/dist/contexts/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { RunOpts } from '../lib/run';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
type Props = React.PropsWithChildren & Pick<RunOpts, 'baseUrl' | 'terms' | 'variables'>;
|
|
3
|
+
type Props = Pick<RunOpts, 'baseUrl' | 'terms' | 'variables'> & React.PropsWithChildren;
|
|
4
4
|
declare const Contexts: ({ children, terms, variables, baseUrl }: Props) => React.ReactNode;
|
|
5
5
|
export default Contexts;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
interface Props {
|
|
3
4
|
error?: string;
|
|
4
5
|
}
|
|
@@ -15,9 +16,9 @@ declare class RenderError extends React.Component<PropsWithChildren<Props>, Stat
|
|
|
15
16
|
hasError: boolean;
|
|
16
17
|
message: string;
|
|
17
18
|
};
|
|
18
|
-
componentDidCatch(error:
|
|
19
|
-
componentStack:
|
|
19
|
+
static componentDidCatch(error: Error, info: {
|
|
20
|
+
componentStack: string;
|
|
20
21
|
}): void;
|
|
21
|
-
render(): string | number | boolean | React.
|
|
22
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element;
|
|
22
23
|
}
|
|
23
24
|
export default RenderError;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import type { PluggableList } from 'unified';
|
|
2
|
+
import rehypeSlug from 'rehype-slug';
|
|
1
3
|
import remarkFrontmatter from 'remark-frontmatter';
|
|
2
4
|
import remarkGfm from 'remark-gfm';
|
|
3
|
-
|
|
4
|
-
import { PluggableList } from 'unified';
|
|
5
|
-
export type MdastOpts = {
|
|
5
|
+
export interface MdastOpts {
|
|
6
6
|
components?: Record<string, string>;
|
|
7
7
|
remarkPlugins?: PluggableList;
|
|
8
|
-
}
|
|
9
|
-
export declare const remarkPlugins: ((() => (tree:
|
|
8
|
+
}
|
|
9
|
+
export declare const remarkPlugins: ((() => (tree: import("mdast").Root) => void) | (({ copyButtons }?: {
|
|
10
10
|
copyButtons?: boolean;
|
|
11
11
|
}) => (tree: import("mdast").Node) => import("mdast").Node) | typeof remarkFrontmatter | typeof remarkGfm)[];
|
|
12
12
|
export declare const rehypePlugins: ((() => (tree: import("unist").Node) => import("unist").Node) | typeof rehypeSlug)[];
|
package/dist/lib/compile.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { CompileOptions } from '@mdx-js/mdx';
|
|
1
|
+
import type { CompileOptions } from '@mdx-js/mdx';
|
|
2
2
|
export type CompileOpts = CompileOptions & {
|
|
3
|
-
lazyImages?: boolean;
|
|
4
|
-
safeMode?: boolean;
|
|
5
3
|
components?: Record<string, string>;
|
|
6
4
|
copyButtons?: boolean;
|
|
7
5
|
useTailwind?: boolean;
|
|
6
|
+
useTailwindRoot?: boolean;
|
|
8
7
|
};
|
|
9
|
-
declare const compile: (text: string, { components, copyButtons, useTailwind, ...opts }?: CompileOpts) => Promise<string>;
|
|
8
|
+
declare const compile: (text: string, { components, copyButtons, useTailwind, useTailwindRoot, ...opts }?: CompileOpts) => Promise<string>;
|
|
10
9
|
export default compile;
|
package/dist/lib/hast.d.ts
CHANGED
package/dist/lib/mdast.d.ts
CHANGED
package/dist/lib/mdastV6.d.ts
CHANGED
package/dist/lib/mdx.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Root as HastRoot } from 'hast';
|
|
2
|
+
import type { Root as MdastRoot } from 'mdast';
|
|
3
|
+
export declare const mdx: (tree: HastRoot | MdastRoot, { hast, ...opts }?: {
|
|
2
4
|
hast?: boolean;
|
|
3
5
|
}) => string;
|
|
4
6
|
export default mdx;
|
package/dist/lib/plain.d.ts
CHANGED
package/dist/lib/run.d.ts
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Variables } from '../utils/user';
|
|
1
|
+
import type { GlossaryTerm } from '../contexts/GlossaryTerms';
|
|
2
|
+
import type { CustomComponents, RMDXModule } from '../types';
|
|
3
|
+
import type { Variables } from '../utils/user';
|
|
4
|
+
import type { RunOptions } from '@mdx-js/mdx';
|
|
6
5
|
export type RunOpts = Omit<RunOptions, 'Fragment'> & {
|
|
6
|
+
baseUrl?: string;
|
|
7
7
|
components?: CustomComponents;
|
|
8
8
|
imports?: Record<string, unknown>;
|
|
9
|
-
baseUrl?: string;
|
|
10
9
|
terms?: GlossaryTerm[];
|
|
11
10
|
variables?: Variables;
|
|
12
11
|
};
|
|
13
|
-
declare const run: (string: string, _opts?: RunOpts) => Promise<
|
|
14
|
-
default: () => React.JSX.Element;
|
|
15
|
-
toc: import("../types").IndexableElements[];
|
|
16
|
-
Toc: () => React.JSX.Element;
|
|
17
|
-
stylesheet: string;
|
|
18
|
-
}>;
|
|
12
|
+
declare const run: (string: string, _opts?: RunOpts) => Promise<RMDXModule>;
|
|
19
13
|
export default run;
|