@scalar/api-client 2.0.22 → 2.0.25

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 +48 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +80 -84
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +11 -10
  7. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  8. package/dist/components/CodeInput/CodeInput.vue.d.ts +10 -0
  9. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  10. package/dist/components/CodeInput/CodeInput.vue.js +3 -2
  11. package/dist/components/CodeInput/CodeInput.vue2.js +42 -37
  12. package/dist/components/CodeInput/codeDropdownWidget.d.ts +24 -0
  13. package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +1 -0
  14. package/dist/components/CodeInput/codeDropdownWidget.js +110 -0
  15. package/dist/components/CodeInput/codeVariableWidget.d.ts +8 -0
  16. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -0
  17. package/dist/components/CodeInput/codeVariableWidget.js +124 -0
  18. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -15
  19. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +51 -54
  21. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +4 -2
  22. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  23. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +106 -92
  24. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts +2 -15
  25. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
  26. package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +68 -74
  27. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -15
  28. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  29. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -62
  30. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -15
  31. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  32. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +106 -99
  33. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +7 -0
  34. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -0
  35. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +57 -0
  36. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue2.js +4 -0
  37. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +50 -0
  38. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -0
  39. package/dist/components/CommandPalette/TheCommandPalette.vue.js +9 -0
  40. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +198 -0
  41. package/dist/components/CommandPalette/index.d.ts +2 -0
  42. package/dist/components/CommandPalette/index.d.ts.map +1 -0
  43. package/dist/components/CommandPalette/index.js +4 -0
  44. package/dist/components/ContextBar.vue.js +4 -4
  45. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +7 -6
  46. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  47. package/dist/components/DataTable/DataTableCheckbox.vue.js +3 -2
  48. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  49. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  50. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  51. package/dist/components/DataTable/DataTableInput.vue2.js +36 -49
  52. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  53. package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -14
  54. package/dist/components/Search/SearchButton.vue.d.ts.map +1 -1
  55. package/dist/components/Search/SearchButton.vue.js +7 -6
  56. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  57. package/dist/components/SideNav/SideNav.vue.js +26 -23
  58. package/dist/components/SideNav/SideNavLink.vue.d.ts +3 -2
  59. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  60. package/dist/components/SideNav/SideNavLink.vue.js +18 -16
  61. package/dist/components/Sidebar/Sidebar.vue.d.ts +15 -2
  62. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  63. package/dist/components/Sidebar/Sidebar.vue.js +14 -12
  64. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  65. package/dist/components/Sidebar/SidebarButton.vue.js +5 -5
  66. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/SidebarListElementActions.vue.js +2 -2
  68. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  69. package/dist/components/TopNav/TopNav.vue.js +1 -1
  70. package/dist/components/TopNav/TopNav.vue2.js +31 -29
  71. package/dist/components/TopNav/TopNavItem.vue.d.ts +7 -3
  72. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  73. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  74. package/dist/components/TopNav/TopNavItem.vue2.js +18 -18
  75. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  76. package/dist/components/ViewLayout/ViewLayout.vue.js +1 -1
  77. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  78. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +2 -1
  79. package/dist/constants.d.ts +13 -7
  80. package/dist/constants.d.ts.map +1 -1
  81. package/dist/constants.js +4 -4
  82. package/dist/index.d.ts +2 -4
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +11 -16
  85. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -0
  86. package/dist/layouts/App/ApiClientApp.vue.js +72 -0
  87. package/dist/{App → layouts/App}/createApiClientApp.d.ts +1 -1
  88. package/dist/layouts/App/createApiClientApp.d.ts.map +1 -0
  89. package/dist/{App → layouts/App}/createApiClientApp.js +2 -2
  90. package/dist/layouts/App/index.d.ts.map +1 -0
  91. package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.d.ts +1 -0
  92. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -0
  93. package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.js +2 -2
  94. package/dist/layouts/Modal/api-client-modal.d.ts.map +1 -0
  95. package/dist/{Modal → layouts/Modal}/api-client-modal.js +7 -7
  96. package/dist/layouts/Modal/index.d.ts.map +1 -0
  97. package/dist/libs/eventBusses/command-palette.d.ts +14 -0
  98. package/dist/libs/eventBusses/command-palette.d.ts.map +1 -0
  99. package/dist/libs/eventBusses/command-palette.js +5 -0
  100. package/dist/libs/local-storage.d.ts +1 -1
  101. package/dist/libs/local-storage.d.ts.map +1 -1
  102. package/dist/libs/local-storage.js +19 -19
  103. package/dist/router.d.ts +18 -6
  104. package/dist/router.d.ts.map +1 -1
  105. package/dist/router.js +107 -71
  106. package/dist/store/topNav.d.ts +94 -82
  107. package/dist/store/topNav.d.ts.map +1 -1
  108. package/dist/store/topNav.js +21 -20
  109. package/dist/store/workspace.d.ts +312 -82
  110. package/dist/store/workspace.d.ts.map +1 -1
  111. package/dist/store/workspace.js +299 -224
  112. package/dist/style.css +1 -1
  113. package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
  114. package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +1 -1
  115. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  116. package/dist/views/Cookies/Cookies.vue2.js +9 -12
  117. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  118. package/dist/views/Environment/Environment.vue2.js +22 -25
  119. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  120. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -47
  121. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  122. package/dist/views/Request/Request.vue.js +1 -1
  123. package/dist/views/Request/Request.vue2.js +125 -108
  124. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  125. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  126. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  127. package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -4
  128. package/dist/views/Request/RequestSection/RequestSection.vue.js +3 -2
  129. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  130. package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -4
  131. package/dist/views/Request/RequestSection/RequestTable.vue2.js +22 -21
  132. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  133. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +6 -5
  134. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  135. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  136. package/dist/views/Request/RequestSidebarItem.vue2.js +84 -79
  137. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  138. package/dist/views/Request/RequestSidebarItemMenu.vue.js +58 -38
  139. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  140. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -2
  141. package/dist/views/Request/components/OAuth2.vue.d.ts.map +1 -1
  142. package/dist/views/Request/components/OAuth2.vue.js +2 -0
  143. package/dist/{App.vue.d.ts → views/Request/components/WorkspaceDropdown.vue.d.ts} +1 -2
  144. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -0
  145. package/dist/views/Request/components/WorkspaceDropdown.vue.js +80 -0
  146. package/dist/views/Request/components/WorkspaceDropdown.vue2.js +4 -0
  147. package/dist/views/Request/components/index.d.ts +1 -0
  148. package/dist/views/Request/components/index.d.ts.map +1 -1
  149. package/dist/views/Request/components/index.js +4 -2
  150. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  151. package/dist/views/Servers/Servers.vue2.js +12 -15
  152. package/package.json +19 -15
  153. package/dist/App/ApiClientApp.vue.d.ts.map +0 -1
  154. package/dist/App/ApiClientApp.vue.js +0 -56
  155. package/dist/App/createApiClientApp.d.ts.map +0 -1
  156. package/dist/App/index.d.ts.map +0 -1
  157. package/dist/App.vue.d.ts.map +0 -1
  158. package/dist/App.vue.js +0 -77
  159. package/dist/App.vue3.js +0 -5
  160. package/dist/Modal/ApiClientModal.vue.d.ts.map +0 -1
  161. package/dist/Modal/api-client-modal.d.ts.map +0 -1
  162. package/dist/Modal/index.d.ts.map +0 -1
  163. package/dist/components/AddressBar/AddressBarServer.vue.js +0 -106
  164. package/dist/components/AddressBar/AddressBarServer.vue2.js +0 -4
  165. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +0 -17
  166. package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +0 -1
  167. package/dist/components/CommandPalette/CommandPalette.vue.js +0 -7
  168. package/dist/components/CommandPalette/CommandPalette.vue2.js +0 -184
  169. package/dist/main.d.ts +0 -2
  170. package/dist/main.d.ts.map +0 -1
  171. package/dist/views/Collection/Collection.vue.js +0 -4
  172. package/dist/views/Collection/Collection.vue2.js +0 -136
  173. package/dist/views/Components/Schemas/Schemas.vue.js +0 -4
  174. package/dist/views/Components/Schemas/Schemas.vue2.js +0 -20
  175. /package/dist/{App → layouts/App}/ApiClientApp.vue.d.ts +0 -0
  176. /package/dist/{App → layouts/App}/ApiClientApp.vue3.js +0 -0
  177. /package/dist/{App → layouts/App}/index.d.ts +0 -0
  178. /package/dist/{App → layouts/App}/index.js +0 -0
  179. /package/dist/{Modal → layouts/Modal}/ApiClientModal.vue2.js +0 -0
  180. /package/dist/{Modal → layouts/Modal}/api-client-modal.d.ts +0 -0
  181. /package/dist/{Modal → layouts/Modal}/index.d.ts +0 -0
  182. /package/dist/{Modal → layouts/Modal}/index.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
2
2
  import n from "../../_virtual/_plugin-vue_export-helper.js";
3
- const l = {}, d = { class: "m-1 mt-0 flex min-h-0 flex-1 rounded xl:rounded-lg xl:border xl:overflow-hidden leading-3" };
3
+ const l = {}, d = { class: "m-1 mt-0 flex min-h-0 flex-1 rounded xl:rounded-lg xl:border xl:overflow-hidden leading-3 z-0" };
4
4
  function c(e, s) {
5
5
  return o(), r("div", d, [
6
6
  t(e.$slots, "default")
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AA+EA,iBAAS,cAAc;;;QA4IK,GAAG;;;QACD,GAAG;;;QACH,GAAG;EAkBhC;AACD,QAAA,MAAM,eAAe;kBApLH,OAAO;gBACT,MAAM;;;;;kBADJ,OAAO;gBACT,MAAM;;;;;iBADJ,OAAO;eACT,MAAM;MAyLpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC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AAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -25,7 +25,8 @@ const x = { class: "flex flex-1 items-center gap-1.5" }, _ = {
25
25
  i(o(b), {
26
26
  class: "text-c-3 group-hover:text-c-1 ui-open:rotate-90 ui-not-open:rotate-0",
27
27
  icon: "ChevronRight",
28
- size: "sm"
28
+ size: "sm",
29
+ thickness: "2.5"
29
30
  }),
30
31
  r("div", x, [
31
32
  l(e.$slots, "title", { open: t }),
@@ -1,8 +1,14 @@
1
- import type { Icon } from '@scalar/components';
2
- export type Route = {
3
- label: string;
4
- icon: Icon;
5
- path: string;
6
- };
7
- export declare const ROUTES: Route[];
1
+ export declare const ROUTES: readonly [{
2
+ readonly name: "request";
3
+ readonly icon: "ExternalLink";
4
+ }, {
5
+ readonly name: "cookies";
6
+ readonly icon: "Cookie";
7
+ }, {
8
+ readonly name: "environment";
9
+ readonly icon: "Brackets";
10
+ }, {
11
+ readonly name: "servers";
12
+ readonly icon: "Server";
13
+ }];
8
14
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,MAAM,KAAK,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/D,eAAO,MAAM,MAAM,EAAE,KAAK,EAMhB,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;EAMT,CAAA"}
package/dist/constants.js CHANGED
@@ -1,8 +1,8 @@
1
1
  const e = [
2
- { label: "Requests", icon: "ExternalLink", path: "/request" },
3
- { label: "Cookies", icon: "Cookie", path: "/cookies" },
4
- { label: "Environment", icon: "Brackets", path: "/environment" },
5
- { label: "Servers", icon: "Server", path: "/servers" }
2
+ { name: "request", icon: "ExternalLink" },
3
+ { name: "cookies", icon: "Cookie" },
4
+ { name: "environment", icon: "Brackets" },
5
+ { name: "servers", icon: "Server" }
6
6
  // { label: 'Git Sync', icon: 'Branch', path: '/git-sync' },
7
7
  ];
8
8
  export {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- export { default as ScalarClient } from './App.vue.js';
2
- export * from './Modal/index.js';
3
- export * from './App/index.js';
1
+ export * from './layouts/Modal/index.js';
2
+ export * from './layouts/App/index.js';
4
3
  export { useWorkspace } from './store/workspace.js';
5
- export { modalRouter } from './router.js';
6
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,WAAW,CAAA;AACnD,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA"}
package/dist/index.js CHANGED
@@ -1,18 +1,13 @@
1
- import { default as p } from "./App.vue.js";
2
- /* empty css */
3
- import { useWorkspace as l } from "./store/workspace.js";
4
- import { modalRouter as f } from "./router.js";
5
- import { default as x } from "./App/ApiClientApp.vue.js";
6
- /* empty css */
7
- import { default as A } from "./Modal/ApiClientModal.vue.js";
8
- import { createApiClientModal as s } from "./Modal/api-client-modal.js";
9
- import { createApiClientApp as C } from "./App/createApiClientApp.js";
1
+ import { useWorkspace as r } from "./store/workspace.js";
2
+ import { default as a } from "./layouts/App/ApiClientApp.vue.js";
3
+ /* empty css */
4
+ import { default as l } from "./layouts/Modal/ApiClientModal.vue.js";
5
+ import { createApiClientModal as m } from "./layouts/Modal/api-client-modal.js";
6
+ import { createApiClientApp as x } from "./layouts/App/createApiClientApp.js";
10
7
  export {
11
- x as ApiClientApp,
12
- A as ApiClientModal,
13
- p as ScalarClient,
14
- C as createApiClientApp,
15
- s as createApiClientModal,
16
- f as modalRouter,
17
- l as useWorkspace
8
+ a as ApiClientApp,
9
+ l as ApiClientModal,
10
+ x as createApiClientApp,
11
+ m as createApiClientModal,
12
+ r as useWorkspace
18
13
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";AA+SA,wBAKG"}
@@ -0,0 +1,72 @@
1
+ import { defineComponent as f, onMounted as u, watchEffect as _, onBeforeMount as g, computed as h, openBlock as r, createElementBlock as m, Fragment as k, createElementVNode as i, createVNode as a, unref as s, withCtx as v, createBlock as p, KeepAlive as y, resolveDynamicComponent as x, createCommentVNode as S } from "vue";
2
+ import T from "../../components/SideNav/SideNav.vue.js";
3
+ import C from "../../components/TopNav/TopNav.vue.js";
4
+ import { useWorkspace as w } from "../../store/workspace.js";
5
+ import { addScalarClassesToHeadless as B } from "@scalar/components";
6
+ import { LS_KEYS as L } from "@scalar/object-utils/mutator-record";
7
+ import { getThemeStyles as M } from "@scalar/themes";
8
+ import { ScalarToasts as W } from "@scalar/use-toasts";
9
+ import { RouterView as A } from "vue-router";
10
+ import { loadAllResources as E } from "../../libs/local-storage.js";
11
+ import K from "../../components/CommandPalette/TheCommandPalette.vue.js";
12
+ import { useDarkModeState as b } from "../../hooks/useDarkModeState.js";
13
+ const N = ["innerHTML"], V = {
14
+ key: 0,
15
+ class: "flex min-h-0 flex-1"
16
+ }, D = { class: "flex flex-1 flex-col min-w-0" }, J = /* @__PURE__ */ f({
17
+ __name: "ApiClientApp",
18
+ setup(F) {
19
+ u(() => {
20
+ _(() => {
21
+ document.body.classList.toggle("dark-mode", n.value), document.body.classList.toggle("light-mode", !n.value);
22
+ });
23
+ });
24
+ const { isDark: n } = b(), t = w();
25
+ g(async () => {
26
+ if (localStorage.getItem(L.WORKSPACE)) {
27
+ const l = {};
28
+ let c = 0, o = 0, e = "";
29
+ for (e in localStorage)
30
+ Object.prototype.hasOwnProperty.call(localStorage, e) && (o = (localStorage[e].length + e.length) * 2, c += o, l[e] = (o / 1024).toFixed(2) + " KB");
31
+ l.Total = (c / 1024).toFixed(2) + " KB", console.table(l), E(t);
32
+ } else
33
+ t.workspaceMutators.add({
34
+ uid: "default",
35
+ name: "Workspace",
36
+ proxyUrl: "https://proxy.scalar.com"
37
+ });
38
+ B();
39
+ });
40
+ const d = h(
41
+ () => t.activeWorkspace.value && `<style>
42
+ ${M(t.activeWorkspace.value.themeId, {
43
+ fonts: !0
44
+ })}</style>`
45
+ );
46
+ return (l, c) => {
47
+ var o;
48
+ return r(), m(k, null, [
49
+ i("div", { innerHTML: d.value }, null, 8, N),
50
+ a(C),
51
+ (o = s(t).activeWorkspace.value) != null && o.uid ? (r(), m("main", V, [
52
+ a(T),
53
+ a(s(K)),
54
+ i("div", D, [
55
+ a(s(A), null, {
56
+ default: v(({ Component: e }) => [
57
+ (r(), p(y, null, [
58
+ (r(), p(x(e)))
59
+ ], 1024))
60
+ ]),
61
+ _: 1
62
+ })
63
+ ])
64
+ ])) : S("", !0),
65
+ a(s(W))
66
+ ], 64);
67
+ };
68
+ }
69
+ });
70
+ export {
71
+ J as default
72
+ };
@@ -1,4 +1,4 @@
1
- import type { ClientConfiguration } from '../Modal/index.js';
1
+ import type { ClientConfiguration } from '../../layouts/Modal/index.js';
2
2
  import type { SpecConfiguration } from '@scalar/oas-utils';
3
3
  /**
4
4
  * Mount the full-blown API Client modal to a given element.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createApiClientApp.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/createApiClientApp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAG1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAM1D;;GAEG;AACH,eAAO,MAAM,kBAAkB,OAEzB,WAAW,GAAG,IAAI,UAEd,mBAAmB;IAiEzB,+DAA+D;;IAE/D,mCAAmC;4BACX,mBAAmB;IAQ3C,uEAAuE;uBACpD,iBAAiB;IAapC,8CAA8C;;EAGjD,CAAA"}
@@ -1,5 +1,5 @@
1
- import { router as A } from "../router.js";
2
- import { useWorkspace as h } from "../store/workspace.js";
1
+ import { router as A } from "../../router.js";
2
+ import { useWorkspace as h } from "../../store/workspace.js";
3
3
  import { objectMerge as I } from "@scalar/oas-utils/helpers";
4
4
  import { createApp as v } from "vue";
5
5
  import P from "./ApiClientApp.vue.js";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,cAAc,sBAAsB,CAAA"}
@@ -7,6 +7,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
7
7
  modalState: ReturnType<typeof useModal>;
8
8
  }>>>, {}, {}>;
9
9
  export default _default;
10
+
10
11
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
12
  type __VLS_TypePropsToOption<T> = {
12
13
  [K in keyof T]-?: {} extends Pick<T, K> ? {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/Modal/ApiClientModal.vue"],"names":[],"mappings":"AAsLA,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAA;;IAQ5E,6CAA6C;gBACjC,UAAU,CAAC,OAAO,QAAQ,CAAC;;IADvC,6CAA6C;gBACjC,UAAU,CAAC,OAAO,QAAQ,CAAC;;AAiHzC,wBAMG;AAEH,eAAO,MAAM,sBAAsB,IAAK,CAAC;AACzC,OAAO,CAAC,MAAM,CAAC;IAEd,KAAK,uBAAuB,GAAG,gBAAgB,CAAC,OAAO,iBAAiB,EAAE,GAAG,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAE1K,KAAK,aAAa,GAAG,gBAAgB,CAAC,OAAO,iBAAiB,EAAE,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAErG,KAAK,sBAA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import o from "./ApiClientModal.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
- import t from "../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-852791d6"]]);
4
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5357614d"]]);
6
6
  export {
7
7
  a as default
8
8
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client-modal.d.ts","sourceRoot":"","sources":["../../../src/layouts/Modal/api-client-modal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAG/E,OAAO,EAAE,KAAK,aAAa,EAAe,MAAM,2BAA2B,CAAA;AAG3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAM7C,sDAAsD;AACtD,MAAM,MAAM,mBAAmB,GAAG;IAChC,yCAAyC;IACzC,IAAI,EAAE,iBAAiB,CAAA;IACvB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iCAAiC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,4DAA4D;IAE5D,mFAAmF;IACnF,YAAY,CAAC,EACT,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAA;CACR,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAAA;AAEvE,yCAAyC;AACzC,eAAO,MAAM,oBAAoB,OAE3B,WAAW,GAAG,IAAI,UAEd,mBAAmB;IAyEzB,+DAA+D;;IAE/D,mCAAmC;4BACX,mBAAmB;IAQ3C;;;OAGG;iCAC0B,MAAM;IAMnC;;;OAGG;uBACgB,mBAAmB;IAyEtC,uEAAuE;uBACpD,iBAAiB;IAapC,iCAAiC;qBAChB,iBAAiB;IAalC,8CAA8C;;;;;;;EAIjD,CAAA"}
@@ -1,10 +1,10 @@
1
- import { modalRouter as A } from "../router.js";
2
- import { useWorkspace as O } from "../store/workspace.js";
1
+ import { modalRouter as k } from "../../router.js";
2
+ import { useWorkspace as O } from "../../store/workspace.js";
3
3
  import { objectMerge as R } from "@scalar/oas-utils/helpers";
4
4
  import { getNestedValue as j } from "@scalar/object-utils/nested";
5
5
  import { createApp as C } from "vue";
6
6
  import q from "./ApiClientModal.vue.js";
7
- const L = async (b, r, k = !0) => {
7
+ const L = async (A, r, b = !0) => {
8
8
  var h, w, v;
9
9
  const {
10
10
  activeCollection: n,
@@ -25,8 +25,8 @@ const L = async (b, r, k = !0) => {
25
25
  "Read more: https://github.com/scalar/scalar/tree/main/packages/api-client-modal"
26
26
  );
27
27
  const u = C(q, { modalState: p });
28
- u.use(A);
29
- const f = (e = b) => {
28
+ u.use(k);
29
+ const f = (e = A) => {
30
30
  if (!e) {
31
31
  console.error(
32
32
  "[@scalar/api-client-modal] Could not create the API client.",
@@ -37,7 +37,7 @@ const L = async (b, r, k = !0) => {
37
37
  }
38
38
  u.mount(e);
39
39
  };
40
- return a.value && (k && f(), d.edit(a.value.uid, "isReadOnly", !0), r.proxyUrl && d.edit(
40
+ return a.value && (b && f(), d.edit(a.value.uid, "isReadOnly", !0), r.proxyUrl && d.edit(
41
41
  a.value.uid,
42
42
  "proxyUrl",
43
43
  r.proxyUrl
@@ -113,7 +113,7 @@ const L = async (b, r, k = !0) => {
113
113
  !0
114
114
  )
115
115
  );
116
- s && A.push(`/request/${s.uid}`), p.open = !0;
116
+ s && k.push(`/workspace/default/request/${s.uid}`), p.open = !0;
117
117
  },
118
118
  /** Mount the references to a given element */
119
119
  mount: f,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,cAAc,oBAAoB,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { CommandNames } from '../../components/CommandPalette/TheCommandPalette.vue.js';
2
+ export type CommandPaletteEvent = {
3
+ /** The command name which matches with the command palette */
4
+ commandName?: CommandNames;
5
+ /** Any extra metadata we want to pass to the command palettes */
6
+ metaData?: string;
7
+ };
8
+ /**
9
+ * Event bus for controlling the Command Palette
10
+ *
11
+ * @param commandName - the command name you wish to execute, leave empty for the full palette
12
+ */
13
+ export declare const commandPaletteBus: import("@vueuse/core").UseEventBusReturn<CommandPaletteEvent, any>;
14
+ //# sourceMappingURL=command-palette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../../src/libs/eventBusses/command-palette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAA;AAGrF,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAGD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,oEAAiC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { useEventBus as t } from "@vueuse/core";
2
+ const e = Symbol(), m = t(e);
3
+ export {
4
+ m as commandPaletteBus
5
+ };
@@ -5,5 +5,5 @@ import type { useWorkspace } from '../store/workspace.js';
5
5
  *
6
6
  * Currently not working for workspace
7
7
  */
8
- export declare const loadAllResources: (mutators: ReturnType<typeof useWorkspace>, workspaceUid?: string) => void;
8
+ export declare const loadAllResources: (mutators: ReturnType<typeof useWorkspace>) => void;
9
9
  //# sourceMappingURL=local-storage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../../src/libs/local-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAcrD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aACjB,UAAU,CAAC,OAAO,YAAY,CAAC,gCAoE1C,CAAA"}
1
+ {"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../../src/libs/local-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAcrD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAAc,UAAU,CAAC,OAAO,YAAY,CAAC,SAkEzE,CAAA"}
@@ -1,36 +1,36 @@
1
1
  import { LS_KEYS as e } from "@scalar/object-utils/mutator-record";
2
- const h = (t, o = "default") => {
2
+ const N = (t) => {
3
3
  const {
4
- collectionMutators: s,
5
- cookieMutators: a,
6
- environmentMutators: r,
7
- folderMutators: c,
8
- requestExampleMutators: l,
9
- requestMutators: E,
10
- serverMutators: u,
4
+ collectionMutators: o,
5
+ cookieMutators: s,
6
+ environmentMutators: a,
7
+ folderMutators: r,
8
+ requestExampleMutators: c,
9
+ requestMutators: l,
10
+ serverMutators: E,
11
11
  securitySchemeMutators: S,
12
- workspaceMutators: O
12
+ workspaceMutators: u
13
13
  } = t;
14
14
  Object.values(
15
15
  JSON.parse(localStorage.getItem(e.COLLECTION) || "{}")
16
- ).forEach(s.rawAdd), Object.values(
16
+ ).forEach(o.rawAdd), Object.values(
17
17
  JSON.parse(localStorage.getItem(e.COOKIE) || "{}")
18
- ).forEach(a.add), Object.values(
18
+ ).forEach(s.add), Object.values(
19
19
  JSON.parse(localStorage.getItem(e.ENVIRONMENT) || "{}")
20
- ).forEach(r.add), Object.values(
20
+ ).forEach(a.add), Object.values(
21
21
  JSON.parse(localStorage.getItem(e.FOLDER) || "{}")
22
- ).forEach(c.rawAdd), Object.values(
22
+ ).forEach(r.rawAdd), Object.values(
23
23
  JSON.parse(localStorage.getItem(e.REQUEST_EXAMPLE) || "{}")
24
- ).forEach(l.rawAdd), Object.values(
24
+ ).forEach(c.rawAdd), Object.values(
25
25
  JSON.parse(localStorage.getItem(e.REQUEST) || "{}")
26
- ).forEach(E.rawAdd), Object.values(
26
+ ).forEach(l.rawAdd), Object.values(
27
27
  JSON.parse(localStorage.getItem(e.SERVER) || "{}")
28
- ).forEach(u.rawAdd), Object.values(
28
+ ).forEach(E.rawAdd), Object.values(
29
29
  JSON.parse(localStorage.getItem(e.SECURITY_SCHEME) || "{}")
30
30
  ).forEach(S.add), Object.values(
31
- JSON.parse(localStorage.getItem(e.WORKSPACE + o) || "{}")
32
- ).forEach(O.add);
31
+ JSON.parse(localStorage.getItem(e.WORKSPACE) || "{}")
32
+ ).forEach(u.rawAdd);
33
33
  };
34
34
  export {
35
- h as loadAllResources
35
+ N as loadAllResources
36
36
  };
package/dist/router.d.ts CHANGED
@@ -1,20 +1,31 @@
1
1
  export declare enum PathId {
2
2
  Request = "request",
3
- Example = "example",
3
+ Examples = "examples",
4
4
  Cookies = "cookies",
5
5
  Collection = "collection",
6
6
  Schema = "schema",
7
7
  Environment = "environment",
8
- Server = "server"
8
+ Servers = "servers",
9
+ Workspace = "workspace"
9
10
  }
10
11
  /** Routes required by the client modal */
11
12
  export declare const modalRoutes: ({
12
13
  path: string;
13
14
  redirect: string;
14
- component?: undefined;
15
+ children?: undefined;
15
16
  } | {
16
17
  path: string;
17
- component: () => Promise<typeof import("./views/Request/Request.vue.js")>;
18
+ children: ({
19
+ path: string;
20
+ redirect: (to: import("vue-router").RouteLocation) => string;
21
+ name?: undefined;
22
+ component?: undefined;
23
+ } | {
24
+ name: string;
25
+ path: string;
26
+ component: () => Promise<typeof import("./views/Request/Request.vue.js")>;
27
+ redirect?: undefined;
28
+ })[];
18
29
  redirect?: undefined;
19
30
  })[];
20
31
  /**
@@ -27,10 +38,11 @@ export declare const activeRouterParams: import("vue").ComputedRef<{
27
38
  collection: string;
28
39
  environment: string;
29
40
  request: string;
30
- example: string;
41
+ examples: string;
31
42
  schema: string;
32
43
  cookies: string;
33
- server: string;
44
+ servers: string;
45
+ workspace: string;
34
46
  }>;
35
47
  /** If we try to navigate to a entity UID that does not exist then we fallback to the default */
36
48
  export declare function fallbackMissingParams(key: PathId, item: Record<string, any> | undefined): void;
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAGA,oBAAY,MAAM;IAChB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;CAClB;AAED,0CAA0C;AAC1C,eAAO,MAAM,WAAW;;;;;;;;IAcvB,CAAA;AAyDD;;GAEG;AACH,eAAO,MAAM,MAAM,6BAGjB,CAAA;AAEF,sCAAsC;AACtC,eAAO,MAAM,WAAW,6BAGtB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;EAyB7B,CAAA;AAEF,gGAAgG;AAChG,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,QAmBtC"}
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAQA,oBAAY,MAAM;IAChB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAwBD,0CAA0C;AAC1C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;IAaI,CAAA;AA2E5B;;GAEG;AACH,eAAO,MAAM,MAAM,6BAGjB,CAAA;AAEF,sCAAsC;AACtC,eAAO,MAAM,WAAW,6BAGtB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;EA0B7B,CAAA;AAEF,gGAAgG;AAChG,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,QAmBtC"}