@scalar/api-reference 1.25.102 → 1.25.104

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 (99) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/blocks/constants.d.ts +9 -0
  3. package/dist/blocks/constants.d.ts.map +1 -0
  4. package/dist/blocks/constants.js +8 -0
  5. package/dist/blocks/helpers/getPointer.d.ts +22 -0
  6. package/dist/blocks/helpers/getPointer.d.ts.map +1 -0
  7. package/dist/blocks/helpers/getPointer.js +12 -0
  8. package/dist/blocks/hooks/useBlockProps.d.ts +32 -0
  9. package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -0
  10. package/dist/blocks/hooks/useBlockProps.js +28 -0
  11. package/dist/browser/standalone.js +12846 -12739
  12. package/dist/browser/webpack-stats.json +1 -1
  13. package/dist/components/ApiReference.vue.js +31 -31
  14. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  15. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  16. package/dist/components/ApiReferenceLayout.vue2.js +2 -1
  17. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  19. package/dist/components/Content/Introduction/Introduction.vue2.js +84 -70
  20. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -0
  21. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  23. package/dist/components/Content/Schema/SchemaProperty.vue2.js +118 -111
  24. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
  26. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +91 -77
  27. package/dist/components/Content/Schema/helpers/formatExample.d.ts +5 -0
  28. package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +1 -0
  29. package/dist/components/Content/Schema/helpers/formatExample.js +6 -0
  30. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +9 -0
  31. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -0
  32. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +20 -0
  33. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -1
  34. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  35. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
  36. package/dist/components/Layouts/ClassicLayout.vue.js +30 -27
  37. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
  38. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  39. package/dist/components/Layouts/ModernLayout.vue2.js +55 -50
  40. package/dist/features/ApiClientModal/useApiClient.d.ts +336 -254
  41. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  42. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  43. package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
  44. package/dist/features/DownloadLink/DownloadLink.vue2.js +10 -3
  45. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  46. package/dist/features/Operation/Operation.vue.js +37 -26
  47. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  48. package/dist/features/Operation/components/OperationResponses.vue.js +8 -7
  49. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -0
  50. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  51. package/dist/features/Operation/components/ParameterList.vue.js +2 -2
  52. package/dist/features/Operation/components/ParameterList.vue2.js +18 -16
  53. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -0
  54. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  55. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  56. package/dist/features/Operation/components/ParameterListItem.vue2.js +27 -25
  57. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +3 -0
  58. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  59. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  60. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +108 -101
  61. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -0
  62. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  63. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  64. package/dist/features/Operation/layouts/ModernLayout.vue2.js +54 -50
  65. package/dist/helpers/get-request.d.ts +2 -0
  66. package/dist/helpers/get-request.d.ts.map +1 -1
  67. package/dist/helpers/parse.d.ts.map +1 -1
  68. package/dist/helpers/parse.js +88 -68
  69. package/dist/index.d.ts +0 -1
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +79 -83
  72. package/dist/style.css +1 -1
  73. package/package.json +11 -12
  74. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts +0 -10
  75. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
  76. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -7
  77. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -30
  78. package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts +0 -11
  79. package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts.map +0 -1
  80. package/dist/components/DarkModeToggle/DarkModeToggle.vue.js +0 -7
  81. package/dist/components/DarkModeToggle/DarkModeToggle.vue2.js +0 -31
  82. package/dist/components/DarkModeToggle/index.d.ts +0 -3
  83. package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
  84. package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts +0 -10
  85. package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts.map +0 -1
  86. package/dist/embeds/ExampleRequest/index.d.ts +0 -2
  87. package/dist/embeds/ExampleRequest/index.d.ts.map +0 -1
  88. package/dist/embeds/ExampleResponses/ExampleResponses.vue.d.ts +0 -7
  89. package/dist/embeds/ExampleResponses/ExampleResponses.vue.d.ts.map +0 -1
  90. package/dist/embeds/ExampleResponses/index.d.ts +0 -2
  91. package/dist/embeds/ExampleResponses/index.d.ts.map +0 -1
  92. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +0 -782
  93. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +0 -1
  94. package/dist/embeds/OpenApiDocument/index.d.ts +0 -3
  95. package/dist/embeds/OpenApiDocument/index.d.ts.map +0 -1
  96. package/dist/embeds/OpenApiDocument/types.d.ts +0 -3
  97. package/dist/embeds/OpenApiDocument/types.d.ts.map +0 -1
  98. package/dist/embeds/index.d.ts +0 -4
  99. package/dist/embeds/index.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatExample.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/formatExample.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CA0C/D"}
@@ -0,0 +1,6 @@
1
+ function t(r) {
2
+ return Array.isArray(r) ? `[${r.map((n) => typeof n == "string" || typeof n == "number" ? `"${n.toString().trim()}"` : typeof n == "object" ? JSON.stringify(n) : n === void 0 ? "undefined" : n === null ? "null" : n).join(", ")}]` : typeof r == "object" ? JSON.stringify(r) : r === null ? "null" : r === void 0 ? "undefined" : typeof r == "string" ? r.trim() : r.toString().trim();
3
+ }
4
+ export {
5
+ t as formatExample
6
+ };
@@ -0,0 +1,9 @@
1
+ import type { UnknownObject } from '@scalar/types/utils';
2
+ export declare const discriminators: string[];
3
+ /**
4
+ * Optimize the value by removing nulls from discriminators.
5
+ */
6
+ export declare function optimizeValueForDisplay(value: UnknownObject | undefined): {
7
+ [x: string]: unknown;
8
+ } | undefined;
9
+ //# sourceMappingURL=optimizeValueForDisplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,eAAO,MAAM,cAAc,UAAqC,CAAA;AAEhE;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS;;cAwDvE"}
@@ -0,0 +1,20 @@
1
+ const c = ["oneOf", "anyOf", "allOf", "not"];
2
+ function y(o) {
3
+ var s;
4
+ if (!o || typeof o != "object")
5
+ return o;
6
+ let r = { ...o };
7
+ const t = c.find((i) => r == null ? void 0 : r[i]);
8
+ if (!t || t === "not")
9
+ return r;
10
+ const f = r == null ? void 0 : r[t];
11
+ if (!Array.isArray(f))
12
+ return r;
13
+ f.some((i) => i.type === "null") && (r.nullable = !0);
14
+ const n = f.filter((i) => i.type !== "null");
15
+ return n.length === 1 && (r != null && r[t]) ? (r = { ...r, ...n[0] }, r == null || delete r[t], r) : (Array.isArray(r == null ? void 0 : r[t]) && ((s = r == null ? void 0 : r[t]) == null ? void 0 : s.length) > 1 && (r[t] = n), r);
16
+ }
17
+ export {
18
+ c as discriminators,
19
+ y as optimizeValueForDisplay
20
+ };
@@ -1,3 +1,4 @@
1
+ import type { OpenAPI } from '@scalar/openapi-types';
1
2
  import { type Component } from 'vue';
2
3
  type __VLS_Props = {
3
4
  /** The type of element to render as, defaults to `span` */
@@ -7,7 +8,7 @@ type __VLS_Props = {
7
8
  /** Whether or not to abbreviated the slot content */
8
9
  short?: boolean;
9
10
  /** The HTTP method to show */
10
- method: string;
11
+ method: OpenAPI.HttpMethod | string;
11
12
  };
12
13
  declare function __VLS_template(): {
13
14
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":"AA0CA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,KAAK,CAAA;AAO9C,KAAK,WAAW,GAAG;IACjB,2DAA2D;IAC3D,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACvB,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;AAsBF,iBAAS,cAAc;WA4CT,OAAO,IAA6B;;;;;;YARrB,GAAG;;;;EAa/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,KAAK,CAAA;AAO9C,KAAK,WAAW,GAAG;IACjB,2DAA2D;IAC3D,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACvB,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,8BAA8B;IAC9B,MAAM,EAAE,OAAO,CAAC,UAAU,GAAG,MAAM,CAAA;CACpC,CAAC;AAmCF,iBAAS,cAAc;WA4CT,OAAO,IAA6B;;;;;;YARrB,GAAG;;;;EAa/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ClassicLayout.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAyBzE,iBAAS,cAAc;WAgHT,OAAO,IAA6B;;;;EAKjD;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ClassicLayout.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AA0BzE,iBAAS,cAAc;WAkHT,OAAO,IAA6B;;;;EAKjD;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,9 +1,9 @@
1
- import { defineComponent as g, useSlots as m, computed as k, openBlock as s, createBlock as i, createSlots as S, withCtx as t, createVNode as D, unref as d, createCommentVNode as c, renderList as y, renderSlot as C, normalizeProps as M, guardReactiveProps as h } from "vue";
2
- import w from "../ApiReferenceLayout.vue.js";
3
- import v from "../ClassicHeader.vue.js";
4
- import B from "../DarkModeToggle/DarkModeIconToggle.vue.js";
5
- import H from "../../features/Search/SearchButton.vue.js";
6
- const N = /* @__PURE__ */ g({
1
+ import { defineComponent as f, useSlots as g, computed as S, openBlock as s, createBlock as i, createSlots as k, withCtx as r, createVNode as C, unref as l, createCommentVNode as p, renderList as y, renderSlot as h, normalizeProps as v, guardReactiveProps as w } from "vue";
2
+ import D from "../ApiReferenceLayout.vue.js";
3
+ import B from "../ClassicHeader.vue.js";
4
+ import { ScalarColorModeToggleIcon as H } from "@scalar/components";
5
+ import M from "../../features/Search/SearchButton.vue.js";
6
+ const P = /* @__PURE__ */ f({
7
7
  __name: "ClassicLayout",
8
8
  props: {
9
9
  configuration: {},
@@ -12,29 +12,32 @@ const N = /* @__PURE__ */ g({
12
12
  isDark: { type: Boolean }
13
13
  },
14
14
  emits: ["toggleDarkMode", "updateContent"],
15
- setup(l) {
16
- const a = l, u = m(), p = k(() => ({ ...a.configuration, showSidebar: !1 }));
17
- return (e, o) => (s(), i(w, {
18
- configuration: p.value,
15
+ setup(d) {
16
+ const a = d, u = g(), c = S(() => ({ ...a.configuration, showSidebar: !1 }));
17
+ return (e, o) => (s(), i(D, {
18
+ configuration: c.value,
19
19
  parsedSpec: e.parsedSpec,
20
20
  rawSpec: e.rawSpec,
21
- onUpdateContent: o[1] || (o[1] = (r) => e.$emit("updateContent", r))
22
- }, S({
23
- "content-start": t(({ spec: r }) => [
24
- D(v, null, {
25
- "dark-mode-toggle": t(() => [
26
- a.configuration.hideDarkModeToggle ? c("", !0) : (s(), i(d(B), {
21
+ onUpdateContent: o[1] || (o[1] = (t) => e.$emit("updateContent", t))
22
+ }, k({
23
+ "content-start": r(({ spec: t }) => [
24
+ C(B, null, {
25
+ "dark-mode-toggle": r(() => [
26
+ a.configuration.hideDarkModeToggle ? p("", !0) : (s(), i(l(H), {
27
27
  key: 0,
28
- isDarkMode: e.isDark,
29
- onToggleDarkMode: o[0] || (o[0] = (n) => e.$emit("toggleDarkMode"))
30
- }, null, 8, ["isDarkMode"]))
28
+ class: "text-c-2 hover:text-c-1",
29
+ mode: e.isDark ? "dark" : "light",
30
+ style: { transform: "scale(1.4)" },
31
+ variant: "icon",
32
+ onClick: o[0] || (o[0] = (n) => e.$emit("toggleDarkMode"))
33
+ }, null, 8, ["mode"]))
31
34
  ]),
32
- default: t(() => [
33
- a.configuration.hideSearch ? c("", !0) : (s(), i(d(H), {
35
+ default: r(() => [
36
+ a.configuration.hideSearch ? p("", !0) : (s(), i(l(M), {
34
37
  key: 0,
35
38
  class: "t-doc__sidebar",
36
- searchHotKey: p.value.searchHotKey,
37
- spec: r
39
+ searchHotKey: c.value.searchHotKey,
40
+ spec: t
38
41
  }, null, 8, ["searchHotKey", "spec"]))
39
42
  ]),
40
43
  _: 2
@@ -42,15 +45,15 @@ const N = /* @__PURE__ */ g({
42
45
  ]),
43
46
  _: 2
44
47
  }, [
45
- y(u, (r, n) => ({
48
+ y(u, (t, n) => ({
46
49
  name: n,
47
- fn: t((f) => [
48
- C(e.$slots, n, M(h(f || {})))
50
+ fn: r((m) => [
51
+ h(e.$slots, n, v(w(m || {})))
49
52
  ])
50
53
  }))
51
54
  ]), 1032, ["configuration", "parsedSpec", "rawSpec"]));
52
55
  }
53
56
  });
54
57
  export {
55
- N as default
58
+ P as default
56
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ModernLayout.vue"],"names":[],"mappings":"AAkHA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAuC7E,iBAAS,cAAc;WAsIT,OAAO,IAA6B;;;;EAKjD;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,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":"AAuHA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAsC7E,iBAAS,cAAc;WAsJT,OAAO,IAA6B;;;;EAKjD;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,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-90dab220"]]);
5
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3ca2ed96"]]);
6
6
  export {
7
- _ as default
7
+ e as default
8
8
  };
@@ -1,16 +1,16 @@
1
- import { defineComponent as D, useSlots as M, watch as u, openBlock as i, createBlock as d, normalizeClass as b, createSlots as v, withCtx as s, unref as l, isRef as y, createCommentVNode as p, createElementBlock as C, createVNode as c, createElementVNode as B, renderList as w, renderSlot as T, normalizeProps as N, guardReactiveProps as $ } from "vue";
1
+ import { defineComponent as y, useSlots as C, watch as d, openBlock as t, createBlock as u, normalizeClass as v, createSlots as B, withCtx as a, unref as l, isRef as w, createCommentVNode as p, createElementBlock as c, createVNode as f, renderList as D, renderSlot as M, normalizeProps as V, guardReactiveProps as $ } from "vue";
2
2
  import { OpenApiClientButton as H } from "@scalar/api-client/components";
3
- import { useBreakpoints as K } from "@scalar/use-hooks/useBreakpoints";
4
- import L from "../ApiReferenceLayout.vue.js";
5
- import R from "../MobileHeader.vue.js";
6
- import V from "../../features/Search/SearchButton.vue.js";
7
- import z from "../DarkModeToggle/DarkModeToggle.vue.js";
3
+ import { ScalarSidebarFooter as K, ScalarColorModeToggleButton as L } from "@scalar/components";
4
+ import { useBreakpoints as N } from "@scalar/use-hooks/useBreakpoints";
5
+ import R from "../ApiReferenceLayout.vue.js";
6
+ import U from "../MobileHeader.vue.js";
7
+ import z from "../../features/Search/SearchButton.vue.js";
8
8
  import { useSidebar as A } from "../../hooks/useSidebar.js";
9
- import { useNavState as E } from "../../hooks/useNavState.js";
10
- const O = {
9
+ import { useNavState as O } from "../../hooks/useNavState.js";
10
+ const P = {
11
11
  key: 0,
12
12
  class: "scalar-api-references-standalone-search"
13
- }, P = { class: "darklight-reference" }, X = /* @__PURE__ */ D({
13
+ }, T = { key: 1 }, X = /* @__PURE__ */ y({
14
14
  __name: "ModernLayout",
15
15
  props: {
16
16
  configuration: {},
@@ -19,66 +19,71 @@ const O = {
19
19
  isDark: { type: Boolean }
20
20
  },
21
21
  emits: ["toggleDarkMode", "updateContent"],
22
- setup(f) {
23
- const a = f, g = M(), { mediaQueries: m } = K(), { isSidebarOpen: n } = A(), k = !1;
24
- u(m.lg, (e, o) => {
25
- o && !e && (n.value = !1);
22
+ setup(m) {
23
+ const n = m, g = C(), { mediaQueries: S } = N(), { isSidebarOpen: i } = A(), k = !1;
24
+ d(S.lg, (e, o) => {
25
+ o && !e && (i.value = !1);
26
26
  });
27
- const { hash: S } = E();
28
- return u(S, (e, o) => {
29
- e && e !== o && (n.value = !1);
30
- }), (e, o) => (i(), d(L, {
31
- class: b({
27
+ const { hash: h } = O();
28
+ return d(h, (e, o) => {
29
+ e && e !== o && (i.value = !1);
30
+ }), (e, o) => (t(), u(R, {
31
+ class: v({
32
32
  "scalar-api-references-standalone-mobile": e.configuration.showSidebar
33
33
  }),
34
34
  configuration: e.configuration,
35
35
  parsedSpec: e.parsedSpec,
36
36
  rawSpec: e.rawSpec,
37
37
  onUpdateContent: o[2] || (o[2] = (r) => e.$emit("updateContent", r))
38
- }, v({
39
- header: s(() => [
40
- a.configuration.showSidebar ? (i(), d(R, {
38
+ }, B({
39
+ header: a(() => [
40
+ n.configuration.showSidebar ? (t(), u(U, {
41
41
  key: 0,
42
- open: l(n),
43
- "onUpdate:open": o[0] || (o[0] = (r) => y(n) ? n.value = r : null)
42
+ open: l(i),
43
+ "onUpdate:open": o[0] || (o[0] = (r) => w(i) ? i.value = r : null)
44
44
  }, null, 8, ["open"])) : p("", !0)
45
45
  ]),
46
- "sidebar-start": s(({ spec: r }) => {
47
- var t;
46
+ "sidebar-start": a(({ spec: r }) => {
47
+ var s;
48
48
  return [
49
- a.configuration.hideSearch ? p("", !0) : (i(), C("div", O, [
50
- c(l(V), {
51
- searchHotKey: (t = a.configuration) == null ? void 0 : t.searchHotKey,
49
+ n.configuration.hideSearch ? p("", !0) : (t(), c("div", P, [
50
+ f(l(z), {
51
+ searchHotKey: (s = n.configuration) == null ? void 0 : s.searchHotKey,
52
52
  spec: r
53
53
  }, null, 8, ["searchHotKey", "spec"])
54
54
  ]))
55
55
  ];
56
56
  }),
57
- "sidebar-end": s(() => {
58
- var r;
59
- return [
60
- B("div", P, [
61
- a.configuration.hideClientButton ? p("", !0) : (i(), d(l(H), {
57
+ "sidebar-end": a(() => [
58
+ f(l(K), { class: "darklight-reference" }, {
59
+ toggle: a(() => [
60
+ n.configuration.hideDarkModeToggle ? (t(), c("span", T)) : (t(), u(l(L), {
62
61
  key: 0,
63
- buttonSource: "sidebar",
64
- integration: e.configuration._integration,
65
- isDevelopment: k,
66
- url: (r = e.configuration.spec) == null ? void 0 : r.url
67
- }, null, 8, ["integration", "url"])),
68
- c(l(z), {
69
- hideDarkModeToggle: e.configuration.hideDarkModeToggle,
70
- isDarkMode: e.isDark,
71
- onToggleDarkMode: o[1] || (o[1] = (t) => e.$emit("toggleDarkMode"))
72
- }, null, 8, ["hideDarkModeToggle", "isDarkMode"])
73
- ])
74
- ];
75
- }),
62
+ modelValue: e.isDark,
63
+ "onUpdate:modelValue": o[1] || (o[1] = (r) => e.$emit("toggleDarkMode"))
64
+ }, null, 8, ["modelValue"]))
65
+ ]),
66
+ default: a(() => {
67
+ var r;
68
+ return [
69
+ n.configuration.hideClientButton ? p("", !0) : (t(), u(l(H), {
70
+ key: 0,
71
+ buttonSource: "sidebar",
72
+ integration: e.configuration._integration,
73
+ isDevelopment: k,
74
+ url: (r = e.configuration.spec) == null ? void 0 : r.url
75
+ }, null, 8, ["integration", "url"]))
76
+ ];
77
+ }),
78
+ _: 1
79
+ })
80
+ ]),
76
81
  _: 2
77
82
  }, [
78
- w(g, (r, t) => ({
79
- name: t,
80
- fn: s((h) => [
81
- T(e.$slots, t, N($(h || {})), void 0, !0)
83
+ D(g, (r, s) => ({
84
+ name: s,
85
+ fn: a((b) => [
86
+ M(e.$slots, s, V($(b || {})), void 0, !0)
82
87
  ])
83
88
  }))
84
89
  ]), 1032, ["class", "configuration", "parsedSpec", "rawSpec"]));