@bloklabs/cli 1.2.6 → 1.3.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/{block-builder-B_eFe3eS.mjs → block-builder-BhbHyKmd.mjs} +7 -7
- package/dist/cli.mjs +2 -2
- package/dist/{convert-gdocs-CBRViTQf.mjs → convert-gdocs-D8zi-ZHD.mjs} +7 -5
- package/dist/{convert-gdocs-C7bb5QW_.mjs → convert-gdocs-DhqPnu2C.mjs} +8 -6
- package/dist/{convert-html-GFOTARll.mjs → convert-html-CtLOMx8H.mjs} +2 -2
- package/dist/{convert-html-C_XAR-3k.mjs → convert-html-lcE4WDun.mjs} +1 -1
- package/package.json +3 -3
|
@@ -381,11 +381,11 @@ var M = {
|
|
|
381
381
|
STRONG: !0,
|
|
382
382
|
I: !0,
|
|
383
383
|
EM: !0,
|
|
384
|
-
A: new Set(["href"]),
|
|
384
|
+
A: /* @__PURE__ */ new Set(["href"]),
|
|
385
385
|
S: !0,
|
|
386
386
|
U: !0,
|
|
387
387
|
CODE: !0,
|
|
388
|
-
MARK: new Set(["style"]),
|
|
388
|
+
MARK: /* @__PURE__ */ new Set(["style"]),
|
|
389
389
|
BR: !0,
|
|
390
390
|
P: !0,
|
|
391
391
|
H1: !0,
|
|
@@ -396,20 +396,20 @@ var M = {
|
|
|
396
396
|
H6: !0,
|
|
397
397
|
UL: !0,
|
|
398
398
|
OL: !0,
|
|
399
|
-
LI: new Set(["aria-level"]),
|
|
399
|
+
LI: /* @__PURE__ */ new Set(["aria-level"]),
|
|
400
400
|
TABLE: !0,
|
|
401
401
|
THEAD: !0,
|
|
402
402
|
TBODY: !0,
|
|
403
403
|
TR: !0,
|
|
404
|
-
TD: new Set(["style"]),
|
|
405
|
-
TH: new Set(["style"]),
|
|
404
|
+
TD: /* @__PURE__ */ new Set(["style"]),
|
|
405
|
+
TH: /* @__PURE__ */ new Set(["style"]),
|
|
406
406
|
BLOCKQUOTE: !0,
|
|
407
407
|
PRE: !0,
|
|
408
408
|
HR: !0,
|
|
409
|
-
ASIDE: new Set(["style"]),
|
|
409
|
+
ASIDE: /* @__PURE__ */ new Set(["style"]),
|
|
410
410
|
DETAILS: !0,
|
|
411
411
|
SUMMARY: !0,
|
|
412
|
-
IMG: new Set(["src", "style"])
|
|
412
|
+
IMG: /* @__PURE__ */ new Set(["src", "style"])
|
|
413
413
|
};
|
|
414
414
|
function N(e) {
|
|
415
415
|
I(e);
|
package/dist/cli.mjs
CHANGED
|
@@ -41,14 +41,14 @@ var t = "# Migrating from EditorJS to Blok\n\nThis guide covers the breaking cha
|
|
|
41
41
|
case "convert-html": {
|
|
42
42
|
let e = new (await (import("jsdom"))).JSDOM("");
|
|
43
43
|
globalThis.DOMParser = e.window.DOMParser, globalThis.Node = e.window.Node;
|
|
44
|
-
let { convertHtml: t } = await import("./convert-html-
|
|
44
|
+
let { convertHtml: t } = await import("./convert-html-CtLOMx8H.mjs");
|
|
45
45
|
r(t((await import("node:fs")).readFileSync("/dev/stdin", "utf-8")), s);
|
|
46
46
|
break;
|
|
47
47
|
}
|
|
48
48
|
case "convert-gdocs": {
|
|
49
49
|
let e = new (await (import("jsdom"))).JSDOM("");
|
|
50
50
|
globalThis.DOMParser = e.window.DOMParser, globalThis.Node = e.window.Node, globalThis.document = e.window.document;
|
|
51
|
-
let { convertGdocs: t } = await import("./convert-gdocs-
|
|
51
|
+
let { convertGdocs: t } = await import("./convert-gdocs-DhqPnu2C.mjs");
|
|
52
52
|
r(t((await import("node:fs")).readFileSync("/dev/stdin", "utf-8")), s);
|
|
53
53
|
break;
|
|
54
54
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./block-builder-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./block-builder-BhbHyKmd.mjs";
|
|
2
2
|
//#region src/components/modules/paste/constants.ts
|
|
3
3
|
var o = "data-blok-columns-candidate";
|
|
4
4
|
//#endregion
|
|
@@ -32,16 +32,18 @@ function d(e, t) {
|
|
|
32
32
|
after: i
|
|
33
33
|
};
|
|
34
34
|
let a = e.parentElement;
|
|
35
|
-
|
|
35
|
+
if (a === null) return {
|
|
36
36
|
before: r,
|
|
37
37
|
after: i
|
|
38
|
-
}
|
|
38
|
+
};
|
|
39
|
+
let o = l(a, e, r), s = u(a, e, i);
|
|
40
|
+
return n(a, o, s);
|
|
39
41
|
};
|
|
40
42
|
return n(e, null, null);
|
|
41
43
|
}
|
|
42
44
|
function f(e, t) {
|
|
43
45
|
let n = e.parentElement;
|
|
44
|
-
return n === null || n === t ? !1 : n.tagName === "TABLE"
|
|
46
|
+
return n === null || n === t ? !1 : n.tagName === "TABLE" || f(n, t);
|
|
45
47
|
}
|
|
46
48
|
function p(e) {
|
|
47
49
|
let t = Array.from(e.querySelectorAll("img"));
|
|
@@ -113,7 +115,7 @@ function S(e, n, r, i, a) {
|
|
|
113
115
|
let o = n && i !== void 0 ? t(i, "text") : "", s = r && a !== void 0 ? t(a, "bg") : "", c = [n ? `color: ${o}` : "", h(r, n, s)].filter(Boolean).join("; ");
|
|
114
116
|
return c ? `<mark style="${c};">${e}</mark>` : e;
|
|
115
117
|
}
|
|
116
|
-
var C = new Set([
|
|
118
|
+
var C = /* @__PURE__ */ new Set([
|
|
117
119
|
"H1",
|
|
118
120
|
"H2",
|
|
119
121
|
"H3",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./block-builder-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./block-builder-BhbHyKmd.mjs";
|
|
2
2
|
//#region src/components/modules/paste/constants.ts
|
|
3
3
|
var o = "data-blok-columns-candidate";
|
|
4
4
|
//#endregion
|
|
@@ -32,16 +32,18 @@ function d(e, t) {
|
|
|
32
32
|
after: i
|
|
33
33
|
};
|
|
34
34
|
let a = e.parentElement;
|
|
35
|
-
|
|
35
|
+
if (a === null) return {
|
|
36
36
|
before: r,
|
|
37
37
|
after: i
|
|
38
|
-
}
|
|
38
|
+
};
|
|
39
|
+
let o = l(a, e, r), s = u(a, e, i);
|
|
40
|
+
return n(a, o, s);
|
|
39
41
|
};
|
|
40
42
|
return n(e, null, null);
|
|
41
43
|
}
|
|
42
44
|
function f(e, t) {
|
|
43
45
|
let n = e.parentElement;
|
|
44
|
-
return n === null || n === t ? !1 : n.tagName === "TABLE"
|
|
46
|
+
return n === null || n === t ? !1 : n.tagName === "TABLE" || f(n, t);
|
|
45
47
|
}
|
|
46
48
|
function p(e) {
|
|
47
49
|
let t = Array.from(e.querySelectorAll("img"));
|
|
@@ -113,7 +115,7 @@ function S(e, n, r, i, a) {
|
|
|
113
115
|
let o = n && i !== void 0 ? t(i, "text") : "", s = r && a !== void 0 ? t(a, "bg") : "", c = [n ? `color: ${o}` : "", h(r, n, s)].filter(Boolean).join("; ");
|
|
114
116
|
return c ? `<mark style="${c};">${e}</mark>` : e;
|
|
115
117
|
}
|
|
116
|
-
var C = new Set([
|
|
118
|
+
var C = /* @__PURE__ */ new Set([
|
|
117
119
|
"H1",
|
|
118
120
|
"H2",
|
|
119
121
|
"H3",
|
|
@@ -171,7 +173,7 @@ function A(e) {
|
|
|
171
173
|
let t = s(e), r = new DOMParser().parseFromString(t, "text/html").body;
|
|
172
174
|
i(r), n(r);
|
|
173
175
|
let o = {
|
|
174
|
-
version: "1.
|
|
176
|
+
version: "1.3.0",
|
|
175
177
|
blocks: a(r)
|
|
176
178
|
};
|
|
177
179
|
return JSON.stringify(o);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./block-builder-
|
|
1
|
+
import { n as e, r as t, t as n } from "./block-builder-BhbHyKmd.mjs";
|
|
2
2
|
//#region src/cli/commands/convert-html/index.ts
|
|
3
3
|
function r(r) {
|
|
4
4
|
let i = new DOMParser().parseFromString(r, "text/html").body;
|
|
5
5
|
t(i), e(i);
|
|
6
6
|
let a = {
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.3.0",
|
|
8
8
|
blocks: n(i)
|
|
9
9
|
};
|
|
10
10
|
return JSON.stringify(a);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./block-builder-
|
|
1
|
+
import { n as e, r as t, t as n } from "./block-builder-BhbHyKmd.mjs";
|
|
2
2
|
//#region src/cli/commands/convert-html/index.ts
|
|
3
3
|
function r(r) {
|
|
4
4
|
let i = new DOMParser().parseFromString(r, "text/html").body;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloklabs/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "CLI tools for Blok — convert HTML to Blok JSON, generate migration guides",
|
|
5
5
|
"bin": {
|
|
6
6
|
"blok-cli": "bin/blok-cli.mjs"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": "
|
|
13
|
+
"node": "^20.19.0 || ^22.13.0 || >=24.0.0"
|
|
14
14
|
},
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
"directory": "packages/cli"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"jsdom": "
|
|
34
|
+
"jsdom": "29.1.1"
|
|
35
35
|
}
|
|
36
36
|
}
|