@scalar/api-client 2.1.33 → 2.1.35

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 (106) hide show
  1. package/CHANGELOG.md +36 -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/CodeInput/CodeInput.vue.js +2 -2
  5. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  6. package/dist/components/ContextBar.vue.js +1 -1
  7. package/dist/components/ContextBar.vue2.js +6 -6
  8. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  9. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  10. package/dist/components/DataTable/DataTableInput.vue2.js +53 -40
  11. package/dist/components/ScalarHotkey.vue.d.ts +5 -6
  12. package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
  13. package/dist/components/ScalarHotkey.vue.js +9 -18
  14. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  15. package/dist/components/SideNav/SideNav.vue.js +2 -2
  16. package/dist/components/SideNav/SideNav.vue2.js +8 -8
  17. package/dist/components/Sidebar/SidebarButton.vue.d.ts +4 -0
  18. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  19. package/dist/components/Sidebar/SidebarButton.vue.js +19 -17
  20. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  21. package/dist/components/TopNav/TopNav.vue.js +2 -2
  22. package/dist/components/TopNav/TopNav.vue2.js +14 -14
  23. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  24. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +8 -8
  28. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  29. package/dist/layouts/App/ApiClientApp.vue.js +35 -29
  30. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  31. package/dist/layouts/App/MainLayout.vue.js +4 -4
  32. package/dist/layouts/App/create-api-client-app.d.ts +257 -45
  33. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  34. package/dist/layouts/App/create-api-client-app.js +10 -10
  35. package/dist/layouts/App/hotkeys.js +1 -1
  36. package/dist/layouts/Modal/create-api-client-modal.d.ts +514 -90
  37. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  38. package/dist/layouts/Modal/create-api-client-modal.js +24 -22
  39. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  40. package/dist/layouts/Web/ApiClientWeb.vue.js +33 -27
  41. package/dist/layouts/Web/create-api-client-web.d.ts +258 -46
  42. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  43. package/dist/layouts/Web/create-api-client-web.js +9 -9
  44. package/dist/libs/create-client.d.ts +280 -50
  45. package/dist/libs/create-client.d.ts.map +1 -1
  46. package/dist/libs/create-client.js +25 -24
  47. package/dist/libs/hot-keys.d.ts +1 -1
  48. package/dist/libs/local-storage.d.ts +2 -2
  49. package/dist/libs/local-storage.d.ts.map +1 -1
  50. package/dist/libs/send-request.d.ts +2 -1
  51. package/dist/libs/send-request.d.ts.map +1 -1
  52. package/dist/libs/send-request.js +98 -97
  53. package/dist/router.d.ts +5 -5
  54. package/dist/router.d.ts.map +1 -1
  55. package/dist/router.js +32 -32
  56. package/dist/store/collections.d.ts +14 -4
  57. package/dist/store/collections.d.ts.map +1 -1
  58. package/dist/store/events.d.ts +1 -1
  59. package/dist/store/import-spec.d.ts +16 -31
  60. package/dist/store/import-spec.d.ts.map +1 -1
  61. package/dist/store/import-spec.js +43 -56
  62. package/dist/store/requests.d.ts +14 -14
  63. package/dist/store/store.d.ts +514 -90
  64. package/dist/store/store.d.ts.map +1 -1
  65. package/dist/store/store.js +43 -43
  66. package/dist/store/workspace.d.ts +10 -10
  67. package/dist/store/workspace.d.ts.map +1 -1
  68. package/dist/style.css +1 -1
  69. package/dist/views/Cookies/Cookies.vue.d.ts +5 -1
  70. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  71. package/dist/views/Cookies/Cookies.vue2.js +64 -55
  72. package/dist/views/Environment/Environment.vue.d.ts +5 -1
  73. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  74. package/dist/views/Environment/Environment.vue2.js +75 -66
  75. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  76. package/dist/views/Request/Request.vue.js +1 -1
  77. package/dist/views/Request/Request.vue2.js +96 -90
  78. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +21 -21
  79. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  80. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +79 -71
  81. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +2 -0
  82. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  83. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  84. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +105 -112
  85. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +5 -1
  86. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  87. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +38 -35
  88. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +5 -1
  89. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  90. package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -118
  91. package/dist/views/Request/RequestSection/RequestSection.vue2.js +126 -0
  92. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  93. package/dist/views/Request/RequestSidebar.vue.js +4 -4
  94. package/dist/views/Request/RequestSidebar.vue2.js +43 -42
  95. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  96. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  97. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -26
  98. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  99. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +1 -1
  100. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  101. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -99
  102. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +104 -2
  103. package/dist/views/Settings/SettingsGeneral.vue.js +3 -3
  104. package/dist/views/Settings/SettingsGeneralMode.vue.js +3 -3
  105. package/package.json +8 -8
  106. package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -5
@@ -1,4 +1,106 @@
1
- import f from "./ResponseSection.vue.js";
1
+ import { defineComponent as A, computed as i, ref as x, openBlock as n, createBlock as r, withCtx as d, createElementVNode as p, normalizeClass as B, createCommentVNode as l, createVNode as f, createElementBlock as v, Fragment as k } from "vue";
2
+ import S from "../../../components/ContextBar.vue.js";
3
+ import g from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import H from "./ResponseBody.vue.js";
5
+ import R from "./ResponseEmpty.vue.js";
6
+ import $ from "./ResponseLoadingOverlay.vue.js";
7
+ import V from "./ResponseMetaInformation.vue.js";
8
+ import E from "./ResponseBodyVirtual.vue.js";
9
+ /* empty css */
10
+ import I from "./ResponseCookies.vue.js";
11
+ import L from "./ResponseHeaders.vue.js";
12
+ const N = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, O = 2e5, U = /* @__PURE__ */ A({
13
+ __name: "ResponseSection",
14
+ props: {
15
+ response: {}
16
+ },
17
+ setup(y) {
18
+ const a = y, c = i(() => {
19
+ var o;
20
+ const e = (o = a.response) == null ? void 0 : o.headers;
21
+ return e ? Object.keys(e).map((s) => ({
22
+ name: s,
23
+ value: e[s],
24
+ required: !1
25
+ })).filter(
26
+ (s) => ![
27
+ "rest-api-client-content-length",
28
+ "X-API-Client-Content-Length"
29
+ ].includes(s.name)
30
+ ) : [];
31
+ }), _ = i(
32
+ () => {
33
+ var e;
34
+ return ((e = a.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((o) => {
35
+ var m, u;
36
+ const s = (u = (m = a.response) == null ? void 0 : m.headers) == null ? void 0 : u[o];
37
+ return s ? {
38
+ name: o,
39
+ value: s,
40
+ required: !1
41
+ } : [];
42
+ })) ?? [];
43
+ }
44
+ ), h = ["All", "Cookies", "Headers", "Body"], t = x("All"), C = i(
45
+ () => {
46
+ var e;
47
+ return (((e = a.response) == null ? void 0 : e.size) ?? 0) > O;
48
+ }
49
+ );
50
+ return (e, o) => (n(), r(g, null, {
51
+ title: d(() => [
52
+ p("div", {
53
+ class: B(["flex items-center flex-1", {
54
+ "animate-response-heading": e.response
55
+ }])
56
+ }, [
57
+ o[1] || (o[1] = p("span", { class: "response-heading absolute pointer-events-none" }, "Response", -1)),
58
+ e.response ? (n(), r(V, {
59
+ key: 0,
60
+ class: "animate-response-children",
61
+ response: e.response
62
+ }, null, 8, ["response"])) : l("", !0),
63
+ f(S, {
64
+ activeSection: t.value,
65
+ sections: h,
66
+ onSetActiveSection: o[0] || (o[0] = (s) => t.value = s)
67
+ }, null, 8, ["activeSection"])
68
+ ], 2)
69
+ ]),
70
+ default: d(() => {
71
+ var s;
72
+ return [
73
+ p("div", N, [
74
+ e.response ? (n(), v(k, { key: 1 }, [
75
+ t.value === "All" || t.value === "Cookies" ? (n(), r(I, {
76
+ key: 0,
77
+ cookies: _.value
78
+ }, null, 8, ["cookies"])) : l("", !0),
79
+ t.value === "All" || t.value === "Headers" ? (n(), r(L, {
80
+ key: 1,
81
+ headers: c.value
82
+ }, null, 8, ["headers"])) : l("", !0),
83
+ t.value === "All" || t.value === "Body" ? (n(), v(k, { key: 2 }, [
84
+ C.value ? (n(), r(E, {
85
+ key: 0,
86
+ content: a.response.data
87
+ }, null, 8, ["content"])) : (n(), r(H, {
88
+ key: 1,
89
+ active: !0,
90
+ data: (s = a.response) == null ? void 0 : s.data,
91
+ headers: c.value,
92
+ title: "Body"
93
+ }, null, 8, ["data", "headers"]))
94
+ ], 64)) : l("", !0)
95
+ ], 64)) : (n(), r(R, { key: 0 })),
96
+ f($)
97
+ ])
98
+ ];
99
+ }),
100
+ _: 1
101
+ }));
102
+ }
103
+ });
2
104
  export {
3
- f as default
105
+ U as default
4
106
  };
@@ -45,7 +45,7 @@ const V = { class: "bg-b-1 w-full h-full overflow-auto" }, $ = { class: "flex fl
45
45
  r[5] || (r[5] = j('<h2 class="font-bold text-xl mb-5 mt-10">Settings</h2><h3 class="font-bold mb-1">CORS Proxy</h3><p class="text-c-2 mb-2 leading-[21px]"> Browsers block cross-origin requests for security. We provide a public proxy to <a class="hover:text-c-1 underline-offset-2" href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing" target="_blank">bypass CORS issues</a>. Check the <a class="hover:text-c-1 underline-offset-2" href="https://github.com/scalar/scalar/tree/main/examples/proxy-server" target="_blank">source code on GitHub</a>. </p>', 3)),
46
46
  t("div", T, [
47
47
  d(e(m), {
48
- class: u(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-2 border-1/2", { "bg-b-1 text-c-1": e(l) }]),
48
+ class: u(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2", { "bg-b-2 text-c-1": e(l) }]),
49
49
  variant: e(l) ? "primary" : "secondary",
50
50
  onClick: r[0] || (r[0] = (s) => e(x)("https://proxy.scalar.com"))
51
51
  }, {
@@ -82,7 +82,7 @@ const V = { class: "bg-b-1 w-full h-full overflow-auto" }, $ = { class: "flex fl
82
82
  _: 1
83
83
  })) : c("", !0),
84
84
  d(e(m), {
85
- class: u(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-2 border-1/2", { "bg-b-1 text-c-1": !e(l) }]),
85
+ class: u(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2", { "bg-b-2 text-c-1": !e(l) }]),
86
86
  variant: e(l) ? "secondary" : "primary",
87
87
  onClick: r[2] || (r[2] = (s) => e(x)(""))
88
88
  }, {
@@ -110,7 +110,7 @@ const V = { class: "bg-b-1 w-full h-full overflow-auto" }, $ = { class: "flex fl
110
110
  key: s,
111
111
  class: u(["px-2", [
112
112
  "flex items-center justify-between gap-2 text-c-1 border-1/2",
113
- e(i).themeId === s ? "bg-b-1" : "bg-b-2"
113
+ e(i).themeId === s ? "bg-b-2" : "bg-b-1"
114
114
  ]]),
115
115
  variant: "ghost",
116
116
  onClick: (H) => C(s)
@@ -20,7 +20,7 @@ const C = { class: "flex flex-col gap-2" }, S = { class: "flex items-center just
20
20
  a(r(f), {
21
21
  class: n([
22
22
  "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border-1/2",
23
- e.value === "System Preference" ? "bg-b-1 text-c-1" : "bg-b-2"
23
+ e.value === "System Preference" ? "bg-b-2 text-c-1" : "bg-b-1"
24
24
  ]),
25
25
  onClick: p
26
26
  }, {
@@ -40,7 +40,7 @@ const C = { class: "flex flex-col gap-2" }, S = { class: "flex items-center just
40
40
  a(r(f), {
41
41
  class: n([
42
42
  "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border-1/2",
43
- e.value === "Light" ? "bg-b-1 text-c-1" : "bg-b-2"
43
+ e.value === "Light" ? "bg-b-2 text-c-1" : "bg-b-1"
44
44
  ]),
45
45
  onClick: b
46
46
  }, {
@@ -60,7 +60,7 @@ const C = { class: "flex flex-col gap-2" }, S = { class: "flex items-center just
60
60
  a(r(f), {
61
61
  class: n([
62
62
  "w-full shadow-none text-c-1 justify-start pl-2 gap-2 mb-8 border-1/2",
63
- e.value === "Dark" ? "bg-b-1 text-c-1" : "bg-b-2"
63
+ e.value === "Dark" ? "bg-b-2 text-c-1" : "bg-b-1"
64
64
  ]),
65
65
  onClick: x
66
66
  }, {
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.33",
21
+ "version": "2.1.35",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -153,17 +153,17 @@
153
153
  "whatwg-mimetype": "^4.0.0",
154
154
  "yaml": "^2.4.5",
155
155
  "zod": "^3.23.8",
156
- "@scalar/components": "0.12.59",
156
+ "@scalar/components": "0.12.61",
157
157
  "@scalar/draggable": "0.1.6",
158
158
  "@scalar/icons": "0.1.1",
159
+ "@scalar/oas-utils": "0.2.62",
159
160
  "@scalar/object-utils": "1.1.10",
160
- "@scalar/oas-utils": "0.2.60",
161
- "@scalar/openapi-parser": "0.8.7",
162
161
  "@scalar/openapi-types": "0.1.4",
162
+ "@scalar/openapi-parser": "0.8.8",
163
+ "@scalar/themes": "0.9.43",
163
164
  "@scalar/types": "0.0.17",
164
- "@scalar/themes": "0.9.41",
165
+ "@scalar/use-codemirror": "0.11.28",
165
166
  "@scalar/use-toasts": "0.7.7",
166
- "@scalar/use-codemirror": "0.11.26",
167
167
  "@scalar/use-tooltip": "1.0.3"
168
168
  },
169
169
  "devDependencies": {
@@ -178,11 +178,11 @@
178
178
  "tailwindcss": "^3.4.4",
179
179
  "tailwindcss-color-mix": "^0.0.8",
180
180
  "type-fest": "^4.20.0",
181
- "vite": "^5.2.10",
181
+ "vite": "^5.4.9",
182
182
  "vite-svg-loader": "^5.1.0",
183
183
  "vitest": "^1.6.0",
184
184
  "@scalar/build-tooling": "0.1.11",
185
- "@scalar/galaxy": "0.2.12"
185
+ "@scalar/galaxy": "0.2.13"
186
186
  },
187
187
  "scripts": {
188
188
  "build": "vite build && pnpm types:build && tsc-alias -p tsconfig.build.json",
@@ -1,5 +0,0 @@
1
- import o from "./RequestSection.vue.js";
2
- /* empty css */
3
- export {
4
- o as default
5
- };