@jxsuite/markup 0.4.7 → 0.4.9
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/README.md +6 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Browser-safe markup conversion utilities shared by the Jx core packages:
|
|
4
4
|
|
|
5
|
-
- `@jxsuite/markup/html-to-jx
|
|
5
|
+
- `@jxsuite/markup/html-to-jx`: `htmlToJx(html)` converts an HTML string into
|
|
6
6
|
an array of Jx tree nodes (`JxElement | string`), mapping attributes through
|
|
7
7
|
`property-information` and inline `style` strings into style objects.
|
|
8
|
-
- `@jxsuite/markup/md-html
|
|
8
|
+
- `@jxsuite/markup/md-html`: `markdownToHtml(markdown)` renders untrusted
|
|
9
9
|
markdown (GFM tables/strikethrough/task lists) to a **sanitized** HTML
|
|
10
|
-
string
|
|
10
|
+
string. Raw HTML is dropped, event handlers and `javascript:` URLs are
|
|
11
11
|
stripped.
|
|
12
12
|
|
|
13
|
-
Both pipelines are DOM-free and node-free
|
|
14
|
-
safe for any bundle target (Jx Studio, Cloudflare Workers, node/Bun CLIs).
|
|
13
|
+
Both pipelines are DOM-free and node-free, with no `node:*` imports, so they
|
|
14
|
+
are safe for any bundle target (Jx Studio, Cloudflare Workers, node/Bun CLIs).
|
|
15
15
|
The package root re-exports both functions.
|
|
16
16
|
|
|
17
17
|
```ts
|
|
@@ -25,7 +25,7 @@ markdownToHtml("# Hi\n\n**bold**");
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
For markdown → Jx _document_ transpilation (frontmatter, directives, Jx
|
|
28
|
-
markdown), use `@jxsuite/parser
|
|
28
|
+
markdown), use `@jxsuite/parser`. This package deliberately stays a thin,
|
|
29
29
|
dependency-light conversion layer.
|
|
30
30
|
|
|
31
31
|
## Versioning
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jxsuite/markup",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "Browser-safe markup conversion: HTML → Jx nodes, markdown → sanitized HTML",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"test": "bun test --isolate",
|
|
25
25
|
"test:coverage": "bun test --isolate --coverage",
|
|
26
|
-
"upgrade": "
|
|
26
|
+
"upgrade": "bun update --latest && bun install"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@jxsuite/schema": "^1.
|
|
29
|
+
"@jxsuite/schema": "^2.1.0",
|
|
30
30
|
"hast-util-from-html": "^2.0.3",
|
|
31
31
|
"hast-util-whitespace": "^3.0.0",
|
|
32
32
|
"property-information": "^7.2.0",
|