@bagelink/vue 1.21.53 → 1.21.59

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.
@@ -1,5 +1,5 @@
1
- import { Fa as Lt, Xr as ut, en as wr, ja as C } from "./src-Dtl16wMC.js";
2
- import { $ as Bt, A as Er, B as Rr, C as Fr, D as g, E as Tr, F as Ir, G as me, H as W, I as Or, J as Pr, K as _e, L as qr, M as ht, N as Nr, O as $r, P as Vr, Q as Dt, R as D, T as He, U as ft, V as Wr, W as d, Y as _r, Z as ie, a as Hr, at as H, b as wt, ct as y, d as Ur, dt as Fe, et as De, g as Et, h as Te, it as Ue, j as Rt, n as Ft, nt as zr, ot as Gr, p as Jr, rt as Tt, t as jr, tt as Kr, v as Qr, w as ze, x as K, y as ge, z as Ge } from "./dist-IV7z-zur.js";
1
+ import { Fa as Lt, Xr as ut, en as wr, ja as C } from "./src-B4Vf81d1.js";
2
+ import { $ as Bt, A as Er, B as Rr, C as Fr, D as v, E as Tr, F as Ir, G as me, H as W, I as Or, J as Pr, K as _e, L as qr, M as ht, N as Nr, O as $r, P as Vr, Q as Dt, R as D, T as He, U as ft, V as Wr, W as d, Y as _r, Z as ie, a as Hr, at as H, b as wt, ct as y, d as Ur, dt as Fe, et as De, g as Et, h as Te, it as Ue, j as Rt, n as Ft, nt as zr, ot as Gr, p as Jr, rt as Tt, t as jr, tt as Kr, v as Qr, w as ze, x as K, y as ge, z as Ge } from "./dist-IV7z-zur.js";
3
3
  import { computed as G, createBlock as Ie, createCommentVNode as P, createElementBlock as F, createElementVNode as S, createVNode as B, defineComponent as It, getCurrentInstance as Xr, h as dt, normalizeClass as Yr, onBeforeUnmount as Zr, onMounted as en, openBlock as A, ref as w, render as mt, resolveDirective as Ot, shallowRef as tn, toDisplayString as $, unref as V, useId as rn, watch as le, withDirectives as M } from "vue";
4
4
  var nn = (e) => {
5
5
  let { state: t } = e, r = t.doc.lineAt(t.selection.main.from), n = je(e.state, r.from);
@@ -32,14 +32,14 @@ function sn(e, { open: t, close: r }, n, l) {
32
32
  };
33
33
  let u, h;
34
34
  l - n <= 2 * te ? u = h = e.sliceDoc(n, l) : (u = e.sliceDoc(n, n + te), h = e.sliceDoc(l - te, l));
35
- let f = /^\s*/.exec(u)[0].length, v = /\s*$/.exec(h)[0].length, m = h.length - v - r.length;
35
+ let f = /^\s*/.exec(u)[0].length, g = /\s*$/.exec(h)[0].length, m = h.length - g - r.length;
36
36
  return u.slice(f, f + t.length) == t && h.slice(m, m + r.length) == r ? {
37
37
  open: {
38
38
  pos: n + f + t.length,
39
39
  margin: /\s/.test(u.charAt(f + t.length)) ? 1 : 0
40
40
  },
41
41
  close: {
42
- pos: l - v - r.length,
42
+ pos: l - g - r.length,
43
43
  margin: /\s/.test(h.charAt(m - 1)) ? 1 : 0
44
44
  }
45
45
  } : null;
@@ -94,13 +94,13 @@ function un(e, t, r = t.selection.ranges) {
94
94
  continue e;
95
95
  if (h.from > l && (a == o || o > h.from)) {
96
96
  l = h.from;
97
- let f = /^\s*/.exec(h.text)[0].length, v = f == h.length, m = h.text.slice(f, f + c.length) == c ? f : -1;
97
+ let f = /^\s*/.exec(h.text)[0].length, g = f == h.length, m = h.text.slice(f, f + c.length) == c ? f : -1;
98
98
  f < h.text.length && f < s && (s = f), n.push({
99
99
  line: h,
100
100
  comment: m,
101
101
  token: c,
102
102
  indent: f,
103
- empty: v,
103
+ empty: g,
104
104
  single: !1
105
105
  });
106
106
  }
@@ -173,7 +173,7 @@ function dn(e = {}) {
173
173
  return [
174
174
  Nt,
175
175
  qt.of(e),
176
- g.domEventHandlers({ beforeinput(t, r) {
176
+ v.domEventHandlers({ beforeinput(t, r) {
177
177
  let n = t.inputType == "historyUndo" ? $t : t.inputType == "historyRedo" ? Pe : null;
178
178
  return n ? (t.preventDefault(), n(r)) : !1;
179
179
  } })
@@ -405,7 +405,7 @@ var Jt = (e) => Gt(e, !1), jt = (e) => Gt(e, !0);
405
405
  function Kt(e) {
406
406
  let t = e.scrollDOM.clientHeight < e.scrollDOM.scrollHeight - 2, r = 0, n = 0, l;
407
407
  if (t) {
408
- for (let a of e.state.facet(g.scrollMargins)) {
408
+ for (let a of e.state.facet(v.scrollMargins)) {
409
409
  let o = a(e);
410
410
  o?.top && (r = Math.max(o?.top, r)), o?.bottom && (n = Math.max(o?.bottom, n));
411
411
  }
@@ -424,7 +424,7 @@ function Qt(e, t) {
424
424
  let a;
425
425
  if (r.selfScroll) {
426
426
  let o = e.coordsAtPos(n.selection.main.head), i = e.scrollDOM.getBoundingClientRect(), s = i.top + r.marginTop, c = i.bottom - r.marginBottom;
427
- o && o.top > s && o.bottom < c && (a = g.scrollIntoView(l.main.head, {
427
+ o && o.top > s && o.bottom < c && (a = v.scrollIntoView(l.main.head, {
428
428
  y: "start",
429
429
  yMargin: o.top - s
430
430
  }));
@@ -561,11 +561,11 @@ function se(e, t) {
561
561
  return l.changes.empty ? !1 : (e.dispatch(n.update(l, {
562
562
  scrollIntoView: !0,
563
563
  userEvent: r,
564
- effects: r == "delete.selection" ? g.announce.of(n.phrase("Selection deleted")) : void 0
564
+ effects: r == "delete.selection" ? v.announce.of(n.phrase("Selection deleted")) : void 0
565
565
  })), !0);
566
566
  }
567
567
  function he(e, t, r) {
568
- if (e instanceof g) for (let n of e.state.facet(g.atomicRanges).map((l) => l(e))) n.between(t, t, (l, a) => {
568
+ if (e instanceof v) for (let n of e.state.facet(v.atomicRanges).map((l) => l(e))) n.between(t, t, (l, a) => {
569
569
  l < t && a > t && (t = r ? a : l);
570
570
  });
571
571
  return t;
@@ -1125,7 +1125,7 @@ var vl = (e) => {
1125
1125
  var t = e.theme, r = e.settings, n = r === void 0 ? {} : r, l = e.styles, a = l === void 0 ? [] : l, o = { ".cm-gutters": {} }, i = {};
1126
1126
  n.background && (i.backgroundColor = n.background), n.backgroundImage && (i.backgroundImage = n.backgroundImage), n.foreground && (i.color = n.foreground), n.fontSize && (i.fontSize = n.fontSize), (n.background || n.foreground) && (o["&"] = i), n.fontFamily && (o["&.cm-editor .cm-scroller"] = { fontFamily: n.fontFamily }), n.gutterBackground && (o[".cm-gutters"].backgroundColor = n.gutterBackground), n.gutterForeground && (o[".cm-gutters"].color = n.gutterForeground), n.gutterBorder && (o[".cm-gutters"].borderRightColor = n.gutterBorder), n.caret && (o[".cm-content"] = { caretColor: n.caret }, o[".cm-cursor, .cm-dropCursor"] = { borderLeftColor: n.caret });
1127
1127
  var s = {};
1128
- return n.gutterActiveForeground && (s.color = n.gutterActiveForeground), n.lineHighlight && (o[".cm-activeLine"] = { backgroundColor: n.lineHighlight }, s.backgroundColor = n.lineHighlight), o[".cm-activeLineGutter"] = s, n.selection && (o["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"] = { background: n.selection + " !important" }), n.selectionMatch && (o["& .cm-selectionMatch"] = { backgroundColor: n.selectionMatch }), [g.theme(o, { dark: t === "dark" }), Fr(jr.define(a))];
1128
+ return n.gutterActiveForeground && (s.color = n.gutterActiveForeground), n.lineHighlight && (o[".cm-activeLine"] = { backgroundColor: n.lineHighlight }, s.backgroundColor = n.lineHighlight), o[".cm-activeLineGutter"] = s, n.selection && (o["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"] = { background: n.selection + " !important" }), n.selectionMatch && (o["& .cm-selectionMatch"] = { backgroundColor: n.selectionMatch }), [v.theme(o, { dark: t === "dark" }), Fr(jr.define(a))];
1129
1129
  }, yl = {
1130
1130
  background: "#272C35",
1131
1131
  foreground: "#9d9b97",
@@ -1395,14 +1395,14 @@ var Sl = (e) => {
1395
1395
  e.dispatch({ effects: l });
1396
1396
  return;
1397
1397
  }
1398
- let s = r.doc.lineAt(r.selection.main.head), [, c, u, h, f] = i, v = h ? +h.slice(1) : 0, m = u ? +u : s.number;
1398
+ let s = r.doc.lineAt(r.selection.main.head), [, c, u, h, f] = i, g = h ? +h.slice(1) : 0, m = u ? +u : s.number;
1399
1399
  if (u && f) {
1400
1400
  let z = m / 100;
1401
1401
  c && (z = z * (c == "-" ? -1 : 1) + s.number / r.doc.lines), m = Math.round(r.doc.lines * z);
1402
1402
  } else u && c && (m = m * (c == "-" ? -1 : 1) + s.number);
1403
- let ue = r.doc.line(Math.max(1, Math.min(r.doc.lines, m))), ee = d.cursor(ue.from + Math.max(0, Math.min(v, ue.length)));
1403
+ let ue = r.doc.line(Math.max(1, Math.min(r.doc.lines, m))), ee = d.cursor(ue.from + Math.max(0, Math.min(g, ue.length)));
1404
1404
  e.dispatch({
1405
- effects: [l, g.scrollIntoView(ee.from, { y: "center" })],
1405
+ effects: [l, v.scrollIntoView(ee.from, { y: "center" })],
1406
1406
  selection: ee
1407
1407
  });
1408
1408
  }), !0;
@@ -1436,7 +1436,7 @@ var Ml = ({ state: e, dispatch: t }) => {
1436
1436
  let l = Al(e, n);
1437
1437
  return l ? (t(e.update({
1438
1438
  selection: e.selection.addRange(d.range(l.from, l.to), !1),
1439
- effects: g.scrollIntoView(l.to)
1439
+ effects: v.scrollIntoView(l.to)
1440
1440
  })), !0) : !1;
1441
1441
  }, U = /* @__PURE__ */ _e.define({ combine(e) {
1442
1442
  return Tt(e, {
@@ -1446,7 +1446,7 @@ var Ml = ({ state: e, dispatch: t }) => {
1446
1446
  regexp: !1,
1447
1447
  wholeWord: !1,
1448
1448
  createPanel: (t) => new Nl(t),
1449
- scrollToMatch: (t) => g.scrollIntoView(t)
1449
+ scrollToMatch: (t) => v.scrollIntoView(t)
1450
1450
  });
1451
1451
  } });
1452
1452
  function Ll(e) {
@@ -1692,7 +1692,7 @@ var X = /* @__PURE__ */ ce((e, { query: t }) => {
1692
1692
  from: o.from,
1693
1693
  to: o.to,
1694
1694
  insert: c
1695
- }), o = t.nextMatch(r, o.from, o.to), u.push(g.announce.of(r.phrase("replaced match on line $", r.doc.lineAt(n).number) + "."))) : o = t.nextMatch(r, o.from, o.to);
1695
+ }), o = t.nextMatch(r, o.from, o.to), u.push(v.announce.of(r.phrase("replaced match on line $", r.doc.lineAt(n).number) + "."))) : o = t.nextMatch(r, o.from, o.to);
1696
1696
  let h = e.state.changes(i);
1697
1697
  return o && (s = d.single(o.from, o.to).map(h), u.push(et(e, o)), u.push(r.facet(U).scrollToMatch(s.main, e))), e.dispatch({
1698
1698
  changes: h,
@@ -1715,7 +1715,7 @@ var X = /* @__PURE__ */ ce((e, { query: t }) => {
1715
1715
  let n = e.state.phrase("replaced $ matches", r.length) + ".";
1716
1716
  return e.dispatch({
1717
1717
  changes: r,
1718
- effects: g.announce.of(n),
1718
+ effects: v.announce.of(n),
1719
1719
  userEvent: "input.replace.all"
1720
1720
  }), !0;
1721
1721
  });
@@ -1918,9 +1918,9 @@ function et(e, { from: t, to: r }) {
1918
1918
  break;
1919
1919
  }
1920
1920
  }
1921
- return g.announce.of(`${e.state.phrase("current match")}. ${i} ${e.state.phrase("on line")} ${n.number}.`);
1921
+ return v.announce.of(`${e.state.phrase("current match")}. ${i} ${e.state.phrase("on line")} ${n.number}.`);
1922
1922
  }
1923
- var $l = /* @__PURE__ */ g.baseTheme({
1923
+ var $l = /* @__PURE__ */ v.baseTheme({
1924
1924
  ".cm-panel.cm-search": {
1925
1925
  padding: "2px 6px 4px",
1926
1926
  position: "relative",
@@ -1986,7 +1986,7 @@ var $l = /* @__PURE__ */ g.baseTheme({
1986
1986
  h.key === "Escape" ? (h.preventDefault(), Se(t.view), t.view.focus()) : h.key === "Enter" && (h.preventDefault(), h.shiftKey ? Y(t.view) : X(t.view));
1987
1987
  }
1988
1988
  return (h, f) => {
1989
- const v = Ot("tooltip");
1989
+ const g = Ot("tooltip");
1990
1990
  return A(), F("div", {
1991
1991
  class: "code-search-panel grid gap-025 p-05",
1992
1992
  style: {
@@ -2012,7 +2012,7 @@ var $l = /* @__PURE__ */ g.baseTheme({
2012
2012
  "icon",
2013
2013
  "aria-expanded",
2014
2014
  "aria-controls"
2015
- ])), [[v, i.value ? "Hide replace" : "Show replace"]]),
2015
+ ])), [[g, i.value ? "Hide replace" : "Show replace"]]),
2016
2016
  S("div", Wl, [B(ut, {
2017
2017
  modelValue: r.value,
2018
2018
  "onUpdate:modelValue": f[1] || (f[1] = (m) => r.value = m),
@@ -2037,7 +2037,7 @@ var $l = /* @__PURE__ */ g.baseTheme({
2037
2037
  "flat",
2038
2038
  "soft",
2039
2039
  "aria-pressed"
2040
- ]), [[v, "Match case"]]),
2040
+ ]), [[g, "Match case"]]),
2041
2041
  M(B(C, {
2042
2042
  thin: "",
2043
2043
  flat: !o.value,
@@ -2050,7 +2050,7 @@ var $l = /* @__PURE__ */ g.baseTheme({
2050
2050
  "flat",
2051
2051
  "soft",
2052
2052
  "aria-pressed"
2053
- ]), [[v, "Match whole word"]]),
2053
+ ]), [[g, "Match whole word"]]),
2054
2054
  M(B(C, {
2055
2055
  thin: "",
2056
2056
  flat: !a.value,
@@ -2063,7 +2063,7 @@ var $l = /* @__PURE__ */ g.baseTheme({
2063
2063
  "flat",
2064
2064
  "soft",
2065
2065
  "aria-pressed"
2066
- ]), [[v, "Regular expression"]])
2066
+ ]), [[g, "Regular expression"]])
2067
2067
  ])]),
2068
2068
  M(B(C, {
2069
2069
  thin: "",
@@ -2071,21 +2071,21 @@ var $l = /* @__PURE__ */ g.baseTheme({
2071
2071
  icon: "arrow_upward",
2072
2072
  "aria-label": "Previous match",
2073
2073
  onClick: f[5] || (f[5] = (m) => V(Y)(e.view))
2074
- }, null, 512), [[v, "Previous match (Shift+Enter)"]]),
2074
+ }, null, 512), [[g, "Previous match (Shift+Enter)"]]),
2075
2075
  M(B(C, {
2076
2076
  thin: "",
2077
2077
  flat: "",
2078
2078
  icon: "arrow_downward",
2079
2079
  "aria-label": "Next match",
2080
2080
  onClick: f[6] || (f[6] = (m) => V(X)(e.view))
2081
- }, null, 512), [[v, "Next match (Enter)"]]),
2081
+ }, null, 512), [[g, "Next match (Enter)"]]),
2082
2082
  M(B(C, {
2083
2083
  thin: "",
2084
2084
  flat: "",
2085
2085
  icon: "select_all",
2086
2086
  "aria-label": "Select all matches",
2087
2087
  onClick: f[7] || (f[7] = (m) => V(kr)(e.view))
2088
- }, null, 512), [[v, "Select all matches"]]),
2088
+ }, null, 512), [[g, "Select all matches"]]),
2089
2089
  M(B(C, {
2090
2090
  thin: "",
2091
2091
  flat: "",
@@ -2094,7 +2094,7 @@ var $l = /* @__PURE__ */ g.baseTheme({
2094
2094
  onClick: f[8] || (f[8] = (m) => {
2095
2095
  V(Se)(e.view), e.view.focus();
2096
2096
  })
2097
- }, null, 512), [[v, "Close (Escape)"]])
2097
+ }, null, 512), [[g, "Close (Escape)"]])
2098
2098
  ]),
2099
2099
  !e.readonly && i.value ? (A(), F("div", {
2100
2100
  key: 0,
@@ -2119,14 +2119,14 @@ var $l = /* @__PURE__ */ g.baseTheme({
2119
2119
  icon: "find_replace",
2120
2120
  "aria-label": "Replace next",
2121
2121
  onClick: f[10] || (f[10] = (m) => V(Ve)(e.view))
2122
- }, null, 512), [[v, "Replace next"]]),
2122
+ }, null, 512), [[g, "Replace next"]]),
2123
2123
  M(B(C, {
2124
2124
  thin: "",
2125
2125
  flat: "",
2126
2126
  icon: "published_with_changes",
2127
2127
  "aria-label": "Replace all",
2128
2128
  onClick: f[11] || (f[11] = (m) => V(br)(e.view))
2129
- }, null, 512), [[v, "Replace all"]])
2129
+ }, null, 512), [[g, "Replace all"]])
2130
2130
  ], 8, Hl)) : P("", !0),
2131
2131
  e.query.regexp && e.query.search.length > 0 && !e.query.valid ? (A(), F("span", Ul, "Invalid regular expression")) : P("", !0)
2132
2132
  ], 32);
@@ -2248,7 +2248,7 @@ var Kl = {
2248
2248
  const u = {
2249
2249
  javascript: "JS",
2250
2250
  typescript: "TS"
2251
- }, h = G(() => u[r.language] || r.language.toUpperCase()), f = G(() => r.formatting && !r.singleLine && Jl(r.language)), v = G(() => r.toolbarMode ?? "bar"), m = G(() => !r.terminal && v.value === "hover"), ue = G(() => a.value || i.value || !!(o.value || s.value)), ee = G(() => !r.singleLine), z = new ft(), tt = new ft(), rt = Ge.define();
2251
+ }, h = G(() => u[r.language] || r.language.toUpperCase()), f = G(() => r.formatting && !r.singleLine && Jl(r.language)), g = G(() => r.toolbarMode ?? "bar"), m = G(() => !r.terminal && g.value === "hover"), ue = G(() => a.value || i.value || !!(o.value || s.value)), ee = G(() => !r.singleLine && g.value !== "none"), z = new ft(), tt = new ft(), rt = Ge.define();
2252
2252
  let k, nt = 0, Be = !1;
2253
2253
  async function lt() {
2254
2254
  s.value = "";
@@ -2291,20 +2291,20 @@ var Kl = {
2291
2291
  };
2292
2292
  }
2293
2293
  function at() {
2294
- const p = r.singleLine ? "0" : "0.75em 1ch 1.5em 2ch";
2294
+ const p = r.singleLine ? "0" : "0.7rem";
2295
2295
  return [
2296
2296
  r.dark ? kl : Lr,
2297
2297
  r.lineNumbers && !r.singleLine ? Nr() : [],
2298
2298
  r.folding && !r.singleLine ? [Ur(), ht.of(Jr)] : [],
2299
- r.wrap ? g.lineWrapping : [],
2299
+ r.wrap ? v.lineWrapping : [],
2300
2300
  me.readOnly.of(r.readonly || r.disabled),
2301
- g.editable.of(!r.readonly && !r.disabled),
2302
- g.contentAttributes.of({
2301
+ v.editable.of(!r.readonly && !r.disabled),
2302
+ v.contentAttributes.of({
2303
2303
  "aria-label": r.label || "Code editor",
2304
2304
  "aria-disabled": String(r.disabled)
2305
2305
  }),
2306
2306
  Vr(r.placeholder),
2307
- g.theme({
2307
+ v.theme({
2308
2308
  "&": {
2309
2309
  height: "100%",
2310
2310
  width: "100%",
@@ -2403,7 +2403,7 @@ var Kl = {
2403
2403
  }
2404
2404
  }
2405
2405
  return en(() => {
2406
- k = new g({
2406
+ k = new v({
2407
2407
  parent: l.value,
2408
2408
  state: me.create({
2409
2409
  doc: r.modelValue,
@@ -2426,7 +2426,7 @@ var Kl = {
2426
2426
  gl
2427
2427
  ]),
2428
2428
  me.transactionFilter.of((p) => r.singleLine && p.docChanged && p.newDoc.lines > 1 ? [] : p),
2429
- g.updateListener.of((p) => {
2429
+ v.updateListener.of((p) => {
2430
2430
  p.docChanged && !p.transactions.some((x) => x.annotation(rt)) && n("update:modelValue", p.state.doc.toString()), p.focusChanged && (p.view.hasFocus ? n("focus") : n("blur"));
2431
2431
  })
2432
2432
  ]
@@ -2462,6 +2462,7 @@ var Kl = {
2462
2462
  terminal: e.terminal,
2463
2463
  "toolbar-hover": m.value,
2464
2464
  "toolbar-pinned": ue.value,
2465
+ "toolbar-none": g.value === "none",
2465
2466
  "single-line": e.singleLine
2466
2467
  }]) }, [
2467
2468
  e.terminal && ee.value ? (A(), F("div", Kl, [S("div", Ql, [x[0] || (x[0] = S("span", {
@@ -2525,7 +2526,7 @@ var Kl = {
2525
2526
  ], 2);
2526
2527
  };
2527
2528
  }
2528
- }), da = /* @__PURE__ */ Lt(sa, [["__scopeId", "data-v-33d187ba"]]);
2529
+ }), da = /* @__PURE__ */ Lt(sa, [["__scopeId", "data-v-48eb82db"]]);
2529
2530
  export {
2530
2531
  da as default
2531
2532
  };