@scalar/api-reference 1.35.4 → 1.35.6
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 +36 -0
- package/dist/browser/standalone.js +18154 -18461
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue2.js +8 -11
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +4 -4
- package/dist/components/ApiReferenceLayout.vue2.js +247 -268
- package/dist/components/Badge/Badge.vue.js +1 -1
- package/dist/components/ClassicHeader.vue.js +1 -1
- package/dist/components/Content/Content.vue.js +145 -169
- package/dist/components/Content/Content.vue3.js +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue2.js +32 -35
- package/dist/components/Content/Models/Models.vue.js +27 -31
- package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +32 -35
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +26 -27
- package/dist/components/Content/Operations/get-current-index.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue2.js +68 -74
- package/dist/components/Content/Schema/SchemaComposition.vue.js +42 -45
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +45 -50
- package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +30 -34
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +142 -157
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +160 -164
- package/dist/components/Content/Schema/helpers/get-schema-type.js +15 -17
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +74 -77
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +10 -11
- package/dist/components/Content/Tags/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue2.js +36 -39
- package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue2.js +31 -35
- package/dist/components/Content/Tags/TagSection.vue.js +86 -92
- package/dist/components/GettingStarted.vue.js +1 -1
- package/dist/components/LinkList/LinkList.vue.js +1 -1
- package/dist/components/LoadingSkeleton.vue.js +1 -1
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +3 -3
- package/dist/components/MobileHeader.vue2.js +13 -12
- package/dist/components/OperationPath.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue2.js +45 -51
- package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
- package/dist/components/ScreenReader.vue.js +1 -1
- package/dist/components/Section/CompactSection.vue.js +1 -1
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/Section/Section.vue2.js +13 -14
- package/dist/components/Section/SectionAccordion.vue.js +1 -1
- package/dist/components/Section/SectionAccordion.vue2.js +29 -30
- package/dist/components/Section/SectionColumn.vue.js +1 -1
- package/dist/components/Section/SectionColumns.vue.js +1 -1
- package/dist/components/Section/SectionContainer.vue.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +1 -1
- package/dist/components/Section/SectionContent.vue.js +1 -1
- package/dist/components/Section/SectionHeader.vue.js +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
- package/dist/components/SectionFlare/SectionFlare.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue2.js +12 -13
- package/dist/features/Operation/Operation.vue.js +31 -36
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +8 -11
- package/dist/features/Operation/components/ParameterList.vue.js +21 -24
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +36 -37
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +45 -52
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +32 -35
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +114 -119
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +3 -3
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +87 -89
- package/dist/features/Search/components/SearchButton.vue.js +23 -25
- package/dist/features/Search/components/SearchModal.vue.js +1 -1
- package/dist/features/Search/components/SearchModal.vue2.js +53 -54
- package/dist/features/api-client-modal/ApiClientModal.vue.js +31 -38
- package/dist/features/document-source/hooks/useDocumentFetcher.js +17 -18
- package/dist/features/document-source/hooks/useDocumentSource.js +16 -16
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue2.js +23 -26
- package/dist/features/example-responses/ExampleResponseTab.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue2.js +128 -153
- package/dist/features/info-object/Contact.vue.js +24 -27
- package/dist/features/info-object/License.vue.js +26 -29
- package/dist/features/multiple-documents/DocumentSelector.vue.js +22 -31
- package/dist/features/multiple-documents/useMultipleDocuments.js +52 -56
- package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/Sidebar.vue.js +3 -3
- package/dist/features/sidebar/components/Sidebar.vue2.js +74 -79
- package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue2.js +52 -53
- package/dist/features/sidebar/components/SidebarGroup.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue2.js +28 -31
- package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue2.js +1 -2
- package/dist/features/traverse-schema/helpers/traverse-description.js +13 -14
- package/dist/features/traverse-schema/helpers/traverse-document.js +14 -15
- package/dist/features/traverse-schema/helpers/traverse-paths.js +20 -23
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +13 -15
- package/dist/features/traverse-schema/helpers/traverse-webhooks.js +8 -10
- package/dist/hooks/useFreezing.js +14 -14
- package/dist/hooks/useNavState.js +37 -39
- package/dist/index.js +2 -2
- package/dist/libs/openapi.js +28 -31
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +68 -75
- package/dist/v2/ApiReferenceWorkspace.vue3.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +116 -135
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +40 -47
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +45 -46
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +109 -125
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +84 -84
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.js +12 -13
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +1 -4
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +77 -82
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +46 -49
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +74 -89
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +24 -27
- 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 +106 -119
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +11 -12
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +3 -3
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.js +11 -14
- package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +45 -48
- package/dist/v2/helpers/get-document-name.js +10 -10
- package/dist/v2/helpers/map-configuration.js +48 -51
- package/dist/v2/hooks/use-legacy-store-events.js +44 -48
- package/dist/v2/hooks/use-workspace-store-events.js +23 -26
- package/package.json +19 -19
- package/dist/components/ApiReferenceLayout.vue3.js +0 -4
- package/dist/components/ApiReferenceLayout.vue4.js +0 -4
- package/dist/components/ApiReferenceLayout.vue5.js +0 -4
- package/dist/components/ApiReferenceLayout.vue6.js +0 -4
- package/dist/components/Badge/Badge.vue3.js +0 -4
- package/dist/components/ClassicHeader.vue2.js +0 -4
- package/dist/components/Content/Content.vue2.js +0 -4
- package/dist/components/Content/Models/ClassicLayout.vue3.js +0 -4
- package/dist/components/Content/Models/ModernLayout.vue3.js +0 -4
- package/dist/components/Content/Schema/Schema.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaEnumValues.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaHeading.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaProperty.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue3.js +0 -4
- package/dist/components/Content/Tags/ClassicLayout.vue3.js +0 -4
- package/dist/components/Content/Tags/ModernLayout.vue3.js +0 -4
- package/dist/components/GettingStarted.vue3.js +0 -4
- package/dist/components/LinkList/LinkList.vue3.js +0 -4
- package/dist/components/LoadingSkeleton.vue3.js +0 -4
- package/dist/components/MobileHeader.vue3.js +0 -4
- package/dist/components/OperationPath.vue3.js +0 -4
- package/dist/components/OperationsList/OperationsList.vue3.js +0 -4
- package/dist/components/OperationsList/OperationsListItem.vue3.js +0 -4
- package/dist/components/ScreenReader.vue3.js +0 -4
- package/dist/components/Section/CompactSection.vue3.js +0 -4
- package/dist/components/Section/Section.vue3.js +0 -4
- package/dist/components/Section/SectionAccordion.vue3.js +0 -4
- package/dist/components/Section/SectionColumn.vue2.js +0 -4
- package/dist/components/Section/SectionColumns.vue2.js +0 -4
- package/dist/components/Section/SectionContainer.vue3.js +0 -4
- package/dist/components/Section/SectionContainerAccordion.vue3.js +0 -4
- package/dist/components/Section/SectionContent.vue3.js +0 -4
- package/dist/components/Section/SectionHeader.vue3.js +0 -4
- package/dist/components/Section/SectionHeaderTag.vue3.js +0 -4
- package/dist/components/SectionFlare/SectionFlare.vue2.js +0 -4
- package/dist/components/ShowMoreButton.vue3.js +0 -4
- package/dist/features/Operation/components/Headers.vue3.js +0 -4
- package/dist/features/Operation/components/ParameterListItem.vue3.js +0 -4
- package/dist/features/Operation/components/RequestBody.vue3.js +0 -4
- package/dist/features/Operation/components/callbacks/Callback.vue3.js +0 -4
- package/dist/features/Operation/layouts/ClassicLayout.vue3.js +0 -4
- package/dist/features/Operation/layouts/ModernLayout.vue3.js +0 -4
- package/dist/features/Search/components/SearchModal.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponse.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponseTab.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponseTabList.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponses.vue3.js +0 -4
- package/dist/features/sidebar/components/Sidebar.vue3.js +0 -4
- package/dist/features/sidebar/components/SidebarElement.vue3.js +0 -4
- package/dist/features/sidebar/components/SidebarGroup.vue3.js +0 -4
- package/dist/features/sidebar/components/SidebarHttpBadge.vue3.js +0 -4
- package/dist/features/test-request-button/TestRequestButton.vue3.js +0 -4
- package/dist/v2/ApiReferenceWorkspace.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue3.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue3.js +0 -4
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue3.js +0 -4
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue2.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue3.js +0 -4
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue3.js +0 -4
|
@@ -1,53 +1,50 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
};
|
|
1
|
+
const t = (e) => ({
|
|
2
|
+
"x-scalar-reference-config": {
|
|
3
|
+
title: e.title,
|
|
4
|
+
slug: e.slug,
|
|
5
|
+
features: {
|
|
6
|
+
// Feature toggles for UI elements and behaviors
|
|
7
|
+
showModels: !e.hideModels,
|
|
8
|
+
expandAllTagSections: e.defaultOpenAllTags,
|
|
9
|
+
persistAuthenticationState: e.persistAuth,
|
|
10
|
+
showDarkModeToggle: !e.hideDarkModeToggle,
|
|
11
|
+
showDownload: !e.hideDownloadButton,
|
|
12
|
+
showSearch: !e.hideSearch,
|
|
13
|
+
showSidebar: e.showSidebar,
|
|
14
|
+
showTestRequestButton: !e.hideTestRequestButton
|
|
15
|
+
},
|
|
16
|
+
appearance: {
|
|
17
|
+
// Appearance-related configuration
|
|
18
|
+
css: e.customCss,
|
|
19
|
+
favicon: e.favicon,
|
|
20
|
+
forceColorMode: e.forceDarkModeState,
|
|
21
|
+
initialColorMode: e.darkMode ? "dark" : void 0,
|
|
22
|
+
layout: e.layout,
|
|
23
|
+
loadDefaultFonts: e.withDefaultFonts,
|
|
24
|
+
theme: e.theme
|
|
25
|
+
},
|
|
26
|
+
routing: {
|
|
27
|
+
// Routing configuration
|
|
28
|
+
basePath: e.pathRouting?.basePath
|
|
29
|
+
},
|
|
30
|
+
settings: {
|
|
31
|
+
// Miscellaneous settings
|
|
32
|
+
proxyUrl: e.proxyUrl,
|
|
33
|
+
searchKey: e.searchHotKey,
|
|
34
|
+
baseServerUrl: e.baseServerURL,
|
|
35
|
+
servers: e.servers
|
|
36
|
+
},
|
|
37
|
+
meta: e.metaData,
|
|
38
|
+
// In memory configuration
|
|
39
|
+
tagSort: e.tagsSorter,
|
|
40
|
+
operationsSorter: e.operationsSorter,
|
|
41
|
+
generateHeadingSlug: e.generateHeadingSlug,
|
|
42
|
+
generateModelSlug: e.generateModelSlug,
|
|
43
|
+
generateOperationSlug: e.generateOperationSlug,
|
|
44
|
+
generateTagSlug: e.generateTagSlug,
|
|
45
|
+
generateWebhookSlug: e.generateWebhookSlug
|
|
46
|
+
}
|
|
47
|
+
});
|
|
51
48
|
export {
|
|
52
|
-
|
|
49
|
+
t as mapConfiguration
|
|
53
50
|
};
|
|
@@ -1,65 +1,61 @@
|
|
|
1
|
-
import { onCustomEvent as
|
|
2
|
-
const
|
|
3
|
-
const { servers:
|
|
4
|
-
|
|
5
|
-
if (
|
|
1
|
+
import { onCustomEvent as a } from "@scalar/workspace-store/events";
|
|
2
|
+
const y = (p, S, b, s) => {
|
|
3
|
+
const { servers: u, serverMutators: d, requestMutators: m, collectionMutators: o, securitySchemeMutators: n } = S, { activeCollection: i, activeServer: v } = b;
|
|
4
|
+
a(s, "scalar-replace-servers", ({ detail: { servers: e, options: t } }) => {
|
|
5
|
+
if (t?.disableOldStoreUpdate === !0)
|
|
6
6
|
return;
|
|
7
|
-
const
|
|
8
|
-
if (!
|
|
7
|
+
const r = i.value;
|
|
8
|
+
if (!r)
|
|
9
9
|
return console.warn("No active collection found");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}),
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
const c = Object.values(n).find((l) => {
|
|
17
|
-
var s;
|
|
18
|
-
return l.url === ((s = r.at(-1)) == null ? void 0 : s.url);
|
|
10
|
+
r.servers.forEach((l) => {
|
|
11
|
+
d.delete(l, r.uid);
|
|
12
|
+
}), e.forEach((l) => {
|
|
13
|
+
const f = Object.values(u).find((h) => h.url === l.url);
|
|
14
|
+
f && d.add(f, r.uid);
|
|
19
15
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
const c = Object.values(u).find((l) => l.url === e.at(-1)?.url);
|
|
17
|
+
o.edit(r.uid, "selectedServerUid", c?.uid);
|
|
18
|
+
}), a(s, "scalar-update-selected-server", ({ detail: { value: e, options: t } }) => {
|
|
19
|
+
if (t?.disableOldStoreUpdate === !0)
|
|
23
20
|
return;
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
21
|
+
const r = i.value;
|
|
22
|
+
if (!r)
|
|
26
23
|
return;
|
|
27
|
-
const c = Object.values(
|
|
28
|
-
c &&
|
|
29
|
-
}),
|
|
30
|
-
if (
|
|
24
|
+
const c = Object.values(u).find((l) => l.url === e);
|
|
25
|
+
c && o.edit(r.uid, "selectedServerUid", c.uid);
|
|
26
|
+
}), a(s, "store-update-selected-server-properties", ({ detail: { key: e, value: t, options: r } }) => {
|
|
27
|
+
if (r?.disableOldStoreUpdate)
|
|
31
28
|
return;
|
|
32
|
-
const c =
|
|
33
|
-
c &&
|
|
34
|
-
}),
|
|
35
|
-
|
|
36
|
-
if ((t == null ? void 0 : t.disableOldStoreUpdate) === !0)
|
|
29
|
+
const c = v.value;
|
|
30
|
+
c && d.edit(c.uid, e, t);
|
|
31
|
+
}), a(s, "scalar-update-selected-server-variables", ({ detail: { key: e, value: t, options: r } }) => {
|
|
32
|
+
if (r?.disableOldStoreUpdate === !0)
|
|
37
33
|
return;
|
|
38
|
-
const c =
|
|
39
|
-
if (!c || c.url !==
|
|
34
|
+
const c = v.value;
|
|
35
|
+
if (!c || c.url !== p.workspace.activeDocument?.["x-scalar-active-server"])
|
|
40
36
|
return;
|
|
41
37
|
const l = c.variables || {};
|
|
42
|
-
l[
|
|
43
|
-
}),
|
|
44
|
-
const
|
|
45
|
-
if (!
|
|
38
|
+
l[e] = { ...l[e], default: t }, d.edit(c.uid, "variables", l);
|
|
39
|
+
}), a(s, "scalar-select-security-schemes", ({ detail: { uids: e } }) => {
|
|
40
|
+
const t = i.value;
|
|
41
|
+
if (!t)
|
|
46
42
|
return console.warn("No active collection found");
|
|
47
|
-
|
|
48
|
-
}),
|
|
49
|
-
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
}),
|
|
53
|
-
const
|
|
54
|
-
if (!
|
|
43
|
+
o.edit(t.uid, "selectedSecuritySchemeUids", e);
|
|
44
|
+
}), a(s, "scalar-select-operation-security-schemes", ({ detail: { operationUid: e, uids: t } }) => {
|
|
45
|
+
m.edit(e, "selectedSecuritySchemeUids", t);
|
|
46
|
+
}), a(s, "scalar-edit-security-scheme", ({ detail: { uid: e, path: t, value: r } }) => {
|
|
47
|
+
n.edit(e, t, r);
|
|
48
|
+
}), a(s, "scalar-add-auth-option", ({ detail: { payload: e } }) => {
|
|
49
|
+
const t = i.value;
|
|
50
|
+
if (!t)
|
|
55
51
|
return console.warn("No active collection found");
|
|
56
|
-
|
|
57
|
-
}),
|
|
52
|
+
n.add(e, t.uid);
|
|
53
|
+
}), a(s, "scalar-delete-security-scheme", ({ detail: { uid: e } }) => {
|
|
58
54
|
if (!i.value)
|
|
59
55
|
return console.warn("No active collection found");
|
|
60
|
-
|
|
56
|
+
n.delete(e);
|
|
61
57
|
});
|
|
62
58
|
};
|
|
63
59
|
export {
|
|
64
|
-
|
|
60
|
+
y as useLegacyStoreEvents
|
|
65
61
|
};
|
|
@@ -1,43 +1,40 @@
|
|
|
1
|
-
import { safeLocalStorage as
|
|
2
|
-
import { generateClientMutators as
|
|
3
|
-
import { onCustomEvent as
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
1
|
+
import { safeLocalStorage as v, REFERENCE_LS_KEYS as d } from "@scalar/helpers/object/local-storage";
|
|
2
|
+
import { generateClientMutators as u } from "@scalar/workspace-store/client";
|
|
3
|
+
import { onCustomEvent as c } from "@scalar/workspace-store/events";
|
|
4
|
+
const p = (r, t) => {
|
|
5
|
+
const i = u(r);
|
|
6
|
+
c(t, "scalar-update-dark-mode", (e) => {
|
|
7
7
|
r.update("x-scalar-dark-mode", e.detail.value);
|
|
8
|
-
}),
|
|
8
|
+
}), c(t, "scalar-update-active-document", (e) => {
|
|
9
9
|
r.update("x-scalar-active-document", e.detail.value);
|
|
10
|
-
}),
|
|
11
|
-
r.update("x-scalar-default-client", e.detail),
|
|
12
|
-
}),
|
|
13
|
-
var c;
|
|
10
|
+
}), c(t, "scalar-update-selected-client", (e) => {
|
|
11
|
+
r.update("x-scalar-default-client", e.detail), v().setItem(d.SELECTED_CLIENT, e.detail);
|
|
12
|
+
}), c(t, "scalar-replace-servers", (e) => {
|
|
14
13
|
const a = r.workspace.activeDocument;
|
|
15
|
-
a && (a.servers = e.detail.servers, a["x-scalar-active-server"] =
|
|
16
|
-
}),
|
|
14
|
+
a && (a.servers = e.detail.servers, a["x-scalar-active-server"] = e.detail.servers.at(-1)?.url);
|
|
15
|
+
}), c(t, "scalar-update-selected-server", (e) => {
|
|
17
16
|
const a = r.workspace.activeDocument;
|
|
18
17
|
a && (a["x-scalar-active-server"] = e.detail.value);
|
|
19
|
-
}),
|
|
20
|
-
var l;
|
|
18
|
+
}), c(t, "store-update-selected-server-properties", (e) => {
|
|
21
19
|
const a = r.workspace.activeDocument;
|
|
22
20
|
if (!a)
|
|
23
21
|
return;
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
var l, i;
|
|
22
|
+
const s = a.servers?.find((l) => l.url === a["x-scalar-active-server"]);
|
|
23
|
+
s && (s[e.detail.key] = e.detail.value);
|
|
24
|
+
}), c(t, "scalar-update-selected-server-variables", (e) => {
|
|
28
25
|
const a = r.workspace.activeDocument;
|
|
29
26
|
if (!a)
|
|
30
27
|
return;
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
}),
|
|
34
|
-
|
|
28
|
+
const s = a.servers?.find((l) => l.url === a["x-scalar-active-server"]);
|
|
29
|
+
s && s.variables?.[e.detail.key] && (s.variables[e.detail.key].default = e.detail.value);
|
|
30
|
+
}), c(t, "scalar-add-server", (e) => {
|
|
31
|
+
i.active().serverMutators.addServer(e.detail.server);
|
|
35
32
|
const a = r.workspace.activeDocument;
|
|
36
33
|
a && (a["x-scalar-active-server"] = e.detail.server.url);
|
|
37
|
-
}),
|
|
38
|
-
|
|
34
|
+
}), c(t, "scalar-delete-server", (e) => {
|
|
35
|
+
i.active().serverMutators.deleteServer(e.detail.url);
|
|
39
36
|
});
|
|
40
37
|
};
|
|
41
38
|
export {
|
|
42
|
-
|
|
39
|
+
p as useWorkspaceStoreEvents
|
|
43
40
|
};
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.35.
|
|
23
|
+
"version": "1.35.6",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20"
|
|
26
26
|
},
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"module": "./dist/index.js",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@floating-ui/vue": "
|
|
47
|
-
"@headlessui/vue": "
|
|
46
|
+
"@floating-ui/vue": "1.1.9",
|
|
47
|
+
"@headlessui/vue": "1.7.23",
|
|
48
48
|
"@unhead/vue": "^1.11.20",
|
|
49
|
-
"@vueuse/core": "
|
|
49
|
+
"@vueuse/core": "13.9.0",
|
|
50
50
|
"flatted": "^3.3.3",
|
|
51
51
|
"fuse.js": "^7.1.0",
|
|
52
52
|
"github-slugger": "^2.0.0",
|
|
@@ -56,22 +56,22 @@
|
|
|
56
56
|
"type-fest": "^4.41.0",
|
|
57
57
|
"vue": "^3.5.17",
|
|
58
58
|
"zod": "3.24.1",
|
|
59
|
-
"@scalar/api-client": "2.5.
|
|
59
|
+
"@scalar/api-client": "2.5.33",
|
|
60
60
|
"@scalar/code-highlight": "0.1.9",
|
|
61
|
-
"@scalar/
|
|
61
|
+
"@scalar/helpers": "0.0.11",
|
|
62
|
+
"@scalar/components": "0.14.34",
|
|
62
63
|
"@scalar/icons": "0.4.7",
|
|
63
|
-
"@scalar/
|
|
64
|
-
"@scalar/
|
|
65
|
-
"@scalar/object-utils": "1.2.
|
|
66
|
-
"@scalar/
|
|
67
|
-
"@scalar/openapi-types": "0.3.7",
|
|
68
|
-
"@scalar/openapi-parser": "0.20.4",
|
|
64
|
+
"@scalar/oas-utils": "0.4.29",
|
|
65
|
+
"@scalar/json-magic": "0.4.3",
|
|
66
|
+
"@scalar/object-utils": "1.2.7",
|
|
67
|
+
"@scalar/openapi-parser": "0.20.6",
|
|
69
68
|
"@scalar/snippetz": "0.4.9",
|
|
69
|
+
"@scalar/openapi-types": "0.3.7",
|
|
70
|
+
"@scalar/themes": "0.13.17",
|
|
70
71
|
"@scalar/types": "0.2.15",
|
|
71
|
-
"@scalar/
|
|
72
|
-
"@scalar/use-hooks": "0.2.4",
|
|
72
|
+
"@scalar/use-hooks": "0.2.5",
|
|
73
73
|
"@scalar/use-toasts": "0.8.0",
|
|
74
|
-
"@scalar/workspace-store": "0.15.
|
|
74
|
+
"@scalar/workspace-store": "0.15.6"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@hono/node-server": "^1.11.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@tailwindcss/vite": "^4.1.7",
|
|
80
80
|
"@types/react": "^19.1.8",
|
|
81
81
|
"@types/react-dom": "^19.1.6",
|
|
82
|
-
"@vitejs/plugin-vue": "
|
|
82
|
+
"@vitejs/plugin-vue": "6.0.1",
|
|
83
83
|
"@vue/server-renderer": "^3.5.17",
|
|
84
84
|
"@vue/test-utils": "^2.4.1",
|
|
85
85
|
"hono": "^4.6.5",
|
|
@@ -87,13 +87,13 @@
|
|
|
87
87
|
"react-dom": "^19.1.0",
|
|
88
88
|
"rollup-plugin-webpack-stats": "^0.2.5",
|
|
89
89
|
"tailwindcss": "^4.1.7",
|
|
90
|
-
"vite": "
|
|
90
|
+
"vite": "7.1.5",
|
|
91
91
|
"vite-plugin-banner": "^0.7.1",
|
|
92
92
|
"vite-plugin-css-injected-by-js": "^3.4.0",
|
|
93
|
-
"vitest": "
|
|
94
|
-
"@scalar/build-tooling": "0.2.7",
|
|
93
|
+
"vitest": "3.2.4",
|
|
95
94
|
"@scalar/galaxy": "0.5.8",
|
|
96
95
|
"@scalar/react-renderer": "0.2.1",
|
|
96
|
+
"@scalar/build-tooling": "0.2.7",
|
|
97
97
|
"@scalar/core": "0.3.16"
|
|
98
98
|
},
|
|
99
99
|
"scripts": {
|