@scalar/api-client 2.2.27 → 2.2.29

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 (43) hide show
  1. package/CHANGELOG.md +26 -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 +14 -14
  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/style.css +1 -1
  12. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  13. package/dist/views/Cookies/Cookies.vue2.js +49 -43
  14. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  15. package/dist/views/Environment/Environment.vue2.js +56 -51
  16. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +3 -1
  17. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -1
  18. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +2 -2
  19. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +0 -1
  20. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  21. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +38 -41
  22. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +6 -1
  23. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  24. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  25. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +154 -44
  26. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  27. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
  28. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +53 -192
  29. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  30. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +1 -1
  31. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +84 -88
  32. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +1 -0
  33. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
  34. package/dist/views/Request/RequestSection/RequestAuth/index.js +4 -2
  35. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  36. package/dist/views/Request/RequestSection/RequestBody.vue2.js +2 -2
  37. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  38. package/dist/views/Request/RequestSection/RequestParams.vue.js +60 -99
  39. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  40. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  41. package/dist/views/Request/RequestSidebar.vue2.js +89 -90
  42. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  43. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.2.29
4
+
5
+ ### Patch Changes
6
+
7
+ - 4a2b0a4: fix: allows request sidebar search toggle
8
+ - b291406: fix(api-client): redesign auth
9
+ - b291406: style: adds data table and server auth component fixtures
10
+ - 46dce72: Fix multipart form body keys not being updated correctly
11
+ - 58a2049: style: fixes sidebar item consistency in different views
12
+ - Updated dependencies [66bc910]
13
+ - Updated dependencies [fa15b79]
14
+ - @scalar/use-toasts@0.7.8
15
+ - @scalar/use-tooltip@1.0.5
16
+ - @scalar/components@0.13.12
17
+ - @scalar/use-hooks@0.1.12
18
+ - @scalar/use-codemirror@0.11.56
19
+
20
+ ## 2.2.28
21
+
22
+ ### Patch Changes
23
+
24
+ - 4f6ebab: fix: runtime error with radix tooltip
25
+ - Updated dependencies [794ae62]
26
+ - @scalar/components@0.13.11
27
+ - @scalar/use-codemirror@0.11.55
28
+
3
29
  ## 2.2.27
4
30
 
5
31
  ### 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
- import { default as t } from "./DataTableInput.vue.js";
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";
1
+ import { default as t } from "./DataTableHeader.vue.js";
2
+ import { default as o } from "./DataTableInput.vue.js";
3
+ import { default as f } from "./DataTableRow.vue.js";
4
+ import { default as u } from "./DataTableText.vue.js";
5
+ import { default as b } from "./DataTable.vue.js";
6
+ import { default as T } from "./DataTableCell.vue.js";
7
+ import { default as s } from "./DataTableCheckbox.vue.js";
8
8
  import { default as c } from "./DataTableInputSelect.vue.js";
9
9
  export {
10
- u as DataTable,
11
- b as DataTableCell,
12
- T as DataTableCheckbox,
13
- s as DataTableHeader,
14
- t as DataTableInput,
10
+ b as DataTable,
11
+ T as DataTableCell,
12
+ s as DataTableCheckbox,
13
+ t as DataTableHeader,
14
+ o as DataTableInput,
15
15
  c as DataTableInputSelect,
16
- o as DataTableRow,
17
- f as DataTableText
16
+ f as DataTableRow,
17
+ u 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
  };