Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 53e322c

Browse files
committed
feat: support [email protected]; beware of upstream breaking changes
1 parent e95d7a8 commit 53e322c

34 files changed

+148
-298
lines changed

example/YoutubeExample.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import RenderHTML from 'react-native-render-html';
3-
import iframe from '@native-html/iframe-plugin';
3+
import iframe, { iframeModel } from '@native-html/iframe-plugin';
44
import WebView from 'react-native-webview';
55

66
const htmlConfig = {
@@ -12,6 +12,9 @@ const htmlConfig = {
1212
alignSelf: 'center'
1313
}
1414
},
15+
customHTMLElementModels: {
16+
iframe: iframeModel
17+
},
1518
WebView
1619
};
1720

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"react-native-gesture-handler": "~1.8.0",
2525
"react-native-paper": "^4.7.1",
2626
"react-native-reanimated": "~1.13.2",
27-
"react-native-render-html": "6.0.0-alpha.23",
27+
"react-native-render-html": "6.0.0-alpha.25",
2828
"react-native-safe-area-context": "3.1.9",
2929
"react-native-screens": "~2.15.2",
3030
"react-native-web": "~0.13.18",

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
"react-test-renderer": "16.13.1",
4444
"react-native-webview": "11.0.0",
4545
"@release-it/conventional-changelog": "patch:@release-it/[email protected]#patches/@release-it-conventional-changelog.patch",
46-
"release-it": "patch:[email protected]#patches/release-it.patch",
47-
"@native-html/transient-render-engine": "4.4.1"
46+
"release-it": "patch:[email protected]#patches/release-it.patch"
4847
},
4948
"author": "Jules Sam. Randolph <[email protected]> (https://github.com/jsamr)",
5049
"license": "MIT",

packages/heuristic-table-plugin/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,20 +109,18 @@ See the documentation for this object here: [`HeuristicTablePluginConfig`](docs/
109109

110110
### Customizing Root renderer
111111

112-
You can customize the renderer logic thanks to `useHtmlTableProps` hook, `tableModel` and `HTMLTable` exports:
112+
You can customize the renderer logic thanks to `useHtmlTableProps` hook and `HTMLTable` exports:
113113

114114
```jsx
115115
import React from 'react';
116-
import tableRenderers, {useHtmlTableProps, HTMLTable, tableModel} from '@native-html/heuristic-table-plugin';
116+
import tableRenderers, {useHtmlTableProps, HTMLTable} from '@native-html/heuristic-table-plugin';
117117

118118
function TableRenderer(props) {
119119
const tableProps = useHtmlTableProps(props, /* config */);
120120
// Do customize the props here; wrap with your own container...
121121
return <HTMLTable {..tableProps} />;
122122
};
123123

124-
TableRenderer.model = tableModel;
125-
126124
const renderers = {
127125
...tableRenderers,
128126
table: TableRenderer
@@ -163,8 +161,6 @@ function TdRenderer(props) {
163161
return React.createElement(cellProps.TDefaultRenderer, { ...cellProps, style });
164162
}
165163

166-
TdRenderer.model = tdModel;
167-
168164
const renderers = {
169165
table: TableRenderer,
170166
td: TdRenderer,

packages/heuristic-table-plugin/docs/heuristic-table-plugin.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@
3232
| --- | --- |
3333
| [HTMLTable](./heuristic-table-plugin.htmltable.md) | A component to render tables. |
3434
| [renderers](./heuristic-table-plugin.renderers.md) | Renderers to be merged in the <code>renderers</code> prop of <code>RenderHTML</code> component. |
35-
| [tableModel](./heuristic-table-plugin.tablemodel.md) | |
3635
| [TableRenderer](./heuristic-table-plugin.tablerenderer.md) | A 100% native renderer component for <code>table</code> tag. |
37-
| [tdModel](./heuristic-table-plugin.tdmodel.md) | |
3836
| [TdRenderer](./heuristic-table-plugin.tdrenderer.md) | The renderer component for <code>td</code> tag. |
39-
| [thModel](./heuristic-table-plugin.thmodel.md) | |
4037
| [ThRenderer](./heuristic-table-plugin.threnderer.md) | The renderer component for <code>th</code> tag. |
4138

packages/heuristic-table-plugin/docs/heuristic-table-plugin.tablemodel.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/heuristic-table-plugin/docs/heuristic-table-plugin.tdmodel.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/heuristic-table-plugin/docs/heuristic-table-plugin.thmodel.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/heuristic-table-plugin/etc/heuristic-table-plugin.api.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import { CustomBlockRenderer } from 'react-native-render-html';
88
import { CustomTagRendererProps } from 'react-native-render-html';
9-
import { DefaultHTMLElementModels } from 'react-native-render-html';
109
import { DefaultTagRendererProps } from 'react-native-render-html';
1110
import { PropsFromParent } from 'react-native-render-html';
1211
import { default as React_2 } from 'react';
@@ -100,9 +99,6 @@ export interface TableFlexRowContainer {
10099
type: 'row-container';
101100
}
102101

103-
// @public (undocumented)
104-
export const tableModel: DefaultHTMLElementModels['table'];
105-
106102
// @public
107103
export const TableRenderer: CustomBlockRenderer;
108104

@@ -114,15 +110,9 @@ export interface TableRoot {
114110
type: 'root';
115111
}
116112

117-
// @public (undocumented)
118-
export const tdModel: DefaultHTMLElementModels['td'];
119-
120113
// @public
121114
export const TdRenderer: CustomBlockRenderer<TableCellPropsFromParent>;
122115

123-
// @public (undocumented)
124-
export const thModel: DefaultHTMLElementModels['th'];
125-
126116
// @public
127117
export const ThRenderer: CustomBlockRenderer<TableCellPropsFromParent>;
128118

packages/heuristic-table-plugin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"react": "16.13.1",
5656
"react-native": "^0.63.2",
5757
"react-native-builder-bob": "^0.17.1",
58-
"react-native-render-html": "6.0.0-alpha.23",
58+
"react-native-render-html": "6.0.0-alpha.25",
5959
"react-test-renderer": "16.13.1",
6060
"release-it": "^14.3.0",
6161
"typescript": "~4.1.3"
@@ -69,7 +69,7 @@
6969
"peerDependencies": {
7070
"react": ">= 16.8.0",
7171
"react-native": ">= 0.63.0",
72-
"react-native-render-html": ">= 6.0.0-alpha.23 || 6.x"
72+
"react-native-render-html": ">= 6.0.0-alpha.25 || >= 6.0.0-beta.0 || 6.x"
7373
},
7474
"author": "Jules Sam. Randolph <[email protected]> (https://github.com/jsamr)",
7575
"homepage": "https://github.com/native-html/plugins/tree/master/packages/heuristic-table-plugin#readme",

0 commit comments

Comments
 (0)