Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ I swear that I have completed these tasks before submitting:
Print the versions of each library (remove unused)
-->

- react-native-render-html:
- @native-html/render:
- @native-html/table-plugin:
- @native-html/iframe-plugin:
- react-native-webview:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/heuristic-table.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iframe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/table.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ buck-out/
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

# lerna
lerna-debug.log
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commitlint --edit "$1"
363 changes: 0 additions & 363 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

631 changes: 0 additions & 631 deletions .yarn/releases/yarn-3.0.2.cjs

This file was deleted.

942 changes: 942 additions & 0 deletions .yarn/releases/yarn-4.12.0.cjs

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ enableGlobalCache: true

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.0.2.cjs
yarnPath: .yarn/releases/yarn-4.12.0.cjs
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Plugins for react-native-render-html
# Plugins for @native-html/render

[![](https://img.shields.io/discord/736906960041148476?label=discord)](https://discord.gg/3B9twTMEzb)

Expand All @@ -9,11 +9,3 @@
| [@native-html/iframe-plugin](packages/iframe-plugin#readme) | [![npm](https://img.shields.io/npm/v/@native-html/iframe-plugin)](https://www.npmjs.com/package/@native-html/iframe-plugin) | [![CI](https://github.com/native-html/plugins/workflows/iframe/badge.svg?branch=master)](https://github.com/native-html/plugins/actions?query=branch%3Amaster+workflow%3Aiframe) | [![codecov](https://codecov.io/gh/native-html/plugins/branch/master/graph/badge.svg?flag=iframe-plugin)](https://codecov.io/gh/native-html/plugins?flag=iframe-plugin) |
| [@native-html/heuristic-table-plugin](packages/heuristic-table-plugin#readme) | [![npm](https://img.shields.io/npm/v/@native-html/heuristic-table-plugin)](https://www.npmjs.com/package/@native-html/heuristic-table-plugin) | [![CI](https://github.com/native-html/plugins/workflows/heuristic-table/badge.svg?branch=master)](https://github.com/native-html/plugins/actions?query=branch%3Amaster+workflow%3Aheuristic-table) | [![codecov](https://codecov.io/gh/native-html/plugins/branch/master/graph/badge.svg?flag=heuristic-table-plugin)](https://codecov.io/gh/native-html/plugins?flag=heuristic-table-plugin) |
| [@native-html/table-plugin](packages/table-plugin#readme) | [![npm](https://img.shields.io/npm/v/@native-html/table-plugin)](https://www.npmjs.com/package/@native-html/table-plugin) | [![CI](https://github.com/native-html/plugins/workflows/table/badge.svg?branch=master)](https://github.com/native-html/plugins/actions?query=branch%3Amaster+workflow%3Atable) | [![codecov](https://codecov.io/gh/native-html/plugins/branch/master/graph/badge.svg?flag=table-plugin)](https://codecov.io/gh/native-html/plugins?flag=table-plugin) |

## Plugins Compat Table

| react-native-render-html | iframe | table | heuristic-table |
| ------------------------ | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| ≥ 4.2.1 < 5.0.0 | _No Plugin, iframes were rendered internally_ | 2.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/4.x#readme)) | _No Plugin_ |
| ≥ 5.0.0 < 6.0.0 | 1.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/5.x/packages/iframe-plugin#readme)) | 3.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/5.x/packages/table-plugin#readme)) | _No Plugin_ |
| ≥ 6.0.0 | 2.x ([documentation](https://github.com/native-html/plugins/tree/master/packages/iframe-plugin#readme)) | 4.x ([documentation](https://github.com/native-html/plugins/tree/@native-html/table-plugin@4.0.3/packages/table-plugin#readme)) <br> 5.x ([documentation](https://github.com/native-html/plugins/tree/master/packages/table-plugin#readme)) | 0.x ([documentation](https://github.com/native-html/plugins/tree/master/packages/heuristic-table-plugin#readme)) |
22 changes: 22 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const compat = require('eslint-plugin-compat');
const tsdoc = require('eslint-plugin-tsdoc');
const prettier = require('eslint-config-prettier');

module.exports = [
...tsPlugin.configs['flat/recommended'],
compat.configs['flat/recommended'],
{
files: ['**/*.ts', '**/*.tsx'],
plugins: { tsdoc },
rules: {
...prettier.rules,
'comma-dangle': ['error', 'never'],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true }
]
}
}
];
2 changes: 1 addition & 1 deletion example/CustomExample.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import RenderHTML from 'react-native-render-html';
import RenderHTML from '@native-html/render';
import { useHtmlTableProps, tableModel } from '@native-html/table-plugin';
import ClickTable from './ClickTable';
import WebView from 'react-native-webview';
Expand Down
2 changes: 1 addition & 1 deletion example/HeuristicTableExample.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import RenderHTML from 'react-native-render-html';
import RenderHTML from '@native-html/render';
import tableRenderers from '@native-html/heuristic-table-plugin';

const table1 = `
Expand Down
2 changes: 1 addition & 1 deletion example/SimpleExample.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import RenderHTML from 'react-native-render-html';
import RenderHTML from '@native-html/render';
import table from '@native-html/table-plugin';
import WebView from 'react-native-webview';

Expand Down
4 changes: 2 additions & 2 deletions example/YoutubeExample.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import RenderHTML from 'react-native-render-html';
import RenderHTML from '@native-html/render';
import iframe, { iframeModel } from '@native-html/iframe-plugin';
import WebView from 'react-native-webview';

Expand All @@ -22,7 +22,7 @@ const youtubeIframe = `
<p>
<iframe width="560"
height="315"
src="https://www.youtube.com/embed/POK_Iw4m3fY"
src="https://www.youtube.com/watch?v=YWEsoSosQXQ"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
Expand Down
2 changes: 1 addition & 1 deletion example/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
version: pluginVersion,
orientation: 'default',
description:
'Try out official plugins for react-native-render-html on your device!',
'Try out official plugins for @native-html/render on your device!',
icon: './assets/icon.png',
splash: {
backgroundColor: '#ffffff'
Expand Down
39 changes: 21 additions & 18 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,32 @@
"eject": "expo eject"
},
"dependencies": {
"@formidable-webview/webshell": "^2.6.0",
"@native-html/heuristic-table-plugin": "workspace:*",
"@native-html/iframe-plugin": "workspace:*",
"@native-html/plugins-core": "workspace:*",
"@native-html/render": "1.0.0-alpha.0",
"@native-html/table-plugin": "workspace:*",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/native": "^5.9.8",
"@react-navigation/stack": "^5.14.9",
"expo": "^43.0.0",
"expo-status-bar": "~1.1.0",
"expo-web-browser": "~10.0.3",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.2",
"react-native-gesture-handler": "~1.10.2",
"react-native-paper": "^4.9.2",
"react-native-reanimated": "~2.2.0",
"react-native-render-html": "6.1.0",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.8.0",
"react-native-web": "0.17.1",
"react-native-webview": "11.13.0"
"@react-native-community/masked-view": "0.1.11",
"@react-navigation/native": "^7.1.31",
"@react-navigation/stack": "^7.8.2",
"expo": "^55.0.4",
"expo-status-bar": "~55.0.4",
"expo-web-browser": "~55.0.9",
"react": "19.2.0",
"react-dom": "19.2.0",
"react-native": "0.83.2",
"react-native-gesture-handler": "~2.30.0",
"react-native-paper": "^5.15.0",
"react-native-reanimated": "~4.2.1",
"react-native-safe-area-context": "5.6.2",
"react-native-screens": "~4.23.0",
"react-native-web": "0.21.2",
"react-native-webview": "13.16.0",
"react-native-worklets": "^0.7.2"
},
"devDependencies": {
"@babel/core": "^7.12.9"
"@babel/core": "^7.29.0"
},
"private": true,
"installConfig": {
Expand Down
21 changes: 21 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json",
"packages": ["packages/*"],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "independent",
"command": {
"publish": {
"graphType": "all",
"syncWorkspaceLock": true,
"allowPeerDependenciesUpdate": true,
"conventionalCommits": true,
"createRelease": "github",
"skipBumpOnlyReleases": true,
"changelogIncludeCommitsClientLogin": " - by @%l",
"message": "chore: publish",
"preId": "alpha",
"preDistTag": "next"
}
}
}
51 changes: 22 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,37 @@
"test:iframe:jest": "yarn workspace @native-html/iframe-plugin test:jest",
"test:core": "yarn workspace @native-html/plugins-core test",
"test:core:jest": "yarn workspace @native-html/plugins-core test:jest",
"release:table": "yarn workspace @native-html/table-plugin release-it",
"release:heuristic-table": "yarn workspace @native-html/heuristic-table-plugin release-it",
"release:iframe": "yarn workspace @native-html/iframe-plugin release-it",
"release:core": "yarn workspace @native-html/plugins-core release-it",
"publish:example": "yarn workspace example expo publish"
"prepare": "husky",
"release": "lerna publish"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@commitlint/cli": "^20.4.2",
"@commitlint/config-conventional": "^20.4.2",
"@formidable-webview/eslint-config-webjs": "^1.0.0",
"@react-native-community/eslint-config": "^3.0.1",
"@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.30.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-compat": "^3.13.0",
"eslint-plugin-tsdoc": "^0.2.14",
"husky": "^4.3.8",
"prettier": "^2.3.2"
"@lerna-lite/cli": "^4.4.1",
"@lerna-lite/publish": "^4.4.1",
"@react-native-community/eslint-config": "^3.2.0",
"@typescript-eslint/eslint-plugin": "^8.56.1",
"@typescript-eslint/parser": "^8.56.1",
"eslint": "^10.0.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-compat": "^7.0.0",
"eslint-plugin-tsdoc": "^0.5.2",
"husky": "^9.1.7",
"prettier": "^3.8.1"
},
"resolutions": {
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.2",
"react-test-renderer": "16.13.1",
"react-native-webview": "11.13.0",
"@release-it/conventional-changelog": "patch:@release-it/conventional-changelog@2.0.0#patches/@release-it-conventional-changelog.patch",
"release-it": "patch:release-it@14.3.0#patches/release-it.patch"
"react": "19.2.0",
"react-dom": "19.2.0",
"react-native": "0.83.2",
"react-test-renderer": "19.2.0",
"react-native-webview": "13.16.0"
},
"author": "Jules Sam. Randolph <jules.sam.randolph@gmail.com> (https://github.com/jsamr)",
"license": "MIT",
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"workspaces": [
"packages/*",
"example"
]
],
"packageManager": "yarn@4.12.0"
}
3 changes: 0 additions & 3 deletions packages/heuristic-table-plugin/.release-it.js

This file was deleted.

11 changes: 2 additions & 9 deletions packages/heuristic-table-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</p>

<p align="center">
🔠 A 100% native component using heuristics to render tables in react-native-render-html.
🔠 A 100% native component using heuristics to render tables in @native-html/render.
</p>

<hr/>
Expand All @@ -52,19 +52,12 @@ npm add --save @native-html/heuristic-table-plugin
yarn add @native-html/heuristic-table-plugin
```

## Compat Table

| react-native-render-html | @native-html/heuristic-table-plugin |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| &lt; 6.0.0 | - |
| ≥ 6.0.0 | 6.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/6.x/packages/heuristic-table-plugin#readme)) |

## Minimal working example

```javascript
import React from 'react';
import { ScrollView } from 'react-native';
import HTML from 'react-native-render-html';
import HTML from '@native-html/render';
import tableRenderers from '@native-html/heuristic-table-plugin';

const html = `
Expand Down
7 changes: 6 additions & 1 deletion packages/heuristic-table-plugin/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ module.exports = {
'module:metro-react-native-babel-preset',
'@babel/preset-typescript'
],
plugins: ['@babel/plugin-transform-react-jsx'],
plugins: [
'babel-plugin-syntax-hermes-parser',
['@babel/plugin-transform-private-methods', { loose: true }],
['@babel/plugin-transform-private-property-in-object', { loose: true }],
'@babel/plugin-transform-react-jsx'
],
env: {}
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## CellProperties.constraints property

<b>Signature:</b>
**Signature:**

```typescript
constraints: TCellConstraints;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## CellProperties.lenX property

<b>Signature:</b>
**Signature:**

```typescript
lenX: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## CellProperties.lenY property

<b>Signature:</b>
**Signature:**

```typescript
lenY: number;
Expand Down
Loading
Loading