@scalar/api-reference 1.25.49 → 1.25.51

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 (28) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/browser/standalone.js +12292 -12046
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.d.ts.map +1 -1
  5. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +1 -1
  6. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  7. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  8. package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts.map +1 -1
  9. package/dist/components/DarkModeToggle/DarkModeToggle.vue.js +2 -2
  10. package/dist/components/DarkModeToggle/DarkModeToggle.vue2.js +16 -20
  11. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
  12. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  13. package/dist/components/Layouts/ModernLayout.vue2.js +44 -32
  14. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  15. package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
  16. package/dist/components/Sidebar/SidebarElement.vue2.js +18 -17
  17. package/dist/features/ApiClientModal/useApiClient.d.ts +116 -82
  18. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  19. package/dist/helpers/getExampleCode.js +11 -11
  20. package/dist/helpers/waitFor.d.ts +5 -0
  21. package/dist/helpers/waitFor.d.ts.map +1 -0
  22. package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +1 -1
  25. package/dist/legacy/components/SecuritySchemeSelector.vue.js +2 -2
  26. package/dist/legacy/components/SecuritySchemeSelector.vue2.js +3 -3
  27. package/dist/style.css +1 -1
  28. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyDetail.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyDetail.vue"],"names":[],"mappings":"AAyEA,iBAAS,cAAc;oBAiDK,GAAG;qBACF,GAAG;qBACH,GAAG;EAc/B;AACD,QAAA,MAAM,eAAe;eA5ER,OAAO;WACX,OAAO;;eADH,OAAO;WACX,OAAO;iGAiFd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SchemaPropertyDetail.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyDetail.vue"],"names":[],"mappings":"AA0EA,iBAAS,cAAc;oBAiDK,GAAG;qBACF,GAAG;qBACH,GAAG;EAc/B;AACD,QAAA,MAAM,eAAe;eA5ER,OAAO;WACX,OAAO;;eADH,OAAO;WACX,OAAO;iGAiFd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaPropertyDetail.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-16d94ef5"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3ae98a1b"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAiOA,iBAAS,cAAc;kBA4UG,GAAG;EAmB5B;AACD,QAAA,MAAM,eAAe;YA9XT,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WACpB,OAAO;eACH,OAAO;iBACL,OAAO;;YAHZ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WACpB,OAAO;eACH,OAAO;iBACL,OAAO;;cADT,OAAO;6EAmYpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAexG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAoOA,iBAAS,cAAc;kBA4UG,GAAG;EAmB5B;AACD,QAAA,MAAM,eAAe;YA9XT,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WACpB,OAAO;eACH,OAAO;iBACL,OAAO;;YAHZ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WACpB,OAAO;eACH,OAAO;iBACL,OAAO;;cADT,OAAO;6EAmYpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAexG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaPropertyHeading.vue2.js";
2
2
  /* empty css */
3
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0a22c130"]]);
3
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-971e43ae"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DarkModeToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DarkModeToggle/DarkModeToggle.vue"],"names":[],"mappings":";gBAsFc,OAAO;;;;gBAAP,OAAO;;;;AAwFrB,wBASG"}
1
+ {"version":3,"file":"DarkModeToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DarkModeToggle/DarkModeToggle.vue"],"names":[],"mappings":";gBAgKc,OAAO;;;;gBAAP,OAAO;;;;AAmGrB,wBASG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./DarkModeToggle.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-57bfeb25"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-64613cbc"]]);
5
5
  export {
6
- f as default
6
+ e as default
7
7
  };
@@ -1,33 +1,29 @@
1
- import { defineComponent as a, openBlock as o, createElementBlock as t, createElementVNode as r, createVNode as n, unref as l } from "vue";
2
- import { ScalarIcon as d } from "@scalar/components";
3
- const i = { class: "darklight-reference" }, k = { key: 0 }, p = { key: 1 }, M = /* @__PURE__ */ a({
1
+ import { defineComponent as o, openBlock as s, createElementBlock as r, createElementVNode as t, normalizeClass as i, createStaticVNode as l } from "vue";
2
+ const d = { class: "darklight-reference-switch" }, c = ["aria-pressed"], p = /* @__PURE__ */ o({
4
3
  __name: "DarkModeToggle",
5
4
  props: {
6
5
  isDarkMode: { type: Boolean }
7
6
  },
8
7
  emits: ["toggleDarkMode"],
9
- setup(m) {
10
- return (s, e) => (o(), t("div", i, [
11
- r("button", {
12
- class: "darklight",
13
- type: "button",
14
- onClick: e[0] || (e[0] = (g) => s.$emit("toggleDarkMode"))
15
- }, [
16
- n(l(d), {
17
- icon: "LightDarkModeToggle",
18
- size: "md"
19
- }),
20
- e[1] || (e[1] = r("div", { class: "sr-only" }, "Set to", -1)),
21
- s.isDarkMode ? (o(), t("span", k, "Light Mode")) : (o(), t("span", p, "Dark Mode"))
22
- ]),
23
- e[2] || (e[2] = r("a", {
8
+ setup(n) {
9
+ return (a, e) => (s(), r("div", d, [
10
+ e[2] || (e[2] = t("a", {
24
11
  class: "darklight-reference-promo",
25
12
  href: "https://www.scalar.com",
26
13
  target: "_blank"
27
- }, " Powered by scalar.com ", -1))
14
+ }, " Powered by Scalar ", -1)),
15
+ t("button", {
16
+ "aria-label": "Toggle dark mode",
17
+ "aria-pressed": a.isDarkMode,
18
+ class: i(["darklight", { darklight_dark: a.isDarkMode }]),
19
+ type: "button",
20
+ onClick: e[0] || (e[0] = (g) => a.$emit("toggleDarkMode"))
21
+ }, e[1] || (e[1] = [
22
+ l('<div class="darklight-slider" data-v-64613cbc><div class="toggleicon" data-v-64613cbc><i class="toggleicon-sunray" data-v-64613cbc></i><i class="toggleicon-sunray" data-v-64613cbc></i><i class="toggleicon-sunray" data-v-64613cbc></i><i class="toggleicon-sunray" data-v-64613cbc></i><i class="toggleicon-sun" data-v-64613cbc></i></div></div>', 1)
23
+ ]), 10, c)
28
24
  ]));
29
25
  }
30
26
  });
31
27
  export {
32
- M as default
28
+ p as default
33
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ModernLayout.vue"],"names":[],"mappings":"AA6FA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAwC7E,iBAAS,cAAc,0DAyJtB;AACD,QAAA,MAAM,eAAe;;;;;;kFAUnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ModernLayout.vue"],"names":[],"mappings":"AAiHA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAyC7E,iBAAS,cAAc,0DA4KtB;AACD,QAAA,MAAM,eAAe;;;;;;kFAUnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./ModernLayout.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-67757240"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-02cb7fcc"]]);
6
6
  export {
7
- _ as default
7
+ a as default
8
8
  };
@@ -1,15 +1,16 @@
1
- import { defineComponent as k, useSlots as h, watch as u, openBlock as i, createBlock as p, normalizeClass as M, createSlots as y, withCtx as s, unref as l, isRef as b, createCommentVNode as d, createElementBlock as D, createVNode as v, renderList as w, renderSlot as C, normalizeProps as B, guardReactiveProps as $ } from "vue";
2
- import { useMediaQuery as H } from "@vueuse/core";
3
- import K from "../ApiReferenceLayout.vue.js";
4
- import L from "../MobileHeader.vue.js";
5
- import N from "../../features/Search/SearchButton.vue.js";
6
- import R from "../DarkModeToggle/DarkModeToggle.vue.js";
7
- import { useSidebar as T } from "../../hooks/useSidebar.js";
8
- import { useNavState as z } from "../../hooks/useNavState.js";
9
- const P = {
1
+ import { defineComponent as b, useSlots as M, watch as u, openBlock as i, createBlock as p, normalizeClass as v, createSlots as y, withCtx as s, unref as l, isRef as D, createCommentVNode as d, createElementBlock as w, createVNode as c, createElementVNode as C, renderList as B, renderSlot as N, normalizeProps as $, guardReactiveProps as H } from "vue";
2
+ import { OpenApiClientButton as K } from "@scalar/api-client/components";
3
+ import { useMediaQuery as L } from "@vueuse/core";
4
+ import R from "../ApiReferenceLayout.vue.js";
5
+ import T from "../MobileHeader.vue.js";
6
+ import V from "../../features/Search/SearchButton.vue.js";
7
+ import z from "../DarkModeToggle/DarkModeToggle.vue.js";
8
+ import { useSidebar as A } from "../../hooks/useSidebar.js";
9
+ import { useNavState as E } from "../../hooks/useNavState.js";
10
+ const O = {
10
11
  key: 0,
11
12
  class: "scalar-api-references-standalone-search"
12
- }, F = /* @__PURE__ */ k({
13
+ }, P = { class: "darklight-reference" }, X = /* @__PURE__ */ b({
13
14
  __name: "ModernLayout",
14
15
  props: {
15
16
  configuration: {},
@@ -18,16 +19,16 @@ const P = {
18
19
  isDark: { type: Boolean }
19
20
  },
20
21
  emits: ["toggleDarkMode", "updateContent"],
21
- setup(c) {
22
- const n = c, f = h(), m = H("(max-width: 1000px)"), { isSidebarOpen: a } = T();
23
- u(m, (e, o) => {
22
+ setup(f) {
23
+ const n = f, m = M(), g = L("(max-width: 1000px)"), { isSidebarOpen: a } = A(), S = !1;
24
+ u(g, (e, o) => {
24
25
  e && !o && (a.value = !1);
25
26
  });
26
- const { hash: g } = z();
27
- return u(g, (e, o) => {
27
+ const { hash: k } = E();
28
+ return u(k, (e, o) => {
28
29
  e && e !== o && (a.value = !1);
29
- }), (e, o) => (i(), p(K, {
30
- class: M({
30
+ }), (e, o) => (i(), p(R, {
31
+ class: v({
31
32
  "scalar-api-references-standalone-mobile": e.configuration.showSidebar
32
33
  }),
33
34
  configuration: e.configuration,
@@ -36,41 +37,52 @@ const P = {
36
37
  onUpdateContent: o[2] || (o[2] = (r) => e.$emit("updateContent", r))
37
38
  }, y({
38
39
  header: s(() => [
39
- n.configuration.showSidebar ? (i(), p(L, {
40
+ n.configuration.showSidebar ? (i(), p(T, {
40
41
  key: 0,
41
42
  open: l(a),
42
- "onUpdate:open": o[0] || (o[0] = (r) => b(a) ? a.value = r : null)
43
+ "onUpdate:open": o[0] || (o[0] = (r) => D(a) ? a.value = r : null)
43
44
  }, null, 8, ["open"])) : d("", !0)
44
45
  ]),
45
46
  "sidebar-start": s(({ spec: r }) => {
46
47
  var t;
47
48
  return [
48
- n.configuration.hideSearch ? d("", !0) : (i(), D("div", P, [
49
- v(l(N), {
49
+ n.configuration.hideSearch ? d("", !0) : (i(), w("div", O, [
50
+ c(l(V), {
50
51
  searchHotKey: (t = n.configuration) == null ? void 0 : t.searchHotKey,
51
52
  spec: r
52
53
  }, null, 8, ["searchHotKey", "spec"])
53
54
  ]))
54
55
  ];
55
56
  }),
56
- "sidebar-end": s(() => [
57
- n.configuration.hideDarkModeToggle ? d("", !0) : (i(), p(l(R), {
58
- key: 0,
59
- isDarkMode: e.isDark,
60
- onToggleDarkMode: o[1] || (o[1] = (r) => e.$emit("toggleDarkMode"))
61
- }, null, 8, ["isDarkMode"]))
62
- ]),
57
+ "sidebar-end": s(() => {
58
+ var r;
59
+ return [
60
+ C("div", P, [
61
+ c(l(K), {
62
+ buttonSource: "sidebar",
63
+ integration: e.configuration._integration,
64
+ isDevelopment: S,
65
+ url: (r = e.configuration.spec) == null ? void 0 : r.url
66
+ }, null, 8, ["integration", "url"]),
67
+ n.configuration.hideDarkModeToggle ? d("", !0) : (i(), p(l(z), {
68
+ key: 0,
69
+ isDarkMode: e.isDark,
70
+ onToggleDarkMode: o[1] || (o[1] = (t) => e.$emit("toggleDarkMode"))
71
+ }, null, 8, ["isDarkMode"]))
72
+ ])
73
+ ];
74
+ }),
63
75
  _: 2
64
76
  }, [
65
- w(f, (r, t) => ({
77
+ B(m, (r, t) => ({
66
78
  name: t,
67
- fn: s((S) => [
68
- C(e.$slots, t, B($(S || {})), void 0, !0)
79
+ fn: s((h) => [
80
+ N(e.$slots, t, $(H(h || {})), void 0, !0)
69
81
  ])
70
82
  }))
71
83
  ]), 1032, ["class", "configuration", "parsedSpec", "rawSpec"]));
72
84
  }
73
85
  });
74
86
  export {
75
- F as default
87
+ X as default
76
88
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue"],"names":[],"mappings":"AA0ZA,iBAAS,cAAc;qBA8KO,GAAG;2BACG,GAAG;EAuBtC;AACD,QAAA,MAAM,eAAe;QA5Rf,MAAM;UACJ;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;eACU,OAAO;kBACJ,OAAO;WACd,OAAO;;;;QAdV,MAAM;UACJ;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;eACU,OAAO;kBACJ,OAAO;WACd,OAAO;;;kFAuRd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue"],"names":[],"mappings":"AAoaA,iBAAS,cAAc;qBAmLO,GAAG;2BACG,GAAG;EAuBtC;AACD,QAAA,MAAM,eAAe;QAjSf,MAAM;UACJ;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;eACU,OAAO;kBACJ,OAAO;WACd,OAAO;;;;QAdV,MAAM;UACJ;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;eACU,OAAO;kBACJ,OAAO;WACd,OAAO;;;kFA4Rd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SidebarElement.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5728e727"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8076d909"]]);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as $, openBlock as a, createElementBlock as d, createElementVNode as p, normalizeClass as B, createVNode as c, unref as u, withModifiers as V, createTextVNode as f, createCommentVNode as s, createBlock as E, toDisplayString as N, renderSlot as v } from "vue";
1
+ import { defineComponent as $, openBlock as a, createElementBlock as d, createElementVNode as h, normalizeClass as B, createVNode as c, unref as u, withModifiers as V, createTextVNode as f, createCommentVNode as s, createBlock as E, toDisplayString as N, renderSlot as v } from "vue";
2
2
  import { ScalarIconButton as A, ScalarIcon as I } from "@scalar/components";
3
3
  import O from "./SidebarHttpBadge.vue.js";
4
4
  import { sleep as g } from "../../helpers/sleep.js";
@@ -8,7 +8,7 @@ import { useNavState as T } from "../../hooks/useNavState.js";
8
8
  const D = ["id"], L = {
9
9
  key: 0,
10
10
  class: "sidebar-heading-chevron"
11
- }, P = ["href"], U = { class: "sidebar-heading-link-title" }, z = {
11
+ }, P = ["href", "tabindex"], U = { class: "sidebar-heading-link-title" }, z = {
12
12
  key: 1,
13
13
  class: "sidebar-heading-link-method"
14
14
  }, H = {
@@ -24,10 +24,10 @@ const D = ["id"], L = {
24
24
  open: { type: Boolean }
25
25
  },
26
26
  emits: ["toggleOpen"],
27
- setup(k, { emit: C }) {
28
- const t = k, m = C, { hash: w, isIntersectionEnabled: l, pathRouting: r } = T(), h = async () => {
27
+ setup(C, { emit: k }) {
28
+ const t = C, p = k, { hash: w, isIntersectionEnabled: l, pathRouting: r } = T(), m = async () => {
29
29
  var e, i;
30
- t.hasChildren && m("toggleOpen"), (i = (e = t.item) == null ? void 0 : e.select) == null || i.call(e), t.open && (l.value = !1, await g(100), l.value = !0);
30
+ t.hasChildren && p("toggleOpen"), (i = (e = t.item) == null ? void 0 : e.select) == null || i.call(e), t.open && (l.value = !1, await g(100), l.value = !0);
31
31
  }, y = () => {
32
32
  if (r.value)
33
33
  return b(r.value.basePath, t.item.id);
@@ -36,26 +36,26 @@ const D = ["id"], L = {
36
36
  return e.hash = t.item.id, `${e.pathname}${e.search}${e.hash}`;
37
37
  } else return `#${t.item.id}`;
38
38
  }, S = async (e) => {
39
- var i, o;
39
+ var i, n;
40
40
  if (r.value) {
41
- e.preventDefault(), t.hasChildren && m("toggleOpen"), (o = (i = t.item) == null ? void 0 : i.select) == null || o.call(i), m("toggleOpen"), l.value = !1, w.value = t.item.id;
42
- const n = new URL(window.location.href);
43
- n.pathname = b(r.value.basePath, t.item.id), window.history.pushState({}, "", n), R(t.item.id), await g(100), l.value = !0;
41
+ e.preventDefault(), t.hasChildren && p("toggleOpen"), (n = (i = t.item) == null ? void 0 : i.select) == null || n.call(i), p("toggleOpen"), l.value = !1, w.value = t.item.id;
42
+ const o = new URL(window.location.href);
43
+ o.pathname = b(r.value.basePath, t.item.id), window.history.pushState({}, "", o), R(t.item.id), await g(100), l.value = !0;
44
44
  }
45
45
  };
46
46
  return (e, i) => {
47
- var o, n;
47
+ var n, o;
48
48
  return a(), d("li", {
49
49
  id: e.id,
50
50
  class: "sidebar-group-item"
51
51
  }, [
52
- p("div", {
52
+ h("div", {
53
53
  class: B(["sidebar-heading", {
54
54
  "sidebar-group-item__folder": e.hasChildren,
55
55
  active_page: e.isActive,
56
56
  deprecated: e.item.deprecated ?? !1
57
57
  }]),
58
- onClick: h
58
+ onClick: m
59
59
  }, [
60
60
  e.hasChildren ? (a(), d("p", L, [
61
61
  c(u(A), {
@@ -64,24 +64,25 @@ const D = ["id"], L = {
64
64
  icon: e.open ? "ChevronDown" : "ChevronRight",
65
65
  label: `${e.open ? "Collapse" : "Expand"} ${e.item.title}`,
66
66
  size: "xs",
67
- onClick: V(h, ["stop"])
67
+ onClick: V(m, ["stop"])
68
68
  }, null, 8, ["aria-expanded", "icon", "label"]),
69
69
  i[0] || (i[0] = f("   "))
70
70
  ])) : s("", !0),
71
- p("a", {
71
+ h("a", {
72
72
  class: "sidebar-heading-link",
73
73
  href: y(),
74
+ tabindex: e.hasChildren ? -1 : 0,
74
75
  onClick: S
75
76
  }, [
76
- (n = (o = e.item) == null ? void 0 : o.icon) != null && n.src ? (a(), E(u(I), {
77
+ (o = (n = e.item) == null ? void 0 : n.icon) != null && o.src ? (a(), E(u(I), {
77
78
  key: 0,
78
79
  class: "sidebar-icon",
79
80
  icon: e.item.icon.src
80
81
  }, null, 8, ["icon"])) : s("", !0),
81
- p("p", U, N(e.item.title), 1),
82
+ h("p", U, N(e.item.title), 1),
82
83
  e.item.httpVerb && !e.hasChildren ? (a(), d("p", z, [
83
84
  i[1] || (i[1] = f("   ")),
84
- i[2] || (i[2] = p("span", { class: "sr-only" }, "HTTP Method: ", -1)),
85
+ i[2] || (i[2] = h("span", { class: "sr-only" }, "HTTP Method: ", -1)),
85
86
  c(O, {
86
87
  active: e.isActive,
87
88
  method: e.item.httpVerb