@scalar/api-reference 0.5.4 → 0.5.5

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 (2) hide show
  1. package/dist/index.js +66 -66
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  var Yp = Object.defineProperty;
3
3
  var Wp = (n, e, t) => e in n ? Yp(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
4
  var W0 = (n, e, t) => (Wp(n, typeof e != "symbol" ? e + "" : e, t), t);
5
- import { cloneVNode as Lp, h as Ye, Fragment as se, inject as wt, provide as At, ref as L, onMounted as Se, watchEffect as Mt, computed as E, defineComponent as W, onUnmounted as yt, watch as Ge, Teleport as zp, reactive as ln, unref as _, shallowRef as Bp, nextTick as rn, toRaw as qt, getCurrentScope as Ip, onScopeDispose as Hp, toRef as m2, readonly as xs, customRef as Np, getCurrentInstance as Gp, openBlock as Q, createElementBlock as X, createBlock as H, withCtx as Y, createElementVNode as x, createVNode as U, normalizeClass as he, normalizeStyle as Ji, createTextVNode as Ze, toDisplayString as G, createCommentVNode as te, renderSlot as ae, renderList as Ue, createStaticVNode as _s, withDirectives as xe, withModifiers as Fp, vShow as bn, vModelSelect as Dp, vModelText as ft, vModelCheckbox as pl, withKeys as Jp, defineAsyncComponent as v2, pushScopeId as Qs, popScopeId as $s, useCssVars as w2, mergeProps as Kp, resolveDynamicComponent as L0, createSlots as z0, TransitionGroup as eO } from "vue";
5
+ import { cloneVNode as Lp, h as Ye, Fragment as se, inject as wt, provide as Mt, ref as L, onMounted as Se, watchEffect as qt, computed as E, defineComponent as W, onUnmounted as yt, watch as Ge, Teleport as zp, reactive as ln, unref as _, shallowRef as Bp, nextTick as rn, toRaw as Zt, getCurrentScope as Ip, onScopeDispose as Hp, toRef as m2, readonly as xs, customRef as Np, getCurrentInstance as Gp, openBlock as Q, createElementBlock as X, createBlock as H, withCtx as Y, createElementVNode as x, createVNode as U, normalizeClass as he, normalizeStyle as Ji, createTextVNode as Ze, toDisplayString as G, createCommentVNode as te, renderSlot as ae, renderList as Ue, createStaticVNode as _s, withDirectives as xe, withModifiers as Fp, vShow as bn, vModelSelect as Dp, vModelText as ft, vModelCheckbox as pl, withKeys as Jp, defineAsyncComponent as v2, pushScopeId as Qs, popScopeId as $s, useCssVars as w2, mergeProps as Kp, resolveDynamicComponent as L0, createSlots as z0, TransitionGroup as eO } from "vue";
6
6
  import tO from "rehype-document";
7
7
  import nO from "rehype-format";
8
8
  import rO, { defaultSchema as B0 } from "rehype-sanitize";
@@ -153,7 +153,7 @@ function A1() {
153
153
  return wt(S2, null);
154
154
  }
155
155
  function k2(n) {
156
- At(S2, n);
156
+ Mt(S2, n);
157
157
  }
158
158
  function I0(n, e) {
159
159
  if (n)
@@ -166,7 +166,7 @@ function M1(n, e) {
166
166
  let t = L(I0(n.value.type, n.value.as));
167
167
  return Se(() => {
168
168
  t.value = I0(n.value.type, n.value.as);
169
- }), Mt(() => {
169
+ }), qt(() => {
170
170
  var r;
171
171
  t.value || K(e) && K(e) instanceof HTMLButtonElement && !((r = K(e)) != null && r.hasAttribute("type")) && (t.value = "button");
172
172
  }), t;
@@ -288,12 +288,12 @@ function Nt(n, e, { sorted: t = !0, relativeTo: r = null, skipElements: i = [] }
288
288
  return e & 6 && _O(f) && f.select(), 2;
289
289
  }
290
290
  function N0(n, e, t) {
291
- Ps.isServer || Mt((r) => {
291
+ Ps.isServer || qt((r) => {
292
292
  document.addEventListener(n, e, t), r(() => document.removeEventListener(n, e, t));
293
293
  });
294
294
  }
295
295
  function _2(n, e, t) {
296
- Ps.isServer || Mt((r) => {
296
+ Ps.isServer || qt((r) => {
297
297
  window.addEventListener(n, e, t), r(() => window.removeEventListener(n, e, t));
298
298
  });
299
299
  }
@@ -409,7 +409,7 @@ function TO() {
409
409
  }), n;
410
410
  }
411
411
  function Z2(n, e, t, r) {
412
- Ps.isServer || Mt((i) => {
412
+ Ps.isServer || qt((i) => {
413
413
  n = n ?? window, n.addEventListener(e, t, r), i(() => n.removeEventListener(e, t, r));
414
414
  });
415
415
  }
@@ -494,7 +494,7 @@ function ZO(n) {
494
494
  function XO({ ownerDocument: n }, e) {
495
495
  let t = ZO(e);
496
496
  Se(() => {
497
- Mt(() => {
497
+ qt(() => {
498
498
  var r, i;
499
499
  e.value || ((r = n.value) == null ? void 0 : r.activeElement) === ((i = n.value) == null ? void 0 : i.body) && or(t());
500
500
  }, { flush: "post" });
@@ -550,7 +550,7 @@ function A2(n, e) {
550
550
  }
551
551
  let gl = /* @__PURE__ */ new Map(), ci = /* @__PURE__ */ new Map();
552
552
  function F0(n, e = L(!0)) {
553
- Mt((t) => {
553
+ qt((t) => {
554
554
  var r;
555
555
  if (!e.value)
556
556
  return;
@@ -576,7 +576,7 @@ function MO() {
576
576
  return wt(M2, !1);
577
577
  }
578
578
  let ia = W({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(n, { slots: e, attrs: t }) {
579
- return At(M2, n.force), () => {
579
+ return Mt(M2, n.force), () => {
580
580
  let { force: r, ...i } = n;
581
581
  return Me({ theirProps: i, ourProps: {}, slot: {}, slots: e, attrs: t, name: "ForcePortalRoot" });
582
582
  };
@@ -596,7 +596,7 @@ function qO(n) {
596
596
  }
597
597
  let q2 = W({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(n, { slots: e, attrs: t }) {
598
598
  let r = L(null), i = E(() => wr(r)), o = MO(), s = wt(U2, null), l = L(o === !0 || s == null ? qO(r.value) : s.resolveTarget());
599
- Mt(() => {
599
+ qt(() => {
600
600
  o || s != null && (l.value = s.resolveTarget());
601
601
  });
602
602
  let a = wt(oa, null);
@@ -625,7 +625,7 @@ function UO() {
625
625
  }
626
626
  let i = { register: t, unregister: r, portals: e };
627
627
  return [e, W({ name: "PortalWrapper", setup(o, { slots: s }) {
628
- return At(oa, i), () => {
628
+ return Mt(oa, i), () => {
629
629
  var l;
630
630
  return (l = s.default) == null ? void 0 : l.call(s);
631
631
  };
@@ -635,7 +635,7 @@ let U2 = Symbol("PortalGroupContext"), EO = W({ name: "PortalGroup", props: { as
635
635
  let r = ln({ resolveTarget() {
636
636
  return n.target;
637
637
  } });
638
- return At(U2, r), () => {
638
+ return Mt(U2, r), () => {
639
639
  let { target: i, ...o } = n;
640
640
  return Me({ theirProps: o, ourProps: {}, slot: {}, attrs: e, slots: t, name: "PortalGroup" });
641
641
  };
@@ -656,7 +656,7 @@ function VO({ type: n, enabled: e, element: t, onUpdate: r }) {
656
656
  }, { immediate: !0, flush: "sync" });
657
657
  }), yt(() => {
658
658
  e.value && o(1, n, t);
659
- }), At(E2, o);
659
+ }), Mt(E2, o);
660
660
  }
661
661
  let j2 = Symbol("DescriptionContext");
662
662
  function YO() {
@@ -673,7 +673,7 @@ function WO({ slot: n = L({}), name: e = "Description", props: t = {} } = {}) {
673
673
  s !== -1 && r.value.splice(s, 1);
674
674
  };
675
675
  }
676
- return At(j2, { register: i, slot: n, name: e, props: t }), E(() => r.value.length > 0 ? r.value.join(" ") : void 0);
676
+ return Mt(j2, { register: i, slot: n, name: e, props: t }), E(() => r.value.length > 0 ? r.value.join(" ") : void 0);
677
677
  }
678
678
  let LO = W({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${St()}` } }, setup(n, { attrs: e, slots: t }) {
679
679
  let r = YO();
@@ -851,7 +851,7 @@ let fo = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", V2 = W({ name: "Dialog", inheri
851
851
  }, close() {
852
852
  e("close", !1);
853
853
  } };
854
- At(la, I);
854
+ Mt(la, I);
855
855
  let oe = E(() => !(!f.value || O.value));
856
856
  Q2(k, (Oe, we) => {
857
857
  I.close(), rn(() => we == null ? void 0 : we.focus());
@@ -864,7 +864,7 @@ let fo = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", V2 = W({ name: "Dialog", inheri
864
864
  return FO(h, De, (Oe) => {
865
865
  var we;
866
866
  return { containers: [...(we = Oe.containers) != null ? we : [], k] };
867
- }), Mt((Oe) => {
867
+ }), qt((Oe) => {
868
868
  if (d.value !== 0)
869
869
  return;
870
870
  let we = K(u);
@@ -945,7 +945,7 @@ let t3 = W({ name: "Disclosure", props: { as: { type: [Object, String], default:
945
945
  let a = (() => l ? l instanceof HTMLElement ? l : l.value instanceof HTMLElement ? K(l) : K(s.button) : K(s.button))();
946
946
  a == null || a.focus();
947
947
  } };
948
- return At(z2, s), k2(E(() => ze(r.value, { 0: $t.Open, 1: $t.Closed }))), () => {
948
+ return Mt(z2, s), k2(E(() => ze(r.value, { 0: $t.Open, 1: $t.Closed }))), () => {
949
949
  let { defaultOpen: l, ...a } = n, c = { open: r.value === 0, close: s.close };
950
950
  return Me({ theirProps: a, ourProps: {}, slot: c, slots: e, attrs: t, name: "Disclosure" });
951
951
  };
@@ -957,7 +957,7 @@ let t3 = W({ name: "Disclosure", props: { as: { type: [Object, String], default:
957
957
  i.buttonId.value = null;
958
958
  });
959
959
  let o = e3(), s = E(() => o === null ? !1 : o.value === i.panelId.value), l = L(null);
960
- r({ el: l, $el: l }), s.value || Mt(() => {
960
+ r({ el: l, $el: l }), s.value || qt(() => {
961
961
  i.button.value = l.value;
962
962
  });
963
963
  let a = M1(E(() => ({ as: n.as, type: e.type })), l);
@@ -1000,7 +1000,7 @@ let t3 = W({ name: "Disclosure", props: { as: { type: [Object, String], default:
1000
1000
  i.panelId.value = n.id;
1001
1001
  }), yt(() => {
1002
1002
  i.panelId.value = null;
1003
- }), r({ el: i.panel, $el: i.panel }), At(B2, i.panelId);
1003
+ }), r({ el: i.panel, $el: i.panel }), Mt(B2, i.panelId);
1004
1004
  let o = A1(), s = E(() => o !== null ? (o.value & $t.Open) === $t.Open : i.disclosureState.value === 0);
1005
1005
  return () => {
1006
1006
  let l = { open: i.disclosureState.value === 0, close: i.close }, { id: a, ...c } = n, u = { id: a, ref: i.panel };
@@ -1107,14 +1107,14 @@ let h3 = W({ name: "Listbox", emits: { "update:modelValue": (n) => !0 }, props:
1107
1107
  a.value = $.options, u.value = $.activeOptionIndex, h.value = 1;
1108
1108
  }, select(k) {
1109
1109
  n.disabled || m(ze(f.value, { 0: () => k, 1: () => {
1110
- let $ = qt(v.value.value).slice(), P = qt(k), R = $.findIndex((A) => v.compare(P, qt(A)));
1110
+ let $ = Zt(v.value.value).slice(), P = Zt(k), R = $.findIndex((A) => v.compare(P, Zt(A)));
1111
1111
  return R === -1 ? $.push(P) : $.splice(R, 1), $;
1112
1112
  } }));
1113
1113
  } };
1114
1114
  Q2([s, l], (k, $) => {
1115
1115
  var P;
1116
1116
  v.closeListbox(), x2($, q1.Loose) || (k.preventDefault(), (P = K(s)) == null || P.focus());
1117
- }, E(() => i.value === 0)), At(I2, v), k2(E(() => ze(i.value, { 0: $t.Open, 1: $t.Closed })));
1117
+ }, E(() => i.value === 0)), Mt(I2, v), k2(E(() => ze(i.value, { 0: $t.Open, 1: $t.Closed })));
1118
1118
  let b = E(() => {
1119
1119
  var k;
1120
1120
  return (k = K(s)) == null ? void 0 : k.closest("form");
@@ -1241,10 +1241,10 @@ let d3 = W({ name: "ListboxButton", props: { as: { type: [Object, String], defau
1241
1241
  } }), p3 = W({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-listbox.option-${St()}` } }, setup(n, { slots: e, attrs: t, expose: r }) {
1242
1242
  let i = eo("ListboxOption"), o = L(null);
1243
1243
  r({ el: o, $el: o });
1244
- let s = E(() => i.activeOptionIndex.value !== null ? i.options.value[i.activeOptionIndex.value].id === n.id : !1), l = E(() => ze(i.mode.value, { 0: () => i.compare(qt(i.value.value), qt(n.value)), 1: () => qt(i.value.value).some((b) => i.compare(qt(b), qt(n.value))) })), a = E(() => ze(i.mode.value, { 1: () => {
1244
+ let s = E(() => i.activeOptionIndex.value !== null ? i.options.value[i.activeOptionIndex.value].id === n.id : !1), l = E(() => ze(i.mode.value, { 0: () => i.compare(Zt(i.value.value), Zt(n.value)), 1: () => Zt(i.value.value).some((b) => i.compare(Zt(b), Zt(n.value))) })), a = E(() => ze(i.mode.value, { 1: () => {
1245
1245
  var b;
1246
- let k = qt(i.value.value);
1247
- return ((b = i.options.value.find(($) => k.some((P) => i.compare(qt(P), qt($.dataRef.value))))) == null ? void 0 : b.id) === n.id;
1246
+ let k = Zt(i.value.value);
1247
+ return ((b = i.options.value.find(($) => k.some((P) => i.compare(Zt(P), Zt($.dataRef.value))))) == null ? void 0 : b.id) === n.id;
1248
1248
  }, 0: () => l.value })), c = o3(o), u = E(() => ({ disabled: n.disabled, value: n.value, get textValue() {
1249
1249
  return c();
1250
1250
  }, domRef: o }));
@@ -1256,7 +1256,7 @@ let d3 = W({ name: "ListboxButton", props: { as: { type: [Object, String], defau
1256
1256
  i.goToOption(pt.Specific, n.id);
1257
1257
  } });
1258
1258
  }, { immediate: !0 });
1259
- }), Mt(() => {
1259
+ }), qt(() => {
1260
1260
  i.listboxState.value === 0 && s.value && i.activationTrigger.value !== 0 && rn(() => {
1261
1261
  var b, k;
1262
1262
  return (k = (b = K(o)) == null ? void 0 : b.scrollIntoView) == null ? void 0 : k.call(b, { block: "nearest" });
@@ -1361,18 +1361,18 @@ let j1 = Symbol("TabsSSRContext"), N2 = W({ name: "TabGroup", emits: { change: (
1361
1361
  let v = l.value.indexOf(m);
1362
1362
  v !== -1 && l.value.splice(v, 1);
1363
1363
  } };
1364
- At(H2, h);
1364
+ Mt(H2, h);
1365
1365
  let d = L({ tabs: [], panels: [] }), f = L(!1);
1366
1366
  Se(() => {
1367
1367
  f.value = !0;
1368
- }), At(j1, E(() => f.value ? null : d.value));
1368
+ }), Mt(j1, E(() => f.value ? null : d.value));
1369
1369
  let O = E(() => n.selectedIndex);
1370
1370
  return Se(() => {
1371
1371
  Ge([O], () => {
1372
1372
  var m;
1373
1373
  return u((m = n.selectedIndex) != null ? m : n.defaultIndex);
1374
1374
  }, { immediate: !0 });
1375
- }), Mt(() => {
1375
+ }), qt(() => {
1376
1376
  if (!a.value || c.value == null || h.tabs.value.length <= 0)
1377
1377
  return;
1378
1378
  let m = Gn(h.tabs.value, K);
@@ -2725,7 +2725,7 @@ function hr(n, e = {}) {
2725
2725
  }, l = () => {
2726
2726
  r.value && (s(), i = t.matchMedia(R3(n).value), o.value = !!(i != null && i.matches), i && ("addEventListener" in i ? i.addEventListener("change", l) : i.addListener(l)));
2727
2727
  };
2728
- return Mt(l), Y1(() => s()), o;
2728
+ return qt(l), Y1(() => s()), o;
2729
2729
  }
2730
2730
  var ec = Object.getOwnPropertySymbols, M3 = Object.prototype.hasOwnProperty, q3 = Object.prototype.propertyIsEnumerable, U3 = (n, e) => {
2731
2731
  var t = {};
@@ -10283,12 +10283,12 @@ function tf(n) {
10283
10283
  return { left: e, right: t, top: r, bottom: i };
10284
10284
  }
10285
10285
  const yi = /* @__PURE__ */ ne.define();
10286
- class Xt {
10286
+ class Rt {
10287
10287
  constructor(e, t, r, i) {
10288
10288
  this.fromA = e, this.toA = t, this.fromB = r, this.toB = i;
10289
10289
  }
10290
10290
  join(e) {
10291
- return new Xt(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB));
10291
+ return new Rt(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB));
10292
10292
  }
10293
10293
  addToSet(e) {
10294
10294
  let t = e.length, r = this;
@@ -10310,13 +10310,13 @@ class Xt {
10310
10310
  let a = i == e.length ? null : e[i], c = s - l, u = a ? a.fromB : 1e9;
10311
10311
  for (; o < t.length && t[o] < u; ) {
10312
10312
  let h = t[o], d = t[o + 1], f = Math.max(l, h), O = Math.min(u, d);
10313
- if (f <= O && new Xt(f + c, O + c, f, O).addToSet(r), d > u)
10313
+ if (f <= O && new Rt(f + c, O + c, f, O).addToSet(r), d > u)
10314
10314
  break;
10315
10315
  o += 2;
10316
10316
  }
10317
10317
  if (!a)
10318
10318
  return r;
10319
- new Xt(a.fromA, a.toA, a.fromB, a.toB).addToSet(r), s = a.toA, l = a.toB;
10319
+ new Rt(a.fromA, a.toA, a.fromB, a.toB).addToSet(r), s = a.toA, l = a.toB;
10320
10320
  }
10321
10321
  }
10322
10322
  }
@@ -10326,7 +10326,7 @@ class ds {
10326
10326
  for (let o of r)
10327
10327
  this.changes = this.changes.compose(o.changes);
10328
10328
  let i = [];
10329
- this.changes.iterChangedRanges((o, s, l, a) => i.push(new Xt(o, s, l, a))), this.changedRanges = i;
10329
+ this.changes.iterChangedRanges((o, s, l, a) => i.push(new Rt(o, s, l, a))), this.changedRanges = i;
10330
10330
  }
10331
10331
  /**
10332
10332
  @internal
@@ -10665,7 +10665,7 @@ class Ac extends Te {
10665
10665
  return this.view.state.doc.length;
10666
10666
  }
10667
10667
  constructor(e) {
10668
- super(), this.view = e, this.decorations = [], this.dynamicDecorationMap = [], this.hasComposition = null, this.markedForComposition = /* @__PURE__ */ new Set(), this.minWidth = 0, this.minWidthFrom = 0, this.minWidthTo = 0, this.impreciseAnchor = null, this.impreciseHead = null, this.forceSelection = !1, this.lastUpdate = Date.now(), this.setDOM(e.contentDOM), this.children = [new Ot()], this.children[0].setParent(this), this.updateDeco(), this.updateInner([new Xt(0, 0, 0, e.state.doc.length)], 0, null);
10668
+ super(), this.view = e, this.decorations = [], this.dynamicDecorationMap = [], this.hasComposition = null, this.markedForComposition = /* @__PURE__ */ new Set(), this.minWidth = 0, this.minWidthFrom = 0, this.minWidthTo = 0, this.impreciseAnchor = null, this.impreciseHead = null, this.forceSelection = !1, this.lastUpdate = Date.now(), this.setDOM(e.contentDOM), this.children = [new Ot()], this.children[0].setParent(this), this.updateDeco(), this.updateInner([new Rt(0, 0, 0, e.state.doc.length)], 0, null);
10669
10669
  }
10670
10670
  // Update the document view to a given state.
10671
10671
  update(e) {
@@ -10675,11 +10675,11 @@ class Ac extends Te {
10675
10675
  if (this.hasComposition) {
10676
10676
  this.markedForComposition.clear();
10677
10677
  let { from: l, to: a } = this.hasComposition;
10678
- t = new Xt(l, a, e.changes.mapPos(l, -1), e.changes.mapPos(a, 1)).addToSet(t.slice());
10678
+ t = new Rt(l, a, e.changes.mapPos(l, -1), e.changes.mapPos(a, 1)).addToSet(t.slice());
10679
10679
  }
10680
10680
  this.hasComposition = r ? { from: r.range.fromB, to: r.range.toB } : null, (F.ie || F.chrome) && !r && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0);
10681
10681
  let i = this.decorations, o = this.updateDeco(), s = mg(i, o, e.changes);
10682
- return t = Xt.extendWithRanges(t, s), !(this.flags & 7) && t.length == 0 ? !1 : (this.updateInner(t, e.startState.doc.length, r), e.transactions.length && (this.lastUpdate = Date.now()), !0);
10682
+ return t = Rt.extendWithRanges(t, s), !(this.flags & 7) && t.length == 0 ? !1 : (this.updateInner(t, e.startState.doc.length, r), e.transactions.length && (this.lastUpdate = Date.now()), !0);
10683
10683
  }
10684
10684
  // Used by update and the constructor do perform the actual DOM
10685
10685
  // update
@@ -11019,7 +11019,7 @@ function pg(n, e) {
11019
11019
  let { main: c } = n.state.selection;
11020
11020
  if (n.state.doc.sliceString(s, l) != a || s > c.head || l < c.head)
11021
11021
  return null;
11022
- let u = [], h = new Xt(r, i, s, l);
11022
+ let u = [], h = new Rt(r, i, s, l);
11023
11023
  for (let d = o.parentNode; ; d = d.parentNode) {
11024
11024
  let f = Te.get(d);
11025
11025
  if (f instanceof Sn)
@@ -12301,7 +12301,7 @@ class Jc {
12301
12301
  constructor(e) {
12302
12302
  this.state = e, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scrollTop = 0, this.scrolledToBottom = !0, this.scaleX = 1, this.scaleY = 1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = Kc, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = ut.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1;
12303
12303
  let t = e.facet(t0).some((r) => typeof r != "function" && r.class == "cm-lineWrapping");
12304
- this.heightOracle = new Lg(t), this.stateDeco = e.facet(Ui).filter((r) => typeof r != "function"), this.heightMap = vt.empty().applyChanges(this.stateDeco, ve.empty, this.heightOracle.setDoc(e.doc), [new Xt(0, 0, 0, e.doc.length)]), this.viewport = this.getViewport(0, null), this.updateViewportLines(), this.updateForViewport(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = nt.set(this.lineGaps.map((r) => r.draw(this, !1))), this.computeVisibleRanges();
12304
+ this.heightOracle = new Lg(t), this.stateDeco = e.facet(Ui).filter((r) => typeof r != "function"), this.heightMap = vt.empty().applyChanges(this.stateDeco, ve.empty, this.heightOracle.setDoc(e.doc), [new Rt(0, 0, 0, e.doc.length)]), this.viewport = this.getViewport(0, null), this.updateViewportLines(), this.updateForViewport(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = nt.set(this.lineGaps.map((r) => r.draw(this, !1))), this.computeVisibleRanges();
12305
12305
  }
12306
12306
  updateForViewport() {
12307
12307
  let e = [this.viewport], { main: t } = this.state.selection;
@@ -12323,7 +12323,7 @@ class Jc {
12323
12323
  this.state = e.state;
12324
12324
  let r = this.stateDeco;
12325
12325
  this.stateDeco = this.state.facet(Ui).filter((u) => typeof u != "function");
12326
- let i = e.changedRanges, o = Xt.extendWithRanges(i, Hg(r, this.stateDeco, e ? e.changes : tt.empty(this.state.doc.length))), s = this.heightMap.height, l = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop);
12326
+ let i = e.changedRanges, o = Rt.extendWithRanges(i, Hg(r, this.stateDeco, e ? e.changes : tt.empty(this.state.doc.length))), s = this.heightMap.height, l = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop);
12327
12327
  this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), o), this.heightMap.height != s && (e.flags |= 2), l ? (this.scrollAnchorPos = e.changes.mapPos(l.from, -1), this.scrollAnchorHeight = l.top) : (this.scrollAnchorPos = -1, this.scrollAnchorHeight = this.heightMap.height);
12328
12328
  let a = o.length ? this.mapViewport(this.viewport, e.changes) : this.viewport;
12329
12329
  (t && (t.range.head < a.from || t.range.head > a.to) || !this.viewportIsAppropriate(a)) && (a = this.getViewport(0, t));
@@ -12359,7 +12359,7 @@ class Jc {
12359
12359
  m > 0 && v > 0 ? u = Math.max(m, v) : m < 0 && v < 0 && (u = Math.min(m, v)), i.heightChanged = !1;
12360
12360
  for (let R of this.viewports) {
12361
12361
  let A = R.from == this.viewport.from ? P : e.docView.measureVisibleLineHeights(R);
12362
- this.heightMap = (s ? vt.empty().applyChanges(this.stateDeco, ve.empty, this.heightOracle, [new Xt(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, s, new zg(R.from, A));
12362
+ this.heightMap = (s ? vt.empty().applyChanges(this.stateDeco, ve.empty, this.heightOracle, [new Rt(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, s, new zg(R.from, A));
12363
12363
  }
12364
12364
  i.heightChanged && (c |= 2);
12365
12365
  }
@@ -14500,7 +14500,7 @@ function o0(n) {
14500
14500
  });
14501
14501
  }
14502
14502
  const s0 = /* @__PURE__ */ new ge();
14503
- class Zt {
14503
+ class Xt {
14504
14504
  /**
14505
14505
  Construct a language object. If you need to invoke this
14506
14506
  directly, first define a data facet with
@@ -14582,7 +14582,7 @@ class Zt {
14582
14582
  return !0;
14583
14583
  }
14584
14584
  }
14585
- Zt.setState = /* @__PURE__ */ We.define();
14585
+ Xt.setState = /* @__PURE__ */ We.define();
14586
14586
  function du(n, e, t) {
14587
14587
  let r = n.facet(Fr), i = sn(n).topNode;
14588
14588
  if (!r || r.allowsNesting)
@@ -14590,7 +14590,7 @@ function du(n, e, t) {
14590
14590
  o.type.isTop && (i = o);
14591
14591
  return i;
14592
14592
  }
14593
- class gr extends Zt {
14593
+ class gr extends Xt {
14594
14594
  constructor(e, t, r) {
14595
14595
  super(e, t, [], r), this.parser = t;
14596
14596
  }
@@ -14615,7 +14615,7 @@ class gr extends Zt {
14615
14615
  }
14616
14616
  }
14617
14617
  function sn(n) {
14618
- let e = n.field(Zt.state, !1);
14618
+ let e = n.field(Xt.state, !1);
14619
14619
  return e ? e.tree : Qe.empty;
14620
14620
  }
14621
14621
  class C7 {
@@ -14812,11 +14812,11 @@ class Gr {
14812
14812
  return r.work(20, t) || r.takeTree(), new Gr(r);
14813
14813
  }
14814
14814
  }
14815
- Zt.state = /* @__PURE__ */ Ln.define({
14815
+ Xt.state = /* @__PURE__ */ Ln.define({
14816
14816
  create: Gr.init,
14817
14817
  update(n, e) {
14818
14818
  for (let t of e.effects)
14819
- if (t.is(Zt.setState))
14819
+ if (t.is(Xt.setState))
14820
14820
  return t.value;
14821
14821
  return e.startState.facet(Fr) != e.state.facet(Fr) ? Gr.init(e.state) : n.apply(e);
14822
14822
  }
@@ -14847,13 +14847,13 @@ const Al = typeof navigator < "u" && (!((Rl = navigator.scheduling) === null ||
14847
14847
  this.view = e, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork();
14848
14848
  }
14849
14849
  update(e) {
14850
- let t = this.view.state.field(Zt.state).context;
14850
+ let t = this.view.state.field(Xt.state).context;
14851
14851
  (t.updateViewport(e.view.viewport) || this.view.viewport.to > t.treeLen) && this.scheduleWork(), e.docChanged && (this.view.hasFocus && (this.chunkBudget += 50), this.scheduleWork()), this.checkAsyncSchedule(t);
14852
14852
  }
14853
14853
  scheduleWork() {
14854
14854
  if (this.working)
14855
14855
  return;
14856
- let { state: e } = this.view, t = e.field(Zt.state);
14856
+ let { state: e } = this.view, t = e.field(Xt.state);
14857
14857
  (t.tree != t.context.tree || !t.context.isDone(e.doc.length)) && (this.working = Qf(this.work));
14858
14858
  }
14859
14859
  work(e) {
@@ -14861,14 +14861,14 @@ const Al = typeof navigator < "u" && (!((Rl = navigator.scheduling) === null ||
14861
14861
  let t = Date.now();
14862
14862
  if (this.chunkEnd < t && (this.chunkEnd < 0 || this.view.hasFocus) && (this.chunkEnd = t + 3e4, this.chunkBudget = 3e3), this.chunkBudget <= 0)
14863
14863
  return;
14864
- let { state: r, viewport: { to: i } } = this.view, o = r.field(Zt.state);
14864
+ let { state: r, viewport: { to: i } } = this.view, o = r.field(Xt.state);
14865
14865
  if (o.tree == o.context.tree && o.context.isDone(
14866
14866
  i + 1e5
14867
14867
  /* MaxParseAhead */
14868
14868
  ))
14869
14869
  return;
14870
14870
  let s = Date.now() + Math.min(this.chunkBudget, 100, e && !Al ? Math.max(25, e.timeRemaining() - 5) : 1e9), l = o.context.treeLen < i && r.doc.length > i + 1e3, a = o.context.work(() => Al && Al() || Date.now() > s, i + (l ? 0 : 1e5));
14871
- this.chunkBudget -= Date.now() - t, (a || this.chunkBudget <= 0) && (o.context.takeTree(), this.view.dispatch({ effects: Zt.setState.of(new Gr(o.context)) })), this.chunkBudget > 0 && !(a && !l) && this.scheduleWork(), this.checkAsyncSchedule(o.context);
14871
+ this.chunkBudget -= Date.now() - t, (a || this.chunkBudget <= 0) && (o.context.takeTree(), this.view.dispatch({ effects: Xt.setState.of(new Gr(o.context)) })), this.chunkBudget > 0 && !(a && !l) && this.scheduleWork(), this.checkAsyncSchedule(o.context);
14872
14872
  }
14873
14873
  checkAsyncSchedule(e) {
14874
14874
  e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((t) => Mn(this.view.state, t)).then(() => this.workScheduled--), e.scheduleOn = null);
@@ -14888,7 +14888,7 @@ const Al = typeof navigator < "u" && (!((Rl = navigator.scheduling) === null ||
14888
14888
  return n.length ? n[0] : null;
14889
14889
  },
14890
14890
  enables: (n) => [
14891
- Zt.state,
14891
+ Xt.state,
14892
14892
  Z7,
14893
14893
  le.contentAttributes.compute([n], (e) => {
14894
14894
  let t = e.facet(n);
@@ -14961,7 +14961,7 @@ class Ys {
14961
14961
  return (r || (r = /* @__PURE__ */ Object.create(null)))["." + a] = l, a;
14962
14962
  }
14963
14963
  const o = typeof t.all == "string" ? t.all : t.all ? i(t.all) : void 0, s = t.scope;
14964
- this.scope = s instanceof Zt ? (l) => l.prop(ir) == s.data : s ? (l) => l == s : void 0, this.style = fd(e.map((l) => ({
14964
+ this.scope = s instanceof Xt ? (l) => l.prop(ir) == s.data : s ? (l) => l == s : void 0, this.style = fd(e.map((l) => ({
14965
14965
  tag: l.tag,
14966
14966
  class: l.class || i(Object.assign({}, l, { tag: null }))
14967
14967
  })), {
@@ -15177,7 +15177,7 @@ function j7(n) {
15177
15177
  return e;
15178
15178
  }
15179
15179
  const Ou = /* @__PURE__ */ new WeakMap();
15180
- class dt extends Zt {
15180
+ class dt extends Xt {
15181
15181
  constructor(e) {
15182
15182
  let t = o0(e.languageData), r = E7(e), i, o = new class extends N1 {
15183
15183
  createParse(s, l, a) {
@@ -19884,7 +19884,7 @@ const Lu = _5({
19884
19884
  const s = () => {
19885
19885
  const h = [];
19886
19886
  return h.push(le.editorAttributes.of({ class: o.join(" ") })), r.extensions && r.extensions.forEach((d) => {
19887
- h.push(d);
19887
+ h.push(Zt(d));
19888
19888
  }), r.readOnly && h.push(le.editable.of(!1)), r.languages && r.languages.filter((d) => typeof i[d] < "u").forEach((d) => {
19889
19889
  h.push(i[d]);
19890
19890
  }), r.lineNumbers && h.push(P7()), r.withVariables && h.push(Z9()), r.disableEnter && h.push(
@@ -21991,22 +21991,22 @@ const { toString: Jv } = Object.prototype, { getPrototypeOf: S0 } = Object, Js =
21991
21991
  return n[t] || (n[t] = t.slice(8, -1).toLowerCase());
21992
21992
  })(/* @__PURE__ */ Object.create(null)), cn = (n) => (n = n.toLowerCase(), (e) => Js(e) === n), Ks = (n) => (e) => typeof e === n, { isArray: ii } = Array, Ii = Ks("undefined");
21993
21993
  function Kv(n) {
21994
- return n !== null && !Ii(n) && n.constructor !== null && !Ii(n.constructor) && Rt(n.constructor.isBuffer) && n.constructor.isBuffer(n);
21994
+ return n !== null && !Ii(n) && n.constructor !== null && !Ii(n.constructor) && At(n.constructor.isBuffer) && n.constructor.isBuffer(n);
21995
21995
  }
21996
21996
  const W5 = cn("ArrayBuffer");
21997
21997
  function ew(n) {
21998
21998
  let e;
21999
21999
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer && W5(n.buffer), e;
22000
22000
  }
22001
- const tw = Ks("string"), Rt = Ks("function"), L5 = Ks("number"), el = (n) => n !== null && typeof n == "object", nw = (n) => n === !0 || n === !1, Ho = (n) => {
22001
+ const tw = Ks("string"), At = Ks("function"), L5 = Ks("number"), el = (n) => n !== null && typeof n == "object", nw = (n) => n === !0 || n === !1, Ho = (n) => {
22002
22002
  if (Js(n) !== "object")
22003
22003
  return !1;
22004
22004
  const e = S0(n);
22005
22005
  return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in n) && !(Symbol.iterator in n);
22006
- }, rw = cn("Date"), iw = cn("File"), ow = cn("Blob"), sw = cn("FileList"), lw = (n) => el(n) && Rt(n.pipe), aw = (n) => {
22006
+ }, rw = cn("Date"), iw = cn("File"), ow = cn("Blob"), sw = cn("FileList"), lw = (n) => el(n) && At(n.pipe), aw = (n) => {
22007
22007
  let e;
22008
- return n && (typeof FormData == "function" && n instanceof FormData || Rt(n.append) && ((e = Js(n)) === "formdata" || // detect form-data instance
22009
- e === "object" && Rt(n.toString) && n.toString() === "[object FormData]"));
22008
+ return n && (typeof FormData == "function" && n instanceof FormData || At(n.append) && ((e = Js(n)) === "formdata" || // detect form-data instance
22009
+ e === "object" && At(n.toString) && n.toString() === "[object FormData]"));
22010
22010
  }, cw = cn("URLSearchParams"), uw = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
22011
22011
  function co(n, e, { allOwnKeys: t = !1 } = {}) {
22012
22012
  if (n === null || typeof n > "u")
@@ -22042,7 +22042,7 @@ function p1() {
22042
22042
  return e;
22043
22043
  }
22044
22044
  const hw = (n, e, t, { allOwnKeys: r } = {}) => (co(e, (i, o) => {
22045
- t && Rt(i) ? n[o] = Y5(i, t) : n[o] = i;
22045
+ t && At(i) ? n[o] = Y5(i, t) : n[o] = i;
22046
22046
  }, { allOwnKeys: r }), n), dw = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), fw = (n, e, t, r) => {
22047
22047
  n.prototype = Object.create(e.prototype, r), n.prototype.constructor = n, Object.defineProperty(n, "super", {
22048
22048
  value: e.prototype
@@ -22099,10 +22099,10 @@ const hw = (n, e, t, { allOwnKeys: r } = {}) => (co(e, (i, o) => {
22099
22099
  }), Object.defineProperties(n, r);
22100
22100
  }, kw = (n) => {
22101
22101
  H5(n, (e, t) => {
22102
- if (Rt(n) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
22102
+ if (At(n) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
22103
22103
  return !1;
22104
22104
  const r = n[t];
22105
- if (Rt(r)) {
22105
+ if (At(r)) {
22106
22106
  if (e.enumerable = !1, "writable" in e) {
22107
22107
  e.writable = !1;
22108
22108
  return;
@@ -22132,7 +22132,7 @@ const hw = (n, e, t, { allOwnKeys: r } = {}) => (co(e, (i, o) => {
22132
22132
  return t;
22133
22133
  };
22134
22134
  function Pw(n) {
22135
- return !!(n && Rt(n.append) && n[Symbol.toStringTag] === "FormData" && n[Symbol.iterator]);
22135
+ return !!(n && At(n.append) && n[Symbol.toStringTag] === "FormData" && n[Symbol.iterator]);
22136
22136
  }
22137
22137
  const Tw = (n) => {
22138
22138
  const e = new Array(10), t = (r, i) => {
@@ -22151,7 +22151,7 @@ const Tw = (n) => {
22151
22151
  return r;
22152
22152
  };
22153
22153
  return t(n, 0);
22154
- }, Cw = cn("AsyncFunction"), Zw = (n) => n && (el(n) || Rt(n)) && Rt(n.then) && Rt(n.catch), M = {
22154
+ }, Cw = cn("AsyncFunction"), Zw = (n) => n && (el(n) || At(n)) && At(n.then) && At(n.catch), M = {
22155
22155
  isArray: ii,
22156
22156
  isArrayBuffer: W5,
22157
22157
  isBuffer: Kv,
@@ -22167,7 +22167,7 @@ const Tw = (n) => {
22167
22167
  isFile: iw,
22168
22168
  isBlob: ow,
22169
22169
  isRegExp: Sw,
22170
- isFunction: Rt,
22170
+ isFunction: At,
22171
22171
  isStream: lw,
22172
22172
  isURLSearchParams: cw,
22173
22173
  isTypedArray: mw,
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "documentation",
12
12
  "component"
13
13
  ],
14
- "version": "0.5.4",
14
+ "version": "0.5.5",
15
15
  "author": "Scalar (https://github.com/scalar)",
16
16
  "homepage": "https://github.com/scalar/scalar",
17
17
  "repository": {
@@ -57,12 +57,12 @@
57
57
  "typographic-base": "1.0.4",
58
58
  "unified": "10.1.2",
59
59
  "xmldom": "0.6.0",
60
- "@scalar/api-client": "0.5.3",
60
+ "@scalar/api-client": "0.5.4",
61
61
  "@scalar/default-theme": "0.2.1",
62
- "@scalar/swagger-editor": "0.5.4",
62
+ "@scalar/swagger-editor": "0.5.5",
63
63
  "@scalar/swagger-parser": "0.4.3",
64
64
  "@scalar/use-clipboard": "0.4.2",
65
- "@scalar/use-codemirror": "0.5.2",
65
+ "@scalar/use-codemirror": "0.5.3",
66
66
  "@scalar/use-keyboard-event": "0.4.2",
67
67
  "@scalar/use-toasts": "0.4.1",
68
68
  "@scalar/use-tooltip": "0.4.2"