@scalar/api-reference 1.28.10 → 1.28.12
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 +57 -0
- package/dist/browser/standalone.js +6057 -5999
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +12 -12
- package/dist/components/Content/Schema/Schema.preview.d.ts +232 -0
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts +2 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +82 -57
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +9 -7
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +55 -51
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +15 -11
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +55 -55
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue2.js +53 -53
- package/dist/features/ApiClientModal/useApiClient.d.ts +36 -320
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +4 -4
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +76 -76
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +65 -28
- package/dist/features/Search/useSearchIndex.js +72 -72
- package/dist/hooks/useMultipleDocuments.d.ts +8 -2
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.js +49 -48
- package/dist/hooks/useNavState.d.ts +6 -4
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +34 -37
- package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
- package/dist/hooks/useReactiveSpec.js +36 -36
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +14 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,KAAK,gBAAgB,EAAuB,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,KAAK,gBAAgB,EAAuB,MAAM,KAAK,CAAA;AAgDhE;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAChD,QAAQ,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;CACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDA"}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ref as s, watch as
|
|
3
|
-
import { parse as
|
|
4
|
-
import { createEmptySpecification as
|
|
5
|
-
const
|
|
6
|
-
if (
|
|
1
|
+
import { fetchDocument as l, prettyPrintJson as d } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { ref as s, watch as u, toValue as f } from "vue";
|
|
3
|
+
import { parse as h } from "../helpers/parse.js";
|
|
4
|
+
import { createEmptySpecification as m } from "../helpers/createEmptySpecification.js";
|
|
5
|
+
const v = async ({ url: a, content: e }, r) => {
|
|
6
|
+
if (a) {
|
|
7
7
|
const i = performance.now();
|
|
8
8
|
try {
|
|
9
|
-
const
|
|
10
|
-
return console.log(`fetch: ${Math.round(
|
|
11
|
-
} catch (
|
|
12
|
-
console.error("Failed to fetch
|
|
9
|
+
const n = await l(a, r), o = performance.now();
|
|
10
|
+
return console.log(`fetch: ${Math.round(o - i)} ms (${a})`), console.log("size:", Math.round(n.length / 1024), "kB"), n;
|
|
11
|
+
} catch (n) {
|
|
12
|
+
console.error("Failed to fetch OpenAPI document from URL:", n);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
const t = typeof
|
|
15
|
+
const t = typeof e == "function" ? e() : e;
|
|
16
16
|
if (typeof t == "string")
|
|
17
17
|
return t;
|
|
18
18
|
if (typeof t == "object")
|
|
19
|
-
return
|
|
19
|
+
return d(t);
|
|
20
20
|
};
|
|
21
|
-
function
|
|
22
|
-
specConfig:
|
|
23
|
-
proxyUrl:
|
|
21
|
+
function C({
|
|
22
|
+
specConfig: a,
|
|
23
|
+
proxyUrl: e
|
|
24
24
|
}) {
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
if (!
|
|
28
|
-
t.value =
|
|
25
|
+
const r = s(""), t = s(m()), i = s(null);
|
|
26
|
+
function n(o) {
|
|
27
|
+
if (!o) {
|
|
28
|
+
t.value = m();
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
proxyUrl:
|
|
33
|
-
}).then((
|
|
34
|
-
i.value = null, t.value =
|
|
35
|
-
}).catch((
|
|
36
|
-
i.value =
|
|
31
|
+
h(o, {
|
|
32
|
+
proxyUrl: e ? f(e) : void 0
|
|
33
|
+
}).then((c) => {
|
|
34
|
+
i.value = null, t.value = c;
|
|
35
|
+
}).catch((c) => {
|
|
36
|
+
i.value = c.toString();
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
return
|
|
40
|
-
() =>
|
|
41
|
-
async (
|
|
42
|
-
var
|
|
43
|
-
if (
|
|
44
|
-
const
|
|
45
|
-
typeof
|
|
39
|
+
return u(
|
|
40
|
+
() => f(a),
|
|
41
|
+
async (o) => {
|
|
42
|
+
var c;
|
|
43
|
+
if (o) {
|
|
44
|
+
const p = (c = await v(o, f(e))) == null ? void 0 : c.trim();
|
|
45
|
+
typeof p == "string" && (r.value = p);
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
{ immediate: !0, deep: !0 }
|
|
49
|
-
),
|
|
50
|
-
|
|
49
|
+
), u(r, () => {
|
|
50
|
+
n(r.value);
|
|
51
51
|
}), {
|
|
52
|
-
rawSpec:
|
|
52
|
+
rawSpec: r,
|
|
53
53
|
parsedSpec: t,
|
|
54
54
|
specErrors: i
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
export {
|
|
58
|
-
|
|
58
|
+
C as useReactiveSpec
|
|
59
59
|
};
|