@inpageedit/core 0.6.0 → 0.8.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.
Files changed (81) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +55 -55
  3. package/dist/ActionButton-BgbTKTg7.js.map +1 -1
  4. package/dist/CheckBox-D3rHnX7I.js.map +1 -1
  5. package/dist/IconQuickEdit-YVn1ANbm.js +27 -0
  6. package/dist/IconQuickEdit-YVn1ANbm.js.map +1 -0
  7. package/dist/InPageEdit.d.ts +7 -5
  8. package/dist/InputBox-BV4m05Xs.js.map +1 -1
  9. package/dist/Preferences-Bg3J5Ur9.js.map +1 -1
  10. package/dist/RadioBox-nJqWsxW2.js.map +1 -1
  11. package/dist/__test__/utils/constants.d.ts +1 -1
  12. package/dist/components/Icon/IconEdit.d.ts +2 -0
  13. package/dist/components/Icon/IconQuickEdit.d.ts +2 -0
  14. package/dist/components/MwUserLinks.d.ts +2 -0
  15. package/dist/components/index.js.map +1 -1
  16. package/dist/index--xn9BebC.js +1257 -0
  17. package/dist/{index-5zB57uWM.js.map → index--xn9BebC.js.map} +1 -1
  18. package/dist/{index-SDBp__LY.js → index-BT1mN_St.js} +68 -65
  19. package/dist/{index-SDBp__LY.js.map → index-BT1mN_St.js.map} +1 -1
  20. package/dist/index-Bh70Udzi.js.map +1 -1
  21. package/dist/index-C0V2s48o.js +122 -0
  22. package/dist/index-C0V2s48o.js.map +1 -0
  23. package/dist/index-CvhkVj_L.js.map +1 -1
  24. package/dist/{index-clwjxJi5.js → index-DDWds9Jg.js} +77 -74
  25. package/dist/index-DDWds9Jg.js.map +1 -0
  26. package/dist/index-DDef1ojx.js +166 -0
  27. package/dist/index-DDef1ojx.js.map +1 -0
  28. package/dist/{index-BqqQgaGG.js → index-DTA86mHU.js} +5 -4
  29. package/dist/index-DTA86mHU.js.map +1 -0
  30. package/dist/{index-CPCQc37I.js → index-DlgTb4XY.js} +4 -4
  31. package/dist/index-DlgTb4XY.js.map +1 -0
  32. package/dist/{index-BnRuHI16.js → index-DpLwTw4C.js} +1967 -1693
  33. package/dist/index-DpLwTw4C.js.map +1 -0
  34. package/dist/{index-ClYojws9.js → index-TzKe6Ebm.js} +8 -7
  35. package/dist/index-TzKe6Ebm.js.map +1 -0
  36. package/dist/index-VzP81S7B.js +139 -0
  37. package/dist/index-VzP81S7B.js.map +1 -0
  38. package/dist/index-lZkYoUca.js.map +1 -1
  39. package/dist/index-loWqosf7.js +331 -0
  40. package/dist/index-loWqosf7.js.map +1 -0
  41. package/dist/index.js +1 -1
  42. package/dist/makeCallable-LDU0xZMJ.js.map +1 -1
  43. package/dist/models/WikiPage/index.d.ts +42 -47
  44. package/dist/models/WikiTitle/index.d.ts +3 -2
  45. package/dist/noop-ClDc6zv4.js.map +1 -1
  46. package/dist/plugins/in-article-links/index.d.ts +5 -17
  47. package/dist/plugins/quick-delete/index.d.ts +7 -5
  48. package/dist/plugins/quick-diff/PluginQuickDiffCore.d.ts +2 -0
  49. package/dist/plugins/quick-diff/components/DiffTable.d.ts +17 -0
  50. package/dist/plugins/quick-edit/index.d.ts +12 -10
  51. package/dist/plugins/quick-move/index.d.ts +3 -1
  52. package/dist/plugins/quick-preview/index.d.ts +13 -16
  53. package/dist/plugins/quick-redirect/index.d.ts +3 -1
  54. package/dist/plugins/toolbox/index.d.ts +7 -2
  55. package/dist/services/ApiService.d.ts +2 -2
  56. package/dist/services/ModalService/IPEModal.d.ts +1 -1
  57. package/dist/services/WikiMetadataService.d.ts +108 -0
  58. package/dist/services/WikiPageService.d.ts +8 -7
  59. package/dist/services/WikiTitleService.d.ts +43 -3
  60. package/dist/style.css +1 -1
  61. package/dist/types/{SiteMetadata.d.ts → WikiMetadata.d.ts} +17 -17
  62. package/dist/utils/url.d.ts +24 -0
  63. package/lib/index.umd.js +28 -28
  64. package/lib/index.umd.js.map +1 -1
  65. package/lib/style.css +1 -1
  66. package/package.json +11 -2
  67. package/dist/index-5zB57uWM.js +0 -1142
  68. package/dist/index-B7Ok-t-3.js +0 -128
  69. package/dist/index-B7Ok-t-3.js.map +0 -1
  70. package/dist/index-BHruEVsx.js +0 -319
  71. package/dist/index-BHruEVsx.js.map +0 -1
  72. package/dist/index-BnRuHI16.js.map +0 -1
  73. package/dist/index-BqqQgaGG.js.map +0 -1
  74. package/dist/index-Bs5MFAHs.js +0 -110
  75. package/dist/index-Bs5MFAHs.js.map +0 -1
  76. package/dist/index-C9QOZJ8o.js +0 -167
  77. package/dist/index-C9QOZJ8o.js.map +0 -1
  78. package/dist/index-CPCQc37I.js.map +0 -1
  79. package/dist/index-ClYojws9.js.map +0 -1
  80. package/dist/index-clwjxJi5.js.map +0 -1
  81. package/dist/services/SiteMetadataService.d.ts +0 -58
@@ -1,5 +1,5 @@
1
- import { j as nt, P as Fi, F as Ri } from "./index-CvhkVj_L.js";
2
- import { B as Ni, I as Di } from "./index-BnRuHI16.js";
1
+ import { j as Ge, P as Fi, F as Ri } from "./index-CvhkVj_L.js";
2
+ import { B as Ni, I as Di } from "./index-DpLwTw4C.js";
3
3
  /**
4
4
  * @vue/shared v3.5.22
5
5
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
@@ -391,7 +391,7 @@ function yr(e) {
391
391
  s !== e && (e.prevSub = s, s && (s.nextSub = e)), e.dep.subs = e;
392
392
  }
393
393
  }
394
- const Ns = /* @__PURE__ */ new WeakMap(), Qe = Symbol(
394
+ const Ns = /* @__PURE__ */ new WeakMap(), et = Symbol(
395
395
  ""
396
396
  ), Ds = Symbol(
397
397
  ""
@@ -427,13 +427,13 @@ function Fe(e, t, s, n, r, i) {
427
427
  } else
428
428
  switch ((s !== void 0 || o.has(void 0)) && l(o.get(s)), h && l(o.get(Nt)), t) {
429
429
  case "add":
430
- c ? h && l(o.get("length")) : (l(o.get(Qe)), ct(e) && l(o.get(Ds)));
430
+ c ? h && l(o.get("length")) : (l(o.get(et)), ct(e) && l(o.get(Ds)));
431
431
  break;
432
432
  case "delete":
433
- c || (l(o.get(Qe)), ct(e) && l(o.get(Ds)));
433
+ c || (l(o.get(et)), ct(e) && l(o.get(Ds)));
434
434
  break;
435
435
  case "set":
436
- ct(e) && l(o.get(Qe));
436
+ ct(e) && l(o.get(et));
437
437
  break;
438
438
  }
439
439
  }
@@ -661,7 +661,7 @@ class Sr extends Cr {
661
661
  return te(
662
662
  t,
663
663
  "iterate",
664
- M(t) ? "length" : Qe
664
+ M(t) ? "length" : et
665
665
  ), Reflect.ownKeys(t);
666
666
  }
667
667
  }
@@ -684,7 +684,7 @@ function oo(e, t, s) {
684
684
  return !t && te(
685
685
  i,
686
686
  "iterate",
687
- c ? Ds : Qe
687
+ c ? Ds : et
688
688
  ), {
689
689
  // iterator protocol
690
690
  next() {
@@ -720,7 +720,7 @@ function lo(e, t) {
720
720
  },
721
721
  get size() {
722
722
  const r = this.__v_raw;
723
- return !e && te(j(r), "iterate", Qe), r.size;
723
+ return !e && te(j(r), "iterate", et), r.size;
724
724
  },
725
725
  has(r) {
726
726
  const i = this.__v_raw, o = j(i), l = j(r);
@@ -728,7 +728,7 @@ function lo(e, t) {
728
728
  },
729
729
  forEach(r, i) {
730
730
  const o = this, l = o.__v_raw, c = j(l), h = t ? Ls : e ? Qt : X;
731
- return !e && te(c, "iterate", Qe), l.forEach((u, d) => r.call(i, h(u), h(d), o));
731
+ return !e && te(c, "iterate", et), l.forEach((u, d) => r.call(i, h(u), h(d), o));
732
732
  }
733
733
  };
734
734
  return ee(
@@ -951,8 +951,8 @@ function Co(e, t, s = !1) {
951
951
  return F(e) ? n = e : (n = e.get, r = e.set), new xo(n, r, s);
952
952
  }
953
953
  const zt = {}, es = /* @__PURE__ */ new WeakMap();
954
- let Ze;
955
- function So(e, t = !1, s = Ze) {
954
+ let Xe;
955
+ function So(e, t = !1, s = Xe) {
956
956
  if (s) {
957
957
  let n = es.get(s);
958
958
  n || es.set(s, n = []), n.push(e);
@@ -977,12 +977,12 @@ function wo(e, t, s = H) {
977
977
  De();
978
978
  }
979
979
  }
980
- const T = Ze;
981
- Ze = u;
980
+ const T = Xe;
981
+ Xe = u;
982
982
  try {
983
983
  return c ? c(e, 3, [v]) : e(v);
984
984
  } finally {
985
- Ze = T;
985
+ Xe = T;
986
986
  }
987
987
  } : d = $e, t && r) {
988
988
  const T = d, R = r === !0 ? 1 / 0 : r;
@@ -1004,8 +1004,8 @@ function wo(e, t, s = H) {
1004
1004
  const R = u.run();
1005
1005
  if (r || C || ($ ? R.some((B, Y) => ae(B, N[Y])) : ae(R, N))) {
1006
1006
  p && p();
1007
- const B = Ze;
1008
- Ze = u;
1007
+ const B = Xe;
1008
+ Xe = u;
1009
1009
  try {
1010
1010
  const Y = [
1011
1011
  R,
@@ -1018,7 +1018,7 @@ function wo(e, t, s = H) {
1018
1018
  t(...Y)
1019
1019
  );
1020
1020
  } finally {
1021
- Ze = B;
1021
+ Xe = B;
1022
1022
  }
1023
1023
  }
1024
1024
  } else
@@ -1207,7 +1207,7 @@ function Ao(e, t = Te, s) {
1207
1207
  };
1208
1208
  return n._n = !0, n._c = !0, n._d = !0, n;
1209
1209
  }
1210
- function Ge(e, t, s, n) {
1210
+ function Ye(e, t, s, n) {
1211
1211
  const r = e.dirs, i = t && t.dirs;
1212
1212
  for (let o = 0; o < r.length; o++) {
1213
1213
  const l = r[o];
@@ -1534,9 +1534,9 @@ function Ko(e) {
1534
1534
  serverPrefetch: qe,
1535
1535
  // public API
1536
1536
  expose: Pe,
1537
- inheritAttrs: tt,
1537
+ inheritAttrs: st,
1538
1538
  // assets
1539
- components: st,
1539
+ components: nt,
1540
1540
  directives: Vt,
1541
1541
  filters: ys
1542
1542
  } = t;
@@ -1586,7 +1586,7 @@ function Ko(e) {
1586
1586
  });
1587
1587
  });
1588
1588
  } else e.exposed || (e.exposed = {});
1589
- R && e.render === $e && (e.render = R), tt != null && (e.inheritAttrs = tt), st && (e.components = st), Vt && (e.directives = Vt), qe && Dr(e);
1589
+ R && e.render === $e && (e.render = R), st != null && (e.inheritAttrs = st), nt && (e.components = nt), Vt && (e.directives = Vt), qe && Dr(e);
1590
1590
  }
1591
1591
  function Wo(e, t, s = $e) {
1592
1592
  M(e) && (e = Bs(e));
@@ -2079,7 +2079,7 @@ function rl(e, t) {
2079
2079
  a == null && N(f, m, b, w);
2080
2080
  break;
2081
2081
  case me:
2082
- st(
2082
+ nt(
2083
2083
  a,
2084
2084
  f,
2085
2085
  m,
@@ -2198,15 +2198,15 @@ function rl(e, t) {
2198
2198
  Is(a, _),
2199
2199
  w,
2200
2200
  S
2201
- ), O && Ge(a, null, b, "created"), Y(x, a, a.scopeId, w, b), I) {
2201
+ ), O && Ye(a, null, b, "created"), Y(x, a, a.scopeId, w, b), I) {
2202
2202
  for (const W in I)
2203
2203
  W !== "value" && !Et(W) && i(x, W, null, I[W], _, b);
2204
2204
  "value" in I && i(x, "value", null, I.value, _), (y = I.onVnodeBeforeMount) && Se(y, b, a);
2205
2205
  }
2206
- O && Ge(a, null, b, "beforeMount");
2206
+ O && Ye(a, null, b, "beforeMount");
2207
2207
  const L = il(g, A);
2208
2208
  L && A.beforeEnter(x), n(x, f, m), ((y = I && I.onVnodeMounted) || L || O) && fe(() => {
2209
- y && Se(y, b, a), L && A.enter(x), O && Ge(a, null, b, "mounted");
2209
+ y && Se(y, b, a), L && A.enter(x), O && Ye(a, null, b, "mounted");
2210
2210
  }, g);
2211
2211
  }, Y = (a, f, m, b, g) => {
2212
2212
  if (m && v(a, m), b)
@@ -2246,7 +2246,7 @@ function rl(e, t) {
2246
2246
  x |= a.patchFlag & 16;
2247
2247
  const E = a.props || H, A = f.props || H;
2248
2248
  let O;
2249
- if (m && Ye(m, !1), (O = A.onVnodeBeforeUpdate) && Se(O, m, f, a), I && Ge(f, a, m, "beforeUpdate"), m && Ye(m, !0), (E.innerHTML && A.innerHTML == null || E.textContent && A.textContent == null) && u(S, ""), y ? Pe(
2249
+ if (m && Ze(m, !1), (O = A.onVnodeBeforeUpdate) && Se(O, m, f, a), I && Ye(f, a, m, "beforeUpdate"), m && Ze(m, !0), (E.innerHTML && A.innerHTML == null || E.textContent && A.textContent == null) && u(S, ""), y ? Pe(
2250
2250
  a.dynamicChildren,
2251
2251
  y,
2252
2252
  S,
@@ -2266,7 +2266,7 @@ function rl(e, t) {
2266
2266
  !1
2267
2267
  ), x > 0) {
2268
2268
  if (x & 16)
2269
- tt(S, E, A, m, g);
2269
+ st(S, E, A, m, g);
2270
2270
  else if (x & 2 && E.class !== A.class && i(S, "class", null, A.class, g), x & 4 && i(S, "style", E.style, A.style, g), x & 8) {
2271
2271
  const L = f.dynamicProps;
2272
2272
  for (let W = 0; W < L.length; W++) {
@@ -2275,9 +2275,9 @@ function rl(e, t) {
2275
2275
  }
2276
2276
  }
2277
2277
  x & 1 && a.children !== f.children && u(S, f.children);
2278
- } else !w && y == null && tt(S, E, A, m, g);
2278
+ } else !w && y == null && st(S, E, A, m, g);
2279
2279
  ((O = A.onVnodeUpdated) || I) && fe(() => {
2280
- O && Se(O, m, f, a), I && Ge(f, a, m, "updated");
2280
+ O && Se(O, m, f, a), I && Ye(f, a, m, "updated");
2281
2281
  }, b);
2282
2282
  }, Pe = (a, f, m, b, g, _, w) => {
2283
2283
  for (let S = 0; S < f.length; S++) {
@@ -2307,7 +2307,7 @@ function rl(e, t) {
2307
2307
  !0
2308
2308
  );
2309
2309
  }
2310
- }, tt = (a, f, m, b, g) => {
2310
+ }, st = (a, f, m, b, g) => {
2311
2311
  if (f !== m) {
2312
2312
  if (f !== H)
2313
2313
  for (const _ in f)
@@ -2326,7 +2326,7 @@ function rl(e, t) {
2326
2326
  }
2327
2327
  "value" in m && i(a, "value", f.value, m.value, g);
2328
2328
  }
2329
- }, st = (a, f, m, b, g, _, w, S, x) => {
2329
+ }, nt = (a, f, m, b, g, _, w, S, x) => {
2330
2330
  const y = f.el = a ? a.el : l(""), I = f.anchor = a ? a.anchor : l("");
2331
2331
  let { patchFlag: E, dynamicChildren: A, slotScopeIds: O } = f;
2332
2332
  O && (S = S ? S.concat(O) : O), a == null ? (n(y, m, b), n(I, m, b), ve(
@@ -2433,7 +2433,7 @@ function rl(e, t) {
2433
2433
  }
2434
2434
  }
2435
2435
  let k = E, oe;
2436
- Ye(a, !1), E ? (E.el = W.el, J(a, E, w)) : E = W, A && Ss(A), (oe = E.props && E.props.onVnodeBeforeUpdate) && Se(oe, L, E, W), Ye(a, !0);
2436
+ Ze(a, !1), E ? (E.el = W.el, J(a, E, w)) : E = W, A && Ss(A), (oe = E.props && E.props.onVnodeBeforeUpdate) && Se(oe, L, E, W), Ze(a, !0);
2437
2437
  const le = Hn(a), ye = a.subTree;
2438
2438
  a.subTree = le, $(
2439
2439
  ye,
@@ -2452,7 +2452,7 @@ function rl(e, t) {
2452
2452
  } else {
2453
2453
  let E;
2454
2454
  const { el: A, props: O } = f, { bm: L, m: W, parent: k, root: oe, type: le } = a, ye = It(f);
2455
- Ye(a, !1), L && Ss(L), !ye && (E = O && O.onVnodeBeforeMount) && Se(E, k, f), Ye(a, !0);
2455
+ Ze(a, !1), L && Ss(L), !ye && (E = O && O.onVnodeBeforeMount) && Se(E, k, f), Ze(a, !0);
2456
2456
  {
2457
2457
  oe.ce && // @ts-expect-error _def is private
2458
2458
  oe.ce._def.shadowRoot !== !1 && oe.ce._injectChildStyle(le);
@@ -2481,7 +2481,7 @@ function rl(e, t) {
2481
2481
  const x = a.effect = new dr(S);
2482
2482
  a.scope.off();
2483
2483
  const y = a.update = x.run.bind(x), I = a.job = x.runIfDirty.bind(x);
2484
- I.i = a, I.id = a.uid, x.scheduler = () => ln(I), Ye(a, !0), y();
2484
+ I.i = a, I.id = a.uid, x.scheduler = () => ln(I), Ze(a, !0), y();
2485
2485
  }, J = (a, f, m) => {
2486
2486
  f.component = a;
2487
2487
  const b = a.vnode.props;
@@ -2757,7 +2757,7 @@ function rl(e, t) {
2757
2757
  a.suspense.unmount(m, b);
2758
2758
  return;
2759
2759
  }
2760
- L && Ge(a, null, f, "beforeUnmount"), I & 64 ? a.type.remove(
2760
+ L && Ye(a, null, f, "beforeUnmount"), I & 64 ? a.type.remove(
2761
2761
  a,
2762
2762
  f,
2763
2763
  m,
@@ -2778,7 +2778,7 @@ function rl(e, t) {
2778
2778
  ) : (_ === me && E & 384 || !g && I & 16) && _t(x, f, m), b && yn(a);
2779
2779
  }
2780
2780
  (W && (k = w && w.onVnodeUnmounted) || L) && fe(() => {
2781
- k && Se(k, f, a), L && Ge(a, null, f, "unmounted");
2781
+ k && Se(k, f, a), L && Ye(a, null, f, "unmounted");
2782
2782
  }, m);
2783
2783
  }, yn = (a) => {
2784
2784
  const { type: f, el: m, anchor: b, transition: g } = a;
@@ -2851,7 +2851,7 @@ function rl(e, t) {
2851
2851
  function Is({ type: e, props: t }, s) {
2852
2852
  return s === "svg" && e === "foreignObject" || s === "mathml" && e === "annotation-xml" && t && t.encoding && t.encoding.includes("html") ? void 0 : s;
2853
2853
  }
2854
- function Ye({ effect: e, job: t }, s) {
2854
+ function Ze({ effect: e, job: t }, s) {
2855
2855
  s ? (e.flags |= 32, t.flags |= 4) : (e.flags &= -33, t.flags &= -5);
2856
2856
  }
2857
2857
  function il(e, t) {
@@ -3889,7 +3889,7 @@ const pi = {
3889
3889
  } catch {
3890
3890
  }
3891
3891
  }
3892
- }, Bt = (e) => e.map(String).join("."), oc = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), ke = (e) => `schema_${oc(Bt(e) || "root")}`, et = (e) => Bt(e);
3892
+ }, Bt = (e) => e.map(String).join("."), oc = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), ke = (e) => `schema_${oc(Bt(e) || "root")}`, tt = (e) => Bt(e);
3893
3893
  function gn(e, t) {
3894
3894
  if (t == null) return t;
3895
3895
  switch (e) {
@@ -4045,7 +4045,7 @@ class gi extends Ie {
4045
4045
  }
4046
4046
  this.$root.innerHTML = `<style>${pe}</style>`;
4047
4047
  const t = _e(this._schema), s = this.makeFieldContainer("string", t.description), n = document.createElement("input");
4048
- this.$input = n, n.className = "input", n.type = "text", n.name = et(this._path), n.id = ke(this._path), t?.pattern?.source && (n.pattern = t.pattern.source), t?.max != null && (n.maxLength = t.max), n.value = this._value ?? "", n.oninput = () => this.emitChange(gn("string", n.value));
4048
+ this.$input = n, n.className = "input", n.type = "text", n.name = tt(this._path), n.id = ke(this._path), t?.pattern?.source && (n.pattern = t.pattern.source), t?.max != null && (n.maxLength = t.max), n.value = this._value ?? "", n.oninput = () => this.emitChange(gn("string", n.value));
4049
4049
  const r = s.querySelector("label.label");
4050
4050
  r && (r.htmlFor = n.id), s.appendChild(n), this.$root.appendChild(s);
4051
4051
  }
@@ -4060,7 +4060,7 @@ class _i extends Ie {
4060
4060
  }
4061
4061
  this.$root.innerHTML = `<style>${pe}</style>`;
4062
4062
  const t = this._schema?.type ?? "number", s = _e(this._schema), n = this.makeFieldContainer("number", s.description), r = document.createElement("input");
4063
- this.$input = r, r.className = "input", r.name = et(this._path), r.id = ke(this._path), s?.min != null && (r.min = String(s.min)), s?.max != null && (r.max = String(s.max)), s?.step != null && (r.step = String(s.step)), t === "percent" && !r.step && (r.step = "0.01"), r.value = this._value ?? "", r.oninput = () => this.emitChange(gn(t, r.value));
4063
+ this.$input = r, r.className = "input", r.name = tt(this._path), r.id = ke(this._path), s?.min != null && (r.min = String(s.min)), s?.max != null && (r.max = String(s.max)), s?.step != null && (r.step = String(s.step)), t === "percent" && !r.step && (r.step = "0.01"), r.value = this._value ?? "", r.oninput = () => this.emitChange(gn(t, r.value));
4064
4064
  const i = n.querySelector("label.label");
4065
4065
  i && (i.htmlFor = r.id), s.role === "slider" ? r.type = "range" : r.type = "number", n.appendChild(r), this.$root.appendChild(n);
4066
4066
  }
@@ -4072,9 +4072,9 @@ class vi extends Ie {
4072
4072
  const t = _e(this._schema), s = this.makeFieldContainer("boolean", t.description), n = document.createElement("label");
4073
4073
  n.className = "checkbox";
4074
4074
  const r = document.createElement("input");
4075
- r.type = "checkbox", r.checked = !!this._value, r.name = et(this._path), r.id = ke(this._path);
4075
+ r.type = "checkbox", r.checked = !!this._value, r.name = tt(this._path), r.id = ke(this._path);
4076
4076
  const i = document.createElement("span");
4077
- i.textContent = this._label ?? "", r.onchange = () => this.emitChange(r.checked);
4077
+ i.textContent = t.description ?? this._label ?? "", r.onchange = () => this.emitChange(r.checked);
4078
4078
  const o = s.querySelector("label.label");
4079
4079
  o && (o.htmlFor = r.id), n.append(r, i), s.appendChild(n), this.$root.appendChild(s);
4080
4080
  }
@@ -4109,7 +4109,7 @@ class bi extends Ie {
4109
4109
  const t = _e(this._schema), s = this.makeFieldContainer("date", t.description), n = document.createElement("input");
4110
4110
  this.$input = n, n.className = "input";
4111
4111
  const r = t.role || "date";
4112
- if (r === "datetime" ? n.type = "datetime-local" : r === "time" ? n.type = "time" : n.type = "date", n.name = et(this._path), n.id = ke(this._path), this._value instanceof Date)
4112
+ if (r === "datetime" ? n.type = "datetime-local" : r === "time" ? n.type = "time" : n.type = "date", n.name = tt(this._path), n.id = ke(this._path), this._value instanceof Date)
4113
4113
  r === "date" ? n.value = wt(this._value) : r === "time" ? n.value = qs(this._value) : r === "datetime" && (n.value = Jt(this._value));
4114
4114
  else if (typeof this._value == "string" && r !== "time") {
4115
4115
  const o = new Date(this._value);
@@ -4191,7 +4191,7 @@ class xi extends Ie {
4191
4191
  const t = _e(this._schema), s = this.makeFieldContainer("union", t.description), n = this._schema.list || [];
4192
4192
  if (lc(n)) {
4193
4193
  const r = document.createElement("select");
4194
- r.className = "input", r.name = et(this._path), r.id = ke(this._path), n.forEach((o) => {
4194
+ r.className = "input", r.name = tt(this._path), r.id = ke(this._path), n.forEach((o) => {
4195
4195
  const l = document.createElement("option");
4196
4196
  l.value = String(o.value), l.textContent = String(o.value), this._value === o.value && (l.selected = !0), r.appendChild(l);
4197
4197
  }), r.onchange = () => this.emitChange(gn("string", r.value));
@@ -4201,7 +4201,7 @@ class xi extends Ie {
4201
4201
  const r = document.createElement("div");
4202
4202
  r.className = "toolbar";
4203
4203
  const i = document.createElement("select");
4204
- i.className = "input", i.name = et(this._path) + ".__type", i.id = ke(this._path) + "__type";
4204
+ i.className = "input", i.name = tt(this._path) + ".__type", i.id = ke(this._path) + "__type";
4205
4205
  let o = 0;
4206
4206
  n.forEach((u, d) => {
4207
4207
  const p = document.createElement("option");
@@ -4359,7 +4359,7 @@ class bs extends Ie {
4359
4359
  const Y = () => {
4360
4360
  if (B) return;
4361
4361
  B = !0, clearTimeout(ve);
4362
- const qe = i().filter((tt, st) => st !== p);
4362
+ const qe = i().filter((st, nt) => nt !== p);
4363
4363
  this._itemIds.splice(p, 1);
4364
4364
  const Pe = this.capturePositions(n);
4365
4365
  this._value = qe, o(Pe), this.emitChange(qe);
@@ -4413,7 +4413,7 @@ class wi extends Ie {
4413
4413
  const $ = [...this._path, C], U = document.createElement("div");
4414
4414
  U.className = "kv schema-collection-row", U.dataset.uid = o(C), U.setAttribute("data-path", Bt($));
4415
4415
  const P = document.createElement("input");
4416
- P.className = "input", P.value = C, P.name = et($) + ".__key", P.id = ke($) + "__key";
4416
+ P.className = "input", P.value = C, P.name = tt($) + ".__key", P.id = ke($) + "__key";
4417
4417
  const N = gt(r, $, i[C], `${this._label ?? ""}[${C}]`), D = document.createElement("button");
4418
4418
  D.type = "button", D.className = "btn danger", D.textContent = this._i18n.dictRemove ?? "×", D.onclick = () => {
4419
4419
  const T = l();
@@ -4605,9 +4605,9 @@ const uc = /* @__PURE__ */ Nr({
4605
4605
  }, u.$attrs), null, 16));
4606
4606
  }
4607
4607
  });
4608
- function Xe(e, t = /* @__PURE__ */ new WeakMap()) {
4608
+ function Qe(e, t = /* @__PURE__ */ new WeakMap()) {
4609
4609
  if (Q(e))
4610
- return Xe(e.value, t);
4610
+ return Qe(e.value, t);
4611
4611
  if (e === null || typeof e != "object")
4612
4612
  return e;
4613
4613
  if (t.has(e))
@@ -4619,28 +4619,28 @@ function Xe(e, t = /* @__PURE__ */ new WeakMap()) {
4619
4619
  if (e instanceof Map) {
4620
4620
  const r = /* @__PURE__ */ new Map();
4621
4621
  return t.set(e, r), Array.from(e.entries()).forEach(([i, o]) => {
4622
- r.set(i, Xe(o, t));
4622
+ r.set(i, Qe(o, t));
4623
4623
  }), r;
4624
4624
  }
4625
4625
  if (e instanceof Set) {
4626
4626
  const r = /* @__PURE__ */ new Set();
4627
4627
  return t.set(e, r), Array.from(e).forEach((i) => {
4628
- r.add(Xe(i, t));
4628
+ r.add(Qe(i, t));
4629
4629
  }), r;
4630
4630
  }
4631
4631
  if (Array.isArray(e)) {
4632
4632
  const r = [];
4633
4633
  t.set(e, r);
4634
4634
  for (const i of e)
4635
- r.push(Xe(i, t));
4635
+ r.push(Qe(i, t));
4636
4636
  return r;
4637
4637
  }
4638
4638
  const s = j(e), n = {};
4639
4639
  t.set(e, n);
4640
4640
  for (const r of Object.keys(s))
4641
- n[r] = Xe(s[r], t);
4641
+ n[r] = Qe(s[r], t);
4642
4642
  for (const r of Object.getOwnPropertySymbols(s))
4643
- n[r] = Xe(s[r], t);
4643
+ n[r] = Qe(s[r], t);
4644
4644
  return n;
4645
4645
  }
4646
4646
  const fc = { class: "preferences-ui-app" }, hc = { class: "tabs" }, dc = ["onClick", "data-value"], pc = { style: { "max-height": "20em", overflow: "auto" } }, mc = /* @__PURE__ */ Nr({
@@ -4649,7 +4649,7 @@ const fc = { class: "preferences-ui-app" }, hc = { class: "tabs" }, dc = ["onCli
4649
4649
  const s = rc(), n = An([]), r = An(""), i = Gt([]), o = hi(() => i.value.map((h) => h.schema)), l = Gt({}), c = Gt({});
4650
4650
  return t({
4651
4651
  getValue() {
4652
- return Xe(c);
4652
+ return Qe(c);
4653
4653
  }
4654
4654
  }), ht(
4655
4655
  r,
@@ -4689,7 +4689,7 @@ const fc = { class: "preferences-ui-app" }, hc = { class: "tabs" }, dc = ["onCli
4689
4689
  for (const [n, r] of t)
4690
4690
  s[n] = r;
4691
4691
  return s;
4692
- }, _c = /* @__PURE__ */ gc(mc, [["__scopeId", "data-v-e89c782f"]]);
4692
+ }, _c = /* @__PURE__ */ gc(mc, [["__scopeId", "data-v-571b939a"]]);
4693
4693
  var vc = Object.create, _n = Object.defineProperty, bc = Object.getOwnPropertyDescriptor, Ti = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), $i = (e) => {
4694
4694
  throw TypeError(e);
4695
4695
  }, yc = (e, t, s) => t in e ? _n(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, xc = (e, t) => _n(e, "name", { value: t, configurable: !0 }), Cc = (e) => [, , , vc(e?.[Ti("metadata")] ?? null)], Sc = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Ai = (e) => e !== void 0 && typeof e != "function" ? $i("Function expected") : e, wc = (e, t, s, n, r) => ({ kind: Sc[e], name: t, metadata: n, addInitializer: (i) => s._ ? $i("Already initialized") : r.push(Ai(i || null)) }), Ec = (e, t) => yc(t, Ti("metadata"), e[3]), Tc = (e, t, s, n) => {
@@ -4708,7 +4708,7 @@ class zs extends (Pi = Ni) {
4708
4708
  super(t, {}, "preferences-ui"), this.ctx = t, t.set("preferencesUI", this), t.inject(["toolbox"], (s) => {
4709
4709
  s.toolbox.addButton({
4710
4710
  id: "preferences",
4711
- icon: /* @__PURE__ */ nt(
4711
+ icon: /* @__PURE__ */ Ge(
4712
4712
  "svg",
4713
4713
  {
4714
4714
  xmlns: "http://www.w3.org/2000/svg",
@@ -4718,8 +4718,8 @@ class zs extends (Pi = Ni) {
4718
4718
  fill: "currentColor",
4719
4719
  class: "icon icon-tabler icons-tabler-filled icon-tabler-settings",
4720
4720
  children: [
4721
- /* @__PURE__ */ nt("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
4722
- /* @__PURE__ */ nt("path", { d: "M14.647 4.081a.724 .724 0 0 0 1.08 .448c2.439 -1.485 5.23 1.305 3.745 3.744a.724 .724 0 0 0 .447 1.08c2.775 .673 2.775 4.62 0 5.294a.724 .724 0 0 0 -.448 1.08c1.485 2.439 -1.305 5.23 -3.744 3.745a.724 .724 0 0 0 -1.08 .447c-.673 2.775 -4.62 2.775 -5.294 0a.724 .724 0 0 0 -1.08 -.448c-2.439 1.485 -5.23 -1.305 -3.745 -3.744a.724 .724 0 0 0 -.447 -1.08c-2.775 -.673 -2.775 -4.62 0 -5.294a.724 .724 0 0 0 .448 -1.08c-1.485 -2.439 1.305 -5.23 3.744 -3.745a.722 .722 0 0 0 1.08 -.447c.673 -2.775 4.62 -2.775 5.294 0zm-2.647 4.919a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z" })
4721
+ /* @__PURE__ */ Ge("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
4722
+ /* @__PURE__ */ Ge("path", { d: "M14.647 4.081a.724 .724 0 0 0 1.08 .448c2.439 -1.485 5.23 1.305 3.745 3.744a.724 .724 0 0 0 .447 1.08c2.775 .673 2.775 4.62 0 5.294a.724 .724 0 0 0 -.448 1.08c1.485 2.439 -1.305 5.23 -3.744 3.745a.724 .724 0 0 0 -1.08 .447c-.673 2.775 -4.62 2.775 -5.294 0a.724 .724 0 0 0 -1.08 -.448c-2.439 1.485 -5.23 -1.305 -3.745 -3.744a.724 .724 0 0 0 -.447 -1.08c-2.775 -.673 -2.775 -4.62 0 -5.294a.724 .724 0 0 0 .448 -1.08c-1.485 -2.439 1.305 -5.23 3.744 -3.745a.722 .722 0 0 0 1.08 -.447c.673 -2.775 4.62 -2.775 5.294 0zm-2.647 4.919a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z" })
4723
4723
  ]
4724
4724
  }
4725
4725
  ),
@@ -4738,11 +4738,11 @@ class zs extends (Pi = Ni) {
4738
4738
  sizeClass: "small",
4739
4739
  outSideClose: !1,
4740
4740
  center: !0,
4741
- title: "InPageEdit Prefrences",
4742
- content: /* @__PURE__ */ nt(Ri, { children: /* @__PURE__ */ nt(Fi, {}) })
4741
+ title: "InPageEdit Preferences",
4742
+ content: /* @__PURE__ */ Ge(Ri, { children: /* @__PURE__ */ Ge(Fi, {}) })
4743
4743
  });
4744
4744
  t.get$window().classList.add("dialog");
4745
- const s = /* @__PURE__ */ nt("div", { id: "ipe-preferences-app", style: { minHeight: "65vh" } });
4745
+ const s = /* @__PURE__ */ Ge("div", { id: "ipe-preferences-app", style: { minHeight: "65vh" } });
4746
4746
  t.setContent(s);
4747
4747
  const n = this.createFormApp(), r = n.mount(s);
4748
4748
  t.setButtons([
@@ -4766,7 +4766,10 @@ class zs extends (Pi = Ni) {
4766
4766
  } catch (o) {
4767
4767
  this.logger.error("failed to save preferences", o);
4768
4768
  }
4769
- t.close();
4769
+ t.close(), this.ctx.modal.notify("success", {
4770
+ title: "Preferences Saved",
4771
+ content: /* @__PURE__ */ Ge("p", { children: "Some settings may take effect after reloading the page." })
4772
+ });
4770
4773
  }
4771
4774
  }
4772
4775
  ]), t.on(t.Event.Close, () => {
@@ -4784,4 +4787,4 @@ Tc(vn, 1, zs);
4784
4787
  export {
4785
4788
  zs as PluginPreferencesUI
4786
4789
  };
4787
- //# sourceMappingURL=index-SDBp__LY.js.map
4790
+ //# sourceMappingURL=index-BT1mN_St.js.map