@scalar/api-client 2.0.34 → 2.0.36

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 (67) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/components/DataTable/DataTableInput.vue.d.ts +7 -0
  3. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  4. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  5. package/dist/components/DataTable/DataTableInput.vue2.js +33 -31
  6. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +19 -3
  7. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  8. package/dist/components/DataTable/DataTableInputSelect.vue.js +37 -35
  9. package/dist/components/DataTable/index.d.ts +1 -0
  10. package/dist/components/DataTable/index.d.ts.map +1 -1
  11. package/dist/components/DataTable/index.js +6 -4
  12. package/dist/components/SideNav/SideHelp.vue.d.ts +3 -0
  13. package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -0
  14. package/dist/components/SideNav/SideHelp.vue.js +127 -0
  15. package/dist/components/SideNav/SideHelp.vue2.js +4 -0
  16. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  17. package/dist/components/SideNav/SideNav.vue.js +3 -3
  18. package/dist/components/SideNav/SideNav.vue2.js +28 -24
  19. package/dist/index.js +1 -1
  20. package/dist/layouts/App/create-api-client-app.d.ts +512 -603
  21. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  22. package/dist/layouts/Modal/{api-client-modal.d.ts → create-api-client-modal.d.ts} +1037 -1219
  23. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -0
  24. package/dist/layouts/Modal/index.d.ts +1 -1
  25. package/dist/layouts/Modal/index.d.ts.map +1 -1
  26. package/dist/layouts/Modal/index.js +1 -1
  27. package/dist/libs/create-client.d.ts +513 -603
  28. package/dist/libs/create-client.d.ts.map +1 -1
  29. package/dist/libs/create-client.js +58 -68
  30. package/dist/libs/local-storage.js +5 -5
  31. package/dist/libs/sendRequest.d.ts +2 -5
  32. package/dist/libs/sendRequest.d.ts.map +1 -1
  33. package/dist/libs/sendRequest.js +60 -63
  34. package/dist/store/workspace.d.ts +1037 -1219
  35. package/dist/store/workspace.d.ts.map +1 -1
  36. package/dist/store/workspace.js +350 -277
  37. package/dist/style.css +1 -1
  38. package/dist/views/Request/Request.vue.js +2 -2
  39. package/dist/views/Request/Request.vue2.js +22 -22
  40. package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
  41. package/dist/views/Request/RequestSection/RequestAuth.vue.js +270 -177
  42. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  43. package/dist/views/Request/RequestSection/RequestSection.vue.js +52 -42
  44. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  45. package/dist/views/Request/RequestSidebarItemMenu.vue.js +141 -104
  46. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  47. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +5 -36
  48. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +50 -2
  49. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +20 -20
  50. package/dist/views/Request/components/OAuth2.vue.d.ts +3 -9
  51. package/dist/views/Request/components/OAuth2.vue.d.ts.map +1 -1
  52. package/dist/views/Request/components/OAuth2.vue.js +141 -112
  53. package/dist/views/Request/components/OAuthScopesInput.vue.d.ts +2 -6
  54. package/dist/views/Request/components/OAuthScopesInput.vue.d.ts.map +1 -1
  55. package/dist/views/Request/components/OAuthScopesInput.vue.js +35 -39
  56. package/dist/views/Request/consts/index.d.ts +2 -0
  57. package/dist/views/Request/consts/index.d.ts.map +1 -0
  58. package/dist/views/Request/consts/index.js +5 -0
  59. package/dist/views/Request/consts/new-auth-options.d.ts +92 -0
  60. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -0
  61. package/dist/views/Request/consts/new-auth-options.js +83 -0
  62. package/dist/views/Request/libs/oauth2.d.ts +3 -16
  63. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  64. package/dist/views/Request/libs/oauth2.js +28 -31
  65. package/package.json +10 -6
  66. package/dist/layouts/Modal/api-client-modal.d.ts.map +0 -1
  67. /package/dist/layouts/Modal/{api-client-modal.js → create-api-client-modal.js} +0 -0
@@ -1,16 +1,22 @@
1
- import { defineComponent as x, computed as f, ref as A, watch as S, openBlock as k, createBlock as q, withCtx as _, createVNode as l, unref as n, createElementVNode as u, createTextVNode as R, toDisplayString as B, withDirectives as a, vShow as o } from "vue";
2
- import C from "../../../components/ContextBar.vue.js";
3
- import E from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import { useWorkspace as O } from "../../../store/workspace.js";
5
- import $ from "./RequestAuth.vue.js";
6
- import g from "./RequestBody.vue.js";
1
+ import { defineComponent as S, computed as f, ref as A, watch as k, openBlock as q, createBlock as R, withCtx as h, createVNode as l, unref as o, createElementVNode as u, createTextVNode as B, toDisplayString as C, withDirectives as i, vShow as a } from "vue";
2
+ import E from "../../../components/ContextBar.vue.js";
3
+ import O from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import { useWorkspace as $ } from "../../../store/workspace.js";
5
+ import g from "./RequestAuth.vue.js";
6
+ import H from "./RequestBody.vue.js";
7
7
  import r from "./RequestParams.vue.js";
8
- import H from "./RequestPathParams.vue.js";
9
- import { ScalarIcon as P } from "@scalar/components";
10
- const T = { class: "flex-1" }, w = { class: "text-c-3 pl-1" }, K = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-5 py-2.5" }, U = /* @__PURE__ */ x({
8
+ import P from "./RequestPathParams.vue.js";
9
+ import { ScalarIcon as T } from "@scalar/components";
10
+ const w = { class: "flex-1" }, K = { class: "text-c-3 pl-1" }, N = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-5 py-2.5" }, W = /* @__PURE__ */ S({
11
11
  __name: "RequestSection",
12
- setup(N) {
13
- const { activeRequest: i, activeExample: m, activeSecurityRequirements: d, isReadOnly: h } = O(), c = ["POST", "PUT", "PATCH", "DELETE"], y = f(() => {
12
+ setup(V) {
13
+ const {
14
+ activeRequest: s,
15
+ activeSecuritySchemes: _,
16
+ activeExample: m,
17
+ activeSecurityRequirements: d,
18
+ isReadOnly: y
19
+ } = $(), n = ["POST", "PUT", "PATCH", "DELETE"], x = f(() => {
14
20
  const t = [
15
21
  "All",
16
22
  "Auth",
@@ -20,75 +26,79 @@ const T = { class: "flex-1" }, w = { class: "text-c-3 pl-1" }, K = { class: "req
20
26
  "Query",
21
27
  "Body"
22
28
  ];
23
- return m.value.parameters.path.length || t.splice(t.indexOf("Request"), 1), c.includes(i.value.method) || t.splice(t.indexOf("Body"), 1), p.value && t.splice(t.indexOf("Auth"), 1), t;
29
+ return m.value.parameters.path.length || t.splice(t.indexOf("Request"), 1), n.includes(s.value.method) || t.splice(t.indexOf("Body"), 1), p.value && t.splice(t.indexOf("Auth"), 1), t;
24
30
  }), p = f(
25
- () => h.value && (d.value.length === 0 || JSON.stringify(d.value) === "[{}]")
31
+ () => y.value && (d.value.length === 0 || JSON.stringify(d.value) === "[{}]")
26
32
  ), e = A("All");
27
- return S(i, (t) => {
28
- e.value === "Body" && !c.includes(t.method) && (e.value = "All");
29
- }), (t, v) => (k(), q(E, null, {
30
- title: _(() => {
31
- var s;
33
+ return k(s, (t) => {
34
+ e.value === "Body" && !n.includes(t.method) && (e.value = "All");
35
+ }), (t, v) => (q(), R(O, null, {
36
+ title: h(() => {
37
+ var c;
32
38
  return [
33
- l(n(P), {
39
+ l(o(T), {
34
40
  class: "text-c-3 mr-2",
35
41
  icon: "ExternalLink",
36
42
  size: "sm",
37
43
  thickness: "2.5"
38
44
  }),
39
- u("div", T, [
40
- R(" Request "),
41
- u("span", w, B((s = n(i)) == null ? void 0 : s.summary), 1)
45
+ u("div", w, [
46
+ B(" Request "),
47
+ u("span", K, C((c = o(s)) == null ? void 0 : c.summary), 1)
42
48
  ])
43
49
  ];
44
50
  }),
45
- default: _(() => [
46
- u("div", K, [
47
- l(C, {
51
+ default: h(() => [
52
+ u("div", N, [
53
+ l(E, {
48
54
  activeSection: e.value,
49
- sections: y.value,
50
- onSetActiveSection: v[0] || (v[0] = (s) => e.value = s)
55
+ sections: x.value,
56
+ onSetActiveSection: v[0] || (v[0] = (c) => e.value = c)
51
57
  }, null, 8, ["activeSection", "sections"]),
52
- a(l($, { title: "Authentication" }, null, 512), [
58
+ i(l(g, {
59
+ index: 0,
60
+ securityScheme: o(_)[0],
61
+ title: "Authentication"
62
+ }, null, 8, ["securityScheme"]), [
53
63
  [
54
- o,
64
+ a,
55
65
  !p.value && (e.value === "All" || e.value === "Auth")
56
66
  ]
57
67
  ]),
58
- a(l(H, {
68
+ i(l(P, {
59
69
  paramKey: "path",
60
70
  title: "Path Variables"
61
71
  }, null, 512), [
62
72
  [
63
- o,
64
- (e.value === "All" || e.value === "Request") && n(m).parameters.path.length > 0
73
+ a,
74
+ (e.value === "All" || e.value === "Request") && o(m).parameters.path.length > 0
65
75
  ]
66
76
  ]),
67
- a(l(r, {
77
+ i(l(r, {
68
78
  paramKey: "cookies",
69
79
  title: "Cookies"
70
80
  }, null, 512), [
71
- [o, e.value === "All" || e.value === "Cookies"]
81
+ [a, e.value === "All" || e.value === "Cookies"]
72
82
  ]),
73
- a(l(r, {
83
+ i(l(r, {
74
84
  paramKey: "headers",
75
85
  title: "Headers"
76
86
  }, null, 512), [
77
- [o, e.value === "All" || e.value === "Headers"]
87
+ [a, e.value === "All" || e.value === "Headers"]
78
88
  ]),
79
- a(l(r, {
89
+ i(l(r, {
80
90
  paramKey: "query",
81
91
  title: "Query Parameters"
82
92
  }, null, 512), [
83
- [o, e.value === "All" || e.value === "Query"]
93
+ [a, e.value === "All" || e.value === "Query"]
84
94
  ]),
85
- a(l(g, {
95
+ i(l(H, {
86
96
  body: "foo",
87
97
  title: "Body"
88
98
  }, null, 512), [
89
99
  [
90
- o,
91
- (e.value === "All" || e.value === "Body") && c.includes(n(i).method)
100
+ a,
101
+ (e.value === "All" || e.value === "Body") && n.includes(o(s).method)
92
102
  ]
93
103
  ])
94
104
  ])
@@ -98,5 +108,5 @@ const T = { class: "flex-1" }, w = { class: "text-c-3 pl-1" }, K = { class: "req
98
108
  }
99
109
  });
100
110
  export {
101
- U as default
111
+ W as default
102
112
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;;UAO1C,OAAO,GAAG,cAAc;;UAAxB,OAAO,GAAG,cAAc;;AA2VhC,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AA0MA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;;UAO1C,OAAO,GAAG,cAAc;;UAAxB,OAAO,GAAG,cAAc;;AAkdhC,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,117 +1,154 @@
1
- import { defineComponent as E, computed as R, openBlock as u, createBlock as d, unref as e, withCtx as l, createVNode as t, createCommentVNode as z, createElementVNode as n } from "vue";
2
- import { commandPaletteBus as C } from "../../libs/eventBusses/command-palette.js";
3
- import { PathId as p } from "../../router.js";
4
- import { useWorkspace as I } from "../../store/workspace.js";
5
- import { ScalarDropdown as w, ScalarDropdownItem as o, ScalarIcon as s, ScalarDropdownDivider as S, ScalarButton as b } from "@scalar/components";
6
- import { useRouter as A } from "vue-router";
7
- const B = /* @__PURE__ */ n("span", null, "Add Example", -1), N = /* @__PURE__ */ n("span", null, "Rename", -1), M = /* @__PURE__ */ n("span", null, "Duplicate", -1), P = /* @__PURE__ */ n("span", null, "Delete", -1), j = /* @__PURE__ */ E({
1
+ import { defineComponent as V, computed as q, ref as I, openBlock as E, createElementBlock as $, Fragment as B, createVNode as a, unref as e, withCtx as l, createBlock as A, createCommentVNode as F, createElementVNode as r, createTextVNode as C } from "vue";
2
+ import P from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
+ import { commandPaletteBus as T } from "../../libs/eventBusses/command-palette.js";
4
+ import { PathId as b } from "../../router.js";
5
+ import { useWorkspace as U } from "../../store/workspace.js";
6
+ import { useModal as g, ScalarDropdown as W, ScalarDropdownItem as p, ScalarIcon as u, ScalarButton as f, ScalarModal as N, ScalarTextField as j } from "@scalar/components";
7
+ import { useRouter as G } from "vue-router";
8
+ const H = /* @__PURE__ */ r("span", null, "Add Example", -1), J = /* @__PURE__ */ r("span", null, "Rename", -1), K = /* @__PURE__ */ r("span", null, "Delete", -1), L = { class: "flex gap-3" }, ae = /* @__PURE__ */ V({
8
9
  __name: "RequestSidebarItemMenu",
9
10
  props: {
10
11
  item: {}
11
12
  },
12
- setup(f) {
13
- const a = f, {
14
- activeWorkspace: c,
15
- activeRouterParams: r,
16
- findRequestFolders: _,
17
- requestMutators: x,
18
- requestExampleMutators: h
19
- } = I(), { replace: m } = A(), k = () => C.emit({
13
+ setup(y) {
14
+ const t = y, {
15
+ activeWorkspace: v,
16
+ activeRouterParams: x,
17
+ findRequestFolders: D,
18
+ requestMutators: _,
19
+ requestExampleMutators: R
20
+ } = U(), { replace: h } = G(), M = () => T.emit({
20
21
  commandName: "Add Example",
21
- metaData: a.item.uid
22
- }), v = () => {
23
- console.log("rename");
24
- }, g = () => {
25
- console.log("duplicate");
26
- }, D = () => {
27
- if ("requestUid" in a.item)
28
- h.delete(a.item), r.value[p.Examples] === a.item.uid && m(`/workspace/${c.value}/request/default`);
22
+ metaData: t.item.uid
23
+ }), S = () => {
24
+ if ("requestUid" in t.item)
25
+ R.delete(t.item), x.value[b.Examples] === t.item.uid && h(`/workspace/${v.value}/request/default`);
29
26
  else {
30
- const i = _(a.item.uid);
31
- if (!i.length) return;
32
- x.delete(a.item, i[0]), r.value[p.Request] === a.item.uid && m(`/workspace/${c.value.uid}/request/default`);
27
+ const c = D(t.item.uid);
28
+ if (!c.length) return;
29
+ _.delete(t.item, c[0]), x.value[b.Request] === t.item.uid && h(`/workspace/${v.value.uid}/request/default`);
33
30
  }
34
- }, q = R(() => "summary" in a.item);
35
- return (i, V) => (u(), d(e(w), { teleport: "#scalar-client" }, {
36
- items: l(() => [
37
- q.value ? (u(), d(e(o), {
38
- key: 0,
39
- class: "flex !gap-2",
40
- onClick: k
41
- }, {
42
- default: l(() => [
43
- t(e(s), {
44
- class: "inline-flex",
45
- icon: "Add",
46
- size: "sm"
31
+ }, n = q(() => "summary" in t.item), k = q(() => "summary" in t.item ? t.item.summary || "" : "name" in t.item && t.item.name || ""), i = I(""), w = () => {
32
+ "summary" in t.item ? _.edit(t.item.uid, "summary", i.value) : "summary" in t.item || R.edit(t.item.uid, "name", i.value), i.value = "", o.hide();
33
+ }, o = g(), d = g(), z = () => {
34
+ i.value = k.value, o.show();
35
+ };
36
+ return (c, s) => (E(), $(B, null, [
37
+ a(e(W), { teleport: "#scalar-client" }, {
38
+ items: l(() => [
39
+ n.value ? (E(), A(e(p), {
40
+ key: 0,
41
+ class: "flex !gap-2",
42
+ onClick: M
43
+ }, {
44
+ default: l(() => [
45
+ a(e(u), {
46
+ class: "inline-flex",
47
+ icon: "Add",
48
+ size: "sm"
49
+ }),
50
+ H
51
+ ]),
52
+ _: 1
53
+ })) : F("", !0),
54
+ a(e(p), {
55
+ class: "flex !gap-2",
56
+ onClick: z
57
+ }, {
58
+ default: l(() => [
59
+ a(e(u), {
60
+ class: "inline-flex",
61
+ icon: "Edit",
62
+ size: "sm"
63
+ }),
64
+ J
65
+ ]),
66
+ _: 1
67
+ }),
68
+ a(e(p), {
69
+ class: "flex !gap-2",
70
+ onClick: s[0] || (s[0] = (m) => e(d).show())
71
+ }, {
72
+ default: l(() => [
73
+ a(e(u), {
74
+ class: "inline-flex",
75
+ icon: "Trash",
76
+ size: "sm"
77
+ }),
78
+ K
79
+ ]),
80
+ _: 1
81
+ })
82
+ ]),
83
+ default: l(() => [
84
+ a(e(f), {
85
+ class: "z-10 hover:bg-b-3 transition-none p-1 group-hover:flex ui-open:flex absolute left-0 hidden -translate-x-full -ml-1",
86
+ size: "sm",
87
+ variant: "ghost"
88
+ }, {
89
+ default: l(() => [
90
+ a(e(u), {
91
+ icon: "Ellipses",
92
+ size: "sm"
93
+ })
94
+ ]),
95
+ _: 1
96
+ })
97
+ ]),
98
+ _: 1
99
+ }),
100
+ a(e(N), {
101
+ size: "sm",
102
+ state: e(d),
103
+ title: n.value ? "Delete Request" : "Delete Example"
104
+ }, {
105
+ default: l(() => [
106
+ a(P, {
107
+ variableName: k.value,
108
+ onClose: s[1] || (s[1] = (m) => e(d).hide()),
109
+ onDelete: S
110
+ }, null, 8, ["variableName"])
111
+ ]),
112
+ _: 1
113
+ }, 8, ["state", "title"]),
114
+ a(e(N), {
115
+ state: e(o),
116
+ title: n.value ? "Rename Request" : "Rename Example"
117
+ }, {
118
+ default: l(() => [
119
+ a(e(j), {
120
+ modelValue: i.value,
121
+ "onUpdate:modelValue": s[2] || (s[2] = (m) => i.value = m),
122
+ label: n.value ? "Request" : "Example"
123
+ }, null, 8, ["modelValue", "label"]),
124
+ r("div", L, [
125
+ a(e(f), {
126
+ class: "flex-1",
127
+ variant: "outlined",
128
+ onClick: s[3] || (s[3] = (m) => e(o).hide())
129
+ }, {
130
+ default: l(() => [
131
+ C(" Cancel ")
132
+ ]),
133
+ _: 1
47
134
  }),
48
- B
49
- ]),
50
- _: 1
51
- })) : z("", !0),
52
- t(e(o), {
53
- class: "flex !gap-2",
54
- onClick: v
55
- }, {
56
- default: l(() => [
57
- t(e(s), {
58
- class: "inline-flex",
59
- icon: "Edit",
60
- size: "sm"
61
- }),
62
- N
63
- ]),
64
- _: 1
65
- }),
66
- t(e(o), {
67
- class: "flex !gap-2",
68
- onClick: g
69
- }, {
70
- default: l(() => [
71
- t(e(s), {
72
- class: "inline-flex",
73
- icon: "Duplicate",
74
- size: "sm"
75
- }),
76
- M
77
- ]),
78
- _: 1
79
- }),
80
- t(e(S)),
81
- t(e(o), {
82
- class: "flex !gap-2",
83
- onClick: D
84
- }, {
85
- default: l(() => [
86
- t(e(s), {
87
- class: "inline-flex",
88
- icon: "Trash",
89
- size: "sm"
90
- }),
91
- P
92
- ]),
93
- _: 1
94
- })
95
- ]),
96
- default: l(() => [
97
- t(e(b), {
98
- class: "z-10 hover:bg-b-3 transition-none p-1 group-hover:flex ui-open:flex absolute left-0 hidden -translate-x-full -ml-1",
99
- size: "sm",
100
- variant: "ghost"
101
- }, {
102
- default: l(() => [
103
- t(e(s), {
104
- icon: "Ellipses",
105
- size: "sm"
135
+ a(e(f), {
136
+ class: "flex-1",
137
+ type: "submit",
138
+ onClick: w
139
+ }, {
140
+ default: l(() => [
141
+ C(" Save ")
142
+ ]),
143
+ _: 1
106
144
  })
107
- ]),
108
- _: 1
109
- })
110
- ]),
111
- _: 1
112
- }));
145
+ ])
146
+ ]),
147
+ _: 1
148
+ }, 8, ["state", "title"])
149
+ ], 64));
113
150
  }
114
151
  });
115
152
  export {
116
- j as default
153
+ ae as default
117
154
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAiJA,wBAKG"}
1
+ {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AA4LA,wBAKG"}
@@ -1,38 +1,7 @@
1
- import { defineComponent as a, openBlock as r, createElementBlock as c, createElementVNode as e, createVNode as t, unref as o, createTextVNode as n, createCommentVNode as m } from "vue";
2
- import p from "../../../assets/computer.ascii.js";
3
- import u from "../../../components/ScalarAsciiArt.vue.js";
4
- import i from "../../../components/ScalarHotkey.vue.js";
5
- import { useWorkspace as f } from "../../../store/workspace.js";
6
- import { executeRequestBus as _ } from "../../../libs/eventBusses/executeRequestBus.js";
7
- const d = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, x = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, y = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, h = {
8
- key: 0,
9
- class: "flex items-center gap-1.5",
10
- type: "button"
11
- }, B = /* @__PURE__ */ a({
12
- __name: "ResponseEmpty",
13
- setup(k) {
14
- const { isReadOnly: l } = f();
15
- return (N, s) => (r(), c("div", d, [
16
- e("div", x, [
17
- t(u, { art: o(p) }, null, 8, ["art"])
18
- ]),
19
- e("div", y, [
20
- e("button", {
21
- class: "flex items-center gap-1.5",
22
- type: "button",
23
- onClick: s[0] || (s[0] = (g) => o(_).emit())
24
- }, [
25
- n(" Send Request "),
26
- t(i, { hotkey: "↵" })
27
- ]),
28
- o(l) ? m("", !0) : (r(), c("button", h, [
29
- n(" New Request "),
30
- t(i, { hotkey: "N" })
31
- ]))
32
- ])
33
- ]));
34
- }
35
- });
1
+ import o from "./ResponseEmpty.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-84b69d7e"]]);
36
5
  export {
37
- B as default
6
+ r as default
38
7
  };
@@ -1,4 +1,52 @@
1
- import f from "./ResponseEmpty.vue.js";
1
+ import { defineComponent as u, openBlock as c, createElementBlock as a, createElementVNode as e, unref as s, createTextVNode as o, createCommentVNode as n, createVNode as r, pushScopeId as _, popScopeId as f } from "vue";
2
+ import h from "../../../assets/computer.ascii.js";
3
+ import x from "../../../components/ScalarAsciiArt.vue.js";
4
+ import i from "../../../components/ScalarHotkey.vue.js";
5
+ import { useWorkspace as k } from "../../../store/workspace.js";
6
+ import { executeRequestBus as v } from "../../../libs/eventBusses/executeRequestBus.js";
7
+ const p = (t) => (_("data-v-84b69d7e"), t = t(), f(), t), y = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, b = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, R = {
8
+ key: 0,
9
+ class: "scalar-version-number"
10
+ }, g = /* @__PURE__ */ p(() => /* @__PURE__ */ e("b", null, "Alpha", -1)), N = /* @__PURE__ */ p(() => /* @__PURE__ */ e("div", { class: "mt-1" }, [
11
+ /* @__PURE__ */ e("a", {
12
+ href: "https://github.com/scalar/scalar/issues/2669",
13
+ target: "_blank"
14
+ }, "Roadmap")
15
+ ], -1)), S = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, V = {
16
+ key: 0,
17
+ class: "flex items-center gap-1.5",
18
+ type: "button"
19
+ }, W = /* @__PURE__ */ u({
20
+ __name: "ResponseEmpty",
21
+ setup(t) {
22
+ const { isReadOnly: m, activeWorkspace: d } = k();
23
+ return (C, l) => (c(), a("div", y, [
24
+ e("div", b, [
25
+ s(d).isReadOnly ? n("", !0) : (c(), a("div", R, [
26
+ o(" Scalar V1.0.6 "),
27
+ g,
28
+ o(" Release "),
29
+ N
30
+ ])),
31
+ r(x, { art: s(h) }, null, 8, ["art"])
32
+ ]),
33
+ e("div", S, [
34
+ e("button", {
35
+ class: "flex items-center gap-1.5",
36
+ type: "button",
37
+ onClick: l[0] || (l[0] = (q) => s(v).emit())
38
+ }, [
39
+ o(" Send Request "),
40
+ r(i, { hotkey: "↵" })
41
+ ]),
42
+ s(m) ? n("", !0) : (c(), a("button", V, [
43
+ o(" New Request "),
44
+ r(i, { hotkey: "N" })
45
+ ]))
46
+ ])
47
+ ]));
48
+ }
49
+ });
2
50
  export {
3
- f as default
51
+ W as default
4
52
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as y, computed as i, toRaw as h, ref as x, openBlock as r, createBlock as n, withCtx as u, createVNode as p, unref as S, createElementVNode as f, createTextVNode as C, createCommentVNode as l, createElementBlock as A, Fragment as B } from "vue";
1
+ import { defineComponent as y, computed as i, toRaw as h, ref as x, openBlock as r, createBlock as n, withCtx as p, createVNode as u, unref as S, createElementVNode as f, createTextVNode as C, createCommentVNode as l, createElementBlock as A, Fragment as B } from "vue";
2
2
  import N from "../../../components/ContextBar.vue.js";
3
3
  import g from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import $ from "./ResponseBody.vue.js";
5
- import O from "./ResponseEmpty.vue.js";
6
- import J from "./ResponseMetaInformation.vue.js";
7
- import { ScalarIcon as R } from "@scalar/components";
8
- import { isJsonString as V } from "@scalar/oas-utils/helpers";
9
- import b from "./ResponseCookies.vue.js";
10
- import j from "./ResponseHeaders.vue.js";
11
- const E = { class: "flex items-center flex-1" }, H = { class: "custom-scroll flex flex-1 flex-col px-2 xl:px-6 py-2.5" }, G = /* @__PURE__ */ y({
4
+ import O from "./ResponseBody.vue.js";
5
+ import R from "./ResponseEmpty.vue.js";
6
+ import $ from "./ResponseMetaInformation.vue.js";
7
+ import { ScalarIcon as E } from "@scalar/components";
8
+ import { isJsonString as J } from "@scalar/oas-utils/helpers";
9
+ import V from "./ResponseCookies.vue.js";
10
+ import b from "./ResponseHeaders.vue.js";
11
+ const j = { class: "flex items-center flex-1" }, H = { class: "custom-scroll flex flex-1 flex-col px-2 xl:px-6 py-2.5" }, G = /* @__PURE__ */ y({
12
12
  __name: "ResponseSection",
13
13
  props: {
14
14
  response: {}
@@ -38,48 +38,48 @@ const E = { class: "flex items-center flex-1" }, H = { class: "custom-scroll fle
38
38
  }), k = i(() => {
39
39
  var o;
40
40
  const e = (o = a.response) == null ? void 0 : o.data;
41
- return e && V(e) ? JSON.stringify(JSON.parse(e), null, 2) : e && typeof h(e) == "object" ? JSON.stringify(e, null, 2) : e;
41
+ return e && J(e) ? JSON.stringify(JSON.parse(e), null, 2) : e && typeof h(e) == "object" ? JSON.stringify(e, null, 2) : e;
42
42
  }), _ = ["All", "Body", "Headers", "Cookies"], s = x("All");
43
43
  return (e, o) => (r(), n(g, null, {
44
- title: u(() => [
45
- p(S(R), {
44
+ title: p(() => [
45
+ u(S(E), {
46
46
  class: "text-c-3 mr-2 rotate-180",
47
47
  icon: "ExternalLink",
48
48
  size: "sm",
49
49
  thickness: "2.5"
50
50
  }),
51
- f("div", E, [
51
+ f("div", j, [
52
52
  C(" Response "),
53
- e.response ? (r(), n(J, {
53
+ e.response ? (r(), n($, {
54
54
  key: 0,
55
55
  response: e.response
56
56
  }, null, 8, ["response"])) : l("", !0)
57
57
  ])
58
58
  ]),
59
- default: u(() => [
59
+ default: p(() => [
60
60
  f("div", H, [
61
61
  e.response ? (r(), A(B, { key: 1 }, [
62
- p(N, {
62
+ u(N, {
63
63
  activeSection: s.value,
64
64
  sections: _,
65
65
  onSetActiveSection: o[0] || (o[0] = (t) => s.value = t)
66
66
  }, null, 8, ["activeSection"]),
67
- s.value === "All" || s.value === "Cookies" ? (r(), n(b, {
67
+ s.value === "All" || s.value === "Cookies" ? (r(), n(V, {
68
68
  key: 0,
69
69
  cookies: v.value
70
70
  }, null, 8, ["cookies"])) : l("", !0),
71
- s.value === "All" || s.value === "Headers" ? (r(), n(j, {
71
+ s.value === "All" || s.value === "Headers" ? (r(), n(b, {
72
72
  key: 1,
73
73
  headers: c.value
74
74
  }, null, 8, ["headers"])) : l("", !0),
75
- s.value === "All" || s.value === "Body" ? (r(), n($, {
75
+ s.value === "All" || s.value === "Body" ? (r(), n(O, {
76
76
  key: 2,
77
77
  active: !0,
78
78
  data: k.value,
79
79
  headers: c.value,
80
80
  title: "Body"
81
81
  }, null, 8, ["data", "headers"])) : l("", !0)
82
- ], 64)) : (r(), n(O, { key: 0 }))
82
+ ], 64)) : (r(), n(R, { key: 0 }))
83
83
  ])
84
84
  ]),
85
85
  _: 1
@@ -1,14 +1,8 @@
1
- import type { UpdateScheme } from '../../../store/workspace.js';
2
- import { type SecuritySchemeOptionOauth } from '../../../views/Request/libs/index.js';
3
- import type { SelectedSchemeOauth2 } from '@scalar/oas-utils/entities/workspace/security';
1
+ import type { SecuritySchemeOauth2 } from '@scalar/oas-utils/entities/workspace/security';
4
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
5
- activeScheme: SelectedSchemeOauth2;
6
- schemeModel: SecuritySchemeOptionOauth;
7
- updateScheme: UpdateScheme;
3
+ scheme: SecuritySchemeOauth2;
8
4
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
- activeScheme: SelectedSchemeOauth2;
10
- schemeModel: SecuritySchemeOptionOauth;
11
- updateScheme: UpdateScheme;
5
+ scheme: SecuritySchemeOauth2;
12
6
  }>>>, {}, {}>;
13
7
  export default _default;
14
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/OAuth2.vue"],"names":[],"mappings":"AAyKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAA;;kBAOzE,oBAAoB;iBACrB,yBAAyB;kBACxB,YAAY;;kBAFZ,oBAAoB;iBACrB,yBAAyB;kBACxB,YAAY;;AAwb5B,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/OAuth2.vue"],"names":[],"mappings":"AAwLA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAA;;YAO/E,oBAAoB;;YAApB,oBAAoB;;AA4f9B,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}