@scalar/api-client 2.3.10 → 2.3.12

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 (63) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBarHistory.vue2.js +45 -51
  5. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +1 -1
  6. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  7. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +3 -3
  8. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  9. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +25 -26
  10. package/dist/layouts/App/create-api-client-app.d.ts +18 -160
  11. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  12. package/dist/layouts/Modal/create-api-client-modal.d.ts +36 -320
  13. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  14. package/dist/layouts/Web/create-api-client-web.d.ts +18 -160
  15. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  16. package/dist/libs/create-client.d.ts +18 -160
  17. package/dist/libs/create-client.d.ts.map +1 -1
  18. package/dist/libs/create-client.js +40 -37
  19. package/dist/libs/send-request/create-request-operation.d.ts +1 -0
  20. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  21. package/dist/libs/send-request/create-request-operation.js +41 -41
  22. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  23. package/dist/store/import-spec.d.ts +2 -154
  24. package/dist/store/import-spec.d.ts.map +1 -1
  25. package/dist/store/import-spec.js +12 -12
  26. package/dist/store/security-schemes.d.ts +16 -6
  27. package/dist/store/security-schemes.d.ts.map +1 -1
  28. package/dist/store/store.d.ts +18 -160
  29. package/dist/store/store.d.ts.map +1 -1
  30. package/dist/style.css +1 -1
  31. package/dist/views/Collection/CollectionAuthentication.vue.js +2 -2
  32. package/dist/views/Request/Request.vue.d.ts +2 -0
  33. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  34. package/dist/views/Request/Request.vue.js +2 -2
  35. package/dist/views/Request/Request.vue2.js +35 -33
  36. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  37. package/dist/views/Request/RequestRoot.vue.js +1 -1
  38. package/dist/views/Request/RequestRoot.vue2.js +80 -69
  39. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  40. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
  41. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +32 -32
  42. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  43. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +1 -1
  44. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  45. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  46. package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -1
  47. package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts +11 -0
  48. package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +1 -0
  49. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +81 -0
  50. package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +4 -0
  51. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  52. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  53. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +6 -6
  54. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  55. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +3 -3
  56. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +2 -0
  57. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  58. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
  59. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +73 -60
  60. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  61. package/dist/views/Request/consts/mediaTypes.js +1 -0
  62. package/dist/views/Request/hooks/useOpenApiWatcher.js +25 -25
  63. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.3.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 73be3c0: fix(api-client): fix missing borders + default to code snippet open
8
+ - 75667fe: fix: updating the client store with isReadOnly
9
+ - a571d36: refactor: use central helper fetchDocument to fetch OpenAPI documents
10
+ - a097ea1: fix: download doesn’t appear anymore
11
+ - Updated dependencies [a571d36]
12
+ - Updated dependencies [cf5bf65]
13
+ - Updated dependencies [3783345]
14
+ - @scalar/oas-utils@0.2.126
15
+ - @scalar/openapi-parser@0.10.14
16
+ - @scalar/types@0.1.6
17
+ - @scalar/import@0.3.9
18
+ - @scalar/postman-to-openapi@0.1.49
19
+ - @scalar/snippetz@0.2.19
20
+ - @scalar/themes@0.9.84
21
+ - @scalar/components@0.13.43
22
+ - @scalar/use-codemirror@0.11.88
23
+ - @scalar/use-hooks@0.1.38
24
+
25
+ ## 2.3.11
26
+
27
+ ### Patch Changes
28
+
29
+ - adc6ee4: Adds support for JSON:API media type on responses
30
+ - b0a5481: feat: show request headers
31
+ - Updated dependencies [183cbba]
32
+ - Updated dependencies [e62e677]
33
+ - Updated dependencies [d5a687f]
34
+ - Updated dependencies [e09dab3]
35
+ - Updated dependencies [e62e677]
36
+ - Updated dependencies [82f16a5]
37
+ - Updated dependencies [04e27a1]
38
+ - Updated dependencies [4df5387]
39
+ - Updated dependencies [846d015]
40
+ - @scalar/snippetz@0.2.19
41
+ - @scalar/openapi-types@0.2.0
42
+ - @scalar/openapi-parser@0.10.13
43
+ - @scalar/types@0.1.5
44
+ - @scalar/oas-utils@0.2.125
45
+ - @scalar/postman-to-openapi@0.1.48
46
+ - @scalar/import@0.3.8
47
+ - @scalar/themes@0.9.83
48
+ - @scalar/components@0.13.42
49
+ - @scalar/use-codemirror@0.11.87
50
+ - @scalar/use-hooks@0.1.37
51
+
3
52
  ## 2.3.10
4
53
 
5
54
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":"AAmJA,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,iCAAiC,CAAA;AAc9E,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,SAAS,CAAA;IACpB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;AAiQF,wBAOG"}
1
+ {"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":"AAoHA,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,iCAAiC,CAAA;AAY9E,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,SAAS,CAAA;IACpB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;AAoOF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./AddressBarHistory.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-50597ffd"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4e70a4a7"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -1,93 +1,87 @@
1
- import { defineComponent as _, computed as y, openBlock as a, createBlock as i, unref as e, withCtx as o, createVNode as l, createSlots as S, createElementVNode as r, createCommentVNode as h, normalizeStyle as b, createElementBlock as M, Fragment as B, renderList as H, toDisplayString as c, normalizeClass as w } from "vue";
2
- import { Menu as z, MenuButton as I, MenuItems as E, MenuItem as F } from "@headlessui/vue";
3
- import { ScalarFloating as N, ScalarIcon as U, ScalarFloatingBackdrop as V } from "@scalar/components";
1
+ import { defineComponent as x, computed as _, openBlock as a, createBlock as i, unref as e, withCtx as o, createVNode as l, createSlots as y, createElementVNode as s, createCommentVNode as p, normalizeStyle as C, createElementBlock as S, Fragment as b, renderList as H, toDisplayString as u, normalizeClass as q } from "vue";
2
+ import { Menu as B, MenuButton as M, MenuItems as w, MenuItem as z } from "@headlessui/vue";
3
+ import { ScalarFloating as I, ScalarIcon as F, ScalarFloatingBackdrop as N } from "@scalar/components";
4
4
  import { httpStatusCodes as R } from "@scalar/oas-utils/helpers";
5
- import { useRouter as W } from "vue-router";
6
- import { formatMs as A } from "../../libs/formatters.js";
7
- import { PathId as g } from "../../routes.js";
8
- import D from "../HttpMethod/HttpMethod.vue.js";
9
- import { getStatusCodeColor as L } from "./httpStatusCodeColors.js";
10
- import { useWorkspace as P } from "../../store/store.js";
11
- const $ = { class: "min-w-0" }, j = { class: "text-c-1 min-w-0 truncate" }, te = /* @__PURE__ */ _({
5
+ import { formatMs as V } from "../../libs/formatters.js";
6
+ import E from "../HttpMethod/HttpMethod.vue.js";
7
+ import { getStatusCodeColor as A } from "./httpStatusCodeColors.js";
8
+ import { useWorkspace as D } from "../../store/store.js";
9
+ const L = { class: "min-w-0" }, U = { class: "text-c-1 min-w-0 truncate" }, Q = /* @__PURE__ */ x({
12
10
  __name: "AddressBarHistory",
13
11
  props: {
14
12
  operation: {},
15
13
  target: {}
16
14
  },
17
- setup(m) {
18
- const { requestHistory: k, requestExampleMutators: v } = P(), p = W(), f = y(
19
- () => k.filter((s) => s.request.requestUid === m.operation.uid).slice().reverse()
15
+ setup(f) {
16
+ const { requestHistory: h } = D(), d = _(
17
+ () => h.filter((r) => r.request.requestUid === f.operation.uid).slice().reverse()
20
18
  );
21
- function x(s) {
22
- const n = p.currentRoute.value.params.workspace;
23
- m.operation.uid !== s.request.requestUid && p.push({
24
- name: "request",
25
- params: {
26
- [g.Workspace]: n,
27
- [g.Request]: s.request.requestUid
28
- }
29
- }), v.set({ ...s.request });
19
+ function g(r) {
20
+ console.warn(
21
+ "Restoring from the request history doesn’t work yet. Request History Item:",
22
+ r
23
+ );
30
24
  }
31
- return (s, n) => (a(), i(e(z), { as: "div" }, {
32
- default: o(({ open: q }) => [
33
- l(e(N), {
25
+ return (r, m) => (a(), i(e(B), { as: "div" }, {
26
+ default: o(({ open: v }) => [
27
+ l(e(I), {
34
28
  offset: 0,
35
29
  resize: "",
36
- target: s.target
37
- }, S({
30
+ target: r.target
31
+ }, y({
38
32
  default: o(() => {
39
- var u;
33
+ var n;
40
34
  return [
41
- (u = f.value) != null && u.length ? (a(), i(e(I), {
35
+ (n = d.value) != null && n.length ? (a(), i(e(M), {
42
36
  key: 0,
43
37
  class: "address-bar-history-button z-context-plus text-c-3 focus:text-c-1 relative mr-1 rounded-lg p-1.5"
44
38
  }, {
45
39
  default: o(() => [
46
- l(e(U), {
40
+ l(e(F), {
47
41
  icon: "History",
48
42
  size: "sm",
49
43
  thickness: "2.25"
50
44
  }),
51
- n[0] || (n[0] = r("span", { class: "sr-only" }, "Request History", -1))
45
+ m[0] || (m[0] = s("span", { class: "sr-only" }, "Request History", -1))
52
46
  ]),
53
47
  _: 1
54
- })) : h("", !0)
48
+ })) : p("", !0)
55
49
  ];
56
50
  }),
57
51
  _: 2
58
52
  }, [
59
- q ? {
53
+ v ? {
60
54
  name: "floating",
61
- fn: o(({ width: u }) => [
62
- l(e(E), {
55
+ fn: o(({ width: n }) => [
56
+ l(e(w), {
63
57
  class: "custom-scroll p-0.75 grid max-h-[inherit] grid-cols-[44px,1fr,repeat(3,auto)] items-center border-t",
64
58
  static: "",
65
- style: b({ width: u })
59
+ style: C({ width: n })
66
60
  }, {
67
61
  default: o(() => [
68
- (a(!0), M(B, null, H(f.value, (t, C) => (a(), i(e(F), {
62
+ (a(!0), S(b, null, H(d.value, (t, k) => (a(), i(e(z), {
69
63
  key: t.timestamp,
70
64
  as: "button",
71
65
  class: "font-code *:ui-active:bg-b-2 text-c-2 contents text-sm font-medium *:flex *:h-8 *:cursor-pointer *:items-center *:rounded-none *:px-1.5 first:*:rounded-l last:*:rounded-r",
72
- value: C,
73
- onClick: (d) => x(t)
66
+ value: k,
67
+ onClick: (c) => g(t)
74
68
  }, {
75
69
  default: o(() => {
76
- var d;
70
+ var c;
77
71
  return [
78
- t.response.method ? (a(), i(D, {
72
+ t.response.method ? (a(), i(E, {
79
73
  key: 0,
80
74
  class: "text-[11px]",
81
75
  method: t.response.method
82
- }, null, 8, ["method"])) : h("", !0),
83
- r("div", $, [
84
- r("div", j, c(t.response.path), 1)
76
+ }, null, 8, ["method"])) : p("", !0),
77
+ s("div", L, [
78
+ s("div", U, u(t.response.path), 1)
85
79
  ]),
86
- r("div", null, c(e(A)(t.response.duration)), 1),
87
- r("div", {
88
- class: w([e(L)(t.response.status).color])
89
- }, c(t.response.status), 3),
90
- r("div", null, c((d = e(R)[t.response.status]) == null ? void 0 : d.name), 1)
80
+ s("div", null, u(e(V)(t.response.duration)), 1),
81
+ s("div", {
82
+ class: q([e(A)(t.response.status).color])
83
+ }, u(t.response.status), 3),
84
+ s("div", null, u((c = e(R)[t.response.status]) == null ? void 0 : c.name), 1)
91
85
  ];
92
86
  }),
93
87
  _: 2
@@ -95,7 +89,7 @@ const $ = { class: "min-w-0" }, j = { class: "text-c-1 min-w-0 truncate" }, te =
95
89
  ]),
96
90
  _: 2
97
91
  }, 1032, ["style"]),
98
- l(e(V), { class: "-top-[--scalar-address-bar-height] rounded-lg" })
92
+ l(e(N), { class: "-top-[--scalar-address-bar-height] rounded-lg" })
99
93
  ]),
100
94
  key: "0"
101
95
  } : void 0
@@ -106,5 +100,5 @@ const $ = { class: "min-w-0" }, j = { class: "text-c-1 min-w-0 truncate" }, te =
106
100
  }
107
101
  });
108
102
  export {
109
- te as default
103
+ Q as default
110
104
  };
@@ -16,7 +16,7 @@ export declare function useUrlPrefetcher(): {
16
16
  url: string | null;
17
17
  error: string | null;
18
18
  };
19
- prefetchUrl: (input: string | null, proxy?: string) => Promise<{
19
+ prefetchUrl: (input: string | null, proxyUrl?: string) => Promise<{
20
20
  state: string;
21
21
  content: null;
22
22
  url: null;
@@ -1 +1 @@
1
- {"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eAVvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;eACf,MAAM,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;yBAsH4B,MAAM,GAAG,IAAI,UAAU,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB9E"}
1
+ {"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eAVvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;eACf,MAAM,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;yBAsH4B,MAAM,GAAG,IAAI,aAAa,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBjF"}
@@ -2,7 +2,7 @@ import { resolve as i } from "@scalar/import";
2
2
  import { redirectToProxy as f, fetchWithProxyFallback as d } from "@scalar/oas-utils/helpers";
3
3
  import { reactive as h } from "vue";
4
4
  import { isUrl as m } from "../../../libs/isUrl.js";
5
- function y() {
5
+ function b() {
6
6
  const n = h({
7
7
  state: "idle",
8
8
  content: null,
@@ -58,7 +58,7 @@ function y() {
58
58
  error: "Oops, we got invalid content for the given URL."
59
59
  };
60
60
  const o = t, l = await d(o, {
61
- proxy: r,
61
+ proxyUrl: r,
62
62
  cache: "no-cache"
63
63
  });
64
64
  return l.ok ? {
@@ -101,5 +101,5 @@ function y() {
101
101
  };
102
102
  }
103
103
  export {
104
- y as useUrlPrefetcher
104
+ b as useUrlPrefetcher
105
105
  };
@@ -1 +1 @@
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
+ {"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;WAoKT,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,5 +1,5 @@
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";
1
+ import { defineComponent as m, useId as h, openBlock as s, createBlock as d, unref as t, normalizeClass as a, withCtx as r, createElementVNode as l, createVNode as f, createCommentVNode as n, renderSlot as i, createElementBlock as c, createTextVNode as y, toDisplayString as p, mergeProps as b } from "vue";
2
+ import { Disclosure as x, DisclosureButton as _, DisclosurePanel as g } from "@headlessui/vue";
3
3
  import { ScalarIcon as C } from "@scalar/components";
4
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
5
  key: 0,
@@ -18,31 +18,30 @@ const v = ["aria-labelledby"], k = { class: "bg-b-2 flex items-center" }, w = {
18
18
  layout: { default: "client" }
19
19
  },
20
20
  setup(O) {
21
- const c = h();
22
- return (e, I) => (s(), u(t(x), {
21
+ const u = h();
22
+ return (e, I) => (s(), d(t(x), {
23
23
  as: "div",
24
- class: "group/collapse focus-within:text-c-1 text-c-2 request-item",
24
+ class: a(["group/collapse focus-within:text-c-1 text-c-2 border-b", { "first-of-type:last-of-type:border-b-0": e.layout === "reference" }]),
25
25
  defaultOpen: e.defaultOpen,
26
26
  static: e.layout === "reference" ? !0 : void 0
27
27
  }, {
28
- default: a(({ open: o }) => [
28
+ default: r(({ open: o }) => [
29
29
  l("section", {
30
- "aria-labelledby": t(c),
30
+ "aria-labelledby": t(u),
31
31
  class: "contents"
32
32
  }, [
33
33
  l("div", k, [
34
- d(t(g), {
35
- class: p([
34
+ f(t(_), {
35
+ class: a([
36
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" }
37
+ { "!pl-3": e.layout === "reference" }
39
38
  ]),
40
39
  disabled: e.layout === "reference"
41
40
  }, {
42
- default: a(() => [
43
- e.layout !== "reference" ? (s(), u(t(C), {
41
+ default: r(() => [
42
+ e.layout !== "reference" ? (s(), d(t(C), {
44
43
  key: 0,
45
- class: p([
44
+ class: a([
46
45
  "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
46
  ]),
48
47
  icon: "ChevronRight",
@@ -50,34 +49,34 @@ const v = ["aria-labelledby"], k = { class: "bg-b-2 flex items-center" }, w = {
50
49
  })) : n("", !0),
51
50
  l("h2", w, [
52
51
  l("span", {
53
- id: t(c),
52
+ id: t(u),
54
53
  class: "contents"
55
54
  }, [
56
- r(e.$slots, "title", { open: o }),
57
- o ? n("", !0) : (s(), i("span", V, " (Collapsed) "))
55
+ i(e.$slots, "title", { open: o }),
56
+ o ? n("", !0) : (s(), c("span", V, " (Collapsed) "))
58
57
  ], 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)
58
+ !o && e.itemCount ? (s(), c("span", $, [
59
+ y(p(e.itemCount) + " ", 1),
60
+ l("span", D, "Item" + p(e.itemCount === 1 ? "" : "s"), 1)
62
61
  ])) : n("", !0)
63
62
  ])
64
63
  ]),
65
64
  _: 2
66
65
  }, 1032, ["class", "disabled"]),
67
- e.$slots.actions ? (s(), i("div", N, [
68
- r(e.$slots, "actions", { open: o })
66
+ e.$slots.actions ? (s(), c("div", N, [
67
+ i(e.$slots, "actions", { open: o })
69
68
  ])) : n("", !0)
70
69
  ]),
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 })
70
+ f(t(g), b(e.$attrs, { class: "diclosure-panel h-full max-h-fit rounded-b" }), {
71
+ default: r(() => [
72
+ i(e.$slots, "default", { open: o })
74
73
  ]),
75
74
  _: 2
76
75
  }, 1040)
77
76
  ], 8, v)
78
77
  ]),
79
78
  _: 3
80
- }, 8, ["defaultOpen", "static"]));
79
+ }, 8, ["class", "defaultOpen", "static"]));
81
80
  }
82
81
  });
83
82
  export {