@scalar/api-client 2.0.63 → 2.1.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 +63 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +64 -62
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +77 -69
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +121 -0
- package/dist/components/AddressBar/AddressBarServer.vue2.js +4 -0
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts +22 -0
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -0
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +57 -0
- package/dist/components/AddressBar/AddressBarServerItem.vue2.js +4 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -6
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +87 -82
- package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +70 -63
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +33 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.js +41 -0
- package/dist/components/CommandPalette/CommandActionForm.vue2.js +4 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +20 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.js +42 -0
- package/dist/components/CommandPalette/CommandActionInput.vue2.js +4 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +33 -56
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +88 -109
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -73
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +21 -2
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +122 -133
- package/dist/components/CommandPalette/{CommandPaletteFolder.vue.d.ts → CommandPaletteServer.vue.d.ts} +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +92 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue2.js +4 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +7 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +87 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue2.js +4 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +33 -49
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +22 -3
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +3 -3
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +107 -101
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +2 -2
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/DataTable/DataTableInput.vue2.js +13 -13
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +39 -40
- package/dist/components/DataTable/index.js +12 -12
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +7 -7
- package/dist/components/Form/Form.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue2.js +30 -30
- package/dist/components/HttpMethod/helpers.d.ts +4 -0
- package/dist/components/HttpMethod/helpers.d.ts.map +1 -0
- package/dist/components/HttpMethod/helpers.js +5 -0
- package/dist/components/HttpMethod/index.d.ts +1 -0
- package/dist/components/HttpMethod/index.d.ts.map +1 -1
- package/dist/components/HttpMethod/index.js +4 -2
- package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchModal.vue.js +2 -2
- package/dist/components/Search/SearchModal.vue2.js +29 -27
- package/dist/components/Search/useSearch.js +35 -35
- package/dist/components/SideNav/SideNavLink.vue.js +6 -6
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +14 -17
- package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.d.ts +22 -0
- package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.d.ts.map +1 -0
- package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.js +29 -0
- package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue2.js +4 -0
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +38 -35
- package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +5 -54
- package/dist/components/Sidebar/Sidebar.vue2.js +59 -0
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +11 -11
- package/dist/components/Sidebar/index.js +2 -3
- package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
- package/dist/components/SubpageHeader.vue.js +3 -3
- package/dist/components/SubpageHeader.vue2.js +3 -3
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +23 -23
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +21 -21
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +5 -5
- package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +4 -4
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
- package/dist/components/index.js +4 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +39 -53
- package/dist/layouts/App/create-api-client-app.d.ts +2058 -1941
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +12 -12
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +6 -6
- package/dist/layouts/Modal/create-api-client-modal.d.ts +4590 -4356
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +18 -23
- package/dist/libs/create-client.d.ts +2086 -1972
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +85 -76
- package/dist/libs/environment-parser.d.ts +9 -0
- package/dist/libs/environment-parser.d.ts.map +1 -0
- package/dist/libs/environment-parser.js +17 -0
- package/dist/libs/errors.d.ts +21 -0
- package/dist/libs/errors.d.ts.map +1 -0
- package/dist/libs/errors.js +14 -0
- package/dist/libs/event-busses/command-palette-bus.d.ts +1 -1
- package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts +4 -4
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.js +17 -19
- package/dist/libs/index.d.ts +5 -2
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +31 -24
- package/dist/libs/local-storage.d.ts +3 -3
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +24 -12
- package/dist/libs/normalize-headers.d.ts +14 -0
- package/dist/libs/normalize-headers.d.ts.map +1 -0
- package/dist/libs/normalize-headers.js +32 -0
- package/dist/libs/send-request.d.ts +28 -0
- package/dist/libs/send-request.d.ts.map +1 -0
- package/dist/libs/send-request.js +186 -0
- package/dist/libs/string-template.d.ts +19 -0
- package/dist/libs/string-template.d.ts.map +1 -0
- package/dist/libs/string-template.js +30 -0
- package/dist/router.d.ts +5 -0
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +36 -27
- package/dist/store/collections.d.ts +705 -0
- package/dist/store/collections.d.ts.map +1 -0
- package/dist/store/collections.js +63 -0
- package/dist/store/cookies.d.ts +135 -0
- package/dist/store/cookies.d.ts.map +1 -0
- package/dist/store/cookies.js +29 -0
- package/dist/store/environment.d.ts +80 -0
- package/dist/store/environment.d.ts.map +1 -0
- package/dist/store/environment.js +39 -0
- package/dist/store/import-spec.d.ts +8 -0
- package/dist/store/import-spec.d.ts.map +1 -0
- package/dist/store/import-spec.js +45 -0
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +1 -1
- package/dist/store/request-example.d.ts +1111 -0
- package/dist/store/request-example.d.ts.map +1 -0
- package/dist/store/request-example.js +47 -0
- package/dist/store/requests.d.ts +371 -0
- package/dist/store/requests.d.ts.map +1 -0
- package/dist/store/requests.js +107 -0
- package/dist/store/router-params.d.ts +15 -0
- package/dist/store/router-params.d.ts.map +1 -0
- package/dist/store/router-params.js +21 -0
- package/dist/store/security-schemes.d.ts +616 -0
- package/dist/store/security-schemes.d.ts.map +1 -0
- package/dist/store/security-schemes.js +68 -0
- package/dist/store/servers.d.ts +99 -0
- package/dist/store/servers.d.ts.map +1 -0
- package/dist/store/servers.js +46 -0
- package/dist/store/store-context.d.ts +29 -0
- package/dist/store/store-context.d.ts.map +1 -0
- package/dist/store/store.d.ts +7504 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +200 -0
- package/dist/store/tags.d.ts +169 -0
- package/dist/store/tags.d.ts.map +1 -0
- package/dist/store/tags.js +57 -0
- package/dist/store/workspace.d.ts +93 -7150
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +49 -543
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +2 -2
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieRaw.vue.js +10 -10
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +29 -32
- package/dist/views/Environment/Environment.vue2.js +31 -33
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +11 -5
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +79 -59
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +87 -319
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +36 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +59 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue2.js +4 -0
- package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuth2.vue.d.ts +3 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +216 -0
- package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -0
- package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +183 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +30 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +3 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +140 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +167 -186
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +49 -49
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +26 -22
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +103 -102
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +5 -5
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.d.ts +30 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSidebar.vue.js +7 -0
- package/dist/views/Request/RequestSidebar.vue2.js +179 -0
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +6 -7
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +283 -254
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -5
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +9 -7
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +24 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSubpageHeader.vue.js +7 -0
- package/dist/views/Request/RequestSubpageHeader.vue2.js +48 -0
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +17 -16
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +37 -30
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +69 -90
- package/dist/views/Request/components/index.d.ts +0 -1
- package/dist/views/Request/components/index.d.ts.map +1 -1
- package/dist/views/Request/components/index.js +2 -4
- package/dist/views/Request/consts/new-auth-options.d.ts +11 -1
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.js +17 -7
- package/dist/views/Request/handle-drag.d.ts +8 -0
- package/dist/views/Request/handle-drag.d.ts.map +1 -0
- package/dist/views/Request/handle-drag.js +56 -0
- package/dist/views/Request/libs/auth.d.ts +35 -0
- package/dist/views/Request/libs/auth.d.ts.map +1 -0
- package/dist/views/Request/libs/auth.js +14 -0
- package/dist/views/Request/libs/index.d.ts +1 -0
- package/dist/views/Request/libs/index.d.ts.map +1 -1
- package/dist/views/Request/libs/index.js +7 -3
- package/dist/views/Request/libs/oauth2.d.ts +12 -3
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +42 -27
- package/dist/views/Servers/ServerForm.vue.js +22 -22
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +18 -16
- package/package.json +11 -11
- package/dist/components/CodeInput/codeDropdownWidget.d.ts +0 -32
- package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +0 -1
- package/dist/components/CodeInput/codeDropdownWidget.js +0 -121
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +0 -106
- package/dist/components/CommandPalette/CommandPaletteFolder.vue2.js +0 -4
- package/dist/components/Sidebar/Sidebar.vue3.js +0 -5
- package/dist/errors.d.ts +0 -5
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -7
- package/dist/libs/normalizeHeaders.d.ts +0 -11
- package/dist/libs/normalizeHeaders.d.ts.map +0 -1
- package/dist/libs/normalizeHeaders.js +0 -25
- package/dist/libs/pathParams.d.ts +0 -10
- package/dist/libs/pathParams.d.ts.map +0 -1
- package/dist/libs/pathParams.js +0 -36
- package/dist/libs/sendRequest.d.ts +0 -14
- package/dist/libs/sendRequest.d.ts.map +0 -1
- package/dist/libs/sendRequest.js +0 -163
- package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth.vue2.js +0 -351
- package/dist/views/Request/components/OAuth2.vue.d.ts.map +0 -1
- package/dist/views/Request/components/OAuth2.vue.js +0 -208
- package/dist/views/Request/components/OAuthScopesInput.vue.d.ts.map +0 -1
- /package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuth2.vue2.js +0 -0
- /package/dist/views/Request/{components → RequestSection/RequestAuth}/OAuthScopesInput.vue2.js +0 -0
- /package/dist/views/Request/RequestSection/{RequestAuth.vue.d.ts → RequestAuth/RequestAuth.vue.d.ts} +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineComponent as v, openBlock as f, createBlock as m, unref as i, withCtx as S, createElementVNode as l, normalizeClass as x, createVNode as h, toDisplayString as w } from "vue";
|
|
2
|
+
import { ScalarDropdownItem as k, ScalarIcon as C } from "@scalar/components";
|
|
3
|
+
import { useWorkspace as b } from "../../store/store.js";
|
|
4
|
+
const g = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, B = /* @__PURE__ */ v({
|
|
5
|
+
__name: "AddressBarServerItem",
|
|
6
|
+
props: {
|
|
7
|
+
serverOption: {},
|
|
8
|
+
type: {}
|
|
9
|
+
},
|
|
10
|
+
setup(a) {
|
|
11
|
+
const r = a, {
|
|
12
|
+
activeCollection: o,
|
|
13
|
+
activeRequest: s,
|
|
14
|
+
activeServer: n,
|
|
15
|
+
collectionMutators: p,
|
|
16
|
+
requestMutators: c
|
|
17
|
+
} = b(), d = (e) => {
|
|
18
|
+
r.type === "collection" && o.value ? p.edit(
|
|
19
|
+
o.value.uid,
|
|
20
|
+
"selectedServerUid",
|
|
21
|
+
e
|
|
22
|
+
) : r.type === "request" && s.value && c.edit(
|
|
23
|
+
s.value.uid,
|
|
24
|
+
"selectedServerUid",
|
|
25
|
+
e
|
|
26
|
+
);
|
|
27
|
+
}, u = (e) => {
|
|
28
|
+
var t;
|
|
29
|
+
return ((t = n.value) == null ? void 0 : t.uid) === e;
|
|
30
|
+
};
|
|
31
|
+
return (e, t) => (f(), m(i(k), {
|
|
32
|
+
class: "flex !gap-1.5 group font-code text-xxs whitespace-nowrap text-ellipsis overflow-hidden",
|
|
33
|
+
value: e.serverOption.id,
|
|
34
|
+
onClick: t[0] || (t[0] = (y) => d(e.serverOption.id))
|
|
35
|
+
}, {
|
|
36
|
+
default: S(() => [
|
|
37
|
+
l("div", {
|
|
38
|
+
class: x([
|
|
39
|
+
"flex size-4 items-center justify-center rounded-full p-[3px] group-hover:shadow-border",
|
|
40
|
+
u(e.serverOption.id) ? "bg-blue text-b-1" : "text-transparent"
|
|
41
|
+
])
|
|
42
|
+
}, [
|
|
43
|
+
h(i(C), {
|
|
44
|
+
class: "relative top-[0.5px] size-2.5",
|
|
45
|
+
icon: "Checkmark",
|
|
46
|
+
thickness: "3.5"
|
|
47
|
+
})
|
|
48
|
+
], 2),
|
|
49
|
+
l("span", g, w(e.serverOption.label), 1)
|
|
50
|
+
]),
|
|
51
|
+
_: 1
|
|
52
|
+
}, 8, ["value"]));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
B as default
|
|
57
|
+
};
|
|
@@ -18,7 +18,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
18
18
|
type?: string;
|
|
19
19
|
nullable?: boolean;
|
|
20
20
|
withVariables?: boolean;
|
|
21
|
-
withServers?: boolean;
|
|
22
21
|
}>, {
|
|
23
22
|
disableCloseBrackets: boolean;
|
|
24
23
|
disableEnter: boolean;
|
|
@@ -27,7 +26,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
27
26
|
colorPicker: boolean;
|
|
28
27
|
nullable: boolean;
|
|
29
28
|
withVariables: boolean;
|
|
30
|
-
withServers: boolean;
|
|
31
29
|
}>, {
|
|
32
30
|
focus: () => void;
|
|
33
31
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -52,7 +50,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
52
50
|
type?: string;
|
|
53
51
|
nullable?: boolean;
|
|
54
52
|
withVariables?: boolean;
|
|
55
|
-
withServers?: boolean;
|
|
56
53
|
}>, {
|
|
57
54
|
disableCloseBrackets: boolean;
|
|
58
55
|
disableEnter: boolean;
|
|
@@ -61,12 +58,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
61
58
|
colorPicker: boolean;
|
|
62
59
|
nullable: boolean;
|
|
63
60
|
withVariables: boolean;
|
|
64
|
-
withServers: boolean;
|
|
65
61
|
}>>> & {
|
|
66
|
-
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
67
62
|
onSubmit?: ((v: string) => any) | undefined;
|
|
63
|
+
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
68
64
|
}, {
|
|
69
|
-
withServers: boolean;
|
|
70
65
|
colorPicker: boolean;
|
|
71
66
|
emitOnBlur: boolean;
|
|
72
67
|
disableTabIndent: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OAoVO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAcb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;;;;;;;;;;;;;;;kBAjBT,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;;;;;;;;;;;;;iBAjBT,OAAO;gBAGR,OAAO;sBAGD,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;;qBAoTG,GAAG;kBACN,GAAG;;AAzU9B,wBAsXC;AAMD,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-44609195"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCodeMirror as
|
|
3
|
-
import { nanoid as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { useWorkspace as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as T, useAttrs as A, ref as a, toRef as l, watch as U, computed as _, openBlock as t, createElementBlock as s, Fragment as j, createBlock as c, mergeProps as Q, unref as r, renderSlot as C, createCommentVNode as m } from "vue";
|
|
2
|
+
import { useCodeMirror as W, useDropdown as z, colorPicker as G } from "@scalar/use-codemirror";
|
|
3
|
+
import { nanoid as H } from "nanoid";
|
|
4
|
+
import x from "../DataTable/DataTableInputSelect.vue.js";
|
|
5
|
+
import { pillPlugin as J, backspaceCommand as K } from "./codeVariableWidget.js";
|
|
6
|
+
import L from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
7
|
+
import { useWorkspace as X } from "../../store/store.js";
|
|
8
|
+
const Y = ["id"], Z = {
|
|
9
9
|
key: 3,
|
|
10
10
|
class: "absolute centered-y right-7 text-orange text-xs"
|
|
11
|
-
},
|
|
11
|
+
}, ee = {
|
|
12
12
|
key: 4,
|
|
13
13
|
class: "required absolute centered-y right-0 pt-px pr-2 text-xxs text-c-3 bg-b-1 shadow-[-8px_0_4px_var(--scalar-background-1)] opacity-100 duration-150 transition-opacity peer-has-[.cm-focused]:opacity-0 pointer-events-none"
|
|
14
|
-
},
|
|
14
|
+
}, oe = {
|
|
15
15
|
inheritAttrs: !1
|
|
16
|
-
},
|
|
17
|
-
...
|
|
16
|
+
}, se = /* @__PURE__ */ T({
|
|
17
|
+
...oe,
|
|
18
18
|
__name: "CodeInput",
|
|
19
19
|
props: {
|
|
20
20
|
colorPicker: { type: Boolean, default: !1 },
|
|
@@ -34,101 +34,106 @@ const J = ["id"], K = {
|
|
|
34
34
|
enum: {},
|
|
35
35
|
type: {},
|
|
36
36
|
nullable: { type: Boolean, default: !1 },
|
|
37
|
-
withVariables: { type: Boolean, default: !0 }
|
|
38
|
-
withServers: { type: Boolean, default: !1 }
|
|
37
|
+
withVariables: { type: Boolean, default: !0 }
|
|
39
38
|
},
|
|
40
39
|
emits: ["submit", "update:modelValue"],
|
|
41
|
-
setup(
|
|
42
|
-
var
|
|
43
|
-
const e =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
isReadOnly: F,
|
|
47
|
-
environments: m,
|
|
48
|
-
router: S
|
|
49
|
-
} = H();
|
|
50
|
-
function P(l) {
|
|
51
|
-
return l === e.modelValue ? null : e.handleFieldChange ? e.handleFieldChange(l) : n("update:modelValue", l);
|
|
40
|
+
setup(F, { expose: P, emit: S }) {
|
|
41
|
+
var B;
|
|
42
|
+
const e = F, u = S, f = A(), q = f.id || `id-${H()}`, b = a(!1), y = a(!1), h = a(""), v = a({ left: 0, top: 0 }), { activeEnvVariables: g, isReadOnly: V, environments: E, router: $ } = X();
|
|
43
|
+
function O(o) {
|
|
44
|
+
return o === e.modelValue ? null : e.handleFieldChange ? e.handleFieldChange(o) : u("update:modelValue", o);
|
|
52
45
|
}
|
|
53
|
-
function
|
|
54
|
-
return e.handleFieldSubmit ? e.handleFieldSubmit(
|
|
46
|
+
function R(o) {
|
|
47
|
+
return e.handleFieldSubmit ? e.handleFieldSubmit(o) : u("submit", o);
|
|
55
48
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
49
|
+
function D(o) {
|
|
50
|
+
b.value = !1, e.emitOnBlur && e.modelValue && R(o);
|
|
58
51
|
}
|
|
59
|
-
const
|
|
60
|
-
e.colorPicker &&
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
), r.push(
|
|
68
|
-
D({ environments: m, activeParsedEnvironments: c, isReadOnly: F }),
|
|
69
|
-
G
|
|
52
|
+
const d = [];
|
|
53
|
+
e.colorPicker && d.push(G), d.push(
|
|
54
|
+
J({
|
|
55
|
+
environments: E,
|
|
56
|
+
activeEnvVariables: g,
|
|
57
|
+
isReadOnly: V
|
|
58
|
+
}),
|
|
59
|
+
K
|
|
70
60
|
);
|
|
71
|
-
const
|
|
72
|
-
content:
|
|
61
|
+
const w = a(null), { codeMirror: n } = W({
|
|
62
|
+
content: l(
|
|
73
63
|
() => e.modelValue !== void 0 ? String(e.modelValue) : ""
|
|
74
64
|
),
|
|
75
|
-
onChange:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
65
|
+
onChange: (o) => {
|
|
66
|
+
O(o), M();
|
|
67
|
+
},
|
|
68
|
+
onFocus: () => b.value = !0,
|
|
69
|
+
onBlur: (o) => D(o),
|
|
70
|
+
codeMirrorRef: w,
|
|
71
|
+
disableTabIndent: l(() => e.disableTabIndent),
|
|
72
|
+
disableEnter: l(() => e.disableEnter),
|
|
73
|
+
disableCloseBrackets: l(() => e.disableCloseBrackets),
|
|
74
|
+
lineNumbers: l(() => e.lineNumbers),
|
|
75
|
+
language: l(() => e.language),
|
|
76
|
+
lint: l(() => e.lint),
|
|
77
|
+
extensions: d,
|
|
78
|
+
placeholder: l(() => e.placeholder)
|
|
87
79
|
});
|
|
88
|
-
(
|
|
89
|
-
|
|
80
|
+
(B = n.value) == null || B.focus(), U(n, () => {
|
|
81
|
+
n.value && Object.prototype.hasOwnProperty.call(f, "autofocus") && n.value.focus();
|
|
90
82
|
});
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
83
|
+
const { handleDropdownSelect: I, updateDropdownVisibility: M } = z({
|
|
84
|
+
codeMirror: n,
|
|
85
|
+
query: h,
|
|
86
|
+
showDropdown: y,
|
|
87
|
+
dropdownPosition: v
|
|
88
|
+
}), N = _(() => {
|
|
89
|
+
var o;
|
|
90
|
+
return e.type === "boolean" || (o = e.type) != null && o.includes("boolean") || e.nullable ? ["true", "false", "null"] : ["true", "false"];
|
|
94
91
|
});
|
|
95
|
-
return
|
|
92
|
+
return P({
|
|
96
93
|
focus: () => {
|
|
97
|
-
var
|
|
98
|
-
(
|
|
94
|
+
var o;
|
|
95
|
+
(o = n.value) == null || o.focus();
|
|
99
96
|
}
|
|
100
|
-
}), (
|
|
101
|
-
var
|
|
102
|
-
return t(), s(
|
|
103
|
-
e.enum && e.enum.length ? (t(),
|
|
97
|
+
}), (o, i) => {
|
|
98
|
+
var k;
|
|
99
|
+
return t(), s(j, null, [
|
|
100
|
+
e.enum && e.enum.length ? (t(), c(x, {
|
|
104
101
|
key: 0,
|
|
105
102
|
modelValue: e.modelValue,
|
|
106
103
|
value: e.enum,
|
|
107
|
-
"onUpdate:modelValue":
|
|
108
|
-
}, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (
|
|
104
|
+
"onUpdate:modelValue": i[0] || (i[0] = (p) => u("update:modelValue", p))
|
|
105
|
+
}, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (k = e.type) != null && k.includes("boolean") ? (t(), c(x, {
|
|
109
106
|
key: 1,
|
|
110
107
|
modelValue: e.modelValue,
|
|
111
|
-
value:
|
|
112
|
-
"onUpdate:modelValue":
|
|
113
|
-
}, null, 8, ["modelValue", "value"])) : (t(), s("div",
|
|
108
|
+
value: N.value,
|
|
109
|
+
"onUpdate:modelValue": i[1] || (i[1] = (p) => u("update:modelValue", p))
|
|
110
|
+
}, null, 8, ["modelValue", "value"])) : (t(), s("div", Q({
|
|
114
111
|
key: 2,
|
|
115
|
-
id:
|
|
116
|
-
},
|
|
112
|
+
id: r(q)
|
|
113
|
+
}, o.$attrs, {
|
|
117
114
|
ref_key: "codeMirrorRef",
|
|
118
|
-
ref:
|
|
115
|
+
ref: w,
|
|
119
116
|
class: ["peer font-code w-full whitespace-nowrap overflow-hidden text-xs leading-[1.44] relative", {
|
|
120
|
-
"flow-code-input--error":
|
|
117
|
+
"flow-code-input--error": o.error
|
|
121
118
|
}]
|
|
122
|
-
}), null, 16,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
])) :
|
|
126
|
-
|
|
127
|
-
|
|
119
|
+
}), null, 16, Y)),
|
|
120
|
+
o.$slots.warning ? (t(), s("div", Z, [
|
|
121
|
+
C(o.$slots, "warning", {}, void 0, !0)
|
|
122
|
+
])) : m("", !0),
|
|
123
|
+
C(o.$slots, "icon", {}, void 0, !0),
|
|
124
|
+
o.required ? (t(), s("div", ee, " Required ")) : m("", !0),
|
|
125
|
+
y.value && e.withVariables && !r(V) ? (t(), c(L, {
|
|
126
|
+
key: 5,
|
|
127
|
+
activeEnvVariables: _(() => r(g)),
|
|
128
|
+
dropdownPosition: v.value,
|
|
129
|
+
query: h.value,
|
|
130
|
+
router: r($),
|
|
131
|
+
onSelect: r(I)
|
|
132
|
+
}, null, 8, ["activeEnvVariables", "dropdownPosition", "query", "router", "onSelect"])) : m("", !0)
|
|
128
133
|
], 64);
|
|
129
134
|
};
|
|
130
135
|
}
|
|
131
136
|
});
|
|
132
137
|
export {
|
|
133
|
-
|
|
138
|
+
se as default
|
|
134
139
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { WorkspaceStore } from '../../store/
|
|
2
|
-
import type { Environment } from '@scalar/oas-utils/entities/
|
|
1
|
+
import type { WorkspaceStore } from '../../store/index.js';
|
|
2
|
+
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
3
|
import { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate } from '@scalar/use-codemirror';
|
|
4
|
-
type ActiveParsedEnvironments = WorkspaceStore['
|
|
4
|
+
type ActiveParsedEnvironments = WorkspaceStore['activeEnvVariables'];
|
|
5
5
|
type IsReadOnly = WorkspaceStore['isReadOnly'];
|
|
6
6
|
export declare const pillPlugin: (props: {
|
|
7
7
|
environments: Record<string, Environment>;
|
|
8
|
-
|
|
8
|
+
activeEnvVariables: ActiveParsedEnvironments;
|
|
9
9
|
isReadOnly: IsReadOnly;
|
|
10
10
|
}) => ViewPlugin<{
|
|
11
11
|
decorations: DecorationSet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEzE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAG/B,KAAK,wBAAwB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAA;AACpE,KAAK,UAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAA;AAiH9C,eAAO,MAAM,UAAU,UAAW;IAChC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACzC,kBAAkB,EAAE,wBAAwB,CAAA;IAC5C,UAAU,EAAE,UAAU,CAAA;CACvB;iBAGkB,aAAa;mBAMX,UAAU;2BAMF,UAAU;EAiCpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
|
|
@@ -1,34 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ScalarButton as
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var u = (n, t, e) => t in n ? v(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var l = (n, t, e) => u(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { ScalarButton as h, ScalarIcon as f, ScalarTooltip as b } from "@scalar/components";
|
|
5
|
+
import { variableRegex as g } from "@scalar/oas-utils/helpers";
|
|
5
6
|
import { ViewPlugin as x, RangeSetBuilder as y, Decoration as w, EditorView as N, WidgetType as E } from "@scalar/use-codemirror";
|
|
6
|
-
import { defineComponent as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { defineComponent as V, h as o, createApp as C } from "vue";
|
|
8
|
+
import { parseEnvVariables as k } from "../../libs/environment-parser.js";
|
|
9
|
+
const D = (n) => {
|
|
10
|
+
var e;
|
|
11
|
+
return ((e = n.value.find(
|
|
12
|
+
(a) => a.key === "color"
|
|
13
|
+
)) == null ? void 0 : e.value) || "grey";
|
|
14
|
+
};
|
|
15
|
+
class c extends E {
|
|
16
|
+
constructor(e, a, i, s) {
|
|
10
17
|
super();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.variableName =
|
|
18
|
+
l(this, "app");
|
|
19
|
+
l(this, "environments");
|
|
20
|
+
l(this, "activeEnvVariables");
|
|
21
|
+
l(this, "isReadOnly");
|
|
22
|
+
this.variableName = e, this.variableName = e, this.environments = a, this.activeEnvVariables = i, this.isReadOnly = s;
|
|
16
23
|
}
|
|
17
24
|
toDOM() {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const a =
|
|
25
|
+
const e = document.createElement("span");
|
|
26
|
+
e.className = "cm-pill", e.textContent = `${this.variableName}`;
|
|
27
|
+
const a = V({
|
|
21
28
|
props: { variableName: { type: String, default: null } },
|
|
22
29
|
render: () => {
|
|
23
|
-
const
|
|
24
|
-
(
|
|
30
|
+
const i = k(this.activeEnvVariables.value).find(
|
|
31
|
+
(r) => r.key === this.variableName
|
|
25
32
|
);
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
!this.isReadOnly &&
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
i && (e.className += ` bg-${D(this.activeEnvVariables)}`);
|
|
34
|
+
const s = i ? o("div", { class: "p-2" }, i.value) : o("div", { class: "divide-y divide-1/2 grid" }, [
|
|
35
|
+
o("span", { class: "p-2" }, "Variable not found"),
|
|
36
|
+
!this.isReadOnly && o("div", { class: "p-1" }, [
|
|
37
|
+
o(
|
|
38
|
+
h,
|
|
32
39
|
{
|
|
33
40
|
class: "gap-1.5 justify-start font-normal px-1 py-1.5 h-auto transition-colors rounded no-underline text-xxs w-full hover:bg-b-2",
|
|
34
41
|
variant: "ghost",
|
|
@@ -37,13 +44,13 @@ class d extends E {
|
|
|
37
44
|
}
|
|
38
45
|
},
|
|
39
46
|
[
|
|
40
|
-
|
|
47
|
+
o(f, { class: "w-2", icon: "Add", size: "xs" }),
|
|
41
48
|
"Add variable"
|
|
42
49
|
]
|
|
43
50
|
)
|
|
44
51
|
])
|
|
45
52
|
]);
|
|
46
|
-
return
|
|
53
|
+
return o(
|
|
47
54
|
b,
|
|
48
55
|
{
|
|
49
56
|
align: "start",
|
|
@@ -53,54 +60,54 @@ class d extends E {
|
|
|
53
60
|
sideOffset: 6
|
|
54
61
|
},
|
|
55
62
|
{
|
|
56
|
-
trigger: () =>
|
|
57
|
-
content: () =>
|
|
63
|
+
trigger: () => o("span", `${this.variableName}`),
|
|
64
|
+
content: () => o(
|
|
58
65
|
"div",
|
|
59
66
|
{
|
|
60
67
|
class: "w-content shadow-lg rounded bg-b-1 text-xxs leading-5 text-c-1"
|
|
61
68
|
},
|
|
62
|
-
|
|
69
|
+
s
|
|
63
70
|
)
|
|
64
71
|
}
|
|
65
72
|
);
|
|
66
73
|
}
|
|
67
74
|
});
|
|
68
|
-
return this.app =
|
|
75
|
+
return this.app = C(a, { variableName: this.variableName }), this.app.mount(e), e;
|
|
69
76
|
}
|
|
70
77
|
destroy() {
|
|
71
78
|
this.app && this.app.unmount();
|
|
72
79
|
}
|
|
73
|
-
eq(
|
|
74
|
-
return
|
|
80
|
+
eq(e) {
|
|
81
|
+
return e instanceof c && e.variableName === this.variableName;
|
|
75
82
|
}
|
|
76
83
|
ignoreEvent() {
|
|
77
84
|
return !1;
|
|
78
85
|
}
|
|
79
86
|
}
|
|
80
|
-
const
|
|
87
|
+
const P = (n) => x.fromClass(
|
|
81
88
|
class {
|
|
82
|
-
constructor(
|
|
83
|
-
|
|
84
|
-
this.decorations = this.buildDecorations(
|
|
89
|
+
constructor(t) {
|
|
90
|
+
l(this, "decorations");
|
|
91
|
+
this.decorations = this.buildDecorations(t);
|
|
85
92
|
}
|
|
86
|
-
update(
|
|
87
|
-
(
|
|
93
|
+
update(t) {
|
|
94
|
+
(t.docChanged || t.viewportChanged) && (this.decorations = this.buildDecorations(t.view));
|
|
88
95
|
}
|
|
89
|
-
buildDecorations(
|
|
90
|
-
const
|
|
91
|
-
for (const { from: a, to:
|
|
92
|
-
const
|
|
93
|
-
let
|
|
94
|
-
for (; (
|
|
95
|
-
const
|
|
96
|
-
|
|
96
|
+
buildDecorations(t) {
|
|
97
|
+
const e = new y();
|
|
98
|
+
for (const { from: a, to: i } of t.visibleRanges) {
|
|
99
|
+
const s = t.state.doc.sliceString(a, i);
|
|
100
|
+
let r;
|
|
101
|
+
for (; (r = g.exec(s)) !== null; ) {
|
|
102
|
+
const d = a + r.index, m = d + r[0].length, p = r[1];
|
|
103
|
+
e.add(
|
|
104
|
+
d,
|
|
97
105
|
m,
|
|
98
|
-
u,
|
|
99
106
|
w.widget({
|
|
100
|
-
widget: new
|
|
101
|
-
|
|
107
|
+
widget: new c(
|
|
108
|
+
p,
|
|
102
109
|
n.environments,
|
|
103
|
-
n.
|
|
110
|
+
n.activeEnvVariables,
|
|
104
111
|
n.isReadOnly
|
|
105
112
|
),
|
|
106
113
|
side: 1
|
|
@@ -108,24 +115,24 @@ const $ = (n) => x.fromClass(
|
|
|
108
115
|
);
|
|
109
116
|
}
|
|
110
117
|
}
|
|
111
|
-
return
|
|
118
|
+
return e.finish();
|
|
112
119
|
}
|
|
113
120
|
},
|
|
114
121
|
{
|
|
115
|
-
decorations: (
|
|
122
|
+
decorations: (t) => t.decorations
|
|
116
123
|
}
|
|
117
|
-
),
|
|
118
|
-
keydown(n,
|
|
124
|
+
), T = N.domEventHandlers({
|
|
125
|
+
keydown(n, t) {
|
|
119
126
|
if (n.key === "Backspace") {
|
|
120
|
-
const { state:
|
|
121
|
-
if (a === 0 &&
|
|
122
|
-
return
|
|
123
|
-
changes: { from: 0, to:
|
|
127
|
+
const { state: e } = t, { from: a, to: i } = e.selection.main;
|
|
128
|
+
if (a === 0 && i === e.doc.length)
|
|
129
|
+
return t.dispatch({
|
|
130
|
+
changes: { from: 0, to: e.doc.length },
|
|
124
131
|
selection: { anchor: 0 }
|
|
125
132
|
}), n.preventDefault(), !0;
|
|
126
|
-
if (a ===
|
|
127
|
-
return
|
|
128
|
-
changes: { from: a - 2, to:
|
|
133
|
+
if (a === i && a > 0 && e.doc.sliceString(a - 2, a) === "}}")
|
|
134
|
+
return t.dispatch({
|
|
135
|
+
changes: { from: a - 2, to: i },
|
|
129
136
|
selection: { anchor: a - 2 }
|
|
130
137
|
}), n.preventDefault(), !0;
|
|
131
138
|
}
|
|
@@ -133,6 +140,6 @@ const $ = (n) => x.fromClass(
|
|
|
133
140
|
}
|
|
134
141
|
});
|
|
135
142
|
export {
|
|
136
|
-
|
|
137
|
-
|
|
143
|
+
T as backspaceCommand,
|
|
144
|
+
P as pillPlugin
|
|
138
145
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
options?(_: {}): any;
|
|
4
|
+
submit?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
submit: () => void;
|
|
10
|
+
cancel: () => void;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}>>> & {
|
|
14
|
+
onSubmit?: (() => any) | undefined;
|
|
15
|
+
onCancel?: (() => any) | undefined;
|
|
16
|
+
}, {}, {}>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
25
|
+
type __VLS_TypePropsToOption<T> = {
|
|
26
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
|
+
} : {
|
|
29
|
+
type: import('vue').PropType<T[K]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=CommandActionForm.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionForm.vue"],"names":[],"mappings":"AAuDA,iBAAS,cAAc;qBA8DM,GAAG;qBACH,GAAG;oBACJ,GAAG;EAgB9B;AACD,QAAA,MAAM,eAAe;eAhGR,OAAO;;;;;eAAP,OAAO;;;;UAuGlB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as n, openBlock as i, createElementBlock as a, withKeys as d, withModifiers as l, createElementVNode as o, renderSlot as s, createVNode as r, unref as m, withCtx as p, createTextVNode as f } from "vue";
|
|
2
|
+
import { ScalarButton as u } from "@scalar/components";
|
|
3
|
+
const c = { class: "gap-3 rounded min-h-20 relative" }, b = { class: "flex gap-2" }, x = { class: "flex flex-1 max-h-8" }, $ = /* @__PURE__ */ n({
|
|
4
|
+
__name: "CommandActionForm",
|
|
5
|
+
props: {
|
|
6
|
+
disabled: { type: Boolean }
|
|
7
|
+
},
|
|
8
|
+
emits: ["submit", "cancel"],
|
|
9
|
+
setup(h) {
|
|
10
|
+
return (e, t) => (i(), a("form", {
|
|
11
|
+
class: "flex w-full flex-col gap-3",
|
|
12
|
+
onKeydown: t[0] || (t[0] = d(l(() => {
|
|
13
|
+
}, ["stop"]), ["enter"])),
|
|
14
|
+
onSubmit: t[1] || (t[1] = l((v) => e.$emit("submit"), ["prevent", "stop"]))
|
|
15
|
+
}, [
|
|
16
|
+
o("div", c, [
|
|
17
|
+
s(e.$slots, "default")
|
|
18
|
+
]),
|
|
19
|
+
o("div", b, [
|
|
20
|
+
o("div", x, [
|
|
21
|
+
s(e.$slots, "options")
|
|
22
|
+
]),
|
|
23
|
+
r(m(u), {
|
|
24
|
+
class: "max-h-8 text-xs p-0 px-3",
|
|
25
|
+
disabled: e.disabled,
|
|
26
|
+
type: "submit"
|
|
27
|
+
}, {
|
|
28
|
+
default: p(() => [
|
|
29
|
+
s(e.$slots, "submit", {}, () => [
|
|
30
|
+
f("Continue")
|
|
31
|
+
])
|
|
32
|
+
]),
|
|
33
|
+
_: 3
|
|
34
|
+
}, 8, ["disabled"])
|
|
35
|
+
])
|
|
36
|
+
], 32));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
$ as default
|
|
41
|
+
};
|