@readme/markdown 6.75.0-beta.4 → 6.75.0-beta.41
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/Anchor.jsx +14 -25
- package/components/Callout/index.tsx +41 -0
- package/components/Code/index.tsx +75 -0
- package/components/CodeTabs/{index.jsx → index.tsx} +8 -19
- package/components/Embed/index.tsx +68 -0
- package/components/Glossary/index.tsx +37 -0
- package/components/Glossary/style.scss +69 -0
- package/components/HTMLBlock/index.tsx +36 -0
- package/components/Image/index.tsx +110 -0
- package/components/Table/index.tsx +19 -0
- package/components/TableOfContents/index.jsx +4 -4
- package/components/{index.js → index.ts} +1 -1
- package/dist/components/Callout/index.d.ts +9 -0
- package/dist/components/Code/index.d.ts +11 -0
- package/dist/components/CodeTabs/index.d.ts +3 -0
- package/dist/components/Embed/index.d.ts +13 -0
- package/dist/components/Glossary/index.d.ts +10 -0
- package/dist/components/HTMLBlock/index.d.ts +7 -0
- package/dist/components/Image/index.d.ts +15 -0
- package/dist/components/Table/index.d.ts +6 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/contexts/GlossaryTerms.d.ts +7 -0
- package/dist/contexts/index.d.ts +5 -0
- package/dist/enums.d.ts +12 -0
- package/dist/errors/mdx-syntax-error.d.ts +5 -0
- package/dist/example/App.d.ts +4 -0
- package/dist/example/Doc.d.ts +3 -0
- package/dist/example/Form.d.ts +3 -0
- package/dist/example/Header.d.ts +3 -0
- package/dist/example/RenderError.d.ts +23 -0
- package/dist/example/Root.d.ts +3 -0
- package/dist/example/docs.d.ts +2 -0
- package/dist/example/index.d.ts +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/lib/owlmoji.d.ts +4 -0
- package/dist/main.js +78873 -2
- package/dist/main.node.js +81012 -2
- package/dist/processor/compile/callout.d.ts +3 -0
- package/dist/processor/compile/code-tabs.d.ts +3 -0
- package/dist/processor/compile/compatibility.d.ts +18 -0
- package/dist/processor/compile/embed.d.ts +3 -0
- package/dist/processor/compile/gemoji.d.ts +3 -0
- package/dist/processor/compile/html-block.d.ts +3 -0
- package/dist/processor/compile/image.d.ts +3 -0
- package/dist/processor/compile/index.d.ts +2 -0
- package/dist/processor/compile/table.d.ts +0 -0
- package/dist/processor/transform/callouts.d.ts +2 -0
- package/dist/processor/transform/code-tabs.d.ts +2 -0
- package/dist/processor/transform/embeds.d.ts +2 -0
- package/dist/processor/transform/gemoji+.d.ts +3 -0
- package/dist/processor/transform/index.d.ts +4 -0
- package/dist/processor/transform/readme-components.d.ts +6 -0
- package/package.json +41 -22
- package/styles/components.scss +1 -1
- package/components/Callout/index.jsx +0 -42
- package/components/Code/index.jsx +0 -101
- package/components/Embed/index.jsx +0 -89
- package/components/GlossaryItem/index.jsx +0 -44
- package/components/GlossaryItem/style.scss +0 -60
- package/components/HTMLBlock/index.jsx +0 -69
- package/components/Image/index.jsx +0 -111
- package/components/Table/index.jsx +0 -19
- package/dist/main.css +0 -399
- package/dist/main.js.LICENSE.txt +0 -17
- package/dist/main.node.js.LICENSE.txt +0 -50
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props extends JSX.IntrinsicAttributes {
|
|
3
|
+
children: [React.ReactElement<HTMLTableCaptionElement | HTMLTableSectionElement | HTMLTableRowElement>];
|
|
4
|
+
}
|
|
5
|
+
declare const Table: (props: Props) => React.JSX.Element;
|
|
6
|
+
export default Table;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as Anchor } from './Anchor';
|
|
2
|
+
export { default as Callout } from './Callout';
|
|
3
|
+
export { default as Code } from './Code';
|
|
4
|
+
export { default as CodeTabs } from './CodeTabs';
|
|
5
|
+
export { default as Embed } from './Embed';
|
|
6
|
+
export { default as Glossary } from './Glossary';
|
|
7
|
+
export { default as HTMLBlock } from './HTMLBlock';
|
|
8
|
+
export { default as Heading } from './Heading';
|
|
9
|
+
export { default as Image } from './Image';
|
|
10
|
+
export { default as Style } from './Style';
|
|
11
|
+
export { default as Table } from './Table';
|
|
12
|
+
export { default as TableOfContents } from './TableOfContents';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RunOpts } from '../index';
|
|
3
|
+
type Props = React.PropsWithChildren & Pick<RunOpts, 'baseUrl' | 'terms' | 'variables'>;
|
|
4
|
+
declare const Contexts: ({ children, terms, variables, baseUrl }: Props) => React.ReactNode;
|
|
5
|
+
export default Contexts;
|
package/dist/enums.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum NodeTypes {
|
|
2
|
+
callout = "rdme-callout",
|
|
3
|
+
codeTabs = "code-tabs",
|
|
4
|
+
emoji = "gemoji",
|
|
5
|
+
i = "i",
|
|
6
|
+
image = "image",
|
|
7
|
+
htmlBlock = "html-block",
|
|
8
|
+
embed = "embed",
|
|
9
|
+
variable = "readme-variable",
|
|
10
|
+
glossary = "readme-glossary-item",
|
|
11
|
+
reusableContent = "reusable-content"
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
error?: string;
|
|
4
|
+
}
|
|
5
|
+
interface State {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
message?: string;
|
|
8
|
+
}
|
|
9
|
+
declare class RenderError extends React.Component<PropsWithChildren<Props>, State> {
|
|
10
|
+
state: {
|
|
11
|
+
hasError: boolean;
|
|
12
|
+
message: any;
|
|
13
|
+
};
|
|
14
|
+
static getDerivedStateFromError(error: Error): {
|
|
15
|
+
hasError: boolean;
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
componentDidCatch(error: any, info: {
|
|
19
|
+
componentStack: any;
|
|
20
|
+
}): void;
|
|
21
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export default RenderError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RunOptions } from '@mdx-js/mdx';
|
|
3
|
+
import * as Components from './components';
|
|
4
|
+
import { GlossaryTerm } from './contexts/GlossaryTerms';
|
|
5
|
+
type ComponentOpts = Record<string, (props: any) => React.ReactNode>;
|
|
6
|
+
interface Variables {
|
|
7
|
+
user: Record<string, string>;
|
|
8
|
+
defaults: {
|
|
9
|
+
name: string;
|
|
10
|
+
default: string;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
export type RunOpts = Omit<RunOptions, 'Fragment'> & {
|
|
14
|
+
components?: ComponentOpts;
|
|
15
|
+
imports?: Record<string, unknown>;
|
|
16
|
+
baseUrl?: string;
|
|
17
|
+
terms?: GlossaryTerm[];
|
|
18
|
+
variables?: Variables;
|
|
19
|
+
};
|
|
20
|
+
export { Components };
|
|
21
|
+
export declare const utils: {
|
|
22
|
+
readonly options: any;
|
|
23
|
+
getHref: any;
|
|
24
|
+
calloutIcons: {};
|
|
25
|
+
};
|
|
26
|
+
export declare const reactProcessor: (opts?: {}) => import("unified").Processor<import("mdast").Root, import("estree").Program, import("estree").Program, import("estree").Program, string>;
|
|
27
|
+
export declare const compile: (text: string, opts?: {}) => string;
|
|
28
|
+
export declare const run: (code: string, _opts?: RunOpts) => Promise<() => React.JSX.Element>;
|
|
29
|
+
export declare const reactTOC: (text: string, opts?: {}) => void;
|
|
30
|
+
export declare const mdx: (tree: any, opts?: {}) => string;
|
|
31
|
+
export declare const html: (text: string, opts?: {}) => void;
|
|
32
|
+
export declare const mdast: any;
|
|
33
|
+
export declare const hast: (text: string, opts?: {}) => import("hast").Root;
|
|
34
|
+
export declare const esast: (text: string, opts?: {}) => void;
|
|
35
|
+
export declare const plain: (text: string, opts?: {}) => void;
|