@scalar/api-reference 1.31.4 → 1.31.6

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 (48) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/browser/standalone.js +15616 -15521
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.js +6 -6
  5. package/dist/components/ApiReferenceLayout.vue.d.ts +6 -3
  6. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.js +4 -2
  8. package/dist/components/ApiReferenceLayout.vue2.js +230 -151
  9. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  10. package/dist/components/GettingStarted.vue.js +3 -3
  11. package/dist/components/GettingStarted.vue2.js +23 -23
  12. package/dist/index.d.ts +0 -3
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +37 -44
  15. package/dist/libs/openapi.js +32 -32
  16. package/dist/style.css +1 -1
  17. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +40 -0
  18. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -0
  19. package/dist/v2/ApiReferenceWorkspace.vue.js +65 -0
  20. package/dist/v2/ApiReferenceWorkspace.vue3.js +5 -0
  21. package/dist/v2/events/definitions.d.ts +35 -0
  22. package/dist/v2/events/definitions.d.ts.map +1 -0
  23. package/dist/v2/events/index.d.ts +3 -0
  24. package/dist/v2/events/index.d.ts.map +1 -0
  25. package/dist/v2/events/listeners.d.ts +8 -0
  26. package/dist/v2/events/listeners.d.ts.map +1 -0
  27. package/dist/v2/events/listeners.js +15 -0
  28. package/dist/v2/styles.d.ts +2 -0
  29. package/dist/v2/styles.d.ts.map +1 -0
  30. package/package.json +10 -9
  31. package/dist/components/Layouts/ClassicLayout.vue.d.ts +0 -23
  32. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +0 -1
  33. package/dist/components/Layouts/ClassicLayout.vue.js +0 -67
  34. package/dist/components/Layouts/ClassicLayout.vue2.js +0 -4
  35. package/dist/components/Layouts/Layouts.vue.d.ts +0 -26
  36. package/dist/components/Layouts/Layouts.vue.d.ts.map +0 -1
  37. package/dist/components/Layouts/Layouts.vue.js +0 -35
  38. package/dist/components/Layouts/Layouts.vue2.js +0 -4
  39. package/dist/components/Layouts/ModernLayout.vue.d.ts +0 -23
  40. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +0 -1
  41. package/dist/components/Layouts/ModernLayout.vue.js +0 -8
  42. package/dist/components/Layouts/ModernLayout.vue2.js +0 -102
  43. package/dist/components/Layouts/index.d.ts +0 -2
  44. package/dist/components/Layouts/index.d.ts.map +0 -1
  45. package/dist/components/SingleApiReference.vue.d.ts +0 -29
  46. package/dist/components/SingleApiReference.vue.d.ts.map +0 -1
  47. package/dist/components/SingleApiReference.vue.js +0 -57
  48. package/dist/components/SingleApiReference.vue3.js +0 -5
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as u, ref as n, toRef as p, provide as d, createBlock as _, openBlock as h, unref as e, withCtx as g, createVNode as x, isRef as V } from "vue";
2
- import b from "./SingleApiReference.vue.js";
3
- /* empty css */
4
- import { useMultipleDocuments as v } from "../hooks/useMultipleDocuments.js";
5
- import { NAV_STATE_SYMBOL as A } from "../hooks/useNavState.js";
2
+ import { useMultipleDocuments as b } from "../hooks/useMultipleDocuments.js";
3
+ import { NAV_STATE_SYMBOL as v } from "../hooks/useNavState.js";
4
+ import A from "../v2/ApiReferenceWorkspace.vue.js";
5
+ /* empty css */
6
6
  import B from "./DocumentSelector/DocumentSelector.vue.js";
7
7
  const N = /* @__PURE__ */ u({
8
8
  __name: "ApiReference",
@@ -17,13 +17,13 @@ const N = /* @__PURE__ */ u({
17
17
  isIntersectionEnabled: c,
18
18
  hash: f,
19
19
  hashPrefix: l
20
- } = v({
20
+ } = b({
21
21
  configuration: p(r, "configuration"),
22
22
  isIntersectionEnabled: n(!1),
23
23
  hash: n(""),
24
24
  hashPrefix: n("")
25
25
  });
26
- return d(A, { isIntersectionEnabled: c, hash: f, hashPrefix: l }), (C, t) => (h(), _(b, { configuration: e(s) }, {
26
+ return d(v, { isIntersectionEnabled: c, hash: f, hashPrefix: l }), (C, t) => (h(), _(A, { configuration: e(s) }, {
27
27
  "document-selector": g(() => [
28
28
  x(e(B), {
29
29
  modelValue: e(o),
@@ -1,6 +1,5 @@
1
1
  import { type ThemeId } from '@scalar/themes';
2
2
  import type { ReferenceLayoutProps, ReferenceSlotProps } from '../types';
3
- type __VLS_Props = Omit<ReferenceLayoutProps, 'isDark'>;
4
3
  declare function __VLS_template(): {
5
4
  attrs: Partial<{}>;
6
5
  slots: Readonly<{
@@ -11,6 +10,8 @@ declare function __VLS_template(): {
11
10
  "content-end": (props: ReferenceSlotProps) => any;
12
11
  "sidebar-start": (props: ReferenceSlotProps) => any;
13
12
  "sidebar-end": (props: ReferenceSlotProps) => any;
13
+ } & {
14
+ 'document-selector': any;
14
15
  }> & {
15
16
  footer: (props: ReferenceSlotProps) => any;
16
17
  header: (props: ReferenceSlotProps) => any;
@@ -19,6 +20,8 @@ declare function __VLS_template(): {
19
20
  "content-end": (props: ReferenceSlotProps) => any;
20
21
  "sidebar-start": (props: ReferenceSlotProps) => any;
21
22
  "sidebar-end": (props: ReferenceSlotProps) => any;
23
+ } & {
24
+ 'document-selector': any;
22
25
  };
23
26
  refs: {
24
27
  documentEl: HTMLDivElement;
@@ -26,7 +29,7 @@ declare function __VLS_template(): {
26
29
  rootEl: any;
27
30
  };
28
31
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
32
+ declare const __VLS_component: import("vue").DefineComponent<ReferenceLayoutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
30
33
  changeTheme: (args_0: {
31
34
  id: ThemeId;
32
35
  label: string;
@@ -35,7 +38,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
35
38
  linkSwaggerFile: () => any;
36
39
  updateContent: (value: string) => any;
37
40
  toggleDarkMode: () => any;
38
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
41
+ }, string, import("vue").PublicProps, Readonly<ReferenceLayoutProps> & Readonly<{
39
42
  onChangeTheme?: ((args_0: {
40
43
  id: ThemeId;
41
44
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AA4kBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AA+BvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAIhB,KAAK,WAAW,GAAG,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AA0OxD,iBAAS,cAAc;WAoPT,OAAO,IAA6B;;wBA9aZ,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;;;;;EAmb/D;AA0BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YApfqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFA2f9D,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":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AAmsBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AAmCvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAqQhB,iBAAS,cAAc;WAkYT,OAAO,IAA6B;;wBAllBV,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;6BACrC,GAAG;;wBADQ,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;6BACrC,GAAG;;;;;;EAslB/B;AAkCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YAjqBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFAwqB9D,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,8 +1,10 @@
1
1
  import o from "./ApiReferenceLayout.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
+ /* empty css */
5
+ /* empty css */
4
6
  import t from "../_virtual/_plugin-vue_export-helper.js";
5
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-93a5ef6c"]]);
7
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-10ec21b0"]]);
6
8
  export {
7
- f as default
9
+ c as default
8
10
  };
@@ -1,188 +1,242 @@
1
- import { defineComponent as ne, computed as h, provide as u, ref as E, onBeforeMount as B, onMounted as k, toValue as N, onUnmounted as ie, useId as se, createElementBlock as y, openBlock as C, Fragment as F, createElementVNode as i, createVNode as c, unref as a, normalizeStyle as le, normalizeClass as de, createCommentVNode as O, withDirectives as ue, renderSlot as s, normalizeProps as l, guardReactiveProps as d, withCtx as m, vShow as ce, createSlots as me, watch as fe } from "vue";
2
- import { provideUseId as pe } from "@headlessui/vue";
3
- import { LAYOUT_SYMBOL as ve } from "@scalar/api-client/hooks";
4
- import { WORKSPACE_SYMBOL as ge, ACTIVE_ENTITIES_SYMBOL as Se } from "@scalar/api-client/store";
5
- import { addScalarClassesToHeadless as he, ScalarErrorBoundary as be } from "@scalar/components";
6
- import { sleep as we } from "@scalar/helpers/testing/sleep";
7
- import { hasObtrusiveScrollbars as ye, getThemeStyles as Ce } from "@scalar/themes";
8
- import { apiReferenceConfigurationSchema as Te } from "@scalar/types/api-reference";
9
- import { useToasts as De, ScalarToasts as Ee } from "@scalar/use-toasts";
10
- import { useMediaQuery as Oe, useResizeObserver as $e, useDebounceFn as Re } from "@vueuse/core";
11
- import Ie from "./GettingStarted.vue.js";
12
- import { CONFIGURATION_SYMBOL as Me } from "../hooks/useConfig.js";
13
- import { useNavState as Pe } from "../hooks/useNavState.js";
14
- import { useSidebar as Le } from "../hooks/useSidebar.js";
15
- import { downloadEventBus as _, downloadDocument as Ae } from "../libs/download.js";
16
- import { useHttpClientStore as Be } from "../stores/useHttpClientStore.js";
17
- import { useDocumentSource as ke } from "../features/DocumentSource/hooks/useDocumentSource.js";
18
- import { OPENAPI_VERSION_SYMBOL as Ne } from "../features/DownloadLink/openapi-version-symbol.js";
19
- import { PLUGIN_MANAGER_SYMBOL as Fe } from "../plugins/hooks/usePluginManager.js";
20
- import { createPluginManager as _e } from "../plugins/plugin-manager.js";
21
- import He from "./Sidebar/Sidebar.vue.js";
22
- import Ue from "./Content/Content.vue.js";
23
- import Ye from "../features/ApiClientModal/ApiClientModal.vue.js";
24
- const Ve = ["innerHTML"], ze = { class: "references-header" }, Ge = ["aria-label"], Ke = { class: "references-navigation-list" }, Qe = { class: "references-editor" }, We = { class: "references-editor-textarea" }, je = ["aria-label"], qe = {
1
+ import { defineComponent as ce, computed as T, provide as h, ref as E, onBeforeMount as F, onMounted as N, toValue as U, onUnmounted as me, useId as pe, watch as O, createElementBlock as d, openBlock as r, Fragment as V, createElementVNode as p, createVNode as c, unref as a, normalizeStyle as fe, normalizeClass as ve, createCommentVNode as l, withDirectives as ge, createBlock as S, renderSlot as u, isRef as he, normalizeProps as f, guardReactiveProps as v, withCtx as i, vShow as Se, createSlots as ye } from "vue";
2
+ import { provideUseId as be } from "@headlessui/vue";
3
+ import { OpenApiClientButton as we } from "@scalar/api-client/components";
4
+ import { LAYOUT_SYMBOL as ke } from "@scalar/api-client/hooks";
5
+ import { WORKSPACE_SYMBOL as Ce, ACTIVE_ENTITIES_SYMBOL as De } from "@scalar/api-client/store";
6
+ import { addScalarClassesToHeadless as Te, ScalarErrorBoundary as $e, ScalarSidebarFooter as Me, ScalarColorModeToggleButton as Ee, ScalarColorModeToggleIcon as Oe } from "@scalar/components";
7
+ import { sleep as Be } from "@scalar/helpers/testing/sleep";
8
+ import { hasObtrusiveScrollbars as Re, getThemeStyles as Ie } from "@scalar/themes";
9
+ import { apiReferenceConfigurationSchema as He } from "@scalar/types/api-reference";
10
+ import { useBreakpoints as Pe } from "@scalar/use-hooks/useBreakpoints";
11
+ import { useToasts as Ae, ScalarToasts as Le } from "@scalar/use-toasts";
12
+ import { useMediaQuery as Fe, useResizeObserver as Ne, useDebounceFn as Ue } from "@vueuse/core";
13
+ import Ve from "./ClassicHeader.vue.js";
14
+ import _e from "./GettingStarted.vue.js";
15
+ import Ke from "./MobileHeader.vue.js";
16
+ import { CONFIGURATION_SYMBOL as Ye } from "../hooks/useConfig.js";
17
+ import { useNavState as ze } from "../hooks/useNavState.js";
18
+ import { useSidebar as Ge } from "../hooks/useSidebar.js";
19
+ import { downloadEventBus as _, downloadDocument as Qe } from "../libs/download.js";
20
+ import { useHttpClientStore as We } from "../stores/useHttpClientStore.js";
21
+ import { useDocumentSource as je } from "../features/DocumentSource/hooks/useDocumentSource.js";
22
+ import { OPENAPI_VERSION_SYMBOL as qe } from "../features/DownloadLink/openapi-version-symbol.js";
23
+ import { PLUGIN_MANAGER_SYMBOL as Je } from "../plugins/hooks/usePluginManager.js";
24
+ import { createPluginManager as Xe } from "../plugins/plugin-manager.js";
25
+ import Ze from "./Sidebar/Sidebar.vue.js";
26
+ import K from "../features/Search/SearchButton.vue.js";
27
+ import xe from "./Content/Content.vue.js";
28
+ import et from "../features/ApiClientModal/ApiClientModal.vue.js";
29
+ const tt = ["innerHTML"], ot = { class: "references-header" }, at = ["aria-label"], rt = { class: "references-navigation-list" }, nt = { key: 0 }, lt = {
30
+ key: 1,
31
+ class: "scalar-api-references-standalone-search"
32
+ }, st = { key: 1 }, it = { class: "references-editor" }, ut = { class: "references-editor-textarea" }, dt = ["aria-label"], ct = {
33
+ key: 0,
34
+ class: "w-64 empty:hidden"
35
+ }, mt = {
25
36
  key: 0,
26
37
  class: "references-footer"
27
- }, Dt = /* @__PURE__ */ ne({
38
+ }, Gt = /* @__PURE__ */ ce({
28
39
  inheritAttrs: !1,
29
40
  __name: "ApiReferenceLayout",
30
41
  props: {
31
42
  configuration: {},
32
43
  dereferencedDocument: {},
33
44
  originalDocument: {},
45
+ isDark: { type: Boolean },
34
46
  parsedSpec: {},
35
47
  rawSpec: {}
36
48
  },
37
49
  emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
38
- setup(b) {
39
- const t = h(
40
- () => Te.parse(b.configuration)
41
- ), { initializeToasts: H, toast: U } = De();
42
- H((e) => U(e));
50
+ setup($) {
51
+ const t = T(
52
+ () => He.parse($.configuration)
53
+ ), { initializeToasts: Y, toast: z } = Ae();
54
+ Y((e) => z(e));
43
55
  const {
44
- originalDocument: Y,
45
- originalOpenApiVersion: V,
46
- dereferencedDocument: T,
47
- parsedDocument: D,
48
- workspaceStore: z,
49
- activeEntitiesStore: G
50
- } = ke({
56
+ originalDocument: G,
57
+ originalOpenApiVersion: Q,
58
+ dereferencedDocument: M,
59
+ parsedDocument: y,
60
+ workspaceStore: W,
61
+ activeEntitiesStore: j
62
+ } = je({
51
63
  configuration: t,
52
- dereferencedDocument: b.dereferencedDocument,
53
- originalDocument: b.originalDocument
64
+ dereferencedDocument: $.dereferencedDocument,
65
+ originalDocument: $.originalDocument
54
66
  });
55
- u(Ne, V), u(ge, z), u(Se, G);
56
- const K = Oe("(min-width: 1150px)"), Q = E("100dvh"), f = E(null);
57
- $e(f, (e) => {
58
- Q.value = e[0].contentRect.height + "px";
67
+ h(qe, Q), h(Ce, W), h(De, j);
68
+ const q = Fe("(min-width: 1150px)"), J = E("100dvh"), b = E(null);
69
+ Ne(b, (e) => {
70
+ J.value = e[0].contentRect.height + "px";
59
71
  });
60
- const W = h(ye), {
61
- collapsedSidebarItems: Je,
62
- isSidebarOpen: j,
63
- setCollapsedSidebarItem: Xe,
64
- hideModels: q,
65
- defaultOpenAllTags: J,
72
+ const X = T(Re), {
73
+ collapsedSidebarItems: pt,
74
+ isSidebarOpen: g,
75
+ setCollapsedSidebarItem: ft,
76
+ hideModels: Z,
77
+ defaultOpenAllTags: x,
66
78
  // setParsedSpec,
67
- scrollToOperation: X
68
- } = Le(), {
69
- getReferenceId: Z,
70
- getPathRoutingId: x,
71
- getSectionId: Ze,
72
- getTagId: xe,
73
- hash: et,
74
- isIntersectionEnabled: $,
79
+ scrollToOperation: ee
80
+ } = Ge(), {
81
+ getReferenceId: te,
82
+ getPathRoutingId: oe,
83
+ getSectionId: vt,
84
+ getTagId: gt,
85
+ hash: ae,
86
+ isIntersectionEnabled: B,
75
87
  updateHash: R,
76
- replaceUrlState: ee
77
- } = Pe(t);
88
+ replaceUrlState: re
89
+ } = ze(t);
78
90
  if (t.value.redirect && typeof window < "u") {
79
91
  const e = t.value.redirect(
80
92
  (t.value.pathRouting ? window.location.pathname : "") + window.location.hash
81
93
  );
82
94
  e && history.replaceState({}, "", e);
83
95
  }
84
- B(() => R());
96
+ F(() => R());
85
97
  const I = async (e) => {
86
98
  var o;
87
- $.value = !1, R(), e ? X(e) : (o = f.value) == null || o.scrollTo(0, 0), await we(100), $.value = !0;
88
- }, M = E(0);
89
- B(() => he()), k(() => {
90
- var r, p, v;
99
+ B.value = !1, R(), e ? ee(e) : (o = b.value) == null || o.scrollTo(0, 0), await Be(100), B.value = !0;
100
+ }, H = E(0);
101
+ F(() => Te()), N(() => {
102
+ var s, w, k;
91
103
  history.scrollRestoration = "manual";
92
- const e = (p = (r = f.value) == null ? void 0 : r.parentElement) == null ? void 0 : p.getBoundingClientRect(), o = (v = f.value) == null ? void 0 : v.getBoundingClientRect();
104
+ const e = (w = (s = b.value) == null ? void 0 : s.parentElement) == null ? void 0 : w.getBoundingClientRect(), o = (k = b.value) == null ? void 0 : k.getBoundingClientRect();
93
105
  if (e && o) {
94
- const g = o.top - e.top;
95
- M.value = g < 2 ? 0 : g;
106
+ const C = o.top - e.top;
107
+ H.value = C < 2 ? 0 : C;
96
108
  }
97
109
  window.onhashchange = () => {
98
- I(Z());
99
- }, window.onpopstate = () => t.value.pathRouting && I(x(window.location.pathname));
110
+ I(te());
111
+ }, window.onpopstate = () => t.value.pathRouting && I(oe(window.location.pathname));
100
112
  });
101
- const te = h(
102
- () => K.value || !t.value.isEditable
103
- ), P = Re((e) => {
113
+ const ne = T(
114
+ () => q.value || !t.value.isEditable
115
+ ), P = Ue((e) => {
104
116
  if ((e.target.scrollTop ?? 0) < 50) {
105
- const r = t.value.pathRouting ? t.value.pathRouting.basePath : window.location.pathname;
106
- ee("", r + window.location.search);
117
+ const s = t.value.pathRouting ? t.value.pathRouting.basePath : window.location.pathname;
118
+ re("", s + window.location.search);
107
119
  }
108
- }), n = h(() => ({
109
- spec: D.value
120
+ }), m = T(() => ({
121
+ spec: y.value
110
122
  }));
111
- k(
123
+ N(
112
124
  () => _.on(({ filename: e, format: o }) => {
113
- Ae(
114
- N(Y) || N(b.rawSpec) || "",
125
+ Qe(
126
+ U(G) || U($.rawSpec) || "",
115
127
  e,
116
128
  o
117
129
  );
118
130
  })
119
- ), ie(() => _.reset()), pe(() => se()), u(ve, "modal"), u(Me, t), u(
120
- Fe,
121
- _e({
131
+ ), me(() => _.reset()), be(() => pe()), h(ke, "modal"), h(Ye, t), h(
132
+ Je,
133
+ Xe({
122
134
  plugins: t.value.plugins
123
135
  })
124
136
  );
125
- function L(e, o) {
126
- fe(
137
+ function A(e, o) {
138
+ O(
127
139
  () => t.value[e],
128
- (r) => {
129
- typeof r < "u" && o(r);
140
+ (s) => {
141
+ typeof s < "u" && o(s);
130
142
  },
131
143
  { immediate: !0 }
132
144
  );
133
145
  }
134
- const { setExcludedClients: oe, setDefaultHttpClient: ae } = Be();
135
- L("defaultHttpClient", ae), L("hiddenClients", oe), q.value = t.value.hideModels ?? !1, J.value = t.value.defaultOpenAllTags ?? !1;
136
- const re = h(
146
+ const { setExcludedClients: le, setDefaultHttpClient: se } = We();
147
+ A("defaultHttpClient", se), A("hiddenClients", le), Z.value = t.value.hideModels ?? !1, x.value = t.value.defaultOpenAllTags ?? !1;
148
+ const ie = T(
137
149
  () => `<style>
138
- ${Ce(t.value.theme, {
150
+ ${Ie(t.value.theme, {
139
151
  fonts: t.value.withDefaultFonts
140
152
  })}</style>`
141
- );
142
- return (e, o) => {
143
- var r, p, v, g, A;
144
- return C(), y(F, null, [
145
- i("div", { innerHTML: re.value }, null, 8, Ve),
146
- i("div", {
153
+ ), { mediaQueries: ue } = Pe(), de = !1;
154
+ return O(ue.lg, (e, o) => {
155
+ o && !e && (g.value = !1);
156
+ }), O(ae, (e, o) => {
157
+ e && e !== o && (g.value = !1);
158
+ }), (e, o) => {
159
+ var s, w, k, C, L;
160
+ return r(), d(V, null, [
161
+ p("div", { innerHTML: ie.value }, null, 8, tt),
162
+ p("div", {
147
163
  ref_key: "documentEl",
148
- ref: f,
149
- class: de(["scalar-app scalar-api-reference references-layout", [
164
+ ref: b,
165
+ class: ve(["scalar-app scalar-api-reference references-layout", [
150
166
  {
151
- "scalar-scrollbars-obtrusive": W.value,
167
+ "scalar-api-references-standalone-mobile": t.value.showSidebar ?? !0,
168
+ "scalar-scrollbars-obtrusive": X.value,
152
169
  "references-editable": t.value.isEditable,
153
170
  "references-sidebar": t.value.showSidebar,
154
- "references-sidebar-mobile-open": a(j),
171
+ "references-sidebar-mobile-open": a(g),
155
172
  "references-classic": t.value.layout === "classic"
156
173
  },
157
174
  e.$attrs.class
158
175
  ]]),
159
- style: le({
160
- "--scalar-y-offset": `var(--scalar-custom-header-height, ${M.value}px)`
176
+ style: fe({
177
+ "--scalar-y-offset": `var(--scalar-custom-header-height, ${H.value}px)`
161
178
  }),
162
- onScrollPassive: o[4] || (o[4] = //@ts-ignore
163
- (...w) => a(P) && a(P)(...w))
179
+ onScrollPassive: o[7] || (o[7] = //@ts-ignore
180
+ (...n) => a(P) && a(P)(...n))
164
181
  }, [
165
- i("div", ze, [
166
- s(e.$slots, "header", l(d(n.value)), void 0, !0)
182
+ p("div", ot, [
183
+ t.value.layout === "modern" && (t.value.showSidebar ?? !0) ? (r(), S(Ke, {
184
+ key: 0,
185
+ open: a(g),
186
+ "onUpdate:open": o[0] || (o[0] = (n) => he(g) ? g.value = n : null)
187
+ }, null, 8, ["open"])) : l("", !0),
188
+ u(e.$slots, "header", f(v(m.value)), void 0, !0)
167
189
  ]),
168
- t.value.showSidebar ? (C(), y("aside", {
190
+ t.value.showSidebar ? (r(), d("aside", {
169
191
  key: 0,
170
- "aria-label": `Sidebar for ${(p = (r = a(T)) == null ? void 0 : r.info) == null ? void 0 : p.title}`,
192
+ "aria-label": `Sidebar for ${(w = (s = a(M)) == null ? void 0 : s.info) == null ? void 0 : w.title}`,
171
193
  class: "references-navigation t-doc__sidebar"
172
194
  }, [
173
- i("div", Ke, [
174
- c(a(be), null, {
175
- default: m(() => [
176
- c(a(He), {
195
+ p("div", rt, [
196
+ c(a($e), null, {
197
+ default: i(() => [
198
+ c(a(Ze), {
177
199
  operationsSorter: t.value.operationsSorter,
178
- parsedSpec: a(D),
200
+ parsedSpec: a(y),
179
201
  tagsSorter: t.value.tagsSorter
180
202
  }, {
181
- "sidebar-start": m(() => [
182
- s(e.$slots, "sidebar-start", l(d(n.value)), void 0, !0)
183
- ]),
184
- "sidebar-end": m(() => [
185
- s(e.$slots, "sidebar-end", l(d(n.value)), void 0, !0)
203
+ "sidebar-start": i(() => {
204
+ var n;
205
+ return [
206
+ e.$slots["document-selector"] ? (r(), d("div", nt, [
207
+ u(e.$slots, "document-selector", {}, void 0, !0)
208
+ ])) : l("", !0),
209
+ t.value.hideSearch ? l("", !0) : (r(), d("div", lt, [
210
+ c(a(K), {
211
+ searchHotKey: (n = t.value) == null ? void 0 : n.searchHotKey,
212
+ spec: a(y)
213
+ }, null, 8, ["searchHotKey", "spec"])
214
+ ])),
215
+ u(e.$slots, "sidebar-start", f(v(m.value)), void 0, !0)
216
+ ];
217
+ }),
218
+ "sidebar-end": i(() => [
219
+ u(e.$slots, "sidebar-end", f(v(m.value)), () => [
220
+ c(a(Me), { class: "darklight-reference" }, {
221
+ toggle: i(() => [
222
+ t.value.hideDarkModeToggle ? (r(), d("span", st)) : (r(), S(a(Ee), {
223
+ key: 0,
224
+ modelValue: e.isDark,
225
+ "onUpdate:modelValue": o[1] || (o[1] = (n) => e.$emit("toggleDarkMode"))
226
+ }, null, 8, ["modelValue"]))
227
+ ]),
228
+ default: i(() => [
229
+ t.value.hideClientButton ? l("", !0) : (r(), S(a(we), {
230
+ key: 0,
231
+ buttonSource: "sidebar",
232
+ integration: t.value._integration,
233
+ isDevelopment: de,
234
+ url: t.value.url
235
+ }, null, 8, ["integration", "url"]))
236
+ ]),
237
+ _: 1
238
+ })
239
+ ], !0)
186
240
  ]),
187
241
  _: 3
188
242
  }, 8, ["operationsSorter", "parsedSpec", "tagsSorter"])
@@ -190,63 +244,88 @@ const Ve = ["innerHTML"], ze = { class: "references-header" }, Ge = ["aria-label
190
244
  _: 3
191
245
  })
192
246
  ])
193
- ], 8, Ge)) : O("", !0),
194
- ue(i("div", Qe, [
195
- i("div", We, [
196
- s(e.$slots, "editor", l(d(n.value)), void 0, !0)
247
+ ], 8, at)) : l("", !0),
248
+ ge(p("div", it, [
249
+ p("div", ut, [
250
+ u(e.$slots, "editor", f(v(m.value)), void 0, !0)
197
251
  ])
198
252
  ], 512), [
199
- [ce, t.value.isEditable]
253
+ [Se, t.value.isEditable]
200
254
  ]),
201
- te.value ? (C(), y(F, { key: 1 }, [
202
- i("main", {
203
- "aria-label": `Open API Documentation for ${(g = (v = a(T)) == null ? void 0 : v.info) == null ? void 0 : g.title}`,
255
+ ne.value ? (r(), d(V, { key: 1 }, [
256
+ p("main", {
257
+ "aria-label": `Open API Documentation for ${(C = (k = a(M)) == null ? void 0 : k.info) == null ? void 0 : C.title}`,
204
258
  class: "references-rendered"
205
259
  }, [
206
- c(a(Ue), {
260
+ c(a(xe), {
207
261
  layout: t.value.layout,
208
- parsedSpec: a(D)
209
- }, me({
210
- start: m(() => [
211
- s(e.$slots, "content-start", l(d(n.value)), void 0, !0)
262
+ parsedSpec: a(y)
263
+ }, ye({
264
+ start: i(() => [
265
+ u(e.$slots, "content-start", f(v(m.value)), () => [
266
+ t.value.layout === "classic" ? (r(), S(Ve, { key: 0 }, {
267
+ "dark-mode-toggle": i(() => [
268
+ t.value.hideDarkModeToggle ? l("", !0) : (r(), S(a(Oe), {
269
+ key: 0,
270
+ class: "text-c-2 hover:text-c-1",
271
+ mode: e.isDark ? "dark" : "light",
272
+ style: { transform: "scale(1.4)" },
273
+ variant: "icon",
274
+ onClick: o[2] || (o[2] = (n) => e.$emit("toggleDarkMode"))
275
+ }, null, 8, ["mode"]))
276
+ ]),
277
+ default: i(() => [
278
+ e.$slots["document-selector"] ? (r(), d("div", ct, [
279
+ u(e.$slots, "document-selector", {}, void 0, !0)
280
+ ])) : l("", !0),
281
+ t.value.hideSearch ? l("", !0) : (r(), S(a(K), {
282
+ key: 1,
283
+ class: "t-doc__sidebar",
284
+ searchHotKey: t.value.searchHotKey,
285
+ spec: a(y)
286
+ }, null, 8, ["searchHotKey", "spec"]))
287
+ ]),
288
+ _: 3
289
+ })) : l("", !0)
290
+ ], !0)
212
291
  ]),
213
- end: m(() => [
214
- s(e.$slots, "content-end", l(d(n.value)), void 0, !0)
292
+ end: i(() => [
293
+ u(e.$slots, "content-end", f(v(m.value)), void 0, !0)
215
294
  ]),
216
295
  _: 2
217
296
  }, [
218
- (A = t.value) != null && A.isEditable ? {
297
+ (L = t.value) != null && L.isEditable ? {
219
298
  name: "empty-state",
220
- fn: m(() => {
221
- var w;
299
+ fn: i(() => {
300
+ var n;
222
301
  return [
223
- c(Ie, {
224
- theme: ((w = t.value) == null ? void 0 : w.theme) || "default",
225
- onChangeTheme: o[0] || (o[0] = (S) => e.$emit("changeTheme", S)),
226
- onLinkSwaggerFile: o[1] || (o[1] = (S) => e.$emit("linkSwaggerFile")),
227
- onLoadSwaggerFile: o[2] || (o[2] = (S) => e.$emit("loadSwaggerFile")),
228
- onUpdateContent: o[3] || (o[3] = (S) => e.$emit("updateContent", S))
302
+ c(_e, {
303
+ theme: ((n = t.value) == null ? void 0 : n.theme) || "default",
304
+ onChangeTheme: o[3] || (o[3] = (D) => e.$emit("changeTheme", D)),
305
+ onLinkSwaggerFile: o[4] || (o[4] = (D) => e.$emit("linkSwaggerFile")),
306
+ onLoadSwaggerFile: o[5] || (o[5] = (D) => e.$emit("loadSwaggerFile")),
307
+ onUpdateContent: o[6] || (o[6] = (D) => e.$emit("updateContent", D))
229
308
  }, null, 8, ["theme"])
230
309
  ];
231
310
  }),
232
311
  key: "0"
233
312
  } : void 0
234
313
  ]), 1032, ["layout", "parsedSpec"])
235
- ], 8, je),
236
- e.$slots.footer ? (C(), y("div", qe, [
237
- s(e.$slots, "footer", l(d(n.value)), void 0, !0)
238
- ])) : O("", !0)
239
- ], 64)) : O("", !0),
240
- c(a(Ye), {
314
+ ], 8, dt),
315
+ e.$slots.footer ? (r(), d("div", mt, [
316
+ u(e.$slots, "footer", f(v(m.value)), void 0, !0)
317
+ ])) : l("", !0)
318
+ ], 64)) : l("", !0),
319
+ c(a(et), {
241
320
  configuration: t.value,
242
- dereferencedDocument: a(T)
321
+ dereferencedDocument: a(M)
243
322
  }, null, 8, ["configuration", "dereferencedDocument"])
244
323
  ], 38),
245
- c(a(Ee))
324
+ c(a(Le))
246
325
  ], 64);
247
326
  };
248
327
  }
249
328
  });
250
329
  export {
251
- Dt as default
330
+ Gt as default
252
331
  };
@@ -1 +1 @@
1
- {"version":3,"file":"GettingStarted.vue.d.ts","sourceRoot":"","sources":["../../src/components/GettingStarted.vue"],"names":[],"mappings":"AA+cA,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,OAAO,CAAA;CACf,CAAC;;;YAIwC,OAAO;eAAS,MAAM;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;AA6QhE,wBAQG"}
1
+ {"version":3,"file":"GettingStarted.vue.d.ts","sourceRoot":"","sources":["../../src/components/GettingStarted.vue"],"names":[],"mappings":"AA4cA,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,OAAO,CAAA;CACf,CAAC;;;YAIwC,OAAO;eAAS,MAAM;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;AA6QhE,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./GettingStarted.vue2.js";
2
2
  /* empty css */
3
- import o from "../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-0f473adb"]]);
3
+ import a from "../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ a(t, [["__scopeId", "data-v-0aca3a20"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };