@scalar/api-client 2.2.59 → 2.2.61

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 (65) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +88 -80
  5. package/dist/components/IconSelector.vue.d.ts.map +1 -1
  6. package/dist/components/IconSelector.vue.js +1 -0
  7. package/dist/components/SectionFilter.vue.d.ts +23 -0
  8. package/dist/components/SectionFilter.vue.d.ts.map +1 -0
  9. package/dist/components/SectionFilter.vue.js +7 -0
  10. package/dist/components/SectionFilter.vue2.js +67 -0
  11. package/dist/components/SectionFilterButton.vue.d.ts +22 -0
  12. package/dist/components/SectionFilterButton.vue.d.ts.map +1 -0
  13. package/dist/components/SectionFilterButton.vue.js +23 -0
  14. package/dist/components/SectionFilterButton.vue2.js +4 -0
  15. package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
  16. package/dist/components/Server/ServerDropdown.vue.js +1 -0
  17. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  18. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +62 -44
  19. package/dist/layouts/App/create-api-client-app.d.ts +2 -1
  20. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  21. package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -2
  22. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  23. package/dist/layouts/Web/create-api-client-web.d.ts +2 -1
  24. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  25. package/dist/libs/create-client.d.ts +3 -1
  26. package/dist/libs/create-client.d.ts.map +1 -1
  27. package/dist/store/events.d.ts +4 -0
  28. package/dist/store/events.d.ts.map +1 -1
  29. package/dist/store/events.js +4 -0
  30. package/dist/store/store.d.ts +1 -0
  31. package/dist/store/store.d.ts.map +1 -1
  32. package/dist/style.css +1 -1
  33. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
  34. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +10 -10
  35. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  36. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  37. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +88 -83
  38. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
  39. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +1 -1
  40. package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts +2 -0
  41. package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts.map +1 -0
  42. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  43. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  44. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +36 -36
  45. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  46. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  47. package/dist/views/Request/RequestSection/RequestSection.vue2.js +103 -83
  48. package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -1
  49. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  50. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  51. package/dist/views/Request/RequestSidebarItem.vue2.js +81 -81
  52. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
  53. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +9 -9
  54. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  55. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
  56. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +26 -21
  57. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  58. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  59. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  60. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +80 -65
  61. package/package.json +14 -14
  62. package/dist/components/ContextBar.vue.d.ts +0 -11
  63. package/dist/components/ContextBar.vue.d.ts.map +0 -1
  64. package/dist/components/ContextBar.vue.js +0 -7
  65. package/dist/components/ContextBar.vue2.js +0 -47
@@ -1,52 +1,56 @@
1
- import { defineComponent as A, computed as u, ref as T, openBlock as a, createBlock as l, withCtx as d, createElementVNode as p, normalizeClass as f, createCommentVNode as c, createVNode as v, createElementBlock as y, Fragment as h } from "vue";
2
- import g from "../../../components/ContextBar.vue.js";
3
- import j from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import S from "./ResponseBody.vue.js";
5
- import b from "./ResponseEmpty.vue.js";
6
- import q from "./ResponseLoadingOverlay.vue.js";
7
- import H from "./ResponseMetaInformation.vue.js";
8
- import V from "./ResponseBodyVirtual.vue.js";
1
+ import { defineComponent as j, computed as d, ref as T, useId as g, openBlock as l, createBlock as i, withCtx as v, createElementVNode as u, normalizeClass as y, createCommentVNode as c, createVNode as h, createElementBlock as k, Fragment as A } from "vue";
2
+ import I from "../../../components/SectionFilter.vue.js";
3
+ import V from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import H from "./ResponseBody.vue.js";
5
+ import q from "./ResponseEmpty.vue.js";
6
+ import E from "./ResponseLoadingOverlay.vue.js";
7
+ import O from "./ResponseMetaInformation.vue.js";
8
+ import $ from "./ResponseBodyVirtual.vue.js";
9
9
  /* empty css */
10
- import $ from "./ResponseCookies.vue.js";
11
- import w from "./ResponseHeaders.vue.js";
12
- const z = { class: "flex h-8 flex-1 items-center" }, k = 2e5, U = /* @__PURE__ */ A({
10
+ import w from "./ResponseCookies.vue.js";
11
+ import z from "./ResponseHeaders.vue.js";
12
+ const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], x = 2e5, J = /* @__PURE__ */ j({
13
13
  __name: "ResponseSection",
14
14
  props: {
15
15
  numWorkspaceRequests: {},
16
16
  response: {}
17
17
  },
18
18
  setup(n) {
19
- const m = u(() => {
20
- var t;
21
- const e = (t = n.response) == null ? void 0 : t.headers;
22
- return e ? Object.keys(e).map((s) => ({
23
- name: s,
24
- value: e[s] ?? "",
19
+ const m = d(() => {
20
+ var o;
21
+ const e = (o = n.response) == null ? void 0 : o.headers;
22
+ return e ? Object.keys(e).map((a) => ({
23
+ name: a,
24
+ value: e[a] ?? "",
25
25
  required: !1
26
26
  })).filter(
27
- (s) => ![
27
+ (a) => ![
28
28
  "rest-api-client-content-length",
29
29
  "X-API-Client-Content-Length"
30
- ].includes(s.name)
30
+ ].includes(a.name)
31
31
  ) : [];
32
- }), x = u(
32
+ }), B = d(
33
33
  () => {
34
34
  var e;
35
- return ((e = n.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((t) => {
36
- var i, r;
37
- const s = (r = (i = n.response) == null ? void 0 : i.headers) == null ? void 0 : r[t];
38
- return s ? {
39
- name: t,
40
- value: s,
35
+ return ((e = n.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((o) => {
36
+ var t, r;
37
+ const a = (r = (t = n.response) == null ? void 0 : t.headers) == null ? void 0 : r[o];
38
+ return a ? {
39
+ name: o,
40
+ value: a,
41
41
  required: !1
42
42
  } : [];
43
43
  })) ?? [];
44
44
  }
45
- ), B = ["All", "Cookies", "Headers", "Body"], o = T("All"), R = u(() => {
46
- var i, r;
45
+ ), b = ["Cookies", "Headers", "Body"], s = T("All"), f = d(() => ["All", ...b]), p = d(
46
+ () => Object.fromEntries(
47
+ f.value.map((e) => [e, g()])
48
+ )
49
+ ), R = d(() => {
50
+ var t, r;
47
51
  if (!n.response) return !1;
48
- const e = ((i = n.response.headers) == null ? void 0 : i["content-type"]) || ((r = n.response.headers) == null ? void 0 : r["Content-Type"]);
49
- return !e || (n.response.size ?? 0) <= k || e.includes("text/html") ? !1 : [
52
+ const e = ((t = n.response.headers) == null ? void 0 : t["content-type"]) || ((r = n.response.headers) == null ? void 0 : r["Content-Type"]);
53
+ return !e || (n.response.size ?? 0) <= x || e.includes("text/html") ? !1 : [
50
54
  // Text types
51
55
  "text/",
52
56
  // JSON types
@@ -73,66 +77,77 @@ const z = { class: "flex h-8 flex-1 items-center" }, k = 2e5, U = /* @__PURE__ *
73
77
  "application/x-java-source",
74
78
  // Form data
75
79
  "application/x-www-form-urlencoded"
76
- ].some((C) => e.includes(C)) && (n.response.size ?? 0) > k;
80
+ ].some((C) => e.includes(C)) && (n.response.size ?? 0) > x;
77
81
  });
78
- return (e, t) => (a(), l(j, { "aria-label": "Response" }, {
79
- title: d(() => [
80
- p("div", z, [
81
- p("div", {
82
+ return (e, o) => (l(), i(V, { "aria-label": "Response" }, {
83
+ title: v(() => [
84
+ u("div", L, [
85
+ u("div", {
82
86
  "aria-live": "polite",
83
- class: f(["flex items-center", { "animate-response-heading": e.response }])
87
+ class: y(["flex items-center", { "animate-response-heading": e.response }])
84
88
  }, [
85
- t[1] || (t[1] = p("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
86
- e.response ? (a(), l(H, {
89
+ o[1] || (o[1] = u("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
90
+ e.response ? (l(), i(O, {
87
91
  key: 0,
88
92
  class: "animate-response-children",
89
93
  response: e.response
90
94
  }, null, 8, ["response"])) : c("", !0)
91
95
  ], 2),
92
- v(g, {
93
- activeSection: o.value,
94
- sections: B,
95
- onSetActiveSection: t[0] || (t[0] = (s) => o.value = s)
96
- }, null, 8, ["activeSection"])
96
+ h(I, {
97
+ modelValue: s.value,
98
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => s.value = a),
99
+ filterIds: p.value,
100
+ filters: f.value
101
+ }, null, 8, ["modelValue", "filterIds", "filters"])
97
102
  ])
98
103
  ]),
99
- default: d(() => {
100
- var s, i, r;
104
+ default: v(() => {
105
+ var a, t, r;
101
106
  return [
102
- p("div", {
103
- class: f(["custom-scroll relative grid h-full justify-stretch divide-y", {
107
+ u("div", {
108
+ id: p.value.All,
109
+ class: y(["custom-scroll relative grid h-full justify-stretch divide-y", {
104
110
  "content-start": e.response
105
- }])
111
+ }]),
112
+ role: s.value === "All" && e.response ? "tabpanel" : "none"
106
113
  }, [
107
- e.response ? (a(), y(h, { key: 1 }, [
108
- o.value === "All" || o.value === "Cookies" ? (a(), l($, {
114
+ e.response ? (l(), k(A, { key: 1 }, [
115
+ s.value === "All" || s.value === "Cookies" ? (l(), i(w, {
109
116
  key: 0,
110
- cookies: x.value
111
- }, null, 8, ["cookies"])) : c("", !0),
112
- o.value === "All" || o.value === "Headers" ? (a(), l(w, {
117
+ id: p.value.Cookies,
118
+ cookies: B.value,
119
+ role: s.value === "All" ? "none" : "tabpanel"
120
+ }, null, 8, ["id", "cookies", "role"])) : c("", !0),
121
+ s.value === "All" || s.value === "Headers" ? (l(), i(z, {
113
122
  key: 1,
114
- headers: m.value
115
- }, null, 8, ["headers"])) : c("", !0),
116
- o.value === "All" || o.value === "Body" ? (a(), y(h, { key: 2 }, [
117
- R.value && typeof ((s = e.response) == null ? void 0 : s.data) == "string" ? (a(), l(V, {
123
+ id: p.value.Headers,
124
+ headers: m.value,
125
+ role: s.value === "All" ? "none" : "tabpanel"
126
+ }, null, 8, ["id", "headers", "role"])) : c("", !0),
127
+ s.value === "All" || s.value === "Body" ? (l(), k(A, { key: 2 }, [
128
+ R.value && typeof ((a = e.response) == null ? void 0 : a.data) == "string" ? (l(), i($, {
118
129
  key: 0,
130
+ id: p.value.Body,
119
131
  content: e.response.data,
120
- data: (i = e.response) == null ? void 0 : i.data,
121
- headers: m.value
122
- }, null, 8, ["content", "data", "headers"])) : (a(), l(S, {
132
+ data: (t = e.response) == null ? void 0 : t.data,
133
+ headers: m.value,
134
+ role: s.value === "All" ? "none" : "tabpanel"
135
+ }, null, 8, ["id", "content", "data", "headers", "role"])) : (l(), i(H, {
123
136
  key: 1,
137
+ id: p.value.Body,
124
138
  active: !0,
125
139
  data: (r = e.response) == null ? void 0 : r.data,
126
140
  headers: m.value,
141
+ role: s.value === "All" ? "none" : "tabpanel",
127
142
  title: "Body"
128
- }, null, 8, ["data", "headers"]))
143
+ }, null, 8, ["id", "data", "headers", "role"]))
129
144
  ], 64)) : c("", !0)
130
- ], 64)) : (a(), l(b, {
145
+ ], 64)) : (l(), i(q, {
131
146
  key: 0,
132
147
  numWorkspaceRequests: e.numWorkspaceRequests
133
148
  }, null, 8, ["numWorkspaceRequests"])),
134
- v(q)
135
- ], 2)
149
+ h(E)
150
+ ], 10, N)
136
151
  ];
137
152
  }),
138
153
  _: 1
@@ -140,5 +155,5 @@ const z = { class: "flex h-8 flex-1 items-center" }, k = 2e5, U = /* @__PURE__ *
140
155
  }
141
156
  });
142
157
  export {
143
- U as default
158
+ J as default
144
159
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.2.59",
21
+ "version": "2.2.61",
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.31",
191
+ "@scalar/draggable": "0.1.11",
192
+ "@scalar/components": "0.13.33",
193
+ "@scalar/import": "0.2.35",
192
194
  "@scalar/icons": "0.1.3",
193
- "@scalar/import": "0.2.33",
194
- "@scalar/oas-utils": "0.2.113",
195
+ "@scalar/oas-utils": "0.2.115",
195
196
  "@scalar/object-utils": "1.1.13",
196
- "@scalar/draggable": "0.1.11",
197
- "@scalar/openapi-parser": "0.10.9",
197
+ "@scalar/openapi-parser": "0.10.10",
198
198
  "@scalar/openapi-types": "0.1.9",
199
+ "@scalar/postman-to-openapi": "0.1.38",
200
+ "@scalar/types": "0.0.40",
201
+ "@scalar/themes": "0.9.75",
199
202
  "@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",
203
+ "@scalar/use-codemirror": "0.11.78",
204
+ "@scalar/use-hooks": "0.1.29",
204
205
  "@scalar/use-toasts": "0.7.9",
205
- "@scalar/use-tooltip": "1.0.6",
206
- "@scalar/use-codemirror": "0.11.76"
206
+ "@scalar/use-tooltip": "1.0.6"
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.16",
223
- "@scalar/galaxy": "0.2.24"
222
+ "@scalar/galaxy": "0.2.24",
223
+ "@scalar/build-tooling": "0.1.17"
224
224
  },
225
225
  "scripts": {
226
226
  "build": "scalar-build-vite",
@@ -1,11 +0,0 @@
1
- type __VLS_Props = {
2
- sections: string[];
3
- activeSection: string;
4
- };
5
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
6
- setActiveSection: (value: string) => any;
7
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
- onSetActiveSection?: (value: string) => any;
9
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLFieldSetElement>;
10
- export default _default;
11
- //# sourceMappingURL=ContextBar.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContextBar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ContextBar.vue"],"names":[],"mappings":"AAgJA,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAC;;;;;;AAsKF,wBAQG"}
@@ -1,7 +0,0 @@
1
- import o from "./ContextBar.vue2.js";
2
- /* empty css */
3
- import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5e53c8fe"]]);
5
- export {
6
- f as default
7
- };
@@ -1,47 +0,0 @@
1
- import { defineComponent as x, useId as f, computed as h, openBlock as r, createElementBlock as i, createElementVNode as e, Fragment as g, renderList as _, normalizeClass as b, createTextVNode as y, toDisplayString as l, withDirectives as S, unref as a, vModelRadio as w, createVNode as k } from "vue";
2
- import { ScalarIcon as V } from "@scalar/components";
3
- const q = { class: "filter-hover context-bar-group ml-auto hidden lg:flex lg:w-[120px]" }, B = { class: "request-section-content request-section-content-filter fade-request-section-content text-c-3 pointer-events-auto relative hidden w-full justify-end gap-[1.5px] rounded py-2 text-xs xl:flex" }, C = ["name", "value"], F = { class: "context-bar-group-hover:text-c-1 absolute -right-[30px] top-1/2 flex -translate-y-1/2 items-center" }, N = { class: "context-bar-group-hover:hidden mr-1.5" }, D = /* @__PURE__ */ x({
4
- __name: "ContextBar",
5
- props: {
6
- sections: {},
7
- activeSection: {}
8
- },
9
- emits: ["setActiveSection"],
10
- setup(c, { emit: d }) {
11
- const u = c, p = d, m = f(), t = h({
12
- get: () => u.activeSection,
13
- set: (s) => p("setActiveSection", s)
14
- });
15
- return (s, o) => (r(), i("fieldset", q, [
16
- o[1] || (o[1] = e("legend", { class: "sr-only" }, "Filter Sections", -1)),
17
- e("div", B, [
18
- (r(!0), i(g, null, _(s.sections, (n) => (r(), i("label", {
19
- key: n,
20
- class: b(["filter-hover-item hover:bg-b-2 flex w-fit cursor-pointer items-center whitespace-nowrap rounded p-1 px-2 text-center font-medium has-[:focus-visible]:outline", [t.value === n ? "text-c-1 pointer-events-none" : ""]])
21
- }, [
22
- y(l(n) + " ", 1),
23
- S(e("input", {
24
- "onUpdate:modelValue": o[0] || (o[0] = (v) => t.value = v),
25
- class: "sr-only",
26
- name: a(m),
27
- type: "radio",
28
- value: n
29
- }, null, 8, C), [
30
- [w, t.value]
31
- ])
32
- ], 2))), 128)),
33
- e("div", F, [
34
- e("span", N, l(t.value), 1),
35
- k(a(V), {
36
- icon: "FilterList",
37
- size: "md",
38
- thickness: "2"
39
- })
40
- ])
41
- ])
42
- ]));
43
- }
44
- });
45
- export {
46
- D as default
47
- };