@scalar/api-reference 1.41.0 → 1.42.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 +84 -0
- package/dist/blocks/index.d.ts +0 -1
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/index.js +4 -6
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +4 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +9 -13
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +4 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -9
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +4 -0
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +4 -7
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +7 -9
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +9 -6
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -9
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +13 -25
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts +8 -4
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +18 -41
- package/dist/browser/standalone.js +20336 -23246
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts +2 -254
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue2.js +71 -83
- package/dist/components/Content/Auth/Auth.vue.d.ts +17 -0
- package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -0
- package/dist/components/Content/Auth/Auth.vue.js +70 -0
- package/dist/components/Content/Auth/Auth.vue2.js +4 -0
- package/dist/components/Content/Auth/helpers/get-default-security.d.ts +18 -0
- package/dist/components/Content/Auth/helpers/get-default-security.d.ts.map +1 -0
- package/dist/components/Content/Auth/helpers/get-default-security.js +43 -0
- package/dist/components/Content/Auth/index.d.ts +2 -0
- package/dist/components/Content/Auth/index.d.ts.map +1 -0
- package/dist/components/Content/Content.vue.d.ts +9 -19
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +46 -47
- package/dist/components/Content/Models/Model.vue.d.ts +3 -6
- package/dist/components/Content/Models/Model.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Model.vue.js +2 -2
- package/dist/components/Content/Models/ModelTag.vue.d.ts +2 -7
- package/dist/components/Content/Models/ModelTag.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelTag.vue.js +3 -3
- package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts +3 -5
- package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue2.js +2 -8
- package/dist/components/Content/Models/components/ModernLayout.vue.d.ts +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +20 -25
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +38 -56
- 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/index.d.ts +0 -1
- package/dist/components/Content/index.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.d.ts +1 -4
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue2.js +7 -17
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +12 -14
- package/dist/features/Operation/Operation.vue.d.ts +23 -25
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +28 -19
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -4
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +17 -6
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +3 -5
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +3 -1
- package/dist/features/Operation/components/ParameterList.vue.d.ts +3 -6
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +6 -8
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +3 -6
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -8
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +2 -4
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +1 -5
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +2 -8
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +35 -24
- package/dist/features/Operation/helpers/filter-selected-security.d.ts +9 -0
- package/dist/features/Operation/helpers/filter-selected-security.d.ts.map +1 -0
- package/dist/features/Operation/helpers/filter-selected-security.js +27 -0
- package/dist/features/Operation/helpers/get-first-server.d.ts +1 -1
- package/dist/features/Operation/helpers/get-first-server.d.ts.map +1 -1
- package/dist/features/Operation/helpers/get-first-server.js +3 -3
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +7 -23
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +24 -23
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +7 -23
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +25 -27
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue2.js +1 -2
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue2.js +1 -2
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -0
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue2.js +5 -9
- package/dist/helpers/index.d.ts +0 -4
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +1 -9
- package/dist/helpers/map-config-plugins.d.ts +5 -0
- package/dist/helpers/map-config-plugins.d.ts.map +1 -0
- package/dist/helpers/map-config-plugins.js +29 -0
- package/dist/helpers/map-config-to-workspace-store.d.ts.map +1 -1
- package/dist/helpers/map-config-to-workspace-store.js +5 -0
- package/dist/helpers/map-configuration.d.ts +2 -2
- package/dist/helpers/storage.d.ts +347 -0
- package/dist/helpers/storage.d.ts.map +1 -0
- package/dist/helpers/storage.js +61 -0
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -5
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/plugins/persistance-plugin.d.ts +16 -0
- package/dist/plugins/persistance-plugin.d.ts.map +1 -0
- package/dist/plugins/persistance-plugin.js +54 -0
- package/dist/style.css +228 -542
- package/package.json +16 -16
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +0 -11
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +0 -7
- package/dist/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +0 -259
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +0 -21
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +0 -66
- package/dist/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +0 -4
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +0 -17
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +0 -273
- package/dist/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +0 -4
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +0 -9
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +0 -150
- package/dist/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +0 -4
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +0 -20
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +0 -7
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +0 -116
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +0 -50
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +0 -55
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +0 -4
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +0 -17
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +0 -288
- package/dist/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +0 -4
- package/dist/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts +0 -6
- package/dist/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts +0 -8
- package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts.map +0 -1
- package/dist/blocks/scalar-auth-selector-block/helpers/update-scheme.js +0 -26
- package/dist/blocks/scalar-auth-selector-block/index.d.ts +0 -2
- package/dist/blocks/scalar-auth-selector-block/index.d.ts.map +0 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +0 -16
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +0 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +0 -7
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +0 -142
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +0 -13
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +0 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +0 -7
- package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +0 -125
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts +0 -11
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +0 -1
- package/dist/components/Content/ClientLibraries/featured-clients.js +0 -24
- package/dist/components/Content/ClientLibraries/index.d.ts +0 -2
- package/dist/components/Content/ClientLibraries/index.d.ts.map +0 -1
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts +0 -26
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts.map +0 -1
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.js +0 -39
- package/dist/helpers/convert-security-scheme.d.ts +0 -9
- package/dist/helpers/convert-security-scheme.d.ts.map +0 -1
- package/dist/helpers/convert-security-scheme.js +0 -34
- package/dist/helpers/map-config-to-client-store.d.ts +0 -72
- package/dist/helpers/map-config-to-client-store.d.ts.map +0 -1
- package/dist/helpers/map-config-to-client-store.js +0 -146
- package/dist/hooks/use-legacy-store-events.d.ts +0 -14
- package/dist/hooks/use-legacy-store-events.d.ts.map +0 -1
- package/dist/hooks/use-legacy-store-events.js +0 -91
- package/dist/hooks/use-workspace-store-events.d.ts +0 -4
- package/dist/hooks/use-workspace-store-events.d.ts.map +0 -1
- package/dist/hooks/use-workspace-store-events.js +0 -68
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
1
|
import { type AnyApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
3
2
|
type __VLS_Props = {
|
|
4
3
|
/**
|
|
@@ -28,259 +27,8 @@ type __VLS_Slots = {
|
|
|
28
27
|
};
|
|
29
28
|
};
|
|
30
29
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
[x: string]: any;
|
|
34
|
-
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
35
|
-
swagger?: never | undefined;
|
|
36
|
-
info?: {
|
|
37
|
-
title?: string | undefined;
|
|
38
|
-
description?: string | undefined;
|
|
39
|
-
termsOfService?: string | undefined;
|
|
40
|
-
contact?: {
|
|
41
|
-
name?: string | undefined;
|
|
42
|
-
url?: string | undefined;
|
|
43
|
-
email?: string | undefined;
|
|
44
|
-
} | undefined;
|
|
45
|
-
version?: string | undefined;
|
|
46
|
-
summary?: string | undefined;
|
|
47
|
-
license?: {
|
|
48
|
-
name?: string | undefined;
|
|
49
|
-
url?: string | undefined;
|
|
50
|
-
identifier?: string | undefined;
|
|
51
|
-
} | undefined;
|
|
52
|
-
} | undefined;
|
|
53
|
-
jsonSchemaDialect?: string | undefined;
|
|
54
|
-
servers?: {
|
|
55
|
-
url?: string | undefined;
|
|
56
|
-
description?: string | undefined;
|
|
57
|
-
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
58
|
-
}[] | undefined;
|
|
59
|
-
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
60
|
-
components?: {
|
|
61
|
-
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
62
|
-
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
63
|
-
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
64
|
-
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
65
|
-
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
66
|
-
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
67
|
-
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
68
|
-
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
69
|
-
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
70
|
-
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
71
|
-
} | undefined;
|
|
72
|
-
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
73
|
-
} | {
|
|
74
|
-
[x: `x-${string}`]: any;
|
|
75
|
-
[x: string]: any;
|
|
76
|
-
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
77
|
-
swagger?: never | undefined;
|
|
78
|
-
info?: {
|
|
79
|
-
title?: string | undefined;
|
|
80
|
-
description?: string | undefined;
|
|
81
|
-
termsOfService?: string | undefined;
|
|
82
|
-
contact?: {
|
|
83
|
-
name?: string | undefined;
|
|
84
|
-
url?: string | undefined;
|
|
85
|
-
email?: string | undefined;
|
|
86
|
-
} | undefined;
|
|
87
|
-
version?: string | undefined;
|
|
88
|
-
summary?: string | undefined;
|
|
89
|
-
license?: {
|
|
90
|
-
name?: string | undefined;
|
|
91
|
-
url?: string | undefined;
|
|
92
|
-
identifier?: string | undefined;
|
|
93
|
-
} | undefined;
|
|
94
|
-
} | undefined;
|
|
95
|
-
jsonSchemaDialect?: string | undefined;
|
|
96
|
-
servers?: {
|
|
97
|
-
url?: string | undefined;
|
|
98
|
-
description?: string | undefined;
|
|
99
|
-
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
100
|
-
}[] | undefined;
|
|
101
|
-
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
102
|
-
components?: {
|
|
103
|
-
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
104
|
-
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
105
|
-
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
106
|
-
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
107
|
-
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
108
|
-
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
109
|
-
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
110
|
-
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
111
|
-
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
112
|
-
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
113
|
-
} | undefined;
|
|
114
|
-
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
115
|
-
} | {
|
|
116
|
-
[x: `x-${string}`]: any;
|
|
117
|
-
[x: string]: any;
|
|
118
|
-
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
119
|
-
swagger?: never | undefined;
|
|
120
|
-
info?: {
|
|
121
|
-
title?: string | undefined;
|
|
122
|
-
description?: string | undefined;
|
|
123
|
-
termsOfService?: string | undefined;
|
|
124
|
-
contact?: {
|
|
125
|
-
name?: string | undefined;
|
|
126
|
-
url?: string | undefined;
|
|
127
|
-
email?: string | undefined;
|
|
128
|
-
} | undefined;
|
|
129
|
-
version?: string | undefined;
|
|
130
|
-
summary?: string | undefined;
|
|
131
|
-
license?: {
|
|
132
|
-
name?: string | undefined;
|
|
133
|
-
url?: string | undefined;
|
|
134
|
-
identifier?: string | undefined;
|
|
135
|
-
} | undefined;
|
|
136
|
-
} | undefined;
|
|
137
|
-
jsonSchemaDialect?: string | undefined;
|
|
138
|
-
servers?: {
|
|
139
|
-
url?: string | undefined;
|
|
140
|
-
description?: string | undefined;
|
|
141
|
-
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
142
|
-
}[] | undefined;
|
|
143
|
-
components?: {
|
|
144
|
-
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
145
|
-
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
146
|
-
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
147
|
-
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
148
|
-
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
149
|
-
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
150
|
-
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
151
|
-
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
152
|
-
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
153
|
-
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
154
|
-
} | undefined;
|
|
155
|
-
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
156
|
-
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
157
|
-
} | null, OpenAPIV3_1.Document<{}> | {
|
|
158
|
-
[x: `x-${string}`]: any;
|
|
159
|
-
[x: string]: any;
|
|
160
|
-
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
161
|
-
swagger?: never | undefined;
|
|
162
|
-
info?: {
|
|
163
|
-
title?: string | undefined;
|
|
164
|
-
description?: string | undefined;
|
|
165
|
-
termsOfService?: string | undefined;
|
|
166
|
-
contact?: {
|
|
167
|
-
name?: string | undefined;
|
|
168
|
-
url?: string | undefined;
|
|
169
|
-
email?: string | undefined;
|
|
170
|
-
} | undefined;
|
|
171
|
-
version?: string | undefined;
|
|
172
|
-
summary?: string | undefined;
|
|
173
|
-
license?: {
|
|
174
|
-
name?: string | undefined;
|
|
175
|
-
url?: string | undefined;
|
|
176
|
-
identifier?: string | undefined;
|
|
177
|
-
} | undefined;
|
|
178
|
-
} | undefined;
|
|
179
|
-
jsonSchemaDialect?: string | undefined;
|
|
180
|
-
servers?: {
|
|
181
|
-
url?: string | undefined;
|
|
182
|
-
description?: string | undefined;
|
|
183
|
-
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
184
|
-
}[] | undefined;
|
|
185
|
-
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
186
|
-
components?: {
|
|
187
|
-
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
188
|
-
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
189
|
-
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
190
|
-
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
191
|
-
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
192
|
-
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
193
|
-
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
194
|
-
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
195
|
-
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
196
|
-
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
197
|
-
} | undefined;
|
|
198
|
-
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
199
|
-
} | {
|
|
200
|
-
[x: `x-${string}`]: any;
|
|
201
|
-
[x: string]: any;
|
|
202
|
-
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
203
|
-
swagger?: never | undefined;
|
|
204
|
-
info?: {
|
|
205
|
-
title?: string | undefined;
|
|
206
|
-
description?: string | undefined;
|
|
207
|
-
termsOfService?: string | undefined;
|
|
208
|
-
contact?: {
|
|
209
|
-
name?: string | undefined;
|
|
210
|
-
url?: string | undefined;
|
|
211
|
-
email?: string | undefined;
|
|
212
|
-
} | undefined;
|
|
213
|
-
version?: string | undefined;
|
|
214
|
-
summary?: string | undefined;
|
|
215
|
-
license?: {
|
|
216
|
-
name?: string | undefined;
|
|
217
|
-
url?: string | undefined;
|
|
218
|
-
identifier?: string | undefined;
|
|
219
|
-
} | undefined;
|
|
220
|
-
} | undefined;
|
|
221
|
-
jsonSchemaDialect?: string | undefined;
|
|
222
|
-
servers?: {
|
|
223
|
-
url?: string | undefined;
|
|
224
|
-
description?: string | undefined;
|
|
225
|
-
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
226
|
-
}[] | undefined;
|
|
227
|
-
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
228
|
-
components?: {
|
|
229
|
-
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
230
|
-
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
231
|
-
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
232
|
-
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
233
|
-
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
234
|
-
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
235
|
-
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
236
|
-
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
237
|
-
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
238
|
-
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
239
|
-
} | undefined;
|
|
240
|
-
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
241
|
-
} | {
|
|
242
|
-
[x: `x-${string}`]: any;
|
|
243
|
-
[x: string]: any;
|
|
244
|
-
openapi?: "3.1.0" | "3.1.1" | "3.1.2" | undefined;
|
|
245
|
-
swagger?: never | undefined;
|
|
246
|
-
info?: {
|
|
247
|
-
title?: string | undefined;
|
|
248
|
-
description?: string | undefined;
|
|
249
|
-
termsOfService?: string | undefined;
|
|
250
|
-
contact?: {
|
|
251
|
-
name?: string | undefined;
|
|
252
|
-
url?: string | undefined;
|
|
253
|
-
email?: string | undefined;
|
|
254
|
-
} | undefined;
|
|
255
|
-
version?: string | undefined;
|
|
256
|
-
summary?: string | undefined;
|
|
257
|
-
license?: {
|
|
258
|
-
name?: string | undefined;
|
|
259
|
-
url?: string | undefined;
|
|
260
|
-
identifier?: string | undefined;
|
|
261
|
-
} | undefined;
|
|
262
|
-
} | undefined;
|
|
263
|
-
jsonSchemaDialect?: string | undefined;
|
|
264
|
-
servers?: {
|
|
265
|
-
url?: string | undefined;
|
|
266
|
-
description?: string | undefined;
|
|
267
|
-
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
268
|
-
}[] | undefined;
|
|
269
|
-
components?: {
|
|
270
|
-
schemas?: Record<string, OpenAPIV3_1.SchemaObject> | undefined;
|
|
271
|
-
responses?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject> | undefined;
|
|
272
|
-
parameters?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject> | undefined;
|
|
273
|
-
examples?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ExampleObject> | undefined;
|
|
274
|
-
requestBodies?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.RequestBodyObject> | undefined;
|
|
275
|
-
headers?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.HeaderObject> | undefined;
|
|
276
|
-
securitySchemes?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.SecuritySchemeObject> | undefined;
|
|
277
|
-
links?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.LinkObject> | undefined;
|
|
278
|
-
callbacks?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.CallbackObject> | undefined;
|
|
279
|
-
pathItems?: Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.PathItemObject> | undefined;
|
|
280
|
-
} | undefined;
|
|
281
|
-
webhooks?: Record<string, OpenAPIV3_1.PathItemObject | OpenAPIV3_1.ReferenceObject> | undefined;
|
|
282
|
-
paths?: OpenAPIV3_1.PathsObject<{}, {}> | undefined;
|
|
283
|
-
} | null>;
|
|
30
|
+
eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
|
|
31
|
+
workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
|
|
284
32
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
285
33
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
286
34
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAooCA,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AAqDpC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,oBAAoB,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,MAAM,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC,CAAC;AAgsCF,QAAA,MAAM,eAAe;;;oPAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -4,7 +4,7 @@ import _sfc_main from "./ApiReference.vue2.js";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
-
const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
7
|
+
const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-61847119"]]);
|
|
8
8
|
export {
|
|
9
9
|
ApiReference as default
|
|
10
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, computed, ref, watch, useId, provide, onServerPrefetch, onBeforeMount, useTemplateRef, onMounted, onBeforeUnmount, createElementBlock, openBlock, createBlock, createElementVNode, createVNode, resolveDynamicComponent, withCtx, createTextVNode, toDisplayString, normalizeClass, createCommentVNode, unref, renderSlot, normalizeProps, guardReactiveProps, createSlots } from "vue";
|
|
2
2
|
import { provideUseId } from "@headlessui/vue";
|
|
3
3
|
import { OpenApiClientButton } from "@scalar/api-client/components";
|
|
4
|
-
import {
|
|
4
|
+
import { createApiClientModal } from "@scalar/api-client/v2/features/modal";
|
|
5
|
+
import { getActiveEnvironment } from "@scalar/api-client/v2/helpers";
|
|
5
6
|
import { addScalarClassesToHeadless, ScalarSidebarFooter, ScalarColorModeToggleButton, ScalarColorModeToggleIcon } from "@scalar/components";
|
|
6
7
|
import { redirectToProxy } from "@scalar/oas-utils/helpers";
|
|
7
|
-
import { dereference, upgrade } from "@scalar/openapi-parser";
|
|
8
8
|
import { createSidebarState, ScalarSidebar } from "@scalar/sidebar";
|
|
9
9
|
import { hasObtrusiveScrollbars, getThemeStyles } from "@scalar/themes";
|
|
10
10
|
import { apiReferenceConfigurationSchema } from "@scalar/types/api-reference";
|
|
@@ -13,8 +13,8 @@ import { useClipboard } from "@scalar/use-hooks/useClipboard";
|
|
|
13
13
|
import { useColorMode } from "@scalar/use-hooks/useColorMode";
|
|
14
14
|
import { ScalarToasts } from "@scalar/use-toasts";
|
|
15
15
|
import { createWorkspaceStore } from "@scalar/workspace-store/client";
|
|
16
|
-
import { createWorkspaceEventBus
|
|
17
|
-
import
|
|
16
|
+
import { createWorkspaceEventBus } from "@scalar/workspace-store/events";
|
|
17
|
+
import diff from "microdiff";
|
|
18
18
|
import ClassicHeader from "./ClassicHeader.vue.js";
|
|
19
19
|
import _sfc_main$4 from "./Content/Content.vue.js";
|
|
20
20
|
/* empty css */
|
|
@@ -26,12 +26,12 @@ import { getSystemModePreference } from "../helpers/color-mode.js";
|
|
|
26
26
|
import { downloadDocument } from "../helpers/download.js";
|
|
27
27
|
import { getIdFromUrl, makeUrlFromId } from "../helpers/id-routing.js";
|
|
28
28
|
import { intersectionEnabled, scrollToLazy, blockIntersection } from "../helpers/lazy-bus.js";
|
|
29
|
-
import {
|
|
29
|
+
import { mapConfigPlugins } from "../helpers/map-config-plugins.js";
|
|
30
30
|
import { mapConfigToWorkspaceStore } from "../helpers/map-config-to-workspace-store.js";
|
|
31
31
|
import { mapConfiguration } from "../helpers/map-configuration.js";
|
|
32
32
|
import { normalizeConfigurations } from "../helpers/normalize-configurations.js";
|
|
33
33
|
import { useIntersection } from "../hooks/use-intersection.js";
|
|
34
|
-
import {
|
|
34
|
+
import { persistencePlugin } from "../plugins/persistance-plugin.js";
|
|
35
35
|
import { PLUGIN_MANAGER_SYMBOL } from "../plugins/hooks/usePluginManager.js";
|
|
36
36
|
import { createPluginManager } from "../plugins/plugin-manager.js";
|
|
37
37
|
const _hoisted_1 = {
|
|
@@ -52,15 +52,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
52
|
},
|
|
53
53
|
setup(__props, { expose: __expose }) {
|
|
54
54
|
const props = __props;
|
|
55
|
-
const eventBus = createWorkspaceEventBus({ debug: false });
|
|
56
|
-
if (typeof window !== "undefined") {
|
|
57
|
-
window.dataDumpWorkspace = () => workspaceStore;
|
|
58
|
-
}
|
|
59
|
-
const root = useTemplateRef("root");
|
|
60
55
|
const { mediaQueries } = useBreakpoints();
|
|
61
56
|
const { copyToClipboard } = useClipboard();
|
|
62
57
|
const isDevelopment = false;
|
|
63
58
|
const obtrusiveScrollbars = computed(hasObtrusiveScrollbars);
|
|
59
|
+
const eventBus = createWorkspaceEventBus({ debug: isDevelopment });
|
|
64
60
|
const isSidebarOpen = ref(false);
|
|
65
61
|
watch(
|
|
66
62
|
() => mediaQueries?.lg?.value,
|
|
@@ -71,7 +67,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
67
|
}
|
|
72
68
|
);
|
|
73
69
|
provideUseId(() => useId());
|
|
74
|
-
provide(LAYOUT_SYMBOL, "modal");
|
|
75
70
|
const configList = computed(() => normalizeConfigurations(props.configuration));
|
|
76
71
|
const isMultiDocument = computed(() => Object.keys(configList.value).length > 1);
|
|
77
72
|
const activeSlug = ref(
|
|
@@ -160,7 +155,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
160
155
|
}
|
|
161
156
|
activeSlug.value = slug;
|
|
162
157
|
}
|
|
163
|
-
const workspaceStore = createWorkspaceStore(
|
|
158
|
+
const workspaceStore = createWorkspaceStore({
|
|
159
|
+
plugins: [persistencePlugin({ prefix: () => activeSlug.value })]
|
|
160
|
+
});
|
|
164
161
|
const { toggleColorMode, isDarkMode } = useColorMode({
|
|
165
162
|
initialColorMode: {
|
|
166
163
|
true: "dark",
|
|
@@ -207,7 +204,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
207
204
|
}
|
|
208
205
|
if (config.expandAllModelSections) {
|
|
209
206
|
const models = docItems.find(
|
|
210
|
-
(item) => item.type === "
|
|
207
|
+
(item) => item.type === "models"
|
|
211
208
|
);
|
|
212
209
|
if (models) {
|
|
213
210
|
sidebarState.setExpanded(models.id, true);
|
|
@@ -242,14 +239,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
242
239
|
sidebarState.setSelected(id);
|
|
243
240
|
scrollToLazy(id, sidebarState.setExpanded, sidebarState.getEntryById);
|
|
244
241
|
};
|
|
245
|
-
useWorkspaceStoreEvents(workspaceStore, root);
|
|
246
242
|
mapConfigToWorkspaceStore({
|
|
247
243
|
config: () => mergedConfig.value,
|
|
248
244
|
store: workspaceStore,
|
|
249
245
|
isDarkMode
|
|
250
246
|
});
|
|
247
|
+
const environment = computed(
|
|
248
|
+
() => getActiveEnvironment(
|
|
249
|
+
workspaceStore,
|
|
250
|
+
workspaceStore.workspace.activeDocument ?? null
|
|
251
|
+
)
|
|
252
|
+
);
|
|
253
|
+
if (typeof window !== "undefined") {
|
|
254
|
+
window.dataDumpWorkspace = () => workspaceStore;
|
|
255
|
+
}
|
|
256
|
+
__expose({
|
|
257
|
+
eventBus,
|
|
258
|
+
workspaceStore
|
|
259
|
+
});
|
|
251
260
|
const changeSelectedDocument = async (slug, elementId) => {
|
|
252
261
|
workspaceStore.update("x-scalar-active-document", slug);
|
|
262
|
+
apiClient.value?.route({
|
|
263
|
+
documentSlug: slug,
|
|
264
|
+
method: "get",
|
|
265
|
+
path: "/"
|
|
266
|
+
});
|
|
253
267
|
const normalized = configList.value[slug];
|
|
254
268
|
if (!normalized) {
|
|
255
269
|
console.warn(`Document ${slug} not found in configList`);
|
|
@@ -289,13 +303,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
289
303
|
sidebarState.setExpanded(firstTag.id, true);
|
|
290
304
|
}
|
|
291
305
|
}
|
|
292
|
-
const raw = JSON.parse(workspaceStore.exportActiveDocument("json") ?? "{}");
|
|
293
|
-
const { schema } = dereference(upgrade(raw).specification);
|
|
294
|
-
if (!schema) {
|
|
295
|
-
dereferenced.value = null;
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
dereferenced.value = schema;
|
|
299
306
|
};
|
|
300
307
|
watch(
|
|
301
308
|
() => Object.values(configList.value),
|
|
@@ -320,7 +327,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
320
327
|
if (!updated.source.content) {
|
|
321
328
|
return;
|
|
322
329
|
}
|
|
323
|
-
if (
|
|
330
|
+
if (diff(
|
|
324
331
|
updated.source.content,
|
|
325
332
|
previous && "content" in previous.source ? previous.source.content ?? {} : {}
|
|
326
333
|
).length) {
|
|
@@ -355,38 +362,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
355
362
|
)
|
|
356
363
|
)
|
|
357
364
|
);
|
|
358
|
-
const dereferenced = ref(null);
|
|
359
|
-
__expose({
|
|
360
|
-
dereferenced
|
|
361
|
-
});
|
|
362
|
-
const modal = useTemplateRef("modal");
|
|
363
365
|
const documentUrl = computed(() => {
|
|
364
366
|
return configList.value[activeSlug.value]?.source?.url;
|
|
365
367
|
});
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
root,
|
|
372
|
-
dereferencedDocument: dereferenced,
|
|
373
|
-
documentUrl
|
|
368
|
+
const modal = useTemplateRef("modal");
|
|
369
|
+
const apiClient = ref(null);
|
|
370
|
+
onMounted(() => {
|
|
371
|
+
if (!modal.value) {
|
|
372
|
+
return;
|
|
374
373
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
374
|
+
apiClient.value = createApiClientModal({
|
|
375
|
+
el: modal.value,
|
|
376
|
+
eventBus,
|
|
377
|
+
workspaceStore,
|
|
378
|
+
plugins: mapConfigPlugins(mergedConfig.value)
|
|
379
|
+
});
|
|
378
380
|
});
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
return sidebarState.setExpanded(event.detail.id, true);
|
|
381
|
+
onBeforeUnmount(() => {
|
|
382
|
+
apiClient.value?.app.unmount();
|
|
382
383
|
});
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
})
|
|
388
|
-
|
|
389
|
-
if (event.detail.format === "direct") {
|
|
384
|
+
eventBus.on(
|
|
385
|
+
"server:update:selected",
|
|
386
|
+
({ url }) => mergedConfig.value.onServerChange?.(url)
|
|
387
|
+
);
|
|
388
|
+
eventBus.on("ui:download:document", async ({ format }) => {
|
|
389
|
+
if (format === "direct") {
|
|
390
390
|
const url = configList.value[activeSlug.value]?.source?.url;
|
|
391
391
|
if (!url) {
|
|
392
392
|
console.error(
|
|
@@ -400,7 +400,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
400
400
|
downloadDocument(result, activeSlug.value ?? "openapi");
|
|
401
401
|
return;
|
|
402
402
|
}
|
|
403
|
-
const format = event.detail.format;
|
|
404
403
|
const document = workspaceStore.exportActiveDocument(format);
|
|
405
404
|
if (!document) {
|
|
406
405
|
console.error("No document found to download");
|
|
@@ -408,7 +407,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
408
407
|
}
|
|
409
408
|
downloadDocument(document, activeSlug.value ?? "openapi", format);
|
|
410
409
|
});
|
|
411
|
-
const handleSelectItem = (id) => {
|
|
410
|
+
const handleSelectItem = (id, caller) => {
|
|
412
411
|
const item = sidebarState.getEntryById(id);
|
|
413
412
|
if ((item?.type === "tag" || item?.type === "models") && sidebarState.isExpanded(id)) {
|
|
414
413
|
const unblock = blockIntersection();
|
|
@@ -423,6 +422,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
423
422
|
const url = makeUrlFromId(id, basePath.value, isMultiDocument.value);
|
|
424
423
|
if (url) {
|
|
425
424
|
window.history.pushState({}, "", url);
|
|
425
|
+
if (caller === "sidebar") {
|
|
426
|
+
mergedConfig.value.onSidebarClick?.(url.toString());
|
|
427
|
+
}
|
|
426
428
|
}
|
|
427
429
|
};
|
|
428
430
|
eventBus.on("select:nav-item", ({ id }) => handleSelectItem(id));
|
|
@@ -438,10 +440,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
438
440
|
window.history.replaceState({}, "", url.toString());
|
|
439
441
|
}
|
|
440
442
|
});
|
|
441
|
-
eventBus.on(
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
eventBus.on("toggle:nav-item", ({ id, open }) => {
|
|
444
|
+
if (open) {
|
|
445
|
+
mergedConfig.value.onShowMore?.(id);
|
|
446
|
+
}
|
|
447
|
+
sidebarState.setExpanded(id, open ?? !sidebarState.isExpanded(id));
|
|
448
|
+
});
|
|
445
449
|
eventBus.on("copy-url:nav-item", ({ id }) => {
|
|
446
450
|
const url = makeUrlFromId(
|
|
447
451
|
id,
|
|
@@ -476,10 +480,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
476
480
|
return mode;
|
|
477
481
|
});
|
|
478
482
|
return (_ctx, _cache) => {
|
|
479
|
-
return openBlock(), createElementBlock("div",
|
|
480
|
-
ref_key: "root",
|
|
481
|
-
ref: root
|
|
482
|
-
}, [
|
|
483
|
+
return openBlock(), createElementBlock("div", null, [
|
|
483
484
|
(openBlock(), createBlock(resolveDynamicComponent("style"), null, {
|
|
484
485
|
default: withCtx(() => [
|
|
485
486
|
createTextVNode(toDisplayString(mergedConfig.value.customCss) + " " + toDisplayString(themeStyle.value), 1)
|
|
@@ -527,11 +528,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
527
528
|
isSelected: unref(sidebarState).isSelected,
|
|
528
529
|
items: sidebarItems.value,
|
|
529
530
|
layout: "reference",
|
|
530
|
-
options:
|
|
531
|
-
operationTitleSource: mergedConfig.value.operationTitleSource
|
|
532
|
-
},
|
|
531
|
+
options: mergedConfig.value,
|
|
533
532
|
role: "navigation",
|
|
534
|
-
onSelectItem: _cache[1] || (_cache[1] = (id) => handleSelectItem(id))
|
|
533
|
+
onSelectItem: _cache[1] || (_cache[1] = (id) => handleSelectItem(id, "sidebar"))
|
|
535
534
|
}, {
|
|
536
535
|
header: withCtx(() => [
|
|
537
536
|
documentOptionList.value.length > 1 ? (openBlock(), createBlock(_sfc_main$2, {
|
|
@@ -554,7 +553,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
554
553
|
renderSlot(_ctx.$slots, "sidebar-end", normalizeProps(guardReactiveProps(slotProps.value)), () => [
|
|
555
554
|
createVNode(unref(ScalarSidebarFooter), { class: "darklight-reference" }, {
|
|
556
555
|
toggle: withCtx(() => [
|
|
557
|
-
!mergedConfig.value.hideDarkModeToggle ? (openBlock(), createBlock(unref(ScalarColorModeToggleButton), {
|
|
556
|
+
!mergedConfig.value.hideDarkModeToggle && !mergedConfig.value.forceDarkModeState ? (openBlock(), createBlock(unref(ScalarColorModeToggleButton), {
|
|
558
557
|
key: 0,
|
|
559
558
|
modelValue: colorMode.value === "dark",
|
|
560
559
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = () => unref(toggleColorMode)())
|
|
@@ -583,26 +582,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
583
582
|
class: "references-rendered"
|
|
584
583
|
}, [
|
|
585
584
|
createVNode(_sfc_main$4, {
|
|
586
|
-
activeServer: unref(activeServer),
|
|
587
585
|
document: unref(workspaceStore).workspace.activeDocument,
|
|
586
|
+
environment: environment.value,
|
|
588
587
|
eventBus: unref(eventBus),
|
|
589
588
|
expandedItems: unref(sidebarState).expandedItems.value,
|
|
590
|
-
|
|
589
|
+
headingSlugGenerator: mergedConfig.value.generateHeadingSlug ?? ((heading) => `${activeSlug.value}/description/${heading.slug}`),
|
|
590
|
+
httpClients: unref(workspaceStore).config["x-scalar-reference-config"]?.httpClients,
|
|
591
591
|
infoSectionId: infoSectionId.value ?? "description/introduction",
|
|
592
592
|
items: sidebarItems.value,
|
|
593
|
-
options:
|
|
594
|
-
headingSlugGenerator: mergedConfig.value.generateHeadingSlug ?? ((heading) => `${activeSlug.value}/description/${heading.slug}`),
|
|
595
|
-
httpClients: unref(workspaceStore).config["x-scalar-reference-config"]?.httpClients,
|
|
596
|
-
layout: mergedConfig.value.layout,
|
|
597
|
-
persistAuth: mergedConfig.value.persistAuth,
|
|
598
|
-
showOperationId: mergedConfig.value.showOperationId,
|
|
599
|
-
hideTestRequestButton: mergedConfig.value.hideTestRequestButton,
|
|
600
|
-
expandAllResponses: mergedConfig.value.expandAllResponses,
|
|
601
|
-
expandAllModelSections: mergedConfig.value.expandAllModelSections,
|
|
602
|
-
orderRequiredPropertiesFirst: mergedConfig.value.orderRequiredPropertiesFirst,
|
|
603
|
-
orderSchemaPropertiesBy: mergedConfig.value.orderSchemaPropertiesBy,
|
|
604
|
-
documentDownloadType: mergedConfig.value.documentDownloadType
|
|
605
|
-
},
|
|
593
|
+
options: mergedConfig.value,
|
|
606
594
|
xScalarDefaultClient: unref(workspaceStore).workspace["x-scalar-default-client"]
|
|
607
595
|
}, createSlots({
|
|
608
596
|
start: withCtx(() => [
|
|
@@ -619,7 +607,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
619
607
|
}, null, 512),
|
|
620
608
|
mergedConfig.value.layout === "classic" ? (openBlock(), createBlock(ClassicHeader, { key: 1 }, {
|
|
621
609
|
"dark-mode-toggle": withCtx(() => [
|
|
622
|
-
!mergedConfig.value.hideDarkModeToggle ? (openBlock(), createBlock(unref(ScalarColorModeToggleIcon), {
|
|
610
|
+
!mergedConfig.value.hideDarkModeToggle && !mergedConfig.value.forceDarkModeState ? (openBlock(), createBlock(unref(ScalarColorModeToggleIcon), {
|
|
623
611
|
key: 0,
|
|
624
612
|
class: "text-c-2 hover:text-c-1",
|
|
625
613
|
mode: colorMode.value,
|
|
@@ -662,7 +650,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
662
650
|
]),
|
|
663
651
|
key: "0"
|
|
664
652
|
} : void 0
|
|
665
|
-
]), 1032, ["
|
|
653
|
+
]), 1032, ["document", "environment", "eventBus", "expandedItems", "headingSlugGenerator", "httpClients", "infoSectionId", "items", "options", "xScalarDefaultClient"])
|
|
666
654
|
], 8, _hoisted_3),
|
|
667
655
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
668
656
|
renderSlot(_ctx.$slots, "footer", normalizeProps(guardReactiveProps(slotProps.value)), void 0, true)
|
|
@@ -673,7 +661,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
673
661
|
}, null, 512)
|
|
674
662
|
], 2),
|
|
675
663
|
createVNode(unref(ScalarToasts))
|
|
676
|
-
]
|
|
664
|
+
]);
|
|
677
665
|
};
|
|
678
666
|
}
|
|
679
667
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type MergedSecuritySchemes } from '@scalar/api-client/v2/blocks/scalar-auth-selector-block';
|
|
2
|
+
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
3
|
+
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
5
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
|
+
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'persistAuth' | 'proxyUrl'>;
|
|
9
|
+
document: WorkspaceDocument | undefined;
|
|
10
|
+
eventBus: WorkspaceEventBus;
|
|
11
|
+
securitySchemes: MergedSecuritySchemes;
|
|
12
|
+
selectedServer: ServerObject | null;
|
|
13
|
+
environment: XScalarEnvironment;
|
|
14
|
+
};
|
|
15
|
+
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>;
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=Auth.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Auth.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Auth/Auth.vue"],"names":[],"mappings":"AA0FA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,yDAAyD,CAAA;AAKhE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAKlF,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC5B,gBAAgB,GAAG,aAAa,GAAG,UAAU,CAC9C,CAAA;IACD,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACvC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,eAAe,EAAE,qBAAqB,CAAA;IACtC,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;AA+GJ,wBAMG"}
|