@portabletext/block-tools 4.1.11 → 5.0.1
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.
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/package.json +12 -21
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `@portabletext/block-tools`
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion.
|
|
4
4
|
|
|
5
5
|
**NOTE:** To use `@portabletext/block-tools` in a Node.js script, you will need to provide a `parseHtml` method - generally using `JSDOM`. [Read more](#jsdom-example).
|
|
6
6
|
|
|
@@ -78,7 +78,7 @@ A compiled version of the block content schema type.
|
|
|
78
78
|
|
|
79
79
|
The deserializer will respect the schema when deserializing the HTML elements to blocks.
|
|
80
80
|
|
|
81
|
-
It only supports a subset of HTML tags. Any HTML tag not in the block-tools [whitelist](https://github.com/
|
|
81
|
+
It only supports a subset of HTML tags. Any HTML tag not in the block-tools [whitelist](https://github.com/portabletext/editor/blob/main/packages/block-tools/src/constants.ts) will be deserialized to normal blocks/spans.
|
|
82
82
|
|
|
83
83
|
For instance, if the schema doesn't allow H2 styles, all H2 HTML elements will be output like this:
|
|
84
84
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portabletext/block-tools",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
|
+
"description": "Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"portable-text",
|
|
7
7
|
"block-tools"
|
|
@@ -20,14 +20,8 @@
|
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
|
-
".":
|
|
24
|
-
|
|
25
|
-
"default": "./lib/index.js"
|
|
26
|
-
},
|
|
27
|
-
"./rules": {
|
|
28
|
-
"source": "./src/rules/_exports/index.ts",
|
|
29
|
-
"default": "./lib/rules/index.js"
|
|
30
|
-
},
|
|
23
|
+
".": "./lib/index.js",
|
|
24
|
+
"./rules": "./lib/rules/index.js",
|
|
31
25
|
"./package.json": "./package.json"
|
|
32
26
|
},
|
|
33
27
|
"main": "./lib/index.js",
|
|
@@ -36,27 +30,24 @@
|
|
|
36
30
|
"lib"
|
|
37
31
|
],
|
|
38
32
|
"dependencies": {
|
|
39
|
-
"@sanity/types": "^
|
|
40
|
-
"@portabletext/sanity-bridge": "^
|
|
41
|
-
"@portabletext/schema": "^2.1.
|
|
33
|
+
"@sanity/types": "^5.6.0",
|
|
34
|
+
"@portabletext/sanity-bridge": "^2.0.0",
|
|
35
|
+
"@portabletext/schema": "^2.1.1"
|
|
42
36
|
},
|
|
43
37
|
"devDependencies": {
|
|
44
|
-
"@sanity/pkg-utils": "^10.1
|
|
45
|
-
"@sanity/schema": "^
|
|
38
|
+
"@sanity/pkg-utils": "^10.2.1",
|
|
39
|
+
"@sanity/schema": "^5.6.0",
|
|
46
40
|
"@types/jsdom": "^27.0.0",
|
|
47
41
|
"@vercel/stega": "1.0.0",
|
|
48
|
-
"@vitest/coverage-v8": "^4.0.
|
|
42
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
49
43
|
"jsdom": "^27.0.0",
|
|
50
44
|
"typescript": "5.9.3",
|
|
51
|
-
"vitest": "^4.0.
|
|
52
|
-
"@portabletext/test": "^1.0.
|
|
45
|
+
"vitest": "^4.0.16",
|
|
46
|
+
"@portabletext/test": "^1.0.3"
|
|
53
47
|
},
|
|
54
48
|
"engines": {
|
|
55
49
|
"node": ">=20.19 <22 || >=22.12"
|
|
56
50
|
},
|
|
57
|
-
"publishConfig": {
|
|
58
|
-
"access": "public"
|
|
59
|
-
},
|
|
60
51
|
"scripts": {
|
|
61
52
|
"build": "pkg-utils build --strict --check --clean",
|
|
62
53
|
"check:lint": "biome lint .",
|