foxmd 0.2.0-beta.2 → 0.2.0-beta.4

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 (2) hide show
  1. package/dist/index.d.ts +5 -5
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { Token, Marked, MarkedOptions } from 'marked';
2
2
  import React$1, { ReactNode } from 'react';
3
3
 
4
4
  type HtmlTagReplaceReact = {
5
- [TagName in keyof React.JSX.IntrinsicElements]?: React.ComponentType<TagName>;
5
+ [TagName in keyof React.JSX.IntrinsicElements]?: React.ComponentType<React.ComponentPropsWithoutRef<TagName>>;
6
6
  };
7
7
 
8
8
  type HeadingLevels = 1 | 2 | 3 | 4 | 5 | 6;
@@ -26,8 +26,8 @@ declare function createInternalFoxmdRenderer(suppressHydrationWarning: boolean,
26
26
  paragraph(children: ReactNode): ReactNode;
27
27
  link(href: string, text: ReactNode, title?: string): ReactNode;
28
28
  image(src: string, alt: string, title?: string): ReactNode;
29
- codespan(code: ReactNode, lang?: string | null): ReactNode;
30
- code(code: ReactNode, lang?: string | undefined): ReactNode;
29
+ codespan(code: string, lang?: string | null): ReactNode;
30
+ code(code: string, lang?: string | undefined): ReactNode;
31
31
  blockquote(children: ReactNode): ReactNode;
32
32
  list(children: ReactNode, ordered: boolean, start: number | undefined): ReactNode;
33
33
  listItem(children: ReactNode[]): ReactNode;
@@ -48,7 +48,7 @@ declare function createInternalFoxmdRenderer(suppressHydrationWarning: boolean,
48
48
  declare function createFoxmdRenderer({ suppressHydrationWarning, specialImageSizeInTitleOrAlt, customRenderMethods, customReactComponentsForHtmlTags, UNSAFE_allowHtml }?: FoxmdRendererOptions): {
49
49
  blockquote: (children: ReactNode) => ReactNode;
50
50
  br: () => ReactNode;
51
- code: (code: ReactNode, lang?: string | undefined) => ReactNode;
51
+ code: (code: string, lang?: string | undefined) => ReactNode;
52
52
  del: (children: ReactNode) => ReactNode;
53
53
  em: (children: ReactNode) => ReactNode;
54
54
  hr: () => ReactNode;
@@ -60,7 +60,7 @@ declare function createFoxmdRenderer({ suppressHydrationWarning, specialImageSiz
60
60
  text: (text: ReactNode) => ReactNode;
61
61
  heading: (children: ReactNode, level: HeadingLevels, id?: string) => ReactNode;
62
62
  paragraph: (children: ReactNode) => ReactNode;
63
- codespan: (code: ReactNode, lang?: string | null) => ReactNode;
63
+ codespan: (code: string, lang?: string | null) => ReactNode;
64
64
  list: (children: ReactNode, ordered: boolean, start: number | undefined) => ReactNode;
65
65
  listItem: (children: ReactNode[]) => ReactNode;
66
66
  checkbox: (checked: boolean | undefined) => ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxmd",
3
- "version": "0.2.0-beta.2",
3
+ "version": "0.2.0-beta.4",
4
4
  "description": "An opinionated Markdown to React transformer for React Server Component",
5
5
  "repository": {
6
6
  "url": "https://github.com/SukkaW/foxmd"