Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-markdown

Package Overview
Dependencies
Maintainers
2
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-markdown - npm Package Compare versions

Comparing version 8.0.3 to 8.0.4

16

lib/ast-to-react.d.ts

@@ -77,7 +77,12 @@ /**

}
export type TableCellProps = ComponentPropsWithoutRef<'table'> &
export type TableDataCellProps = ComponentPropsWithoutRef<'td'> &
ReactMarkdownProps & {
style?: Record<string, unknown>
isHeader: boolean
isHeader: false
}
export type TableHeaderCellProps = ComponentPropsWithoutRef<'th'> &
ReactMarkdownProps & {
style?: Record<string, unknown>
isHeader: true
}
export type TableRowProps = ComponentPropsWithoutRef<'tr'> &

@@ -96,3 +101,4 @@ ReactMarkdownProps & {

export type OrderedListComponent = ComponentType<OrderedListProps>
export type TableCellComponent = ComponentType<TableCellProps>
export type TableDataCellComponent = ComponentType<TableDataCellProps>
export type TableHeaderCellComponent = ComponentType<TableHeaderCellProps>
export type TableRowComponent = ComponentType<TableRowProps>

@@ -110,4 +116,4 @@ export type UnorderedListComponent = ComponentType<UnorderedListProps>

ol: OrderedListComponent | ReactMarkdownNames
td: TableCellComponent | ReactMarkdownNames
th: TableCellComponent | ReactMarkdownNames
td: TableDataCellComponent | ReactMarkdownNames
th: TableHeaderCellComponent | ReactMarkdownNames
tr: TableRowComponent | ReactMarkdownNames

@@ -114,0 +120,0 @@ ul: UnorderedListComponent | ReactMarkdownNames

@@ -61,3 +61,4 @@ /**

* @typedef {ComponentPropsWithoutRef<'ol'> & ReactMarkdownProps & {depth: number, ordered: true}} OrderedListProps
* @typedef {ComponentPropsWithoutRef<'table'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: boolean}} TableCellProps
* @typedef {ComponentPropsWithoutRef<'td'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: false}} TableDataCellProps
* @typedef {ComponentPropsWithoutRef<'th'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: true}} TableHeaderCellProps
* @typedef {ComponentPropsWithoutRef<'tr'> & ReactMarkdownProps & {isHeader: boolean}} TableRowProps

@@ -70,3 +71,4 @@ * @typedef {ComponentPropsWithoutRef<'ul'> & ReactMarkdownProps & {depth: number, ordered: false}} UnorderedListProps

* @typedef {ComponentType<OrderedListProps>} OrderedListComponent
* @typedef {ComponentType<TableCellProps>} TableCellComponent
* @typedef {ComponentType<TableDataCellProps>} TableDataCellComponent
* @typedef {ComponentType<TableHeaderCellProps>} TableHeaderCellComponent
* @typedef {ComponentType<TableRowProps>} TableRowComponent

@@ -85,4 +87,4 @@ * @typedef {ComponentType<UnorderedListProps>} UnorderedListComponent

* @property {OrderedListComponent|ReactMarkdownNames} ol
* @property {TableCellComponent|ReactMarkdownNames} td
* @property {TableCellComponent|ReactMarkdownNames} th
* @property {TableDataCellComponent|ReactMarkdownNames} td
* @property {TableHeaderCellComponent|ReactMarkdownNames} th
* @property {TableRowComponent|ReactMarkdownNames} tr

@@ -450,4 +452,4 @@ * @property {UnorderedListComponent|ReactMarkdownNames} ul

]
.map((d) => String(d))
.map(String)
.join('')
}
import type {ReactNode, ComponentType, ComponentPropsWithoutRef} from 'react'
import type {Position} from 'unist'
import type {Element} from 'hast'
export interface ReactMarkdownProps {
export type ReactMarkdownProps = {
node: Element

@@ -20,3 +20,3 @@ children: ReactNode[]

}
export declare type NormalComponents = {
export type NormalComponents = {
[TagName in keyof JSX.IntrinsicElements]:

@@ -23,0 +23,0 @@ | keyof JSX.IntrinsicElements

@@ -7,3 +7,3 @@ import type {ReactNode, ComponentType, ComponentPropsWithoutRef} from 'react'

export interface ReactMarkdownProps {
export type ReactMarkdownProps = {
node: Element

@@ -10,0 +10,0 @@ children: ReactNode[]

@@ -28,5 +28,7 @@ /**

const transformLinkUri: PropTypes.Requireable<
boolean | ((...args: any[]) => any)
NonNullable<boolean | ((...args: any[]) => any) | null | undefined>
>
const linkTarget: PropTypes.Requireable<string | ((...args: any[]) => any)>
const linkTarget: PropTypes.Requireable<
NonNullable<string | ((...args: any[]) => any) | null | undefined>
>
const transformImageUri: PropTypes.Requireable<(...args: any[]) => any>

@@ -33,0 +35,0 @@ const components: PropTypes.Requireable<object>

@@ -1,23 +0,4 @@

/**
* @typedef {import('unist').Node} Node
* @typedef {import('hast').Root} Root
* @typedef {import('hast').Element} Element
*
* @callback AllowElement
* @param {Element} element
* @param {number} index
* @param {Element|Root} parent
* @returns {boolean|undefined}
*
* @typedef Options
* @property {Array<string>} [allowedElements]
* @property {Array<string>} [disallowedElements=[]]
* @property {AllowElement} [allowElement]
* @property {boolean} [unwrapDisallowed=false]
*/
/**
* @type {import('unified').Plugin<[Options], Root>}
*/
export default function rehypeFilter(
options: Options
this: import('unified').Processor<void, import('hast').Root, void, void>,
settings_0: Options
):

@@ -24,0 +5,0 @@ | void

{
"name": "react-markdown",
"version": "8.0.3",
"version": "8.0.4",
"description": "React component to render markdown",

@@ -107,3 +107,3 @@ "license": "MIT",

"c8": "^7.0.0",
"esbuild": "^0.14.0",
"esbuild": "^0.15.0",
"eslint-config-xo-react": "^0.27.0",

@@ -118,3 +118,3 @@ "eslint-plugin-es": "^4.0.0",

"rehype-raw": "^6.0.0",
"remark-cli": "^10.0.0",
"remark-cli": "^11.0.0",
"remark-gfm": "^3.0.0",

@@ -125,5 +125,5 @@ "remark-preset-wooorm": "^9.0.0",

"type-coverage": "^2.0.0",
"typescript": "~4.4.0",
"typescript": "^4.0.0",
"uvu": "^0.5.0",
"xo": "^0.48.0"
"xo": "^0.53.0"
},

@@ -201,3 +201,3 @@ "scripts": {

"rules": {
"node/file-extension-in-import": "off",
"n/file-extension-in-import": "off",
"react/no-children-prop": "off",

@@ -204,0 +204,0 @@ "react/prop-types": "off"

@@ -574,3 +574,4 @@ <!--

The props that are passed are what you probably would expect: an `a` (link) will
get `href` (and `title`) props, and `img` (image) an `src` (and `title`), etc.
get `href` (and `title`) props, and `img` (image) an `src`, `alt` and `title`,
etc.
There are some extra props passed.

@@ -577,0 +578,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc