@scalar/api-client 2.18.4 → 2.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/dist/components/AddressBar/AddressBar.vue2.js +5 -5
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +6 -6
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +26 -28
- package/dist/components/ImportCollection/utils/get-openapi-version.d.ts.map +1 -1
- package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
- package/dist/components/ImportCollection/utils/import-collection.d.ts.map +1 -1
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +16 -16
- package/dist/components/Server/index.d.ts +1 -1
- package/dist/components/Server/index.d.ts.map +1 -1
- package/dist/components/Server/index.js +6 -6
- package/dist/components/SideNav/SideNav.vue.js +3 -3
- package/dist/components/Sidebar/index.d.ts +1 -2
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.d.ts +1 -1
- package/dist/hooks/useResponseBody.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.js +4 -4
- package/dist/hooks/useSidebar.d.ts +1 -1
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +5 -5
- package/dist/layouts/App/MainLayout.vue.js +4 -4
- package/dist/layouts/App/create-api-client-app.d.ts +12 -12
- package/dist/layouts/App/index.d.ts +1 -1
- package/dist/layouts/App/index.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +6 -6
- package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
- package/dist/layouts/Web/index.d.ts +1 -1
- package/dist/layouts/Web/index.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +12 -12
- package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
- package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +2 -2
- package/dist/libs/hot-keys.d.ts.map +1 -1
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/index.d.ts +14 -15
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +33 -33
- package/dist/libs/parse-curl.js +4 -4
- package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
- package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-body.js +1 -1
- package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-query-params.js +2 -1
- package/dist/libs/send-request/index.d.ts +1 -1
- package/dist/libs/send-request/index.d.ts.map +1 -1
- package/dist/libs/send-request/index.js +4 -4
- package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.js +4 -4
- package/dist/store/active-entities.d.ts +1 -1
- package/dist/store/collections.d.ts +1 -1
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +4 -4
- package/dist/store/environment.d.ts +1 -1
- package/dist/store/environment.d.ts.map +1 -1
- package/dist/store/environment.js +4 -4
- package/dist/store/import-spec.d.ts +2 -2
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +1 -1
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +6 -6
- package/dist/store/requests.d.ts +1 -1
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +8 -8
- package/dist/store/security-schemes.d.ts +1 -1
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +4 -4
- package/dist/store/servers.d.ts +1 -1
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +4 -4
- package/dist/store/store.d.ts +12 -12
- package/dist/store/tags.d.ts +1 -1
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +5 -5
- package/dist/store/workspace.d.ts +13 -13
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +7 -7
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -5
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +17 -16
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +3 -3
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +22 -22
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +14 -13
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.js +43 -41
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts +14 -0
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +14 -0
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +25 -0
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +17 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +10 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +29 -25
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +6 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +27 -23
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +12 -12
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +10 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +48 -39
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +49 -46
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +6 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +200 -115
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +44 -47
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +21 -17
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +8 -20
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +29 -40
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +11 -18
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
- package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -40
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +33 -18
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +106 -106
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +11 -14
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +43 -31
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +41 -0
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +25 -0
- package/dist/v2/blocks/request-block/helpers/group-by.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/group-by.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/group-by.js +6 -3
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts +13 -0
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +7 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +61 -63
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +2 -0
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/code-input/CodeInput.vue2.js +57 -51
- package/dist/v2/features/app/App.vue.js +6 -6
- package/dist/v2/features/app/app-events.d.ts +5 -9
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +143 -120
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +69 -71
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +5 -5
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +21 -22
- package/dist/v2/features/modal/index.d.ts +1 -1
- package/dist/v2/features/modal/index.d.ts.map +1 -1
- package/dist/v2/features/modal/index.js +4 -4
- package/dist/v2/features/modal/modal-events.d.ts +13 -0
- package/dist/v2/features/modal/modal-events.d.ts.map +1 -0
- package/dist/v2/features/modal/modal-events.js +31 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +30 -43
- package/dist/v2/workspace-events.d.ts +25 -0
- package/dist/v2/workspace-events.d.ts.map +1 -0
- package/dist/v2/workspace-events.js +199 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +3 -3
- package/dist/views/Environment/handle-drag.d.ts +1 -1
- package/dist/views/Environment/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +9 -9
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +4 -4
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +4 -4
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +5 -5
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +6 -6
- package/dist/views/Request/RequestSidebarItem.vue2.js +6 -6
- package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/index.d.ts +1 -1
- package/dist/views/Request/ResponseSection/index.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/index.js +4 -4
- package/dist/views/Request/consts/index.d.ts +2 -3
- package/dist/views/Request/consts/index.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.d.ts +1 -1
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.d.ts +1 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +14 -14
- package/dist/views/Request/libs/auth.d.ts +1 -1
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/index.d.ts +3 -3
- package/dist/views/Request/libs/index.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +1 -1
- package/dist/views/Request/libs/watch-mode.js +6 -6
- package/dist/views/Request/types/index.d.ts +1 -1
- package/dist/views/Request/types/index.d.ts.map +1 -1
- package/package.json +12 -12
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +0 -18
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +0 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +0 -39
- package/dist/v2/features/operation/helpers/get-operation-header.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.19.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#7828](https://github.com/scalar/scalar/pull/7828): fix: switch to upsert params due to race condition
|
|
8
|
+
- [#7814](https://github.com/scalar/scalar/pull/7814): fix: additional properties generate invalid example
|
|
9
|
+
|
|
10
|
+
#### Updated Dependencies
|
|
11
|
+
|
|
12
|
+
- **@scalar/workspace-store@0.25.1**
|
|
13
|
+
- [#7828](https://github.com/scalar/scalar/pull/7828): fix: switch to upsert params due to race condition
|
|
14
|
+
|
|
15
|
+
- **@scalar/oas-utils@0.6.22**
|
|
16
|
+
- [#7814](https://github.com/scalar/scalar/pull/7814): fix: additional properties generate invalid example
|
|
17
|
+
|
|
18
|
+
- **@scalar/sidebar@0.7.15**
|
|
19
|
+
|
|
20
|
+
- **@scalar/components@0.16.25**
|
|
21
|
+
|
|
22
|
+
- **@scalar/use-codemirror@0.13.19**
|
|
23
|
+
|
|
24
|
+
## 2.19.0
|
|
25
|
+
|
|
26
|
+
### Minor Changes
|
|
27
|
+
|
|
28
|
+
- [#7753](https://github.com/scalar/scalar/pull/7753): feat: default headers and global cookies
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- [#7821](https://github.com/scalar/scalar/pull/7821): Fix slot name for menu items
|
|
33
|
+
- [#7786](https://github.com/scalar/scalar/pull/7786): chore: refactor mutators in workspace store
|
|
34
|
+
- [#7806](https://github.com/scalar/scalar/pull/7806): fix: replace star with named exports
|
|
35
|
+
- [#7762](https://github.com/scalar/scalar/pull/7762): fix: only enable required parameters by default
|
|
36
|
+
|
|
37
|
+
#### Updated Dependencies
|
|
38
|
+
|
|
39
|
+
- **@scalar/workspace-store@0.25.0**
|
|
40
|
+
- [#7786](https://github.com/scalar/scalar/pull/7786): chore: refactor mutators in workspace store
|
|
41
|
+
- [#7753](https://github.com/scalar/scalar/pull/7753): feat: default headers and global cookies
|
|
42
|
+
- [#7763](https://github.com/scalar/scalar/pull/7763): fix: normalize securitySchemes 'scheme'
|
|
43
|
+
|
|
44
|
+
- **@scalar/components@0.16.24**
|
|
45
|
+
- [#7802](https://github.com/scalar/scalar/pull/7802): fix: Vue warning because of deprecated icon syntax
|
|
46
|
+
|
|
47
|
+
- **@scalar/json-magic@0.9.2**
|
|
48
|
+
- [#7763](https://github.com/scalar/scalar/pull/7763): fix: correctly execute onAfterNodeProcess for ref nodes
|
|
49
|
+
|
|
50
|
+
- **@scalar/postman-to-openapi@0.4.0**
|
|
51
|
+
- [#7571](https://github.com/scalar/scalar/pull/7571): feat: major refactor, improves everything, keeps all the data now
|
|
52
|
+
|
|
53
|
+
- **@scalar/oas-utils@0.6.21**
|
|
54
|
+
|
|
55
|
+
- **@scalar/sidebar@0.7.14**
|
|
56
|
+
|
|
57
|
+
- **@scalar/use-codemirror@0.13.18**
|
|
58
|
+
|
|
59
|
+
- **@scalar/openapi-parser@0.24.2**
|
|
60
|
+
|
|
3
61
|
## 2.18.4
|
|
4
62
|
|
|
5
63
|
### Patch Changes
|
|
@@ -5,9 +5,9 @@ import { ScalarIconPlay as T } from "@scalar/icons";
|
|
|
5
5
|
import D from "../CodeInput/CodeInput.vue.js";
|
|
6
6
|
import O from "../HttpMethod/HttpMethod.vue.js";
|
|
7
7
|
import P from "./AddressBarHistory.vue.js";
|
|
8
|
-
import K from "
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
8
|
+
import { useWorkspace as K } from "../../store/store.js";
|
|
9
|
+
import { useLayout as Q } from "../../hooks/useLayout.js";
|
|
10
|
+
import W from "../Server/ServerDropdown.vue.js";
|
|
11
11
|
const j = ["id"], F = { class: "address-bar-bg-states text-xxs group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg p-0.75 lg:order-none lg:max-w-[580px] lg:min-w-[580px] xl:max-w-[720px] xl:min-w-[720px]" }, G = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, J = { class: "z-context-plus flex gap-1" }, X = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, Y = {
|
|
12
12
|
"aria-hidden": "true",
|
|
13
13
|
class: "inline-flex items-center gap-1"
|
|
@@ -23,7 +23,7 @@ const j = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["importCurl"],
|
|
25
25
|
setup(e) {
|
|
26
|
-
const c = I(), { requestMutators: f, events: d } =
|
|
26
|
+
const c = I(), { requestMutators: f, events: d } = K(), { layout: m } = Q(), v = s(null), x = s(null), w = (t) => {
|
|
27
27
|
e.operation.path !== t && f.edit(e.operation.uid, "path", t);
|
|
28
28
|
};
|
|
29
29
|
z(
|
|
@@ -95,7 +95,7 @@ const j = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
|
|
|
95
95
|
}, null, 8, ["isEditable", "method"])
|
|
96
96
|
]),
|
|
97
97
|
l("div", X, [
|
|
98
|
-
e.collection.servers.length ? (b(), $(n(
|
|
98
|
+
e.collection.servers.length ? (b(), $(n(W), {
|
|
99
99
|
key: 0,
|
|
100
100
|
collection: e.collection,
|
|
101
101
|
layout: "client",
|
|
@@ -8,16 +8,16 @@ import { useActiveEntities as ee } from "../../store/active-entities.js";
|
|
|
8
8
|
import te from "./CommandActionForm.vue.js";
|
|
9
9
|
import oe from "./CommandActionInput.vue.js";
|
|
10
10
|
import ae from "./WatchModeToggle.vue.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { useWorkspace as le } from "../../store/store.js";
|
|
12
|
+
import { isPostmanCollection as P, getPostmanDocumentDetails as re, convertPostmanToOpenApi as V } from "../../libs/postman.js";
|
|
13
|
+
import { getOpenApiDocumentDetails as ne } from "../../libs/getOpenApiDocumentDetails.js";
|
|
13
14
|
import { isUrl as h } from "../../libs/isUrl.js";
|
|
14
|
-
import { useFileDialog as
|
|
15
|
-
import { useWorkspace as ie } from "../../store/store.js";
|
|
15
|
+
import { useFileDialog as ie } from "../../hooks/useFileDialog.js";
|
|
16
16
|
const se = { class: "flex justify-between" }, ce = { class: "flex w-full flex-row items-center justify-between gap-3" }, Pe = /* @__PURE__ */ J({
|
|
17
17
|
__name: "CommandPaletteImport",
|
|
18
18
|
emits: ["close", "back"],
|
|
19
19
|
setup(ue, { emit: T }) {
|
|
20
|
-
const C = T, _ = X(), { activeWorkspace: n, activeCollection: F } = ee(), { importSpecFile: k, importSpecFromUrl: W, events: N } =
|
|
20
|
+
const C = T, _ = X(), { activeWorkspace: n, activeCollection: F } = ee(), { importSpecFile: k, importSpecFromUrl: W, events: N } = le(), { toast: i } = Q(), s = q(), o = A(""), f = A(!0), a = x(() => P(o.value) ? re(o.value) : ne(o.value)), S = x(
|
|
21
21
|
() => a.value ? a.value.type : "json"
|
|
22
22
|
);
|
|
23
23
|
function w(e) {
|
|
@@ -29,7 +29,7 @@ const se = { class: "flex justify-between" }, ce = { class: "flex w-full flex-ro
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
const y = x(() => h(o.value)), $ = x(() => !!a.value), { open: B } =
|
|
32
|
+
const y = x(() => h(o.value)), $ = x(() => !!a.value), { open: B } = ie({
|
|
33
33
|
onChange: (e) => {
|
|
34
34
|
const t = e?.[0];
|
|
35
35
|
if (t) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropEventListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/DropEventListener.vue"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"DropEventListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/DropEventListener.vue"],"names":[],"mappings":";;;;;AAqVA,wBAMG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, ref as y, onMounted as x, onBeforeUnmount as h, createBlock as D, openBlock as p, Transition as E, withCtx as T, createElementBlock as _, createCommentVNode as L, createElementVNode as
|
|
1
|
+
import { defineComponent as g, ref as y, onMounted as x, onBeforeUnmount as h, createBlock as D, openBlock as p, Transition as E, withCtx as T, createElementBlock as _, createCommentVNode as L, createElementVNode as i, createVNode as C, unref as b } from "vue";
|
|
2
2
|
import { ScalarIcon as k } from "@scalar/components";
|
|
3
3
|
const A = {
|
|
4
4
|
key: 0,
|
|
@@ -7,51 +7,49 @@ const A = {
|
|
|
7
7
|
__name: "DropEventListener",
|
|
8
8
|
emits: ["input"],
|
|
9
9
|
setup(B, { emit: v }) {
|
|
10
|
-
const
|
|
11
|
-
let
|
|
10
|
+
const s = v, n = y(!1);
|
|
11
|
+
let a = 0;
|
|
12
12
|
x(() => {
|
|
13
|
-
document.addEventListener("dragenter",
|
|
13
|
+
document.addEventListener("dragenter", f), document.addEventListener("dragleave", c), document.addEventListener("dragover", u), document.addEventListener("drop", l);
|
|
14
14
|
}), h(() => {
|
|
15
|
-
document.removeEventListener("dragenter",
|
|
15
|
+
document.removeEventListener("dragenter", f), document.removeEventListener("dragover", u), document.removeEventListener("dragleave", c), document.removeEventListener("drop", l);
|
|
16
16
|
});
|
|
17
17
|
function d(e) {
|
|
18
18
|
return e.dataTransfer?.types.includes("text/html") ?? !1;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
if (e.preventDefault(),
|
|
20
|
+
function l(e) {
|
|
21
|
+
if (e.preventDefault(), n.value = !1, a = 0, !d(e) && e.dataTransfer) {
|
|
22
22
|
const t = e.dataTransfer.getData("text").replace(/^blob:/, "");
|
|
23
23
|
if (t)
|
|
24
|
-
|
|
24
|
+
s("input", t, null, "drop");
|
|
25
25
|
else if (e.dataTransfer.files.length > 0) {
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
26
|
+
const r = e.dataTransfer.files[0];
|
|
27
|
+
if (!r)
|
|
28
28
|
return;
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
29
|
+
const m = new FileReader();
|
|
30
|
+
m.onload = (o) => {
|
|
31
|
+
o.target && typeof o.target.result == "string" && s("input", o.target.result, null, "drop");
|
|
32
|
+
}, m.readAsText(r);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function u(e) {
|
|
37
37
|
e.preventDefault();
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
e.preventDefault(),
|
|
39
|
+
function c(e) {
|
|
40
|
+
e.preventDefault(), a--, a === 0 && (n.value = !1);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
if (e.preventDefault(),
|
|
42
|
+
function f(e) {
|
|
43
|
+
if (e.preventDefault(), a++, !d(e)) {
|
|
44
44
|
if (e.dataTransfer) {
|
|
45
45
|
const t = e.dataTransfer.items;
|
|
46
|
-
for (
|
|
47
|
-
const r = t[n];
|
|
46
|
+
for (const r of t)
|
|
48
47
|
if (r?.kind === "string" || r?.type?.includes("json") || r?.type?.includes("yml") || r?.type?.includes("yaml")) {
|
|
49
|
-
|
|
48
|
+
n.value = !0;
|
|
50
49
|
return;
|
|
51
50
|
}
|
|
52
|
-
}
|
|
53
51
|
}
|
|
54
|
-
|
|
52
|
+
n.value = !1;
|
|
55
53
|
}
|
|
56
54
|
}
|
|
57
55
|
return (e, t) => (p(), D(E, {
|
|
@@ -61,16 +59,16 @@ const A = {
|
|
|
61
59
|
leaveToClass: "opacity-0"
|
|
62
60
|
}, {
|
|
63
61
|
default: T(() => [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
n.value ? (p(), _("div", A, [
|
|
63
|
+
i("div", w, [
|
|
64
|
+
i("div", null, [
|
|
67
65
|
C(b(k), {
|
|
68
66
|
icon: "Download",
|
|
69
67
|
size: "xl",
|
|
70
68
|
thickness: "2"
|
|
71
69
|
})
|
|
72
70
|
]),
|
|
73
|
-
t[0] || (t[0] =
|
|
71
|
+
t[0] || (t[0] = i("div", { class: "text-c-1 m-4 text-center" }, " Drop your OpenAPI document here ", -1))
|
|
74
72
|
])
|
|
75
73
|
])) : L("", !0)
|
|
76
74
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-openapi-version.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/get-openapi-version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-openapi-version.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/get-openapi-version.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,kBAsCrD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Collection } from '@scalar/oas-utils/entities/spec';
|
|
2
|
-
import type { WorkspaceStore } from '../../../store/index.js';
|
|
3
2
|
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
3
|
+
import type { WorkspaceStore } from '../../../store/index.js';
|
|
4
4
|
export declare function importCollection({ store, workspace, source, watchMode, onSuccess, onError, }: {
|
|
5
5
|
store: WorkspaceStore;
|
|
6
6
|
workspace: Workspace | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-collection.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/import-collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"import-collection.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/import-collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAGrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,wBAAsB,gBAAgB,CAAC,EACrC,KAAK,EACL,SAAS,EACT,MAAM,EACN,SAAS,EACT,SAAS,EACT,OAAO,GACR,EAAE;IACD,KAAK,EAAE,cAAc,CAAA;IACrB,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,KAAK,IAAI,CAAA;IACvD,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAChC,iBAuBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAE9D,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAQ/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAMd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM,GAAG,SAAS;;;iCAmHU,UAAU;eAxHrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM,GAAG,SAAS;MAmH8B;sBApDjC,IAAI;;;uCAae,IAAI,GAAG,MAAM;;mCArDjB,OAAO,EAAE;EAyHhD"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { isDefined as k, shouldIgnoreEntity as I } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import F from "fuse.js";
|
|
3
|
+
import { ref as l, watch as S, computed as y, nextTick as H } from "vue";
|
|
4
|
+
import { useRouter as L } from "vue-router";
|
|
5
|
+
import { PathId as T } from "../../routes.js";
|
|
6
|
+
import { useActiveEntities as M } from "../../store/active-entities.js";
|
|
7
7
|
import { useWorkspace as P } from "../../store/store.js";
|
|
8
8
|
function N() {
|
|
9
|
-
const h =
|
|
9
|
+
const h = L(), { activeWorkspace: W, activeWorkspaceRequests: f, activeWorkspaceCollections: b } = M(), { requests: E, tags: w } = P(), n = l([]), c = l([]), s = l(0), o = l(""), r = l(null), m = l([]), p = new F(n.value, {
|
|
10
10
|
keys: ["title", "description", "body"]
|
|
11
11
|
}), x = () => {
|
|
12
12
|
o.value = "", s.value = 0, c.value = [], r.value instanceof HTMLInputElement && r.value.blur();
|
|
13
13
|
}, d = (e) => {
|
|
14
|
-
n.value = e.filter((t) => !
|
|
14
|
+
n.value = e.filter((t) => !I(t)).filter((t) => !!!b.value?.find(
|
|
15
15
|
(a) => a.requests.includes(t.uid)
|
|
16
|
-
)?.tags.map((a) => w[a]).filter(
|
|
16
|
+
)?.tags.map((a) => w[a]).filter(k).filter((a) => t.tags?.includes(a.name)).filter((a) => I(a)).length).map((t) => ({
|
|
17
17
|
id: t.uid,
|
|
18
18
|
title: t.summary ?? t.method,
|
|
19
19
|
description: t.description ?? "",
|
|
@@ -22,20 +22,20 @@ function N() {
|
|
|
22
22
|
link: h?.resolve({
|
|
23
23
|
name: "request",
|
|
24
24
|
params: {
|
|
25
|
-
[
|
|
26
|
-
[
|
|
25
|
+
[T.Request]: t.uid,
|
|
26
|
+
[T.Workspace]: W.value?.uid
|
|
27
27
|
}
|
|
28
28
|
})?.href
|
|
29
29
|
})), p.setCollection(n.value);
|
|
30
30
|
}, R = () => {
|
|
31
31
|
s.value = 0, c.value = p.search(o.value);
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
S(o, (e) => {
|
|
34
34
|
e.length ? R() : c.value = [];
|
|
35
35
|
});
|
|
36
36
|
const A = (e) => {
|
|
37
37
|
const t = e === "up" ? -1 : 1, i = u.value.length;
|
|
38
|
-
s.value = (s.value + t + i) % i,
|
|
38
|
+
s.value = (s.value + t + i) % i, H(() => {
|
|
39
39
|
const v = m.value[s.value];
|
|
40
40
|
v instanceof HTMLElement && v.scrollIntoView({
|
|
41
41
|
behavior: "smooth",
|
|
@@ -47,8 +47,8 @@ function N() {
|
|
|
47
47
|
const e = u.value[s.value];
|
|
48
48
|
e && g(e);
|
|
49
49
|
}
|
|
50
|
-
}, D =
|
|
51
|
-
|
|
50
|
+
}, D = y(() => f.value.map((e) => E[e]).filter(k));
|
|
51
|
+
S(
|
|
52
52
|
f,
|
|
53
53
|
() => {
|
|
54
54
|
d(D.value);
|
|
@@ -57,7 +57,7 @@ function N() {
|
|
|
57
57
|
);
|
|
58
58
|
const g = (e) => {
|
|
59
59
|
h.push(e.item.id), x();
|
|
60
|
-
}, u =
|
|
60
|
+
}, u = y(() => o.value.length === 0 ? n.value.map((e) => ({
|
|
61
61
|
item: e
|
|
62
62
|
})) : c.value);
|
|
63
63
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as ServerVariablesForm } from './ServerVariablesForm.vue.js';
|
|
2
1
|
export { default as ServerDropdown } from './ServerDropdown.vue.js';
|
|
3
2
|
export { default as ServerSelector } from './ServerSelector.vue.js';
|
|
3
|
+
export { default as ServerVariablesForm } from './ServerVariablesForm.vue.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { default as o } from "./
|
|
2
|
-
import { default as t } from "./
|
|
3
|
-
import { default as l } from "./
|
|
1
|
+
import { default as o } from "./ServerDropdown.vue.js";
|
|
2
|
+
import { default as t } from "./ServerSelector.vue.js";
|
|
3
|
+
import { default as l } from "./ServerVariablesForm.vue.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
o as ServerDropdown,
|
|
6
|
+
t as ServerSelector,
|
|
7
|
+
l as ServerVariablesForm
|
|
8
8
|
};
|
|
@@ -7,15 +7,15 @@ import B from "./DownloadAppButton.vue.js";
|
|
|
7
7
|
import E from "./SideHelp.vue.js";
|
|
8
8
|
import _ from "./SideNavGroup.vue.js";
|
|
9
9
|
import g from "./SideNavRouterLink.vue.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useLayout as N } from "../../hooks/useLayout.js";
|
|
11
|
+
import { useActiveEntities as V } from "../../store/active-entities.js";
|
|
12
12
|
const j = { class: "flex items-center" }, A = { class: "flex items-center" }, R = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "hidden items-center justify-center sm:ml-1.5 sm:flex"
|
|
15
15
|
}, J = /* @__PURE__ */ h({
|
|
16
16
|
__name: "SideNav",
|
|
17
17
|
setup(W) {
|
|
18
|
-
const { currentRoute: a } = S(), { layout: s } =
|
|
18
|
+
const { currentRoute: a } = S(), { layout: s } = N(), { activeWorkspace: l } = V();
|
|
19
19
|
return ($, p) => (r(), o("nav", {
|
|
20
20
|
"aria-label": "App Navigation",
|
|
21
21
|
class: f([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './Sidebar/index.js';
|
|
1
|
+
export { AddressBar } from './AddressBar/index.js';
|
|
3
2
|
export { default as OpenApiClientButton } from './OpenApiClientButton.vue.js';
|
|
3
|
+
export { Sidebar } from './Sidebar/index.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { type UseFileDialogOptions, useFileDialog } from './useFileDialog.js';
|
|
2
|
+
export { type ClientLayout, LAYOUT_SYMBOL, useLayout } from './useLayout.js';
|
|
3
3
|
export { useResponseBody } from './useResponseBody.js';
|
|
4
4
|
export { useSidebar } from './useSidebar.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,EAAE,KAAK,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResponseBody.d.ts","sourceRoot":"","sources":["../../src/hooks/useResponseBody.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useResponseBody.d.ts","sourceRoot":"","sources":["../../src/hooks/useResponseBody.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,OAAO,QAAQ,MAAM,iBAAiB,CAAA;AAItC;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,OAAO,EAAE,GAAG,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC,CAAA;CACnE;;;;EAmCA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { extractFilename as f } from "../libs/extractAttachmentFilename.js";
|
|
2
1
|
import { computed as n, isRef as c } from "vue";
|
|
3
|
-
import
|
|
2
|
+
import f from "whatwg-mimetype";
|
|
3
|
+
import { extractFilename as v } from "../libs/extractAttachmentFilename.js";
|
|
4
4
|
function R(t) {
|
|
5
5
|
const i = (a) => a instanceof Blob, e = n(() => c(t.data) ? t.data.value : t.data), u = n(() => c(t.headers) ? t.headers.value : t.headers), r = n(() => {
|
|
6
6
|
const a = u.value.find((o) => o.name.toLowerCase() === "content-type")?.value ?? "";
|
|
7
|
-
return new
|
|
7
|
+
return new f(a);
|
|
8
8
|
}), l = n(() => {
|
|
9
9
|
const a = u.value.find((o) => o.name.toLowerCase() === "content-disposition")?.value ?? "";
|
|
10
|
-
return
|
|
10
|
+
return v(a);
|
|
11
11
|
}), s = n(() => i(e.value) ? URL.createObjectURL(e.value) : typeof e.value == "string" ? URL.createObjectURL(new Blob([e.value], { type: r.value.toString() })) : e.value instanceof Object && Object.keys(e.value).length ? URL.createObjectURL(
|
|
12
12
|
new Blob([JSON.stringify(e.value)], {
|
|
13
13
|
type: r.value.toString()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ClientLayout } from '../hooks/useLayout.js';
|
|
2
1
|
import { type InjectionKey } from 'vue';
|
|
2
|
+
import type { ClientLayout } from '../hooks/useLayout.js';
|
|
3
3
|
type CollapsedSidebarFolders = Record<string, boolean>;
|
|
4
4
|
/** Creates the sidebar state so that it can be unique across instances of the client */
|
|
5
5
|
export declare const createSidebarState: ({ layout }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAmC,MAAM,KAAK,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,KAAK,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEtD,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,GAAI,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE;;;CAQtE,CAAA;AACD,eAAO,MAAM,cAAc,EAAe,YAAY,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAA;AAE7F,2CAA2C;AAC3C,eAAO,MAAM,UAAU;IAqBnB,YAAY;;;;;IAIZ,cAAc;qCAhBwB,MAAM,SAAS,OAAO;+BAG5B,MAAM;4BAGT,OAAO;;CAgBvC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export { ApiClientApp, createApiClientApp } from './layouts/App/index.js';
|
|
3
|
+
export { type ApiClient, createApiClientModal } from './layouts/Modal/index.js';
|
|
4
4
|
export { useWorkspace } from './store/store.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,KAAK,SAAS,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -10,8 +10,8 @@ import { useSidebar as V } from "../../hooks/useSidebar.js";
|
|
|
10
10
|
import O from "./MainLayout.vue.js";
|
|
11
11
|
import { useActiveEntities as $ } from "../../store/active-entities.js";
|
|
12
12
|
import { APP_HOTKEYS as g } from "./hotkeys.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { useWorkspace as R } from "../../store/store.js";
|
|
14
|
+
import { handleHotKeyDown as U, DEFAULT_HOTKEYS as W } from "../../libs/hot-keys.js";
|
|
15
15
|
const Y = {
|
|
16
16
|
id: "scalar-client-app",
|
|
17
17
|
class: "contents"
|
|
@@ -19,13 +19,13 @@ const Y = {
|
|
|
19
19
|
__name: "ApiClientApp",
|
|
20
20
|
emits: ["newTab"],
|
|
21
21
|
setup(I) {
|
|
22
|
-
const p = { ...
|
|
22
|
+
const p = { ...W, ...g }, i = y(null), u = (e) => {
|
|
23
23
|
i.value = e;
|
|
24
24
|
};
|
|
25
25
|
L();
|
|
26
|
-
const { activeWorkspace: a } = $(), { events: o } =
|
|
26
|
+
const { activeWorkspace: a } = $(), { events: o } = R();
|
|
27
27
|
v(() => N());
|
|
28
|
-
const l = (e) =>
|
|
28
|
+
const l = (e) => U(e, o.hotKeys, { hotKeys: p }), c = (e) => {
|
|
29
29
|
e && e.openCommandPalette && (e.openCommandPalette.preventDefault(), o.commandPalette.emit());
|
|
30
30
|
};
|
|
31
31
|
K(() => {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as s, createElementBlock as n, openBlock as t, normalizeClass as r, unref as e, createVNode as m, createElementVNode as a, renderSlot as f } from "vue";
|
|
2
2
|
import c from "../../components/SideNav/SideNav.vue.js";
|
|
3
|
-
import d from "../../
|
|
4
|
-
import
|
|
3
|
+
import { useLayout as d } from "../../hooks/useLayout.js";
|
|
4
|
+
import i from "../../components/CommandPalette/TheCommandPalette.vue.js";
|
|
5
5
|
const k = /* @__PURE__ */ s({
|
|
6
6
|
__name: "MainLayout",
|
|
7
7
|
setup(u) {
|
|
8
|
-
const { layout: o } =
|
|
8
|
+
const { layout: o } = d();
|
|
9
9
|
return (l, p) => (t(), n("main", {
|
|
10
10
|
class: r(["flex min-h-0 flex-1 flex-col", e(o) === "web" ? "sm:flex-col" : "sm:flex-row"])
|
|
11
11
|
}, [
|
|
12
12
|
m(c, { class: "sidenav order-last sm:order-none" }),
|
|
13
|
-
m(e(
|
|
13
|
+
m(e(i)),
|
|
14
14
|
a("div", {
|
|
15
15
|
class: r(["flex min-h-0 min-w-0 flex-1 flex-col", {
|
|
16
16
|
"border sm:mr-1.5 sm:mb-1.5 sm:rounded-lg sm:*:rounded-lg": e(o) === "desktop"
|