@scalar/api-reference 1.44.17 → 1.44.20

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 +1 @@
1
- {"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAssCA,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AAOpC,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,4CAA4C,CAAA;AAkBnD,OAAO,8BAA8B,CAAA;AAiCrC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,oBAAoB,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,MAAM,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC,CAAC;AAyxCF,QAAA,MAAM,UAAU;;;;oPAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AA0uCA,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AAOpC,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,4CAA4C,CAAA;AAkBnD,OAAO,8BAA8B,CAAA;AAiCrC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,oBAAoB,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,MAAM,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC,CAAC;AAqzCF,QAAA,MAAM,UAAU;;;;oPAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -4,7 +4,7 @@ import _sfc_main from "./ApiReference.vue2.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
7
- const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b74c9183"]]);
7
+ const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2a5231c6"]]);
8
8
  export {
9
9
  ApiReference as default
10
10
  };
@@ -2,10 +2,10 @@ import { defineComponent, computed, ref, watch, useId, provide, onServerPrefetch
2
2
  import { provideUseId } from "@headlessui/vue";
3
3
  import { OpenApiClientButton } from "@scalar/api-client/components";
4
4
  import { createApiClientModal } from "@scalar/api-client/v2/features/modal";
5
- import { getActiveEnvironment } from "@scalar/api-client/v2/helpers";
5
+ import { getActiveEnvironment, getServers } from "@scalar/api-client/v2/helpers";
6
6
  import { addScalarClassesToHeadless, ScalarSidebarFooter, ScalarColorModeToggleButton, ScalarColorModeToggleIcon } from "@scalar/components";
7
7
  import { redirectToProxy } from "@scalar/helpers/url/redirect-to-proxy";
8
- import { createSidebarState, ScalarSidebar } from "@scalar/sidebar";
8
+ import { createSidebarState, scrollSidebarToTop, ScalarSidebar } from "@scalar/sidebar";
9
9
  import { hasObtrusiveScrollbars, getThemeStyles } from "@scalar/themes";
10
10
  import { apiReferenceConfigurationSchema } from "@scalar/types/api-reference";
11
11
  import { useBreakpoints } from "@scalar/use-hooks/useBreakpoints";
@@ -286,7 +286,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
286
286
  });
287
287
  const isFirstLoad = !workspaceStore.workspace.documents[slug];
288
288
  if (isFirstLoad) {
289
- await workspaceStore.addDocument(
289
+ const result = await workspaceStore.addDocument(
290
290
  normalized.source.url ? {
291
291
  name: slug,
292
292
  url: normalized.source.url,
@@ -297,6 +297,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
297
297
  },
298
298
  config
299
299
  );
300
+ const document2 = workspaceStore.workspace.documents[slug];
301
+ if (result === true && document2 !== void 0 && document2["x-scalar-selected-server"] === void 0) {
302
+ const servers = getServers(
303
+ normalized.config.servers ?? document2.servers,
304
+ {
305
+ baseServerUrl: mergedConfig.value.baseServerURL,
306
+ documentUrl: normalized.source.url
307
+ }
308
+ );
309
+ if (servers.length > 0) {
310
+ workspaceStore.updateDocument(
311
+ slug,
312
+ "x-scalar-selected-server",
313
+ servers[0].url
314
+ );
315
+ }
316
+ }
300
317
  }
301
318
  workspaceStore.update("x-scalar-active-document", slug);
302
319
  if (config.persistAuth) {
@@ -464,6 +481,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
464
481
  }
465
482
  sidebarState.setSelected(id);
466
483
  setBreadcrumb(id);
484
+ scrollSidebarToTop(id);
467
485
  const url = makeUrlFromId(id, basePath.value, isMultiDocument.value);
468
486
  if (url && workspaceStore.workspace.activeDocument) {
469
487
  window.history.replaceState({}, "", url.toString());
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AA0PA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AASzG,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAqBrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAMxE,KAAK,WAAW,GAAG,IAAI,CACnB,cAAc,EACZ,UAAU,GACV,WAAW,GACX,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,WAAW,CACd,GAAG;IACF,wCAAwC;IACxC,SAAS,EAAE,eAAe,CAAA;IAC1B,4CAA4C;IAC5C,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,sDAAsD;IACtD,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;CACtD,CAAC;AA8iBJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AA8PA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AASzG,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAqBrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAMxE,KAAK,WAAW,GAAG,IAAI,CACnB,cAAc,EACZ,UAAU,GACV,WAAW,GACX,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,WAAW,CACd,GAAG;IACF,wCAAwC;IACxC,SAAS,EAAE,eAAe,CAAA;IAC1B,4CAA4C;IAC5C,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,sDAAsD;IACtD,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;CACtD,CAAC;AA+iBJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./ModernLayout.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const ModernLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a892a6ae"]]);
4
+ const ModernLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d5291d61"]]);
5
5
  export {
6
6
  ModernLayout as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./ExampleResponseTab.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const ExampleResponseTab = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c8207e48"]]);
4
+ const ExampleResponseTab = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-804dba49"]]);
5
5
  export {
6
6
  ExampleResponseTab as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleResponses.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponses.vue"],"names":[],"mappings":"AAuXA,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,8DAA8D,CAAA;AAUrE;;GAEG;AAEH,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAA;CAC3B,CAAC;AA2XF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ExampleResponses.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponses.vue"],"names":[],"mappings":"AAwXA,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,8DAA8D,CAAA;AAUrE;;GAEG;AAEH,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAA;CAC3B,CAAC;AA8XF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./ExampleResponses.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const ExampleResponses = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-49cbbee3"]]);
4
+ const ExampleResponses = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4f7e7d02"]]);
5
5
  export {
6
6
  ExampleResponses as default
7
7
  };
@@ -141,6 +141,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
141
141
  key: 0,
142
142
  id: unref(id),
143
143
  content: unref(getResolvedRefDeep)(currentResponseContent.value?.schema),
144
+ class: "bg-b-2",
144
145
  lang: "json"
145
146
  }, null, 8, ["id", "content"])) : (openBlock(), createBlock(ExampleResponse, {
146
147
  key: 1,
@@ -1,4 +1,4 @@
1
- import type { ClientPlugin } from '@scalar/api-client/v2/helpers';
1
+ import type { ClientPlugin } from '@scalar/oas-utils/helpers';
2
2
  import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
3
3
  import { type ComputedRef } from 'vue';
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"map-config-plugins.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,EAAE,KAAK,WAAW,EAAS,MAAM,KAAK,CAAA;AAE7C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,WAAW,CAAC,4BAA4B,CAAC,KAAG,YAAY,EAwChG,CAAA"}
1
+ {"version":3,"file":"map-config-plugins.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,EAAE,KAAK,WAAW,EAAS,MAAM,KAAK,CAAA;AAE7C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,WAAW,CAAC,4BAA4B,CAAC,KAAG,YAAY,EAwChG,CAAA"}
@@ -92,7 +92,125 @@ export declare const authStorage: () => {
92
92
  } & {
93
93
  'x-scalar-credentials-location'?: "body" | "header" | undefined;
94
94
  }) | undefined;
95
- });
95
+ }) | {
96
+ implicit?: ({
97
+ refreshUrl: string;
98
+ scopes: {
99
+ [x: string]: string;
100
+ };
101
+ } & {
102
+ 'x-scalar-security-query'?: {
103
+ [x: string]: string;
104
+ } | undefined;
105
+ } & {
106
+ 'x-scalar-security-body'?: {
107
+ [x: string]: string;
108
+ } | undefined;
109
+ } & {
110
+ 'x-tokenName'?: string | undefined;
111
+ } & {
112
+ authorizationUrl: string;
113
+ } & {
114
+ 'x-scalar-secret-client-id': string;
115
+ } & {
116
+ 'x-scalar-secret-token': string;
117
+ } & {
118
+ 'x-scalar-secret-redirect-uri': string;
119
+ }) | undefined;
120
+ password?: ({
121
+ refreshUrl: string;
122
+ scopes: {
123
+ [x: string]: string;
124
+ };
125
+ } & {
126
+ 'x-scalar-security-query'?: {
127
+ [x: string]: string;
128
+ } | undefined;
129
+ } & {
130
+ 'x-scalar-security-body'?: {
131
+ [x: string]: string;
132
+ } | undefined;
133
+ } & {
134
+ 'x-tokenName'?: string | undefined;
135
+ } & {
136
+ tokenUrl: string;
137
+ } & {
138
+ 'x-scalar-credentials-location'?: "body" | "header" | undefined;
139
+ } & {
140
+ 'x-scalar-secret-client-id': string;
141
+ } & {
142
+ 'x-scalar-secret-token': string;
143
+ } & {
144
+ 'x-scalar-secret-username': string;
145
+ 'x-scalar-secret-password': string;
146
+ } & {
147
+ 'x-scalar-secret-client-secret': string;
148
+ } & {
149
+ 'x-scalar-credentials-location'?: "body" | "header" | undefined;
150
+ }) | undefined;
151
+ clientCredentials?: ({
152
+ refreshUrl: string;
153
+ scopes: {
154
+ [x: string]: string;
155
+ };
156
+ } & {
157
+ 'x-scalar-security-query'?: {
158
+ [x: string]: string;
159
+ } | undefined;
160
+ } & {
161
+ 'x-scalar-security-body'?: {
162
+ [x: string]: string;
163
+ } | undefined;
164
+ } & {
165
+ 'x-tokenName'?: string | undefined;
166
+ } & {
167
+ tokenUrl: string;
168
+ } & {
169
+ 'x-scalar-credentials-location'?: "body" | "header" | undefined;
170
+ } & {
171
+ 'x-scalar-secret-client-id': string;
172
+ } & {
173
+ 'x-scalar-secret-token': string;
174
+ } & {
175
+ 'x-scalar-secret-client-secret': string;
176
+ } & {
177
+ 'x-scalar-credentials-location'?: "body" | "header" | undefined;
178
+ }) | undefined;
179
+ authorizationCode?: ({
180
+ refreshUrl: string;
181
+ scopes: {
182
+ [x: string]: string;
183
+ };
184
+ } & {
185
+ 'x-scalar-security-query'?: {
186
+ [x: string]: string;
187
+ } | undefined;
188
+ } & {
189
+ 'x-scalar-security-body'?: {
190
+ [x: string]: string;
191
+ } | undefined;
192
+ } & {
193
+ 'x-tokenName'?: string | undefined;
194
+ } & {
195
+ tokenUrl: string;
196
+ authorizationUrl: string;
197
+ } & {
198
+ 'x-usePkce': "SHA-256" | "plain" | "no";
199
+ } & {
200
+ 'x-scalar-credentials-location'?: "body" | "header" | undefined;
201
+ } & {
202
+ 'x-scalar-secret-client-id': string;
203
+ } & {
204
+ 'x-scalar-secret-token': string;
205
+ } & {
206
+ 'x-scalar-secret-client-secret': string;
207
+ } & {
208
+ 'x-scalar-secret-redirect-uri': string;
209
+ } & {
210
+ 'x-scalar-credentials-location'?: "body" | "header" | undefined;
211
+ }) | undefined;
212
+ type: "openIdConnect";
213
+ };
96
214
  };
97
215
  };
98
216
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/helpers/storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,uCAAuC,CAAA;AAM7E;;;GAGG;AACH,eAAO,MAAM,aAAa;IAGtB;;OAEG;;IAIH;;;OAGG;iBACU,MAAM;CAItB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW;IAMpB;;OAEG;oBACa,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAItB;;;OAGG;oBACa,MAAM,SAAS,IAAI;CAItC,CAAA"}
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/helpers/storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,uCAAuC,CAAA;AAM7E;;;GAGG;AACH,eAAO,MAAM,aAAa;IAGtB;;OAEG;;IAIH;;;OAGG;iBACU,MAAM;CAItB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW;IAMpB;;OAEG;oBACa,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAItB;;;OAGG;oBACa,MAAM,SAAS,IAAI;CAItC,CAAA"}