@scalar/api-reference 1.35.6 → 1.36.0
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 +55 -0
- package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
- package/dist/browser/standalone.js +14463 -14322
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +148 -150
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +44 -51
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts +2 -1
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Models/ClassicLayout.vue2.js +31 -33
- package/dist/components/Content/Models/Models.vue.d.ts +2 -2
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +24 -23
- package/dist/components/Content/Models/ModernLayout.vue.d.ts +1 -0
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
- package/dist/components/Content/Models/ModernLayout.vue2.js +40 -41
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -2
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +24 -24
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
- package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
- package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
- package/dist/components/Content/Operations/get-current-index.js +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +35 -45
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/sort-property-names.d.ts +16 -0
- package/dist/components/Content/Schema/helpers/sort-property-names.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/sort-property-names.js +36 -0
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Tags/ClassicLayout.vue2.js +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue.js +2 -2
- package/dist/components/Content/Tags/ModernLayout.vue2.js +2 -2
- package/dist/components/Content/Tags/Tag.vue.d.ts +1 -1
- package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/TagSection.vue.d.ts +1 -1
- package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/TagSection.vue.js +4 -4
- package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
- package/dist/components/Lazy/Lazy.vue2.js +2 -2
- package/dist/components/MobileHeader.vue.js +2 -2
- package/dist/components/MobileHeader.vue2.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
- package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue2.js +9 -11
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
- package/dist/components/OperationsList/OperationsListItem.vue2.js +24 -27
- package/dist/components/Section/Section.vue.d.ts.map +1 -1
- package/dist/components/Section/Section.vue.js +2 -2
- package/dist/components/Section/Section.vue2.js +12 -13
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.js +1 -1
- package/dist/components/Section/SectionAccordion.vue2.js +36 -37
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +3 -3
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +32 -22
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +59 -47
- package/dist/features/Operation/helpers/get-first-server.d.ts +9 -0
- package/dist/features/Operation/helpers/get-first-server.d.ts.map +1 -0
- package/dist/features/Operation/helpers/get-first-server.js +20 -0
- package/dist/features/Search/components/SearchButton.vue.d.ts +2 -0
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.js +19 -17
- package/dist/features/Search/components/SearchModal.vue.d.ts +2 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.js +2 -2
- package/dist/features/Search/components/SearchModal.vue2.js +74 -75
- package/dist/features/Search/helpers/create-search-index.d.ts +2 -2
- package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
- package/dist/features/Search/helpers/create-search-index.js +68 -66
- package/dist/features/Search/hooks/useSearchIndex.d.ts +3 -2
- package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/hooks/useSearchIndex.js +13 -13
- package/dist/features/Search/types.d.ts +1 -1
- package/dist/features/Search/types.d.ts.map +1 -1
- package/dist/features/api-client-modal/useApiClient.d.ts +20 -20
- package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentSource.js +6 -5
- package/dist/helpers/test-utils.d.ts +367 -5
- package/dist/helpers/test-utils.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +1 -15
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +29 -53
- package/dist/index.d.ts +5 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -20
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +59 -53
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +39 -30
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +77 -71
- package/dist/{features/sidebar/components/Sidebar.vue.d.ts → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts} +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +7 -0
- package/dist/{features/sidebar/components/Sidebar.vue2.js → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js} +15 -15
- package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +7 -0
- package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue2.js +41 -43
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.js +7 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.js +7 -0
- package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue2.js +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +385 -0
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.js +35 -0
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +189 -0
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.js +9 -0
- package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/hooks/useSidebar.d.ts +4 -8
- package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.js +18 -0
- package/dist/v2/blocks/scalar-sidebar-block/index.d.ts +4 -0
- package/dist/v2/blocks/scalar-sidebar-block/index.d.ts.map +1 -0
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
- package/package.json +16 -15
- package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +0 -1
- package/dist/features/sidebar/components/Sidebar.vue.js +0 -7
- package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +0 -1
- package/dist/features/sidebar/components/SidebarElement.vue.js +0 -7
- package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +0 -1
- package/dist/features/sidebar/components/SidebarGroup.vue.js +0 -7
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +0 -1
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +0 -7
- package/dist/features/sidebar/helpers/create-sidebar.d.ts +0 -28
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +0 -1
- package/dist/features/sidebar/helpers/create-sidebar.js +0 -32
- package/dist/features/sidebar/hooks/useSidebar.d.ts.map +0 -1
- package/dist/features/sidebar/hooks/useSidebar.js +0 -18
- package/dist/features/sidebar/index.d.ts +0 -4
- package/dist/features/sidebar/index.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/get-tag.d.ts +0 -6
- package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/get-tag.js +0 -7
- package/dist/features/traverse-schema/helpers/traverse-description.d.ts +0 -11
- package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-description.js +0 -32
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts +0 -16
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-document.js +0 -33
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +0 -18
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.js +0 -30
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +0 -8
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +0 -21
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +0 -11
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.js +0 -43
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +0 -10
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.js +0 -24
- package/dist/features/traverse-schema/index.d.ts +0 -5
- package/dist/features/traverse-schema/index.d.ts.map +0 -1
- package/dist/features/traverse-schema/types.d.ts +0 -55
- package/dist/features/traverse-schema/types.d.ts.map +0 -1
- package/dist/libs/markdown.js +0 -18
- /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue.d.ts +0 -0
- /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue2.js +0 -0
- /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue.d.ts +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ref as a, watch as i, toValue as
|
|
2
|
-
import { createFuseInstance as
|
|
3
|
-
import { createSearchIndex as
|
|
1
|
+
import { ref as a, watch as i, toValue as p, computed as h } from "vue";
|
|
2
|
+
import { createFuseInstance as x } from "../helpers/create-fuse-instance.js";
|
|
3
|
+
import { createSearchIndex as I } from "../helpers/create-search-index.js";
|
|
4
4
|
const d = 25;
|
|
5
|
-
function
|
|
6
|
-
const n =
|
|
5
|
+
function g(l, v) {
|
|
6
|
+
const n = x(), e = a();
|
|
7
7
|
i(
|
|
8
8
|
l,
|
|
9
9
|
() => {
|
|
10
|
-
const { entries: r } =
|
|
10
|
+
const { entries: r } = p(l), c = I(r, v);
|
|
11
11
|
n.setCollection(c);
|
|
12
12
|
},
|
|
13
13
|
{ immediate: !0 }
|
|
@@ -15,7 +15,7 @@ function _(l) {
|
|
|
15
15
|
const t = a("");
|
|
16
16
|
i(t, (r) => {
|
|
17
17
|
if (r.length) {
|
|
18
|
-
|
|
18
|
+
f();
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
o();
|
|
@@ -23,24 +23,24 @@ function _(l) {
|
|
|
23
23
|
function o() {
|
|
24
24
|
t.value = "", e.value = void 0, s.value = [];
|
|
25
25
|
}
|
|
26
|
-
const s = a([]),
|
|
26
|
+
const s = a([]), f = () => {
|
|
27
27
|
e.value = 0, s.value = n.search(t.value, {
|
|
28
28
|
limit: d
|
|
29
29
|
});
|
|
30
|
-
}, u = h(() => t.value.length !== 0 ? s.value : n._docs.slice(0, d).map((c,
|
|
30
|
+
}, u = h(() => t.value.length !== 0 ? s.value : n._docs.slice(0, d).map((c, S) => ({
|
|
31
31
|
item: c,
|
|
32
|
-
refIndex:
|
|
33
|
-
}))),
|
|
32
|
+
refIndex: S
|
|
33
|
+
}))), m = h(
|
|
34
34
|
() => typeof e.value == "number" ? u.value[e.value] : void 0
|
|
35
35
|
);
|
|
36
36
|
return {
|
|
37
37
|
resetSearch: o,
|
|
38
38
|
selectedIndex: e,
|
|
39
|
-
selectedSearchResult:
|
|
39
|
+
selectedSearchResult: m,
|
|
40
40
|
searchResultsWithPlaceholderResults: u,
|
|
41
41
|
query: t
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
g as useSearchIndex
|
|
46
46
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TraversedEntry } from '
|
|
1
|
+
import type { TraversedEntry } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
2
|
import type { ParameterMap } from '../../libs/openapi.js';
|
|
3
3
|
export type EntryType = 'operation' | 'webhook' | 'model' | 'heading' | 'tag';
|
|
4
4
|
export type FuseData = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/Search/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/Search/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAA;AAElG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAE7E,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,SAAS,CAAA;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,YAAY,CAAA;IACvC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,cAAc,CAAA;CACtB,CAAA"}
|
|
@@ -402,7 +402,7 @@ declare const client: import("vue").Ref<{
|
|
|
402
402
|
} | undefined;
|
|
403
403
|
raw?: {
|
|
404
404
|
value: string;
|
|
405
|
-
encoding: "xml" | "json" | "
|
|
405
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
406
406
|
mimeType?: string | undefined;
|
|
407
407
|
} | undefined;
|
|
408
408
|
};
|
|
@@ -1854,7 +1854,7 @@ declare const client: import("vue").Ref<{
|
|
|
1854
1854
|
} | undefined;
|
|
1855
1855
|
raw?: {
|
|
1856
1856
|
value: string;
|
|
1857
|
-
encoding: "xml" | "json" | "
|
|
1857
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
1858
1858
|
mimeType?: string | undefined;
|
|
1859
1859
|
} | undefined;
|
|
1860
1860
|
};
|
|
@@ -1955,7 +1955,7 @@ declare const client: import("vue").Ref<{
|
|
|
1955
1955
|
} | undefined;
|
|
1956
1956
|
raw?: {
|
|
1957
1957
|
value: string;
|
|
1958
|
-
encoding: "xml" | "json" | "
|
|
1958
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
1959
1959
|
mimeType?: string | undefined;
|
|
1960
1960
|
} | undefined;
|
|
1961
1961
|
};
|
|
@@ -2057,7 +2057,7 @@ declare const client: import("vue").Ref<{
|
|
|
2057
2057
|
} | undefined;
|
|
2058
2058
|
raw?: {
|
|
2059
2059
|
value: string;
|
|
2060
|
-
encoding: "xml" | "json" | "
|
|
2060
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
2061
2061
|
mimeType?: string | undefined;
|
|
2062
2062
|
} | undefined;
|
|
2063
2063
|
};
|
|
@@ -2158,7 +2158,7 @@ declare const client: import("vue").Ref<{
|
|
|
2158
2158
|
} | undefined;
|
|
2159
2159
|
raw?: {
|
|
2160
2160
|
value: string;
|
|
2161
|
-
encoding: "xml" | "json" | "
|
|
2161
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
2162
2162
|
mimeType?: string | undefined;
|
|
2163
2163
|
} | undefined;
|
|
2164
2164
|
};
|
|
@@ -2258,7 +2258,7 @@ declare const client: import("vue").Ref<{
|
|
|
2258
2258
|
} | undefined;
|
|
2259
2259
|
raw?: {
|
|
2260
2260
|
value: string;
|
|
2261
|
-
encoding: "xml" | "json" | "
|
|
2261
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
2262
2262
|
mimeType?: string | undefined;
|
|
2263
2263
|
} | undefined;
|
|
2264
2264
|
};
|
|
@@ -2358,7 +2358,7 @@ declare const client: import("vue").Ref<{
|
|
|
2358
2358
|
} | undefined;
|
|
2359
2359
|
raw?: {
|
|
2360
2360
|
value: string;
|
|
2361
|
-
encoding: "xml" | "json" | "
|
|
2361
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
2362
2362
|
mimeType?: string | undefined;
|
|
2363
2363
|
} | undefined;
|
|
2364
2364
|
};
|
|
@@ -2459,7 +2459,7 @@ declare const client: import("vue").Ref<{
|
|
|
2459
2459
|
} | undefined;
|
|
2460
2460
|
raw?: {
|
|
2461
2461
|
value: string;
|
|
2462
|
-
encoding: "xml" | "json" | "
|
|
2462
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
2463
2463
|
mimeType?: string | undefined;
|
|
2464
2464
|
} | undefined;
|
|
2465
2465
|
};
|
|
@@ -2559,7 +2559,7 @@ declare const client: import("vue").Ref<{
|
|
|
2559
2559
|
} | undefined;
|
|
2560
2560
|
raw?: {
|
|
2561
2561
|
value: string;
|
|
2562
|
-
encoding: "xml" | "json" | "
|
|
2562
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
2563
2563
|
mimeType?: string | undefined;
|
|
2564
2564
|
} | undefined;
|
|
2565
2565
|
};
|
|
@@ -2659,7 +2659,7 @@ declare const client: import("vue").Ref<{
|
|
|
2659
2659
|
} | undefined;
|
|
2660
2660
|
raw?: {
|
|
2661
2661
|
value: string;
|
|
2662
|
-
encoding: "xml" | "json" | "
|
|
2662
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
2663
2663
|
mimeType?: string | undefined;
|
|
2664
2664
|
} | undefined;
|
|
2665
2665
|
};
|
|
@@ -4360,7 +4360,7 @@ declare const client: import("vue").Ref<{
|
|
|
4360
4360
|
} | undefined;
|
|
4361
4361
|
raw?: {
|
|
4362
4362
|
value: string;
|
|
4363
|
-
encoding: "xml" | "json" | "
|
|
4363
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
4364
4364
|
mimeType?: string | undefined;
|
|
4365
4365
|
} | undefined;
|
|
4366
4366
|
};
|
|
@@ -5812,7 +5812,7 @@ declare const client: import("vue").Ref<{
|
|
|
5812
5812
|
} | undefined;
|
|
5813
5813
|
raw?: {
|
|
5814
5814
|
value: string;
|
|
5815
|
-
encoding: "xml" | "json" | "
|
|
5815
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
5816
5816
|
mimeType?: string | undefined;
|
|
5817
5817
|
} | undefined;
|
|
5818
5818
|
};
|
|
@@ -5913,7 +5913,7 @@ declare const client: import("vue").Ref<{
|
|
|
5913
5913
|
} | undefined;
|
|
5914
5914
|
raw?: {
|
|
5915
5915
|
value: string;
|
|
5916
|
-
encoding: "xml" | "json" | "
|
|
5916
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
5917
5917
|
mimeType?: string | undefined;
|
|
5918
5918
|
} | undefined;
|
|
5919
5919
|
};
|
|
@@ -6015,7 +6015,7 @@ declare const client: import("vue").Ref<{
|
|
|
6015
6015
|
} | undefined;
|
|
6016
6016
|
raw?: {
|
|
6017
6017
|
value: string;
|
|
6018
|
-
encoding: "xml" | "json" | "
|
|
6018
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
6019
6019
|
mimeType?: string | undefined;
|
|
6020
6020
|
} | undefined;
|
|
6021
6021
|
};
|
|
@@ -6116,7 +6116,7 @@ declare const client: import("vue").Ref<{
|
|
|
6116
6116
|
} | undefined;
|
|
6117
6117
|
raw?: {
|
|
6118
6118
|
value: string;
|
|
6119
|
-
encoding: "xml" | "json" | "
|
|
6119
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
6120
6120
|
mimeType?: string | undefined;
|
|
6121
6121
|
} | undefined;
|
|
6122
6122
|
};
|
|
@@ -6216,7 +6216,7 @@ declare const client: import("vue").Ref<{
|
|
|
6216
6216
|
} | undefined;
|
|
6217
6217
|
raw?: {
|
|
6218
6218
|
value: string;
|
|
6219
|
-
encoding: "xml" | "json" | "
|
|
6219
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
6220
6220
|
mimeType?: string | undefined;
|
|
6221
6221
|
} | undefined;
|
|
6222
6222
|
};
|
|
@@ -6316,7 +6316,7 @@ declare const client: import("vue").Ref<{
|
|
|
6316
6316
|
} | undefined;
|
|
6317
6317
|
raw?: {
|
|
6318
6318
|
value: string;
|
|
6319
|
-
encoding: "xml" | "json" | "
|
|
6319
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
6320
6320
|
mimeType?: string | undefined;
|
|
6321
6321
|
} | undefined;
|
|
6322
6322
|
};
|
|
@@ -6417,7 +6417,7 @@ declare const client: import("vue").Ref<{
|
|
|
6417
6417
|
} | undefined;
|
|
6418
6418
|
raw?: {
|
|
6419
6419
|
value: string;
|
|
6420
|
-
encoding: "xml" | "json" | "
|
|
6420
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
6421
6421
|
mimeType?: string | undefined;
|
|
6422
6422
|
} | undefined;
|
|
6423
6423
|
};
|
|
@@ -6517,7 +6517,7 @@ declare const client: import("vue").Ref<{
|
|
|
6517
6517
|
} | undefined;
|
|
6518
6518
|
raw?: {
|
|
6519
6519
|
value: string;
|
|
6520
|
-
encoding: "xml" | "json" | "
|
|
6520
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
6521
6521
|
mimeType?: string | undefined;
|
|
6522
6522
|
} | undefined;
|
|
6523
6523
|
};
|
|
@@ -6617,7 +6617,7 @@ declare const client: import("vue").Ref<{
|
|
|
6617
6617
|
} | undefined;
|
|
6618
6618
|
raw?: {
|
|
6619
6619
|
value: string;
|
|
6620
|
-
encoding: "xml" | "json" | "
|
|
6620
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
6621
6621
|
mimeType?: string | undefined;
|
|
6622
6622
|
} | undefined;
|
|
6623
6623
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentSource.d.ts","sourceRoot":"","sources":["../../../../src/features/document-source/hooks/useDocumentSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAG1F,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"useDocumentSource.d.ts","sourceRoot":"","sources":["../../../../src/features/document-source/hooks/useDocumentSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAG1F,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE,KAAK,yBAAyB,EAAmC,MAAM,6BAA6B,CAAA;AAC7G,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAiC,MAAM,KAAK,CAAA;AAIpF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,gBAAgB,EAAE,wBAAwB,EAC1C,oBAAoB,EAAE,4BAA4B,EAClD,aAAa,GACd,EAAE;IACD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAC3C,oBAAoB,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC7D,aAAa,CAAC,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,CAAA;CAC5D,GAAG;IACF,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7B,sBAAsB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACnC,oBAAoB,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC/C,cAAc,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;IACvD,mBAAmB,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAA;CAClE,CA2GA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createWorkspaceStore as v, createActiveEntitiesStore as y } from "@scalar/api-client/store";
|
|
2
2
|
import { measureAsync as P } from "@scalar/helpers/testing/measure";
|
|
3
|
-
import { normalize as w,
|
|
3
|
+
import { normalize as w, dereference as O } from "@scalar/openapi-parser";
|
|
4
|
+
import { upgrade as V } from "@scalar/openapi-upgrader";
|
|
4
5
|
import { apiReferenceConfigurationSchema as D } from "@scalar/types/api-reference";
|
|
5
6
|
import { computed as f, toValue as r, ref as l, watch as F } from "vue";
|
|
6
7
|
import { useDocumentFetcher as I } from "./useDocumentFetcher.js";
|
|
7
|
-
function
|
|
8
|
+
function L({
|
|
8
9
|
originalDocument: c,
|
|
9
10
|
dereferencedDocument: t,
|
|
10
11
|
configuration: i
|
|
@@ -33,12 +34,12 @@ function C({
|
|
|
33
34
|
return;
|
|
34
35
|
const S = !o.value.startsWith("3.1") ? (
|
|
35
36
|
// Upgrade needed
|
|
36
|
-
|
|
37
|
+
V(e, "3.1")
|
|
37
38
|
) : (
|
|
38
39
|
// Skip the upgrade
|
|
39
40
|
e
|
|
40
41
|
), A = await P("dereference", async () => {
|
|
41
|
-
const { schema: p, errors: a } = await
|
|
42
|
+
const { schema: p, errors: a } = await O(S);
|
|
42
43
|
return a?.length && console.warn(
|
|
43
44
|
`Please open an issue on https://github.com/scalar/scalar
|
|
44
45
|
`,
|
|
@@ -64,5 +65,5 @@ function C({
|
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
67
|
export {
|
|
67
|
-
|
|
68
|
+
L as useDocumentSource
|
|
68
69
|
};
|