@jackuait/blok 0.4.1-beta.14 → 0.4.1-beta.15

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 CHANGED
@@ -1,5 +1,5 @@
1
- import { B as s, v as a } from "./chunks/blok-CqdUPkVp.mjs";
2
- import { D as A } from "./chunks/inline-tool-convert-CmxgdS16.mjs";
1
+ import { B as s, v as a } from "./chunks/blok-CeuuGrRq.mjs";
2
+ import { D as A } from "./chunks/inline-tool-convert-D8zvXApV.mjs";
3
3
  export {
4
4
  s as Blok,
5
5
  A as DATA_ATTR,
@@ -19,7 +19,7 @@ var jt = (a, t) => {
19
19
  t.indexOf(o) < 0 && _e.call(a, o) && (e[o] = a[o]);
20
20
  return e;
21
21
  };
22
- import { i as N, g as $o, a as g, b as ve, c as E, l as I, S as y, d as jo, e as Yo, D as m, t as C, f as j, h as bo, P as O, j as Ht, k as V, m as A, n as Bt, o as ht, p as ko, q as nt, T as Yt, r as Ft, s as v, I as Vo, u as Xo, v as ct, w as oe, x as qo, y as Zo, z as Go, A as vo, B as Jo, C as Bo, E as wo, F as Qo, G as ze, H as tn, J as en, K as on, L as Be, M as Ue, N as nn, O as Ke, Q as We, R as sn, U as rn, V as an, W as ln, X as cn, Y as ne, Z as _t, _ as dn, $ as hn, a0 as un, a1 as $e, a2 as pn, a3 as fn, a4 as gn, a5 as mn, a6 as bn, a7 as kn, a8 as vn } from "./inline-tool-convert-CmxgdS16.mjs";
22
+ import { i as N, g as $o, a as g, b as ve, c as E, l as I, S as y, d as jo, e as Yo, D as m, t as C, f as j, h as bo, P as O, j as Ht, k as V, m as A, n as Bt, o as ht, p as ko, q as nt, T as Yt, r as Ft, s as v, I as Vo, u as Xo, v as ct, w as oe, x as qo, y as Zo, z as Go, A as vo, B as Jo, C as Bo, E as wo, F as Qo, G as ze, H as tn, J as en, K as on, L as Be, M as Ue, N as nn, O as Ke, Q as We, R as sn, U as rn, V as an, W as ln, X as cn, Y as ne, Z as _t, _ as dn, $ as hn, a0 as un, a1 as $e, a2 as pn, a3 as fn, a4 as gn, a5 as mn, a6 as bn, a7 as kn, a8 as vn } from "./inline-tool-convert-D8zvXApV.mjs";
23
23
  function Bn(a) {
24
24
  return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
25
25
  }
@@ -1471,7 +1471,7 @@ class Pn {
1471
1471
  * @returns {Promise<NotifierModule>} loaded notifier module
1472
1472
  */
1473
1473
  loadNotifierModule() {
1474
- return this.notifierModule !== null ? Promise.resolve(this.notifierModule) : (this.loadingPromise === null && (this.loadingPromise = import("./index-Bq6UT5hl.mjs").then((t) => {
1474
+ return this.notifierModule !== null ? Promise.resolve(this.notifierModule) : (this.loadingPromise === null && (this.loadingPromise = import("./index-CH3ZRv_X.mjs").then((t) => {
1475
1475
  const e = t;
1476
1476
  if (!this.isNotifierModule(e))
1477
1477
  throw new Error('notifier module does not expose a "show" method.');
@@ -6511,7 +6511,7 @@ class Ws extends T {
6511
6511
  async ensureI18nextLoaded(t, e) {
6512
6512
  if (this.i18nextWrapper !== null)
6513
6513
  return;
6514
- const { loadI18next: o } = await import("./i18next-loader-DGwfKvj7.mjs");
6514
+ const { loadI18next: o } = await import("./i18next-loader-Bb7mZZ5c.mjs");
6515
6515
  this.i18nextWrapper = await o(t, e);
6516
6516
  }
6517
6517
  /**
@@ -10894,7 +10894,7 @@ const ui = (a) => a.some((t) => t.items !== void 0 && t.items.length > 0), De =
10894
10894
  c && (o.push(po(s)), ki(s.id, n));
10895
10895
  }
10896
10896
  return o;
10897
- }, yi = (a, t) => a === "hierarchical" ? t === "legacy" : !1, xi = (a, t) => a === "legacy" || a === "auto" && t === "legacy";
10897
+ }, yi = (a, t) => t === "legacy" ? a !== "legacy" : !1, xi = (a, t) => a === "legacy" || a === "auto" && t === "legacy";
10898
10898
  class Ti extends T {
10899
10899
  constructor() {
10900
10900
  super(...arguments), this.detectedInputFormat = "flat";
@@ -1,4 +1,4 @@
1
- import { e as i } from "./blok-CqdUPkVp.mjs";
1
+ import { e as i } from "./blok-CeuuGrRq.mjs";
2
2
  const l = async (e, r) => {
3
3
  const n = (await import("./i18next-CugVlwWp.mjs")).default.createInstance(), s = {
4
4
  lng: e,
@@ -1,4 +1,4 @@
1
- import { t as f, q as i } from "./inline-tool-convert-CmxgdS16.mjs";
1
+ import { t as f, q as i } from "./inline-tool-convert-D8zvXApV.mjs";
2
2
  const a = {
3
3
  wrapper: i(
4
4
  "fixed z-[2] bottom-5 left-5",
@@ -18,7 +18,7 @@ let nt = (o = 21) => {
18
18
  return t;
19
19
  };
20
20
  var ot = /* @__PURE__ */ ((o) => (o.VERBOSE = "VERBOSE", o.INFO = "INFO", o.WARN = "WARN", o.ERROR = "ERROR", o))(ot || {});
21
- const rt = () => "0.4.1-beta.14", Ct = {
21
+ const rt = () => "0.4.1-beta.15", Ct = {
22
22
  BACKSPACE: 8,
23
23
  TAB: 9,
24
24
  ENTER: 13,
package/dist/full.mjs CHANGED
@@ -10,10 +10,10 @@ var e = (a, l, o) => l in a ? n(a, l, { enumerable: !0, configurable: !0, writab
10
10
  d.call(l, o) && e(a, o, l[o]);
11
11
  return a;
12
12
  }, r = (a, l) => t(a, c(l));
13
- import { B as v, v as A } from "./chunks/blok-CqdUPkVp.mjs";
13
+ import { B as v, v as A } from "./chunks/blok-CeuuGrRq.mjs";
14
14
  import { List as p, Header as f, Paragraph as I, Link as k, Italic as u, Bold as B } from "./tools.mjs";
15
15
  import { defaultBlockTools as H, defaultInlineTools as P } from "./tools.mjs";
16
- import { D as _ } from "./chunks/inline-tool-convert-CmxgdS16.mjs";
16
+ import { D as _ } from "./chunks/inline-tool-convert-D8zvXApV.mjs";
17
17
  const m = {
18
18
  paragraph: {
19
19
  class: I,
package/dist/tools.mjs CHANGED
@@ -10,8 +10,8 @@ var U = (f, t, e) => t in f ? nt(f, t, { enumerable: !0, configurable: !0, writa
10
10
  it.call(t, e) && U(f, e, t[e]);
11
11
  return f;
12
12
  }, P = (f, t) => rt(f, st(t));
13
- import { t as x, D as m, a9 as et, aa as at, ab as lt, A as ct, ac as dt, ad as ut, ae as ht, af as ft, ag as pt, ah as mt, ai as G, aj as j, ak as $, f as A, al as gt, am as Et, S as H, P as Tt, an as Ct, l as At, J as yt } from "./chunks/inline-tool-convert-CmxgdS16.mjs";
14
- import { a0 as Dt } from "./chunks/inline-tool-convert-CmxgdS16.mjs";
13
+ import { t as x, D as m, a9 as et, aa as at, ab as lt, A as ct, ac as dt, ad as ut, ae as ht, af as ft, ag as pt, ah as mt, ai as G, aj as j, ak as $, f as A, al as gt, am as Et, S as H, P as Tt, an as Ct, l as At, J as yt } from "./chunks/inline-tool-convert-D8zvXApV.mjs";
14
+ import { a0 as Dt } from "./chunks/inline-tool-convert-D8zvXApV.mjs";
15
15
  const W = [
16
16
  "empty:before:pointer-events-none",
17
17
  "empty:before:text-gray-text",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jackuait/blok",
3
- "version": "0.4.1-beta.14",
3
+ "version": "0.4.1-beta.15",
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",
@@ -123,7 +123,7 @@ const expandListItems = (
123
123
  const includeStart = style === 'ordered' && depth === 0 && index === 0 && start !== undefined && start !== 1;
124
124
 
125
125
  // Check if there are nested items (we'll get their IDs after pushing the parent)
126
- const hasNestedItems = item.items && item.items.length > 0;
126
+ const hasChildren = item.items && item.items.length > 0;
127
127
 
128
128
  // Create the list block (flat model - each item is a separate 'list' block)
129
129
  // We'll update with content IDs after processing children
@@ -145,7 +145,7 @@ const expandListItems = (
145
145
  blocks.push(itemBlock);
146
146
 
147
147
  // Now recursively expand nested items (they will be added after the parent)
148
- if (!hasNestedItems) {
148
+ if (!hasChildren) {
149
149
  return;
150
150
  }
151
151
 
@@ -377,11 +377,12 @@ export const shouldExpandToHierarchical = (
377
377
  dataModelConfig: 'legacy' | 'hierarchical' | 'auto',
378
378
  detectedFormat: DataFormatAnalysis['format']
379
379
  ): boolean => {
380
- if (dataModelConfig === 'hierarchical') {
381
- return detectedFormat === 'legacy';
380
+ // Always expand legacy format - each list item becomes a separate block
381
+ // This is required for the flat List tool model to render all items
382
+ if (detectedFormat === 'legacy') {
383
+ return dataModelConfig !== 'legacy';
382
384
  }
383
385
 
384
- // For 'auto' and 'legacy', don't expand
385
386
  return false;
386
387
  };
387
388