@scalar/api-client 2.2.56 → 2.2.59

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.
Files changed (86) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBarHistory.vue2.js +53 -54
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  8. package/dist/components/CodeInput/CodeInput.vue2.js +93 -81
  9. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +5 -19
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  11. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  12. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +154 -129
  13. package/dist/components/DataTable/DataTableInput.vue.d.ts +4 -4
  14. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  15. package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
  16. package/dist/components/Sidebar/SidebarToggle.vue.js +17 -16
  17. package/dist/layouts/App/create-api-client-app.d.ts +75 -55
  18. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  19. package/dist/layouts/Modal/create-api-client-modal.d.ts +146 -106
  20. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  21. package/dist/layouts/Modal/create-api-client-modal.js +1 -2
  22. package/dist/layouts/Web/create-api-client-web.d.ts +75 -55
  23. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  24. package/dist/libs/create-client.d.ts +76 -60
  25. package/dist/libs/create-client.d.ts.map +1 -1
  26. package/dist/libs/create-client.js +82 -80
  27. package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
  28. package/dist/libs/extractAttachmentFilename.js +8 -7
  29. package/dist/libs/find-request.d.ts +2 -1
  30. package/dist/libs/find-request.d.ts.map +1 -1
  31. package/dist/libs/hot-keys.d.ts +1 -1
  32. package/dist/libs/hot-keys.d.ts.map +1 -1
  33. package/dist/libs/hot-keys.js +9 -8
  34. package/dist/libs/send-request/create-request-operation.test.d.ts +4 -2
  35. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  36. package/dist/store/active-entities.d.ts +5 -3
  37. package/dist/store/active-entities.d.ts.map +1 -1
  38. package/dist/store/import-spec.d.ts +3 -3
  39. package/dist/store/import-spec.d.ts.map +1 -1
  40. package/dist/store/import-spec.js +4 -1
  41. package/dist/store/request-example.d.ts +22 -12
  42. package/dist/store/request-example.d.ts.map +1 -1
  43. package/dist/store/requests.d.ts +26 -15
  44. package/dist/store/requests.d.ts.map +1 -1
  45. package/dist/store/security-schemes.d.ts +6 -6
  46. package/dist/store/store.d.ts +104 -69
  47. package/dist/store/store.d.ts.map +1 -1
  48. package/dist/store/store.js +12 -12
  49. package/dist/store/workspace.d.ts +12 -12
  50. package/dist/store/workspace.d.ts.map +1 -1
  51. package/dist/style.css +1 -1
  52. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  53. package/dist/views/Request/Request.vue.js +2 -2
  54. package/dist/views/Request/RequestRoot.test.d.ts +2 -0
  55. package/dist/views/Request/RequestRoot.test.d.ts.map +1 -0
  56. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  57. package/dist/views/Request/RequestRoot.vue.js +2 -2
  58. package/dist/views/Request/RequestRoot.vue2.js +72 -60
  59. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +1 -1
  60. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  61. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  62. package/dist/views/Request/RequestSection/RequestBody.vue.js +3 -3
  63. package/dist/views/Request/RequestSection/RequestBody.vue2.js +113 -107
  64. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  65. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  66. package/dist/views/Request/RequestSection/RequestSection.vue2.js +37 -37
  67. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  68. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  69. package/dist/views/Request/RequestSection/RequestTable.vue2.js +55 -51
  70. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  71. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  72. package/dist/views/Request/RequestSidebar.vue2.js +171 -166
  73. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  74. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  75. package/dist/views/Request/RequestSidebarItem.vue2.js +187 -180
  76. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  77. package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
  78. package/dist/views/Request/RequestSubpageHeader.vue2.js +41 -49
  79. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  80. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  81. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +62 -45
  82. package/package.json +13 -13
  83. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +0 -15
  84. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +0 -1
  85. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +0 -176
  86. package/dist/components/CommandPalette/CommandPaletteRequest.vue2.js +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"AAqHA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AASrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;;;;;;;AA4NJ,wBAQG"}
1
+ {"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAQrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;;;;;;;AAyMJ,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import e from "./RequestSubpageHeader.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ o(e, [["__scopeId", "data-v-82f1fa0c"]]);
4
+ const d = /* @__PURE__ */ o(e, [["__scopeId", "data-v-ad3dcf8d"]]);
5
5
  export {
6
- f as default
6
+ d as default
7
7
  };
@@ -1,13 +1,12 @@
1
- import { defineComponent as k, openBlock as i, createElementBlock as m, createElementVNode as s, unref as e, createBlock as u, isRef as v, normalizeClass as C, createCommentVNode as a, createVNode as p } from "vue";
2
- import { ScalarIcon as d } from "@scalar/components";
3
- import { useRouter as w } from "vue-router";
4
- import y from "../../components/AddressBar/AddressBar.vue.js";
5
- import V from "../../components/Sidebar/SidebarToggle.vue.js";
6
- import { useLayout as h } from "../../hooks/useLayout.js";
7
- import { useSidebar as x } from "../../hooks/useSidebar.js";
8
- import B from "../../components/OpenApiClientButton.vue.js";
9
- import { useWorkspace as S } from "../../store/store.js";
10
- const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, z = { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, R = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, L = /* @__PURE__ */ k({
1
+ import { defineComponent as g, openBlock as r, createElementBlock as l, createElementVNode as i, unref as o, normalizeClass as k, createCommentVNode as s, createVNode as m, createBlock as v } from "vue";
2
+ import { ScalarIcon as p } from "@scalar/components";
3
+ import { useRouter as C } from "vue-router";
4
+ import w from "../../components/AddressBar/AddressBar.vue.js";
5
+ import { useLayout as y } from "../../hooks/useLayout.js";
6
+ import { useSidebar as h } from "../../hooks/useSidebar.js";
7
+ import V from "../../components/OpenApiClientButton.vue.js";
8
+ import { useWorkspace as z } from "../../store/store.js";
9
+ const B = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, S = { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, $ = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, O = /* @__PURE__ */ g({
11
10
  __name: "RequestSubpageHeader",
12
11
  props: {
13
12
  collection: {},
@@ -18,70 +17,63 @@ const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 fle
18
17
  workspace: {}
19
18
  },
20
19
  emits: ["hideModal", "importCurl"],
21
- setup(M) {
22
- const { hideClientButton: c, showSidebar: f, integration: b } = S(), { isSidebarOpen: l } = x(), { layout: r } = h(), { currentRoute: g } = w();
23
- return (o, t) => (i(), m("div", $, [
24
- s("div", z, [
25
- e(f) ? (i(), u(V, {
20
+ setup(x) {
21
+ const { hideClientButton: u, showSidebar: d, integration: c } = z(), { isSidebarOpen: f } = h(), { layout: n } = y(), { currentRoute: b } = C();
22
+ return (e, t) => (r(), l("div", B, [
23
+ i("div", S, [
24
+ o(d) ? (r(), l("div", {
26
25
  key: 0,
27
- modelValue: e(l),
28
- "onUpdate:modelValue": t[0] || (t[0] = (n) => v(l) ? l.value = n : null),
29
- class: C(["ml-1", [
30
- { hidden: e(l) },
31
- { "xl:!flex": !e(l) },
32
- { "!flex": e(r) === "modal" },
33
- { "!hidden": e(r) === "modal" && e(l) }
34
- ]])
35
- }, null, 8, ["modelValue", "class"])) : a("", !0)
26
+ class: k(["size-8", { hidden: o(n) === "modal" && !o(f) }])
27
+ }, null, 2)) : s("", !0)
36
28
  ]),
37
- p(y, {
38
- collection: o.collection,
39
- envVariables: o.envVariables,
40
- environment: o.environment,
41
- operation: o.operation,
42
- server: o.server,
43
- workspace: o.workspace,
44
- onImportCurl: t[1] || (t[1] = (n) => o.$emit("importCurl", n))
29
+ m(w, {
30
+ collection: e.collection,
31
+ envVariables: e.envVariables,
32
+ environment: e.environment,
33
+ operation: e.operation,
34
+ server: e.server,
35
+ workspace: e.workspace,
36
+ onImportCurl: t[0] || (t[0] = (a) => e.$emit("importCurl", a))
45
37
  }, null, 8, ["collection", "envVariables", "environment", "operation", "server", "workspace"]),
46
- s("div", R, [
47
- e(r) === "modal" && o.collection.documentUrl && !e(c) ? (i(), u(e(B), {
38
+ i("div", $, [
39
+ o(n) === "modal" && e.collection.documentUrl && !o(u) ? (r(), v(o(V), {
48
40
  key: 0,
49
41
  buttonSource: "modal",
50
42
  class: "!w-fit lg:-mr-1",
51
- integration: e(b) ?? o.collection.integration ?? null,
52
- source: e(g).query.source === "gitbook" ? "gitbook" : "api-reference",
53
- url: o.collection.documentUrl
54
- }, null, 8, ["integration", "source", "url"])) : a("", !0),
55
- e(r) === "modal" ? (i(), m("button", {
43
+ integration: o(c) ?? e.collection.integration ?? null,
44
+ source: o(b).query.source === "gitbook" ? "gitbook" : "api-reference",
45
+ url: e.collection.documentUrl
46
+ }, null, 8, ["integration", "source", "url"])) : s("", !0),
47
+ o(n) === "modal" ? (r(), l("button", {
56
48
  key: 1,
57
49
  class: "app-exit-button gitbook-hidden zoomed:static zoomed:p-1 fixed right-2 top-2 rounded-full p-2",
58
50
  type: "button",
59
- onClick: t[2] || (t[2] = (n) => o.$emit("hideModal"))
51
+ onClick: t[1] || (t[1] = (a) => e.$emit("hideModal"))
60
52
  }, [
61
- p(e(d), {
53
+ m(o(p), {
62
54
  icon: "Close",
63
55
  size: "lg",
64
56
  thickness: "2"
65
57
  }),
66
- t[4] || (t[4] = s("span", { class: "sr-only" }, "Close Client", -1))
67
- ])) : a("", !0),
68
- e(r) === "modal" ? (i(), m("button", {
58
+ t[3] || (t[3] = i("span", { class: "sr-only" }, "Close Client", -1))
59
+ ])) : s("", !0),
60
+ o(n) === "modal" ? (r(), l("button", {
69
61
  key: 2,
70
62
  class: "text-c-1 hover:bg-b-2 active:text-c-1 gitbook-show -mr-1.5 rounded p-2",
71
63
  type: "button",
72
- onClick: t[3] || (t[3] = (n) => o.$emit("hideModal"))
64
+ onClick: t[2] || (t[2] = (a) => e.$emit("hideModal"))
73
65
  }, [
74
- p(e(d), {
66
+ m(o(p), {
75
67
  icon: "Close",
76
68
  size: "md",
77
69
  thickness: "1.75"
78
70
  }),
79
- t[5] || (t[5] = s("span", { class: "sr-only" }, "Close Client", -1))
80
- ])) : a("", !0)
71
+ t[4] || (t[4] = i("span", { class: "sr-only" }, "Close Client", -1))
72
+ ])) : s("", !0)
81
73
  ])
82
74
  ]));
83
75
  }
84
76
  });
85
77
  export {
86
- L as default
78
+ O as default
87
79
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":"AAsJA,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAC;;AAyLF,wBAOG"}
1
+ {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":"AAoLA,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAC;;AAwNF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseEmpty.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6a2616c5"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fb583e5d"]]);
5
5
  export {
6
- s as default
6
+ r as default
7
7
  };
@@ -1,89 +1,106 @@
1
- import { defineComponent as b, onMounted as g, onBeforeUnmount as R, openBlock as n, createElementBlock as m, createElementVNode as s, normalizeClass as f, unref as t, createTextVNode as i, toDisplayString as q, createCommentVNode as c, createVNode as l } from "vue";
2
- import { useRoute as C } from "vue-router";
3
- import v from "../../../assets/computer.ascii.js";
4
- import w from "../../../components/EmptyState.vue.js";
5
- import N from "../../../components/ScalarAsciiArt.vue.js";
6
- import p from "../../../components/ScalarHotkey.vue.js";
7
- import { useWorkspace as h } from "../../../store/store.js";
8
- import { useLayout as S } from "../../../hooks/useLayout.js";
9
- const V = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, _ = {
1
+ import { defineComponent as S, onMounted as B, onBeforeUnmount as E, openBlock as u, createElementBlock as i, createElementVNode as o, normalizeClass as q, unref as t, createTextVNode as m, toDisplayString as V, createCommentVNode as c, createVNode as l, nextTick as A } from "vue";
2
+ import { useRoute as K, useRouter as W } from "vue-router";
3
+ import _ from "../../../assets/computer.ascii.js";
4
+ import $ from "../../../components/EmptyState.vue.js";
5
+ import j from "../../../components/ScalarAsciiArt.vue.js";
6
+ import d from "../../../components/ScalarHotkey.vue.js";
7
+ import { useActiveEntities as z } from "../../../store/active-entities.js";
8
+ import { useWorkspace as D } from "../../../store/store.js";
9
+ import { useLayout as M } from "../../../hooks/useLayout.js";
10
+ const P = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, T = {
10
11
  key: 0,
11
12
  class: "scalar-version-number"
12
- }, B = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, G = /* @__PURE__ */ b({
13
+ }, G = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, Z = /* @__PURE__ */ S({
13
14
  __name: "ResponseEmpty",
14
15
  props: {
15
16
  numWorkspaceRequests: {}
16
17
  },
17
- setup(E) {
18
- const { events: a } = h(), y = C(), { layout: r } = S(), u = () => {
19
- a.commandPalette.emit({ commandName: "Create Request" });
20
- }, d = (o) => {
21
- o != null && o.createNew && y.name === "request" && u();
22
- }, k = "2.2.56";
23
- return g(() => a.hotKeys.on(d)), R(() => a.hotKeys.off(d)), (o, e) => (n(), m("div", V, [
24
- s("div", {
25
- class: f(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
26
- "hidden opacity-0": o.numWorkspaceRequests <= 1 && t(r) !== "modal"
18
+ setup(H) {
19
+ const { events: r, requestMutators: R } = D(), w = K(), h = W(), { layout: a } = M(), { activeWorkspace: C, activeCollection: f, activeRequest: p } = z(), k = () => {
20
+ var n, v, g, x, b;
21
+ if (!((n = f.value) != null && n.uid)) return;
22
+ const s = (g = (v = p.value) == null ? void 0 : v.tags) != null && g.length ? { tags: p.value.tags[0] ? [p.value.tags[0]] : [] } : {}, e = R.add(
23
+ s,
24
+ (x = f.value) == null ? void 0 : x.uid
25
+ );
26
+ e && (h.push({
27
+ name: "request",
28
+ params: {
29
+ workspace: (b = C.value) == null ? void 0 : b.uid,
30
+ request: e.uid
31
+ }
32
+ }), A(() => {
33
+ r.hotKeys.emit({
34
+ focusAddressBar: new KeyboardEvent("keydown", { key: "l" })
35
+ });
36
+ }));
37
+ }, y = (s) => {
38
+ s != null && s.createNew && w.name === "request" && k();
39
+ }, N = "2.2.59";
40
+ return B(() => r.hotKeys.on(y)), E(() => r.hotKeys.off(y)), (s, e) => (u(), i("div", P, [
41
+ o("div", {
42
+ class: q(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
43
+ "hidden opacity-0": s.numWorkspaceRequests <= 1 && t(a) !== "modal"
27
44
  }])
28
45
  }, [
29
- t(r) !== "modal" ? (n(), m("div", _, [
30
- i(" Scalar App V" + q(t(k)) + " Beta ", 1),
31
- e[2] || (e[2] = s("div", { class: "mt-2" }, [
32
- s("a", {
46
+ t(a) !== "modal" ? (u(), i("div", T, [
47
+ m(" Scalar App V" + V(t(N)) + " Beta ", 1),
48
+ e[3] || (e[3] = o("div", { class: "mt-2" }, [
49
+ o("a", {
33
50
  href: "https://github.com/scalar/scalar/issues/2669",
34
51
  target: "_blank"
35
52
  }, " Roadmap ")
36
53
  ], -1))
37
54
  ])) : c("", !0),
38
- e[3] || (e[3] = s("a", {
55
+ e[4] || (e[4] = o("a", {
39
56
  class: "gitbook-show scalar-version-number",
40
57
  href: "https://www.scalar.com",
41
58
  target: "_blank"
42
59
  }, " Powered By Scalar.com ", -1)),
43
- l(N, {
44
- art: t(v),
60
+ l(j, {
61
+ art: t(_),
45
62
  class: "text-c-3"
46
63
  }, null, 8, ["art"])
47
64
  ], 2),
48
- t(r) !== "modal" ? (n(), m("div", {
65
+ t(a) !== "modal" ? (u(), i("div", {
49
66
  key: 0,
50
- class: f(["hidden h-[calc(100%_-_50px)] items-center justify-center pb-5", {
51
- "!flex opacity-100": o.numWorkspaceRequests == 1
67
+ class: q(["hidden h-[calc(100%_-_50px)] items-center justify-center pb-5", {
68
+ "!flex opacity-100": s.numWorkspaceRequests == 1
52
69
  }])
53
70
  }, [
54
- l(w)
71
+ l($)
55
72
  ], 2)) : c("", !0),
56
- s("div", B, [
57
- t(r) !== "modal" ? (n(), m("button", {
73
+ o("div", G, [
74
+ t(a) !== "modal" ? (u(), i("button", {
58
75
  key: 0,
59
76
  class: "flex items-center gap-1.5",
60
77
  type: "button",
61
- onClick: e[0] || (e[0] = (x) => t(a).commandPalette.emit())
78
+ onClick: e[0] || (e[0] = (n) => t(r).commandPalette.emit())
62
79
  }, [
63
- e[4] || (e[4] = i(" Get Started ")),
64
- l(p, { hotkey: "k" })
80
+ e[5] || (e[5] = m(" Get Started ")),
81
+ l(d, { hotkey: "k" })
65
82
  ])) : c("", !0),
66
- t(r) === "desktop" ? (n(), m("button", {
83
+ t(a) === "desktop" ? (u(), i("button", {
67
84
  key: 1,
68
85
  class: "flex items-center gap-1.5",
69
86
  type: "button",
70
- onClick: u
87
+ onClick: e[1] || (e[1] = (n) => k())
71
88
  }, [
72
- e[5] || (e[5] = i(" New Request ")),
73
- l(p, { hotkey: "N" })
89
+ e[6] || (e[6] = m(" New Request ")),
90
+ l(d, { hotkey: "N" })
74
91
  ])) : c("", !0),
75
- s("button", {
92
+ o("button", {
76
93
  class: "flex items-center gap-1.5",
77
94
  type: "button",
78
- onClick: e[1] || (e[1] = (x) => t(a).executeRequest.emit())
95
+ onClick: e[2] || (e[2] = (n) => t(r).executeRequest.emit())
79
96
  }, [
80
- e[6] || (e[6] = i(" Send Request ")),
81
- l(p, { hotkey: "↵" })
97
+ e[7] || (e[7] = m(" Send Request ")),
98
+ l(d, { hotkey: "↵" })
82
99
  ])
83
100
  ])
84
101
  ]));
85
102
  }
86
103
  });
87
104
  export {
88
- G as default
105
+ Z as default
89
106
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.2.56",
21
+ "version": "2.2.59",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -188,22 +188,22 @@
188
188
  "whatwg-mimetype": "^4.0.0",
189
189
  "yaml": "^2.4.5",
190
190
  "zod": "^3.23.8",
191
- "@scalar/components": "0.13.28",
191
+ "@scalar/components": "0.13.31",
192
192
  "@scalar/icons": "0.1.3",
193
- "@scalar/import": "0.2.30",
193
+ "@scalar/import": "0.2.33",
194
+ "@scalar/oas-utils": "0.2.113",
194
195
  "@scalar/object-utils": "1.1.13",
196
+ "@scalar/draggable": "0.1.11",
195
197
  "@scalar/openapi-parser": "0.10.9",
196
198
  "@scalar/openapi-types": "0.1.9",
197
- "@scalar/oas-utils": "0.2.110",
198
- "@scalar/snippetz": "0.2.15",
199
- "@scalar/postman-to-openapi": "0.1.33",
200
- "@scalar/themes": "0.9.71",
201
- "@scalar/types": "0.0.36",
202
- "@scalar/use-codemirror": "0.11.73",
203
- "@scalar/use-hooks": "0.1.25",
199
+ "@scalar/snippetz": "0.2.16",
200
+ "@scalar/themes": "0.9.74",
201
+ "@scalar/postman-to-openapi": "0.1.36",
202
+ "@scalar/types": "0.0.39",
203
+ "@scalar/use-hooks": "0.1.28",
204
204
  "@scalar/use-toasts": "0.7.9",
205
205
  "@scalar/use-tooltip": "1.0.6",
206
- "@scalar/draggable": "0.1.11"
206
+ "@scalar/use-codemirror": "0.11.76"
207
207
  },
208
208
  "devDependencies": {
209
209
  "@types/shell-quote": "^1.7.5",
@@ -219,8 +219,8 @@
219
219
  "vite": "^5.4.10",
220
220
  "vite-svg-loader": "^5.1.0",
221
221
  "vitest": "^1.6.0",
222
- "@scalar/build-tooling": "0.1.15",
223
- "@scalar/galaxy": "0.2.22"
222
+ "@scalar/build-tooling": "0.1.16",
223
+ "@scalar/galaxy": "0.2.24"
224
224
  },
225
225
  "scripts": {
226
226
  "build": "scalar-build-vite",
@@ -1,15 +0,0 @@
1
- type __VLS_Props = {
2
- metaData?: {
3
- itemUid: string;
4
- parentUid: string;
5
- };
6
- };
7
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
- close: () => any;
9
- back: (e: KeyboardEvent) => any;
10
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
- onClose?: () => any;
12
- onBack?: (e: KeyboardEvent) => any;
13
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLFormElement>;
14
- export default _default;
15
- //# sourceMappingURL=CommandPaletteRequest.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":"AA8MA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF,CAAC;;;;;;;;AA4TF,wBAQG"}
@@ -1,176 +0,0 @@
1
- import { defineComponent as W, ref as c, computed as x, openBlock as h, createBlock as C, withCtx as u, createElementVNode as f, createVNode as i, unref as n, normalizeClass as q, toDisplayString as V, createCommentVNode as j, createTextVNode as H } from "vue";
2
- import { ScalarListbox as w, ScalarButton as D, ScalarIcon as k } from "@scalar/components";
3
- import { isHttpMethod as I } from "@scalar/oas-utils/helpers";
4
- import { useToasts as P } from "@scalar/use-toasts";
5
- import { useRouter as $ } from "vue-router";
6
- import A from "../HttpMethod/HttpMethod.vue.js";
7
- import { useActiveEntities as L } from "../../store/active-entities.js";
8
- import O from "./CommandActionForm.vue.js";
9
- import F from "./CommandActionInput.vue.js";
10
- import { useWorkspace as G } from "../../store/store.js";
11
- const J = { class: "flex" }, se = /* @__PURE__ */ W({
12
- __name: "CommandPaletteRequest",
13
- props: {
14
- metaData: {}
15
- },
16
- emits: ["close", "back"],
17
- setup(S, { emit: _ }) {
18
- const r = S, b = _, { push: M } = $(), { toast: N } = P(), {
19
- activeCollection: R,
20
- activeWorkspace: U,
21
- activeWorkspaceCollections: g,
22
- activeRequest: y
23
- } = L(), { requestMutators: T, tags: z } = G(), o = c(""), m = c("get"), p = x(
24
- () => g.value.map((t) => {
25
- var e;
26
- return {
27
- id: t.uid,
28
- label: ((e = t.info) == null ? void 0 : e.title) ?? "Unititled Collection"
29
- };
30
- })
31
- ), d = x(
32
- () => g.value.flatMap(
33
- (t) => {
34
- var e;
35
- return t.uid === ((e = l.value) == null ? void 0 : e.id) ? t.tags.flatMap((a) => {
36
- const v = z[a];
37
- return v ? [
38
- {
39
- id: v.uid,
40
- label: v.name
41
- }
42
- ] : [];
43
- }) : [];
44
- }
45
- )
46
- ), l = c(
47
- r.metaData ? p.value.find(
48
- (t) => {
49
- var e, a;
50
- return t.id === ((e = r.metaData) == null ? void 0 : e.itemUid) || t.id === ((a = r.metaData) == null ? void 0 : a.parentUid);
51
- }
52
- ) : p.value.find(
53
- (t) => {
54
- var e;
55
- return t.id === ((e = R.value) == null ? void 0 : e.uid);
56
- }
57
- )
58
- ), s = c(
59
- r.metaData ? d.value.find((t) => {
60
- var e;
61
- return t.id === ((e = r.metaData) == null ? void 0 : e.itemUid);
62
- }) : d.value.find((t) => {
63
- var e, a;
64
- return t.label === ((a = (e = y.value) == null ? void 0 : e.tags) == null ? void 0 : a[0]);
65
- })
66
- ), B = (t) => m.value = t, E = () => {
67
- var e, a;
68
- if (!o.value.trim()) {
69
- N("Please enter a name before creating a request.", "error");
70
- return;
71
- }
72
- if (!((e = l.value) != null && e.id) || !I(m.value))
73
- return;
74
- const t = T.add(
75
- {
76
- path: "",
77
- method: m.value,
78
- description: o.value,
79
- operationId: o.value,
80
- summary: o.value,
81
- tags: s.value ? [s.value.label] : []
82
- },
83
- l.value.id
84
- );
85
- t && M({
86
- name: "request",
87
- params: {
88
- workspace: (a = U.value) == null ? void 0 : a.uid,
89
- request: t.uid
90
- }
91
- }), b("close");
92
- };
93
- return (t, e) => (h(), C(O, {
94
- disabled: !o.value.trim(),
95
- onSubmit: E
96
- }, {
97
- options: u(() => [
98
- f("div", J, [
99
- i(A, {
100
- isEditable: !0,
101
- isSquare: "",
102
- method: m.value,
103
- onChange: B
104
- }, null, 8, ["method"]),
105
- i(n(w), {
106
- modelValue: l.value,
107
- "onUpdate:modelValue": e[2] || (e[2] = (a) => l.value = a),
108
- options: p.value
109
- }, {
110
- default: u(() => [
111
- i(n(D), {
112
- class: "hover:bg-b-2 ml-2 max-h-8 w-full justify-between gap-1 p-2 text-xs",
113
- variant: "outlined"
114
- }, {
115
- default: u(() => [
116
- f("span", {
117
- class: q(["whitespace-nowrap", l.value ? "text-c-1" : "text-c-3"])
118
- }, V(l.value ? l.value.label : "Select Collection"), 3),
119
- i(n(k), {
120
- class: "text-c-3",
121
- icon: "ChevronDown",
122
- size: "md"
123
- })
124
- ]),
125
- _: 1
126
- })
127
- ]),
128
- _: 1
129
- }, 8, ["modelValue", "options"]),
130
- d.value.length ? (h(), C(n(w), {
131
- key: 0,
132
- modelValue: s.value,
133
- "onUpdate:modelValue": e[3] || (e[3] = (a) => s.value = a),
134
- options: d.value
135
- }, {
136
- default: u(() => [
137
- i(n(D), {
138
- class: "hover:bg-b-2 ml-2 max-h-8 w-full justify-between gap-1 p-2 text-xs",
139
- variant: "outlined"
140
- }, {
141
- default: u(() => [
142
- f("span", {
143
- class: q(s.value ? "text-c-1" : "text-c-3")
144
- }, V(s.value ? s.value.label : "Select Tag"), 3),
145
- i(n(k), {
146
- class: "text-c-3",
147
- icon: "ChevronDown",
148
- size: "md"
149
- })
150
- ]),
151
- _: 1
152
- })
153
- ]),
154
- _: 1
155
- }, 8, ["modelValue", "options"])) : j("", !0)
156
- ])
157
- ]),
158
- submit: u(() => e[4] || (e[4] = [
159
- H(" Create Request ")
160
- ])),
161
- default: u(() => [
162
- i(F, {
163
- modelValue: o.value,
164
- "onUpdate:modelValue": e[0] || (e[0] = (a) => o.value = a),
165
- label: "Request Name",
166
- placeholder: "Request Name",
167
- onOnDelete: e[1] || (e[1] = (a) => b("back", a))
168
- }, null, 8, ["modelValue"])
169
- ]),
170
- _: 1
171
- }, 8, ["disabled"]));
172
- }
173
- });
174
- export {
175
- se as default
176
- };
@@ -1,4 +0,0 @@
1
- import f from "./CommandPaletteRequest.vue.js";
2
- export {
3
- f as default
4
- };