@scalar/api-client 2.3.32 → 2.3.34

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 (105) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  3. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  4. package/dist/components/CodeInput/CodeInput.vue2.js +63 -61
  5. package/dist/components/DataTable/DataTable.vue.js +1 -1
  6. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  7. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +58 -48
  8. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -2
  9. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  10. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +34 -32
  11. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  12. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
  13. package/dist/hooks/useClientConfig.d.ts +3 -0
  14. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  15. package/dist/layouts/App/create-api-client-app.d.ts +64 -24
  16. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  17. package/dist/layouts/Modal/create-api-client-modal.d.ts +128 -48
  18. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  19. package/dist/layouts/Web/create-api-client-web.d.ts +64 -24
  20. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  21. package/dist/libs/create-client.d.ts +64 -24
  22. package/dist/libs/create-client.d.ts.map +1 -1
  23. package/dist/libs/index.js +32 -29
  24. package/dist/libs/local-storage.d.ts +8 -0
  25. package/dist/libs/local-storage.d.ts.map +1 -1
  26. package/dist/libs/local-storage.js +28 -24
  27. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  28. package/dist/libs/send-request/create-request-operation.js +8 -8
  29. package/dist/libs/send-request/create-request-operation.test.d.ts +2 -2
  30. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  31. package/dist/libs/send-request/decode-buffer.js +4 -4
  32. package/dist/libs/send-request/index.d.ts +1 -0
  33. package/dist/libs/send-request/index.d.ts.map +1 -1
  34. package/dist/libs/send-request/index.js +6 -4
  35. package/dist/store/active-entities.d.ts +2 -2
  36. package/dist/store/active-entities.d.ts.map +1 -1
  37. package/dist/store/request-example.d.ts +22 -22
  38. package/dist/store/request-example.d.ts.map +1 -1
  39. package/dist/store/security-schemes.d.ts +42 -2
  40. package/dist/store/security-schemes.d.ts.map +1 -1
  41. package/dist/store/store.d.ts +64 -24
  42. package/dist/store/store.d.ts.map +1 -1
  43. package/dist/style.css +1 -1
  44. package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -1
  45. package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
  46. package/dist/views/Collection/CollectionAuthentication.vue2.js +32 -32
  47. package/dist/views/Collection/CollectionEnvironment.vue.d.ts.map +1 -1
  48. package/dist/views/Collection/CollectionEnvironment.vue.js +3 -2
  49. package/dist/views/Collection/CollectionEnvironment.vue2.js +233 -9
  50. package/dist/views/Collection/CollectionNavigation.vue.js +36 -36
  51. package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
  52. package/dist/views/Collection/CollectionServers.vue2.js +6 -6
  53. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +13 -0
  54. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +1 -0
  55. package/dist/views/Collection/components/EnvironmentForm.vue.js +7 -0
  56. package/dist/views/Collection/components/EnvironmentForm.vue2.js +274 -0
  57. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
  58. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +35 -34
  59. package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
  60. package/dist/views/Environment/EnvironmentModal.vue.js +32 -28
  61. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -0
  62. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  63. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +67 -65
  64. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  65. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +94 -97
  66. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -0
  67. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  68. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  69. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +116 -99
  70. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -0
  71. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  72. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
  73. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +27 -25
  74. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -0
  75. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  76. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
  77. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +114 -73
  78. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  79. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  80. package/dist/views/Request/RequestSection/RequestSection.vue2.js +15 -15
  81. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  82. package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -4
  83. package/dist/views/Request/RequestSection/RequestTable.vue2.js +42 -40
  84. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +8 -0
  85. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -0
  86. package/dist/views/Request/RequestSection/helpers/update-scheme.js +17 -0
  87. package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts +2 -0
  88. package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts.map +1 -0
  89. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  90. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  91. package/dist/views/Request/RequestSidebar.vue2.js +87 -84
  92. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  93. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +21 -21
  94. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
  95. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +11 -11
  96. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  97. package/dist/views/Request/consts/index.js +7 -5
  98. package/dist/views/Request/consts/mediaTypes.d.ts +4 -0
  99. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  100. package/dist/views/Request/consts/mediaTypes.js +21 -4
  101. package/dist/views/Request/consts/mediaTypes.test.d.ts +2 -0
  102. package/dist/views/Request/consts/mediaTypes.test.d.ts.map +1 -0
  103. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  104. package/dist/views/Request/libs/oauth2.js +53 -47
  105. package/package.json +14 -14
package/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.3.34
4
+
5
+ ### Patch Changes
6
+
7
+ - 6b4a3c3: chore: export decodeBuffer
8
+ - cd0722d: fix(api-client): add aria label to request table code inputs
9
+ - Updated dependencies [be8a6ec]
10
+ - Updated dependencies [1843cfe]
11
+ - @scalar/types@0.1.16
12
+ - @scalar/components@0.13.59
13
+ - @scalar/oas-utils@0.2.144
14
+ - @scalar/openapi-parser@0.10.17
15
+ - @scalar/snippetz@0.2.20
16
+ - @scalar/themes@0.11.3
17
+ - @scalar/use-codemirror@0.11.104
18
+ - @scalar/import@0.3.27
19
+ - @scalar/postman-to-openapi@0.2.17
20
+ - @scalar/use-hooks@0.1.50
21
+ - @scalar/icons@0.3.7
22
+
23
+ ## 2.3.33
24
+
25
+ ### Patch Changes
26
+
27
+ - f711ab5: feat: add auth persistance to references
28
+ - ec30edd: feat: adds collection environment page
29
+ - e7f61ce: feat: support fallback for +json MIME types
30
+ - 52dd8a1: fix: displays wrapped auth description on hover
31
+ - cb9428c: Support additional query parameters for the OAuth authorization request (prompt, audience, anything), and handle OAuth authorization denials
32
+ - 67aa0f4: fix: render correct queries with form data
33
+ - ac16fca: fix: updates border style on request section
34
+ - 1966c5a: fix: remove streaming header check as it was incorrect
35
+ - ac16fca: fix: sidebar search visual indicator on navigation
36
+ - Updated dependencies [f711ab5]
37
+ - Updated dependencies [90b773e]
38
+ - Updated dependencies [0222ad4]
39
+ - Updated dependencies [cb9428c]
40
+ - Updated dependencies [af38fa6]
41
+ - Updated dependencies [67aa0f4]
42
+ - @scalar/types@0.1.15
43
+ - @scalar/themes@0.11.2
44
+ - @scalar/openapi-types@0.2.3
45
+ - @scalar/components@0.13.58
46
+ - @scalar/oas-utils@0.2.143
47
+ - @scalar/openapi-parser@0.10.17
48
+ - @scalar/snippetz@0.2.20
49
+ - @scalar/use-codemirror@0.11.103
50
+ - @scalar/use-hooks@0.1.49
51
+ - @scalar/postman-to-openapi@0.2.16
52
+ - @scalar/import@0.3.26
53
+ - @scalar/icons@0.3.6
54
+
3
55
  ## 2.3.32
4
56
 
5
57
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAkiBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;;kBAYxC,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;eAChB,SAAS;mBACL,OAAO;;IA+LxB,0BAA0B;;0BAjJC,MAAM;0BA0BN,MAAM;wBAOR,MAAM;;;;;;;;;;kBA1Gf,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;eAChB,SAAS;mBACL,OAAO;;;;;;;cARX,OAAO;cAlBP,OAAO;iBADJ,OAAO;gBAIR,OAAO;gBACP,SAAS,EAAE;sBAGL,OAAO;kBAMX,OAAO;0BACC,OAAO;mBAKd,OAAO;gBAEV,OAAO;kBAKL,OAAO;;qBA6iBI,GAAG;kBACN,GAAG;;AA5kB9B,wBAuoBC;AAeD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AA0iBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;;kBAYxC,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;eAChB,SAAS;mBACL,OAAO;;IAuMxB,0BAA0B;;0BAzJC,MAAM;0BA0BN,MAAM;wBAOR,MAAM;;;;;;;;;;kBA1Gf,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;eAChB,SAAS;mBACL,OAAO;;;;;;;cARX,OAAO;cAlBP,OAAO;iBADJ,OAAO;gBAIR,OAAO;gBACP,SAAS,EAAE;sBAGL,OAAO;kBAMX,OAAO;0BACC,OAAO;mBAKd,OAAO;gBAEV,OAAO;kBAKL,OAAO;;qBAqjBI,GAAG;kBACN,GAAG;;AAplB9B,wBA+oBC;AAeD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-397d9ece"]]);
5
+ const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3834ac3d"]]);
6
6
  export {
7
7
  _ as default
8
8
  };
@@ -1,33 +1,33 @@
1
- import { defineComponent as J, useAttrs as Q, ref as d, computed as y, toRef as r, watch as G, createElementBlock as s, openBlock as n, Fragment as X, createBlock as g, createCommentVNode as p, normalizeClass as Y, unref as u, createElementVNode as m, toDisplayString as Z, mergeProps as _, withKeys as v, withModifiers as N, createVNode as ee, createTextVNode as k, renderSlot as R } from "vue";
2
- import { ScalarIcon as oe } from "@scalar/components";
3
- import { prettyPrintJson as le } from "@scalar/oas-utils/helpers";
4
- import { useCodeMirror as te, useDropdown as ne, colorPicker as ae } from "@scalar/use-codemirror";
5
- import { useClipboard as re } from "@scalar/use-hooks/useClipboard";
6
- import { nanoid as se } from "nanoid";
7
- import ie from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
1
+ import { defineComponent as Q, useAttrs as G, ref as u, computed as m, toRef as r, watch as X, createElementBlock as s, openBlock as n, Fragment as Y, createBlock as g, createCommentVNode as d, normalizeClass as Z, unref as p, createElementVNode as c, toDisplayString as _, mergeProps as ee, withKeys as v, withModifiers as N, createVNode as oe, createTextVNode as k, renderSlot as R } from "vue";
2
+ import { ScalarIcon as le } from "@scalar/components";
3
+ import { prettyPrintJson as te } from "@scalar/oas-utils/helpers";
4
+ import { useCodeMirror as ne, useDropdown as ae, colorPicker as re } from "@scalar/use-codemirror";
5
+ import { useClipboard as se } from "@scalar/use-hooks/useClipboard";
6
+ import { nanoid as ie } from "nanoid";
7
+ import ue from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
8
8
  import B from "../DataTable/DataTableInputSelect.vue.js";
9
- import { pillPlugin as ue, backspaceCommand as de } from "./codeVariableWidget.js";
10
- import { useLayout as pe } from "../../hooks/useLayout.js";
11
- const fe = { class: "whitespace-nowrap" }, me = ["id"], ce = {
9
+ import { pillPlugin as de, backspaceCommand as pe } from "./codeVariableWidget.js";
10
+ import { useLayout as fe } from "../../hooks/useLayout.js";
11
+ const me = { class: "whitespace-nowrap" }, ce = ["id"], be = {
12
12
  key: 0,
13
13
  class: "scalar-code-copy z-context"
14
- }, be = {
14
+ }, ye = {
15
15
  key: 1,
16
16
  class: "z-context text-c-2 absolute bottom-1 right-1.5 hidden font-sans group-has-[:focus-visible]/input:block",
17
17
  role: "alert"
18
- }, ye = {
18
+ }, ge = {
19
19
  key: 5,
20
20
  class: "centered-y text-orange absolute right-7 text-xs"
21
- }, ge = {
22
- key: 6,
23
- class: "centered-y group-has-[.cm-focused]:z-1 absolute right-0 flex h-full items-center p-1.5"
24
21
  }, ve = {
22
+ key: 6,
23
+ class: "centered-y group-has-[.cm-focused]:z-1 -right-0.25 absolute flex h-full items-center p-1.5"
24
+ }, he = {
25
25
  key: 7,
26
26
  class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 mr-0.5 pr-2 pt-px opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.error]:bg-transparent group-[.alert]:shadow-none group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
27
- }, he = {
27
+ }, we = {
28
28
  inheritAttrs: !1
29
- }, Ee = /* @__PURE__ */ J({
30
- ...he,
29
+ }, Fe = /* @__PURE__ */ Q({
30
+ ...we,
31
31
  __name: "CodeInput",
32
32
  props: {
33
33
  colorPicker: { type: Boolean, default: !1 },
@@ -62,7 +62,7 @@ const fe = { class: "whitespace-nowrap" }, me = ["id"], ce = {
62
62
  emits: ["submit", "update:modelValue", "curl", "blur"],
63
63
  setup(z, { expose: A, emit: M }) {
64
64
  var q;
65
- const o = z, i = M, C = Q(), O = C.id || `id-${se()}`, x = d(!1), h = d(!1), P = d(""), S = d({ left: 0, top: 0 }), c = d(null), { layout: w } = pe(), { copyToClipboard: K } = re();
65
+ const o = z, i = M, C = G(), O = C.id || `id-${ie()}`, x = u(!1), h = u(!1), P = u(""), S = u({ left: 0, top: 0 }), b = u(null), { layout: w } = fe(), { copyToClipboard: K } = se();
66
66
  function D(e) {
67
67
  var l;
68
68
  return e === o.modelValue ? null : o.importCurl && e.trim().toLowerCase().startsWith("curl") ? (i("curl", e), (l = a.value) == null || l.dispatch({
@@ -80,19 +80,19 @@ const fe = { class: "whitespace-nowrap" }, me = ["id"], ce = {
80
80
  x.value = !1, o.emitOnBlur && o.modelValue && V(e), i("blur", e);
81
81
  }
82
82
  const E = [...o.extensions];
83
- o.colorPicker && E.push(ae);
84
- const L = y(
85
- () => ue({
83
+ o.colorPicker && E.push(re);
84
+ const L = m(
85
+ () => de({
86
86
  environment: o.environment,
87
87
  envVariables: o.envVariables,
88
88
  workspace: o.workspace,
89
89
  isReadOnly: w === "modal"
90
90
  })
91
- ), U = y(() => [
91
+ ), U = m(() => [
92
92
  ...E,
93
93
  L.value,
94
- de
95
- ]), F = d(null), { codeMirror: a } = te({
94
+ pe
95
+ ]), F = u(null), { codeMirror: a } = ne({
96
96
  content: r(
97
97
  () => o.modelValue !== void 0 ? String(o.modelValue) : ""
98
98
  ),
@@ -111,26 +111,28 @@ const fe = { class: "whitespace-nowrap" }, me = ["id"], ce = {
111
111
  extensions: U,
112
112
  placeholder: r(() => o.placeholder)
113
113
  });
114
- (q = a.value) == null || q.focus(), G(a, () => {
114
+ (q = a.value) == null || q.focus(), X(a, () => {
115
115
  a.value && Object.prototype.hasOwnProperty.call(C, "autofocus") && a.value.focus();
116
116
  });
117
- const { handleDropdownSelect: W, updateDropdownVisibility: j } = ne({
117
+ const { handleDropdownSelect: W, updateDropdownVisibility: j } = ae({
118
118
  codeMirror: a,
119
119
  query: P,
120
120
  showDropdown: h,
121
121
  dropdownPosition: S
122
- }), $ = y(
122
+ }), $ = m(
123
123
  () => o.nullable ? ["true", "false", "null"] : ["true", "false"]
124
- ), b = (e, l) => {
124
+ ), y = (e, l) => {
125
125
  var f, t, I;
126
- h.value ? e === "down" ? (l.preventDefault(), (f = c.value) == null || f.handleArrowKey("down")) : e === "up" ? (l.preventDefault(), (t = c.value) == null || t.handleArrowKey("up")) : e === "enter" && (l.preventDefault(), (I = c.value) == null || I.handleSelect()) : e === "escape" ? o.disableTabIndent || l.stopPropagation() : e === "enter" && l.target instanceof HTMLDivElement && V(l.target.textContent ?? "");
127
- }, H = y(() => Array.isArray(o.type) ? (
126
+ h.value ? e === "down" ? (l.preventDefault(), (f = b.value) == null || f.handleArrowKey("down")) : e === "up" ? (l.preventDefault(), (t = b.value) == null || t.handleArrowKey("up")) : e === "enter" && (l.preventDefault(), (I = b.value) == null || I.handleSelect()) : e === "escape" ? o.disableTabIndent || l.stopPropagation() : e === "enter" && l.target instanceof HTMLDivElement && V(l.target.textContent ?? "");
127
+ }, H = m(() => Array.isArray(o.type) ? (
128
128
  // Find the first type, that’s not 'null'
129
129
  o.type.find((e) => e !== "null") ?? "string"
130
130
  ) : (
131
131
  // If it’s not an array, just return the type
132
132
  o.type
133
- ));
133
+ )), J = m(
134
+ () => h.value && o.withVariables && w !== "modal" && o.environment
135
+ );
134
136
  return A({
135
137
  /** Expose focus method */
136
138
  focus: () => {
@@ -146,13 +148,13 @@ const fe = { class: "whitespace-nowrap" }, me = ["id"], ce = {
146
148
  modelValue: o.modelValue
147
149
  }), (e, l) => {
148
150
  var f;
149
- return n(), s(X, null, [
151
+ return n(), s(Y, null, [
150
152
  e.disabled ? (n(), s("div", {
151
153
  key: 0,
152
- class: Y(["text-c-2 flex cursor-default items-center justify-center", u(w) === "modal" ? "font-code pl-1 pr-2 text-sm" : "px-2"]),
154
+ class: Z(["text-c-2 flex cursor-default items-center justify-center", p(w) === "modal" ? "font-code pl-1 pr-2 text-sm" : "px-2"]),
153
155
  "data-testid": "code-input-disabled"
154
156
  }, [
155
- m("span", fe, Z(e.modelValue), 1)
157
+ c("span", me, _(e.modelValue), 1)
156
158
  ], 2)) : o.enum && o.enum.length ? (n(), g(B, {
157
159
  key: 1,
158
160
  default: o.default,
@@ -172,9 +174,9 @@ const fe = { class: "whitespace-nowrap" }, me = ["id"], ce = {
172
174
  modelValue: o.modelValue,
173
175
  value: o.examples,
174
176
  "onUpdate:modelValue": l[2] || (l[2] = (t) => i("update:modelValue", t))
175
- }, null, 8, ["default", "modelValue", "value"])) : (n(), s("div", _({
177
+ }, null, 8, ["default", "modelValue", "value"])) : (n(), s("div", ee({
176
178
  key: 4,
177
- id: u(O)
179
+ id: p(O)
178
180
  }, e.$attrs, {
179
181
  ref_key: "codeMirrorRef",
180
182
  ref: F,
@@ -183,54 +185,54 @@ const fe = { class: "whitespace-nowrap" }, me = ["id"], ce = {
183
185
  "flow-code-input--error": e.error
184
186
  }],
185
187
  onKeydown: [
186
- l[4] || (l[4] = v(N((t) => b("down", t), ["stop"]), ["down"])),
187
- l[5] || (l[5] = v((t) => b("enter", t), ["enter"])),
188
- l[6] || (l[6] = v((t) => b("escape", t), ["escape"])),
189
- l[7] || (l[7] = v(N((t) => b("up", t), ["stop"]), ["up"]))
188
+ l[4] || (l[4] = v(N((t) => y("down", t), ["stop"]), ["down"])),
189
+ l[5] || (l[5] = v((t) => y("enter", t), ["enter"])),
190
+ l[6] || (l[6] = v((t) => y("escape", t), ["escape"])),
191
+ l[7] || (l[7] = v(N((t) => y("up", t), ["stop"]), ["up"]))
190
192
  ]
191
193
  }), [
192
- e.isCopyable ? (n(), s("div", ce, [
193
- m("button", {
194
+ e.isCopyable ? (n(), s("div", be, [
195
+ c("button", {
194
196
  class: "copy-button",
195
197
  type: "button",
196
- onClick: l[3] || (l[3] = (t) => u(K)(u(le)(e.modelValue)))
198
+ onClick: l[3] || (l[3] = (t) => p(K)(p(te)(e.modelValue)))
197
199
  }, [
198
- l[8] || (l[8] = m("span", { class: "sr-only" }, "Copy content", -1)),
199
- ee(u(oe), {
200
+ l[8] || (l[8] = c("span", { class: "sr-only" }, "Copy content", -1)),
201
+ oe(p(le), {
200
202
  icon: "Clipboard",
201
203
  size: "md"
202
204
  })
203
205
  ])
204
- ])) : p("", !0),
205
- e.disableTabIndent ? p("", !0) : (n(), s("div", be, l[9] || (l[9] = [
206
+ ])) : d("", !0),
207
+ e.disableTabIndent ? d("", !0) : (n(), s("div", ye, l[9] || (l[9] = [
206
208
  k(" Press "),
207
- m("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
209
+ c("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
208
210
  k(" then "),
209
- m("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Tab", -1),
211
+ c("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Tab", -1),
210
212
  k(" to exit ")
211
213
  ])))
212
- ], 16, me)),
213
- e.$slots.warning ? (n(), s("div", ye, [
214
+ ], 16, ce)),
215
+ e.$slots.warning ? (n(), s("div", ge, [
214
216
  R(e.$slots, "warning", {}, void 0, !0)
215
- ])) : p("", !0),
216
- e.$slots.icon ? (n(), s("div", ge, [
217
+ ])) : d("", !0),
218
+ e.$slots.icon ? (n(), s("div", ve, [
217
219
  R(e.$slots, "icon", {}, void 0, !0)
218
- ])) : p("", !0),
219
- e.required ? (n(), s("div", ve, " Required ")) : p("", !0),
220
- h.value && e.withVariables && u(w) !== "modal" && e.environment ? (n(), g(ie, {
220
+ ])) : d("", !0),
221
+ e.required ? (n(), s("div", he, " Required ")) : d("", !0),
222
+ J.value ? (n(), g(ue, {
221
223
  key: 8,
222
224
  ref_key: "dropdownRef",
223
- ref: c,
225
+ ref: b,
224
226
  dropdownPosition: S.value,
225
227
  envVariables: e.envVariables,
226
228
  environment: e.environment,
227
229
  query: P.value,
228
- onSelect: u(W)
229
- }, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) : p("", !0)
230
+ onSelect: p(W)
231
+ }, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) : d("", !0)
230
232
  ], 64);
231
233
  };
232
234
  }
233
235
  });
234
236
  export {
235
- Ee as default
237
+ Fe as default
236
238
  };
@@ -15,7 +15,7 @@ const b = ["role"], y = {
15
15
  return (e, w) => (l(), o("div", n(i(
16
16
  m(a)(
17
17
  e.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible",
18
- "scalar-data-table bg-b-1"
18
+ "scalar-data-table"
19
19
  )
20
20
  )), [
21
21
  p("table", {
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AA2cA,wBAMG"}
1
+ {"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AAifA,wBAMG"}
@@ -1,105 +1,115 @@
1
- import { defineComponent as b, computed as E, watch as B, onMounted as D, createBlock as u, openBlock as c, unref as n, withCtx as s, createVNode as l, createElementVNode as v, toDisplayString as w, createElementBlock as M, createCommentVNode as V, Fragment as W, renderList as j, withModifiers as h, createTextVNode as k } from "vue";
2
- import { ScalarDropdown as L, ScalarButton as T, ScalarDropdownItem as d, ScalarListboxCheckbox as g, ScalarDropdownDivider as $, ScalarIcon as z } from "@scalar/components";
3
- import { useRouter as A } from "vue-router";
4
- import { PathId as F } from "../../routes.js";
5
- import { useActiveEntities as O } from "../../store/active-entities.js";
6
- import { useWorkspace as P } from "../../store/store.js";
7
- import { useLayout as R } from "../../hooks/useLayout.js";
8
- const q = { class: "m-0 flex items-center gap-1.5 whitespace-nowrap font-medium" }, G = { class: "flex h-4 w-4 items-center justify-center" }, ee = /* @__PURE__ */ b({
1
+ import { defineComponent as D, computed as E, watch as g, onMounted as L, createBlock as d, openBlock as c, unref as n, withCtx as s, createVNode as l, createElementVNode as p, toDisplayString as w, createElementBlock as M, createCommentVNode as V, Fragment as W, renderList as j, withModifiers as k, createTextVNode as _ } from "vue";
2
+ import { ScalarDropdown as T, ScalarButton as $, ScalarDropdownItem as f, ScalarListboxCheckbox as S, ScalarDropdownDivider as z, ScalarIcon as A } from "@scalar/components";
3
+ import { useRouter as F } from "vue-router";
4
+ import { PathId as O } from "../../routes.js";
5
+ import { useActiveEntities as P } from "../../store/active-entities.js";
6
+ import { useWorkspace as R } from "../../store/store.js";
7
+ import { useLayout as q } from "../../hooks/useLayout.js";
8
+ const G = { class: "m-0 flex items-center gap-1.5 whitespace-nowrap font-medium" }, H = { class: "flex h-4 w-4 items-center justify-center" }, te = /* @__PURE__ */ D({
9
9
  __name: "EnvironmentSelector",
10
- setup(H) {
11
- const { activeCollection: a, activeWorkspace: i, activeEnvironment: m } = O(), { collectionMutators: _ } = P(), { layout: S } = R(), C = A(), p = (e) => {
12
- a.value && i.value && (_.edit(
10
+ setup(J) {
11
+ const { activeCollection: a, activeWorkspace: r, activeEnvironment: u } = P(), { collectionMutators: C } = R(), { layout: y } = q(), I = F(), m = (e) => {
12
+ a.value && r.value && (C.edit(
13
13
  a.value.uid,
14
14
  "x-scalar-active-environment",
15
15
  e
16
- ), i.value.activeEnvironmentId = e);
17
- }, y = () => {
16
+ ), r.value.activeEnvironmentId = e);
17
+ }, N = () => {
18
18
  var e;
19
- return C.push({
19
+ return I.push({
20
20
  name: "environment.default",
21
21
  params: {
22
- [F.Workspace]: (e = i.value) == null ? void 0 : e.uid
22
+ [O.Workspace]: (e = r.value) == null ? void 0 : e.uid
23
23
  }
24
24
  });
25
- }, I = E(() => {
26
- const { value: e } = m, { value: t } = a;
25
+ }, b = E(() => {
26
+ const { value: e } = u, { value: t } = a;
27
27
  return (e == null ? void 0 : e.name) || (t == null ? void 0 : t["x-scalar-active-environment"]) || "No Environment";
28
- }), N = E(() => {
28
+ }), v = E(() => {
29
29
  const { value: e } = a, t = e == null ? void 0 : e["x-scalar-environments"];
30
- return t ? Object.entries(t).map(([o, r]) => ({
31
- ...r,
30
+ return t ? Object.entries(t).map(([o, i]) => ({
31
+ ...i,
32
32
  uid: o,
33
33
  name: o
34
34
  })) : [];
35
- }), f = (e) => {
35
+ }), B = () => {
36
+ const e = v.value;
37
+ if (e.length > 0) {
38
+ const t = e[e.length - 1];
39
+ t != null && t.uid && m(t.uid);
40
+ }
41
+ };
42
+ g(v, (e, t) => {
43
+ e.length > t.length && B();
44
+ });
45
+ const x = (e) => {
36
46
  const t = e["x-scalar-active-environment"];
37
- t && a.value && i.value ? (a.value["x-scalar-active-environment"] = t, i.value.activeEnvironmentId = t) : i.value && (i.value.activeEnvironmentId = "");
47
+ t && a.value && r.value ? (a.value["x-scalar-active-environment"] = t, r.value.activeEnvironmentId = t) : r.value && (r.value.activeEnvironmentId = "");
38
48
  };
39
- return B(
49
+ return g(
40
50
  a,
41
- (e) => e && f(e)
42
- ), D(() => {
43
- a.value && f(a.value);
44
- }), (e, t) => (c(), u(n(L), { teleport: "" }, {
51
+ (e) => e && x(e)
52
+ ), L(() => {
53
+ a.value && x(a.value);
54
+ }), (e, t) => (c(), d(n(T), { teleport: "" }, {
45
55
  items: s(() => [
46
- (c(!0), M(W, null, j(N.value, (o) => (c(), u(n(d), {
56
+ (c(!0), M(W, null, j(v.value, (o) => (c(), d(n(f), {
47
57
  key: o.uid,
48
58
  class: "group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
49
- onClick: h((r) => p(o.uid), ["stop"])
59
+ onClick: k((i) => m(o.uid), ["stop"])
50
60
  }, {
51
61
  default: s(() => {
52
- var r;
62
+ var i;
53
63
  return [
54
- l(n(g), {
55
- selected: ((r = n(a)) == null ? void 0 : r["x-scalar-active-environment"]) === o.uid
64
+ l(n(S), {
65
+ selected: ((i = n(a)) == null ? void 0 : i["x-scalar-active-environment"]) === o.uid
56
66
  }, null, 8, ["selected"]),
57
- k(" " + w(o.name), 1)
67
+ _(" " + w(o.name), 1)
58
68
  ];
59
69
  }),
60
70
  _: 2
61
71
  }, 1032, ["onClick"]))), 128)),
62
- l(n(d), {
72
+ l(n(f), {
63
73
  class: "group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
64
- onClick: t[0] || (t[0] = h((o) => p(""), ["stop"]))
74
+ onClick: t[0] || (t[0] = k((o) => m(""), ["stop"]))
65
75
  }, {
66
76
  default: s(() => {
67
- var o, r, x;
77
+ var o, i, h;
68
78
  return [
69
- l(n(g), {
70
- selected: ((o = n(m)) == null ? void 0 : o.uid) === "" && ((r = n(a)) == null ? void 0 : r["x-scalar-active-environment"]) === "" || ((x = n(m)) == null ? void 0 : x.name) === "No Environment"
79
+ l(n(S), {
80
+ selected: ((o = n(u)) == null ? void 0 : o.uid) === "" && ((i = n(a)) == null ? void 0 : i["x-scalar-active-environment"]) === "" || ((h = n(u)) == null ? void 0 : h.name) === "No Environment"
71
81
  }, null, 8, ["selected"]),
72
- t[1] || (t[1] = k(" No Environment "))
82
+ t[1] || (t[1] = _(" No Environment "))
73
83
  ];
74
84
  }),
75
85
  _: 1
76
86
  }),
77
- l(n($)),
78
- n(S) !== "modal" ? (c(), u(n(d), {
87
+ l(n(z)),
88
+ n(y) !== "modal" ? (c(), d(n(f), {
79
89
  key: 0,
80
90
  class: "flex items-center gap-1.5",
81
- onClick: y
91
+ onClick: N
82
92
  }, {
83
93
  default: s(() => [
84
- v("div", G, [
85
- l(n(z), {
94
+ p("div", H, [
95
+ l(n(A), {
86
96
  icon: "Brackets",
87
97
  size: "sm"
88
98
  })
89
99
  ]),
90
- t[2] || (t[2] = v("span", { class: "leading-none" }, "Manage Environments", -1))
100
+ t[2] || (t[2] = p("span", { class: "leading-none" }, "Manage Environments", -1))
91
101
  ]),
92
102
  _: 1
93
103
  })) : V("", !0)
94
104
  ]),
95
105
  default: s(() => [
96
- l(n(T), {
106
+ l(n($), {
97
107
  class: "text-c-1 hover:bg-b-2 line-clamp-1 h-auto w-fit justify-start px-1.5 py-1.5 font-normal",
98
108
  fullWidth: "",
99
109
  variant: "ghost"
100
110
  }, {
101
111
  default: s(() => [
102
- v("h2", q, w(I.value), 1)
112
+ p("h2", G, w(b.value), 1)
103
113
  ]),
104
114
  _: 1
105
115
  })
@@ -109,5 +119,5 @@ const q = { class: "m-0 flex items-center gap-1.5 whitespace-nowrap font-medium"
109
119
  }
110
120
  });
111
121
  export {
112
- ee as default
122
+ te as default
113
123
  };
@@ -31,13 +31,13 @@ type __VLS_Props = {
31
31
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
32
32
  delete: (id: string) => any;
33
33
  onDragEnd: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => any;
34
- rename: (id: string) => any;
35
34
  colorModal: (id: string) => any;
35
+ rename: (id: string) => any;
36
36
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
37
37
  onDelete?: (id: string) => any;
38
38
  onOnDragEnd?: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => any;
39
- onRename?: (id: string) => any;
40
39
  onColorModal?: (id: string) => any;
40
+ onRename?: (id: string) => any;
41
41
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLLIElement>;
42
42
  export default _default;
43
43
  //# sourceMappingURL=SidebarListElement.vue.d.ts.map
@@ -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;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
+ {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AA0FA,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,84 +1,86 @@
1
- import { defineComponent as m, useId as h, createBlock as d, openBlock as s, unref as t, normalizeClass as a, withCtx as r, createElementVNode as l, createVNode as f, createElementBlock as i, createCommentVNode as n, renderSlot 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
- 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 = {
1
+ import { defineComponent as m, useId as b, createBlock as c, openBlock as s, unref as t, normalizeClass as r, withCtx as a, createElementVNode as l, createVNode as f, createElementBlock as i, createCommentVNode as n, renderSlot as d, createTextVNode as y, toDisplayString as p, mergeProps as h } from "vue";
2
+ import { Disclosure as x, DisclosureButton as g, DisclosurePanel as C } from "@headlessui/vue";
3
+ import { ScalarIcon as v } from "@scalar/components";
4
+ const _ = ["aria-labelledby"], k = { class: "text-c-1 flex flex-1 items-center gap-1.5" }, w = ["id"], B = {
5
5
  key: 0,
6
6
  class: "sr-only"
7
- }, $ = {
7
+ }, V = {
8
8
  key: 0,
9
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"
10
- }, D = { class: "sr-only" }, N = {
10
+ }, $ = { class: "sr-only" }, D = {
11
11
  key: 0,
12
12
  class: "ui-not-open:invisible flex items-center gap-2 pr-2"
13
- }, P = /* @__PURE__ */ m({
13
+ }, E = /* @__PURE__ */ m({
14
14
  __name: "ViewLayoutCollapse",
15
15
  props: {
16
16
  defaultOpen: { type: Boolean, default: !0 },
17
17
  itemCount: { default: 0 },
18
18
  layout: { default: "client" }
19
19
  },
20
- setup(O) {
21
- const u = h();
22
- return (e, I) => (s(), d(t(x), {
20
+ setup(N) {
21
+ const u = b();
22
+ return (e, O) => (s(), c(t(x), {
23
23
  as: "div",
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" }]),
24
+ class: r(["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: r(({ open: o }) => [
28
+ default: a(({ open: o }) => [
29
29
  l("section", {
30
30
  "aria-labelledby": t(u),
31
31
  class: "contents"
32
32
  }, [
33
- l("div", k, [
34
- f(t(_), {
35
- class: a([
33
+ l("div", {
34
+ class: r(["bg-b-2 flex items-center", e.layout === "reference" && "rounded-t-lg border border-b-0"])
35
+ }, [
36
+ f(t(g), {
37
+ class: r([
36
38
  "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
39
  { "!pl-3": e.layout === "reference" }
38
40
  ]),
39
41
  disabled: e.layout === "reference"
40
42
  }, {
41
- default: r(() => [
42
- e.layout !== "reference" ? (s(), d(t(C), {
43
+ default: a(() => [
44
+ e.layout !== "reference" ? (s(), c(t(v), {
43
45
  key: 0,
44
- class: a([
46
+ class: r([
45
47
  "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"
46
48
  ]),
47
49
  icon: "ChevronRight",
48
50
  size: "md"
49
51
  })) : n("", !0),
50
- l("h2", w, [
52
+ l("h2", k, [
51
53
  l("span", {
52
54
  id: t(u),
53
55
  class: "contents"
54
56
  }, [
55
- c(e.$slots, "title", { open: o }),
56
- o ? n("", !0) : (s(), i("span", V, " (Collapsed) "))
57
- ], 8, B),
58
- !o && e.itemCount ? (s(), i("span", $, [
57
+ d(e.$slots, "title", { open: o }),
58
+ o ? n("", !0) : (s(), i("span", B, " (Collapsed) "))
59
+ ], 8, w),
60
+ !o && e.itemCount ? (s(), i("span", V, [
59
61
  y(p(e.itemCount) + " ", 1),
60
- l("span", D, "Item" + p(e.itemCount === 1 ? "" : "s"), 1)
62
+ l("span", $, "Item" + p(e.itemCount === 1 ? "" : "s"), 1)
61
63
  ])) : n("", !0)
62
64
  ])
63
65
  ]),
64
66
  _: 2
65
67
  }, 1032, ["class", "disabled"]),
66
- e.$slots.actions ? (s(), i("div", N, [
67
- c(e.$slots, "actions", { open: o })
68
+ e.$slots.actions ? (s(), i("div", D, [
69
+ d(e.$slots, "actions", { open: o })
68
70
  ])) : n("", !0)
69
- ]),
70
- f(t(g), b(e.$attrs, { class: "diclosure-panel h-full max-h-fit rounded-b" }), {
71
- default: r(() => [
72
- c(e.$slots, "default", { open: o })
71
+ ], 2),
72
+ f(t(C), h(e.$attrs, { class: "diclosure-panel h-full max-h-fit rounded-b" }), {
73
+ default: a(() => [
74
+ d(e.$slots, "default", { open: o })
73
75
  ]),
74
76
  _: 2
75
77
  }, 1040)
76
- ], 8, v)
78
+ ], 8, _)
77
79
  ]),
78
80
  _: 3
79
81
  }, 8, ["class", "defaultOpen", "static"]));
80
82
  }
81
83
  });
82
84
  export {
83
- P as default
85
+ E as default
84
86
  };