@scalar/api-client 2.2.28 → 2.2.30

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 (59) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  3. package/dist/components/DataTable/DataTableInput.vue.js +1 -1
  4. package/dist/components/DataTable/DataTableInput.vue2.js +31 -32
  5. package/dist/components/DataTable/index.js +12 -12
  6. package/dist/components/Sidebar/SidebarList.vue.d.ts.map +1 -1
  7. package/dist/components/Sidebar/SidebarList.vue.js +4 -4
  8. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +2 -0
  9. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  10. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +39 -28
  11. package/dist/hooks/useLayout.js +1 -1
  12. package/dist/libs/find-request.d.ts +53 -0
  13. package/dist/libs/find-request.d.ts.map +1 -0
  14. package/dist/libs/find-request.js +22 -0
  15. package/dist/libs/importers/index.d.ts +1 -1
  16. package/dist/libs/importers/index.d.ts.map +1 -1
  17. package/dist/libs/index.d.ts +1 -0
  18. package/dist/libs/index.d.ts.map +1 -1
  19. package/dist/libs/index.js +31 -29
  20. package/dist/store/active-entities.d.ts +18 -14
  21. package/dist/store/active-entities.d.ts.map +1 -1
  22. package/dist/store/active-entities.js +30 -27
  23. package/dist/style.css +1 -1
  24. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  25. package/dist/views/Cookies/Cookies.vue2.js +49 -43
  26. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  27. package/dist/views/Environment/Environment.vue2.js +56 -51
  28. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +3 -1
  29. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -1
  30. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +2 -2
  31. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +0 -1
  32. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  33. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +38 -41
  34. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +6 -1
  35. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  36. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  37. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +154 -44
  38. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  39. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
  40. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +53 -192
  41. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  42. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +1 -1
  43. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +84 -88
  44. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +1 -0
  45. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
  46. package/dist/views/Request/RequestSection/RequestAuth/index.js +4 -2
  47. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  48. package/dist/views/Request/RequestSection/RequestBody.vue2.js +2 -2
  49. package/dist/views/Request/RequestSection/index.d.ts +2 -0
  50. package/dist/views/Request/RequestSection/index.d.ts.map +1 -0
  51. package/dist/views/Request/RequestSection/index.js +4 -0
  52. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  53. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  54. package/dist/views/Request/RequestSidebar.vue2.js +89 -90
  55. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  56. package/dist/views/Request/ResponseSection/index.d.ts +2 -0
  57. package/dist/views/Request/ResponseSection/index.d.ts.map +1 -0
  58. package/dist/views/Request/ResponseSection/index.js +4 -0
  59. package/package.json +18 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.2.30
4
+
5
+ ### Patch Changes
6
+
7
+ - 1785304: feat: export extra packages and add findRequest lib
8
+
9
+ ## 2.2.29
10
+
11
+ ### Patch Changes
12
+
13
+ - 4a2b0a4: fix: allows request sidebar search toggle
14
+ - b291406: fix(api-client): redesign auth
15
+ - b291406: style: adds data table and server auth component fixtures
16
+ - 46dce72: Fix multipart form body keys not being updated correctly
17
+ - 58a2049: style: fixes sidebar item consistency in different views
18
+ - Updated dependencies [66bc910]
19
+ - Updated dependencies [fa15b79]
20
+ - @scalar/use-toasts@0.7.8
21
+ - @scalar/use-tooltip@1.0.5
22
+ - @scalar/components@0.13.12
23
+ - @scalar/use-hooks@0.1.12
24
+ - @scalar/use-codemirror@0.11.56
25
+
3
26
  ## 2.2.28
4
27
 
5
28
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"AA+KA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAS/C,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,cAAc,CAAC,EAAE,YAAY,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC;AAqDJ,iBAAS,cAAc;WA6OT,OAAO,IAA6B;;yBAVrB,GAAG;yBACF,GAAG;sBACN,GAAG;;;;EAa7B;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cAlUN,OAAO;2BAGM,OAAO;cACpB,OAAO;6EAsUpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"AAkKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAS/C,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,cAAc,CAAC,EAAE,YAAY,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC;AAwCJ,iBAAS,cAAc;WA4OT,OAAO,IAA6B;;yBAVrB,GAAG;yBACF,GAAG;sBACN,GAAG;;;;EAa7B;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cApTN,OAAO;2BAGM,OAAO;cACpB,OAAO;6EAwTpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import t from "./DataTableInput.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ a(t, [["__scopeId", "data-v-b750a6e5"]]);
4
+ const e = /* @__PURE__ */ a(t, [["__scopeId", "data-v-ea527929"]]);
5
5
  export {
6
6
  e as default
7
7
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as V, ref as i, computed as b, openBlock as l, createBlock as u, normalizeClass as k, withCtx as g, createElementBlock as r, renderSlot as p, createCommentVNode as d, createElementVNode as C, Fragment as B, mergeProps as f, unref as $ } from "vue";
2
- import h from "../CodeInput/CodeInput.vue.js";
3
- import { ScalarIconButton as q } from "@scalar/components";
4
- import x from "./DataTableCell.vue.js";
5
- import O from "./DataTableInputSelect.vue.js";
6
- const A = {
1
+ import { defineComponent as w, ref as m, computed as b, openBlock as l, createBlock as u, normalizeClass as k, withCtx as g, createElementBlock as r, renderSlot as i, createTextVNode as C, createCommentVNode as d, createElementVNode as B, Fragment as $, mergeProps as f, unref as h } from "vue";
2
+ import q from "../CodeInput/CodeInput.vue.js";
3
+ import { ScalarIconButton as x } from "@scalar/components";
4
+ import O from "./DataTableCell.vue.js";
5
+ import A from "./DataTableInputSelect.vue.js";
6
+ const I = {
7
7
  key: 0,
8
- class: "text-c-1 flex min-w-[94px] items-center pl-2 pr-0"
9
- }, I = { class: "row-1 overflow-x-auto" }, E = ["id", "readOnly", "type", "value"], F = {
8
+ class: "text-c-1 flex items-center pl-3 pr-0"
9
+ }, E = { class: "row-1 overflow-x-auto" }, F = ["id", "readOnly", "type", "value"], S = {
10
10
  key: 2,
11
11
  class: "scalar-input-required absolute centered-y right-2 pt-px text-xxs text-c-3 bg-b-1 shadow-[-8px_0_4px_var(--scalar-background-1)] opacity-100 duration-150 transition-opacity peer-has-[:focus-visible]:opacity-0"
12
- }, S = {
12
+ }, T = {
13
13
  key: 1,
14
14
  class: "absolute centered-y right-7 text-orange text-xs"
15
- }, U = /* @__PURE__ */ V({
15
+ }, z = /* @__PURE__ */ w({
16
16
  inheritAttrs: !1,
17
17
  __name: "DataTableInput",
18
18
  props: {
@@ -28,29 +28,28 @@ const A = {
28
28
  max: {}
29
29
  },
30
30
  emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
31
- setup(c, { emit: y }) {
32
- const o = c, s = y, n = i(!0);
33
- i("");
34
- const v = i(!1), w = () => {
31
+ setup(y, { emit: c }) {
32
+ const o = y, s = c, n = m(!0), v = m(!1), V = () => {
35
33
  v.value || s("inputBlur");
36
- }, m = b(
34
+ }, p = b(
37
35
  () => o.type === "password" ? n.value ? "password" : "text" : o.type ?? "text"
38
36
  );
39
- return (e, t) => (l(), u(x, {
37
+ return (e, t) => (l(), u(O, {
40
38
  class: k(["relative row", e.containerClass])
41
39
  }, {
42
40
  default: g(() => [
43
- e.$slots.default ? (l(), r("div", A, [
44
- p(e.$slots, "default", {}, void 0, !0)
41
+ e.$slots.default ? (l(), r("div", I, [
42
+ i(e.$slots, "default", {}, void 0, !0),
43
+ t[5] || (t[5] = C(": "))
45
44
  ])) : d("", !0),
46
- C("div", I, [
47
- o.enum && o.enum.length ? (l(), u(O, {
45
+ B("div", E, [
46
+ o.enum && o.enum.length ? (l(), u(A, {
48
47
  key: 0,
49
48
  canAddCustomValue: e.canAddCustomEnumValue,
50
49
  modelValue: o.modelValue,
51
50
  value: o.enum,
52
51
  "onUpdate:modelValue": t[0] || (t[0] = (a) => s("update:modelValue", a))
53
- }, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (l(), r(B, { key: 1 }, [
52
+ }, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (l(), r($, { key: 1 }, [
54
53
  n.value && e.type === "password" ? (l(), r("input", f({ key: 0 }, e.$attrs, {
55
54
  id: e.id,
56
55
  autocomplete: "off",
@@ -58,13 +57,13 @@ const A = {
58
57
  "data-1p-ignore": "",
59
58
  readOnly: e.readOnly,
60
59
  spellcheck: "false",
61
- type: m.value,
60
+ type: p.value,
62
61
  value: e.modelValue,
63
62
  onInput: t[1] || (t[1] = (a) => s(
64
63
  "update:modelValue",
65
64
  a.target.value ?? ""
66
65
  ))
67
- }), null, 16, E)) : (l(), u(h, f({ key: 1 }, e.$attrs, {
66
+ }), null, 16, F)) : (l(), u(q, f({ key: 1 }, e.$attrs, {
68
67
  id: e.id,
69
68
  class: "border-none text-c-1 disabled:text-c-2 min-w-0 w-full peer",
70
69
  disableCloseBrackets: "",
@@ -75,21 +74,21 @@ const A = {
75
74
  readOnly: e.readOnly,
76
75
  required: e.required,
77
76
  spellcheck: "false",
78
- type: m.value,
79
- onBlur: w,
77
+ type: p.value,
78
+ onBlur: V,
80
79
  onFocus: t[2] || (t[2] = (a) => s("inputFocus")),
81
80
  "onUpdate:modelValue": t[3] || (t[3] = (a) => s("update:modelValue", a))
82
81
  }), null, 16, ["id", "max", "min", "modelValue", "readOnly", "required", "type"])),
83
- e.required ? (l(), r("div", F, " Required ")) : d("", !0)
82
+ e.required ? (l(), r("div", S, " Required ")) : d("", !0)
84
83
  ], 64))
85
84
  ]),
86
- e.$slots.warning ? (l(), r("div", S, [
87
- p(e.$slots, "warning", {}, void 0, !0)
85
+ e.$slots.warning ? (l(), r("div", T, [
86
+ i(e.$slots, "warning", {}, void 0, !0)
88
87
  ])) : d("", !0),
89
- p(e.$slots, "icon", {}, void 0, !0),
90
- e.type === "password" ? (l(), u($(q), {
88
+ i(e.$slots, "icon", {}, void 0, !0),
89
+ e.type === "password" ? (l(), u(h(x), {
91
90
  key: 2,
92
- class: "-ml-.5 mr-1 h-6 w-6 self-center p-1.5",
91
+ class: "-ml-.5 mr-0.75 h-6 w-6 self-center p-1.5",
93
92
  icon: n.value ? "Show" : "Hide",
94
93
  label: n.value ? "Show Password" : "Hide Password",
95
94
  onClick: t[4] || (t[4] = (a) => n.value = !n.value)
@@ -100,5 +99,5 @@ const A = {
100
99
  }
101
100
  });
102
101
  export {
103
- U as default
102
+ z as default
104
103
  };
@@ -1,18 +1,18 @@
1
1
  import { default as t } from "./DataTableInput.vue.js";
2
2
  import { default as o } from "./DataTableRow.vue.js";
3
- import { default as f } from "./DataTableText.vue.js";
4
- import { default as u } from "./DataTable.vue.js";
5
- import { default as b } from "./DataTableCell.vue.js";
6
- import { default as T } from "./DataTableCheckbox.vue.js";
7
- import { default as s } from "./DataTableHeader.vue.js";
8
- import { default as c } from "./DataTableInputSelect.vue.js";
3
+ import { default as f } from "./DataTable.vue.js";
4
+ import { default as u } from "./DataTableCell.vue.js";
5
+ import { default as b } from "./DataTableCheckbox.vue.js";
6
+ import { default as T } from "./DataTableHeader.vue.js";
7
+ import { default as s } from "./DataTableInputSelect.vue.js";
8
+ import { default as c } from "./DataTableText.vue.js";
9
9
  export {
10
- u as DataTable,
11
- b as DataTableCell,
12
- T as DataTableCheckbox,
13
- s as DataTableHeader,
10
+ f as DataTable,
11
+ u as DataTableCell,
12
+ b as DataTableCheckbox,
13
+ T as DataTableHeader,
14
14
  t as DataTableInput,
15
- c as DataTableInputSelect,
15
+ s as DataTableInputSelect,
16
16
  o as DataTableRow,
17
- f as DataTableText
17
+ c as DataTableText
18
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarList.vue"],"names":[],"mappings":"AAcA,iBAAS,cAAc;WAwCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,4RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SidebarList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarList.vue"],"names":[],"mappings":"AAcA,iBAAS,cAAc;WAuCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,4RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,8 +1,8 @@
1
- import { openBlock as t, createElementBlock as o, renderSlot as r } from "vue";
1
+ import { openBlock as o, createElementBlock as t, renderSlot as r } from "vue";
2
2
  import c from "../../_virtual/_plugin-vue_export-helper.js";
3
- const s = {}, l = { class: "flex flex-col gap-px px-3 pt-2.5 pb-[75px]" };
4
- function n(e, p) {
5
- return t(), o("ul", l, [
3
+ const s = {}, l = { class: "flex flex-col gap-px px-3 pb-[75px]" };
4
+ function n(e, f) {
5
+ return o(), t("ul", l, [
6
6
  r(e.$slots, "default")
7
7
  ]);
8
8
  }
@@ -1,6 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  defaultOpen?: boolean;
3
3
  itemCount?: number;
4
+ layout?: 'client' | 'reference';
4
5
  };
5
6
  declare function __VLS_template(): {
6
7
  attrs: Partial<{}>;
@@ -22,6 +23,7 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
23
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
23
24
  defaultOpen: boolean;
24
25
  itemCount: number;
26
+ layout: "client" | "reference";
25
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
28
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
27
29
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AA+DA,KAAK,WAAW,GAAG;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAkBJ,iBAAS,cAAc;WAwIT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBA/KH,OAAO;eACT,MAAM;6EAsLpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAwEA,KAAK,WAAW,GAAG;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;AAoBJ,iBAAS,cAAc;WAuJT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBAjMH,OAAO;eACT,MAAM;YACT,QAAQ,GAAG,WAAW;6EAuMjC,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,55 +1,66 @@
1
- import { defineComponent as c, openBlock as s, createBlock as d, unref as o, withCtx as l, createElementVNode as i, createVNode as n, renderSlot as r, createElementBlock as a, toDisplayString as f, createCommentVNode as u, mergeProps as p } from "vue";
2
- import { Disclosure as m, DisclosureButton as x, DisclosurePanel as h } from "@headlessui/vue";
3
- import { ScalarIcon as b } from "@scalar/components";
4
- const g = { class: "flex items-center" }, _ = { class: "flex flex-1 items-center gap-1.5 text-c-1" }, v = {
1
+ import { defineComponent as f, openBlock as o, createBlock as i, unref as s, withCtx as l, createElementVNode as a, createVNode as u, normalizeClass as c, createCommentVNode as r, renderSlot as n, createElementBlock as d, toDisplayString as p, mergeProps as m } from "vue";
2
+ import { Disclosure as h, DisclosureButton as x, DisclosurePanel as b } from "@headlessui/vue";
3
+ import { ScalarIcon as y } from "@scalar/components";
4
+ const g = { class: "bg-b-2 flex items-center" }, v = { class: "flex flex-1 items-center gap-1.5 text-c-1" }, C = {
5
5
  key: 0,
6
6
  class: "bg-b-2 text-c-2 text-3xs inline-flex h-4 w-4 items-center justify-center rounded-full font-semibold border-1/2"
7
- }, C = {
7
+ }, _ = {
8
8
  key: 0,
9
- class: "ui-not-open:invisible flex items-center gap-2 pr-2"
10
- }, D = /* @__PURE__ */ c({
9
+ class: "ui-not-open:invisible flex items-center gap-2 pr-1.5"
10
+ }, O = /* @__PURE__ */ f({
11
11
  __name: "ViewLayoutCollapse",
12
12
  props: {
13
13
  defaultOpen: { type: Boolean, default: !0 },
14
- itemCount: { default: 0 }
14
+ itemCount: { default: 0 },
15
+ layout: { default: "client" }
15
16
  },
16
- setup(y) {
17
- return (e, k) => (s(), d(o(m), {
17
+ setup(k) {
18
+ return (e, w) => (o(), i(s(h), {
18
19
  as: "div",
19
- class: "bg-b-2 focus-within:text-c-1 text-c-2 request-item border-b-1/2",
20
- defaultOpen: e.defaultOpen
20
+ class: "focus-within:text-c-1 text-c-2 request-item border-b-1/2",
21
+ defaultOpen: e.defaultOpen,
22
+ static: e.layout === "reference"
21
23
  }, {
22
24
  default: l(({ open: t }) => [
23
- i("div", g, [
24
- n(o(x), { class: "group hover:text-c-1 flex flex-1 items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium px-1 md:px-1.5 xl:px-2 outline-none" }, {
25
+ a("div", g, [
26
+ u(s(x), {
27
+ class: c([
28
+ "group hover:text-c-1 flex flex-1 items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium max-h-8 px-1 md:px-1.5 xl:pl-2 xl:pr-0.5 outline-none",
29
+ { "!pl-3": e.layout === "reference" }
30
+ ]),
31
+ disabled: e.layout === "reference"
32
+ }, {
25
33
  default: l(() => [
26
- n(o(b), {
27
- class: "text-c-3 group-hover:text-c-1 group-focus-visible:outline ui-open:rotate-90 ui-not-open:rotate-0 rounded-[1px] outline-offset-2",
34
+ e.layout !== "reference" ? (o(), i(s(y), {
35
+ key: 0,
36
+ class: c([
37
+ "text-c-3 group-hover:text-c-1 group-focus-visible:outline ui-open:rotate-90 ui-not-open:rotate-0 rounded-px outline-offset-2"
38
+ ]),
28
39
  icon: "ChevronRight",
29
40
  size: "md"
30
- }),
31
- i("div", _, [
32
- r(e.$slots, "title", { open: t }),
33
- !t && e.itemCount ? (s(), a("span", v, f(e.itemCount), 1)) : u("", !0)
41
+ })) : r("", !0),
42
+ a("div", v, [
43
+ n(e.$slots, "title", { open: t }),
44
+ !t && e.itemCount ? (o(), d("span", C, p(e.itemCount), 1)) : r("", !0)
34
45
  ])
35
46
  ]),
36
47
  _: 2
37
- }, 1024),
38
- e.$slots.actions ? (s(), a("div", C, [
39
- r(e.$slots, "actions", { open: t })
40
- ])) : u("", !0)
48
+ }, 1032, ["class", "disabled"]),
49
+ e.$slots.actions ? (o(), d("div", _, [
50
+ n(e.$slots, "actions", { open: t })
51
+ ])) : r("", !0)
41
52
  ]),
42
- n(o(h), p(e.$attrs, { class: "h-full max-h-fit rounded-b diclosure-panel" }), {
53
+ u(s(b), m(e.$attrs, { class: "h-full max-h-fit rounded-b diclosure-panel" }), {
43
54
  default: l(() => [
44
- r(e.$slots, "default", { open: t })
55
+ n(e.$slots, "default", { open: t })
45
56
  ]),
46
57
  _: 2
47
58
  }, 1040)
48
59
  ]),
49
60
  _: 3
50
- }, 8, ["defaultOpen"]));
61
+ }, 8, ["defaultOpen", "static"]));
51
62
  }
52
63
  });
53
64
  export {
54
- D as default
65
+ O as default
55
66
  };
@@ -1,6 +1,6 @@
1
1
  import { inject as o } from "vue";
2
2
  const t = Symbol(), s = () => ({
3
- layout: o(t) ?? "desktop"
3
+ layout: o(t, "desktop")
4
4
  });
5
5
  export {
6
6
  t as LAYOUT_SYMBOL,
@@ -0,0 +1,53 @@
1
+ import type { Request } from '@scalar/oas-utils/entities/spec';
2
+ /** Convert path string like '/planets/{planetId}' to regex pattern /\/planets/([^/]+)/ */
3
+ export declare const pathToRegex: (path: string) => RegExp;
4
+ /**
5
+ * Takes a path and method and returns the request that matches the path and method while taking
6
+ * path params into account by converting to a regex. Will also return the path params if they exist
7
+ *
8
+ * @example path can be /planets/{planetId} OR /planets/1
9
+ */
10
+ export declare const findRequestByPathMethod: (path: string, method: string, requests: Request[]) => {
11
+ request: {
12
+ path: string;
13
+ type: "request";
14
+ uid: string;
15
+ selectedSecuritySchemeUids: string[];
16
+ selectedServerUid: string;
17
+ servers: string[];
18
+ examples: string[];
19
+ method: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace";
20
+ description?: string | undefined;
21
+ summary?: string | undefined;
22
+ externalDocs?: {
23
+ url: string;
24
+ description?: string | undefined;
25
+ } | undefined;
26
+ security?: Record<string, string[]>[] | undefined;
27
+ tags?: string[] | undefined;
28
+ deprecated?: boolean | undefined;
29
+ operationId?: string | undefined;
30
+ parameters?: {
31
+ required: boolean;
32
+ name: string;
33
+ in: "path" | "query" | "header" | "cookie";
34
+ deprecated: boolean;
35
+ description?: string | undefined;
36
+ example?: unknown;
37
+ schema?: unknown;
38
+ content?: unknown;
39
+ style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
40
+ examples?: Record<string, {
41
+ value?: unknown;
42
+ summary?: string | undefined;
43
+ }> | undefined;
44
+ }[] | undefined;
45
+ requestBody?: any;
46
+ responses?: Record<string, any> | undefined;
47
+ } | undefined;
48
+ pathParams: {
49
+ key: string;
50
+ value: string;
51
+ }[];
52
+ };
53
+ //# sourceMappingURL=find-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-request.d.ts","sourceRoot":"","sources":["../../src/libs/find-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAE9D,0FAA0F;AAC1F,eAAO,MAAM,WAAW,SAAU,MAAM,WASvC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,SAC5B,MAAM,UACJ,MAAM,YACJ,OAAO,EAAE;;;;;;;;;;;;;;uBA0B4qsB,CAAC;;;;;;;;;;;uBAAqX,CAAC;mBAAqC,CAAC;kBAAyB,CAAC;mBAA0B,CAAC;iBAAwB,CAAC;oBAA0H,CAAC;qBAAoC,CAAC;uBAA8B,CAAC;;;;;;;aAxBl1tB,MAAM;eAAS,MAAM;;CAuB7C,CAAA"}
@@ -0,0 +1,22 @@
1
+ const h = (e) => {
2
+ const r = "^" + // start anchor
3
+ e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\\\{([^}]+)\\\}/g, "([^/]+)") + // replace {param} with capture group
4
+ "$";
5
+ return new RegExp(r);
6
+ }, l = (e, r, u) => {
7
+ let n = [];
8
+ return { request: u.find((t) => {
9
+ if (t.method.toLowerCase() !== r.toLowerCase()) return !1;
10
+ if (t.path === e) return !0;
11
+ const c = h(t.path), s = e.match(c);
12
+ return s ? (n = s.slice(1).flatMap((p, f) => {
13
+ var o;
14
+ const a = (o = t.path.split("{")[f + 1]) == null ? void 0 : o.split("}")[0];
15
+ return a ? [{ key: a, value: p }] : [];
16
+ }), !0) : !1;
17
+ }), pathParams: n };
18
+ };
19
+ export {
20
+ l as findRequestByPathMethod,
21
+ h as pathToRegex
22
+ };
@@ -1,2 +1,2 @@
1
- export * from './curl.js';
1
+ export { importCurlCommand } from './curl.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/libs/importers/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/libs/importers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA"}
@@ -1,5 +1,6 @@
1
1
  export * from './create-client.js';
2
2
  export * from './formatters.js';
3
+ export { findRequestByPathMethod } from './find-request.js';
3
4
  export * from './errors.js';
4
5
  export * from './hot-keys.js';
5
6
  export * from './event-bus.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,SAAS,CAAA;AACvB,cAAc,6BAA6B,CAAA;AAC3C,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,SAAS,CAAA;AACvB,cAAc,6BAA6B,CAAA;AAC3C,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
@@ -1,43 +1,45 @@
1
1
  import { createApiClient as o } from "./create-client.js";
2
2
  import { formatBytes as a, formatMs as m } from "./formatters.js";
3
- import { ERRORS as p, normalizeError as f, prettyErrorMessage as n } from "./errors.js";
4
- import { DEFAULT_HOTKEYS as c, getModifiers as l, handleHotKeyDown as x } from "./hot-keys.js";
5
- import { createEventBus as u } from "./event-bus.js";
6
- import { getEnvColor as y } from "./env-helpers.js";
7
- import { formatHeaderKey as D, normalizeHeaders as R } from "./normalize-headers.js";
8
- import { loadAllResources as A } from "./local-storage.js";
3
+ import { findRequestByPathMethod as p } from "./find-request.js";
4
+ import { ERRORS as n, normalizeError as i, prettyErrorMessage as c } from "./errors.js";
5
+ import { DEFAULT_HOTKEYS as x, getModifiers as d, handleHotKeyDown as u } from "./hot-keys.js";
6
+ import { createEventBus as y } from "./event-bus.js";
7
+ import { getEnvColor as h } from "./env-helpers.js";
8
+ import { formatHeaderKey as D, normalizeHeaders as g } from "./normalize-headers.js";
9
+ import { loadAllResources as B } from "./local-storage.js";
9
10
  import { parseEnvVariables as O } from "./environment-parser.js";
10
11
  import { isUrl as v } from "./isUrl.js";
11
- import { getOpenApiDocumentDetails as F } from "./getOpenApiDocumentDetails.js";
12
+ import { getOpenApiDocumentDetails as M } from "./getOpenApiDocumentDetails.js";
12
13
  import { parseCurlCommand as K } from "./parse-curl.js";
13
- import { convertPostmanToOpenApi as T, getPostmanDocumentDetails as q, isPostmanCollection as z } from "./postman.js";
14
- import { createFetchBody as U, createFetchHeaders as b, createFetchQueryParams as k, createRequestOperation as w, decodeBuffer as L, setRequestCookies as Q } from "./send-request/send-request.js";
14
+ import { convertPostmanToOpenApi as z, getPostmanDocumentDetails as S, isPostmanCollection as U } from "./postman.js";
15
+ import { createFetchBody as k, createFetchHeaders as w, createFetchQueryParams as L, createRequestOperation as Q, decodeBuffer as V, setRequestCookies as Y } from "./send-request/send-request.js";
15
16
  export {
16
- c as DEFAULT_HOTKEYS,
17
- p as ERRORS,
18
- T as convertPostmanToOpenApi,
17
+ x as DEFAULT_HOTKEYS,
18
+ n as ERRORS,
19
+ z as convertPostmanToOpenApi,
19
20
  o as createApiClient,
20
- u as createEventBus,
21
- U as createFetchBody,
22
- b as createFetchHeaders,
23
- k as createFetchQueryParams,
24
- w as createRequestOperation,
25
- L as decodeBuffer,
21
+ y as createEventBus,
22
+ k as createFetchBody,
23
+ w as createFetchHeaders,
24
+ L as createFetchQueryParams,
25
+ Q as createRequestOperation,
26
+ V as decodeBuffer,
27
+ p as findRequestByPathMethod,
26
28
  a as formatBytes,
27
29
  D as formatHeaderKey,
28
30
  m as formatMs,
29
- y as getEnvColor,
30
- l as getModifiers,
31
- F as getOpenApiDocumentDetails,
32
- q as getPostmanDocumentDetails,
33
- x as handleHotKeyDown,
34
- z as isPostmanCollection,
31
+ h as getEnvColor,
32
+ d as getModifiers,
33
+ M as getOpenApiDocumentDetails,
34
+ S as getPostmanDocumentDetails,
35
+ u as handleHotKeyDown,
36
+ U as isPostmanCollection,
35
37
  v as isUrl,
36
- A as loadAllResources,
37
- f as normalizeError,
38
- R as normalizeHeaders,
38
+ B as loadAllResources,
39
+ i as normalizeError,
40
+ g as normalizeHeaders,
39
41
  K as parseCurlCommand,
40
42
  O as parseEnvVariables,
41
- n as prettyErrorMessage,
42
- Q as setRequestCookies
43
+ c as prettyErrorMessage,
44
+ Y as setRequestCookies
43
45
  };