bridgerte 0.9.14 → 0.9.16

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/README.md CHANGED
@@ -10,6 +10,8 @@ React Native WebView 和 Flutter WebView 场景,内置 Lexical 编辑器、DOM
10
10
  `bridgerte/native-spec`、`bridgerte/bridge` 或 `bridgerte/webview` 导入能力,不需要额外安装
11
11
  Lexical 相关包,也不需要直接依赖仓库里的 `@bridgerte/*` 内部包。
12
12
 
13
+ 更新记录见仓库根目录的 `CHANGELOG.md`;npm README 只保留使用说明,不复制完整版本日志。
14
+
13
15
  这个包适合三类接入方式:
14
16
 
15
17
  - DOM 编辑器:直接在 Web、PC、H5 页面里创建富文本编辑器。
package/dist/dom.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BJAl_KEE.cjs"),t=require("./index-JS1zNkrD.cjs");exports.createFloatingLayer=e.createFloatingLayer;exports.createRichTextEditor=e.createRichTextEditor;exports.createWebViewBridgeRuntime=e.createWebViewBridgeRuntime;exports.createRichTextToolbar=t.createRichTextToolbar;exports.hasMeaningfulHtmlContent=t.hasMeaningfulHtmlContent;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CKIFd9T9.cjs"),t=require("./index-ClgxmJNW.cjs");exports.createFloatingLayer=e.createFloatingLayer;exports.createRichTextEditor=e.createRichTextEditor;exports.createWebViewBridgeRuntime=e.createWebViewBridgeRuntime;exports.createRichTextToolbar=t.createRichTextToolbar;exports.hasMeaningfulHtmlContent=t.hasMeaningfulHtmlContent;
2
2
  //# sourceMappingURL=dom.cjs.map
package/dist/dom.js CHANGED
@@ -1,5 +1,5 @@
1
- import { c as t, a as r, b as o } from "./index-9gETEdDG.js";
2
- import { c as i, h as n } from "./index-KfoBS_v8.js";
1
+ import { c as t, a as r, b as o } from "./index-09ZQ5n0I.js";
2
+ import { c as i, h as n } from "./index-PixgfP7_.js";
3
3
  export {
4
4
  t as createFloatingLayer,
5
5
  r as createRichTextEditor,
@@ -3,10 +3,10 @@ var rr = (e, t, n) => t in e ? nr(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var Oe = (e, t, n) => rr(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { BRIDGE_CONTENT_CHANGE_DEBOUNCE_MS as or, isBridgeMessage as ar, BRIDGE_HEIGHT_CHANGE_THROTTLE_MS as sr, defaultBridgeEventTiming as ir } from "./bridge.js";
5
5
  import { B as Ie, b as Qt, a as Zt } from "./index-CuNKUHed.js";
6
- import { DecoratorNode as en, $applyNodeReplacement as tt, $getRoot as H, $isElementNode as ge, $createParagraphNode as F, KEY_BACKSPACE_COMMAND as tn, COMMAND_PRIORITY_HIGH as se, KEY_DELETE_COMMAND as nn, DELETE_CHARACTER_COMMAND as rn, $getSelection as R, $isNodeSelection as lr, $isRangeSelection as D, TextNode as X, $isParagraphNode as cr, $insertNodes as V, FORMAT_ELEMENT_COMMAND as dr, $createTextNode as Re, FORMAT_TEXT_COMMAND as ur, REDO_COMMAND as mr, UNDO_COMMAND as gr, OUTDENT_CONTENT_COMMAND as hr, INDENT_CONTENT_COMMAND as pr, SKIP_SCROLL_INTO_VIEW_TAG as fr, $getNodeByKey as he, $setSelection as br, SELECTION_CHANGE_COMMAND as on, COMMAND_PRIORITY_LOW as j, KEY_ESCAPE_COMMAND as an, KEY_ARROW_DOWN_COMMAND as yr, KEY_ARROW_UP_COMMAND as vr, KEY_ENTER_COMMAND as wr, mergeRegister as sn, $getNearestNodeFromDOMNode as Cr, CAN_UNDO_COMMAND as _r, CAN_REDO_COMMAND as kr, createEditor as Er, CLEAR_HISTORY_COMMAND as xr } from "lexical";
6
+ import { DecoratorNode as en, $applyNodeReplacement as tt, $getRoot as H, $isElementNode as ge, $createParagraphNode as F, KEY_BACKSPACE_COMMAND as tn, COMMAND_PRIORITY_HIGH as se, KEY_DELETE_COMMAND as nn, DELETE_CHARACTER_COMMAND as rn, $getSelection as R, $isNodeSelection as lr, $isRangeSelection as D, TextNode as X, $isParagraphNode as cr, $insertNodes as W, FORMAT_ELEMENT_COMMAND as dr, $createTextNode as Re, FORMAT_TEXT_COMMAND as ur, REDO_COMMAND as mr, UNDO_COMMAND as gr, OUTDENT_CONTENT_COMMAND as hr, INDENT_CONTENT_COMMAND as pr, SKIP_SCROLL_INTO_VIEW_TAG as fr, $getNodeByKey as he, $setSelection as br, SELECTION_CHANGE_COMMAND as on, COMMAND_PRIORITY_LOW as j, KEY_ESCAPE_COMMAND as an, KEY_ARROW_DOWN_COMMAND as yr, KEY_ARROW_UP_COMMAND as vr, KEY_ENTER_COMMAND as wr, mergeRegister as sn, $getNearestNodeFromDOMNode as Cr, CAN_UNDO_COMMAND as _r, CAN_REDO_COMMAND as kr, createEditor as Er, CLEAR_HISTORY_COMMAND as xr } from "lexical";
7
7
  import { $isHeadingNode as Mr, $isQuoteNode as Tr, $createQuoteNode as Lr, $createHeadingNode as Nr, registerRichText as Sr, HeadingNode as Pr, QuoteNode as Ir } from "@lexical/rich-text";
8
8
  import { $isCodeNode as G, $createCodeNode as Rr, $isCodeHighlightNode as Ar, $createCodeHighlightNode as Br, CodeNode as ln, CodeHighlightNode as Dr } from "@lexical/code";
9
- import { $isListNode as Or, ListNode as cn, INSERT_CHECK_LIST_COMMAND as Hr, INSERT_UNORDERED_LIST_COMMAND as $r, INSERT_ORDERED_LIST_COMMAND as Fr, $isListItemNode as zr, registerList as Vr, registerCheckList as Wr, ListItemNode as Ur } from "@lexical/list";
9
+ import { $isListNode as Or, ListNode as cn, INSERT_CHECK_LIST_COMMAND as Hr, INSERT_UNORDERED_LIST_COMMAND as $r, INSERT_ORDERED_LIST_COMMAND as Fr, $isListItemNode as zr, registerList as Wr, registerCheckList as Vr, ListItemNode as Ur } from "@lexical/list";
10
10
  import { $isTableSelection as dn, $findTableNode as jr, $deleteTableColumnAtSelection as qr, $deleteTableRowAtSelection as Kr, $insertTableColumnAtSelection as Gr, $insertTableRowAtSelection as Xr, INSERT_TABLE_COMMAND as Yr, $findCellNode as Jr, TableNode as qe, $isTableRowNode as Qr, $isTableCellNode as Zr, registerTablePlugin as eo, TableRowNode as to, TableCellNode as no, setScrollableTablesActive as ro } from "@lexical/table";
11
11
  import { $isLinkNode as Te, $toggleLink as gt, formatUrl as oo, $createLinkNode as ao, registerAutoLink as so, createLinkMatcherWithRegExp as ht, LinkNode as io, AutoLinkNode as lo } from "@lexical/link";
12
12
  import { registerHistory as co, createEmptyHistoryState as uo } from "@lexical/history";
@@ -313,7 +313,7 @@ const Po = (e) => e.toJSON(), Io = (e) => {
313
313
  }, zo = (e) => {
314
314
  const t = Fo(e), n = e ? t == null ? void 0 : t.getPreviousSibling() : t == null ? void 0 : t.getNextSibling();
315
315
  return xn(n) ? n : null;
316
- }, Vo = (e, t) => {
316
+ }, Wo = (e, t) => {
317
317
  const n = (o) => {
318
318
  if (t()) return !1;
319
319
  const a = Ho() ?? zo(o);
@@ -364,7 +364,7 @@ class pe extends en {
364
364
  static importDOM() {
365
365
  return {
366
366
  hr: () => ({
367
- conversion: Wo,
367
+ conversion: Vo,
368
368
  priority: 0
369
369
  })
370
370
  };
@@ -386,7 +386,7 @@ class pe extends en {
386
386
  return !1;
387
387
  }
388
388
  }
389
- const Wo = (e) => ({
389
+ const Vo = (e) => ({
390
390
  node: rt()
391
391
  }), rt = () => tt(new pe()), Et = "bridgerte-mention", ot = "mention", Mn = (e) => e.label.startsWith("@") ? e.label : `@${e.label}`, Uo = (e) => {
392
392
  const t = document.createElement("span");
@@ -886,7 +886,7 @@ const jo = (e) => {
886
886
  mimeType: p.type || void 0,
887
887
  size: p.size
888
888
  }), I = F();
889
- R() || H().selectEnd(), V([P, I]), I.selectStart();
889
+ R() || H().selectEnd(), W([P, I]), I.selectStart();
890
890
  },
891
891
  { discrete: !0 }
892
892
  );
@@ -1090,13 +1090,13 @@ const jo = (e) => {
1090
1090
  insertDividerBlock: () => {
1091
1091
  e.update(() => {
1092
1092
  const c = F();
1093
- V([rt(), c]), c.selectStart();
1093
+ W([rt(), c]), c.selectStart();
1094
1094
  });
1095
1095
  },
1096
1096
  insertCodeBlock: (c) => {
1097
1097
  e.update(() => {
1098
1098
  const h = Ln(c), y = F();
1099
- V([h, y]), h.selectEnd();
1099
+ W([h, y]), h.selectEnd();
1100
1100
  });
1101
1101
  },
1102
1102
  setSelectedCodeBlockLanguage: (c) => {
@@ -1126,7 +1126,7 @@ const jo = (e) => {
1126
1126
  rel: "noreferrer noopener",
1127
1127
  target: "_blank"
1128
1128
  });
1129
- c.append(Re(d)), V([c]);
1129
+ c.append(Re(d)), W([c]);
1130
1130
  return;
1131
1131
  }
1132
1132
  gt(l, {
@@ -1158,13 +1158,13 @@ const jo = (e) => {
1158
1158
  insertImage: (s) => {
1159
1159
  s.url.trim() && e.update(() => {
1160
1160
  const l = F();
1161
- V([No(s), l]), l.selectStart();
1161
+ W([No(s), l]), l.selectStart();
1162
1162
  });
1163
1163
  },
1164
1164
  insertVideo: (s) => {
1165
1165
  s.url.trim() && e.update(() => {
1166
1166
  const l = F();
1167
- V([So(s), l]), l.selectStart();
1167
+ W([So(s), l]), l.selectStart();
1168
1168
  });
1169
1169
  },
1170
1170
  resizeMedia: (s) => {
@@ -1195,7 +1195,7 @@ const jo = (e) => {
1195
1195
  insertMention: (n) => {
1196
1196
  e.update(() => {
1197
1197
  const r = R();
1198
- D(r) && V([
1198
+ D(r) && W([
1199
1199
  at(n),
1200
1200
  Re(" ")
1201
1201
  ]);
@@ -1539,7 +1539,7 @@ const jo = (e) => {
1539
1539
  o(), w(m);
1540
1540
  }
1541
1541
  };
1542
- }, Be = "data-language", Nn = "纯文本", Fa = "language", za = /* @__PURE__ */ new Set(["plain", "plaintext", "text", "txt"]), Va = new Set(wo().map(([e]) => e)), Wa = [
1542
+ }, Be = "data-language", Nn = "纯文本", Fa = "language", za = /* @__PURE__ */ new Set(["plain", "plaintext", "text", "txt"]), Wa = new Set(wo().map(([e]) => e)), Va = [
1543
1543
  Be,
1544
1544
  "data-lang",
1545
1545
  "data-code-language",
@@ -1564,9 +1564,9 @@ const jo = (e) => {
1564
1564
  if (!t || !Ua.test(t)) return null;
1565
1565
  if (za.has(t)) return "";
1566
1566
  const n = Ka.get(t) ?? vo(t);
1567
- return Va.has(n) ? n : null;
1567
+ return Wa.has(n) ? n : null;
1568
1568
  }, Xa = (e) => {
1569
- for (const t of Wa) {
1569
+ for (const t of Va) {
1570
1570
  const n = te(e.getAttribute(t));
1571
1571
  if (n) return n;
1572
1572
  }
@@ -1814,7 +1814,7 @@ const os = (e) => "requestIdleCallback" in window ? {
1814
1814
  return;
1815
1815
  }
1816
1816
  window.clearTimeout(e);
1817
- }, W = (e, t = {}) => {
1817
+ }, V = (e, t = {}) => {
1818
1818
  let n = null;
1819
1819
  const r = (s) => {
1820
1820
  const l = n ?? e;
@@ -1908,7 +1908,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
1908
1908
  ys(f, o, g), v(f, u);
1909
1909
  return;
1910
1910
  }
1911
- const M = vs(o, g), S = W(M);
1911
+ const M = vs(o, g), S = V(M);
1912
1912
  M.dataset.lexicalKey = i, d.set(i, M), c.set(M, S), t.append(M), v(M, u);
1913
1913
  }, m = () => {
1914
1914
  s = null, d.forEach((i, u) => {
@@ -1931,7 +1931,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
1931
1931
  const M = document.createElement("div");
1932
1932
  a.content.replaceChildren(), a.element.style.minWidth = "180px", M.className = "bridgerte__code-block-menu-list", o.forEach((S) => {
1933
1933
  const A = document.createElement("button");
1934
- A.type = "button", A.className = "bridgerte__menu-item bridgerte__code-block-menu-item", A.textContent = S.label, W(A), A.addEventListener("pointerdown", (O) => {
1934
+ A.type = "button", A.className = "bridgerte__menu-item bridgerte__code-block-menu-item", A.textContent = S.label, V(A), A.addEventListener("pointerdown", (O) => {
1935
1935
  O.preventDefault();
1936
1936
  }), A.addEventListener("click", () => {
1937
1937
  y(), T(u, S.value);
@@ -2203,7 +2203,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2203
2203
  }
2204
2204
  h(i);
2205
2205
  }
2206
- const f = Os(u, e.defaultWidthPercent, e), M = W(f, {
2206
+ const f = Os(u, e.defaultWidthPercent, e), M = V(f, {
2207
2207
  targetSelector: `.${ce}`
2208
2208
  });
2209
2209
  f.dataset.lexicalKey = i, f.dataset.assetId = u.dataset.assetId, r.set(i, f), o.set(f, M), t.append(f), w(f, u);
@@ -2345,7 +2345,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2345
2345
  }, ze = (e) => {
2346
2346
  const t = $n(e) ?? zs(e);
2347
2347
  return t ? Je(t) : null;
2348
- }, Fn = (e) => Math.min(Math.max(e, 0), 1), Vs = ({ r: e, g: t, b: n }) => {
2348
+ }, Fn = (e) => Math.min(Math.max(e, 0), 1), Ws = ({ r: e, g: t, b: n }) => {
2349
2349
  const r = Z(e) / 255, o = Z(t) / 255, a = Z(n) / 255, s = Math.max(r, o, a), l = Math.min(r, o, a), d = s - l;
2350
2350
  let c = 0;
2351
2351
  return d !== 0 && (s === r ? c = 60 * ((o - a) / d % 6) : s === o ? c = 60 * ((a - r) / d + 2) : c = 60 * ((r - o) / d + 4)), {
@@ -2365,7 +2365,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2365
2365
  g: (l + a) * 255,
2366
2366
  b: (d + a) * 255
2367
2367
  };
2368
- }, Ws = ({ h: e, s: t }) => {
2368
+ }, Vs = ({ h: e, s: t }) => {
2369
2369
  const n = e * Math.PI / 180, r = Fn(t) * 50;
2370
2370
  return {
2371
2371
  x: 50 + Math.cos(n) * r,
@@ -2391,7 +2391,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2391
2391
  const r = zn(), o = document.createElement("div");
2392
2392
  return o.className = "bridgerte__payload-panel-option-list", e.options.forEach((a) => {
2393
2393
  const s = document.createElement("button");
2394
- s.type = "button", s.className = "bridgerte__payload-panel-option", s.textContent = a.label, s.dataset.bridgertePayloadOption = a.value, s.dataset.active = t[e.name] === a.value ? "true" : "false", W(s), s.addEventListener("pointerdown", (l) => {
2394
+ s.type = "button", s.className = "bridgerte__payload-panel-option", s.textContent = a.label, s.dataset.bridgertePayloadOption = a.value, s.dataset.active = t[e.name] === a.value ? "true" : "false", V(s), s.addEventListener("pointerdown", (l) => {
2395
2395
  l.preventDefault();
2396
2396
  }), s.addEventListener("click", () => {
2397
2397
  n({
@@ -2409,8 +2409,8 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2409
2409
  }, b = (m, p = !0) => {
2410
2410
  const k = ze(m);
2411
2411
  if (!k) return;
2412
- t[e.name] = k, d.style.background = k, y = Vs($n(k) ?? { r: 255, g: 255, b: 255 });
2413
- const _ = Ws(y);
2412
+ t[e.name] = k, d.style.background = k, y = Ws($n(k) ?? { r: 255, g: 255, b: 255 });
2413
+ const _ = Vs(y);
2414
2414
  a.dataset.active = p ? "true" : "false", d.dataset.empty = "false", p && (s.style.left = `${_.x}%`, s.style.top = `${_.y}%`);
2415
2415
  }, v = () => {
2416
2416
  const m = t[e.name];
@@ -2421,7 +2421,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2421
2421
  };
2422
2422
  r.className = "bridgerte__payload-panel-field", o.className = "bridgerte__payload-panel-color-picker", a.className = "bridgerte__payload-panel-color-wheel", a.setAttribute("aria-label", `${e.label}选择区域`), s.className = "bridgerte__payload-panel-color-wheel-handle", l.className = "bridgerte__payload-panel-color-actions", l.dataset.layout = h ? "sides" : "grid", d.className = "bridgerte__payload-panel-color-preview", d.dataset.empty = "true", a.append(s), c.forEach((m) => {
2423
2423
  const p = document.createElement("button"), k = m.value;
2424
- p.type = "button", p.className = "bridgerte__payload-panel-color-swatch", p.dataset.value = k, p.style.background = k, p.setAttribute("aria-label", `选择颜色 ${m.label}`), W(p), p.addEventListener("pointerdown", (_) => {
2424
+ p.type = "button", p.className = "bridgerte__payload-panel-color-swatch", p.dataset.value = k, p.style.background = k, p.setAttribute("aria-label", `选择颜色 ${m.label}`), V(p), p.addEventListener("pointerdown", (_) => {
2425
2425
  _.preventDefault();
2426
2426
  }), p.addEventListener("click", () => {
2427
2427
  b(k, !1), v();
@@ -2469,7 +2469,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2469
2469
  const r = document.createElement("div"), o = document.createElement("span"), a = (n == null ? void 0 : n(e)) ?? null;
2470
2470
  if (r.className = "bridgerte__payload-panel-title", o.textContent = e.panel.title, r.append(o), a) {
2471
2471
  const s = document.createElement("button");
2472
- s.type = "button", s.className = "bridgerte__payload-panel-clear", s.textContent = "清除", s.setAttribute("aria-label", `清除${e.panel.title}`), W(s), s.addEventListener("pointerdown", (l) => {
2472
+ s.type = "button", s.className = "bridgerte__payload-panel-clear", s.textContent = "清除", s.setAttribute("aria-label", `清除${e.panel.title}`), V(s), s.addEventListener("pointerdown", (l) => {
2473
2473
  l.preventDefault();
2474
2474
  }), s.addEventListener("click", () => {
2475
2475
  t(a);
@@ -2482,7 +2482,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2482
2482
  * 输入型面板保留默认宽度;table-insert 会按 schema 网格列数单独计算。
2483
2483
  */
2484
2484
  e === "font-size" || e === "font-family" || e === "line-height" ? "180px" : "220px"
2485
- ), ni = 3, ri = 3, oi = 10, Vn = 10, ai = 16, si = 2, ii = 24, li = () => {
2485
+ ), ni = 3, ri = 3, oi = 10, Wn = 10, ai = 16, si = 2, ii = 24, li = () => {
2486
2486
  var e;
2487
2487
  return typeof window < "u" && ((e = window.matchMedia) == null ? void 0 : e.call(window, "(hover: hover) and (pointer: fine)").matches) === !0;
2488
2488
  }, de = (e, t) => {
@@ -2499,7 +2499,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2499
2499
  max: l,
2500
2500
  defaultValue: c
2501
2501
  };
2502
- }, Wn = (e) => ({
2502
+ }, Vn = (e) => ({
2503
2503
  rows: $t(
2504
2504
  e,
2505
2505
  "rows",
@@ -2513,14 +2513,14 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2513
2513
  ri
2514
2514
  )
2515
2515
  }), di = (e) => {
2516
- const t = Math.min(e.cols.max, Vn);
2516
+ const t = Math.min(e.cols.max, Wn);
2517
2517
  return `${t * ai + Math.max(t - 1, 0) * si + ii}px`;
2518
2518
  }, ui = ({
2519
2519
  fields: e,
2520
2520
  values: t,
2521
2521
  onSubmit: n
2522
2522
  }) => {
2523
- const r = Wn(e), o = document.createElement("section"), a = document.createElement("div"), s = document.createElement("div"), l = [], d = li(), c = Math.min(r.rows.max, oi), h = Math.min(r.cols.max, Vn), y = {
2523
+ const r = Vn(e), o = document.createElement("section"), a = document.createElement("div"), s = document.createElement("div"), l = [], d = li(), c = Math.min(r.rows.max, oi), h = Math.min(r.cols.max, Wn), y = {
2524
2524
  ...r.rows,
2525
2525
  max: c,
2526
2526
  defaultValue: Math.min(r.rows.defaultValue, c)
@@ -2574,7 +2574,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2574
2574
  for (let L = 1; L <= c; L += 1)
2575
2575
  for (let C = 1; C <= h; C += 1) {
2576
2576
  const i = document.createElement("button");
2577
- i.type = "button", i.className = "bridgerte__payload-panel-table-cell", i.dataset.rows = String(L), i.dataset.cols = String(C), i.setAttribute("aria-label", `插入 ${L} 行 ${C} 列表格`), W(i), i.addEventListener("pointerdown", (u) => {
2577
+ i.type = "button", i.className = "bridgerte__payload-panel-table-cell", i.dataset.rows = String(L), i.dataset.cols = String(C), i.setAttribute("aria-label", `插入 ${L} 行 ${C} 列表格`), V(i), i.addEventListener("pointerdown", (u) => {
2578
2578
  v = i, p(i), u.preventDefault();
2579
2579
  }), i.addEventListener("pointerup", P), i.addEventListener("pointercancel", _), i.addEventListener("click", (u) => {
2580
2580
  I(u, i);
@@ -2592,7 +2592,7 @@ const bs = () => (Rt += 1, `${fs}-${Rt}`), ys = (e, t, n) => {
2592
2592
  let Ft = 0;
2593
2593
  const gi = () => (Ft += 1, `${mi}-${Ft}`), Ee = (e) => e.panel.id === "table-insert", hi = (e, t) => {
2594
2594
  const n = document.createElement("button");
2595
- return n.type = "button", n.className = "bridgerte__payload-panel-submit", n.textContent = "应用", W(n), n.addEventListener("pointerdown", (r) => {
2595
+ return n.type = "button", n.className = "bridgerte__payload-panel-submit", n.textContent = "应用", V(n), n.addEventListener("pointerdown", (r) => {
2596
2596
  r.preventDefault();
2597
2597
  }), n.addEventListener("click", () => {
2598
2598
  t(e);
@@ -2623,7 +2623,7 @@ const gi = () => (Ft += 1, `${mi}-${Ft}`), Ee = (e) => e.panel.id === "table-ins
2623
2623
  });
2624
2624
  }, l = (c) => {
2625
2625
  n = c.panel.fields.reduce((y, w) => (y[w.name] = Qs(w, c.currentValues), y), {});
2626
- const h = Ee(c) ? di(Wn(c.panel.fields)) : ti(c.panel.id);
2626
+ const h = Ee(c) ? di(Vn(c.panel.fields)) : ti(c.panel.id);
2627
2627
  r.element.style.width = `min(${h}, calc(100vw - 24px))`, r.content.append(ei(c, s, e.getClearCommand)), Ee(c) ? r.content.append(ui({
2628
2628
  fields: c.panel.fields,
2629
2629
  values: n,
@@ -2718,7 +2718,7 @@ const gi = () => (Ft += 1, `${mi}-${Ft}`), Ee = (e) => e.panel.id === "table-ins
2718
2718
  h(A, S);
2719
2719
  return;
2720
2720
  }
2721
- const O = xi(), U = W(O, {
2721
+ const O = xi(), U = V(O, {
2722
2722
  targetSelector: `.${ue}`
2723
2723
  });
2724
2724
  O.dataset.lexicalKey = g, r.set(g, O), o.set(O, U), t.append(O), h(O, S);
@@ -2986,8 +2986,8 @@ const qn = {
2986
2986
  "at-sign": '<svg aria-hidden="true" class="lucide lucide-at-sign" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="4" /> <path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8" /> </svg>',
2987
2987
  // 加粗菜单和 hoverbar 加粗按钮共用,表示 format.bold。
2988
2988
  bold: '<svg aria-hidden="true" class="lucide lucide-bold" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" /> </svg>',
2989
- // 字号菜单使用,表达大小写/字形敏感的文本尺寸设置。
2990
- "case-sensitive": '<svg aria-hidden="true" class="lucide lucide-case-sensitive" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16" /> <path d="M22 9v7" /> <path d="M3.304 13h6.392" /> <circle cx="18.5" cy="12.5" r="3.5" /> </svg>',
2989
+ // 字号菜单使用,表示 format.fontSize,baseline 三角+基线笔画粗细统一视觉一致。
2990
+ "case-sensitive": '<svg aria-hidden="true" class="lucide lucide-baseline" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M4 20h16" /> <path d="m6 16 6-12 6 12" /> <path d="M8 12h8" /> </svg>',
2991
2991
  // 行内代码菜单和 hoverbar 行内代码按钮共用,表示 format.inlineCode。
2992
2992
  code: '<svg aria-hidden="true" class="lucide lucide-code" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="m16 18 6-6-6-6" /> <path d="m8 6-6 6 6 6" /> </svg>',
2993
2993
  // 表格删除列入口使用,图形保持列方向,和 rows-minus 区分。
@@ -3023,7 +3023,7 @@ const qn = {
3023
3023
  // 全屏切换菜单使用,表示 fullscreen.toggle。
3024
3024
  maximize: '<svg aria-hidden="true" class="lucide lucide-maximize" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M8 3H5a2 2 0 0 0-2 2v3" /> <path d="M21 8V5a2 2 0 0 0-2-2h-3" /> <path d="M3 16v3a2 2 0 0 0 2 2h3" /> <path d="M16 21h3a2 2 0 0 0 2-2v-3" /> </svg>',
3025
3025
  // 分割线菜单使用,表示 block.divider。
3026
- minus: '<svg aria-hidden="true" class="lucide lucide-minus" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M5 12h14" /> </svg>',
3026
+ minus: '<svg aria-hidden="true" class="lucide lucide-separator-horizontal" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="m16 16-4 4-4-4" /> <path d="M3 12h18" /> <path d="m8 8 4-4 4 4" /> </svg>',
3027
3027
  // 背景色菜单使用,表示 format.backgroundColor。
3028
3028
  "paint-bucket": '<svg aria-hidden="true" class="lucide lucide-paint-bucket" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M11 7 6 2" /> <path d="M18.992 12H2.041" /> <path d="M21.145 18.38A3.34 3.34 0 0 1 20 16.5a3.3 3.3 0 0 1-1.145 1.88c-.575.46-.855 1.02-.855 1.595A2 2 0 0 0 20 22a2 2 0 0 0 2-2.025c0-.58-.285-1.13-.855-1.595" /> <path d="m8.5 4.5 2.148-2.148a1.205 1.205 0 0 1 1.704 0l7.296 7.296a1.205 1.205 0 0 1 0 1.704l-7.592 7.592a3.615 3.615 0 0 1-5.112 0l-3.888-3.888a3.615 3.615 0 0 1 0-5.112L5.67 7.33" /> </svg>',
3029
3029
  // 文字颜色菜单使用,表示 format.color。
@@ -3034,8 +3034,8 @@ const qn = {
3034
3034
  quote: '<svg aria-hidden="true" class="lucide lucide-quote" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" /> <path d="M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" /> </svg>',
3035
3035
  // 重做菜单使用,表示 history.redo。
3036
3036
  redo: '<svg aria-hidden="true" class="lucide lucide-redo" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M21 7v6h-6" /> <path d="M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" /> </svg>',
3037
- // 清除样式菜单和 hoverbar 清除样式按钮共用,表示 format.clear
3038
- "remove-formatting": '<svg aria-hidden="true" class="lucide lucide-remove-formatting" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M4 7V4h16v3" /> <path d="M5 20h6" /> <path d="M13 4 8 20" /> <path d="m15 15 5 5" /> <path d="m20 15-5 5" /> </svg>',
3037
+ // 清除样式菜单和 hoverbar 清除样式按钮共用,表示 format.clear
3038
+ "remove-formatting": '<svg aria-hidden="true" class="lucide lucide-eraser" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21" /> <path d="m5.082 11.09 8.828 8.828" /> </svg>',
3039
3039
  // 表格删除行入口使用,图形保持行方向,和 columns-minus 区分。
3040
3040
  "rows-minus": '<svg aria-hidden="true" class="lucide lucide-between-horizontal-end" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect width="13" height="7" x="3" y="3" rx="1" /> <path d="m22 15-3-3 3-3" /> <rect width="13" height="7" x="3" y="14" rx="1" /> </svg>',
3041
3041
  // 表格插入行入口使用,图形保持行方向,和 columns-plus 区分。
@@ -3052,8 +3052,8 @@ const qn = {
3052
3052
  "table-delete": '<svg aria-hidden="true" class="lucide lucide-table" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M12 3v18" /> <rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M3 9h18" /> <path d="M3 15h18" /> </svg>',
3053
3053
  // 插入表格菜单使用,表示 table.insert。
3054
3054
  table: '<svg aria-hidden="true" class="lucide lucide-table" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M12 3v18" /> <rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M3 9h18" /> <path d="M3 15h18" /> </svg>',
3055
- // 清空内容菜单使用,表示 content.clear,危险操作保持清理语义。
3056
- "trash-2": '<svg aria-hidden="true" class="lucide lucide-trash-2" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M10 11v6" /> <path d="M14 11v6" /> <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /> <path d="M3 6h18" /> <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /> </svg>',
3055
+ // 清空内容菜单使用,表示 content.clear
3056
+ "trash-2": '<svg aria-hidden="true" class="lucide lucide-trash" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /> <path d="M3 6h18" /> <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /> </svg>',
3057
3057
  // 字体菜单使用,表示 format.fontFamily。
3058
3058
  type: '<svg aria-hidden="true" class="lucide lucide-type" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M12 4v16" /> <path d="M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" /> <path d="M9 20h6" /> </svg>',
3059
3059
  // 下划线菜单和 hoverbar 下划线按钮共用,表示 format.underline。
@@ -3063,7 +3063,7 @@ const qn = {
3063
3063
  // 上传图片菜单使用,和 upload-video 分开,避免媒体类型在原生侧混淆。
3064
3064
  "upload-image": '<svg aria-hidden="true" class="lucide lucide-image" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect width="18" height="18" x="3" y="3" rx="2" ry="2" /> <circle cx="9" cy="9" r="2" /> <path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /> </svg>',
3065
3065
  // 上传视频菜单使用,和 upload-image 分开,避免媒体类型在原生侧混淆。
3066
- "upload-video": '<svg aria-hidden="true" class="lucide lucide-video" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" /> <rect x="2" y="6" width="14" height="12" rx="2" /> </svg>',
3066
+ "upload-video": '<svg aria-hidden="true" class="lucide lucide-film" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M7 3v18" /> <path d="M3 7.5h4" /> <path d="M3 12h18" /> <path d="M3 16.5h4" /> <path d="M17 3v18" /> <path d="M17 7.5h4" /> <path d="M17 16.5h4" /> </svg>',
3067
3067
  // 行高菜单使用,表示 format.lineHeight。
3068
3068
  "wrap-text": '<svg aria-hidden="true" class="lucide lucide-wrap-text" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="m16 16-3 3 3 3" /> <path d="M3 12h14.5a1 1 0 0 1 0 7H13" /> <path d="M3 19h6" /> <path d="M3 5h18" /> </svg>'
3069
3069
  }, Fi = (e) => {
@@ -3078,7 +3078,7 @@ const qn = {
3078
3078
  }, Qe = () => {
3079
3079
  const e = window.getSelection(), t = e != null && e.rangeCount ? e.getRangeAt(0) : null, n = t == null ? void 0 : t.getBoundingClientRect();
3080
3080
  return !n || n.width === 0 && n.height === 0 ? null : n;
3081
- }, zi = 160, Vi = {
3081
+ }, zi = 160, Wi = {
3082
3082
  toolbarKeys: [
3083
3083
  "bold",
3084
3084
  "italic",
@@ -3093,10 +3093,10 @@ const qn = {
3093
3093
  "font-family",
3094
3094
  "line-height"
3095
3095
  ]
3096
- }, Wi = () => {
3096
+ }, Vi = () => {
3097
3097
  const e = R();
3098
3098
  return D(e) && !e.isCollapsed();
3099
- }, Vt = (e, t) => e.target instanceof Node && t.contains(e.target), Wt = (e) => e instanceof Element ? e.closest(".bridgerte__hoverbar-button") : null, Ui = (e) => e.flatMap((t) => t.type === "button" ? [t.item] : t.type === "group" ? t.items : []), ji = (e) => {
3099
+ }, Wt = (e, t) => e.target instanceof Node && t.contains(e.target), Vt = (e) => e instanceof Element ? e.closest(".bridgerte__hoverbar-button") : null, Ui = (e) => e.flatMap((t) => t.type === "button" ? [t.item] : t.type === "group" ? t.items : []), ji = (e) => {
3100
3100
  const t = document.createElement("span");
3101
3101
  return t.className = "bridgerte__hoverbar-separator", t.dataset.separatorId = e.key, t.setAttribute("aria-hidden", "true"), t;
3102
3102
  }, qi = (e, t, n) => {
@@ -3119,9 +3119,9 @@ const qn = {
3119
3119
  const w = it(l ?? Ae, {
3120
3120
  menuLabels: c,
3121
3121
  payloadPanelConfig: h
3122
- }), T = nt(d ?? Vi, w), b = Ui(T), v = document.createElement("span"), x = document.createElement("div");
3122
+ }), T = nt(d ?? Wi, w), b = Ui(T), v = document.createElement("span"), x = document.createElement("div");
3123
3123
  let m = null, p = !1, k = null;
3124
- const _ = W(x, {
3124
+ const _ = V(x, {
3125
3125
  targetSelector: ".bridgerte__hoverbar-button"
3126
3126
  });
3127
3127
  v.className = "bridgerte__hoverbar-anchor", v.setAttribute("aria-hidden", "true"), x.className = "bridgerte__floating-menu bridgerte__hoverbar", x.setAttribute("role", "toolbar"), x.setAttribute("aria-label", "BridgeRTE hoverbar"), e.append(v, x), m = jn(v, x, {
@@ -3139,7 +3139,7 @@ const qn = {
3139
3139
  }, C = () => {
3140
3140
  const N = s();
3141
3141
  x.replaceChildren(...T.flatMap((E) => E.type === "separator" ? [ji(E)] : (E.type === "button" ? [E.item] : E.items).map(($) => qi($, N, y)))), L(), p = !0, x.dataset.visible = "true", m == null || m.setOpen(!0), m == null || m.update();
3142
- }, i = () => r() ? !1 : n.getEditorState().read(Wi), u = (N = !1) => {
3142
+ }, i = () => r() ? !1 : n.getEditorState().read(Vi), u = (N = !1) => {
3143
3143
  if (P(), !i()) {
3144
3144
  I();
3145
3145
  return;
@@ -3173,12 +3173,12 @@ const qn = {
3173
3173
  o(E.command), u(!0);
3174
3174
  }
3175
3175
  }, f = (N) => {
3176
- Wt(N.target) && N.preventDefault();
3176
+ Vt(N.target) && N.preventDefault();
3177
3177
  }, M = (N) => {
3178
- const E = Wt(N.target);
3178
+ const E = Vt(N.target);
3179
3179
  E && (N.preventDefault(), g(E));
3180
3180
  }, S = (N) => {
3181
- !p || Vt(N, x) || Vt(N, t) || I();
3181
+ !p || Wt(N, x) || Wt(N, t) || I();
3182
3182
  }, A = n.registerCommand(
3183
3183
  on,
3184
3184
  () => (u(), !1),
@@ -3267,7 +3267,7 @@ const qn = {
3267
3267
  onSelect: T
3268
3268
  }) => {
3269
3269
  let b = null, v = 0;
3270
- const x = W(o, {
3270
+ const x = V(o, {
3271
3271
  targetSelector: s
3272
3272
  }), m = jn(a, o, {
3273
3273
  placement: "bottom-start",
@@ -3770,7 +3770,7 @@ const qn = {
3770
3770
  const n = jt.get(t.tagName);
3771
3771
  n && dt(t, n);
3772
3772
  });
3773
- }, Vl = (e) => {
3773
+ }, Wl = (e) => {
3774
3774
  [...e.querySelectorAll("div")].reverse().forEach((t) => {
3775
3775
  if (t.querySelector(Ll)) {
3776
3776
  ct(t);
@@ -3778,7 +3778,7 @@ const qn = {
3778
3778
  }
3779
3779
  dt(t, "p");
3780
3780
  });
3781
- }, Wl = (e) => {
3781
+ }, Vl = (e) => {
3782
3782
  [...e.querySelectorAll("span")].forEach((t) => {
3783
3783
  t.attributes.length === 0 && ct(t);
3784
3784
  });
@@ -3816,7 +3816,7 @@ const qn = {
3816
3816
  r.remove();
3817
3817
  }), t.content.querySelectorAll(El).forEach((r) => {
3818
3818
  r.remove();
3819
- }), Yn(t.content), Ja(t.content), [...t.content.querySelectorAll("*")].forEach($l), Jn(t.content), Fl(t.content), zl(t.content), Vl(t.content), Wl(t.content), qt(t.content);
3819
+ }), Yn(t.content), Ja(t.content), [...t.content.querySelectorAll("*")].forEach($l), Jn(t.content), Fl(t.content), zl(t.content), Wl(t.content), Vl(t.content), qt(t.content);
3820
3820
  const n = document.createElement("div");
3821
3821
  return n.append(t.content.cloneNode(!0)), ql(n), qt(n), n.innerHTML;
3822
3822
  }, Gl = /^https?:\/\/[^\s<>"']+\.[^\s<>"']+$/i, Xl = /^www\.[^\s<>"']+\.[^\s<>"']+$/i, Yl = new RegExp(
@@ -3870,9 +3870,9 @@ const qn = {
3870
3870
  mn(o);
3871
3871
  });
3872
3872
  const r = n[n.length - 1];
3873
- return r && G(r) && V([F()]), !0;
3873
+ return r && G(r) && W([F()]), !0;
3874
3874
  }
3875
- return V(n), !0;
3875
+ return W(n), !0;
3876
3876
  }, ac = (e, {
3877
3877
  editor: t,
3878
3878
  isReadonly: n
@@ -3891,13 +3891,13 @@ const qn = {
3891
3891
  const r = tc(e.text);
3892
3892
  return r ? (t.update(() => {
3893
3893
  const o = Ln(r.language || void 0), a = F();
3894
- R() || H().selectEnd(), o.append(Re(r.code)), mn(o), V([a]), a.selectStart();
3894
+ R() || H().selectEnd(), o.append(Re(r.code)), mn(o), W([a]), a.selectStart();
3895
3895
  }), !0) : !1;
3896
3896
  }, ic = (e, {
3897
3897
  editor: t,
3898
3898
  isReadonly: n
3899
3899
  }) => n() || e.html.trim() || !e.text ? !1 : (t.update(() => {
3900
- R() || H().selectEnd(), V([Re(e.text)]);
3900
+ R() || H().selectEnd(), W([Re(e.text)]);
3901
3901
  }), !0), er = (e, t) => sc(e, t) || ac(e, t), ee = (e) => {
3902
3902
  e.preventDefault(), e.stopImmediatePropagation();
3903
3903
  }, lc = (e, t) => et(e, t) || Zn(e, t) || er(e, t), cc = (e) => {
@@ -4159,10 +4159,10 @@ const qn = {
4159
4159
  o(i.command);
4160
4160
  }
4161
4161
  }).destroy;
4162
- }, Xt = 32, Ve = (e) => {
4162
+ }, Xt = 32, We = (e) => {
4163
4163
  var t;
4164
4164
  return e instanceof HTMLElement && e.getAttribute("role") === "checkbox" && ((t = e.parentElement) == null ? void 0 : t.classList.contains("bridgerte__list--todo")) === !0;
4165
- }, We = (e) => e instanceof HTMLElement ? e.closest('[role="checkbox"]') : null, Ac = (e) => Cr(e), Yt = (e) => e.button === 0, Ue = (e, t) => {
4165
+ }, Ve = (e) => e instanceof HTMLElement ? e.closest('[role="checkbox"]') : null, Ac = (e) => Cr(e), Yt = (e) => e.button === 0, Ue = (e, t) => {
4166
4166
  const n = t.getBoundingClientRect();
4167
4167
  return t.dir === "rtl" ? e.clientX >= n.right - Xt && e.clientX <= n.right : e.clientX >= n.left && e.clientX <= n.left + Xt;
4168
4168
  }, Jt = (e) => {
@@ -4175,8 +4175,8 @@ const qn = {
4175
4175
  let r = 0;
4176
4176
  const o = (d) => {
4177
4177
  if (n() || !Yt(d)) return;
4178
- const c = We(d.target);
4179
- !c || !Ve(c) || Ue(d, c) && Jt(d);
4178
+ const c = Ve(d.target);
4179
+ !c || !We(c) || Ue(d, c) && Jt(d);
4180
4180
  }, a = (d, c) => {
4181
4181
  Jt(d), t.update(() => {
4182
4182
  const h = Ac(c);
@@ -4184,12 +4184,12 @@ const qn = {
4184
4184
  });
4185
4185
  }, s = (d) => {
4186
4186
  if (n() || !Yt(d) || Date.now() - r < 700) return;
4187
- const c = We(d.target);
4188
- !c || !Ve(c) || Ue(d, c) && a(d, c);
4187
+ const c = Ve(d.target);
4188
+ !c || !We(c) || Ue(d, c) && a(d, c);
4189
4189
  }, l = (d) => {
4190
4190
  if (n() || d.pointerType !== "touch") return;
4191
- const c = We(d.target);
4192
- !c || !Ve(c) || Ue(d, c) && (r = Date.now(), a(d, c));
4191
+ const c = Ve(d.target);
4192
+ !c || !We(c) || Ue(d, c) && (r = Date.now(), a(d, c));
4193
4193
  };
4194
4194
  return e.addEventListener("pointerdown", o, !0), e.addEventListener("pointerup", l, !0), e.addEventListener("click", s, !0), () => {
4195
4195
  e.removeEventListener("pointerdown", o, !0), e.removeEventListener("pointerup", l, !0), e.removeEventListener("click", s, !0);
@@ -4268,9 +4268,9 @@ const qn = {
4268
4268
  */
4269
4269
  ko(t, ns),
4270
4270
  co(t, o, Oa),
4271
- Vr(t),
4272
4271
  Wr(t),
4273
- ...Vo(t, a),
4272
+ Vr(t),
4273
+ ...Wo(t, a),
4274
4274
  Bc({
4275
4275
  contentElement: r,
4276
4276
  editor: t,
@@ -4701,9 +4701,9 @@ export {
4701
4701
  jn as c,
4702
4702
  qn as d,
4703
4703
  Kn as e,
4704
- W as f,
4704
+ V as f,
4705
4705
  _s as g,
4706
4706
  Cs as h,
4707
4707
  it as r
4708
4708
  };
4709
- //# sourceMappingURL=index-9gETEdDG.js.map
4709
+ //# sourceMappingURL=index-09ZQ5n0I.js.map