@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.2.61
4
+
5
+ ### Patch Changes
6
+
7
+ - 4d03e0f: feat: multiple documents
8
+ - 2bbbf01: fix: adds auth indicator complex auth support
9
+ - Updated dependencies [0d8a24f]
10
+ - Updated dependencies [4d03e0f]
11
+ - @scalar/openapi-parser@0.10.10
12
+ - @scalar/components@0.13.33
13
+ - @scalar/types@0.0.40
14
+ - @scalar/import@0.2.35
15
+ - @scalar/oas-utils@0.2.115
16
+ - @scalar/use-codemirror@0.11.78
17
+ - @scalar/snippetz@0.2.16
18
+ - @scalar/themes@0.9.75
19
+ - @scalar/postman-to-openapi@0.1.38
20
+ - @scalar/use-hooks@0.1.29
21
+
22
+ ## 2.2.60
23
+
24
+ ### Patch Changes
25
+
26
+ - df4dee8: fix(api-client): improve api client request and response area a11y
27
+ - 23bac9d: fix: use operation security scheme if available in request
28
+ - Updated dependencies [df4dee8]
29
+ - Updated dependencies [8c5b0c6]
30
+ - Updated dependencies [fb22645]
31
+ - @scalar/components@0.13.32
32
+ - @scalar/oas-utils@0.2.114
33
+ - @scalar/use-codemirror@0.11.77
34
+ - @scalar/import@0.2.34
35
+ - @scalar/postman-to-openapi@0.1.37
36
+
3
37
  ## 2.2.59
4
38
 
5
39
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":"AAqVA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAQrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAO1D,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;;;;;AAgaJ,wBAQG"}
1
+ {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":"AAiWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAQrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAO1D,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;;;;;AAibJ,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./AddressBar.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c8bfbadd"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-5e5a3c5f"]]);
5
5
  export {
6
- s as default
6
+ e as default
7
7
  };
@@ -1,16 +1,16 @@
1
- import { defineComponent as S, useId as V, ref as i, watch as z, openBlock as b, createElementBlock as I, unref as r, createElementVNode as l, normalizeClass as L, normalizeStyle as U, createVNode as d, createBlock as M, createCommentVNode as A, withCtx as H } from "vue";
2
- import { ScalarButton as N, ScalarIcon as T } from "@scalar/components";
3
- import { REQUEST_METHODS as $ } from "@scalar/oas-utils/helpers";
4
- import O from "../CodeInput/CodeInput.vue.js";
5
- import P from "../HttpMethod/HttpMethod.vue.js";
6
- import D from "./AddressBarHistory.vue.js";
7
- import K from "../Server/ServerDropdown.vue.js";
8
- import { useWorkspace as Q } from "../../store/store.js";
9
- import { useLayout as W } from "../../hooks/useLayout.js";
10
- const j = ["id"], F = { class: "m-auto flex flex-row items-center" }, G = { class: "address-bar-bg-states text-xxs p-0.75 group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg lg:order-none lg:min-w-[580px] lg:max-w-[580px] xl:min-w-[720px] xl:max-w-[720px]" }, J = { class: "pointer-events-none absolute left-0 top-0 block h-full w-full overflow-hidden rounded-lg border" }, X = { class: "z-context-plus flex gap-1" }, Y = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, Z = {
1
+ import { defineComponent as z, useId as I, ref as i, watch as A, openBlock as k, createElementBlock as L, unref as r, createElementVNode as l, normalizeClass as U, normalizeStyle as M, createVNode as u, createBlock as $, createCommentVNode as H, withCtx as N, toDisplayString as x } from "vue";
2
+ import { ScalarButton as T, ScalarIcon as D } from "@scalar/components";
3
+ import { REQUEST_METHODS as O } from "@scalar/oas-utils/helpers";
4
+ import P from "../CodeInput/CodeInput.vue.js";
5
+ import K from "../HttpMethod/HttpMethod.vue.js";
6
+ import Q from "./AddressBarHistory.vue.js";
7
+ import W from "../Server/ServerDropdown.vue.js";
8
+ import { useWorkspace as j } from "../../store/store.js";
9
+ import { useLayout as F } from "../../hooks/useLayout.js";
10
+ const G = ["id"], J = { class: "m-auto flex flex-row items-center" }, X = { class: "address-bar-bg-states text-xxs p-0.75 group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg lg:order-none lg:min-w-[580px] lg:max-w-[580px] xl:min-w-[720px] xl:max-w-[720px]" }, Y = { class: "pointer-events-none absolute left-0 top-0 block h-full w-full overflow-hidden rounded-lg border" }, Z = { class: "z-context-plus flex gap-1" }, _ = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, ee = {
11
11
  "aria-hidden": "true",
12
12
  class: "inline-flex items-center gap-1"
13
- }, ie = /* @__PURE__ */ S({
13
+ }, oe = { class: "sr-only" }, ce = /* @__PURE__ */ z({
14
14
  __name: "AddressBar",
15
15
  props: {
16
16
  collection: {},
@@ -22,88 +22,91 @@ const j = ["id"], F = { class: "m-auto flex flex-row items-center" }, G = { clas
22
22
  },
23
23
  emits: ["importCurl"],
24
24
  setup(n) {
25
- const u = V(), { requestMutators: c, events: f } = Q(), { layout: p } = W(), v = i(null), x = (e) => {
26
- n.operation.path !== e && c.edit(n.operation.uid, "path", e);
25
+ const p = I(), { requestMutators: v, events: c } = j(), { layout: h } = F(), f = i(null), g = i(null), B = (e) => {
26
+ n.operation.path !== e && v.edit(n.operation.uid, "path", e);
27
27
  };
28
- z(
28
+ A(
29
29
  () => n.operation.path,
30
30
  (e) => {
31
- e && x(e);
31
+ e && B(e);
32
32
  }
33
33
  );
34
- const o = i(100), h = i(0), a = i(!1), s = i();
35
- function w() {
36
- a.value ? o.value -= (o.value - 15) / 60 : o.value -= h.value / 20, o.value <= 0 && (clearInterval(s.value), s.value = void 0, o.value = 100, a.value = !1);
37
- }
38
- function k() {
39
- s.value || (a.value = !0, s.value = setInterval(w, 20));
40
- }
34
+ const t = i(100), w = i(0), a = i(!1), s = i();
41
35
  function C() {
42
- h.value = o.value, a.value = !1;
36
+ a.value ? t.value -= (t.value - 15) / 60 : t.value -= w.value / 20, t.value <= 0 && (clearInterval(s.value), s.value = void 0, t.value = 100, a.value = !1);
43
37
  }
44
38
  function y() {
45
- clearInterval(s.value), s.value = void 0, o.value = 100, a.value = !1;
39
+ s.value || (a.value = !0, s.value = setInterval(C, 20));
46
40
  }
47
- f.requestStatus.on((e) => {
48
- e === "start" && k(), e === "stop" && C(), e === "abort" && y();
49
- });
50
- function B(e) {
51
- c.edit(n.operation.uid, "method", e);
41
+ function R() {
42
+ w.value = t.value, a.value = !1;
52
43
  }
53
44
  function q() {
45
+ clearInterval(s.value), s.value = void 0, t.value = 100, a.value = !1;
46
+ }
47
+ c.requestStatus.on((e) => {
48
+ e === "start" && y(), e === "stop" && R(), e === "abort" && q();
49
+ }), c.focusAddressBar.on(() => {
50
+ var e, o, d;
51
+ console.log("focusAddressBar", g.value, f.value), h === "modal" ? (o = (e = g.value) == null ? void 0 : e.$el) == null || o.focus() : (d = f.value) == null || d.focus();
52
+ });
53
+ function S(e) {
54
+ v.edit(n.operation.uid, "method", e);
55
+ }
56
+ function E() {
54
57
  const { method: e } = n.operation;
55
- return $[e].backgroundColor;
58
+ return O[e].backgroundColor;
56
59
  }
57
- function m() {
58
- a.value || (a.value = !0, f.executeRequest.emit({ requestUid: n.operation.uid }));
60
+ function b() {
61
+ a.value || (a.value = !0, c.executeRequest.emit({ requestUid: n.operation.uid }));
59
62
  }
60
- f.hotKeys.on((e) => {
61
- var t;
62
- e != null && e.focusAddressBar && ((t = v.value) == null || t.focus()), e != null && e.executeRequest && m();
63
+ c.hotKeys.on((e) => {
64
+ var o;
65
+ e != null && e.focusAddressBar && ((o = f.value) == null || o.focus()), e != null && e.executeRequest && b();
63
66
  });
64
- function R(e) {
65
- c.edit(n.operation.uid, "path", e);
67
+ function V(e) {
68
+ v.edit(n.operation.uid, "path", e);
66
69
  }
67
- return (e, t) => {
68
- var g;
69
- return b(), I("div", {
70
- id: r(u),
70
+ return (e, o) => {
71
+ var d;
72
+ return k(), L("div", {
73
+ id: r(p),
71
74
  class: "scalar-address-bar order-last h-[--scalar-address-bar-height] w-full [--scalar-address-bar-height:32px] lg:order-none lg:w-auto"
72
75
  }, [
73
- l("div", F, [
74
- l("div", G, [
75
- l("div", J, [
76
+ l("div", J, [
77
+ l("div", X, [
78
+ l("div", Y, [
76
79
  l("div", {
77
- class: L(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 z-[1002] h-full w-full", q()]),
78
- style: U({ transform: `translate3d(-${o.value}%,0,0)` })
80
+ class: U(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 z-[1002] h-full w-full", E()]),
81
+ style: M({ transform: `translate3d(-${t.value}%,0,0)` })
79
82
  }, null, 6)
80
83
  ]),
81
- l("div", X, [
82
- d(P, {
83
- isEditable: r(p) !== "modal",
84
+ l("div", Z, [
85
+ u(K, {
86
+ isEditable: r(h) !== "modal",
84
87
  isSquare: "",
85
88
  method: e.operation.method,
86
89
  teleport: "",
87
- onChange: B
90
+ onChange: S
88
91
  }, null, 8, ["isEditable", "method"])
89
92
  ]),
90
- l("div", Y, [
91
- e.collection.servers.length ? (b(), M(r(K), {
93
+ l("div", _, [
94
+ e.collection.servers.length ? (k(), $(r(W), {
92
95
  key: 0,
93
96
  collection: e.collection,
94
97
  layout: "client",
95
98
  operation: e.operation,
96
99
  server: e.server,
97
- target: r(u)
98
- }, null, 8, ["collection", "operation", "server", "target"])) : A("", !0),
99
- t[1] || (t[1] = l("div", { class: "fade-left" }, null, -1)),
100
- d(O, {
100
+ target: r(p)
101
+ }, null, 8, ["collection", "operation", "server", "target"])) : H("", !0),
102
+ o[1] || (o[1] = l("div", { class: "fade-left" }, null, -1)),
103
+ u(P, {
101
104
  ref_key: "addressBarRef",
102
- ref: v,
105
+ ref: f,
103
106
  "aria-label": "Path",
104
107
  class: "min-w-fit outline-none",
105
108
  disableCloseBrackets: "",
106
- disabled: r(p) === "modal",
109
+ disabled: r(h) === "modal",
107
110
  disableEnter: "",
108
111
  disableTabIndent: "",
109
112
  emitOnBlur: !1,
@@ -111,43 +114,48 @@ const j = ["id"], F = { class: "m-auto flex flex-row items-center" }, G = { clas
111
114
  environment: e.environment,
112
115
  importCurl: "",
113
116
  modelValue: e.operation.path,
114
- placeholder: (g = e.server) != null && g.uid && e.collection.servers.includes(e.server.uid) ? "" : "Enter a URL or cURL command",
117
+ placeholder: (d = e.server) != null && d.uid && e.collection.servers.includes(e.server.uid) ? "" : "Enter a URL or cURL command",
115
118
  server: "",
116
119
  workspace: e.workspace,
117
- onCurl: t[0] || (t[0] = (E) => e.$emit("importCurl", E)),
118
- onSubmit: m,
119
- "onUpdate:modelValue": R
120
+ onCurl: o[0] || (o[0] = (m) => e.$emit("importCurl", m)),
121
+ onSubmit: b,
122
+ "onUpdate:modelValue": V
120
123
  }, null, 8, ["disabled", "envVariables", "environment", "modelValue", "placeholder", "workspace"]),
121
- t[2] || (t[2] = l("div", { class: "fade-right" }, null, -1))
124
+ o[2] || (o[2] = l("div", { class: "fade-right" }, null, -1))
122
125
  ]),
123
- d(D, {
126
+ u(Q, {
124
127
  operation: e.operation,
125
- target: r(u)
128
+ target: r(p)
126
129
  }, null, 8, ["operation", "target"]),
127
- d(r(N), {
130
+ u(r(T), {
131
+ ref_key: "sendButtonRef",
132
+ ref: g,
128
133
  class: "z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pl-2 pr-2.5 font-bold",
129
134
  disabled: a.value,
130
- onClick: m
135
+ onClick: b
131
136
  }, {
132
- default: H(() => [
133
- l("span", Z, [
134
- d(r(T), {
135
- class: "relative shrink-0 fill-current",
136
- icon: "Play",
137
- size: "xs"
138
- }),
139
- t[3] || (t[3] = l("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
140
- ]),
141
- t[4] || (t[4] = l("span", { class: "sr-only" }, " Send Request ", -1))
142
- ]),
137
+ default: N(() => {
138
+ var m;
139
+ return [
140
+ l("span", ee, [
141
+ u(r(D), {
142
+ class: "relative shrink-0 fill-current",
143
+ icon: "Play",
144
+ size: "xs"
145
+ }),
146
+ o[3] || (o[3] = l("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
147
+ ]),
148
+ l("span", oe, " Send " + x(e.operation.method) + " request to " + x(((m = e.server) == null ? void 0 : m.url) ?? "") + x(e.operation.path), 1)
149
+ ];
150
+ }),
143
151
  _: 1
144
152
  }, 8, ["disabled"])
145
153
  ])
146
154
  ])
147
- ], 8, j);
155
+ ], 8, G);
148
156
  };
149
157
  }
150
158
  });
151
159
  export {
152
- ie as default
160
+ ce as default
153
161
  };
@@ -1 +1 @@
1
- {"version":3,"file":"IconSelector.vue.d.ts","sourceRoot":"","sources":["../../src/components/IconSelector.vue"],"names":[],"mappings":"AAoEA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,gBAAgB,CAAA;CAC7B,CAAC;AAQF,KAAK,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAA;AAC5B,KAAK,SAAS,GAAG,OAAO,GAAG,KAAK,CAAA;AAChC,KAAK,gBAAgB,GAAG,GAAG,IAAI,IAAI,SAAS,EAAE,CAAA;AAa9C,iBAAS,cAAc;WA4IT,OAAO,IAA6B;;yBATrB,GAAG;uBACJ,GAAG;;;;EAa9B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAUpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"IconSelector.vue.d.ts","sourceRoot":"","sources":["../../src/components/IconSelector.vue"],"names":[],"mappings":"AAqEA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,gBAAgB,CAAA;CAC7B,CAAC;AAQF,KAAK,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAA;AAC5B,KAAK,SAAS,GAAG,OAAO,GAAG,KAAK,CAAA;AAChC,KAAK,gBAAgB,GAAG,GAAG,IAAI,IAAI,SAAS,EAAE,CAAA;AAa9C,iBAAS,cAAc;WA4IT,OAAO,IAA6B;;yBATrB,GAAG;uBACJ,GAAG;;;;EAa9B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAUpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -16,6 +16,7 @@ const G = { class: "flex text-sm" }, L = { class: "bg-b-1 custom-scroll grid w-d
16
16
  });
17
17
  return (l, r) => (s(), n(e(I), {
18
18
  class: "bg-b-2 rounded",
19
+ focus: "",
19
20
  placement: l.placement ?? "bottom"
20
21
  }, {
21
22
  popover: o(({ close: v }) => [
@@ -0,0 +1,23 @@
1
+ declare const _default: <T extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
3
+ readonly "onUpdate:modelValue"?: (value: T) => any;
4
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & Partial<{}> & ({
5
+ modelValue?: T;
6
+ } & {
7
+ filters?: T[];
8
+ filterIds?: Record<T, string>;
9
+ })> & import("vue").PublicProps;
10
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
11
+ attrs: any;
12
+ slots: {};
13
+ emit: (evt: "update:modelValue", value: T) => void;
14
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
15
+ [key: string]: any;
16
+ }> & {
17
+ __ctx?: Awaited<typeof __VLS_setup>;
18
+ };
19
+ export default _default;
20
+ type __VLS_PrettifyLocal<T> = {
21
+ [K in keyof T]: T[K];
22
+ } & {};
23
+ //# sourceMappingURL=SectionFilter.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionFilter.vue.d.ts","sourceRoot":"","sources":["../../src/components/SectionFilter.vue"],"names":[],"mappings":"yBAiKiB,CAAC,SAAS,MAAM,eACnB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAiNxD,mBAAmB,CAAC;;;qBAtKjB,CAAC;;kBAvCF,CAAC,EAAE;oBACD,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC;MA4MwF,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;;;;YAK+B,OAAO,CAAC,OAAO,WAAW,CAAC;;AA3NvE,wBA2N4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import o from "./SectionFilter.vue2.js";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-55241daf"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,67 @@
1
+ import { defineComponent as x, mergeModels as p, useModel as h, ref as g, openBlock as i, createElementBlock as f, withKeys as m, createElementVNode as a, Fragment as b, renderList as k, createBlock as y, withCtx as V, createTextVNode as w, toDisplayString as v, createVNode as S, unref as q, nextTick as B } from "vue";
2
+ import { ScalarIcon as C } from "@scalar/components";
3
+ import I from "./SectionFilterButton.vue.js";
4
+ const _ = { 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" }, $ = { class: "context-bar-group-hover:text-c-1 absolute -right-[30px] top-1/2 flex -translate-y-1/2 items-center" }, F = { class: "context-bar-group-hover:hidden mr-1.5" }, K = /* @__PURE__ */ x({
5
+ __name: "SectionFilter",
6
+ props: /* @__PURE__ */ p({
7
+ filters: { default: () => [] },
8
+ filterIds: {}
9
+ }, {
10
+ modelValue: {},
11
+ modelModifiers: {}
12
+ }),
13
+ emits: ["update:modelValue"],
14
+ setup(l) {
15
+ const t = h(l, "modelValue"), r = g(), c = (s) => {
16
+ const o = s === "prev" ? -1 : 1, e = t.value ? l.filters.indexOf(t.value) : 0, n = l.filters.length, d = (e + o + n) % n;
17
+ t.value = l.filters[d], B(() => {
18
+ if (r.value) {
19
+ const u = r.value.querySelector(
20
+ 'button[aria-selected="true"]'
21
+ );
22
+ u && u.focus();
23
+ }
24
+ });
25
+ };
26
+ return (s, o) => (i(), f("div", {
27
+ ref_key: "tablist",
28
+ ref: r,
29
+ class: "filter-hover context-bar-group ml-auto hidden lg:flex",
30
+ role: "tablist",
31
+ onKeydown: [
32
+ o[0] || (o[0] = m((e) => c("prev"), ["left"])),
33
+ o[1] || (o[1] = m((e) => c("next"), ["right"]))
34
+ ]
35
+ }, [
36
+ a("div", _, [
37
+ (i(!0), f(b, null, k(s.filters, (e) => {
38
+ var n;
39
+ return i(), y(I, {
40
+ key: e,
41
+ class: "filter-hover-item",
42
+ controls: (n = s.filterIds) == null ? void 0 : n[e],
43
+ role: "tab",
44
+ selected: t.value === e,
45
+ onClick: (d) => t.value = e
46
+ }, {
47
+ default: V(() => [
48
+ w(v(e), 1)
49
+ ]),
50
+ _: 2
51
+ }, 1032, ["controls", "selected", "onClick"]);
52
+ }), 128)),
53
+ a("div", $, [
54
+ a("span", F, v(t.value), 1),
55
+ S(q(C), {
56
+ icon: "FilterList",
57
+ size: "md",
58
+ thickness: "2"
59
+ })
60
+ ])
61
+ ])
62
+ ], 544));
63
+ }
64
+ });
65
+ export {
66
+ K as default
67
+ };
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ selected?: boolean;
3
+ controls?: string | undefined;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLButtonElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLButtonElement>;
15
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
+ export default _default;
17
+ type __VLS_WithTemplateSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
22
+ //# sourceMappingURL=SectionFilterButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionFilterButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/SectionFilterButton.vue"],"names":[],"mappings":"AAsBA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,CAAC;AASF,iBAAS,cAAc;WAgDT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,gTAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAUpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { defineComponent as t, openBlock as o, createElementBlock as n, normalizeClass as r, renderSlot as s } from "vue";
2
+ const l = ["aria-controls", "aria-selected", "tabindex"], p = /* @__PURE__ */ t({
3
+ __name: "SectionFilterButton",
4
+ props: {
5
+ selected: { type: Boolean },
6
+ controls: {}
7
+ },
8
+ setup(a) {
9
+ return (e, c) => (o(), n("button", {
10
+ "aria-controls": e.controls ?? "",
11
+ "aria-selected": !!e.selected,
12
+ class: r(["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", { "text-c-1 pointer-events-none": e.selected }]),
13
+ role: "tab",
14
+ tabindex: e.selected ? 0 : -1,
15
+ type: "button"
16
+ }, [
17
+ s(e.$slots, "default")
18
+ ], 10, l));
19
+ }
20
+ });
21
+ export {
22
+ p as default
23
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./SectionFilterButton.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"ServerDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerDropdown.vue"],"names":[],"mappings":"AAqKA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,IAAI,SAAS,EACpB,MAAM,EACP,MAAM,iCAAiC,CAAA;AAUxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;AAgRF,wBAOG"}
1
+ {"version":3,"file":"ServerDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerDropdown.vue"],"names":[],"mappings":"AAsKA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,IAAI,SAAS,EACpB,MAAM,EACP,MAAM,iCAAiC,CAAA;AAUxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;AAgRF,wBAOG"}
@@ -65,6 +65,7 @@ const T = ["onClick"], j = { class: "flex h-4 w-4 items-center justify-center" }
65
65
  };
66
66
  return (e, r) => (n(), v(a(W), {
67
67
  class: "max-h-[inherit] p-0 text-sm",
68
+ focus: "",
68
69
  offset: 0,
69
70
  placement: "bottom-start",
70
71
  resize: "",
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAsEA,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;AAaF,iBAAS,cAAc;WA2JT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAUpG,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":"AAwFA,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;AAeF,iBAAS,cAAc;WAsKT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAUpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,67 +1,85 @@
1
- import { defineComponent as f, openBlock as o, createBlock as a, unref as l, withCtx as s, createElementVNode as i, 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: "text-c-1 flex flex-1 items-center gap-1.5" }, C = {
1
+ import { defineComponent as m, useId as h, openBlock as s, createBlock as u, unref as t, withCtx as a, createElementVNode as l, createVNode as d, normalizeClass as p, createCommentVNode as n, renderSlot as r, createElementBlock as i, createTextVNode as y, toDisplayString as f, mergeProps as b } from "vue";
2
+ import { Disclosure as x, DisclosureButton as g, DisclosurePanel as _ } from "@headlessui/vue";
3
+ import { ScalarIcon as C } from "@scalar/components";
4
+ const v = ["aria-labelledby"], k = { class: "bg-b-2 flex items-center" }, w = { class: "text-c-1 flex flex-1 items-center gap-1.5" }, B = ["id"], V = {
5
+ key: 0,
6
+ class: "sr-only"
7
+ }, $ = {
5
8
  key: 0,
6
9
  class: "bg-b-2 text-c-2 text-3xs inline-flex h-4 w-4 items-center justify-center rounded-full border font-semibold"
7
- }, k = {
10
+ }, D = { class: "sr-only" }, N = {
8
11
  key: 0,
9
12
  class: "ui-not-open:invisible flex items-center gap-2 pr-1.5"
10
- }, O = /* @__PURE__ */ f({
13
+ }, P = /* @__PURE__ */ m({
11
14
  __name: "ViewLayoutCollapse",
12
15
  props: {
13
16
  defaultOpen: { type: Boolean, default: !0 },
14
17
  itemCount: { default: 0 },
15
18
  layout: { default: "client" }
16
19
  },
17
- setup(_) {
18
- return (e, w) => (o(), a(l(h), {
20
+ setup(O) {
21
+ const c = h();
22
+ return (e, I) => (s(), u(t(x), {
19
23
  as: "div",
20
24
  class: "group/collapse focus-within:text-c-1 text-c-2 request-item",
21
25
  defaultOpen: e.defaultOpen,
22
- static: e.layout === "reference"
26
+ static: e.layout === "reference" ? !0 : void 0
23
27
  }, {
24
- default: s(({ open: t }) => [
25
- i("div", g, [
26
- u(l(x), {
27
- class: c([
28
- "hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-sm font-medium outline-none md:px-1.5 xl:pl-2 xl:pr-0.5",
29
- { "!pl-3": e.layout === "reference" },
30
- { "group-last/collapse:border-b": e.layout === "client" }
31
- ]),
32
- disabled: e.layout === "reference"
33
- }, {
34
- default: s(() => [
35
- e.layout !== "reference" ? (o(), a(l(y), {
36
- key: 0,
37
- class: c([
38
- "text-c-3 group-hover:text-c-1 ui-open:rotate-90 ui-not-open:rotate-0 rounded-px outline-offset-2 group-focus-visible:outline"
39
- ]),
40
- icon: "ChevronRight",
41
- size: "md"
42
- })) : r("", !0),
43
- i("div", v, [
44
- n(e.$slots, "title", { open: t }),
45
- !t && e.itemCount ? (o(), d("span", C, p(e.itemCount), 1)) : r("", !0)
46
- ])
28
+ default: a(({ open: o }) => [
29
+ l("section", {
30
+ "aria-labelledby": t(c),
31
+ class: "contents"
32
+ }, [
33
+ l("div", k, [
34
+ d(t(g), {
35
+ class: p([
36
+ "hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-sm font-medium outline-none md:px-1.5 xl:pl-2 xl:pr-0.5",
37
+ { "!pl-3": e.layout === "reference" },
38
+ { "group-last/collapse:border-b": e.layout === "client" }
39
+ ]),
40
+ disabled: e.layout === "reference"
41
+ }, {
42
+ default: a(() => [
43
+ e.layout !== "reference" ? (s(), u(t(C), {
44
+ key: 0,
45
+ class: p([
46
+ "text-c-3 group-hover:text-c-1 ui-open:rotate-90 ui-not-open:rotate-0 rounded-px outline-offset-2 group-focus-visible:outline"
47
+ ]),
48
+ icon: "ChevronRight",
49
+ size: "md"
50
+ })) : n("", !0),
51
+ l("h2", w, [
52
+ l("span", {
53
+ id: t(c),
54
+ class: "contents"
55
+ }, [
56
+ r(e.$slots, "title", { open: o }),
57
+ o ? n("", !0) : (s(), i("span", V, " (Collapsed) "))
58
+ ], 8, B),
59
+ !o && e.itemCount ? (s(), i("span", $, [
60
+ y(f(e.itemCount) + " ", 1),
61
+ l("span", D, "Item" + f(e.itemCount === 1 ? "" : "s"), 1)
62
+ ])) : n("", !0)
63
+ ])
64
+ ]),
65
+ _: 2
66
+ }, 1032, ["class", "disabled"]),
67
+ e.$slots.actions ? (s(), i("div", N, [
68
+ r(e.$slots, "actions", { open: o })
69
+ ])) : n("", !0)
70
+ ]),
71
+ d(t(_), b(e.$attrs, { class: "diclosure-panel h-full max-h-fit rounded-b" }), {
72
+ default: a(() => [
73
+ r(e.$slots, "default", { open: o })
47
74
  ]),
48
75
  _: 2
49
- }, 1032, ["class", "disabled"]),
50
- e.$slots.actions ? (o(), d("div", k, [
51
- n(e.$slots, "actions", { open: t })
52
- ])) : r("", !0)
53
- ]),
54
- u(l(b), m(e.$attrs, { class: "diclosure-panel h-full max-h-fit rounded-b" }), {
55
- default: s(() => [
56
- n(e.$slots, "default", { open: t })
57
- ]),
58
- _: 2
59
- }, 1040)
76
+ }, 1040)
77
+ ], 8, v)
60
78
  ]),
61
79
  _: 3
62
80
  }, 8, ["defaultOpen", "static"]));
63
81
  }
64
82
  });
65
83
  export {
66
- O as default
84
+ P as default
67
85
  };