@scalar/api-client 2.3.14 → 2.3.16
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 +16 -0
- package/dist/components/DataTable/DataTable.vue.d.ts +2 -0
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.js +17 -15
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +6 -9
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +68 -23
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +41 -54
- package/dist/components/ImportCollection/utils/import-collection.d.ts +12 -0
- package/dist/components/ImportCollection/utils/import-collection.d.ts.map +1 -0
- package/dist/components/ImportCollection/utils/import-collection.js +29 -0
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +6 -0
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts.map +1 -0
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +7 -0
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +11 -8
- package/dist/components/ScalarHotkey.test.d.ts +2 -0
- package/dist/components/ScalarHotkey.test.d.ts.map +1 -0
- package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
- package/dist/components/ScalarHotkey.vue.js +34 -11
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/style.css +1 -1
- 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 +39 -36
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +2 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +4 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +4 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +19 -16
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +67 -64
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -0
- 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 +123 -126
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +72 -69
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +53 -35
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts +5 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +56 -59
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +53 -35
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +5 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +40 -34
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.3.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 27f1c16: fix: displays request sidebar ascii art if getting started only
|
|
8
|
+
- 27f1c16: fix: adds inert attribute to ascii art
|
|
9
|
+
- d970ff5: fix: remove useActiveEntity useage in response
|
|
10
|
+
|
|
11
|
+
## 2.3.15
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- ce91adc: fix(api-client): don't set html background from client
|
|
16
|
+
- 61e094b: fix(api-client): improve request table header a11y
|
|
17
|
+
- e7fb3eb: feat: skip the import modal when the workspace is empty
|
|
18
|
+
|
|
3
19
|
## 2.3.14
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTable.vue"],"names":[],"mappings":"AA0CA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAA;IAC/B,0BAA0B;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAC;AASF,iBAAS,cAAc;WAuDT,OAAO,IAA6B;;yBATrB,GAAG;yBACH,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAUpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as r, openBlock as o, createElementBlock as l, normalizeProps as n, guardReactiveProps as i, unref as m, createElementVNode as p, normalizeClass as c, normalizeStyle as u, renderSlot as t, createCommentVNode as d } from "vue";
|
|
2
2
|
import { useBindCx as f } from "@scalar/components";
|
|
3
|
-
const b = {
|
|
3
|
+
const b = ["role"], y = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "sr-only"
|
|
6
|
-
},
|
|
6
|
+
}, _ = /* @__PURE__ */ r({
|
|
7
7
|
__name: "DataTable",
|
|
8
8
|
props: {
|
|
9
9
|
columns: {},
|
|
10
|
-
scroll: { type: Boolean }
|
|
10
|
+
scroll: { type: Boolean },
|
|
11
|
+
presentational: { type: Boolean }
|
|
11
12
|
},
|
|
12
13
|
setup(v) {
|
|
13
14
|
const { cx: a } = f();
|
|
14
|
-
return (
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
return (e, w) => (o(), l("div", n(i(
|
|
16
|
+
m(a)(
|
|
17
|
+
e.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible",
|
|
17
18
|
"scalar-data-table bg-b-1"
|
|
18
19
|
)
|
|
19
20
|
)), [
|
|
20
|
-
|
|
21
|
-
class:
|
|
21
|
+
p("table", {
|
|
22
|
+
class: c(["mb-0 grid min-h-8 auto-rows-auto", { "w-max min-w-full": e.scroll }]),
|
|
23
|
+
role: e.presentational ? "presentation" : "table",
|
|
22
24
|
style: u({
|
|
23
|
-
gridTemplateColumns:
|
|
25
|
+
gridTemplateColumns: e.columns.map((s) => s || "1fr").join(" ")
|
|
24
26
|
})
|
|
25
27
|
}, [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
e.$slots.caption ? (o(), l("caption", y, [
|
|
29
|
+
t(e.$slots, "caption")
|
|
28
30
|
])) : d("", !0),
|
|
29
|
-
|
|
30
|
-
],
|
|
31
|
+
t(e.$slots, "default")
|
|
32
|
+
], 14, b)
|
|
31
33
|
], 16));
|
|
32
34
|
}
|
|
33
35
|
});
|
|
34
36
|
export {
|
|
35
|
-
|
|
37
|
+
_ as default
|
|
36
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAIpC,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACxB,CAAC;AAeJ,iBAAS,cAAc;WAiDT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;QAjFZ,MAAM,GAAG,SAAS;6EAwFzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAepG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as t, openBlock as o, createBlock as a, resolveDynamicComponent as
|
|
1
|
+
import { defineComponent as t, openBlock as o, createBlock as a, resolveDynamicComponent as n, mergeProps as s, unref as l, withCtx as p, renderSlot as d } from "vue";
|
|
2
2
|
import { useBindCx as m } from "@scalar/components";
|
|
3
3
|
const f = /* @__PURE__ */ t({
|
|
4
4
|
inheritAttrs: !1,
|
|
@@ -7,18 +7,15 @@ const f = /* @__PURE__ */ t({
|
|
|
7
7
|
is: { default: "td" }
|
|
8
8
|
},
|
|
9
9
|
setup(b) {
|
|
10
|
-
const { cx:
|
|
11
|
-
return (
|
|
12
|
-
|
|
10
|
+
const { cx: e } = m();
|
|
11
|
+
return (r, i) => (o(), a(n(r.is), s(
|
|
12
|
+
l(e)(
|
|
13
13
|
"box-content max-h-8 min-h-8 min-w-8 border-l-0 border-t border-b-0 border-r flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative"
|
|
14
14
|
),
|
|
15
|
-
{
|
|
16
|
-
class: "group-[.alert]:bg-b-alert group-[.error]:bg-b-danger",
|
|
17
|
-
role: "cell"
|
|
18
|
-
}
|
|
15
|
+
{ class: "group-[.alert]:bg-b-alert group-[.error]:bg-b-danger" }
|
|
19
16
|
), {
|
|
20
17
|
default: p(() => [
|
|
21
|
-
d(
|
|
18
|
+
d(r.$slots, "default")
|
|
22
19
|
]),
|
|
23
20
|
_: 3
|
|
24
21
|
}, 16));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportCollectionListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionListener.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImportCollectionListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionListener.vue"],"names":[],"mappings":"AAmQA,iBAAS,cAAc;WAqHT,OAAO,IAA6B;;yBARpB,GAAG;;;;EAahC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,33 +1,78 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as I, ref as l, openBlock as k, createElementBlock as y, Fragment as w, createVNode as r, renderSlot as g, nextTick as h } from "vue";
|
|
2
|
+
import { useToasts as C } from "@scalar/use-toasts";
|
|
3
|
+
import { useRouter as T } from "vue-router";
|
|
4
|
+
import { workspaceStoreIsEmpty as $ } from "./utils/workspace-store-is-empty.js";
|
|
5
|
+
import { useActiveEntities as q } from "../../store/active-entities.js";
|
|
6
|
+
import E from "./DropEventListener.vue.js";
|
|
7
|
+
import F from "./ImportCollectionModal.vue.js";
|
|
4
8
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
9
|
+
import W from "./PasteEventListener.vue.js";
|
|
10
|
+
import x from "./UrlQueryParameterChecker.vue.js";
|
|
11
|
+
import { importCollection as B } from "./utils/import-collection.js";
|
|
12
|
+
import { useWorkspace as M } from "../../store/store.js";
|
|
13
|
+
const J = /* @__PURE__ */ I({
|
|
8
14
|
__name: "ImportCollectionListener",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
async function
|
|
12
|
-
|
|
15
|
+
setup(N) {
|
|
16
|
+
const m = M(), n = l(null), s = l(null), a = l(null);
|
|
17
|
+
async function p() {
|
|
18
|
+
n.value = null, s.value = null, a.value = null, await h();
|
|
13
19
|
}
|
|
14
|
-
async function
|
|
15
|
-
await
|
|
20
|
+
async function i(e, t = null, o) {
|
|
21
|
+
if (await p(), $(m)) {
|
|
22
|
+
if (console.info("Workspace store is empty, directly importing:", e), await d(e))
|
|
23
|
+
return;
|
|
24
|
+
console.warn("Failed to import the collection from:", e);
|
|
25
|
+
}
|
|
26
|
+
n.value = e, s.value = t, a.value = o;
|
|
16
27
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
const f = T(), { activeWorkspace: c } = q(), { toast: u } = C();
|
|
29
|
+
async function d(e) {
|
|
30
|
+
return e ? new Promise((t) => {
|
|
31
|
+
B({
|
|
32
|
+
store: m,
|
|
33
|
+
workspace: c.value,
|
|
34
|
+
source: e,
|
|
35
|
+
// Use watch mode by default.
|
|
36
|
+
watchMode: !0,
|
|
37
|
+
onSuccess(o) {
|
|
38
|
+
if (o) {
|
|
39
|
+
_(o), u("Import successful", "info"), t(!0);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
u("Import failed: No collection was created", "error"), t(!1);
|
|
43
|
+
},
|
|
44
|
+
onError(o) {
|
|
45
|
+
console.error("[importCollection]", o);
|
|
46
|
+
const v = (o == null ? void 0 : o.message) || "Unknown error";
|
|
47
|
+
u(`Import failed: ${v}`, "error"), t(!1);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}) : !1;
|
|
51
|
+
}
|
|
52
|
+
function _(e) {
|
|
53
|
+
var t;
|
|
54
|
+
e && f.push({
|
|
55
|
+
name: "request",
|
|
56
|
+
params: {
|
|
57
|
+
workspace: (t = c.value) == null ? void 0 : t.uid,
|
|
58
|
+
request: e == null ? void 0 : e.requests[0]
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return (e, t) => (k(), y(w, null, [
|
|
63
|
+
r(F, {
|
|
64
|
+
eventType: a.value,
|
|
65
|
+
integration: s.value,
|
|
66
|
+
source: n.value,
|
|
67
|
+
onImportFinished: p
|
|
23
68
|
}, null, 8, ["eventType", "integration", "source"]),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
69
|
+
r(W, { onInput: i }),
|
|
70
|
+
r(E, { onInput: i }),
|
|
71
|
+
r(x, { onInput: i }),
|
|
72
|
+
g(e.$slots, "default")
|
|
28
73
|
], 64));
|
|
29
74
|
}
|
|
30
75
|
});
|
|
31
76
|
export {
|
|
32
|
-
|
|
77
|
+
J as default
|
|
33
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportNowButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportNowButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImportNowButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportNowButton.vue"],"names":[],"mappings":"AA2GA,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;AAqKF,wBAOG"}
|
|
@@ -1,87 +1,74 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { useToasts as
|
|
4
|
-
import { useRouter as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useWorkspace as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as y, openBlock as o, createElementBlock as C, Fragment as h, createBlock as u, unref as a, withCtx as m, createTextVNode as p, createCommentVNode as v } from "vue";
|
|
2
|
+
import { ScalarButton as c } from "@scalar/components";
|
|
3
|
+
import { useToasts as b } from "@scalar/use-toasts";
|
|
4
|
+
import { useRouter as g } from "vue-router";
|
|
5
|
+
import { useActiveEntities as x } from "../../store/active-entities.js";
|
|
6
|
+
import { importCollection as B } from "./utils/import-collection.js";
|
|
7
|
+
import { useWorkspace as I } from "../../store/store.js";
|
|
8
|
+
const R = /* @__PURE__ */ y({
|
|
9
9
|
__name: "ImportNowButton",
|
|
10
10
|
props: {
|
|
11
11
|
source: {},
|
|
12
12
|
variant: {},
|
|
13
|
-
watchMode: { type: Boolean }
|
|
13
|
+
watchMode: { type: Boolean, default: !0 }
|
|
14
14
|
},
|
|
15
15
|
emits: ["importFinished"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
async function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
e || p(s == null ? void 0 : s.collection);
|
|
32
|
-
} else {
|
|
33
|
-
const e = await x(
|
|
34
|
-
r.source,
|
|
35
|
-
((m = n.value) == null ? void 0 : m.uid) ?? ""
|
|
36
|
-
);
|
|
37
|
-
p(e == null ? void 0 : e.collection);
|
|
38
|
-
}
|
|
39
|
-
u("Import successful", "info"), h("importFinished");
|
|
16
|
+
setup(r, { emit: f }) {
|
|
17
|
+
const d = f, l = g(), k = I(), { activeWorkspace: s } = x(), { toast: n } = b();
|
|
18
|
+
async function i() {
|
|
19
|
+
B({
|
|
20
|
+
store: k,
|
|
21
|
+
workspace: s.value,
|
|
22
|
+
source: r.source,
|
|
23
|
+
watchMode: r.watchMode,
|
|
24
|
+
onSuccess(t) {
|
|
25
|
+
t && (w(t), n("Import successful", "info"), d("importFinished"));
|
|
26
|
+
},
|
|
27
|
+
onError(t) {
|
|
28
|
+
console.error("[importCollection]", t);
|
|
29
|
+
const e = (t == null ? void 0 : t.message) || "Unknown error";
|
|
30
|
+
n(`Import failed: ${e}`, "error");
|
|
40
31
|
}
|
|
41
|
-
}
|
|
42
|
-
console.error("[importCollection]", e);
|
|
43
|
-
const s = (e == null ? void 0 : e.message) || "Unknown error";
|
|
44
|
-
u(`Import failed: ${s}`, "error");
|
|
45
|
-
}
|
|
32
|
+
});
|
|
46
33
|
}
|
|
47
|
-
function
|
|
48
|
-
var
|
|
49
|
-
|
|
34
|
+
function w(t) {
|
|
35
|
+
var e;
|
|
36
|
+
t && l.push({
|
|
50
37
|
name: "request",
|
|
51
38
|
params: {
|
|
52
|
-
workspace: (
|
|
53
|
-
request:
|
|
39
|
+
workspace: (e = s.value) == null ? void 0 : e.uid,
|
|
40
|
+
request: t == null ? void 0 : t.requests[0]
|
|
54
41
|
}
|
|
55
42
|
});
|
|
56
43
|
}
|
|
57
|
-
return (
|
|
58
|
-
|
|
44
|
+
return (t, e) => t.source ? (o(), C(h, { key: 0 }, [
|
|
45
|
+
t.variant === "button" ? (o(), u(a(c), {
|
|
59
46
|
key: 0,
|
|
60
47
|
class: "mt-3 h-fit w-full rounded-lg px-6 py-2.5 font-bold",
|
|
61
48
|
size: "md",
|
|
62
49
|
type: "button",
|
|
63
|
-
onClick:
|
|
50
|
+
onClick: i
|
|
64
51
|
}, {
|
|
65
|
-
default:
|
|
66
|
-
|
|
52
|
+
default: m(() => e[0] || (e[0] = [
|
|
53
|
+
p(" Import Collection ")
|
|
67
54
|
])),
|
|
68
55
|
_: 1
|
|
69
|
-
})) : (
|
|
56
|
+
})) : (o(), u(a(c), {
|
|
70
57
|
key: 1,
|
|
71
58
|
class: "h-fit rounded-lg px-6 py-2.5 text-[21px] font-bold",
|
|
72
59
|
size: "md",
|
|
73
60
|
type: "button",
|
|
74
61
|
variant: "ghost",
|
|
75
|
-
onClick:
|
|
62
|
+
onClick: i
|
|
76
63
|
}, {
|
|
77
|
-
default:
|
|
78
|
-
|
|
64
|
+
default: m(() => e[1] || (e[1] = [
|
|
65
|
+
p(" Try it in the browser ")
|
|
79
66
|
])),
|
|
80
67
|
_: 1
|
|
81
68
|
}))
|
|
82
|
-
], 64)) :
|
|
69
|
+
], 64)) : v("", !0);
|
|
83
70
|
}
|
|
84
71
|
});
|
|
85
72
|
export {
|
|
86
|
-
|
|
73
|
+
R as default
|
|
87
74
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Collection } from '@scalar/oas-utils/entities/spec';
|
|
2
|
+
import type { WorkspaceStore } from '../../../store';
|
|
3
|
+
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
4
|
+
export declare function importCollection({ store, workspace, source, watchMode, onSuccess, onError, }: {
|
|
5
|
+
store: WorkspaceStore;
|
|
6
|
+
workspace: Workspace | undefined;
|
|
7
|
+
source: string | null | undefined;
|
|
8
|
+
watchMode: boolean;
|
|
9
|
+
onSuccess: (collection: Collection | undefined) => void;
|
|
10
|
+
onError: (error: Error) => void;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=import-collection.d.ts.map
|
|
@@ -0,0 +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;AAGjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,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"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { isUrl as f } from "./isUrl.js";
|
|
2
|
+
async function U({
|
|
3
|
+
store: t,
|
|
4
|
+
workspace: i,
|
|
5
|
+
source: o,
|
|
6
|
+
watchMode: n,
|
|
7
|
+
onSuccess: m,
|
|
8
|
+
onError: p
|
|
9
|
+
}) {
|
|
10
|
+
try {
|
|
11
|
+
if (o && i) {
|
|
12
|
+
if (f(o)) {
|
|
13
|
+
const [c, l] = await t.importSpecFromUrl(o, i.uid, {
|
|
14
|
+
proxyUrl: i.proxyUrl,
|
|
15
|
+
watchMode: n
|
|
16
|
+
});
|
|
17
|
+
c || m(l == null ? void 0 : l.collection);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const r = await t.importSpecFile(o, i.uid);
|
|
21
|
+
m(r == null ? void 0 : r.collection);
|
|
22
|
+
}
|
|
23
|
+
} catch (r) {
|
|
24
|
+
p(r);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
U as importCollection
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-store-is-empty.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/workspace-store-is-empty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,WAK1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarAsciiArt.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarAsciiArt.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarAsciiArt.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarAsciiArt.vue"],"names":[],"mappings":"AAqEA,KAAK,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;;AA0FtD,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ScalarAsciiArt.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-69ebd973"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as h, computed as f, openBlock as i, createElementBlock as
|
|
2
|
-
const p = 500,
|
|
1
|
+
import { defineComponent as h, computed as f, openBlock as i, createElementBlock as o, normalizeClass as y, Fragment as v, renderList as x, normalizeStyle as m, createElementVNode as $, toDisplayString as k } from "vue";
|
|
2
|
+
const p = 500, l = 100, B = /* @__PURE__ */ h({
|
|
3
3
|
__name: "ScalarAsciiArt",
|
|
4
4
|
props: {
|
|
5
5
|
art: {},
|
|
@@ -10,16 +10,19 @@ const p = 500, o = 100, B = /* @__PURE__ */ h({
|
|
|
10
10
|
`)), g = (a, s) => {
|
|
11
11
|
var e, t, r, c;
|
|
12
12
|
return {
|
|
13
|
-
animationDuration: `${a *
|
|
13
|
+
animationDuration: `${a * l}ms, ${p}ms`,
|
|
14
14
|
animationTimingFunction: `steps(${a}), step-end`,
|
|
15
|
-
animationDelay: `${s *
|
|
16
|
-
animationIterationCount: `1, ${((((e = n.value) == null ? void 0 : e.length) ?? 0) + (((c = (r = n.value) == null ? void 0 : r[((t = n.value) == null ? void 0 : t.length) - 1]) == null ? void 0 : c.length) ?? 0) + 5) *
|
|
15
|
+
animationDelay: `${s * l}ms, 0ms`,
|
|
16
|
+
animationIterationCount: `1, ${((((e = n.value) == null ? void 0 : e.length) ?? 0) + (((c = (r = n.value) == null ? void 0 : r[((t = n.value) == null ? void 0 : t.length) - 1]) == null ? void 0 : c.length) ?? 0) + 5) * l / p}`
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
return (a, s) => (i(),
|
|
20
|
-
|
|
19
|
+
return (a, s) => (i(), o("div", {
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
class: y(["ascii-art font-code flex flex-col items-start text-[6px] leading-[7px]", { "ascii-art-animate": a.animate }]),
|
|
22
|
+
role: "presentation",
|
|
23
|
+
inert: ""
|
|
21
24
|
}, [
|
|
22
|
-
(i(!0),
|
|
25
|
+
(i(!0), o(v, null, x(n.value, (e, t) => (i(), o("span", {
|
|
23
26
|
key: t,
|
|
24
27
|
class: "inline-block",
|
|
25
28
|
style: m({ width: `calc(${e.length + 1}ch)` })
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarHotkey.test.d.ts","sourceRoot":"","sources":["../../src/components/ScalarHotkey.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarHotkey.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarHotkey.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarHotkey.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarHotkey.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AAM3E,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,eAAe,CAAA;CAC3B,CAAC;;AAsGF,wBAOG"}
|
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useBindCx as
|
|
3
|
-
import { isMacOS as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as u, computed as i, openBlock as p, createElementBlock as y, normalizeProps as h, guardReactiveProps as b, unref as k, createElementVNode as a, toDisplayString as s } from "vue";
|
|
2
|
+
import { useBindCx as x } from "@scalar/components";
|
|
3
|
+
import { isMacOS as r } from "@scalar/use-tooltip";
|
|
4
|
+
const C = { "aria-hidden": "true" }, w = { class: "sr-only" }, A = /* @__PURE__ */ u({
|
|
5
5
|
__name: "ScalarHotkey",
|
|
6
6
|
props: {
|
|
7
7
|
hotkey: {},
|
|
8
|
-
modifier: {}
|
|
8
|
+
modifier: { default: () => ["Meta"] }
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
setup(e) {
|
|
11
|
+
const d = {
|
|
12
|
+
"⌘": "Command",
|
|
13
|
+
"^": "Control",
|
|
14
|
+
"⌥": "Option",
|
|
15
|
+
"⇧": "Shift",
|
|
16
|
+
"⇪": "Caps Lock",
|
|
17
|
+
"↵": "Enter",
|
|
18
|
+
"←": "Left Arrow",
|
|
19
|
+
"→": "Right Arrow",
|
|
20
|
+
"↑": "Up Arrow",
|
|
21
|
+
"↓": "Down Arrow"
|
|
22
|
+
}, c = {
|
|
23
|
+
Meta: r() ? "⌘" : "^",
|
|
24
|
+
default: r() ? "⌘" : "^",
|
|
25
|
+
Shift: "⇧",
|
|
26
|
+
Alt: "⌥",
|
|
27
|
+
Control: "^"
|
|
28
|
+
}, { cx: m } = x(), l = i(() => `${e.modifier.map((o) => c[o]).join("+")} ${e.hotkey}`), f = i(() => {
|
|
29
|
+
const t = e.modifier.map((n) => n === "Meta" ? r() ? "Command" : "Control" : n).join("+"), o = d[e.hotkey] ?? e.hotkey;
|
|
30
|
+
return `${t} ${o}`;
|
|
31
|
+
});
|
|
32
|
+
return (t, o) => (p(), y("div", h(b(
|
|
33
|
+
k(m)(
|
|
14
34
|
"border-b-3 inline-block overflow-hidden rounded border-1/2 text-xxs rounded-b px-1 font-medium uppercase"
|
|
15
35
|
)
|
|
16
|
-
)),
|
|
36
|
+
)), [
|
|
37
|
+
a("span", C, s(l.value), 1),
|
|
38
|
+
a("span", w, s(f.value), 1)
|
|
39
|
+
], 16));
|
|
17
40
|
}
|
|
18
41
|
});
|
|
19
42
|
export {
|
|
20
|
-
|
|
43
|
+
A as default
|
|
21
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cAiK8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA0LjD,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/Modal/ApiClientModal.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/Modal/ApiClientModal.vue"],"names":[],"mappings":";AAwaA,wBAMG"}
|
|
@@ -2,7 +2,7 @@ import o from "./ApiClientModal.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2835f298"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientWeb.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/Web/ApiClientWeb.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ApiClientWeb.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/Web/ApiClientWeb.vue"],"names":[],"mappings":";AA0RA,wBAKG"}
|