@trafica/editor 1.0.41 → 1.0.43

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/index.js CHANGED
@@ -1417,6 +1417,14 @@ function getActiveBlockType(doc, selection) {
1417
1417
  const level = (_b = (_a = node.attrs) == null ? void 0 : _a.level) != null ? _b : 1;
1418
1418
  return `heading-${level}`;
1419
1419
  }
1420
+ if (type === "list_item" && depth > 0) {
1421
+ const parent = getNodeAtPath(doc, path.slice(0, depth - 1));
1422
+ if (parent && !isTextNode(parent)) {
1423
+ const pt = parent.type;
1424
+ if (pt === "bullet_list" || pt === "ordered_list") return pt;
1425
+ }
1426
+ }
1427
+ if (type === "check_list_item") return "check_list";
1420
1428
  return type;
1421
1429
  }
1422
1430
  }
@@ -4487,7 +4495,7 @@ function ChecklistButton({ engine }) {
4487
4495
  label: "\u2611",
4488
4496
  title: "Checklist (Ctrl+Shift+9)",
4489
4497
  onClick: () => toggleCheckList(engine),
4490
- isActive: activeBlock === "check_list_item",
4498
+ isActive: activeBlock === "check_list",
4491
4499
  icon: /* @__PURE__ */ jsxRuntime.jsx(ChecklistIcon, {})
4492
4500
  }
4493
4501
  );