@discord/markdown-react 0.1.6 → 0.1.8

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/package.json +2 -2
  2. package/src/index.d.ts +11 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discord/markdown-react",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "description": "React library for parsing and rendering Discord Markdown",
6
6
  "main": "dist/src/index.js",
@@ -13,7 +13,7 @@
13
13
  "src/index.d.ts"
14
14
  ],
15
15
  "dependencies": {
16
- "@discord/markdown-wasm": "0.1.6"
16
+ "@discord/markdown-wasm": "0.1.7"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@swc/cli": "^0.5.2",
package/src/index.d.ts CHANGED
@@ -1,4 +1,13 @@
1
- import {} from "@discord/markdown-types";
1
+ import type {
2
+ AnyNode,
3
+ Block,
4
+ CodeBlock,
5
+ Emoji,
6
+ Link,
7
+ List,
8
+ Mention,
9
+ Timestamp,
10
+ } from "@discord/markdown-types";
2
11
  import type React from "react";
3
12
 
4
13
  type NodeRenderProps<P> = P & { siblings: Node[]; index: number };
@@ -43,7 +52,7 @@ export type BlockProps = HeadingProps | ListProps | QuoteProps | SmallProps;
43
52
  // top-level
44
53
  export type TextProps = NodeRenderPropsWithChildren;
45
54
  export type ParagraphProps = NodeRenderPropsWithChildren;
46
- export type EmptyProps = NodeRenderProps;
55
+ export type EmptyProps = NodeRenderProps<Record<string, never>>;
47
56
  export type ListItemProps = NodeRenderPropsWithChildren;
48
57
 
49
58
  export type TopLevelProps =