@haklex/rich-litexml 0.28.0 → 0.29.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.
package/dist/browser.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createDefaultRegistry, c as LitexmlRegistry, d as registerParseHTML, i as deserializeNodesFromXml, l as registerCustomReaders, n as serializeToXml, o as registerCustomWriters, r as deserializeFromXml, s as registerBuiltinWriters, t as serializeNodesToXml, u as registerBuiltinReaders } from "./src-
|
|
1
|
+
import { a as createDefaultRegistry, c as LitexmlRegistry, d as registerParseHTML, i as deserializeNodesFromXml, l as registerCustomReaders, n as serializeToXml, o as registerCustomWriters, r as deserializeFromXml, s as registerBuiltinWriters, t as serializeNodesToXml, u as registerBuiltinReaders } from "./src-B0q3dIvF.js";
|
|
2
2
|
//#region src/index-browser.ts
|
|
3
3
|
registerParseHTML((html) => new DOMParser().parseFromString(html, "text/html"));
|
|
4
4
|
//#endregion
|
package/dist/node.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createDefaultRegistry, c as LitexmlRegistry, d as registerParseHTML, i as deserializeNodesFromXml, l as registerCustomReaders, n as serializeToXml, o as registerCustomWriters, r as deserializeFromXml, s as registerBuiltinWriters, t as serializeNodesToXml, u as registerBuiltinReaders } from "./src-
|
|
1
|
+
import { a as createDefaultRegistry, c as LitexmlRegistry, d as registerParseHTML, i as deserializeNodesFromXml, l as registerCustomReaders, n as serializeToXml, o as registerCustomWriters, r as deserializeFromXml, s as registerBuiltinWriters, t as serializeNodesToXml, u as registerBuiltinReaders } from "./src-B0q3dIvF.js";
|
|
2
2
|
import { parseHTML } from "linkedom";
|
|
3
3
|
//#region src/index-node.ts
|
|
4
4
|
registerParseHTML((html) => parseHTML(html).document);
|
|
@@ -158,7 +158,7 @@ function numAttr(el, name) {
|
|
|
158
158
|
const v = el.getAttribute(name);
|
|
159
159
|
return v !== null ? Number(v) : void 0;
|
|
160
160
|
}
|
|
161
|
-
var IMAGE_LAYOUTS = new Set([
|
|
161
|
+
var IMAGE_LAYOUTS = /* @__PURE__ */ new Set([
|
|
162
162
|
"align-left",
|
|
163
163
|
"align-right",
|
|
164
164
|
"float-left",
|
|
@@ -1090,7 +1090,7 @@ function getFormatBit(tagName) {
|
|
|
1090
1090
|
* end of document) is found. We expand those into explicit `<tag …></tag>`
|
|
1091
1091
|
* before handing the string to linkedom / DOMParser.
|
|
1092
1092
|
*/
|
|
1093
|
-
var HTML_VOID_ELEMENTS = new Set([
|
|
1093
|
+
var HTML_VOID_ELEMENTS = /* @__PURE__ */ new Set([
|
|
1094
1094
|
"area",
|
|
1095
1095
|
"base",
|
|
1096
1096
|
"br",
|
|
@@ -1161,7 +1161,7 @@ function deserializeNodesFromXml(xml, registry) {
|
|
|
1161
1161
|
return createReaderContext(registry).parseChildren(fragment);
|
|
1162
1162
|
}
|
|
1163
1163
|
/** Structural containers whose whitespace-only text nodes are layout artifacts, not content */
|
|
1164
|
-
var BLOCK_TAGS = new Set([
|
|
1164
|
+
var BLOCK_TAGS = /* @__PURE__ */ new Set([
|
|
1165
1165
|
"doc",
|
|
1166
1166
|
"fragment",
|
|
1167
1167
|
"root",
|
|
@@ -1340,7 +1340,7 @@ function renderInline(el) {
|
|
|
1340
1340
|
return `<${el.tag}${attrs}>${inner}</${el.tag}>`;
|
|
1341
1341
|
}
|
|
1342
1342
|
function isInlineElement(el) {
|
|
1343
|
-
return new Set([
|
|
1343
|
+
return (/* @__PURE__ */ new Set([
|
|
1344
1344
|
"b",
|
|
1345
1345
|
"i",
|
|
1346
1346
|
"u",
|
|
@@ -1360,7 +1360,7 @@ function isInlineElement(el) {
|
|
|
1360
1360
|
"math",
|
|
1361
1361
|
"footnote",
|
|
1362
1362
|
"comment"
|
|
1363
|
-
]).has(el.tag);
|
|
1363
|
+
])).has(el.tag);
|
|
1364
1364
|
}
|
|
1365
1365
|
function pad(indent) {
|
|
1366
1366
|
return " ".repeat(indent);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-litexml",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Bidirectional Lexical SerializedNode <-> XML conversion with plugin registry",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"lexical": "^0.
|
|
33
|
+
"lexical": "^0.46.0",
|
|
34
34
|
"linkedom": "^0.18.12",
|
|
35
|
-
"nanoid": "^5.1.
|
|
35
|
+
"nanoid": "^5.1.16"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"typescript": "^
|
|
39
|
-
"unplugin-dts": "^1.0.
|
|
40
|
-
"vite": "^8.0
|
|
38
|
+
"typescript": "^6.0.3",
|
|
39
|
+
"unplugin-dts": "^1.0.3",
|
|
40
|
+
"vite": "^8.1.0"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|