@scalar/api-reference 1.24.24 → 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.
- package/CHANGELOG.md +10 -0
- package/dist/browser/standalone.js +4856 -4846
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/components/ApiClientModal.vue.js +26 -19
- package/dist/components/api-client-bus.d.ts +2 -1
- package/dist/components/api-client-bus.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiClientModal.vue"],"names":[],"mappings":"
|
|
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
|
|
2
|
-
import { modalStateBus as
|
|
3
|
-
import { getUrlFromServerState as
|
|
4
|
-
import { useAuthenticationStore as
|
|
5
|
-
import { useServerStore as
|
|
6
|
-
const
|
|
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(
|
|
13
|
-
const t =
|
|
14
|
-
return
|
|
15
|
-
if (!
|
|
16
|
-
const { createScalarApiClient:
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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:
|
|
34
|
+
ref: r
|
|
28
35
|
}, null, 512));
|
|
29
36
|
}
|
|
30
37
|
});
|
|
31
38
|
export {
|
|
32
|
-
|
|
39
|
+
b as default
|
|
33
40
|
};
|
|
@@ -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;
|
|
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"}
|