@scalar/api-reference 1.25.5 → 1.25.7

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,33 +1,33 @@
1
- import { defineComponent as F, toRef as g, ref as B, watch as T, openBlock as u, createBlock as v, unref as t, withCtx as l, createElementVNode as d, createVNode as h, isRef as U, createTextVNode as i, toDisplayString as n, createElementBlock as q, Fragment as E, renderList as L, createSlots as M, pushScopeId as D, popScopeId as H } from "vue";
2
- import { ScalarModal as O, ScalarSearchInput as P, ScalarSearchResultList as $, ScalarSearchResultItem as K } from "@scalar/components";
3
- import W from "../../components/Sidebar/SidebarHttpBadge.vue.js";
4
- import { useKeyboardNavigation as Y } from "./useKeyboardNavigation.js";
5
- import { useSearchIndex as j } from "./useSearchIndex.js";
6
- import { useSidebar as z } from "../../hooks/useSidebar.js";
7
- const A = (r) => (D("data-v-6ee7fa31"), r = r(), H(), r), G = /* @__PURE__ */ A(() => /* @__PURE__ */ d("div", { class: "ref-search-meta" }, [
8
- /* @__PURE__ */ d("span", null, "↑↓ Navigate"),
9
- /* @__PURE__ */ d("span", null, "⏎ Select")
10
- ], -1)), te = /* @__PURE__ */ F({
1
+ import { defineComponent as B, toRef as R, ref as T, watch as U, openBlock as u, createBlock as k, unref as t, withCtx as r, createElementVNode as s, createVNode as h, isRef as q, createTextVNode as f, toDisplayString as d, createElementBlock as E, Fragment as L, renderList as M, createSlots as D, normalizeClass as H, pushScopeId as O, popScopeId as P } from "vue";
2
+ import { ScalarModal as $, ScalarSearchInput as z, ScalarSearchResultList as K, ScalarSearchResultItem as W } from "@scalar/components";
3
+ import Y from "../../components/Sidebar/SidebarHttpBadge.vue.js";
4
+ import { useKeyboardNavigation as j } from "./useKeyboardNavigation.js";
5
+ import { useSearchIndex as A } from "./useSearchIndex.js";
6
+ import { useSidebar as G } from "../../hooks/useSidebar.js";
7
+ const J = (l) => (O("data-v-fb0fd0be"), l = l(), P(), l), Q = /* @__PURE__ */ J(() => /* @__PURE__ */ s("div", { class: "ref-search-meta" }, [
8
+ /* @__PURE__ */ s("span", null, "↑↓ Navigate"),
9
+ /* @__PURE__ */ s("span", null, "⏎ Select")
10
+ ], -1)), oe = /* @__PURE__ */ B({
11
11
  __name: "SearchModal",
12
12
  props: {
13
13
  parsedSpec: {},
14
14
  modalState: {}
15
15
  },
16
- setup(r) {
17
- const s = r, R = g(s, "parsedSpec"), k = g(s.modalState.open), {
18
- resetSearch: I,
19
- fuseSearch: _,
16
+ setup(l) {
17
+ const c = l, I = R(c, "parsedSpec"), _ = R(c.modalState.open), {
18
+ resetSearch: b,
19
+ fuseSearch: C,
20
20
  selectedSearchResult: m,
21
21
  searchResultsWithPlaceholderResults: p,
22
- searchText: c
23
- } = j({
24
- specification: R
22
+ searchText: i
23
+ } = A({
24
+ specification: I
25
25
  });
26
- Y({
26
+ j({
27
27
  selectedSearchResult: m,
28
- active: k,
28
+ active: _,
29
29
  searchResultsWithPlaceholderResults: p,
30
- onSearchResultClick: f
30
+ onSearchResultClick: S
31
31
  });
32
32
  const w = {
33
33
  heading: "DocsPage",
@@ -35,78 +35,83 @@ const A = (r) => (D("data-v-6ee7fa31"), r = r(), H(), r), G = /* @__PURE__ */ A(
35
35
  req: "Terminal",
36
36
  tag: "CodeFolder",
37
37
  webhook: "Terminal"
38
- }, C = B(null);
39
- T(
40
- () => s.modalState.open,
38
+ }, V = T(null);
39
+ U(
40
+ () => c.modalState.open,
41
41
  (o) => {
42
- o && I();
42
+ o && b();
43
43
  }
44
44
  );
45
- const { setCollapsedSidebarItem: V } = z(), b = /#(tag\/[^/]*)/;
46
- function f(o) {
45
+ const { setCollapsedSidebarItem: N } = G(), x = /#(tag\/[^/]*)/;
46
+ function S(o) {
47
47
  let a = "models";
48
- const e = o.item.href.match(b);
49
- e != null && e.length && e.length > 1 && (a = e[1]), V(a, !0), s.modalState.hide();
48
+ const e = o.item.href.match(x);
49
+ e != null && e.length && e.length > 1 && (a = e[1]), N(a, !0), c.modalState.hide();
50
50
  }
51
- function N(o) {
51
+ function F(o) {
52
52
  const a = new URL(window.location.href);
53
53
  return a.hash = o, a.toString();
54
54
  }
55
- return (o, a) => (u(), v(t(O), {
55
+ return (o, a) => (u(), k(t($), {
56
56
  state: o.modalState,
57
57
  variant: "search"
58
58
  }, {
59
- default: l(() => [
60
- d("div", {
59
+ default: r(() => [
60
+ s("div", {
61
61
  ref_key: "searchModalRef",
62
- ref: C,
62
+ ref: V,
63
63
  class: "ref-search-container"
64
64
  }, [
65
- h(t(P), {
66
- modelValue: t(c),
67
- "onUpdate:modelValue": a[0] || (a[0] = (e) => U(c) ? c.value = e : null),
68
- onInput: t(_)
65
+ h(t(z), {
66
+ modelValue: t(i),
67
+ "onUpdate:modelValue": a[0] || (a[0] = (e) => q(i) ? i.value = e : null),
68
+ onInput: t(C)
69
69
  }, null, 8, ["modelValue", "onInput"])
70
70
  ], 512),
71
- h(t($), {
71
+ h(t(K), {
72
72
  class: "ref-search-results custom-scroll",
73
73
  noResults: !t(p).length
74
74
  }, {
75
- query: l(() => [
76
- i(n(t(c)), 1)
75
+ query: r(() => [
76
+ f(d(t(i)), 1)
77
77
  ]),
78
- default: l(() => [
79
- (u(!0), q(E, null, L(t(p), (e, S) => (u(), v(t(K), {
78
+ default: r(() => [
79
+ (u(!0), E(L, null, M(t(p), (e, g) => (u(), k(t(W), {
80
80
  id: e.item.href,
81
81
  key: e.refIndex,
82
- active: t(m) === S,
83
- href: N(e.item.href),
82
+ active: t(m) === g,
83
+ href: F(e.item.href),
84
84
  icon: w[e.item.type],
85
- onClick: (x) => f(e),
86
- onFocus: (x) => m.value = S
87
- }, M({
88
- default: l(() => [
89
- i(n(e.item.title) + " ", 1)
90
- ]),
85
+ onClick: (n) => S(e),
86
+ onFocus: (n) => m.value = g
87
+ }, D({
88
+ default: r(() => {
89
+ var n, v;
90
+ return [
91
+ s("span", {
92
+ class: H({ deprecated: (v = (n = e.item.operation) == null ? void 0 : n.information) == null ? void 0 : v.deprecated })
93
+ }, d(e.item.title), 3)
94
+ ];
95
+ }),
91
96
  _: 2
92
97
  }, [
93
98
  (e.item.httpVerb || e.item.path) && e.item.path !== e.item.title ? {
94
99
  name: "description",
95
- fn: l(() => [
96
- i(n(e.item.path), 1)
100
+ fn: r(() => [
101
+ f(d(e.item.path), 1)
97
102
  ]),
98
103
  key: "0"
99
104
  } : e.item.description ? {
100
105
  name: "description",
101
- fn: l(() => [
102
- i(n(e.item.description), 1)
106
+ fn: r(() => [
107
+ f(d(e.item.description), 1)
103
108
  ]),
104
109
  key: "1"
105
110
  } : void 0,
106
111
  e.item.type === "req" ? {
107
112
  name: "addon",
108
- fn: l(() => [
109
- h(W, {
113
+ fn: r(() => [
114
+ h(Y, {
110
115
  method: e.item.httpVerb ?? "get"
111
116
  }, null, 8, ["method"])
112
117
  ]),
@@ -116,12 +121,12 @@ const A = (r) => (D("data-v-6ee7fa31"), r = r(), H(), r), G = /* @__PURE__ */ A(
116
121
  ]),
117
122
  _: 1
118
123
  }, 8, ["noResults"]),
119
- G
124
+ Q
120
125
  ]),
121
126
  _: 1
122
127
  }, 8, ["state"]));
123
128
  }
124
129
  });
125
130
  export {
126
- te as default
131
+ oe as default
127
132
  };