@scalar/api-client 2.1.22 → 2.1.23

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 (64) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +22 -0
  3. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  4. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  5. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +163 -154
  6. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  7. package/dist/components/DataTable/DataTableCell.vue.js +5 -5
  8. package/dist/components/DataTable/DataTableText.vue.d.ts +12 -3
  9. package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
  10. package/dist/components/DataTable/DataTableText.vue.js +13 -9
  11. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  12. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +84 -63
  13. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  14. package/dist/components/ImportCollection/ImportNowButton.vue.js +36 -40
  15. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts +3 -0
  16. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -0
  17. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +125 -0
  18. package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +4 -0
  19. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
  20. package/dist/components/ImportCurl/ImportCurlModal.vue.js +2 -2
  21. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +28 -27
  22. package/dist/components/SideNav/SideHelp.vue.js +1 -1
  23. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  24. package/dist/components/SideNav/SideNav.vue.js +1 -1
  25. package/dist/components/SideNav/SideNav.vue2.js +8 -8
  26. package/dist/data/httpHeaders.d.ts +6 -0
  27. package/dist/data/httpHeaders.d.ts.map +1 -0
  28. package/dist/data/httpHeaders.js +537 -0
  29. package/dist/layouts/App/create-api-client-app.d.ts +8 -8
  30. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  31. package/dist/layouts/Modal/create-api-client-modal.d.ts +16 -16
  32. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  33. package/dist/layouts/Web/create-api-client-web.d.ts +8 -8
  34. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  35. package/dist/libs/create-client.d.ts +8 -8
  36. package/dist/libs/create-client.d.ts.map +1 -1
  37. package/dist/libs/importers/curl.d.ts +25 -1
  38. package/dist/libs/importers/curl.d.ts.map +1 -1
  39. package/dist/libs/importers/curl.js +40 -38
  40. package/dist/libs/parse-curl.d.ts +3 -4
  41. package/dist/libs/parse-curl.d.ts.map +1 -1
  42. package/dist/libs/parse-curl.js +58 -55
  43. package/dist/store/collections.d.ts.map +1 -1
  44. package/dist/store/import-spec.d.ts.map +1 -1
  45. package/dist/store/request-example.d.ts +4 -4
  46. package/dist/store/requests.d.ts +4 -4
  47. package/dist/store/store.d.ts +16 -16
  48. package/dist/store/store.d.ts.map +1 -1
  49. package/dist/store/tags.d.ts.map +1 -1
  50. package/dist/style.css +1 -1
  51. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  52. package/dist/views/Cookies/Cookies.vue2.js +21 -21
  53. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  54. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  55. package/dist/views/Request/RequestSidebar.vue2.js +35 -34
  56. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  57. package/dist/views/Request/RequestSidebarItem.vue2.js +43 -43
  58. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  59. package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
  60. package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
  61. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  62. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  63. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +43 -22
  64. package/package.json +10 -10
@@ -1,55 +1,76 @@
1
- import { defineComponent as c, openBlock as e, createBlock as n, withCtx as t, createTextVNode as d, createElementBlock as o, Fragment as f, renderList as u, createVNode as m } from "vue";
2
- import p from "../../../components/DataTable/DataTable.vue.js";
3
- import x from "../../../components/DataTable/DataTableRow.vue.js";
4
- import l from "../../../components/DataTable/DataTableText.vue.js";
5
- import _ from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
6
- const h = {
1
+ import { defineComponent as _, openBlock as e, createBlock as o, withCtx as t, createTextVNode as s, createElementBlock as m, Fragment as i, renderList as x, createVNode as d, toDisplayString as c } from "vue";
2
+ import h from "../../../components/DataTable/DataTable.vue.js";
3
+ import k from "../../../components/DataTable/DataTableRow.vue.js";
4
+ import u from "../../../components/DataTable/DataTableText.vue.js";
5
+ import y from "../../../components/HelpfulLink.vue.js";
6
+ import g from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
+ import { httpHeaders as b } from "../../../data/httpHeaders.js";
8
+ const C = {
7
9
  key: 1,
8
10
  class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
9
- }, B = /* @__PURE__ */ c({
11
+ }, D = /* @__PURE__ */ _({
10
12
  __name: "ResponseHeaders",
11
13
  props: {
12
14
  headers: {}
13
15
  },
14
- setup(k) {
15
- return (r, a) => (e(), n(_, {
16
+ setup(w) {
17
+ const l = (r) => b.find(
18
+ (n) => n.name.toLowerCase() === r.toLowerCase()
19
+ );
20
+ return (r, n) => (e(), o(g, {
16
21
  defaultOpen: !1,
17
22
  itemCount: r.headers.length
18
23
  }, {
19
- title: t(() => a[0] || (a[0] = [
20
- d("Headers")
24
+ title: t(() => n[0] || (n[0] = [
25
+ s("Headers")
21
26
  ])),
22
27
  default: t(() => [
23
- r.headers.length ? (e(), n(p, {
28
+ r.headers.length ? (e(), o(h, {
24
29
  key: 0,
25
30
  columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
26
31
  scroll: ""
27
32
  }, {
28
33
  default: t(() => [
29
- (e(!0), o(f, null, u(r.headers, (s, i) => (e(), n(x, {
30
- key: i,
34
+ (e(!0), m(i, null, x(r.headers, (a, p) => (e(), o(k, {
35
+ key: p,
31
36
  class: "text-c-1"
32
37
  }, {
33
38
  default: t(() => [
34
- m(l, {
35
- class: "sticky left-0 z-1 bg-b-1 max-w-48",
36
- text: s.name
37
- }, null, 8, ["text"]),
38
- m(l, {
39
+ d(u, { class: "sticky left-0 z-1 bg-b-1 max-w-48" }, {
40
+ default: t(() => {
41
+ var f;
42
+ return [
43
+ typeof ((f = l(a.name)) == null ? void 0 : f.url) == "string" ? (e(), o(y, {
44
+ key: 0,
45
+ class: "decoration-c-3",
46
+ href: l(a.name).url
47
+ }, {
48
+ default: t(() => [
49
+ s(c(a.name), 1)
50
+ ]),
51
+ _: 2
52
+ }, 1032, ["href"])) : (e(), m(i, { key: 1 }, [
53
+ s(c(a.name), 1)
54
+ ], 64))
55
+ ];
56
+ }),
57
+ _: 2
58
+ }, 1024),
59
+ d(u, {
39
60
  class: "z-0",
40
- text: s.value
61
+ text: a.value
41
62
  }, null, 8, ["text"])
42
63
  ]),
43
64
  _: 2
44
65
  }, 1024))), 128))
45
66
  ]),
46
67
  _: 1
47
- })) : (e(), o("div", h, " No Headers "))
68
+ })) : (e(), m("div", C, " No Headers "))
48
69
  ]),
49
70
  _: 1
50
71
  }, 8, ["itemCount"]));
51
72
  }
52
73
  });
53
74
  export {
54
- B as default
75
+ D as default
55
76
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.22",
21
+ "version": "2.1.23",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -152,21 +152,20 @@
152
152
  "whatwg-mimetype": "^4.0.0",
153
153
  "yaml": "^2.4.5",
154
154
  "zod": "^3.23.8",
155
- "@scalar/components": "0.12.54",
155
+ "@scalar/components": "0.12.55",
156
156
  "@scalar/draggable": "0.1.6",
157
+ "@scalar/oas-utils": "0.2.57",
157
158
  "@scalar/icons": "0.1.1",
158
- "@scalar/oas-utils": "0.2.56",
159
- "@scalar/openapi-parser": "0.8.6",
160
- "@scalar/object-utils": "1.1.10",
161
- "@scalar/themes": "0.9.37",
159
+ "@scalar/openapi-parser": "0.8.7",
162
160
  "@scalar/openapi-types": "0.1.3",
163
- "@scalar/use-codemirror": "0.11.21",
164
- "@scalar/use-tooltip": "1.0.3",
161
+ "@scalar/object-utils": "1.1.10",
162
+ "@scalar/themes": "0.9.38",
163
+ "@scalar/types": "0.0.16",
164
+ "@scalar/use-codemirror": "0.11.22",
165
165
  "@scalar/use-toasts": "0.7.7",
166
- "@scalar/types": "0.0.15"
166
+ "@scalar/use-tooltip": "1.0.3"
167
167
  },
168
168
  "devDependencies": {
169
- "@types/content-type": "^1.1.8",
170
169
  "@types/js-cookie": "^3.0.6",
171
170
  "@types/shell-quote": "^1.7.5",
172
171
  "@types/whatwg-mimetype": "^3.0.2",
@@ -190,6 +189,7 @@
190
189
  "lint:fix": "eslint . --fix",
191
190
  "playground:app": "vite ./playground/app -c ./vite.config.ts",
192
191
  "playground:modal": "vite ./playground/modal -c ./vite.config.ts",
192
+ "playground:web": "vite ./playground/web -c ./vite.config.ts",
193
193
  "preview": "vite preview",
194
194
  "test": "vitest",
195
195
  "types:build": "vue-tsc -p tsconfig.build.json",