react-native-marked 2.0.0-rc.0 → 2.0.0

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/README.md +48 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -38,7 +38,6 @@ export default ExampleComponent;
38
38
  ## Examples
39
39
 
40
40
  - RN App: https://github.com/gmsgowtham/react-native-marked-test
41
- - Snack: https://snack.expo.dev/@gmsgowtham/react-native-marked
42
41
 
43
42
  ## [Props](https://github.com/gmsgowtham/react-native-marked/blob/main/src/lib/types.ts#L9)
44
43
 
@@ -122,6 +121,54 @@ const ExampleComponent = () => {
122
121
  export default ExampleComponent;
123
122
  ```
124
123
 
124
+ > Please refer to `RendererInterface` for all the override methods
125
+
126
+ ```ts
127
+ export interface RendererInterface {
128
+ paragraph(children: ReactNode[], styles?: ViewStyle): ReactNode;
129
+ blockquote(children: ReactNode[], styles?: ViewStyle): ReactNode;
130
+ heading(text: string | ReactNode[], styles?: TextStyle): ReactNode;
131
+ code(
132
+ text: string,
133
+ language?: string,
134
+ containerStyle?: ViewStyle,
135
+ textStyle?: TextStyle,
136
+ ): ReactNode;
137
+ hr(styles?: ViewStyle): ReactNode;
138
+ listItem(children: ReactNode[], styles?: ViewStyle): ReactNode;
139
+ list(
140
+ ordered: boolean,
141
+ li: ReactNode[],
142
+ listStyle?: ViewStyle,
143
+ textStyle?: TextStyle,
144
+ ): ReactNode;
145
+ escape(text: string, styles?: TextStyle): ReactNode;
146
+ link(
147
+ children: string | ReactNode[],
148
+ href: string,
149
+ styles?: TextStyle,
150
+ ): ReactNode;
151
+ image(uri: string, alt?: string, style?: ImageStyle): ReactNode;
152
+ strong(children: ReactNode[], styles?: TextStyle): ReactNode;
153
+ em(children: ReactNode[], styles?: TextStyle): ReactNode;
154
+ codespan(text: string, styles?: TextStyle): ReactNode;
155
+ br(): ReactNode;
156
+ del(children: ReactNode[], styles?: TextStyle): ReactNode;
157
+ text(text: string | ReactNode[], styles?: TextStyle): ReactNode;
158
+ html(text: string | ReactNode[], styles?: TextStyle): ReactNode;
159
+ linkImage(
160
+ href: string,
161
+ imageUrl: string,
162
+ alt?: string,
163
+ style?: ImageStyle,
164
+ ): ReactNode;
165
+ }
166
+ ```
167
+
168
+ > Note:
169
+ >
170
+ > For `key` property for a component, use `getKey` method from Renderer class.
171
+
125
172
  ## Screenshots
126
173
 
127
174
  | Dark Theme | Light Theme |
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "react-native-marked",
3
- "version": "2.0.0-rc.0",
3
+ "version": "2.0.0",
4
4
  "description": "Markdown renderer for React Native powered by marked.js",
5
5
  "main": "dist/commonjs/index",
6
6
  "module": "dist/module/index",
7
- "types": "dist/typescript/src/index.d.ts",
7
+ "types": "dist/typescript/index.d.ts",
8
8
  "react-native": "src/index",
9
9
  "source": "src/index",
10
10
  "files": [