@scalar/api-reference 1.24.23 → 1.24.25

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":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiClientModal.vue"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;;;;;;;;AAoF1D,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiClientModal.vue"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;;;;;;;;AA+F1D,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,33 +1,40 @@
1
- import { defineComponent as u, ref as f, onMounted as d, openBlock as S, createElementBlock as v } from "vue";
2
- import { modalStateBus as _, apiClientBus as U } from "./api-client-bus.js";
3
- import { getUrlFromServerState as x } from "../legacy/helpers/getUrlFromServerState.js";
4
- import { useAuthenticationStore as y } from "../legacy/stores/useAuthenticationStore.js";
5
- import { useServerStore as h } from "../legacy/stores/useServerStore.js";
6
- const M = /* @__PURE__ */ u({
1
+ import { defineComponent as d, ref as S, onMounted as U, watch as _, onBeforeUnmount as h, openBlock as v, createElementBlock as x } from "vue";
2
+ import { modalStateBus as y, apiClientBus as B } from "./api-client-bus.js";
3
+ import { getUrlFromServerState as A } from "../legacy/helpers/getUrlFromServerState.js";
4
+ import { useAuthenticationStore as C } from "../legacy/stores/useAuthenticationStore.js";
5
+ import { useServerStore as k } from "../legacy/stores/useServerStore.js";
6
+ const b = /* @__PURE__ */ d({
7
7
  __name: "ApiClientModal",
8
8
  props: {
9
9
  proxyUrl: {},
10
10
  spec: {}
11
11
  },
12
- setup(p) {
13
- const t = p, e = f(null), { authentication: i } = y(), { server: l } = h();
14
- return d(async () => {
15
- if (!e.value) return;
16
- const { createScalarApiClient: r } = await import("@scalar/api-client"), { modalState: o, open: c, updateAuth: s, updateServerUrl: m } = await r(e.value, {
12
+ setup(c) {
13
+ const t = c, r = S(null), { authentication: i } = C(), { server: u } = k();
14
+ return U(async () => {
15
+ if (!r.value) return;
16
+ const { createScalarApiClient: o } = await import("@scalar/api-client"), { app: p, open: l, updateAuth: s, updateServerUrl: m, modalState: f, updateSpec: n } = await o(r.value, {
17
17
  spec: t.spec ?? {},
18
18
  proxyUrl: t.proxyUrl
19
19
  });
20
- _.emit(o), U.on((n) => {
21
- s(i);
22
- const a = x(l);
23
- a && m(a), n.open && c(n.open);
24
- });
25
- }), (r, o) => (S(), v("div", {
20
+ y.emit(f), B.on((e) => {
21
+ if (e.open) {
22
+ s(i);
23
+ const a = A(u);
24
+ a && m(a), l(e.open);
25
+ }
26
+ e.updateSpec && n(e.updateSpec);
27
+ }), _(
28
+ () => t.spec,
29
+ (e) => e && n(e),
30
+ { deep: !0 }
31
+ ), h(() => p.unmount());
32
+ }), (o, p) => (v(), x("div", {
26
33
  ref_key: "el",
27
- ref: e
34
+ ref: r
28
35
  }, null, 512));
29
36
  }
30
37
  });
31
38
  export {
32
- M as default
39
+ b as default
33
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAiNA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAG7C,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAA;;;;;;;;;;;;;;;;;;AA6U7D,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAoNA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAG7C,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAA;;;;;;;;;;;;;;;;;;AA8U7D,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./Content.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-075b0e63"]]);
5
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0b17f72e"]]);
6
6
  export {
7
- _ as default
7
+ f as default
8
8
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, computed as m, openBlock as r, createElementBlock as n, Fragment as c, createElementVNode as h, renderSlot as u, createVNode as p, unref as o, createBlock as s, withCtx as l, normalizeClass as T, renderList as k, resolveDynamicComponent as L, createCommentVNode as $, createStaticVNode as E } from "vue";
1
+ import { defineComponent as O, computed as m, openBlock as r, createElementBlock as n, Fragment as c, createElementVNode as h, renderSlot as f, createVNode as p, unref as o, createBlock as s, withCtx as l, normalizeClass as T, renderList as k, resolveDynamicComponent as L, createCommentVNode as $, createStaticVNode as E } from "vue";
2
2
  import R from "./Tag/TagAccordion.vue.js";
3
3
  import D from "./Tag/Tag.vue.js";
4
4
  import F from "./Operation/OperationAccordion.vue.js";
@@ -17,7 +17,7 @@ import { useSidebar as X } from "../../hooks/useSidebar.js";
17
17
  import { hasModels as Y } from "../../helpers/hasModels.js";
18
18
  import { getModels as w } from "../../helpers/getModels.js";
19
19
  import { useNavState as Z } from "../../hooks/useNavState.js";
20
- const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-075b0e63><div class="section-flare-item" data-v-075b0e63></div><div class="section-flare-item" data-v-075b0e63></div><div class="section-flare-item" data-v-075b0e63></div><div class="section-flare-item" data-v-075b0e63></div><div class="section-flare-item" data-v-075b0e63></div><div class="section-flare-item" data-v-075b0e63></div><div class="section-flare-item" data-v-075b0e63></div><div class="section-flare-item" data-v-075b0e63></div></div>', 1), x = { class: "narrow-references-container" }, ke = /* @__PURE__ */ O({
20
+ const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-0b17f72e><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div><div class="section-flare-item" data-v-0b17f72e></div></div>', 1), x = { class: "narrow-references-container" }, ke = /* @__PURE__ */ O({
21
21
  __name: "Content",
22
22
  props: {
23
23
  parsedSpec: {},
@@ -27,7 +27,7 @@ const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-075b0e63><div cla
27
27
  proxy: {}
28
28
  },
29
29
  setup(z) {
30
- const i = z, { getOperationId: f, getTagId: d, hash: I } = Z(), { hideModels: M, collapsedSidebarItems: N } = X(), V = m(
30
+ const i = z, { getOperationId: u, getTagId: d, hash: I } = Z(), { hideModels: M, collapsedSidebarItems: N } = X(), V = m(
31
31
  () => i.layout === "accordion" ? R : D
32
32
  ), A = m(
33
33
  () => i.layout === "accordion" ? F : W
@@ -39,7 +39,7 @@ const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-075b0e63><div cla
39
39
  return r(), n(c, null, [
40
40
  _,
41
41
  h("div", x, [
42
- u(e.$slots, "start", {}, void 0, !0),
42
+ f(e.$slots, "start", {}, void 0, !0),
43
43
  p(o(j), {
44
44
  layout: e.layout,
45
45
  parsedSpec: e.parsedSpec
@@ -66,7 +66,7 @@ const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-075b0e63><div cla
66
66
  ], 2)
67
67
  ]),
68
68
  _: 2
69
- }, 1032, ["info", "parsedSpec"])) : u(e.$slots, "empty-state", { key: 1 }, void 0, !0),
69
+ }, 1032, ["info", "parsedSpec"])) : f(e.$slots, "empty-state", { key: 1 }, void 0, !0),
70
70
  (r(!0), n(c, null, k(e.parsedSpec.tags, (a) => (r(), s(o(C), {
71
71
  id: o(d)(a),
72
72
  key: o(d)(a),
@@ -80,13 +80,13 @@ const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-075b0e63><div cla
80
80
  }, {
81
81
  default: l(() => [
82
82
  (r(!0), n(c, null, k(a.operations, (t, B) => (r(), s(o(C), {
83
- id: o(f)(t, a),
83
+ id: o(u)(t, a),
84
84
  key: `${t.httpVerb}-${t.operationId}`,
85
85
  isLazy: B > 0
86
86
  }, {
87
87
  default: l(() => [
88
88
  (r(), s(L(A.value), {
89
- id: o(f)(t, a),
89
+ id: o(u)(t, a),
90
90
  operation: t,
91
91
  tag: a
92
92
  }, null, 8, ["id", "operation", "tag"]))
@@ -112,7 +112,7 @@ const _ = /* @__PURE__ */ E('<div class="section-flare" data-v-075b0e63><div cla
112
112
  schemas: o(w)(e.parsedSpec)
113
113
  }, null, 8, ["schemas"]))
114
114
  ], 64)) : $("", !0),
115
- u(e.$slots, "end", {}, void 0, !0)
115
+ f(e.$slots, "end", {}, void 0, !0)
116
116
  ])
117
117
  ], 64);
118
118
  };
@@ -1,9 +1,10 @@
1
1
  import type { OpenClientPayload } from '@scalar/api-client';
2
- import type { AuthenticationState } from '@scalar/oas-utils';
2
+ import type { AuthenticationState, SpecConfiguration } from '@scalar/oas-utils';
3
3
  import type { RequireAtLeastOne } from 'type-fest';
4
4
  type ApiClientEvents = RequireAtLeastOne<{
5
5
  open?: OpenClientPayload;
6
6
  updateAuth?: AuthenticationState;
7
+ updateSpec?: SpecConfiguration;
7
8
  }>;
8
9
  /**
9
10
  * Event bus for controlling the Api Client
@@ -1 +1 @@
1
- {"version":3,"file":"api-client-bus.d.ts","sourceRoot":"","sources":["../../src/components/api-client-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAElD,KAAK,eAAe,GAAG,iBAAiB,CAAC;IACvC,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACxB,UAAU,CAAC,EAAE,mBAAmB,CAAA;CACjC,CAAC,CAAA;AAIF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,gEAA+B,CAAA;AACxD,eAAO,MAAM,aAAa;;;;OAAyC,CAAA"}
1
+ {"version":3,"file":"api-client-bus.d.ts","sourceRoot":"","sources":["../../src/components/api-client-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAElD,KAAK,eAAe,GAAG,iBAAiB,CAAC;IACvC,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACxB,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC/B,CAAC,CAAA;AAIF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,gEAA+B,CAAA;AACxD,eAAO,MAAM,aAAa;;;;OAAyC,CAAA"}