@scalar/api-client 2.3.30 → 2.3.32

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 (182) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/components/AddressBar/AddressBar.vue2.js +3 -3
  3. package/dist/components/AddressBar/AddressBarHistory.vue2.js +1 -1
  4. package/dist/components/CodeInput/CodeInput.vue2.js +1 -1
  5. package/dist/components/CodeInput/codeVariableWidget.js +4 -4
  6. package/dist/components/CommandPalette/CommandActionForm.vue.js +2 -2
  7. package/dist/components/CommandPalette/CommandActionInput.vue.js +2 -2
  8. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +2 -2
  9. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +6 -6
  10. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +5 -5
  11. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +7 -7
  12. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +7 -7
  13. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +6 -6
  14. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +4 -4
  15. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  16. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +5 -5
  17. package/dist/components/CommandPalette/WatchModeToggle.vue.js +2 -2
  18. package/dist/components/DataTable/DataTable.vue.js +5 -5
  19. package/dist/components/DataTable/DataTableCell.vue.js +2 -2
  20. package/dist/components/DataTable/DataTableCheckbox.vue.js +2 -2
  21. package/dist/components/DataTable/DataTableHeader.vue.js +2 -2
  22. package/dist/components/DataTable/DataTableInput.vue2.js +9 -9
  23. package/dist/components/DataTable/DataTableInputSelect.vue.js +5 -5
  24. package/dist/components/DataTable/DataTableRow.vue.js +2 -2
  25. package/dist/components/DataTable/DataTableText.vue.js +2 -2
  26. package/dist/components/DataTable/index.js +14 -14
  27. package/dist/components/EmptyState.vue2.js +2 -2
  28. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +12 -12
  29. package/dist/components/Form/Form.vue.js +4 -4
  30. package/dist/components/Form/LabelInput.vue2.js +4 -4
  31. package/dist/components/HelpfulLink.vue.js +2 -2
  32. package/dist/components/HttpMethod/HttpMethod.vue2.js +3 -3
  33. package/dist/components/IconSelector.vue.js +5 -5
  34. package/dist/components/ImportCollection/DropEventListener.vue.js +3 -3
  35. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +2 -2
  36. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +1 -1
  37. package/dist/components/ImportCollection/ImportNowButton.vue.js +3 -3
  38. package/dist/components/ImportCollection/IntegrationLogo.vue.js +2 -2
  39. package/dist/components/ImportCollection/PrefetchError.vue.js +4 -4
  40. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +10 -10
  41. package/dist/components/OpenApiClientButton.vue2.js +4 -4
  42. package/dist/components/ScalarAsciiArt.vue2.js +3 -3
  43. package/dist/components/ScalarHotkey.vue.js +2 -2
  44. package/dist/components/SectionFilter.vue2.js +1 -1
  45. package/dist/components/SectionFilterButton.vue.js +2 -2
  46. package/dist/components/Server/ServerDropdown.vue.js +21 -21
  47. package/dist/components/Server/ServerDropdownItem.vue2.js +4 -4
  48. package/dist/components/Server/ServerSelector.vue.js +1 -1
  49. package/dist/components/Server/ServerVariablesForm.vue.js +4 -4
  50. package/dist/components/Server/ServerVariablesSelect.vue.js +1 -1
  51. package/dist/components/Server/ServerVariablesTextbox.vue.js +2 -2
  52. package/dist/components/Server/index.js +6 -6
  53. package/dist/components/SideNav/DownloadAppButton.vue2.js +5 -5
  54. package/dist/components/SideNav/SideHelp.vue.js +2 -2
  55. package/dist/components/SideNav/SideNav.vue.js +5 -5
  56. package/dist/components/SideNav/SideNavGroup.vue.js +2 -2
  57. package/dist/components/SideNav/SideNavLink.vue.js +4 -4
  58. package/dist/components/SideNav/SideNavRouterLink.vue.js +2 -2
  59. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +2 -2
  60. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +2 -2
  61. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +2 -2
  62. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +2 -2
  63. package/dist/components/Sidebar/Sidebar.vue2.js +4 -4
  64. package/dist/components/Sidebar/SidebarButton.vue.js +3 -3
  65. package/dist/components/Sidebar/SidebarList.vue.js +2 -2
  66. package/dist/components/Sidebar/SidebarListElement.vue2.js +9 -9
  67. package/dist/components/Sidebar/SidebarListElementActions.vue.js +1 -1
  68. package/dist/components/Sidebar/SidebarToggle.vue.js +3 -3
  69. package/dist/components/TopNav/TopNav.vue.js +2 -2
  70. package/dist/components/TopNav/TopNavItem.vue2.js +20 -20
  71. package/dist/components/ViewLayout/ViewLayout.vue.js +2 -2
  72. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +7 -7
  73. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +2 -2
  74. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +3 -3
  75. package/dist/hooks/useClientConfig.d.ts +3 -3
  76. package/dist/layouts/App/ApiClientApp.vue.js +10 -10
  77. package/dist/layouts/App/MainLayout.vue.js +2 -2
  78. package/dist/layouts/App/create-api-client-app.d.ts +2 -2
  79. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  80. package/dist/layouts/App/index.js +5 -4
  81. package/dist/layouts/Modal/ApiClientModal.vue2.js +2 -2
  82. package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -4
  83. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  84. package/dist/layouts/Web/ApiClientWeb.vue.js +6 -6
  85. package/dist/layouts/Web/create-api-client-web.d.ts +2 -2
  86. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  87. package/dist/libs/create-client.d.ts +2 -2
  88. package/dist/libs/create-client.d.ts.map +1 -1
  89. package/dist/libs/find-request.d.ts.map +1 -1
  90. package/dist/libs/hot-keys.d.ts +1 -1
  91. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  92. package/dist/router.js +4 -4
  93. package/dist/store/active-entities.d.ts.map +1 -1
  94. package/dist/store/active-entities.js +1 -1
  95. package/dist/store/import-spec.js +3 -3
  96. package/dist/store/requests.d.ts.map +1 -1
  97. package/dist/store/store.d.ts +2 -2
  98. package/dist/store/store.d.ts.map +1 -1
  99. package/dist/store/store.js +37 -42
  100. package/dist/store/workspace.d.ts +2 -2
  101. package/dist/style.css +1 -1
  102. package/dist/views/Collection/Collection.vue2.js +2 -2
  103. package/dist/views/Collection/CollectionAuthentication.vue2.js +5 -5
  104. package/dist/views/Collection/CollectionCookies.vue2.js +2 -2
  105. package/dist/views/Collection/CollectionEnvironment.vue2.js +2 -2
  106. package/dist/views/Collection/CollectionInfoForm.vue2.js +2 -2
  107. package/dist/views/Collection/CollectionNavigation.vue.js +1 -1
  108. package/dist/views/Collection/CollectionOverview.vue2.js +3 -3
  109. package/dist/views/Collection/CollectionScripts.vue2.js +2 -2
  110. package/dist/views/Collection/CollectionServerForm.vue.js +1 -1
  111. package/dist/views/Collection/CollectionServers.vue2.js +3 -3
  112. package/dist/views/Collection/CollectionSettings.vue2.js +4 -4
  113. package/dist/views/Collection/CollectionSync.vue2.js +2 -2
  114. package/dist/views/Collection/components/MarkdownInput.vue2.js +1 -1
  115. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +2 -0
  116. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -1
  117. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +16 -14
  118. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +3 -1
  119. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
  120. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +74 -31
  121. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +3 -1
  122. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
  123. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +8 -6
  124. package/dist/views/Components/CodeSnippet/index.js +8 -8
  125. package/dist/views/Cookies/CookieForm.vue.js +2 -2
  126. package/dist/views/Cookies/CookieModal.vue2.js +2 -2
  127. package/dist/views/Cookies/Cookies.vue2.js +6 -6
  128. package/dist/views/Environment/Environment.vue2.js +7 -7
  129. package/dist/views/Environment/EnvironmentColorModal.vue.js +2 -2
  130. package/dist/views/Environment/EnvironmentColors.vue.js +1 -1
  131. package/dist/views/Environment/EnvironmentModal.vue.js +7 -7
  132. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +10 -10
  133. package/dist/views/Request/Request.vue2.js +1 -1
  134. package/dist/views/Request/RequestRoot.vue2.js +1 -1
  135. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +2 -2
  136. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +1 -1
  137. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +5 -5
  138. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +10 -10
  139. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +11 -11
  140. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +2 -2
  141. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +1 -1
  142. package/dist/views/Request/RequestSection/RequestBody.vue2.js +1 -1
  143. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +2 -0
  144. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  145. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  146. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +56 -61
  147. package/dist/views/Request/RequestSection/RequestParams.vue.js +13 -13
  148. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +5 -5
  149. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  150. package/dist/views/Request/RequestSection/RequestSection.vue.js +3 -3
  151. package/dist/views/Request/RequestSection/RequestSection.vue2.js +23 -22
  152. package/dist/views/Request/RequestSection/RequestTable.vue2.js +7 -7
  153. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +9 -9
  154. package/dist/views/Request/RequestSidebar.vue2.js +25 -25
  155. package/dist/views/Request/RequestSidebarItem.vue2.js +25 -25
  156. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +1 -1
  157. package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
  158. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +1 -1
  159. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +5 -5
  160. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +2 -2
  161. package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +2 -2
  162. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +1 -1
  163. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +5 -5
  164. package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +7 -7
  165. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +6 -6
  166. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +4 -4
  167. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +3 -3
  168. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +15 -15
  169. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +1 -1
  170. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +3 -3
  171. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +1 -1
  172. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +5 -5
  173. package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -2
  174. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  175. package/dist/views/Request/consts/mediaTypes.js +1 -0
  176. package/dist/views/Request/libs/oauth2.d.ts +1 -1
  177. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  178. package/dist/views/Settings/Settings.vue2.js +3 -3
  179. package/dist/views/Settings/SettingsGeneral.vue.js +1 -1
  180. package/dist/views/Settings/components/SettingsAppearance.vue.js +10 -10
  181. package/dist/views/Settings/components/SettingsSection.vue.js +4 -4
  182. package/package.json +19 -19
@@ -1,4 +1,4 @@
1
- import { defineComponent as c, ref as n, computed as l, watch as p, openBlock as _, createBlock as d, withCtx as s, createVNode as r, createElementVNode as h, unref as x } from "vue";
1
+ import { defineComponent as c, ref as n, computed as l, watch as p, createBlock as _, openBlock as d, withCtx as s, createVNode as r, createElementVNode as h, unref as x } from "vue";
2
2
  import { useScroll as v } from "@vueuse/core";
3
3
  import { useRouter as w, RouterView as k } from "vue-router";
4
4
  import y from "../../components/ViewLayout/ViewLayout.vue.js";
@@ -25,7 +25,7 @@ const V = { class: "w-full md:mx-auto md:max-w-[720px]" }, g = /* @__PURE__ */ c
25
25
  {
26
26
  immediate: !0
27
27
  }
28
- ), (t, e) => (_(), d(y, {
28
+ ), (t, e) => (d(), _(y, {
29
29
  ref_key: "el",
30
30
  ref: o,
31
31
  class: "h-fit overflow-auto pb-6 xl:overflow-auto"
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, openBlock as r, createElementBlock as h, createElementVNode as o, createVNode as x, unref as e, createBlock as y, normalizeClass as S, createCommentVNode as b } from "vue";
1
+ import { defineComponent as v, createElementBlock as h, openBlock as r, createElementVNode as o, createBlock as x, createCommentVNode as y, createVNode as S, unref as e, normalizeClass as b } from "vue";
2
2
  import { ScalarToggle as C } from "@scalar/components";
3
3
  import { useActiveEntities as _ } from "../../store/active-entities.js";
4
4
  import { useWorkspace as V } from "../../store/store.js";
@@ -29,15 +29,15 @@ const k = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, w = { cla
29
29
  ], -1)),
30
30
  o("div", A, [
31
31
  l[0] || (l[0] = o("p", { class: "text-c-2 flex flex-1 text-balance" }, " Don’t want to set up the authentication for each request? Enable this option to set the authentication once for the whole collection. ", -1)),
32
- x(e(C), {
32
+ S(e(C), {
33
33
  class: "w-4",
34
34
  modelValue: ((n = e(t)) == null ? void 0 : n.useCollectionSecurity) ?? !1,
35
35
  "onUpdate:modelValue": f
36
36
  }, null, 8, ["modelValue"])
37
37
  ]),
38
- e(t) && e(i) ? (r(), y(e(g), {
38
+ e(t) && e(i) ? (r(), x(e(g), {
39
39
  key: 0,
40
- class: S([
40
+ class: b([
41
41
  "scalar-collection-auth",
42
42
  !((s = e(t)) != null && s.useCollectionSecurity) && "pointer-events-none opacity-50 mix-blend-luminosity"
43
43
  ]),
@@ -49,7 +49,7 @@ const k = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, w = { cla
49
49
  server: e(d),
50
50
  title: "Authentication",
51
51
  workspace: e(i)
52
- }, null, 8, ["class", "collection", "envVariables", "environment", "selectedSecuritySchemeUids", "server", "workspace"])) : b("", !0)
52
+ }, null, 8, ["class", "collection", "envVariables", "environment", "selectedSecuritySchemeUids", "server", "workspace"])) : y("", !0)
53
53
  ])
54
54
  ]);
55
55
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as o, openBlock as t, createBlock as n, withCtx as r, createTextVNode as i } from "vue";
1
+ import { defineComponent as o, createBlock as t, openBlock as n, withCtx as r, createTextVNode as i } from "vue";
2
2
  import _ from "../../components/ViewLayout/ViewLayoutSection.vue.js";
3
3
  const c = /* @__PURE__ */ o({
4
4
  __name: "CollectionCookies",
5
5
  setup(l) {
6
- return (m, e) => (t(), n(_, null, {
6
+ return (m, e) => (n(), t(_, null, {
7
7
  title: r(() => e[0] || (e[0] = [
8
8
  i("Cookies")
9
9
  ])),
@@ -1,9 +1,9 @@
1
- import { defineComponent as e, openBlock as n, createBlock as o, withCtx as r, createTextVNode as i } from "vue";
1
+ import { defineComponent as e, createBlock as n, openBlock as o, withCtx as r, createTextVNode as i } from "vue";
2
2
  import m from "../../components/ViewLayout/ViewLayoutSection.vue.js";
3
3
  const s = /* @__PURE__ */ e({
4
4
  __name: "CollectionEnvironment",
5
5
  setup(_) {
6
- return (l, t) => (n(), o(m, null, {
6
+ return (l, t) => (o(), n(m, null, {
7
7
  title: r(() => t[0] || (t[0] = [
8
8
  i("Environments")
9
9
  ])),
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, computed as p, openBlock as v, createElementBlock as h, createVNode as a, withCtx as c, unref as f, createElementVNode as V } from "vue";
1
+ import { defineComponent as b, computed as p, createElementBlock as v, openBlock as h, createVNode as a, createElementVNode as V, withCtx as c, unref as f } from "vue";
2
2
  import { ScalarButton as w } from "@scalar/components";
3
3
  import { LibraryIcon as I } from "@scalar/icons/library";
4
4
  import g from "../../components/Form/LabelInput.vue.js";
@@ -27,7 +27,7 @@ const N = ["aria-label"], U = { class: "ml-1.25 group relative" }, S = /* @__PUR
27
27
  version: (m = (d = e == null ? void 0 : e.value) == null ? void 0 : d.info) == null ? void 0 : m.version
28
28
  };
29
29
  });
30
- return (t, r) => (v(), h("div", {
30
+ return (t, r) => (h(), v("div", {
31
31
  "aria-label": `Collection: ${u.value.title}`,
32
32
  class: "mx-auto flex h-fit w-full flex-col gap-2 pb-3 pt-6 md:mx-auto md:max-w-[720px]"
33
33
  }, [
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, computed as k, openBlock as r, createElementBlock as a, createVNode as x, createElementVNode as n, normalizeClass as c, unref as t, toDisplayString as h, createCommentVNode as _, Fragment as g, renderList as C, createBlock as N, withCtx as S } from "vue";
1
+ import { defineComponent as b, computed as k, createElementBlock as a, openBlock as r, createVNode as x, createElementVNode as n, normalizeClass as c, createCommentVNode as _, unref as t, toDisplayString as h, Fragment as g, renderList as C, createBlock as N, withCtx as S } from "vue";
2
2
  import { LibraryIcon as B } from "@scalar/icons/library";
3
3
  import { useRouter as z, RouterLink as E } from "vue-router";
4
4
  import { PathId as m } from "../../routes.js";
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, openBlock as c, createBlock as l, withCtx as v, unref as e, createCommentVNode as d } from "vue";
1
+ import { defineComponent as u, createBlock as c, openBlock as l, withCtx as v, createCommentVNode as d, unref as e } from "vue";
2
2
  import f from "../../components/ViewLayout/ViewLayoutSection.vue.js";
3
3
  import { useActiveEntities as _ } from "../../store/active-entities.js";
4
4
  import k from "./components/MarkdownInput.vue.js";
@@ -14,11 +14,11 @@ const M = /* @__PURE__ */ u({
14
14
  } = _(), { collectionMutators: m } = V(), p = (i) => {
15
15
  o.value && m.edit(o.value.uid, "info.description", i);
16
16
  };
17
- return (i, w) => (c(), l(f, null, {
17
+ return (i, w) => (l(), c(f, null, {
18
18
  default: v(() => {
19
19
  var r, a;
20
20
  return [
21
- e(t) && e(n) ? (c(), l(k, {
21
+ e(t) && e(n) ? (l(), c(k, {
22
22
  key: 0,
23
23
  envVariables: e(s),
24
24
  environment: e(t),
@@ -1,9 +1,9 @@
1
- import { defineComponent as e, openBlock as o, createBlock as r, withCtx as n, createTextVNode as i } from "vue";
1
+ import { defineComponent as e, createBlock as o, openBlock as r, withCtx as n, createTextVNode as i } from "vue";
2
2
  import p from "../../components/ViewLayout/ViewLayoutSection.vue.js";
3
3
  const s = /* @__PURE__ */ e({
4
4
  __name: "CollectionScripts",
5
5
  setup(c) {
6
- return (_, t) => (o(), r(p, null, {
6
+ return (_, t) => (r(), o(p, null, {
7
7
  title: n(() => t[0] || (t[0] = [
8
8
  i("Scripts")
9
9
  ])),
@@ -1,4 +1,4 @@
1
- import { defineComponent as _, computed as u, watch as h, openBlock as o, createElementBlock as c, normalizeClass as k, Fragment as x, createVNode as y, createBlock as U, createCommentVNode as n } from "vue";
1
+ import { defineComponent as _, computed as u, watch as h, createElementBlock as c, openBlock as o, normalizeClass as k, createCommentVNode as n, Fragment as x, createVNode as y, createBlock as U } from "vue";
2
2
  import { REGEX as E } from "@scalar/oas-utils/helpers";
3
3
  import g from "../../components/Form/Form.vue.js";
4
4
  import C from "../../components/Server/ServerVariablesForm.vue.js";
@@ -1,4 +1,4 @@
1
- import { defineComponent as y, ref as C, computed as w, openBlock as o, createElementBlock as u, createElementVNode as c, createStaticVNode as A, Fragment as M, renderList as N, createBlock as m, unref as e, toDisplayString as D, createVNode as n, withCtx as f, createCommentVNode as I } from "vue";
1
+ import { defineComponent as y, ref as C, computed as w, createElementBlock as u, openBlock as o, createElementVNode as c, createVNode as n, createStaticVNode as A, Fragment as M, renderList as N, createBlock as m, createCommentVNode as D, unref as e, toDisplayString as I, withCtx as f } from "vue";
2
2
  import { useModal as $, ScalarMarkdown as j, ScalarButton as p, ScalarIcon as z, ScalarModal as B } from "@scalar/components";
3
3
  import { ScalarIconTrash as U } from "@scalar/icons";
4
4
  import V from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
@@ -41,7 +41,7 @@ const T = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, F = { cla
41
41
  key: 0,
42
42
  value: r.description,
43
43
  class: "self-center"
44
- }, null, 8, ["value"])) : (o(), u("span", W, "Server " + D(k + 1), 1)),
44
+ }, null, 8, ["value"])) : (o(), u("span", W, "Server " + I(k + 1), 1)),
45
45
  n(e(p), {
46
46
  class: "hover:bg-b-3 hover:text-c-1 p-1.25 h-fit",
47
47
  variant: "ghost",
@@ -57,7 +57,7 @@ const T = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, F = { cla
57
57
  key: 0,
58
58
  collectionId: e(l).uid,
59
59
  serverUid: r.uid
60
- }, null, 8, ["collectionId", "serverUid"])) : I("", !0)
60
+ }, null, 8, ["collectionId", "serverUid"])) : D("", !0)
61
61
  ])
62
62
  ]))), 128)),
63
63
  c("div", Y, [
@@ -1,4 +1,4 @@
1
- import { defineComponent as D, openBlock as d, createElementBlock as c, Fragment as u, createElementVNode as t, createVNode as s, unref as l, createTextVNode as b, toDisplayString as N, withCtx as w } from "vue";
1
+ import { defineComponent as D, createElementBlock as d, openBlock as c, Fragment as u, createElementVNode as t, createVNode as s, unref as l, createTextVNode as b, toDisplayString as N, withCtx as w } from "vue";
2
2
  import { useModal as S, ScalarToggle as W, ScalarIcon as _, ScalarButton as T, ScalarModal as V } from "@scalar/components";
3
3
  import { useRouter as A } from "vue-router";
4
4
  import B from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
@@ -32,7 +32,7 @@ const $ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, L = { cla
32
32
  }
33
33
  return (n, e) => {
34
34
  var f, p, v, x, g;
35
- return d(), c(u, null, [
35
+ return c(), d(u, null, [
36
36
  t("div", $, [
37
37
  t("div", L, [
38
38
  e[5] || (e[5] = t("div", { class: "flex h-8 items-center" }, [
@@ -53,7 +53,7 @@ const $ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, L = { cla
53
53
  ]),
54
54
  t("div", R, [
55
55
  t("div", j, [
56
- (v = l(o)) != null && v.documentUrl ? (d(), c(u, { key: 0 }, [
56
+ (v = l(o)) != null && v.documentUrl ? (c(), d(u, { key: 0 }, [
57
57
  e[3] || (e[3] = t("span", { class: "bg-b-2 sticky left-0 pl-3 pr-2" }, "Source", -1)),
58
58
  t("a", {
59
59
  class: "text-c-2 group rounded pr-3 no-underline hover:underline",
@@ -66,7 +66,7 @@ const $ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, L = { cla
66
66
  icon: "ExternalLink"
67
67
  })
68
68
  ], 8, z)
69
- ], 64)) : (d(), c(u, { key: 1 }, [
69
+ ], 64)) : (c(), d(u, { key: 1 }, [
70
70
  s(l(_), {
71
71
  class: "text-c-2 ml-3 mr-2 w-4",
72
72
  icon: "NotAllowed",
@@ -1,9 +1,9 @@
1
- import { defineComponent as e, openBlock as o, createBlock as n, withCtx as r, createTextVNode as c } from "vue";
1
+ import { defineComponent as e, createBlock as o, openBlock as n, withCtx as r, createTextVNode as c } from "vue";
2
2
  import _ from "../../components/ViewLayout/ViewLayoutSection.vue.js";
3
3
  const a = /* @__PURE__ */ e({
4
4
  __name: "CollectionSync",
5
5
  setup(i) {
6
- return (l, t) => (o(), n(_, null, {
6
+ return (l, t) => (n(), o(_, null, {
7
7
  title: r(() => t[0] || (t[0] = [
8
8
  c("Sync")
9
9
  ])),
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, ref as p, watch as w, nextTick as x, openBlock as o, createElementBlock as i, createElementVNode as n, createBlock as u, unref as s, withCtx as v, createVNode as d, createCommentVNode as a, Fragment as f } from "vue";
1
+ import { defineComponent as g, ref as p, watch as w, nextTick as x, createElementBlock as i, openBlock as o, createElementVNode as n, createBlock as u, createCommentVNode as a, unref as s, withCtx as v, createVNode as d, Fragment as f } from "vue";
2
2
  import { ScalarButton as c, ScalarIcon as b, ScalarMarkdown as h } from "@scalar/components";
3
3
  import y from "../../../components/CodeInput/CodeInput.vue.js";
4
4
  const z = { class: "flex h-full w-full flex-col gap-2 pt-8" }, C = { class: "flex min-h-8 items-center justify-between gap-2 pl-1.5" }, I = { class: "has-[:focus-visible]:bg-b-1 z-1 group relative flex flex-col rounded-lg" }, B = { class: "flex h-full min-h-[calc(1rem*4)] flex-col" }, $ = {
@@ -1,5 +1,6 @@
1
1
  import type { Operation, RequestExample, SecurityScheme, Server } from '@scalar/oas-utils/entities/spec';
2
2
  import type { ClientId, TargetId } from '@scalar/snippetz';
3
+ import type { EnvVariables } from '../../../libs/env-helpers';
3
4
  type __VLS_Props = {
4
5
  target: TargetId;
5
6
  client: ClientId<TargetId>;
@@ -7,6 +8,7 @@ type __VLS_Props = {
7
8
  server?: Server | undefined;
8
9
  example?: RequestExample | undefined;
9
10
  securitySchemes?: SecurityScheme[];
11
+ environment?: EnvVariables | undefined;
10
12
  };
11
13
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
14
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CodeSnippet.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Components/CodeSnippet/CodeSnippet.vue"],"names":[],"mappings":"AA4FA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAO1D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,QAAQ,CAAA;IAChB,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC1B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;CACnC,CAAC;;AAiIF,wBAMG"}
1
+ {"version":3,"file":"CodeSnippet.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Components/CodeSnippet/CodeSnippet.vue"],"names":[],"mappings":"AAgGA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAG1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAKtD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,QAAQ,CAAA;IAChB,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC1B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,WAAW,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;CACvC,CAAC;;AAmIF,wBAMG"}
@@ -1,7 +1,7 @@
1
- import { defineComponent as u, computed as n, openBlock as l, createElementBlock as c, toDisplayString as s, createBlock as d, unref as p, createCommentVNode as m } from "vue";
2
- import { ScalarCodeBlock as f } from "@scalar/components";
3
- import { isDefined as y } from "@scalar/oas-utils/helpers";
4
- import { getSnippet as v } from "./helpers/get-snippet.js";
1
+ import { defineComponent as u, computed as a, createElementBlock as c, createBlock as s, createCommentVNode as d, openBlock as l, toDisplayString as m, unref as f } from "vue";
2
+ import { ScalarCodeBlock as p } from "@scalar/components";
3
+ import { isDefined as v } from "@scalar/oas-utils/helpers";
4
+ import { getSnippet as y } from "./helpers/get-snippet.js";
5
5
  const g = {
6
6
  key: 0,
7
7
  class: "text-c-3 flex min-h-16 items-center justify-center px-4 text-sm"
@@ -13,32 +13,34 @@ const g = {
13
13
  operation: {},
14
14
  server: {},
15
15
  example: {},
16
- securitySchemes: { default: () => [] }
16
+ securitySchemes: { default: () => [] },
17
+ environment: {}
17
18
  },
18
19
  setup(t) {
19
- const i = n(
20
+ const i = a(
20
21
  () => t.securitySchemes.flatMap((e) => e.type === "apiKey" ? e.value : (e == null ? void 0 : e.type) === "http" ? [
21
22
  e.token,
22
23
  e.password,
23
24
  btoa(`${e.username}:${e.password}`)
24
- ] : e.type === "oauth2" ? Object.values(e.flows).map((r) => r == null ? void 0 : r.token).filter(y) : [])
25
- ), a = n(() => {
26
- const [e, r] = v(t.target, t.client, {
25
+ ] : e.type === "oauth2" ? Object.values(e.flows).map((r) => r == null ? void 0 : r.token).filter(v) : [])
26
+ ), n = a(() => {
27
+ const [e, r] = y(t.target, t.client, {
27
28
  operation: t.operation,
28
29
  example: t.example,
29
30
  server: t.server,
30
- securitySchemes: t.securitySchemes
31
+ securitySchemes: t.securitySchemes,
32
+ environment: t.environment
31
33
  });
32
34
  return { error: e, payload: r };
33
- }), o = n(() => t.target === "shell" && t.client === "curl" ? "curl" : t.target ?? "plaintext");
34
- return (e, r) => a.value.error ? (l(), c("div", g, s(a.value.error.message), 1)) : a.value.payload ? (l(), d(p(f), {
35
+ }), o = a(() => t.target === "shell" && t.client === "curl" ? "curl" : t.target ?? "plaintext");
36
+ return (e, r) => n.value.error ? (l(), c("div", g, m(n.value.error.message), 1)) : n.value.payload ? (l(), s(f(p), {
35
37
  key: 1,
36
38
  class: "w-full",
37
- content: a.value.payload,
39
+ content: n.value.payload,
38
40
  hideCredentials: i.value,
39
41
  lang: o.value,
40
42
  lineNumbers: ""
41
- }, null, 8, ["content", "hideCredentials", "lang"])) : m("", !0);
43
+ }, null, 8, ["content", "hideCredentials", "lang"])) : d("", !0);
42
44
  }
43
45
  });
44
46
  export {
@@ -1,12 +1,14 @@
1
1
  import type { Operation, RequestExample, SecurityScheme, Server } from '@scalar/oas-utils/entities/spec';
2
2
  import type { HarRequest } from '@scalar/snippetz';
3
+ import type { EnvVariables } from '../../../../libs/env-helpers';
3
4
  /**
4
5
  * Creates a snippetz-compatible HarRequest from OpenAPI-like store entities
5
6
  */
6
- export declare const getHarRequest: ({ operation, example, server, securitySchemes, }: {
7
+ export declare const getHarRequest: ({ operation, example, server, securitySchemes, environment, }: {
7
8
  operation?: Operation | undefined;
8
9
  example?: RequestExample | undefined;
9
10
  server?: Server | undefined;
10
11
  securitySchemes?: SecurityScheme[];
12
+ environment?: EnvVariables | undefined;
11
13
  }) => HarRequest;
12
14
  //# sourceMappingURL=get-har-request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-har-request.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-har-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAMlD;;GAEG;AACH,eAAO,MAAM,aAAa,qDAKvB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;CACnC,KAAG,UAyCH,CAAA"}
1
+ {"version":3,"file":"get-har-request.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-har-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAMtD;;GAEG;AACH,eAAO,MAAM,aAAa,kEAMvB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,WAAW,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;CACvC,KAAG,UA0GH,CAAA"}
@@ -1,43 +1,86 @@
1
- import { buildRequestSecurity as R } from "../../../../libs/send-request/build-request-security.js";
2
- import { convertToHarRequest as n } from "./convert-to-har-request.js";
3
- const q = "YOUR_SECRET_TOKEN", o = ({
4
- operation: s,
5
- example: t,
6
- server: u,
7
- securitySchemes: b = []
1
+ import { buildRequestSecurity as V } from "../../../../libs/send-request/build-request-security.js";
2
+ import { replaceTemplateVariables as A } from "../../../../libs/string-template.js";
3
+ import { REGEX as s } from "@scalar/oas-utils/helpers";
4
+ import { convertToHarRequest as L } from "./convert-to-har-request.js";
5
+ const v = "YOUR_SECRET_TOKEN", g = ({
6
+ operation: e,
7
+ example: u,
8
+ server: r,
9
+ securitySchemes: i = [],
10
+ environment: E
8
11
  }) => {
9
- const c = R(b, {}, q), y = [
10
- ...(t == null ? void 0 : t.parameters.headers) ?? [],
11
- ...Object.entries(c.headers).map(([r, d]) => ({
12
- key: r,
13
- value: d,
12
+ const n = E && Array.isArray(E) ? Object.fromEntries(E.map((t) => [t.key, t.value])) : E || {}, T = (() => {
13
+ if (r != null && r.url && (s.VARIABLES.test(r.url) || s.PATH.test(r.url))) {
14
+ const t = Object.entries((r == null ? void 0 : r.variables) || {}).reduce(
15
+ (a, [d, l]) => {
16
+ var o, R;
17
+ const c = (R = (o = u == null ? void 0 : u.parameters) == null ? void 0 : o.path.find((b) => b.enabled && b.key === d)) == null ? void 0 : R.value;
18
+ return c ? a[d] = A(c, n) : l.default && (a[d] = A(l.default, n)), a;
19
+ },
20
+ {}
21
+ );
22
+ return A(A(r.url, n), t);
23
+ }
24
+ return r == null ? void 0 : r.url;
25
+ })(), P = (() => {
26
+ var a;
27
+ const t = (e == null ? void 0 : e.path) ?? "/";
28
+ if (t && (s.VARIABLES.test(t) || s.PATH.test(t))) {
29
+ const d = (((a = u == null ? void 0 : u.parameters) == null ? void 0 : a.path) ?? []).reduce((l, c) => (c.enabled && (l[c.key] = A(c.value, n)), l), {});
30
+ return A(A(t, n), d);
31
+ }
32
+ return t;
33
+ })(), f = V(i, n, v), y = [
34
+ ...((u == null ? void 0 : u.parameters.headers) ?? []).map((t) => ({
35
+ ...t,
36
+ value: s.VARIABLES.test(t.value) || s.PATH.test(t.value) ? A(t.value, n) : t.value
37
+ })) ?? [],
38
+ ...Object.entries(f.headers).map(([t, a]) => ({
39
+ key: t,
40
+ value: a,
14
41
  enabled: !0
15
42
  }))
16
- ], h = [
17
- ...(t == null ? void 0 : t.parameters.cookies) ?? [],
18
- ...c.cookies.map((r) => ({
19
- key: r.name,
20
- value: r.value,
43
+ ], S = [
44
+ ...((u == null ? void 0 : u.parameters.cookies) ?? []).map((t) => ({
45
+ ...t,
46
+ value: s.VARIABLES.test(t.value) || s.PATH.test(t.value) ? A(t.value, n) : t.value
47
+ })) ?? [],
48
+ ...f.cookies.map((t) => ({
49
+ key: t.name,
50
+ value: t.value,
21
51
  enabled: !0
22
52
  }))
23
- ], E = [
24
- ...(t == null ? void 0 : t.parameters.query) ?? [],
25
- ...Array.from(c.urlParams.entries()).map(([r, d]) => ({
26
- key: r,
27
- value: d,
53
+ ], h = [
54
+ ...((u == null ? void 0 : u.parameters.query) ?? []).map((t) => ({
55
+ ...t,
56
+ value: s.VARIABLES.test(t.value) || s.PATH.test(t.value) ? A(t.value, n) : t.value
57
+ })) ?? [],
58
+ ...Array.from(f.urlParams.entries()).map(([t, a]) => ({
59
+ key: t,
60
+ value: a,
28
61
  enabled: !0
29
62
  }))
30
- ];
31
- return n({
32
- baseUrl: u == null ? void 0 : u.url,
33
- method: (s == null ? void 0 : s.method) ?? "get",
34
- path: (s == null ? void 0 : s.path) ?? "/",
35
- body: t == null ? void 0 : t.body,
36
- cookies: h,
63
+ ], H = (() => {
64
+ var a;
65
+ const t = u == null ? void 0 : u.body;
66
+ return (a = t == null ? void 0 : t.raw) != null && a.value && (s.VARIABLES.test(t.raw.value) || s.PATH.test(t.raw.value)) ? {
67
+ ...t,
68
+ raw: {
69
+ ...t.raw,
70
+ value: A(t.raw.value, n)
71
+ }
72
+ } : t;
73
+ })();
74
+ return L({
75
+ baseUrl: T,
76
+ method: (e == null ? void 0 : e.method) ?? "get",
77
+ path: P,
78
+ body: H,
79
+ cookies: S,
37
80
  headers: y,
38
- query: E
81
+ query: h
39
82
  });
40
83
  };
41
84
  export {
42
- o as getHarRequest
85
+ g as getHarRequest
43
86
  };
@@ -1,13 +1,15 @@
1
1
  import type { ErrorResponse } from '../../../../libs/errors';
2
2
  import type { Operation, RequestExample, SecurityScheme, Server } from '@scalar/oas-utils/entities/spec';
3
3
  import { type ClientId, type TargetId } from '@scalar/snippetz';
4
+ import type { EnvVariables } from '../../../../libs/env-helpers';
4
5
  /**
5
6
  * Returns a code example for given operation
6
7
  */
7
- export declare const getSnippet: <T extends TargetId>(target: T | "javascript", client: ClientId<T>, { operation, example, server, securitySchemes, }: {
8
+ export declare const getSnippet: <T extends TargetId>(target: T | "javascript", client: ClientId<T>, { operation, example, server, securitySchemes, environment, }: {
8
9
  operation?: Operation | undefined;
9
10
  example?: RequestExample | undefined;
10
11
  server?: Server | undefined;
11
12
  securitySchemes?: SecurityScheme[];
13
+ environment?: EnvVariables | undefined;
12
14
  }) => ErrorResponse<string>;
13
15
  //# sourceMappingURL=get-snippet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAY,MAAM,kBAAkB,CAAA;AAOzE;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,QAAQ,UACnC,CAAC,GAAG,YAAY,UAChB,QAAQ,CAAC,CAAC,CAAC,oDAMhB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;CACnC,KACA,aAAa,CAAC,MAAM,CAiDtB,CAAA"}
1
+ {"version":3,"file":"get-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAY,MAAM,kBAAkB,CAAA;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAOtD;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,QAAQ,UACnC,CAAC,GAAG,YAAY,UAChB,QAAQ,CAAC,CAAC,CAAC,iEAOhB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,WAAW,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;CACvC,KACA,aAAa,CAAC,MAAM,CAkDtB,CAAA"}
@@ -1,18 +1,20 @@
1
1
  import { snippetz as a } from "@scalar/snippetz";
2
- import { getHarRequest as E } from "./get-har-request.js";
3
- const s = "ws://replace.me", S = (i, t, {
2
+ import { getHarRequest as d } from "./get-har-request.js";
3
+ const s = "ws://replace.me", f = (i, t, {
4
4
  operation: l,
5
5
  example: u,
6
6
  server: c,
7
- securitySchemes: g = []
7
+ securitySchemes: g = [],
8
+ environment: E
8
9
  }) => {
9
10
  var n;
10
11
  try {
11
- const r = E({
12
+ const r = d({
12
13
  operation: l,
13
14
  example: u,
14
15
  server: c,
15
- securitySchemes: g
16
+ securitySchemes: g,
17
+ environment: E
16
18
  });
17
19
  if (!r.url)
18
20
  return [new Error("Please enter a URL to see a code snippet"), null];
@@ -39,5 +41,5 @@ const s = "ws://replace.me", S = (i, t, {
39
41
  return [new Error("No snippet found"), null];
40
42
  };
41
43
  export {
42
- S as getSnippet
44
+ f as getSnippet
43
45
  };
@@ -1,10 +1,10 @@
1
- import { convertToHarRequest as o } from "./helpers/convert-to-har-request.js";
2
- import { getHarRequest as p } from "./helpers/get-har-request.js";
3
- import { getSnippet as a } from "./helpers/get-snippet.js";
4
- import { default as x } from "./CodeSnippet.vue.js";
1
+ import { default as o } from "./CodeSnippet.vue.js";
2
+ import { convertToHarRequest as p } from "./helpers/convert-to-har-request.js";
3
+ import { getHarRequest as a } from "./helpers/get-har-request.js";
4
+ import { getSnippet as x } from "./helpers/get-snippet.js";
5
5
  export {
6
- x as CodeSnippet,
7
- o as convertToHarRequest,
8
- p as getHarRequest,
9
- a as getSnippet
6
+ o as CodeSnippet,
7
+ p as convertToHarRequest,
8
+ a as getHarRequest,
9
+ x as getSnippet
10
10
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as s, computed as l, openBlock as r, createBlock as p } from "vue";
1
+ import { defineComponent as s, computed as l, createBlock as r, openBlock as p } from "vue";
2
2
  import { cookieSchema as d } from "@scalar/oas-utils/entities/cookie";
3
3
  import u from "../../components/Form/Form.vue.js";
4
4
  import { useActiveEntities as k } from "../../store/active-entities.js";
@@ -22,7 +22,7 @@ const x = /* @__PURE__ */ s({
22
22
  ), n = (o, a) => {
23
23
  i.edit(e.value, o, a);
24
24
  };
25
- return (o, a) => (r(), p(u, {
25
+ return (o, a) => (p(), r(u, {
26
26
  data: m.value,
27
27
  onUpdate: n,
28
28
  options: c
@@ -1,4 +1,4 @@
1
- import { defineComponent as V, ref as c, watch as x, openBlock as b, createBlock as k, unref as C, withCtx as m, createVNode as t, createTextVNode as l, createElementVNode as i } from "vue";
1
+ import { defineComponent as V, ref as c, watch as x, createBlock as b, openBlock as k, unref as C, withCtx as m, createVNode as t, createElementVNode as i, createTextVNode as l } from "vue";
2
2
  import { ScalarModal as g } from "@scalar/components";
3
3
  import { useToasts as N } from "@scalar/use-toasts";
4
4
  import S from "../../components/CommandPalette/CommandActionForm.vue.js";
@@ -30,7 +30,7 @@ const U = { class: "flex h-8 items-start gap-2 text-sm" }, $ = { class: "flex h-
30
30
  domain: ""
31
31
  });
32
32
  }
33
- ), (s, e) => (b(), k(C(g), {
33
+ ), (s, e) => (k(), b(C(g), {
34
34
  size: "xs",
35
35
  state: s.state,
36
36
  title: "Add Cookie"
@@ -1,4 +1,4 @@
1
- import { defineComponent as K, onMounted as L, onBeforeUnmount as V, computed as h, openBlock as n, createBlock as d, withCtx as a, createVNode as r, unref as u, createElementVNode as b, createElementBlock as y, Fragment as j, renderList as A, withModifiers as O, createTextVNode as w } from "vue";
1
+ import { defineComponent as K, onMounted as L, onBeforeUnmount as V, computed as h, createBlock as d, openBlock as n, withCtx as a, createVNode as r, unref as u, createTextVNode as b, createElementVNode as y, createElementBlock as w, Fragment as j, renderList as A, withModifiers as O } from "vue";
2
2
  import { useModal as H } from "@scalar/components";
3
3
  import { cookieSchema as I } from "@scalar/oas-utils/entities/cookie";
4
4
  import { useRouter as R, useRoute as W } from "vue-router";
@@ -83,14 +83,14 @@ const Z = { class: "flex-1" }, ee = { class: "relative mb-[.5px] last:mb-0" }, h
83
83
  default: a(() => [
84
84
  r(u(Y), { title: "Cookies" }, {
85
85
  content: a(() => [
86
- b("div", Z, [
86
+ y("div", Z, [
87
87
  r(P, null, {
88
88
  default: a(() => [
89
- (n(!0), y(j, null, A(Object.values(u(c)), (e) => (n(), y("li", {
89
+ (n(!0), w(j, null, A(Object.values(u(c)), (e) => (n(), w("li", {
90
90
  key: e.uid,
91
91
  class: "gap-1/2 flex flex-col"
92
92
  }, [
93
- b("div", ee, [
93
+ y("div", ee, [
94
94
  (n(), d(T, {
95
95
  key: e.uid,
96
96
  class: "text-xs",
@@ -120,7 +120,7 @@ const Z = { class: "flex-1" }, ee = { class: "relative mb-[.5px] last:mb-0" }, h
120
120
  hotkey: "N"
121
121
  }, {
122
122
  title: a(() => o[1] || (o[1] = [
123
- w(" Add Cookie ")
123
+ b(" Add Cookie ")
124
124
  ])),
125
125
  _: 1
126
126
  })
@@ -134,7 +134,7 @@ const Z = { class: "flex-1" }, ee = { class: "relative mb-[.5px] last:mb-0" }, h
134
134
  class: "*:border-b-0"
135
135
  }, {
136
136
  title: a(() => o[2] || (o[2] = [
137
- w("Edit Cookie")
137
+ b("Edit Cookie")
138
138
  ])),
139
139
  default: a(() => [
140
140
  r(G)