@scalar/api-client 2.5.31 → 2.5.33

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 (235) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue2.js +120 -128
  4. package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
  5. package/dist/components/AddressBar/AddressBarHistory.vue2.js +57 -63
  6. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  7. package/dist/components/CodeInput/CodeInput.vue2.js +143 -150
  8. package/dist/components/CodeInput/codeVariableWidget.js +70 -75
  9. package/dist/components/CommandPalette/CommandActionInput.vue.js +17 -19
  10. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -27
  11. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +53 -55
  12. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +129 -133
  13. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +1 -1
  14. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +84 -98
  15. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +64 -74
  16. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -11
  17. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  18. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +164 -183
  19. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  20. package/dist/components/DataTable/DataTableInput.vue.js +4 -4
  21. package/dist/components/DataTable/DataTableInput.vue2.js +31 -31
  22. package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -2
  23. package/dist/components/EmptyState.vue.js +1 -1
  24. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +75 -84
  25. package/dist/components/Form/LabelInput.vue.js +1 -1
  26. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  27. package/dist/components/HttpMethod/HttpMethod.vue2.js +11 -11
  28. package/dist/components/ImportCollection/DropEventListener.vue.js +42 -44
  29. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -23
  30. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +141 -149
  31. package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +1 -1
  32. package/dist/components/ImportCollection/ImportNowButton.vue.js +22 -23
  33. package/dist/components/ImportCollection/IntegrationLogo.vue.js +12 -13
  34. package/dist/components/ImportCollection/PasteEventListener.vue.js +11 -12
  35. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +69 -76
  36. package/dist/components/ImportCollection/utils/get-openapi-version.js +8 -8
  37. package/dist/components/ImportCollection/utils/import-collection.js +14 -14
  38. package/dist/components/OpenApiClientButton.vue.js +1 -1
  39. package/dist/components/OpenApiClientButton.vue2.js +10 -10
  40. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  41. package/dist/components/ScalarAsciiArt.vue2.js +19 -22
  42. package/dist/components/Search/useSearch.js +51 -61
  43. package/dist/components/SectionFilter.vue.js +1 -1
  44. package/dist/components/SectionFilter.vue2.js +26 -29
  45. package/dist/components/Server/ServerDropdown.vue.js +70 -96
  46. package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
  47. package/dist/components/Server/ServerDropdownItem.vue2.js +57 -67
  48. package/dist/components/Server/ServerSelector.vue.js +44 -55
  49. package/dist/components/Server/ServerVariablesForm.vue.js +36 -42
  50. package/dist/components/Server/ServerVariablesSelect.vue.js +6 -6
  51. package/dist/components/SideNav/DownloadAppButton.vue.js +1 -1
  52. package/dist/components/SideNav/SideNav.vue.js +68 -74
  53. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
  54. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  55. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  56. package/dist/components/TopNav/TopNav.vue.js +107 -122
  57. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  58. package/dist/hooks/useFileDialog.js +12 -12
  59. package/dist/hooks/useResponseBody.js +14 -16
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.js +2 -2
  62. package/dist/layouts/App/ApiClientApp.vue.js +50 -56
  63. package/dist/layouts/App/ApiClientApp.vue3.js +1 -1
  64. package/dist/layouts/App/create-api-client-app.js +19 -20
  65. package/dist/layouts/App/index.js +1 -1
  66. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  67. package/dist/layouts/Modal/ApiClientModal.vue2.js +18 -21
  68. package/dist/layouts/Web/ApiClientWeb.vue.js +45 -51
  69. package/dist/layouts/Web/ApiClientWeb.vue3.js +1 -1
  70. package/dist/layouts/Web/create-api-client-web.js +19 -20
  71. package/dist/layouts/Web/index.js +1 -1
  72. package/dist/libs/create-client.js +102 -109
  73. package/dist/libs/env-helpers.js +3 -3
  74. package/dist/libs/event-bus.js +15 -15
  75. package/dist/libs/extractAttachmentFilename.js +5 -6
  76. package/dist/libs/find-request.js +9 -10
  77. package/dist/libs/get-request-uid-by-path-method.js +12 -12
  78. package/dist/libs/getOpenApiDocumentDetails.js +7 -7
  79. package/dist/libs/importers/curl.js +3 -3
  80. package/dist/libs/normalize-headers.js +9 -10
  81. package/dist/libs/postman.js +15 -17
  82. package/dist/libs/send-request/build-request-security.js +9 -10
  83. package/dist/libs/send-request/create-fetch-body.js +11 -12
  84. package/dist/libs/send-request/create-fetch-query-params.js +13 -13
  85. package/dist/libs/send-request/create-request-operation.js +83 -84
  86. package/dist/libs/send-request/decode-buffer.d.ts.map +1 -1
  87. package/dist/libs/send-request/set-request-cookies.js +12 -12
  88. package/dist/libs/string-template.js +21 -21
  89. package/dist/libs/validate-parameters.js +5 -8
  90. package/dist/plugins/plugin-manager.js +11 -17
  91. package/dist/store/active-entities.js +90 -117
  92. package/dist/store/collections.js +41 -42
  93. package/dist/store/import-spec.js +25 -26
  94. package/dist/store/request-example.js +20 -24
  95. package/dist/store/requests.js +63 -81
  96. package/dist/store/router-params.js +7 -7
  97. package/dist/store/security-schemes.js +35 -36
  98. package/dist/store/store.js +2 -2
  99. package/dist/store/tags.js +20 -21
  100. package/dist/style.css +1 -1
  101. package/dist/views/Collection/Collection.vue2.js +21 -22
  102. package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
  103. package/dist/views/Collection/CollectionAuthentication.vue2.js +43 -47
  104. package/dist/views/Collection/CollectionEnvironment.vue.js +1 -1
  105. package/dist/views/Collection/CollectionEnvironment.vue2.js +196 -207
  106. package/dist/views/Collection/CollectionInfoForm.vue.js +1 -1
  107. package/dist/views/Collection/CollectionInfoForm.vue2.js +34 -41
  108. package/dist/views/Collection/CollectionNavigation.vue.js +116 -125
  109. package/dist/views/Collection/CollectionOverview.vue2.js +22 -25
  110. package/dist/views/Collection/CollectionServerForm.vue.js +39 -45
  111. package/dist/views/Collection/CollectionServers.vue2.js +88 -98
  112. package/dist/views/Collection/CollectionSettings.vue.js +1 -1
  113. package/dist/views/Collection/CollectionSettings.vue2.js +101 -108
  114. package/dist/views/Collection/components/EnvironmentForm.vue.js +1 -1
  115. package/dist/views/Collection/components/EnvironmentForm.vue2.js +141 -145
  116. package/dist/views/Collection/components/MarkdownInput.vue.js +1 -1
  117. package/dist/views/Collection/components/MarkdownInput.vue2.js +1 -2
  118. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +15 -15
  119. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +15 -16
  120. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +61 -64
  121. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +9 -10
  122. package/dist/views/Cookies/CookieModal.vue.js +1 -1
  123. package/dist/views/Cookies/Cookies.vue2.js +90 -93
  124. package/dist/views/Environment/Environment.vue2.js +267 -295
  125. package/dist/views/Environment/EnvironmentModal.vue.js +63 -70
  126. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -42
  127. package/dist/views/Request/Request.vue.js +1 -1
  128. package/dist/views/Request/Request.vue2.js +60 -67
  129. package/dist/views/Request/RequestRoot.vue.js +1 -1
  130. package/dist/views/Request/RequestRoot.vue2.js +78 -89
  131. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +37 -44
  132. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +44 -45
  133. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -127
  134. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  135. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +120 -139
  136. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
  137. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +97 -97
  138. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  139. package/dist/views/Request/RequestSection/RequestBody.vue2.js +287 -310
  140. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +1 -1
  141. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +86 -94
  142. package/dist/views/Request/RequestSection/RequestParams.vue.js +37 -38
  143. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +36 -38
  144. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  145. package/dist/views/Request/RequestSection/RequestSection.vue2.js +28 -31
  146. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  147. package/dist/views/Request/RequestSection/RequestTable.vue2.js +49 -52
  148. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
  149. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +16 -16
  150. package/dist/views/Request/RequestSection/helpers/getting-started.js +7 -11
  151. package/dist/views/Request/RequestSection/helpers/update-scheme.js +7 -8
  152. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  153. package/dist/views/Request/RequestSidebar.vue2.js +199 -211
  154. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  155. package/dist/views/Request/RequestSidebarItem.vue2.js +332 -349
  156. package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
  157. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +210 -240
  158. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  159. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +38 -41
  160. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
  161. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +58 -64
  162. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -2
  163. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
  164. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
  165. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +20 -23
  166. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +1 -1
  167. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  168. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +29 -30
  169. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +38 -41
  170. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +1 -1
  171. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +28 -29
  172. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  173. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +128 -140
  174. package/dist/views/Request/components/WorkspaceDropdown.vue.js +116 -124
  175. package/dist/views/Request/consts/mediaTypes.js +2 -3
  176. package/dist/views/Request/handle-drag.js +24 -28
  177. package/dist/views/Request/hooks/useOpenApiWatcher.js +26 -33
  178. package/dist/views/Request/libs/auth.js +37 -43
  179. package/dist/views/Request/libs/oauth2.js +30 -32
  180. package/dist/views/Request/libs/watch-mode.js +100 -103
  181. package/dist/views/Settings/SettingsGeneral.vue.js +206 -236
  182. package/package.json +22 -22
  183. package/dist/components/AddressBar/AddressBar.vue3.js +0 -4
  184. package/dist/components/AddressBar/AddressBarHistory.vue3.js +0 -4
  185. package/dist/components/CodeInput/CodeInput.vue3.js +0 -4
  186. package/dist/components/CodeInput/CodeInput.vue4.js +0 -4
  187. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue3.js +0 -4
  188. package/dist/components/CommandPalette/TheCommandPalette.vue3.js +0 -4
  189. package/dist/components/DataTable/DataTableInput.vue3.js +0 -4
  190. package/dist/components/EmptyState.vue3.js +0 -4
  191. package/dist/components/Form/LabelInput.vue3.js +0 -4
  192. package/dist/components/HttpMethod/HttpMethod.vue3.js +0 -4
  193. package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
  194. package/dist/components/OpenApiClientButton.vue3.js +0 -4
  195. package/dist/components/ScalarAsciiArt.vue3.js +0 -4
  196. package/dist/components/SectionFilter.vue3.js +0 -4
  197. package/dist/components/Server/ServerDropdownItem.vue3.js +0 -4
  198. package/dist/components/SideNav/DownloadAppButton.vue3.js +0 -4
  199. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue3.js +0 -4
  200. package/dist/components/Sidebar/Sidebar.vue3.js +0 -4
  201. package/dist/components/Sidebar/SidebarListElement.vue3.js +0 -4
  202. package/dist/components/Sidebar/SidebarListElement.vue4.js +0 -4
  203. package/dist/components/TopNav/TopNavItem.vue3.js +0 -4
  204. package/dist/layouts/App/ApiClientApp.vue2.js +0 -4
  205. package/dist/layouts/Modal/ApiClientModal.vue3.js +0 -4
  206. package/dist/layouts/Web/ApiClientWeb.vue2.js +0 -4
  207. package/dist/style.css.js +0 -4
  208. package/dist/views/Collection/CollectionAuthentication.vue3.js +0 -4
  209. package/dist/views/Collection/CollectionEnvironment.vue3.js +0 -4
  210. package/dist/views/Collection/CollectionInfoForm.vue3.js +0 -4
  211. package/dist/views/Collection/CollectionSettings.vue3.js +0 -4
  212. package/dist/views/Collection/components/EnvironmentForm.vue3.js +0 -4
  213. package/dist/views/Collection/components/MarkdownInput.vue3.js +0 -4
  214. package/dist/views/Cookies/CookieModal.vue3.js +0 -4
  215. package/dist/views/Request/Request.vue3.js +0 -4
  216. package/dist/views/Request/RequestRoot.vue3.js +0 -4
  217. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue3.js +0 -4
  218. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue3.js +0 -4
  219. package/dist/views/Request/RequestSection/RequestBody.vue3.js +0 -4
  220. package/dist/views/Request/RequestSection/RequestCodeExample.vue3.js +0 -4
  221. package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -4
  222. package/dist/views/Request/RequestSection/RequestTable.vue3.js +0 -4
  223. package/dist/views/Request/RequestSection/RequestTableTooltip.vue3.js +0 -4
  224. package/dist/views/Request/RequestSidebar.vue3.js +0 -4
  225. package/dist/views/Request/RequestSidebarItem.vue3.js +0 -4
  226. package/dist/views/Request/RequestSidebarItem.vue4.js +0 -4
  227. package/dist/views/Request/RequestSidebarItemMenu.vue3.js +0 -4
  228. package/dist/views/Request/RequestSubpageHeader.vue3.js +0 -4
  229. package/dist/views/Request/ResponseSection/ResponseBody.vue3.js +0 -4
  230. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue3.js +0 -4
  231. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue3.js +0 -4
  232. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue2.js +0 -4
  233. package/dist/views/Request/ResponseSection/ResponseEmpty.vue3.js +0 -4
  234. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue3.js +0 -4
  235. package/dist/views/Request/ResponseSection/ResponseSection.vue3.js +0 -4
@@ -1,22 +1,22 @@
1
- import { defineComponent as me, useCssVars as ve, computed as b, ref as ge, resolveComponent as be, createElementBlock as M, createCommentVNode as f, openBlock as d, normalizeClass as y, unref as n, createVNode as m, withCtx as v, createBlock as c, withModifiers as w, createElementVNode as s, toDisplayString as A, createTextVNode as N, renderSlot as Z, Fragment as ye, renderList as he, nextTick as xe } from "vue";
2
- import { ScalarButton as q, ScalarIcon as h, ScalarSidebarGroupToggle as _, ScalarTooltip as ee } from "@scalar/components";
3
- import { Draggable as ke } from "@scalar/draggable";
4
- import { shouldIgnoreEntity as te } from "@scalar/oas-utils/helpers";
5
- import { useRouter as we, RouterLink as ie } from "vue-router";
6
- import { useLayout as Ue } from "../../hooks/useLayout.js";
7
- import { useSidebar as qe } from "../../hooks/useSidebar.js";
8
- import { useActiveEntities as De } from "../../store/active-entities.js";
9
- import { PathId as $ } from "../../routes.js";
10
- import Ce from "../../components/HttpMethod/HttpMethod.vue.js";
11
- import { getModifiers as Re } from "../../libs/hot-keys.js";
12
- import { useWorkspace as Ie } from "../../store/store.js";
13
- const Te = { class: "line-clamp-1 w-full pl-2 break-all" }, Me = { class: "flex flex-row items-center gap-1" }, $e = { class: "relative" }, ze = { class: "flex items-start" }, Ee = { class: "flex flex-1 flex-row justify-between font-medium" }, Se = { class: "line-clamp-1 w-full text-left break-all" }, je = { class: "relative flex h-fit justify-end" }, Be = {
1
+ import { defineComponent as re, useCssVars as ue, computed as v, ref as de, resolveComponent as pe, createElementBlock as C, createCommentVNode as p, openBlock as u, normalizeClass as g, unref as n, createVNode as f, withCtx as m, createBlock as c, withModifiers as h, createElementVNode as s, toDisplayString as j, createTextVNode as B, renderSlot as L, Fragment as ce, renderList as fe, nextTick as me } from "vue";
2
+ import { ScalarButton as k, ScalarIcon as b, ScalarSidebarGroupToggle as G, ScalarTooltip as K } from "@scalar/components";
3
+ import { Draggable as ve } from "@scalar/draggable";
4
+ import { shouldIgnoreEntity as J } from "@scalar/oas-utils/helpers";
5
+ import { useRouter as ge, RouterLink as Q } from "vue-router";
6
+ import { useLayout as be } from "../../hooks/useLayout.js";
7
+ import { useSidebar as ye } from "../../hooks/useSidebar.js";
8
+ import { useActiveEntities as he } from "../../store/active-entities.js";
9
+ import { PathId as R } from "../../routes.js";
10
+ import xe from "../../components/HttpMethod/HttpMethod.vue.js";
11
+ import { getModifiers as ke } from "../../libs/hot-keys.js";
12
+ import { useWorkspace as we } from "../../store/store.js";
13
+ const qe = { class: "line-clamp-1 w-full pl-2 break-all" }, Ue = { class: "flex flex-row items-center gap-1" }, De = { class: "relative" }, Ie = { class: "flex items-start" }, Ce = { class: "flex flex-1 flex-row justify-between font-medium" }, Re = { class: "line-clamp-1 w-full text-left break-all" }, Te = { class: "relative flex h-fit justify-end" }, Me = {
14
14
  class: "flex items-center justify-center",
15
15
  type: "button"
16
- }, We = ["aria-expanded"], Ae = { class: "flex h-5 max-w-[14px] items-center justify-center" }, Ne = { class: "flex flex-1 flex-row justify-between" }, Oe = { class: "line-clamp-1 w-full text-left font-medium break-all" }, Pe = { class: "relative flex h-fit justify-end" }, Ve = {
16
+ }, Ee = ["aria-expanded"], $e = { class: "flex h-5 max-w-[14px] items-center justify-center" }, ze = { class: "flex flex-1 flex-row justify-between" }, Se = { class: "line-clamp-1 w-full text-left font-medium break-all" }, je = { class: "relative flex h-fit justify-end" }, Be = {
17
17
  class: "flex items-center justify-center",
18
18
  type: "button"
19
- }, Fe = { key: 3 }, O = "hover:bg-sidebar-b-active indent-padding-left", it = /* @__PURE__ */ me({
19
+ }, We = { key: 3 }, W = "hover:bg-sidebar-b-active indent-padding-left", Qe = /* @__PURE__ */ re({
20
20
  __name: "RequestSidebarItem",
21
21
  props: {
22
22
  isDraggable: { type: Boolean, default: !1 },
@@ -26,60 +26,59 @@ const Te = { class: "line-clamp-1 w-full pl-2 break-all" }, Me = { class: "flex
26
26
  menuItem: {}
27
27
  },
28
28
  emits: ["onDragEnd", "newTab", "openMenu"],
29
- setup(l, { emit: ne }) {
30
- ve((e) => ({
31
- eae2c57a: ae.value,
32
- "7c91ad9b": re.value
29
+ setup(o, { emit: X }) {
30
+ ue((t) => ({
31
+ eae2c57a: te.value,
32
+ "7c91ad9b": ie.value
33
33
  }));
34
- const oe = ne, { activeCollection: le, activeRequest: P, activeRouterParams: se, activeWorkspace: U } = De(), {
35
- collections: C,
36
- tags: R,
37
- requests: z,
38
- requestExamples: E,
39
- collectionMutators: S,
40
- tagMutators: V,
41
- requestMutators: j,
42
- requestExampleMutators: F,
43
- events: Y
44
- } = Ie(), x = we(), { collapsedSidebarFolders: D, toggleSidebarFolder: H } = qe(), { layout: p } = Ue(), i = b(() => {
45
- var o, u, g, T, J, Q;
46
- const e = C[l.uid], t = R[l.uid], r = z[l.uid], a = E[l.uid];
47
- return e ? {
48
- title: ((o = e.info) == null ? void 0 : o.title) || "Untitled Collection",
49
- entity: e,
34
+ const Z = X, { activeCollection: _, activeRequest: A, activeRouterParams: ee, activeWorkspace: x } = he(), {
35
+ collections: q,
36
+ tags: U,
37
+ requests: T,
38
+ requestExamples: M,
39
+ collectionMutators: E,
40
+ tagMutators: N,
41
+ requestMutators: $,
42
+ requestExampleMutators: O,
43
+ events: P
44
+ } = we(), y = ge(), { collapsedSidebarFolders: w, toggleSidebarFolder: V } = ye(), { layout: d } = be(), i = v(() => {
45
+ const t = q[o.uid], e = U[o.uid], r = T[o.uid], l = M[o.uid];
46
+ return t ? {
47
+ title: t.info?.title || "Untitled Collection",
48
+ entity: t,
50
49
  resourceTitle: "Collection",
51
- children: e.children,
52
- icon: e["x-scalar-icon"],
53
- documentUrl: e.documentUrl,
54
- watchMode: e.watchMode,
55
- to: e.uid && ((u = e == null ? void 0 : e.info) == null ? void 0 : u.title) !== "Drafts" ? {
50
+ children: t.children,
51
+ icon: t["x-scalar-icon"],
52
+ documentUrl: t.documentUrl,
53
+ watchMode: t.watchMode,
54
+ to: t.uid && t?.info?.title !== "Drafts" ? {
56
55
  name: "collection",
57
56
  params: {
58
- [$.Workspace]: (g = U.value) == null ? void 0 : g.uid,
59
- [$.Collection]: e.uid
57
+ [R.Workspace]: x.value?.uid,
58
+ [R.Collection]: t.uid
60
59
  }
61
60
  } : void 0,
62
61
  warning: "This cannot be undone. You're about to delete the collection and all folders and requests inside it.",
63
- edit: (k, X) => {
64
- S.edit(e.uid, "info.title", k), X && S.edit(e.uid, "x-scalar-icon", X);
62
+ edit: (a, I) => {
63
+ E.edit(t.uid, "info.title", a), I && E.edit(t.uid, "x-scalar-icon", I);
65
64
  },
66
65
  delete: () => {
67
- U.value && S.delete(e, U.value);
66
+ x.value && E.delete(t, x.value);
68
67
  }
69
- } : t ? {
70
- title: t.name,
71
- entity: t,
68
+ } : e ? {
69
+ title: e.name,
70
+ entity: e,
72
71
  resourceTitle: "Tag",
73
- children: t.children,
72
+ children: e.children,
74
73
  warning: "This cannot be undone. You're about to delete the tag and all requests inside it",
75
- edit: (k) => V.edit(t.uid, "name", k),
76
- delete: () => l.parentUids[0] && V.delete(t, l.parentUids[0])
74
+ edit: (a) => N.edit(e.uid, "name", a),
75
+ delete: () => o.parentUids[0] && N.delete(e, o.parentUids[0])
77
76
  } : r ? {
78
77
  title: r.summary ?? r.path,
79
78
  to: {
80
79
  name: "request",
81
80
  params: {
82
- workspace: (T = U.value) == null ? void 0 : T.uid,
81
+ workspace: x.value?.uid,
83
82
  request: r.uid
84
83
  }
85
84
  },
@@ -88,25 +87,25 @@ const Te = { class: "line-clamp-1 w-full pl-2 break-all" }, Me = { class: "flex
88
87
  resourceTitle: "Request",
89
88
  warning: "This cannot be undone. You're about to delete the request.",
90
89
  children: r.examples.slice(1),
91
- edit: (k) => j.edit(r.uid, "summary", k),
92
- delete: () => l.parentUids[0] && j.delete(r, l.parentUids[0])
93
- } : a != null && a.requestUid ? {
94
- title: a.name,
90
+ edit: (a) => $.edit(r.uid, "summary", a),
91
+ delete: () => o.parentUids[0] && $.delete(r, o.parentUids[0])
92
+ } : l?.requestUid ? {
93
+ title: l.name,
95
94
  to: {
96
95
  name: "request.examples",
97
96
  params: {
98
- workspace: (J = U.value) == null ? void 0 : J.uid,
99
- request: a.requestUid,
100
- examples: a.uid
97
+ workspace: x.value?.uid,
98
+ request: l.requestUid,
99
+ examples: l.uid
101
100
  }
102
101
  },
103
- method: (Q = z[a.requestUid]) == null ? void 0 : Q.method,
104
- entity: a,
102
+ method: T[l.requestUid]?.method,
103
+ entity: l,
105
104
  resourceTitle: "Example",
106
105
  warning: "This cannot be undone. You're about to delete the example from the request.",
107
106
  children: [],
108
- edit: (k) => F.edit(a.uid, "name", k),
109
- delete: () => F.delete(a)
107
+ edit: (a) => O.edit(l.uid, "name", a),
108
+ delete: () => O.delete(l)
110
109
  } : {
111
110
  title: "Unknown",
112
111
  entity: {
@@ -118,313 +117,210 @@ const Te = { class: "line-clamp-1 w-full pl-2 break-all" }, Me = { class: "flex
118
117
  edit: () => null,
119
118
  delete: () => null
120
119
  };
121
- }), I = b(
120
+ }), D = v(
122
121
  () => i.value.entity.type === "collection" && i.value.title === "Drafts"
123
- ), ae = b(() => l.parentUids.length ? p === "modal" ? `${(l.parentUids.length - 1) * 12}px` : `${l.parentUids.length * 12}px` : "12px"), re = b(() => l.parentUids.length ? p === "modal" ? `${(l.parentUids.length - 1) * 12}px` : `${l.parentUids.length * 12}px` : "0px"), ue = b(
124
- () => {
125
- var e;
126
- return D[l.uid] || ((e = P.value) == null ? void 0 : e.uid) === l.uid && i.value.entity.examples.length > 1;
127
- }
128
- ), de = b(
129
- () => {
130
- var e;
131
- return typeof x.currentRoute.value.name == "string" && x.currentRoute.value.name.startsWith("request") && se.value[$.Request] === "default" && ((e = P.value) == null ? void 0 : e.uid) === l.uid;
132
- }
133
- ), B = ge(null), L = b(() => {
134
- let e = 0.5, t = 0.5;
135
- if (!B.value)
136
- return { ceiling: e, floor: t };
137
- const { draggingItem: r } = B.value;
138
- return !C[r == null ? void 0 : r.id] && i.value.entity.type === "collection" ? (e = 1, t = 0) : i.value.entity.type === "tag" && (e = 0.8, t = 0.2), { ceiling: e, floor: t };
139
- }), pe = (e, t) => !(p === "modal" || E[t.id] || C[e.id]), fe = (e, t) => {
140
- e && (Re(["default"]).some((o) => e[o]) ? oe("newTab", t.title || "", t.entity.uid) : t.to && x.push(t.to), xe(() => Y.focusAddressBar.emit()));
122
+ ), te = v(() => o.parentUids.length ? d === "modal" ? `${(o.parentUids.length - 1) * 12}px` : `${o.parentUids.length * 12}px` : "12px"), ie = v(() => o.parentUids.length ? d === "modal" ? `${(o.parentUids.length - 1) * 12}px` : `${o.parentUids.length * 12}px` : "0px"), ne = v(
123
+ () => w[o.uid] || A.value?.uid === o.uid && i.value.entity.examples.length > 1
124
+ ), le = v(
125
+ () => typeof y.currentRoute.value.name == "string" && y.currentRoute.value.name.startsWith("request") && ee.value[R.Request] === "default" && A.value?.uid === o.uid
126
+ ), z = de(null), F = v(() => {
127
+ let t = 0.5, e = 0.5;
128
+ if (!z.value)
129
+ return { ceiling: t, floor: e };
130
+ const { draggingItem: r } = z.value;
131
+ return !q[r?.id] && i.value.entity.type === "collection" ? (t = 1, e = 0) : i.value.entity.type === "tag" && (t = 0.8, e = 0.2), { ceiling: t, floor: e };
132
+ }), oe = (t, e) => !(d === "modal" || M[e.id] || q[t.id]), se = (t, e) => {
133
+ t && (ke(["default"]).some((a) => t[a]) ? Z("newTab", e.title || "", e.entity.uid) : e.to && y.push(e.to), me(() => P.focusAddressBar.emit()));
141
134
  };
142
- function W(e) {
143
- var o, u, g;
144
- const t = l.parentUids[0] ? ((o = C[l.parentUids[0]]) == null ? void 0 : o.uid) || "" : e, r = l.parentUids[0] && ((u = R[e]) != null && u.name) ? { tags: [R[e].name] } : {}, a = j.add(
135
+ function S(t) {
136
+ const e = o.parentUids[0] ? q[o.parentUids[0]]?.uid || "" : t, r = o.parentUids[0] && U[t]?.name ? { tags: [U[t].name] } : {}, l = $.add(
145
137
  r,
146
- t
138
+ e
147
139
  );
148
- a && (x.push({
140
+ l && (y.push({
149
141
  name: "request",
150
142
  params: {
151
- workspace: (g = U.value) == null ? void 0 : g.uid,
152
- request: a.uid
143
+ workspace: x.value?.uid,
144
+ request: l.uid
153
145
  }
154
- }), Y.hotKeys.emit({
146
+ }), P.hotKeys.emit({
155
147
  focusAddressBar: new KeyboardEvent("keydown", { key: "l" })
156
148
  }));
157
149
  }
158
- const G = b(() => {
159
- const { uid: e, watchModeStatus: t } = le.value || {};
160
- return e !== i.value.entity.uid ? "text-c-3" : t === "WATCHING" ? "text-c-1" : t === "ERROR" ? "text-red" : "text-c-3";
161
- }), K = b(() => i.value.title === "Drafts" && p !== "modal" && i.value.children.length > 0), ce = b(() => {
162
- const e = z[l.uid];
163
- if (e)
164
- return !te(e);
165
- const t = R[l.uid];
166
- return t ? !te(t) : !0;
150
+ const Y = v(() => {
151
+ const { uid: t, watchModeStatus: e } = _.value || {};
152
+ return t !== i.value.entity.uid ? "text-c-3" : e === "WATCHING" ? "text-c-1" : e === "ERROR" ? "text-red" : "text-c-3";
153
+ }), H = v(() => i.value.title === "Drafts" && d !== "modal" && i.value.children.length > 0), ae = v(() => {
154
+ const t = T[o.uid];
155
+ if (t)
156
+ return !J(t);
157
+ const e = U[o.uid];
158
+ return e ? !J(e) : !0;
167
159
  });
168
- return (e, t) => {
169
- const r = be("RequestSidebarItem", !0);
170
- return ce.value ? (d(), M("li", {
160
+ return (t, e) => {
161
+ const r = pe("RequestSidebarItem", !0);
162
+ return ae.value ? (u(), C("li", {
171
163
  key: 0,
172
- class: y(["relative flex flex-row", [
173
- n(p) === "modal" && e.parentUids.length > 1 || n(p) !== "modal" && e.parentUids.length ? "before:bg-border indent-border-line-offset mb-[.5px] before:pointer-events-none before:absolute before:top-0 before:left-[calc(.75rem_+_.5px)] before:z-1 before:h-[calc(100%_+_.5px)] before:w-[.5px] last:mb-0 last:before:h-full" : ""
164
+ class: g(["relative flex flex-row", [
165
+ n(d) === "modal" && t.parentUids.length > 1 || n(d) !== "modal" && t.parentUids.length ? "before:bg-border indent-border-line-offset mb-[.5px] before:pointer-events-none before:absolute before:top-0 before:left-[calc(.75rem_+_.5px)] before:z-1 before:h-[calc(100%_+_.5px)] before:w-[.5px] last:mb-0 last:before:h-full" : ""
174
166
  ]])
175
167
  }, [
176
- m(n(ke), {
168
+ f(n(ve), {
177
169
  id: i.value.entity.uid,
178
170
  ref_key: "draggableRef",
179
- ref: B,
180
- ceiling: L.value.ceiling,
171
+ ref: z,
172
+ ceiling: F.value.ceiling,
181
173
  class: "gap-1/2 flex flex-1 flex-col text-base",
182
- floor: L.value.floor,
183
- isDraggable: e.isDraggable,
184
- isDroppable: e.isDroppable,
185
- parentIds: e.parentUids,
186
- onOnDragEnd: t[12] || (t[12] = (...a) => e.$emit("onDragEnd", ...a))
174
+ floor: F.value.floor,
175
+ isDraggable: t.isDraggable,
176
+ isDroppable: t.isDroppable,
177
+ parentIds: t.parentUids,
178
+ onOnDragEnd: e[12] || (e[12] = (...l) => t.$emit("onDragEnd", ...l))
187
179
  }, {
188
- default: v(() => {
189
- var a;
190
- return [
191
- (i.value.entity.type === "request" || i.value.entity.type === "requestExample") && i.value.to ? (d(), c(n(ie), {
192
- key: 0,
193
- class: "group no-underline",
194
- to: i.value.to,
195
- onClick: t[1] || (t[1] = w(
196
- (o) => fe(o, i.value),
197
- ["prevent"]
198
- ))
199
- }, {
200
- default: v(({ isExactActive: o }) => {
201
- var u, g;
202
- return [
203
- s("div", {
204
- class: y(["relative flex min-h-8 w-full cursor-pointer flex-row items-start justify-between gap-0.5 rounded py-1.5 pr-2", [
205
- O,
206
- o || de.value ? "bg-sidebar-b-active text-sidebar-c-active font-medium transition-none" : "text-sidebar-c-2"
207
- ]])
208
- }, [
209
- s("span", Te, A(i.value.title || "Untitled"), 1),
210
- s("div", Me, [
211
- s("div", $e, [
212
- n(p) !== "modal" ? (d(), c(n(q), {
213
- key: 0,
214
- class: y(["hover:bg-b-3 hidden aspect-square h-fit px-0.5 py-0 opacity-0 group-hover:flex group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100", {
215
- flex: ((g = (u = e.menuItem) == null ? void 0 : u.item) == null ? void 0 : g.entity.uid) === i.value.entity.uid && e.menuItem.open
216
- }]),
217
- size: "sm",
218
- type: "button",
219
- variant: "ghost",
220
- onClick: t[0] || (t[0] = w(
221
- (T) => e.$emit("openMenu", {
222
- item: i.value,
223
- parentUids: e.parentUids,
224
- targetRef: T.currentTarget,
225
- open: !e.menuItem.open
226
- }),
227
- ["stop", "prevent"]
228
- ))
229
- }, {
230
- default: v(() => [
231
- m(n(h), {
232
- icon: "Ellipses",
233
- size: "md"
234
- })
235
- ]),
236
- _: 1
237
- }, 8, ["class"])) : f("", !0)
180
+ default: m(() => [
181
+ (i.value.entity.type === "request" || i.value.entity.type === "requestExample") && i.value.to ? (u(), c(n(Q), {
182
+ key: 0,
183
+ class: "group no-underline",
184
+ to: i.value.to,
185
+ onClick: e[1] || (e[1] = h(
186
+ (l) => se(l, i.value),
187
+ ["prevent"]
188
+ ))
189
+ }, {
190
+ default: m(({ isExactActive: l }) => [
191
+ s("div", {
192
+ class: g(["relative flex min-h-8 w-full cursor-pointer flex-row items-start justify-between gap-0.5 rounded py-1.5 pr-2", [
193
+ W,
194
+ l || le.value ? "bg-sidebar-b-active text-sidebar-c-active font-medium transition-none" : "text-sidebar-c-2"
195
+ ]])
196
+ }, [
197
+ s("span", qe, j(i.value.title || "Untitled"), 1),
198
+ s("div", Ue, [
199
+ s("div", De, [
200
+ n(d) !== "modal" ? (u(), c(n(k), {
201
+ key: 0,
202
+ class: g(["hover:bg-b-3 hidden aspect-square h-fit px-0.5 py-0 opacity-0 group-hover:flex group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100", {
203
+ flex: t.menuItem?.item?.entity.uid === i.value.entity.uid && t.menuItem.open
204
+ }]),
205
+ size: "sm",
206
+ type: "button",
207
+ variant: "ghost",
208
+ onClick: e[0] || (e[0] = h(
209
+ (a) => t.$emit("openMenu", {
210
+ item: i.value,
211
+ parentUids: t.parentUids,
212
+ targetRef: a.currentTarget,
213
+ open: !t.menuItem.open
214
+ }),
215
+ ["stop", "prevent"]
216
+ ))
217
+ }, {
218
+ default: m(() => [
219
+ f(n(b), {
220
+ icon: "Ellipses",
221
+ size: "md"
222
+ })
238
223
  ]),
239
- s("span", ze, [
240
- t[13] || (t[13] = N("")),
241
- t[14] || (t[14] = s("span", { class: "sr-only" }, "HTTP Method:", -1)),
242
- i.value.method ? (d(), c(n(Ce), {
243
- key: 0,
244
- class: "font-bold",
245
- method: i.value.method
246
- }, null, 8, ["method"])) : f("", !0)
247
- ])
248
- ])
249
- ], 2)
250
- ];
251
- }),
252
- _: 1
253
- }, 8, ["to"])) : (n(p) !== "modal" || e.parentUids.length) && i.value.entity.type === "collection" && i.value.to ? (d(), c(n(ie), {
254
- key: 1,
255
- "aria-expanded": !!n(D)[i.value.entity.uid],
256
- class: y(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 no-underline focus-visible:z-10", [
257
- O,
258
- {
259
- "bg-sidebar-b-active text-sidebar-c-active transition-none": typeof n(x).currentRoute.value.name == "string" && n(x).currentRoute.value.name.startsWith("collection") && n(x).currentRoute.value.params[n($).Collection] === i.value.entity.uid,
260
- "text-c-2": i.value.title === "Untitled Collection"
261
- }
262
- ]]),
263
- to: i.value.to
264
- }, {
265
- default: v(() => {
266
- var o;
267
- return [
268
- s("span", {
269
- class: "flex h-5 max-w-[14px] cursor-pointer items-center justify-center",
270
- onClick: t[2] || (t[2] = w((u) => n(H)(i.value.entity.uid), ["stop", "prevent"]))
271
- }, [
272
- Z(e.$slots, "leftIcon", {}, () => [
273
- m(n(_), {
274
- class: "text-c-3 shrink-0",
275
- open: !!n(D)[i.value.entity.uid]
276
- }, null, 8, ["open"])
277
- ], !0),
278
- t[15] || (t[15] = N("   "))
224
+ _: 1
225
+ }, 8, ["class"])) : p("", !0)
279
226
  ]),
280
- s("div", Ee, [
281
- s("span", Se, A(i.value.title), 1),
282
- s("div", je, [
283
- s("div", {
284
- class: y(["items-center gap-px opacity-0 group-hover:flex group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100", {
285
- flex: e.menuItem.open,
286
- hidden: !e.menuItem.open || ((o = e.menuItem.item) == null ? void 0 : o.entity.uid) !== i.value.entity.uid
287
- }])
288
- }, [
289
- n(p) !== "modal" && !I.value || I.value && K.value ? (d(), c(n(q), {
290
- key: 0,
291
- class: "hover:bg-b-3 hover:text-c-1 aspect-square h-fit px-0.5 py-0 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100",
292
- size: "sm",
293
- variant: "ghost",
294
- onClick: t[3] || (t[3] = w(
295
- (u) => e.$emit("openMenu", {
296
- item: i.value,
297
- parentUids: e.parentUids,
298
- targetRef: u.currentTarget.parentNode,
299
- open: !0
300
- }),
301
- ["stop", "prevent"]
302
- ))
303
- }, {
304
- default: v(() => [
305
- m(n(h), {
306
- icon: "Ellipses",
307
- size: "md"
308
- })
309
- ]),
310
- _: 1
311
- })) : f("", !0),
312
- n(p) !== "modal" ? (d(), c(n(q), {
313
- key: 1,
314
- class: "hover:bg-b-3 hover:text-c-1 aspect-square h-fit px-0.5 py-0 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100",
315
- size: "sm",
316
- variant: "ghost",
317
- onClick: t[4] || (t[4] = w((u) => W(i.value.entity.uid), ["stop", "prevent"]))
318
- }, {
319
- default: v(() => [
320
- m(n(h), {
321
- icon: "Add",
322
- size: "md",
323
- thickness: "2"
324
- })
325
- ]),
326
- _: 1
327
- })) : f("", !0)
328
- ], 2),
329
- i.value.watchMode ? (d(), c(n(ee), {
330
- key: 0,
331
- placement: "right",
332
- offset: 12,
333
- content: `Watching: ${i.value.documentUrl}`
334
- }, {
335
- default: v(() => [
336
- s("button", Be, [
337
- m(n(h), {
338
- class: y(["ml-0.5 text-sm", G.value]),
339
- icon: "Watch",
340
- size: "md",
341
- thickness: "2"
342
- }, null, 8, ["class"])
343
- ])
344
- ]),
345
- _: 1
346
- }, 8, ["content"])) : f("", !0),
347
- t[16] || (t[16] = s("span", null, " ", -1))
348
- ])
227
+ s("span", Ie, [
228
+ e[13] || (e[13] = B("   ")),
229
+ e[14] || (e[14] = s("span", { class: "sr-only" }, "HTTP Method:", -1)),
230
+ i.value.method ? (u(), c(n(xe), {
231
+ key: 0,
232
+ class: "font-bold",
233
+ method: i.value.method
234
+ }, null, 8, ["method"])) : p("", !0)
349
235
  ])
350
- ];
351
- }),
352
- _: 3
353
- }, 8, ["aria-expanded", "class", "to"])) : n(p) !== "modal" || e.parentUids.length ? (d(), M("button", {
354
- key: 2,
355
- "aria-expanded": !!n(D)[i.value.entity.uid],
356
- class: y(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 focus-visible:z-10", [O]]),
357
- type: "button",
358
- onClick: t[7] || (t[7] = (o) => n(H)(i.value.entity.uid))
359
- }, [
360
- s("span", Ae, [
361
- Z(e.$slots, "leftIcon", {}, () => [
362
- m(n(_), {
363
- class: "text-c-3 hover:text-c-1 shrink-0",
364
- open: !!n(D)[i.value.entity.uid]
236
+ ])
237
+ ], 2)
238
+ ]),
239
+ _: 1
240
+ }, 8, ["to"])) : (n(d) !== "modal" || t.parentUids.length) && i.value.entity.type === "collection" && i.value.to ? (u(), c(n(Q), {
241
+ key: 1,
242
+ "aria-expanded": !!n(w)[i.value.entity.uid],
243
+ class: g(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 no-underline focus-visible:z-10", [
244
+ W,
245
+ {
246
+ "bg-sidebar-b-active text-sidebar-c-active transition-none": typeof n(y).currentRoute.value.name == "string" && n(y).currentRoute.value.name.startsWith("collection") && n(y).currentRoute.value.params[n(R).Collection] === i.value.entity.uid,
247
+ "text-c-2": i.value.title === "Untitled Collection"
248
+ }
249
+ ]]),
250
+ to: i.value.to
251
+ }, {
252
+ default: m(() => [
253
+ s("span", {
254
+ class: "flex h-5 max-w-[14px] cursor-pointer items-center justify-center",
255
+ onClick: e[2] || (e[2] = h((l) => n(V)(i.value.entity.uid), ["stop", "prevent"]))
256
+ }, [
257
+ L(t.$slots, "leftIcon", {}, () => [
258
+ f(n(G), {
259
+ class: "text-c-3 shrink-0",
260
+ open: !!n(w)[i.value.entity.uid]
365
261
  }, null, 8, ["open"])
366
262
  ], !0),
367
- t[17] || (t[17] = N("   "))
263
+ e[15] || (e[15] = B("   "))
368
264
  ]),
369
- s("div", Ne, [
370
- s("span", Oe, A(i.value.title), 1),
371
- s("div", Pe, [
265
+ s("div", Ce, [
266
+ s("span", Re, j(i.value.title), 1),
267
+ s("div", Te, [
372
268
  s("div", {
373
- class: y(["items-center gap-px opacity-0 group-hover:flex group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100", {
374
- flex: e.menuItem.open,
375
- hidden: !e.menuItem.open || ((a = e.menuItem.item) == null ? void 0 : a.entity.uid) !== i.value.entity.uid
269
+ class: g(["items-center gap-px opacity-0 group-hover:flex group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100", {
270
+ flex: t.menuItem.open,
271
+ hidden: !t.menuItem.open || t.menuItem.item?.entity.uid !== i.value.entity.uid
376
272
  }])
377
273
  }, [
378
- n(p) !== "modal" && !I.value || I.value && K.value ? (d(), c(n(q), {
274
+ n(d) !== "modal" && !D.value || D.value && H.value ? (u(), c(n(k), {
379
275
  key: 0,
380
276
  class: "hover:bg-b-3 hover:text-c-1 aspect-square h-fit px-0.5 py-0 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100",
381
277
  size: "sm",
382
278
  variant: "ghost",
383
- onClick: t[5] || (t[5] = w(
384
- (o) => e.$emit("openMenu", {
279
+ onClick: e[3] || (e[3] = h(
280
+ (l) => t.$emit("openMenu", {
385
281
  item: i.value,
386
- parentUids: e.parentUids,
387
- targetRef: o.currentTarget.parentNode,
282
+ parentUids: t.parentUids,
283
+ targetRef: l.currentTarget.parentNode,
388
284
  open: !0
389
285
  }),
390
286
  ["stop", "prevent"]
391
287
  ))
392
288
  }, {
393
- default: v(() => [
394
- m(n(h), {
289
+ default: m(() => [
290
+ f(n(b), {
395
291
  icon: "Ellipses",
396
292
  size: "md"
397
293
  })
398
294
  ]),
399
295
  _: 1
400
- })) : f("", !0),
401
- n(p) !== "modal" ? (d(), c(n(q), {
296
+ })) : p("", !0),
297
+ n(d) !== "modal" ? (u(), c(n(k), {
402
298
  key: 1,
403
299
  class: "hover:bg-b-3 hover:text-c-1 aspect-square h-fit px-0.5 py-0 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100",
404
300
  size: "sm",
405
301
  variant: "ghost",
406
- onClick: t[6] || (t[6] = w((o) => W(i.value.entity.uid), ["stop", "prevent"]))
302
+ onClick: e[4] || (e[4] = h((l) => S(i.value.entity.uid), ["stop", "prevent"]))
407
303
  }, {
408
- default: v(() => [
409
- m(n(h), {
304
+ default: m(() => [
305
+ f(n(b), {
410
306
  icon: "Add",
411
307
  size: "md",
412
308
  thickness: "2"
413
309
  })
414
310
  ]),
415
311
  _: 1
416
- })) : f("", !0)
312
+ })) : p("", !0)
417
313
  ], 2),
418
- i.value.watchMode ? (d(), c(n(ee), {
314
+ i.value.watchMode ? (u(), c(n(K), {
419
315
  key: 0,
420
- content: "Watching: {{ item.documentUrl }}",
421
316
  placement: "right",
422
- offset: 12
317
+ offset: 12,
318
+ content: `Watching: ${i.value.documentUrl}`
423
319
  }, {
424
- default: v(() => [
425
- s("button", Ve, [
426
- m(n(h), {
427
- class: y(["ml-0.5 text-sm", G.value]),
320
+ default: m(() => [
321
+ s("button", Me, [
322
+ f(n(b), {
323
+ class: g(["ml-0.5 text-sm", Y.value]),
428
324
  icon: "Watch",
429
325
  size: "md",
430
326
  thickness: "2"
@@ -432,48 +328,135 @@ const Te = { class: "line-clamp-1 w-full pl-2 break-all" }, Me = { class: "flex
432
328
  ])
433
329
  ]),
434
330
  _: 1
435
- })) : f("", !0),
436
- t[18] || (t[18] = s("span", null, " ", -1))
331
+ }, 8, ["content"])) : p("", !0),
332
+ e[16] || (e[16] = s("span", null, " ", -1))
437
333
  ])
438
334
  ])
439
- ], 10, We)) : f("", !0),
440
- ue.value ? (d(), M("ul", Fe, [
441
- (d(!0), M(ye, null, he(i.value.children, (o) => (d(), c(r, {
442
- key: o,
443
- isDraggable: !n(E)[o],
444
- isDroppable: pe,
445
- menuItem: e.menuItem,
446
- parentUids: [...e.parentUids, e.uid],
447
- uid: o,
448
- onNewTab: t[8] || (t[8] = (u, g) => e.$emit("newTab", u, g)),
449
- onOnDragEnd: t[9] || (t[9] = (...u) => e.$emit("onDragEnd", ...u)),
450
- onOpenMenu: t[10] || (t[10] = (u) => e.$emit("openMenu", u))
451
- }, null, 8, ["isDraggable", "menuItem", "parentUids", "uid"]))), 128)),
452
- i.value.children.length === 0 ? (d(), c(n(q), {
453
- key: 0,
454
- class: y(["text-c-1 hover:bg-b-2 flex h-8 w-full justify-start gap-1.5 py-0 text-xs", e.parentUids.length ? "pl-9" : ""]),
455
- variant: "ghost",
456
- onClick: t[11] || (t[11] = (o) => W(i.value.entity.uid))
457
- }, {
458
- default: v(() => [
459
- m(n(h), {
460
- icon: "Add",
461
- size: "sm"
462
- }),
463
- t[19] || (t[19] = s("span", null, "Add Request", -1))
464
- ]),
465
- _: 1,
466
- __: [19]
467
- }, 8, ["class"])) : f("", !0)
468
- ])) : f("", !0)
469
- ];
470
- }),
335
+ ]),
336
+ _: 3
337
+ }, 8, ["aria-expanded", "class", "to"])) : n(d) !== "modal" || t.parentUids.length ? (u(), C("button", {
338
+ key: 2,
339
+ "aria-expanded": !!n(w)[i.value.entity.uid],
340
+ class: g(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 focus-visible:z-10", [W]]),
341
+ type: "button",
342
+ onClick: e[7] || (e[7] = (l) => n(V)(i.value.entity.uid))
343
+ }, [
344
+ s("span", $e, [
345
+ L(t.$slots, "leftIcon", {}, () => [
346
+ f(n(G), {
347
+ class: "text-c-3 hover:text-c-1 shrink-0",
348
+ open: !!n(w)[i.value.entity.uid]
349
+ }, null, 8, ["open"])
350
+ ], !0),
351
+ e[17] || (e[17] = B(""))
352
+ ]),
353
+ s("div", ze, [
354
+ s("span", Se, j(i.value.title), 1),
355
+ s("div", je, [
356
+ s("div", {
357
+ class: g(["items-center gap-px opacity-0 group-hover:flex group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100", {
358
+ flex: t.menuItem.open,
359
+ hidden: !t.menuItem.open || t.menuItem.item?.entity.uid !== i.value.entity.uid
360
+ }])
361
+ }, [
362
+ n(d) !== "modal" && !D.value || D.value && H.value ? (u(), c(n(k), {
363
+ key: 0,
364
+ class: "hover:bg-b-3 hover:text-c-1 aspect-square h-fit px-0.5 py-0 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100",
365
+ size: "sm",
366
+ variant: "ghost",
367
+ onClick: e[5] || (e[5] = h(
368
+ (l) => t.$emit("openMenu", {
369
+ item: i.value,
370
+ parentUids: t.parentUids,
371
+ targetRef: l.currentTarget.parentNode,
372
+ open: !0
373
+ }),
374
+ ["stop", "prevent"]
375
+ ))
376
+ }, {
377
+ default: m(() => [
378
+ f(n(b), {
379
+ icon: "Ellipses",
380
+ size: "md"
381
+ })
382
+ ]),
383
+ _: 1
384
+ })) : p("", !0),
385
+ n(d) !== "modal" ? (u(), c(n(k), {
386
+ key: 1,
387
+ class: "hover:bg-b-3 hover:text-c-1 aspect-square h-fit px-0.5 py-0 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100",
388
+ size: "sm",
389
+ variant: "ghost",
390
+ onClick: e[6] || (e[6] = h((l) => S(i.value.entity.uid), ["stop", "prevent"]))
391
+ }, {
392
+ default: m(() => [
393
+ f(n(b), {
394
+ icon: "Add",
395
+ size: "md",
396
+ thickness: "2"
397
+ })
398
+ ]),
399
+ _: 1
400
+ })) : p("", !0)
401
+ ], 2),
402
+ i.value.watchMode ? (u(), c(n(K), {
403
+ key: 0,
404
+ content: "Watching: {{ item.documentUrl }}",
405
+ placement: "right",
406
+ offset: 12
407
+ }, {
408
+ default: m(() => [
409
+ s("button", Be, [
410
+ f(n(b), {
411
+ class: g(["ml-0.5 text-sm", Y.value]),
412
+ icon: "Watch",
413
+ size: "md",
414
+ thickness: "2"
415
+ }, null, 8, ["class"])
416
+ ])
417
+ ]),
418
+ _: 1
419
+ })) : p("", !0),
420
+ e[18] || (e[18] = s("span", null, " ", -1))
421
+ ])
422
+ ])
423
+ ], 10, Ee)) : p("", !0),
424
+ ne.value ? (u(), C("ul", We, [
425
+ (u(!0), C(ce, null, fe(i.value.children, (l) => (u(), c(r, {
426
+ key: l,
427
+ isDraggable: !n(M)[l],
428
+ isDroppable: oe,
429
+ menuItem: t.menuItem,
430
+ parentUids: [...t.parentUids, t.uid],
431
+ uid: l,
432
+ onNewTab: e[8] || (e[8] = (a, I) => t.$emit("newTab", a, I)),
433
+ onOnDragEnd: e[9] || (e[9] = (...a) => t.$emit("onDragEnd", ...a)),
434
+ onOpenMenu: e[10] || (e[10] = (a) => t.$emit("openMenu", a))
435
+ }, null, 8, ["isDraggable", "menuItem", "parentUids", "uid"]))), 128)),
436
+ i.value.children.length === 0 ? (u(), c(n(k), {
437
+ key: 0,
438
+ class: g(["text-c-1 hover:bg-b-2 flex h-8 w-full justify-start gap-1.5 py-0 text-xs", t.parentUids.length ? "pl-9" : ""]),
439
+ variant: "ghost",
440
+ onClick: e[11] || (e[11] = (l) => S(i.value.entity.uid))
441
+ }, {
442
+ default: m(() => [
443
+ f(n(b), {
444
+ icon: "Add",
445
+ size: "sm"
446
+ }),
447
+ e[19] || (e[19] = s("span", null, "Add Request", -1))
448
+ ]),
449
+ _: 1,
450
+ __: [19]
451
+ }, 8, ["class"])) : p("", !0)
452
+ ])) : p("", !0)
453
+ ]),
471
454
  _: 3
472
455
  }, 8, ["id", "ceiling", "floor", "isDraggable", "isDroppable", "parentIds"])
473
- ], 2)) : f("", !0);
456
+ ], 2)) : p("", !0);
474
457
  };
475
458
  }
476
459
  });
477
460
  export {
478
- it as default
461
+ Qe as default
479
462
  };