@scalar/api-client 2.0.42 → 2.0.44

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 (40) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarHistory.vue.js +43 -46
  4. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  5. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  6. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  8. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +3 -2
  9. package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
  10. package/dist/components/SubpageHeader.vue.js +2 -2
  11. package/dist/components/SubpageHeader.vue2.js +10 -9
  12. package/dist/layouts/App/create-api-client-app.d.ts +36 -36
  13. package/dist/layouts/Modal/create-api-client-modal.d.ts +72 -72
  14. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  15. package/dist/layouts/Modal/create-api-client-modal.js +26 -18
  16. package/dist/libs/create-client.d.ts +39 -37
  17. package/dist/libs/create-client.d.ts.map +1 -1
  18. package/dist/libs/normalizeHeaders.d.ts +12 -0
  19. package/dist/libs/normalizeHeaders.d.ts.map +1 -0
  20. package/dist/libs/normalizeHeaders.js +25 -0
  21. package/dist/libs/sendRequest.d.ts.map +1 -1
  22. package/dist/libs/sendRequest.js +22 -20
  23. package/dist/store/workspace.d.ts +121 -120
  24. package/dist/store/workspace.d.ts.map +1 -1
  25. package/dist/store/workspace.js +274 -274
  26. package/dist/style.css +1 -1
  27. package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
  28. package/dist/views/Request/RequestSection/RequestAuth.vue.js +2 -2
  29. package/dist/views/Request/RequestSection/RequestAuth.vue2.js +147 -117
  30. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  31. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  32. package/dist/views/Request/RequestSection/RequestTable.vue2.js +47 -44
  33. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  34. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +30 -28
  35. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts +7 -10
  36. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  37. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +23 -24
  38. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  39. package/dist/views/Request/consts/mediaTypes.js +5 -0
  40. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;UAI1D,uBAAuB;;UAAvB,uBAAuB;;AAwJrD,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":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;UAI1D,uBAAuB;;UAAvB,uBAAuB;;AA2JrD,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,52 +1,54 @@
1
- import { defineComponent as m, openBlock as t, createBlock as c, unref as i, withCtx as r, createVNode as l, createElementVNode as a, createElementBlock as o, toDisplayString as s, createCommentVNode as n } from "vue";
2
- import { ScalarTooltip as p, ScalarIcon as f } from "@scalar/components";
3
- const d = { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, u = { class: "flex items-center text-c-2" }, h = { key: 0 }, b = {
1
+ import { defineComponent as m, openBlock as t, createBlock as c, unref as i, withCtx as a, createElementVNode as n, createVNode as l, createElementBlock as o, toDisplayString as s, createCommentVNode as r } from "vue";
2
+ import { ScalarTooltip as f, ScalarIcon as p } from "@scalar/components";
3
+ const d = { class: "pl-1 pr-1.5 py-[9px]" }, b = { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, h = { class: "flex items-center text-c-2" }, u = { key: 0 }, g = {
4
4
  key: 1,
5
5
  class: "before:content-['·'] before:block before:mx-[0.5ch] flex"
6
- }, g = {
6
+ }, x = {
7
7
  key: 2,
8
8
  class: "before:content-['·'] before:block before:mx-[0.5ch] flex whitespace-nowrap"
9
- }, k = {
9
+ }, _ = {
10
10
  key: 3,
11
11
  class: "before:content-['·'] before:block before:mx-[0.5ch] flex whitespace-nowrap"
12
- }, x = {
12
+ }, k = {
13
13
  key: 4,
14
14
  class: "before:content-['·'] before:block before:mx-[0.5ch] flex whitespace-nowrap"
15
- }, _ = {
15
+ }, y = {
16
16
  key: 0,
17
17
  class: "leading-snug text-pretty text-sm",
18
18
  style: { maxWidth: "16rem" }
19
- }, z = /* @__PURE__ */ m({
19
+ }, B = /* @__PURE__ */ m({
20
20
  __name: "RequestTableTooltip",
21
21
  props: {
22
22
  item: {}
23
23
  },
24
- setup(y) {
25
- return (e, w) => (t(), c(i(p), {
24
+ setup(w) {
25
+ return (e, v) => (t(), c(i(f), {
26
26
  align: "start",
27
27
  class: "w-full",
28
28
  delay: 0,
29
29
  side: "left",
30
- triggerClass: "p-[7px]"
30
+ triggerClass: "before:absolute before:content-[''] before:bg-gradient-to-r before:from-transparent before:to-b-1 before:min-h-full before:right-[23px] before:w-3 absolute h-8 right-0"
31
31
  }, {
32
- trigger: r(() => [
33
- l(i(f), {
34
- class: "ml-1 text-c-3 group-hover/info:text-c-1",
35
- icon: "Info",
36
- size: "sm",
37
- thickness: "1.5"
38
- })
32
+ trigger: a(() => [
33
+ n("div", d, [
34
+ l(i(p), {
35
+ class: "text-c-3 group-hover/info:text-c-1",
36
+ icon: "Info",
37
+ size: "sm",
38
+ thickness: "1.5"
39
+ })
40
+ ])
39
41
  ]),
40
- content: r(() => [
41
- a("div", d, [
42
- a("div", u, [
43
- e.item.type ? (t(), o("span", h, s(e.item.type), 1)) : n("", !0),
44
- e.item.format ? (t(), o("span", b, s(e.item.format), 1)) : n("", !0),
45
- e.item.minimum ? (t(), o("span", g, "min: " + s(e.item.minimum), 1)) : n("", !0),
46
- e.item.maximum ? (t(), o("span", k, "max: " + s(e.item.maximum), 1)) : n("", !0),
47
- e.item.default ? (t(), o("span", x, "default: " + s(e.item.default), 1)) : n("", !0)
42
+ content: a(() => [
43
+ n("div", b, [
44
+ n("div", h, [
45
+ e.item.type ? (t(), o("span", u, s(e.item.type), 1)) : r("", !0),
46
+ e.item.format ? (t(), o("span", g, s(e.item.format), 1)) : r("", !0),
47
+ e.item.minimum ? (t(), o("span", x, "min: " + s(e.item.minimum), 1)) : r("", !0),
48
+ e.item.maximum ? (t(), o("span", _, "max: " + s(e.item.maximum), 1)) : r("", !0),
49
+ e.item.default ? (t(), o("span", k, "default: " + s(e.item.default), 1)) : r("", !0)
48
50
  ]),
49
- e.item.description ? (t(), o("span", _, s(e.item.description), 1)) : n("", !0)
51
+ e.item.description ? (t(), o("span", y, s(e.item.description), 1)) : r("", !0)
50
52
  ])
51
53
  ]),
52
54
  _: 1
@@ -54,5 +56,5 @@ const d = { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-l
54
56
  }
55
57
  });
56
58
  export {
57
- z as default
59
+ B as default
58
60
  };
@@ -1,15 +1,12 @@
1
+ type Header = {
2
+ name: string;
3
+ value: string;
4
+ required: boolean;
5
+ };
1
6
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
- headers: {
3
- name: string;
4
- value: string;
5
- required: boolean;
6
- }[];
7
+ headers: Header[];
7
8
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
8
- headers: {
9
- name: string;
10
- value: string;
11
- required: boolean;
12
- }[];
9
+ headers: Header[];
13
10
  }>>>, {}, {}>;
14
11
  export default _default;
15
12
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":";aA2DW;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;aAApD;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;AA0H/D,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":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AAkDA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;;aAGrD,MAAM,EAAE;;aAAR,MAAM,EAAE;;AA+GnB,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,51 +1,50 @@
1
- import { defineComponent as u, openBlock as t, createBlock as n, withCtx as r, createTextVNode as d, createElementBlock as o, Fragment as f, renderList as p, createVNode as m } from "vue";
2
- import _ 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 h from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
6
- const k = {
1
+ import { defineComponent as c, openBlock as e, createBlock as a, withCtx as t, createTextVNode as i, createElementBlock as s, Fragment as d, renderList as f, createVNode as o } from "vue";
2
+ import u from "../../../components/DataTable/DataTable.vue.js";
3
+ import p from "../../../components/DataTable/DataTableRow.vue.js";
4
+ import m from "../../../components/DataTable/DataTableText.vue.js";
5
+ import _ from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
6
+ const x = {
7
7
  key: 1,
8
8
  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__ */ u({
9
+ }, B = /* @__PURE__ */ c({
10
10
  __name: "ResponseHeaders",
11
11
  props: {
12
12
  headers: {}
13
13
  },
14
- setup(b) {
15
- const c = (e) => e.split("-").map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join("-");
16
- return (e, a) => (t(), n(h, {
14
+ setup(h) {
15
+ return (r, k) => (e(), a(_, {
17
16
  defaultOpen: !1,
18
- itemCount: e.headers.length
17
+ itemCount: r.headers.length
19
18
  }, {
20
- title: r(() => [
21
- d("Headers")
19
+ title: t(() => [
20
+ i("Headers")
22
21
  ]),
23
- default: r(() => [
24
- e.headers.length ? (t(), n(_, {
22
+ default: t(() => [
23
+ r.headers.length ? (e(), a(u, {
25
24
  key: 0,
26
25
  columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
27
26
  scroll: ""
28
27
  }, {
29
- default: r(() => [
30
- (t(!0), o(f, null, p(e.headers, (s, i) => (t(), n(x, {
31
- key: i,
28
+ default: t(() => [
29
+ (e(!0), s(d, null, f(r.headers, (n, l) => (e(), a(p, {
30
+ key: l,
32
31
  class: "text-c-1"
33
32
  }, {
34
- default: r(() => [
35
- m(l, {
33
+ default: t(() => [
34
+ o(m, {
36
35
  class: "sticky left-0 z-1 bg-b-1 max-w-48",
37
- text: c(s.name)
36
+ text: n.name
38
37
  }, null, 8, ["text"]),
39
- m(l, {
38
+ o(m, {
40
39
  class: "z-0",
41
- text: s.value
40
+ text: n.value
42
41
  }, null, 8, ["text"])
43
42
  ]),
44
43
  _: 2
45
44
  }, 1024))), 128))
46
45
  ]),
47
46
  _: 1
48
- })) : (t(), o("div", k, " No Headers "))
47
+ })) : (e(), s("div", x, " No Headers "))
49
48
  ]),
50
49
  _: 1
51
50
  }, 8, ["itemCount"]));
@@ -1 +1 @@
1
- {"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CAuGjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
1
+ {"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CA4GjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
@@ -5,6 +5,11 @@ const n = {
5
5
  "application/javascript": { extension: ".js", raw: !0 },
6
6
  "application/json": { extension: ".json", raw: !0, language: "json" },
7
7
  "application/ld+json": { extension: ".jsonld", raw: !0, language: "json" },
8
+ "application/problem+json": {
9
+ extension: ".json",
10
+ raw: !0,
11
+ language: "json"
12
+ },
8
13
  "application/msword": { extension: ".doc" },
9
14
  "application/octet-stream": { extension: ".bin" },
10
15
  "application/ogg": { extension: ".ogx" },
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.42",
21
+ "version": "2.0.44",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -127,14 +127,14 @@
127
127
  "vue-router": "^4.3.0",
128
128
  "whatwg-mimetype": "^4.0.0",
129
129
  "zod": "^3.22.4",
130
- "@scalar/components": "0.12.27",
131
- "@scalar/oas-utils": "0.2.23",
132
130
  "@scalar/draggable": "0.1.4",
133
- "@scalar/themes": "0.9.19",
134
131
  "@scalar/object-utils": "1.1.5",
135
- "@scalar/use-codemirror": "0.11.10",
132
+ "@scalar/oas-utils": "0.2.25",
133
+ "@scalar/themes": "0.9.20",
134
+ "@scalar/use-toasts": "0.7.4",
136
135
  "@scalar/use-tooltip": "1.0.2",
137
- "@scalar/use-toasts": "0.7.4"
136
+ "@scalar/use-codemirror": "0.11.10",
137
+ "@scalar/components": "0.12.28"
138
138
  },
139
139
  "devDependencies": {
140
140
  "@types/content-type": "^1.1.8",