@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.
Files changed (65) hide show
  1. package/components/Anchor.jsx +14 -25
  2. package/components/Callout/index.tsx +41 -0
  3. package/components/Code/index.tsx +75 -0
  4. package/components/CodeTabs/{index.jsx → index.tsx} +8 -19
  5. package/components/Embed/index.tsx +68 -0
  6. package/components/Glossary/index.tsx +37 -0
  7. package/components/Glossary/style.scss +69 -0
  8. package/components/HTMLBlock/index.tsx +36 -0
  9. package/components/Image/index.tsx +110 -0
  10. package/components/Table/index.tsx +19 -0
  11. package/components/TableOfContents/index.jsx +4 -4
  12. package/components/{index.js → index.ts} +1 -1
  13. package/dist/components/Callout/index.d.ts +9 -0
  14. package/dist/components/Code/index.d.ts +11 -0
  15. package/dist/components/CodeTabs/index.d.ts +3 -0
  16. package/dist/components/Embed/index.d.ts +13 -0
  17. package/dist/components/Glossary/index.d.ts +10 -0
  18. package/dist/components/HTMLBlock/index.d.ts +7 -0
  19. package/dist/components/Image/index.d.ts +15 -0
  20. package/dist/components/Table/index.d.ts +6 -0
  21. package/dist/components/index.d.ts +12 -0
  22. package/dist/contexts/GlossaryTerms.d.ts +7 -0
  23. package/dist/contexts/index.d.ts +5 -0
  24. package/dist/enums.d.ts +12 -0
  25. package/dist/errors/mdx-syntax-error.d.ts +5 -0
  26. package/dist/example/App.d.ts +4 -0
  27. package/dist/example/Doc.d.ts +3 -0
  28. package/dist/example/Form.d.ts +3 -0
  29. package/dist/example/Header.d.ts +3 -0
  30. package/dist/example/RenderError.d.ts +23 -0
  31. package/dist/example/Root.d.ts +3 -0
  32. package/dist/example/docs.d.ts +2 -0
  33. package/dist/example/index.d.ts +1 -0
  34. package/dist/index.d.ts +35 -0
  35. package/dist/lib/owlmoji.d.ts +4 -0
  36. package/dist/main.js +78873 -2
  37. package/dist/main.node.js +81012 -2
  38. package/dist/processor/compile/callout.d.ts +3 -0
  39. package/dist/processor/compile/code-tabs.d.ts +3 -0
  40. package/dist/processor/compile/compatibility.d.ts +18 -0
  41. package/dist/processor/compile/embed.d.ts +3 -0
  42. package/dist/processor/compile/gemoji.d.ts +3 -0
  43. package/dist/processor/compile/html-block.d.ts +3 -0
  44. package/dist/processor/compile/image.d.ts +3 -0
  45. package/dist/processor/compile/index.d.ts +2 -0
  46. package/dist/processor/compile/table.d.ts +0 -0
  47. package/dist/processor/transform/callouts.d.ts +2 -0
  48. package/dist/processor/transform/code-tabs.d.ts +2 -0
  49. package/dist/processor/transform/embeds.d.ts +2 -0
  50. package/dist/processor/transform/gemoji+.d.ts +3 -0
  51. package/dist/processor/transform/index.d.ts +4 -0
  52. package/dist/processor/transform/readme-components.d.ts +6 -0
  53. package/package.json +41 -22
  54. package/styles/components.scss +1 -1
  55. package/components/Callout/index.jsx +0 -42
  56. package/components/Code/index.jsx +0 -101
  57. package/components/Embed/index.jsx +0 -89
  58. package/components/GlossaryItem/index.jsx +0 -44
  59. package/components/GlossaryItem/style.scss +0 -60
  60. package/components/HTMLBlock/index.jsx +0 -69
  61. package/components/Image/index.jsx +0 -111
  62. package/components/Table/index.jsx +0 -19
  63. package/dist/main.css +0 -399
  64. package/dist/main.js.LICENSE.txt +0 -17
  65. 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,7 @@
1
+ export type GlossaryTerm = {
2
+ term: string;
3
+ definition: string;
4
+ _id?: string;
5
+ };
6
+ declare const GlossaryContext: import("react").Context<GlossaryTerm[]>;
7
+ export default GlossaryContext;
@@ -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;
@@ -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,5 @@
1
+ import { VFileMessage } from 'vfile-message';
2
+ export default class MdxSyntaxError extends SyntaxError {
3
+ original: VFileMessage;
4
+ constructor(error: VFileMessage, doc: string);
5
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './demo.scss';
3
+ declare const App: () => React.JSX.Element;
4
+ export default App;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Doc: () => React.JSX.Element;
3
+ export default Doc;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Form: () => React.JSX.Element;
3
+ export default Form;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare function Header(): React.JSX.Element;
3
+ export default Header;
@@ -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,3 @@
1
+ import React from 'react';
2
+ declare const Root: () => React.JSX.Element;
3
+ export default Root;
@@ -0,0 +1,2 @@
1
+ declare const fixtures: {};
2
+ export default fixtures;
@@ -0,0 +1 @@
1
+ export {};
@@ -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;
@@ -0,0 +1,4 @@
1
+ export default class Owlmoji {
2
+ static kind: (name: string) => "gemoji" | "fontawesome" | "owlmoji";
3
+ static nameToEmoji: Record<string, string>;
4
+ }