@scalar/api-reference 1.35.7 → 1.36.1
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 +39 -0
- package/dist/browser/standalone.js +14984 -15007
- 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 +4 -1
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue2.js +49 -40
- 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 +25 -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 +54 -51
- 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/Schema.vue.d.ts +3 -4
- 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 +72 -75
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -5
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +46 -49
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -7
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +33 -54
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -6
- 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 +72 -76
- 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/Schema/types.d.ts +17 -0
- package/dist/components/Content/Schema/types.d.ts.map +1 -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/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/Header.vue.d.ts +2 -0
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Header.vue.js +15 -10
- package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/Headers.vue2.js +23 -21
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +55 -48
- 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 +74 -49
- 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 +40 -40
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/helpers/convert-security-scheme.d.ts +1 -1
- 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/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +5 -6
- 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 +11 -11
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TraversedEntry.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntry.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TraversedEntry.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntry.vue"],"names":[],"mappings":"AA+JA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAIf,MAAM,8DAA8D,CAAA;AASrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAEvF,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,MAAM,EAAE,yBAAyB,CAAA;IACjC,QAAQ,EAAE,eAAe,CAAA;IACzB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,gBAAgB,EAAE,UAAU,CAAA;IAC5B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;;oBA0CqB,cAAc,SAAS,MAAM;;AA+LpD,wBAOG"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as I, computed as g, resolveComponent as S, createElementBlock as T, openBlock as t, Fragment as L, renderList as b, createBlock as n, unref as i, withCtx as v, createCommentVNode as h, createVNode as B } from "vue";
|
|
2
2
|
import { getCurrentIndex as E } from "./get-current-index.js";
|
|
3
|
-
import { useNavState as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { useNavState as z } from "../../../hooks/useNavState.js";
|
|
4
|
+
import N from "../../Lazy/Lazy.vue2.js";
|
|
5
|
+
import W from "../../Section/SectionContainer.vue.js";
|
|
6
6
|
import $ from "../../../features/Operation/Operation.vue.js";
|
|
7
7
|
import w from "../Tags/Tag.vue.js";
|
|
8
|
-
const
|
|
8
|
+
const D = /* @__PURE__ */ I({
|
|
9
9
|
__name: "TraversedEntry",
|
|
10
10
|
props: {
|
|
11
11
|
level: { default: 0 },
|
|
@@ -18,47 +18,47 @@ const H = /* @__PURE__ */ S({
|
|
|
18
18
|
activeServer: {},
|
|
19
19
|
store: {}
|
|
20
20
|
},
|
|
21
|
-
setup(r, { expose:
|
|
22
|
-
const l = (e) => "
|
|
23
|
-
return
|
|
24
|
-
currentIndex:
|
|
25
|
-
isLazy:
|
|
21
|
+
setup(r, { expose: C }) {
|
|
22
|
+
const l = (e) => e.type === "tag" && e.isGroup === !0, d = (e) => e.type === "tag" && !l(e), O = (e) => e.type === "operation", a = (e) => e.type === "webhook", m = g(() => r.level === 0), { hash: k } = z(), c = g(() => m.value ? r.rootIndex : E(k.value, r.entries)), s = (e, u) => l(e) ? null : u < c.value ? "prev" : u > c.value + 2 ? "after" : null;
|
|
23
|
+
return C({
|
|
24
|
+
currentIndex: c,
|
|
25
|
+
isLazy: s
|
|
26
26
|
}), (e, u) => {
|
|
27
|
-
const p =
|
|
28
|
-
return
|
|
27
|
+
const p = S("TraversedEntry", !0);
|
|
28
|
+
return t(!0), T(L, null, b(e.entries, (o, f) => (t(), n(i(N), {
|
|
29
29
|
id: o.id,
|
|
30
30
|
key: o.id,
|
|
31
|
-
isLazy: !!
|
|
32
|
-
prev:
|
|
31
|
+
isLazy: !!s(o, f),
|
|
32
|
+
prev: s(o, f) === "prev"
|
|
33
33
|
}, {
|
|
34
34
|
default: v(() => [
|
|
35
|
-
|
|
35
|
+
O(o) || a(o) ? (t(), n(i(W), {
|
|
36
36
|
key: 0,
|
|
37
37
|
omit: !m.value
|
|
38
38
|
}, {
|
|
39
39
|
default: v(() => [
|
|
40
|
-
|
|
40
|
+
B(i($), {
|
|
41
41
|
id: o.id,
|
|
42
42
|
clientOptions: e.clientOptions,
|
|
43
43
|
collection: e.activeCollection,
|
|
44
44
|
config: e.config,
|
|
45
45
|
document: e.document,
|
|
46
|
-
isWebhook:
|
|
46
|
+
isWebhook: a(o),
|
|
47
47
|
method: o.method,
|
|
48
|
-
path:
|
|
48
|
+
path: a(o) ? o.name : o.path,
|
|
49
49
|
server: e.activeServer,
|
|
50
50
|
store: e.store
|
|
51
51
|
}, null, 8, ["id", "clientOptions", "collection", "config", "document", "isWebhook", "method", "path", "server", "store"])
|
|
52
52
|
]),
|
|
53
53
|
_: 2
|
|
54
|
-
}, 1032, ["omit"])) :
|
|
54
|
+
}, 1032, ["omit"])) : d(o) ? (t(), n(i(w), {
|
|
55
55
|
key: 1,
|
|
56
56
|
layout: e.config.layout,
|
|
57
57
|
moreThanOneTag: e.entries.filter(d).length > 1,
|
|
58
58
|
tag: o
|
|
59
59
|
}, {
|
|
60
60
|
default: v(() => [
|
|
61
|
-
"children" in o && o.children?.length ? (
|
|
61
|
+
"children" in o && o.children?.length ? (t(), n(p, {
|
|
62
62
|
key: 0,
|
|
63
63
|
activeCollection: e.activeCollection,
|
|
64
64
|
activeServer: e.activeServer,
|
|
@@ -69,10 +69,10 @@ const H = /* @__PURE__ */ S({
|
|
|
69
69
|
level: e.level + 1,
|
|
70
70
|
rootIndex: e.rootIndex,
|
|
71
71
|
store: e.store
|
|
72
|
-
}, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) :
|
|
72
|
+
}, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) : h("", !0)
|
|
73
73
|
]),
|
|
74
74
|
_: 2
|
|
75
|
-
}, 1032, ["layout", "moreThanOneTag", "tag"])) : l(o) ? (
|
|
75
|
+
}, 1032, ["layout", "moreThanOneTag", "tag"])) : l(o) ? (t(), n(p, {
|
|
76
76
|
key: 2,
|
|
77
77
|
activeCollection: e.activeCollection,
|
|
78
78
|
activeServer: e.activeServer,
|
|
@@ -83,7 +83,7 @@ const H = /* @__PURE__ */ S({
|
|
|
83
83
|
level: e.level + 1,
|
|
84
84
|
rootIndex: e.rootIndex,
|
|
85
85
|
store: e.store
|
|
86
|
-
}, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) :
|
|
86
|
+
}, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "level", "rootIndex", "store"])) : h("", !0)
|
|
87
87
|
]),
|
|
88
88
|
_: 2
|
|
89
89
|
}, 1032, ["id", "isLazy", "prev"]))), 128);
|
|
@@ -91,5 +91,5 @@ const H = /* @__PURE__ */ S({
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
export {
|
|
94
|
-
|
|
94
|
+
D as default
|
|
95
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TraversedEntryContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntryContainer.vue"],"names":[],"mappings":"AAyFA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"TraversedEntryContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntryContainer.vue"],"names":[],"mappings":"AAyFA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAKnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAKvF,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,QAAQ,EAAE,eAAe,CAAA;IACzB,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;AA6GF,wBAMG"}
|
|
@@ -4,7 +4,7 @@ import { getSlugUid as h } from "@scalar/oas-utils/transforms";
|
|
|
4
4
|
import { getCurrentIndex as _ } from "./get-current-index.js";
|
|
5
5
|
import { useNavState as k } from "../../../hooks/useNavState.js";
|
|
6
6
|
import I from "./TraversedEntry.vue.js";
|
|
7
|
-
import { useSidebar as O } from "../../../
|
|
7
|
+
import { useSidebar as O } from "../../../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
|
|
8
8
|
const E = { key: 0 }, T = /* @__PURE__ */ m({
|
|
9
9
|
__name: "TraversedEntryContainer",
|
|
10
10
|
props: {
|
|
@@ -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
|
/** Loops through the entries and returns the index of the current entry based on the hash */
|
|
3
3
|
export declare const getCurrentIndex: (hash: string, entries: TraversedEntry[]) => number;
|
|
4
4
|
//# sourceMappingURL=get-current-index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-current-index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/get-current-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"get-current-index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/get-current-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAA;AAuBlG,6FAA6F;AAC7F,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,EAAE,SAAS,cAAc,EAAE,WAYtE,CAAA"}
|
|
@@ -9,7 +9,7 @@ const d = /^.*?(?=\.query|\.path|\.headers|\.cookies|\.body)/, i = (t) => {
|
|
|
9
9
|
return t;
|
|
10
10
|
}, o = (t, e) => {
|
|
11
11
|
const n = i(t);
|
|
12
|
-
return e.findIndex((r) => "tag"
|
|
12
|
+
return e.findIndex((r) => r.type === "tag" ? n.startsWith(r.id) : n === r.id);
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
15
|
o as getCurrentIndex
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
import type { SchemaOptions } from '../../../components/Content/Schema/types';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
schema?: SchemaObject;
|
|
4
5
|
/** Track how deep we've gone */
|
|
@@ -10,10 +11,6 @@ type __VLS_Props = {
|
|
|
10
11
|
noncollapsible?: boolean;
|
|
11
12
|
/** Hide the heading */
|
|
12
13
|
hideHeading?: boolean;
|
|
13
|
-
/** Hide read-only properties */
|
|
14
|
-
hideReadOnly?: boolean;
|
|
15
|
-
/** Hide write-only properties */
|
|
16
|
-
hideWriteOnly?: boolean;
|
|
17
14
|
/** Show a special one way toggle for additional properties, also has a top border when open */
|
|
18
15
|
additionalProperties?: boolean;
|
|
19
16
|
/** Hide model names in type display */
|
|
@@ -22,6 +19,8 @@ type __VLS_Props = {
|
|
|
22
19
|
discriminator?: DiscriminatorObject;
|
|
23
20
|
/** Breadcrumb for the schema */
|
|
24
21
|
breadcrumb?: string[];
|
|
22
|
+
/** Move the options into a single prop so they are easy to pass around */
|
|
23
|
+
options: SchemaOptions;
|
|
25
24
|
};
|
|
26
25
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
26
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAgVA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAQtE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,uBAAuB;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;AAyaF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Schema.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-09c7c1bd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as P, DisclosureButton as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import
|
|
5
|
-
import { isTypeObject as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as H, computed as k, createBlock as o, createCommentVNode as t, openBlock as i, unref as l, withCtx as r, createElementVNode as g, normalizeClass as m, createElementBlock as c, createVNode as n, withDirectives as S, createTextVNode as d, toDisplayString as u, vShow as C, normalizeStyle as O, Fragment as h } from "vue";
|
|
2
|
+
import { Disclosure as P, DisclosureButton as N, DisclosurePanel as M } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as w, ScalarIcon as p } from "@scalar/components";
|
|
4
|
+
import B from "../../ScreenReader.vue.js";
|
|
5
|
+
import { isTypeObject as D } from "./helpers/is-type-object.js";
|
|
6
|
+
import z from "./SchemaHeading.vue.js";
|
|
7
|
+
import A from "./SchemaObjectProperties.vue.js";
|
|
8
|
+
import V from "./SchemaProperty.vue.js";
|
|
9
|
+
const j = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "schema-card-description"
|
|
12
|
-
},
|
|
12
|
+
}, T = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "schema-properties"
|
|
15
|
-
},
|
|
15
|
+
}, K = /* @__PURE__ */ H({
|
|
16
16
|
__name: "Schema",
|
|
17
17
|
props: {
|
|
18
18
|
schema: {},
|
|
@@ -21,94 +21,93 @@ const A = {
|
|
|
21
21
|
compact: { type: Boolean },
|
|
22
22
|
noncollapsible: { type: Boolean, default: !1 },
|
|
23
23
|
hideHeading: { type: Boolean },
|
|
24
|
-
hideReadOnly: { type: Boolean },
|
|
25
|
-
hideWriteOnly: { type: Boolean },
|
|
26
24
|
additionalProperties: { type: Boolean },
|
|
27
25
|
hideModelNames: { type: Boolean, default: !1 },
|
|
28
26
|
discriminator: {},
|
|
29
|
-
breadcrumb: {}
|
|
27
|
+
breadcrumb: {},
|
|
28
|
+
options: {}
|
|
30
29
|
},
|
|
31
30
|
setup(a) {
|
|
32
|
-
const
|
|
33
|
-
return (e,
|
|
31
|
+
const f = k(() => !a.noncollapsible && a.level > 0), y = k(() => a.schema?.allOf && a.schema.allOf.length > 0 && a.name === "Request Body" ? a.schema.description || a.schema.allOf[0].description : !a.schema?.description || typeof a.schema.description != "string" || a.schema.oneOf || a.schema.anyOf || a.schema.enum || !("properties" in a.schema) && !("patternProperties" in a.schema) && !("additionalProperties" in a.schema) ? null : a.schema.description), b = (e) => a.noncollapsible && e.stopPropagation();
|
|
32
|
+
return (e, v) => typeof e.schema == "object" && Object.keys(e.schema).length ? (i(), o(l(P), {
|
|
34
33
|
key: 0,
|
|
35
34
|
defaultOpen: e.noncollapsible
|
|
36
35
|
}, {
|
|
37
|
-
default:
|
|
38
|
-
|
|
39
|
-
class:
|
|
36
|
+
default: r(({ open: s }) => [
|
|
37
|
+
g("div", {
|
|
38
|
+
class: m(["schema-card", [
|
|
40
39
|
`schema-card--level-${e.level}`,
|
|
41
|
-
{ "schema-card--compact": e.compact, "schema-card--open":
|
|
42
|
-
{ "border-t": e.additionalProperties &&
|
|
40
|
+
{ "schema-card--compact": e.compact, "schema-card--open": s },
|
|
41
|
+
{ "border-t": e.additionalProperties && s }
|
|
43
42
|
]])
|
|
44
43
|
}, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
])) :
|
|
48
|
-
|
|
49
|
-
class:
|
|
50
|
-
"schema-properties-open":
|
|
44
|
+
y.value ? (i(), c("div", j, [
|
|
45
|
+
n(l(w), { value: y.value }, null, 8, ["value"])
|
|
46
|
+
])) : t("", !0),
|
|
47
|
+
g("div", {
|
|
48
|
+
class: m(["schema-properties", {
|
|
49
|
+
"schema-properties-open": s
|
|
51
50
|
}])
|
|
52
51
|
}, [
|
|
53
|
-
e.additionalProperties ?
|
|
54
|
-
|
|
52
|
+
e.additionalProperties ? S((i(), c("div", T, [
|
|
53
|
+
n(l(N), {
|
|
55
54
|
as: "button",
|
|
56
55
|
class: "schema-card-title schema-card-title--compact",
|
|
57
|
-
onClickCapture:
|
|
56
|
+
onClickCapture: b
|
|
58
57
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
|
|
58
|
+
default: r(() => [
|
|
59
|
+
n(l(p), {
|
|
61
60
|
class: "schema-card-title-icon",
|
|
62
61
|
icon: "Add",
|
|
63
62
|
size: "sm"
|
|
64
63
|
}),
|
|
65
|
-
|
|
66
|
-
e.name ? (
|
|
67
|
-
default:
|
|
68
|
-
|
|
64
|
+
v[0] || (v[0] = d(" Show additional properties ")),
|
|
65
|
+
e.name ? (i(), o(B, { key: 0 }, {
|
|
66
|
+
default: r(() => [
|
|
67
|
+
d("for " + u(e.name), 1)
|
|
69
68
|
]),
|
|
70
69
|
_: 1
|
|
71
|
-
})) :
|
|
70
|
+
})) : t("", !0)
|
|
72
71
|
]),
|
|
73
72
|
_: 1,
|
|
74
73
|
__: [0]
|
|
75
74
|
})
|
|
76
75
|
], 512)), [
|
|
77
|
-
[
|
|
78
|
-
]) :
|
|
76
|
+
[C, !s]
|
|
77
|
+
]) : f.value ? S((i(), o(l(N), {
|
|
79
78
|
key: 1,
|
|
80
79
|
as: e.noncollapsible ? "div" : "button",
|
|
81
|
-
class:
|
|
82
|
-
style:
|
|
80
|
+
class: m(["schema-card-title", { "schema-card-title--compact": e.compact }]),
|
|
81
|
+
style: O({
|
|
83
82
|
top: `calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${e.level}))`
|
|
84
83
|
}),
|
|
85
|
-
onClickCapture:
|
|
84
|
+
onClickCapture: b
|
|
86
85
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
e.compact ? (
|
|
89
|
-
|
|
90
|
-
class:
|
|
86
|
+
default: r(() => [
|
|
87
|
+
e.compact ? (i(), c(h, { key: 0 }, [
|
|
88
|
+
n(l(p), {
|
|
89
|
+
class: m(["schema-card-title-icon", { "schema-card-title-icon--open": s }]),
|
|
91
90
|
icon: "Add",
|
|
92
91
|
size: "sm"
|
|
93
92
|
}, null, 8, ["class"]),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
], 64)) : (
|
|
97
|
-
|
|
93
|
+
s ? (i(), c(h, { key: 0 }, [
|
|
94
|
+
d(" Hide " + u(e.schema?.title ?? "Child Attributes"), 1)
|
|
95
|
+
], 64)) : (i(), c(h, { key: 1 }, [
|
|
96
|
+
d(" Show " + u(e.schema?.title ?? "Child Attributes"), 1)
|
|
98
97
|
], 64)),
|
|
99
|
-
e.name ? (
|
|
100
|
-
default:
|
|
101
|
-
|
|
98
|
+
e.name ? (i(), o(B, { key: 2 }, {
|
|
99
|
+
default: r(() => [
|
|
100
|
+
d("for " + u(e.name), 1)
|
|
102
101
|
]),
|
|
103
102
|
_: 1
|
|
104
|
-
})) :
|
|
105
|
-
], 64)) : (
|
|
106
|
-
|
|
107
|
-
class:
|
|
103
|
+
})) : t("", !0)
|
|
104
|
+
], 64)) : (i(), c(h, { key: 1 }, [
|
|
105
|
+
n(l(p), {
|
|
106
|
+
class: m(["schema-card-title-icon", { "schema-card-title-icon--open": s }]),
|
|
108
107
|
icon: "Add",
|
|
109
108
|
size: "sm"
|
|
110
109
|
}, null, 8, ["class"]),
|
|
111
|
-
|
|
110
|
+
n(z, {
|
|
112
111
|
name: e.schema?.title ?? e.name,
|
|
113
112
|
value: e.schema
|
|
114
113
|
}, null, 8, ["name", "value"])
|
|
@@ -116,48 +115,46 @@ const A = {
|
|
|
116
115
|
]),
|
|
117
116
|
_: 2
|
|
118
117
|
}, 1032, ["as", "class", "style"])), [
|
|
119
|
-
[
|
|
120
|
-
]) :
|
|
121
|
-
!e.additionalProperties ||
|
|
118
|
+
[C, !e.hideHeading && !(e.noncollapsible && e.compact)]
|
|
119
|
+
]) : t("", !0),
|
|
120
|
+
!e.additionalProperties || s ? (i(), o(l(M), {
|
|
122
121
|
key: 2,
|
|
123
122
|
as: "ul",
|
|
124
|
-
static: !
|
|
123
|
+
static: !f.value
|
|
125
124
|
}, {
|
|
126
|
-
default:
|
|
127
|
-
|
|
125
|
+
default: r(() => [
|
|
126
|
+
l(D)(e.schema) ? (i(), o(A, {
|
|
128
127
|
key: 0,
|
|
129
128
|
breadcrumb: e.breadcrumb,
|
|
130
129
|
compact: e.compact,
|
|
131
130
|
discriminator: e.discriminator,
|
|
132
131
|
hideHeading: e.hideHeading,
|
|
133
132
|
hideModelNames: e.hideModelNames,
|
|
134
|
-
hideReadOnly: e.hideReadOnly,
|
|
135
|
-
hideWriteOnly: e.hideWriteOnly,
|
|
136
133
|
level: e.level + 1,
|
|
134
|
+
options: e.options,
|
|
137
135
|
schema: e.schema
|
|
138
|
-
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "
|
|
139
|
-
e.schema ? (
|
|
136
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "hideModelNames", "level", "options", "schema"])) : (i(), c(h, { key: 1 }, [
|
|
137
|
+
e.schema ? (i(), o(V, {
|
|
140
138
|
key: 0,
|
|
141
139
|
breadcrumb: e.breadcrumb,
|
|
142
140
|
compact: e.compact,
|
|
143
141
|
hideHeading: e.hideHeading,
|
|
144
142
|
hideModelNames: e.hideModelNames,
|
|
145
|
-
hideReadOnly: e.hideReadOnly,
|
|
146
|
-
hideWriteOnly: e.hideWriteOnly,
|
|
147
143
|
level: e.level,
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
options: e.options,
|
|
145
|
+
schema: e.schema
|
|
146
|
+
}, null, 8, ["breadcrumb", "compact", "hideHeading", "hideModelNames", "level", "options", "schema"])) : t("", !0)
|
|
150
147
|
], 64))
|
|
151
148
|
]),
|
|
152
149
|
_: 1
|
|
153
|
-
}, 8, ["static"])) :
|
|
150
|
+
}, 8, ["static"])) : t("", !0)
|
|
154
151
|
], 2)
|
|
155
152
|
], 2)
|
|
156
153
|
]),
|
|
157
154
|
_: 1
|
|
158
|
-
}, 8, ["defaultOpen"])) :
|
|
155
|
+
}, 8, ["defaultOpen"])) : t("", !0);
|
|
159
156
|
}
|
|
160
157
|
});
|
|
161
158
|
export {
|
|
162
|
-
|
|
159
|
+
K as default
|
|
163
160
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
import type { SchemaOptions } from '../../../components/Content/Schema/types';
|
|
2
3
|
import { type CompositionKeyword } from './helpers/schema-composition.js';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
/** The composition keyword (oneOf, anyOf, allOf) */
|
|
@@ -8,19 +9,17 @@ type __VLS_Props = {
|
|
|
8
9
|
/** Optional name for the schema */
|
|
9
10
|
name?: string;
|
|
10
11
|
/** The schema value containing the composition */
|
|
11
|
-
|
|
12
|
+
schema: SchemaObject;
|
|
12
13
|
/** Nesting level for proper indentation */
|
|
13
14
|
level: number;
|
|
14
15
|
/** Whether to use compact layout */
|
|
15
16
|
compact?: boolean;
|
|
16
17
|
/** Whether to hide the heading */
|
|
17
18
|
hideHeading?: boolean;
|
|
18
|
-
/** Whether to hide read-only properties */
|
|
19
|
-
hideReadOnly?: boolean;
|
|
20
|
-
/** Hide write-only properties */
|
|
21
|
-
hideWriteOnly?: boolean;
|
|
22
19
|
/** Breadcrumb for navigation */
|
|
23
20
|
breadcrumb?: string[];
|
|
21
|
+
/** Move the options into single prop so they are easy to pass around */
|
|
22
|
+
options: SchemaOptions;
|
|
24
23
|
};
|
|
25
24
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
26
25
|
compact: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"AAsJA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAItE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGtE,KAAK,WAAW,GAAG;IACf,oDAAoD;IACpD,WAAW,EAAE,kBAAkB,CAAA;IAC/B,4DAA4D;IAC5D,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,MAAM,EAAE,YAAY,CAAA;IACpB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,yEAAyE;IACzE,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;aAPU,OAAO;iBAEH,OAAO;;AAyNzB,wBAOG"}
|
|
@@ -1,94 +1,91 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { isDefined as
|
|
4
|
-
import { ScalarIconCaretDown as
|
|
5
|
-
import { getResolvedRef as
|
|
6
|
-
import { getSchemaType as
|
|
7
|
-
import { mergeAllOfSchemas as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as g, computed as n, ref as y, createElementBlock as s, openBlock as i, createBlock as C, unref as m, Fragment as S, createVNode as c, createElementVNode as r, withCtx as H, createCommentVNode as k, toDisplayString as u, normalizeClass as V } from "vue";
|
|
2
|
+
import { ScalarListbox as w } from "@scalar/components";
|
|
3
|
+
import { isDefined as B } from "@scalar/helpers/array/is-defined";
|
|
4
|
+
import { ScalarIconCaretDown as N } from "@scalar/icons";
|
|
5
|
+
import { getResolvedRef as O } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
|
+
import { getSchemaType as z } from "./helpers/get-schema-type.js";
|
|
7
|
+
import { mergeAllOfSchemas as D } from "./helpers/merge-all-of-schemas.js";
|
|
8
|
+
import b from "./Schema.vue.js";
|
|
9
|
+
const U = { class: "property-rule" }, A = {
|
|
10
10
|
class: "composition-selector bg-b-1.5 hover:bg-b-2 flex w-full cursor-pointer items-center gap-1 rounded-t-lg border border-b-0 px-2 py-1.25 pr-3 text-left",
|
|
11
11
|
type: "button"
|
|
12
|
-
},
|
|
12
|
+
}, E = { class: "text-c-2" }, L = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "text-red"
|
|
15
|
-
},
|
|
15
|
+
}, R = { class: "composition-panel" }, J = /* @__PURE__ */ g({
|
|
16
16
|
__name: "SchemaComposition",
|
|
17
17
|
props: {
|
|
18
18
|
composition: {},
|
|
19
19
|
discriminator: {},
|
|
20
20
|
name: {},
|
|
21
|
-
|
|
21
|
+
schema: {},
|
|
22
22
|
level: {},
|
|
23
23
|
compact: { type: Boolean, default: !1 },
|
|
24
24
|
hideHeading: { type: Boolean, default: !1 },
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
breadcrumb: {}
|
|
25
|
+
breadcrumb: {},
|
|
26
|
+
options: {}
|
|
28
27
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const a =
|
|
31
|
-
() => [a.
|
|
32
|
-
),
|
|
33
|
-
() =>
|
|
28
|
+
setup(h) {
|
|
29
|
+
const a = h, p = n(
|
|
30
|
+
() => [a.schema[a.composition]].flat().map((e) => ({ value: O(e), original: e })).filter((e) => B(e.value))
|
|
31
|
+
), d = n(
|
|
32
|
+
() => p.value.map((e, o) => ({
|
|
34
33
|
id: String(o),
|
|
35
|
-
label:
|
|
34
|
+
label: z(e.original) || "Schema"
|
|
36
35
|
}))
|
|
37
|
-
),
|
|
38
|
-
() =>
|
|
36
|
+
), t = y(d.value[0]), f = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (o) => o.toUpperCase()).toLowerCase().replace(/^(\w)/, (o) => o.toUpperCase()), l = n(
|
|
37
|
+
() => p.value[Number(t.value.id)].value
|
|
39
38
|
);
|
|
40
|
-
return (e, o) => (
|
|
41
|
-
a.composition === "allOf" ? (
|
|
39
|
+
return (e, o) => (i(), s("div", U, [
|
|
40
|
+
a.composition === "allOf" ? (i(), C(b, {
|
|
42
41
|
key: 0,
|
|
43
42
|
breadcrumb: e.breadcrumb,
|
|
44
43
|
compact: e.compact,
|
|
45
44
|
discriminator: e.discriminator,
|
|
46
45
|
hideHeading: e.hideHeading,
|
|
47
|
-
hideReadOnly: e.hideReadOnly,
|
|
48
|
-
hideWriteOnly: e.hideWriteOnly,
|
|
49
46
|
level: e.level,
|
|
50
47
|
name: e.name,
|
|
51
48
|
noncollapsible: !0,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
options: e.options,
|
|
50
|
+
schema: m(D)(e.schema)
|
|
51
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "level", "name", "options", "schema"])) : (i(), s(S, { key: 1 }, [
|
|
52
|
+
c(m(w), {
|
|
53
|
+
modelValue: t.value,
|
|
54
|
+
"onUpdate:modelValue": o[0] || (o[0] = (v) => t.value = v),
|
|
55
|
+
options: d.value,
|
|
58
56
|
resize: ""
|
|
59
57
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
class:
|
|
65
|
-
"line-through":
|
|
58
|
+
default: H(() => [
|
|
59
|
+
r("button", A, [
|
|
60
|
+
r("span", E, u(f(a.composition)), 1),
|
|
61
|
+
r("span", {
|
|
62
|
+
class: V(["composition-selector-label text-c-1", {
|
|
63
|
+
"line-through": l.value?.deprecated
|
|
66
64
|
}])
|
|
67
|
-
}, u(
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
}, u(t.value?.label || "Schema"), 3),
|
|
66
|
+
l.value?.deprecated ? (i(), s("div", L, " deprecated ")) : k("", !0),
|
|
67
|
+
c(m(N))
|
|
70
68
|
])
|
|
71
69
|
]),
|
|
72
70
|
_: 1
|
|
73
71
|
}, 8, ["modelValue", "options"]),
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
r("div", R, [
|
|
73
|
+
c(b, {
|
|
76
74
|
breadcrumb: e.breadcrumb,
|
|
77
75
|
compact: e.compact,
|
|
78
76
|
discriminator: e.discriminator,
|
|
79
77
|
hideHeading: e.hideHeading,
|
|
80
|
-
hideReadOnly: e.hideReadOnly,
|
|
81
|
-
hideWriteOnly: e.hideWriteOnly,
|
|
82
78
|
level: e.level + 1,
|
|
83
79
|
name: e.name,
|
|
84
80
|
noncollapsible: !0,
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
options: e.options,
|
|
82
|
+
schema: l.value
|
|
83
|
+
}, null, 8, ["breadcrumb", "compact", "discriminator", "hideHeading", "level", "name", "options", "schema"])
|
|
87
84
|
])
|
|
88
85
|
], 64))
|
|
89
86
|
]));
|
|
90
87
|
}
|
|
91
88
|
});
|
|
92
89
|
export {
|
|
93
|
-
|
|
90
|
+
J as default
|
|
94
91
|
};
|