@jackuait/blok 0.6.0-beta.8 → 0.6.0-beta.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/dist/blok.mjs +2 -2
- package/dist/chunks/{blok-bzxy6Olq.mjs → blok-Bn6Q_o8h.mjs} +4 -4
- package/dist/chunks/{i18next-loader-CzL6YHyQ.mjs → i18next-loader-DjR4d8M7.mjs} +1 -1
- package/dist/chunks/{index-DSSrx_Co.mjs → index-oe38cp86.mjs} +1 -1
- package/dist/chunks/{inline-tool-convert-D4SXxjDd.mjs → inline-tool-convert-SRTkyaZn.mjs} +1 -1
- package/dist/full.mjs +2 -2
- package/dist/tools.mjs +7 -3
- package/package.json +1 -1
- package/src/tools/paragraph/index.ts +6 -2
package/dist/blok.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as s, v as a } from "./chunks/blok-
|
|
2
|
-
import { D as A } from "./chunks/inline-tool-convert-
|
|
1
|
+
import { B as s, v as a } from "./chunks/blok-Bn6Q_o8h.mjs";
|
|
2
|
+
import { D as A } from "./chunks/inline-tool-convert-SRTkyaZn.mjs";
|
|
3
3
|
export {
|
|
4
4
|
s as Blok,
|
|
5
5
|
A as DATA_ATTR,
|
|
@@ -20,7 +20,7 @@ var Eo = (s, t) => {
|
|
|
20
20
|
return e;
|
|
21
21
|
};
|
|
22
22
|
var Ie = (s, t, e) => Io(s, typeof t != "symbol" ? t + "" : t, e);
|
|
23
|
-
import { L as uo, l as C, c as Qi, i as z, a as k, S as w, D as y, t as O, b as I, P as G, E as yn, g as wt, d as tl, e as gr, f as $e, h as ot, j as A, k as le, m as Ut, n as kr, s as el, o as po, p as Bn, q as wn, r as T, u as Vo, v as hs, F as ae, w as Wo, x as ds, y as us, z as ut, A as ol, B as nl, C as sl, I as rl, G as Xo, H as Ke, J as ce, K as Mt, M as br, N as Ot, O as K, Q as Ht, R as il, T as ll, U as ps, V as al, W as cl, X as hl, Y as dl, Z as ul, _ as mr, $ as pl, a0 as yr, a1 as Br, a2 as Ct, a3 as fl, a4 as wr, a5 as vr, a6 as gl, a7 as kl, a8 as bl, a9 as ml, aa as yl, ab as Bl, ac as fs, ad as xr, ae as wl, af as vl, ag as xl, ah as Tl, ai as Sl, aj as Cl, ak as Il, al as El } from "./inline-tool-convert-
|
|
23
|
+
import { L as uo, l as C, c as Qi, i as z, a as k, S as w, D as y, t as O, b as I, P as G, E as yn, g as wt, d as tl, e as gr, f as $e, h as ot, j as A, k as le, m as Ut, n as kr, s as el, o as po, p as Bn, q as wn, r as T, u as Vo, v as hs, F as ae, w as Wo, x as ds, y as us, z as ut, A as ol, B as nl, C as sl, I as rl, G as Xo, H as Ke, J as ce, K as Mt, M as br, N as Ot, O as K, Q as Ht, R as il, T as ll, U as ps, V as al, W as cl, X as hl, Y as dl, Z as ul, _ as mr, $ as pl, a0 as yr, a1 as Br, a2 as Ct, a3 as fl, a4 as wr, a5 as vr, a6 as gl, a7 as kl, a8 as bl, a9 as ml, aa as yl, ab as Bl, ac as fs, ad as xr, ae as wl, af as vl, ag as xl, ah as Tl, ai as Sl, aj as Cl, ak as Il, al as El } from "./inline-tool-convert-SRTkyaZn.mjs";
|
|
24
24
|
function Ml(s) {
|
|
25
25
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
26
26
|
}
|
|
@@ -1797,7 +1797,7 @@ class ql {
|
|
|
1797
1797
|
* @returns {Promise<NotifierModule>} loaded notifier module
|
|
1798
1798
|
*/
|
|
1799
1799
|
loadNotifierModule() {
|
|
1800
|
-
return this.notifierModule !== null ? Promise.resolve(this.notifierModule) : (this.loadingPromise === null && (this.loadingPromise = import("./index-
|
|
1800
|
+
return this.notifierModule !== null ? Promise.resolve(this.notifierModule) : (this.loadingPromise === null && (this.loadingPromise = import("./index-oe38cp86.mjs").then((t) => {
|
|
1801
1801
|
const e = t;
|
|
1802
1802
|
if (!this.isNotifierModule(e))
|
|
1803
1803
|
throw new Error('notifier module does not expose a "show" method.');
|
|
@@ -13621,7 +13621,7 @@ class lu extends x {
|
|
|
13621
13621
|
async ensureI18nextLoaded(t, e) {
|
|
13622
13622
|
if (this.i18nextWrapper !== null)
|
|
13623
13623
|
return;
|
|
13624
|
-
const { loadI18next: o } = await import("./i18next-loader-
|
|
13624
|
+
const { loadI18next: o } = await import("./i18next-loader-DjR4d8M7.mjs");
|
|
13625
13625
|
this.i18nextWrapper = await o(t, e);
|
|
13626
13626
|
}
|
|
13627
13627
|
/**
|
|
@@ -13795,7 +13795,7 @@ class Se {
|
|
|
13795
13795
|
* Process paste of single Block tool content.
|
|
13796
13796
|
*/
|
|
13797
13797
|
async processSingleBlock(t, e) {
|
|
13798
|
-
const { Caret: o, BlockManager: n } = this.Blok, { currentBlock: r } = n, { Dom: i } = await import("./inline-tool-convert-
|
|
13798
|
+
const { Caret: o, BlockManager: n } = this.Blok, { currentBlock: r } = n, { Dom: i } = await import("./inline-tool-convert-SRTkyaZn.mjs").then((a) => a.aI), l = i;
|
|
13799
13799
|
if (!r || t.tool !== r.name || !l.containsOnlyInlineElements(t.content.innerHTML)) {
|
|
13800
13800
|
await this.insertBlock(t, e);
|
|
13801
13801
|
return;
|
|
@@ -278,7 +278,7 @@ const d = {
|
|
|
278
278
|
DELETE: 46
|
|
279
279
|
}, Ae = {
|
|
280
280
|
LEFT: 0
|
|
281
|
-
}, Se = 650, Wt = () => "0.6.0-beta.
|
|
281
|
+
}, Se = 650, Wt = () => "0.6.0-beta.9";
|
|
282
282
|
var Vt = /* @__PURE__ */ ((n) => (n.VERBOSE = "VERBOSE", n.INFO = "INFO", n.WARN = "WARN", n.ERROR = "ERROR", n))(Vt || {});
|
|
283
283
|
const V = (n, t, e = "log", o, s = "color: inherit") => {
|
|
284
284
|
const i = typeof console == "undefined" ? void 0 : console;
|
package/dist/full.mjs
CHANGED
|
@@ -12,8 +12,8 @@ var e = (a, l, o) => l in a ? n(a, l, { enumerable: !0, configurable: !0, writab
|
|
|
12
12
|
}, r = (a, l) => t(a, c(l));
|
|
13
13
|
import { Link as p, Italic as f, Bold as I, List as k, Header as u, Paragraph as B } from "./tools.mjs";
|
|
14
14
|
import { defaultBlockTools as v, defaultInlineTools as A } from "./tools.mjs";
|
|
15
|
-
import { B as H, v as P } from "./chunks/blok-
|
|
16
|
-
import { D as _ } from "./chunks/inline-tool-convert-
|
|
15
|
+
import { B as H, v as P } from "./chunks/blok-Bn6Q_o8h.mjs";
|
|
16
|
+
import { D as _ } from "./chunks/inline-tool-convert-SRTkyaZn.mjs";
|
|
17
17
|
const m = {
|
|
18
18
|
paragraph: {
|
|
19
19
|
class: B,
|
package/dist/tools.mjs
CHANGED
|
@@ -10,8 +10,8 @@ var Tt = (i, t, e) => t in i ? ke(i, t, { enumerable: !0, configurable: !0, writ
|
|
|
10
10
|
Le.call(t, e) && Tt(i, e, t[e]);
|
|
11
11
|
return i;
|
|
12
12
|
}, tt = (i, t) => xe(i, Te(t));
|
|
13
|
-
import { t as v, D as E, am as Be, an as Ie, _ as Ne, ao as De, ap as Pe, aq as He, ar as _e, as as Oe, at as Me, au as Qt, av as te, aw as ee, o as We, p as Rt, a5 as Lt, a3 as $e, ax as Ge, J as ne, Q as se, P as F, ay as qe, az as Fe, a0 as oe, aA as ze, aB as Ve, aC as Ue, aD as Ke, aE as je, z as P, aF as Xe, aG as Ye, S as et, aH as Ze, l as Je, a8 as Qe } from "./chunks/inline-tool-convert-
|
|
14
|
-
import { ab as xo } from "./chunks/inline-tool-convert-
|
|
13
|
+
import { t as v, D as E, am as Be, an as Ie, _ as Ne, ao as De, ap as Pe, aq as He, ar as _e, as as Oe, at as Me, au as Qt, av as te, aw as ee, o as We, p as Rt, a5 as Lt, a3 as $e, ax as Ge, J as ne, Q as se, P as F, ay as qe, az as Fe, a0 as oe, aA as ze, aB as Ve, aC as Ue, aD as Ke, aE as je, z as P, aF as Xe, aG as Ye, S as et, aH as Ze, l as Je, a8 as Qe } from "./chunks/inline-tool-convert-SRTkyaZn.mjs";
|
|
14
|
+
import { ab as xo } from "./chunks/inline-tool-convert-SRTkyaZn.mjs";
|
|
15
15
|
const ie = (i) => {
|
|
16
16
|
if (!i || !i.includes("data-blok-fake-background"))
|
|
17
17
|
return i;
|
|
@@ -194,7 +194,11 @@ const ie = (i) => {
|
|
|
194
194
|
static get sanitize() {
|
|
195
195
|
return {
|
|
196
196
|
text: {
|
|
197
|
-
br: !0
|
|
197
|
+
br: !0,
|
|
198
|
+
img: {
|
|
199
|
+
src: !0,
|
|
200
|
+
style: !0
|
|
201
|
+
}
|
|
198
202
|
}
|
|
199
203
|
};
|
|
200
204
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jackuait/blok",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.9",
|
|
4
4
|
"description": "Blok — headless, highly extensible rich text editor built for developers who need to implement a block-based editing experience (similar to Notion) without building it from scratch",
|
|
5
5
|
"module": "dist/blok.mjs",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
PasteEvent,
|
|
14
14
|
ToolboxConfig,
|
|
15
15
|
ConversionConfig,
|
|
16
|
-
|
|
16
|
+
ToolSanitizerConfig,
|
|
17
17
|
PasteConfig,
|
|
18
18
|
} from '../../../types';
|
|
19
19
|
import { DATA_ATTR } from '../../components/constants';
|
|
@@ -369,10 +369,14 @@ export class Paragraph implements BlockTool {
|
|
|
369
369
|
*
|
|
370
370
|
* @returns SanitizerConfig
|
|
371
371
|
*/
|
|
372
|
-
public static get sanitize():
|
|
372
|
+
public static get sanitize(): ToolSanitizerConfig {
|
|
373
373
|
return {
|
|
374
374
|
text: {
|
|
375
375
|
br: true,
|
|
376
|
+
img: {
|
|
377
|
+
src: true,
|
|
378
|
+
style: true,
|
|
379
|
+
},
|
|
376
380
|
},
|
|
377
381
|
};
|
|
378
382
|
}
|