@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,82 +1,102 @@
1
- import { defineComponent as _, computed as h, openBlock as c, createBlock as m, unref as e, withCtx as s, createVNode as t, createCommentVNode as k, withModifiers as g, createElementVNode as a } from "vue";
2
- import { useWorkspace as z } from "../../store/workspace.js";
3
- import { ScalarDropdown as D, ScalarDropdownItem as o, ScalarIcon as i, ScalarDropdownDivider as E, ScalarButton as S } from "@scalar/components";
4
- const v = /* @__PURE__ */ a("span", null, "Add Example", -1), w = /* @__PURE__ */ a("span", null, "Rename", -1), C = /* @__PURE__ */ a("span", null, "Duplicate", -1), b = /* @__PURE__ */ a("span", null, "Delete", -1), B = /* @__PURE__ */ _({
1
+ import { defineComponent as C, computed as E, openBlock as u, createBlock as d, unref as e, withCtx as s, createVNode as t, createCommentVNode as R, withModifiers as w, createElementVNode as i } from "vue";
2
+ import { commandPaletteBus as z } from "../../libs/eventBusses/command-palette.js";
3
+ import { activeRouterParams as p, PathId as f } from "../../router.js";
4
+ import { useWorkspace as I, findRequestFolders as S } from "../../store/workspace.js";
5
+ import { ScalarDropdown as b, ScalarDropdownItem as o, ScalarIcon as a, ScalarDropdownDivider as A, ScalarButton as B } from "@scalar/components";
6
+ import { useRouter as M } from "vue-router";
7
+ const N = /* @__PURE__ */ i("span", null, "Add Example", -1), P = /* @__PURE__ */ i("span", null, "Rename", -1), V = /* @__PURE__ */ i("span", null, "Duplicate", -1), y = /* @__PURE__ */ i("span", null, "Delete", -1), G = /* @__PURE__ */ C({
5
8
  __name: "RequestSidebarItemMenu",
6
9
  props: {
7
10
  item: {}
8
11
  },
9
- setup(d) {
10
- const l = d, { createExampleFromRequest: u, requestMutators: p } = z(), f = () => {
11
- if (!("summary" in l.item)) return;
12
- const n = u(l.item);
13
- p.edit(l.item.uid, "childUids", [
14
- ...l.item.childUids,
15
- n.uid
16
- ]);
17
- }, x = h(() => "summary" in l.item);
18
- return (n, r) => (c(), m(e(D), { teleport: "#scalar-client" }, {
12
+ setup(x) {
13
+ const l = x, { activeWorkspace: r, requestMutators: _, requestExampleMutators: h } = I(), { replace: c } = M(), k = () => z.emit({
14
+ commandName: "Add Example",
15
+ metaData: l.item.uid
16
+ }), v = () => {
17
+ console.log("rename");
18
+ }, g = () => {
19
+ console.log("duplicate");
20
+ }, D = () => {
21
+ if ("requestUid" in l.item)
22
+ h.delete(l.item), p.value[f.Examples] === l.item.uid && c(`/workspace/${r.value}/request/default`);
23
+ else {
24
+ const n = S(l.item.uid);
25
+ if (!n.length) return;
26
+ _.delete(l.item, n[0]), p.value[f.Request] === l.item.uid && c(`/workspace/${r.value.uid}/request/default`);
27
+ }
28
+ }, q = E(() => "summary" in l.item);
29
+ return (n, m) => (u(), d(e(b), { teleport: "#scalar-client" }, {
19
30
  items: s(() => [
20
- x.value ? (c(), m(e(o), {
31
+ q.value ? (u(), d(e(o), {
21
32
  key: 0,
22
33
  class: "flex !gap-2",
23
- onClick: f
34
+ onClick: k
24
35
  }, {
25
36
  default: s(() => [
26
- t(e(i), {
27
- class: "inline-flex !stroke-[1.5]",
28
- icon: "AddLine",
37
+ t(e(a), {
38
+ class: "inline-flex",
39
+ icon: "Add",
29
40
  size: "sm"
30
41
  }),
31
- v
42
+ N
32
43
  ]),
33
44
  _: 1
34
- })) : k("", !0),
35
- t(e(o), { class: "flex !gap-2" }, {
45
+ })) : R("", !0),
46
+ t(e(o), {
47
+ class: "flex !gap-2",
48
+ onClick: v
49
+ }, {
36
50
  default: s(() => [
37
- t(e(i), {
38
- class: "inline-flex !stroke-[1.5]",
51
+ t(e(a), {
52
+ class: "inline-flex",
39
53
  icon: "Edit",
40
54
  size: "sm"
41
55
  }),
42
- w
56
+ P
43
57
  ]),
44
58
  _: 1
45
59
  }),
46
- t(e(o), { class: "flex !gap-2" }, {
60
+ t(e(o), {
61
+ class: "flex !gap-2",
62
+ onClick: g
63
+ }, {
47
64
  default: s(() => [
48
- t(e(i), {
49
- class: "inline-flex !stroke-[1.5]",
65
+ t(e(a), {
66
+ class: "inline-flex",
50
67
  icon: "Duplicate",
51
68
  size: "sm"
52
69
  }),
53
- C
70
+ V
54
71
  ]),
55
72
  _: 1
56
73
  }),
57
- t(e(E)),
58
- t(e(o), { class: "flex !gap-2" }, {
74
+ t(e(A)),
75
+ t(e(o), {
76
+ class: "flex !gap-2",
77
+ onClick: D
78
+ }, {
59
79
  default: s(() => [
60
- t(e(i), {
61
- class: "inline-flex !stroke-[1.5]",
80
+ t(e(a), {
81
+ class: "inline-flex",
62
82
  icon: "Trash",
63
83
  size: "sm"
64
84
  }),
65
- b
85
+ y
66
86
  ]),
67
87
  _: 1
68
88
  })
69
89
  ]),
70
90
  default: s(() => [
71
- t(e(S), {
91
+ t(e(B), {
72
92
  class: "z-10 hover:bg-b-3 transition-none p-1 group-hover:flex ui-open:flex absolute left-0 hidden -translate-x-full -ml-1",
73
93
  size: "sm",
74
94
  variant: "ghost",
75
- onClick: r[0] || (r[0] = g(() => {
95
+ onClick: m[0] || (m[0] = w(() => {
76
96
  }, ["stop"]))
77
97
  }, {
78
98
  default: s(() => [
79
- t(e(i), {
99
+ t(e(a), {
80
100
  icon: "Ellipses",
81
101
  size: "sm"
82
102
  })
@@ -89,5 +109,5 @@ const v = /* @__PURE__ */ a("span", null, "Add Example", -1), w = /* @__PURE__ *
89
109
  }
90
110
  });
91
111
  export {
92
- B as default
112
+ G as default
93
113
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAuHA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cAUrE,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAgOxC,wBAMG;AAOH,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"}
1
+ {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAwHA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cAUrE,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AA+NxC,wBAMG;AAOH,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"}
@@ -43,9 +43,10 @@ const E = { class: "flex items-center flex-1" }, H = { class: "custom-scroll fle
43
43
  return (e, o) => (r(), n(g, null, {
44
44
  title: u(() => [
45
45
  p(S(R), {
46
- class: "text-c-3 mr-2 rotate-180 stroke-[2]",
46
+ class: "text-c-3 mr-2 rotate-180",
47
47
  icon: "ExternalLink",
48
- size: "sm"
48
+ size: "sm",
49
+ thickness: "2.5"
49
50
  }),
50
51
  f("div", E, [
51
52
  C(" Response "),
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/OAuth2.vue"],"names":[],"mappings":"AAuKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAA;;kBAOzE,oBAAoB;iBACrB,yBAAyB;kBACxB,YAAY;;kBAFZ,oBAAoB;iBACrB,yBAAyB;kBACxB,YAAY;;AA2a5B,wBAMG;AAOH,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"}
1
+ {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/OAuth2.vue"],"names":[],"mappings":"AAyKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAA;;kBAOzE,oBAAoB;iBACrB,yBAAyB;kBACxB,YAAY;;kBAFZ,oBAAoB;iBACrB,yBAAyB;kBACxB,YAAY;;AA+a5B,wBAMG;AAOH,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"}
@@ -156,8 +156,10 @@ const U = { class: "h-8 flex items-center justify-self-end" }, L = /* @__PURE__
156
156
  default: l(() => [
157
157
  v("div", U, [
158
158
  a(d(w), {
159
+ class: "p-0 py-0.5 px-2 mr-1",
159
160
  loading: d(n),
160
161
  size: "sm",
162
+ variant: "outlined",
161
163
  onClick: y
162
164
  }, {
163
165
  default: l(() => [
@@ -1,4 +1,3 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
2
  export default _default;
3
-
4
- //# sourceMappingURL=App.vue.d.ts.map
3
+ //# sourceMappingURL=WorkspaceDropdown.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAgWA,wBAKG"}
@@ -0,0 +1,80 @@
1
+ import { defineComponent as k, openBlock as c, createElementBlock as i, createVNode as t, unref as e, withCtx as o, Fragment as w, renderList as v, createBlock as g, withModifiers as C, createElementVNode as r, normalizeClass as b, createTextVNode as m, toDisplayString as p } from "vue";
2
+ import { commandPaletteBus as y } from "../../../libs/eventBusses/command-palette.js";
3
+ import { useWorkspace as D } from "../../../store/workspace.js";
4
+ import { ScalarDropdown as S, ScalarDropdownItem as d, ScalarIcon as l, ScalarDropdownDivider as W, ScalarButton as B } from "@scalar/components";
5
+ import { useRouter as N } from "vue-router";
6
+ const j = { class: "xl:min-h-header py-2.5 flex items-center border-b px-2.5 text-sm" }, z = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, V = { class: "flex items-center justify-center h-4 w-4" }, E = /* @__PURE__ */ r("span", null, "Create new workspace", -1), T = /* @__PURE__ */ k({
7
+ __name: "WorkspaceDropdown",
8
+ setup(I) {
9
+ const { activeWorkspace: s, workspaces: u } = D(), { push: f } = N(), h = (a) => {
10
+ a !== s.value.uid && f(`/workspace/${a}`);
11
+ }, x = () => y.emit({ commandName: "Create Workspace" });
12
+ return (a, $) => (c(), i("div", j, [
13
+ t(e(S), null, {
14
+ items: o(() => [
15
+ (c(!0), i(w, null, v(e(u), (_, n) => (c(), g(e(d), {
16
+ key: n,
17
+ class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
18
+ onClick: C((A) => h(n), ["stop"])
19
+ }, {
20
+ default: o(() => [
21
+ r("div", {
22
+ class: b([
23
+ "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
24
+ e(s).uid === n ? "bg-blue text-b-1" : "text-transparent"
25
+ ])
26
+ }, [
27
+ t(e(l), {
28
+ class: "size-2.5",
29
+ icon: "Checkmark",
30
+ thickness: "3.5"
31
+ })
32
+ ], 2),
33
+ m(" " + p(_.name), 1)
34
+ ]),
35
+ _: 2
36
+ }, 1032, ["onClick"]))), 128)),
37
+ t(e(W)),
38
+ t(e(d), {
39
+ class: "flex items-center gap-1.5",
40
+ onClick: x
41
+ }, {
42
+ default: o(() => [
43
+ r("div", V, [
44
+ t(e(l), {
45
+ class: "h-2.5",
46
+ icon: "Add"
47
+ })
48
+ ]),
49
+ E
50
+ ]),
51
+ _: 1
52
+ })
53
+ ]),
54
+ default: o(() => [
55
+ t(e(B), {
56
+ class: "font-normal h-full justify-start py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
57
+ fullWidth: "",
58
+ variant: "ghost"
59
+ }, {
60
+ default: o(() => [
61
+ r("h2", z, [
62
+ m(p(e(s).name) + " ", 1),
63
+ t(e(l), {
64
+ class: "size-2.5",
65
+ icon: "ChevronDown",
66
+ thickness: "3.5"
67
+ })
68
+ ])
69
+ ]),
70
+ _: 1
71
+ })
72
+ ]),
73
+ _: 1
74
+ })
75
+ ]));
76
+ }
77
+ });
78
+ export {
79
+ T as default
80
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./WorkspaceDropdown.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,2 +1,3 @@
1
1
  export { default as OAuth2 } from './OAuth2.vue.js';
2
+ export { default as WorkspaceDropdown } from './WorkspaceDropdown.vue.js';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1,4 +1,6 @@
1
- import { default as e } from "./OAuth2.vue.js";
1
+ import { default as a } from "./OAuth2.vue.js";
2
+ import { default as t } from "./WorkspaceDropdown.vue.js";
2
3
  export {
3
- e as OAuth2
4
+ a as OAuth2,
5
+ t as WorkspaceDropdown
4
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AA6MA,wBAKG"}
1
+ {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAwMA,wBAKG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as p, openBlock as l, createBlock as i, withCtx as e, createVNode as r, unref as n, createTextVNode as m, createElementVNode as _, createElementBlock as v, Fragment as x, renderList as S } from "vue";
1
+ import { defineComponent as d, openBlock as n, createBlock as l, withCtx as e, createVNode as r, unref as s, createElementVNode as p, createElementBlock as _, Fragment as v, renderList as x, createTextVNode as S } from "vue";
2
2
  import h from "../../components/Sidebar/SidebarButton.vue.js";
3
3
  import k from "../../components/Sidebar/SidebarList.vue.js";
4
4
  import b from "../../components/Sidebar/SidebarListElement.vue.js";
@@ -10,30 +10,27 @@ import { useRouter as $ } from "vue-router";
10
10
  import y from "./ServerForm.vue.js";
11
11
  import B from "../../components/Sidebar/Sidebar.vue.js";
12
12
  /* empty css */
13
- const E = { class: "flex-1" }, I = /* @__PURE__ */ p({
13
+ const E = { class: "flex-1" }, I = /* @__PURE__ */ d({
14
14
  __name: "Servers",
15
15
  setup(N) {
16
- const { activeCollection: t, servers: c, serverMutators: u } = w(), { push: f } = $(), d = () => {
16
+ const { activeCollection: t, servers: m, serverMutators: c } = w(), { push: u } = $(), f = () => {
17
17
  if (!t.value) return;
18
18
  const o = C({ url: "http://localhost" });
19
- u.add(o, t.value.uid), f(`/servers/${o.uid}`);
19
+ c.add(o, t.value.uid), u(`/servers/${o.uid}`);
20
20
  };
21
- return (o, g) => (l(), i(L, null, {
21
+ return (o, g) => (n(), l(L, null, {
22
22
  default: e(() => [
23
- r(n(B), null, {
24
- title: e(() => [
25
- m("Servers")
26
- ]),
23
+ r(s(B), { title: "Servers" }, {
27
24
  content: e(() => [
28
- _("div", E, [
25
+ p("div", E, [
29
26
  r(k, null, {
30
27
  default: e(() => {
31
- var s;
28
+ var i;
32
29
  return [
33
- (l(!0), v(x, null, S((s = n(t)) == null ? void 0 : s.spec.serverUids, (a) => (l(), i(b, {
30
+ (n(!0), _(v, null, x((i = s(t)) == null ? void 0 : i.spec.serverUids, (a) => (n(), l(b, {
34
31
  key: a,
35
32
  class: "text-xs",
36
- variable: { name: n(c)[a].url, uid: a }
33
+ variable: { name: s(m)[a].url, uid: a }
37
34
  }, null, 8, ["variable"]))), 128))
38
35
  ];
39
36
  }),
@@ -42,9 +39,9 @@ const E = { class: "flex-1" }, I = /* @__PURE__ */ p({
42
39
  ])
43
40
  ]),
44
41
  button: e(() => [
45
- r(h, { click: d }, {
42
+ r(h, { click: f }, {
46
43
  title: e(() => [
47
- m("Add Server")
44
+ S("Add Server")
48
45
  ]),
49
46
  _: 1
50
47
  })
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.22",
21
+ "version": "2.0.25",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -45,6 +45,14 @@
45
45
  "import": "./dist/libs/eventBusses/index.js",
46
46
  "types": "./dist/libs/eventBusses/index.d.ts"
47
47
  },
48
+ "./layouts/Modal": {
49
+ "import": "./dist/layouts/Modal/index.js",
50
+ "types": "./dist/layouts/Modal/index.d.ts"
51
+ },
52
+ "./layouts/App": {
53
+ "import": "./dist/layouts/App/index.js",
54
+ "types": "./dist/layouts/App/index.d.ts"
55
+ },
48
56
  "./hooks": {
49
57
  "import": "./dist/hooks/index.js",
50
58
  "types": "./dist/hooks/index.d.ts"
@@ -73,18 +81,14 @@
73
81
  "import": "./dist/components/DarkModeToggle/index.js",
74
82
  "types": "./dist/components/DarkModeToggle/index.d.ts"
75
83
  },
84
+ "./components/CommandPalette": {
85
+ "import": "./dist/components/CommandPalette/index.js",
86
+ "types": "./dist/components/CommandPalette/index.d.ts"
87
+ },
76
88
  "./components/AddressBar": {
77
89
  "import": "./dist/components/AddressBar/index.js",
78
90
  "types": "./dist/components/AddressBar/index.d.ts"
79
91
  },
80
- "./Modal": {
81
- "import": "./dist/Modal/index.js",
82
- "types": "./dist/Modal/index.d.ts"
83
- },
84
- "./App": {
85
- "import": "./dist/App/index.js",
86
- "types": "./dist/App/index.d.ts"
87
- },
88
92
  "./css/*.css": {
89
93
  "import": "./dist/css/*.css",
90
94
  "require": "./dist/css/*.css"
@@ -114,12 +118,12 @@
114
118
  "vue": "^3.4.29",
115
119
  "vue-router": "^4.3.0",
116
120
  "zod": "^3.22.4",
117
- "@scalar/components": "0.12.14",
121
+ "@scalar/components": "0.12.16",
118
122
  "@scalar/draggable": "0.1.3",
119
- "@scalar/themes": "0.9.13",
120
- "@scalar/oas-utils": "0.2.13",
121
123
  "@scalar/object-utils": "1.1.4",
122
- "@scalar/use-codemirror": "0.11.6",
124
+ "@scalar/themes": "0.9.15",
125
+ "@scalar/oas-utils": "0.2.15",
126
+ "@scalar/use-codemirror": "0.11.7",
123
127
  "@scalar/use-toasts": "0.7.4",
124
128
  "@scalar/use-tooltip": "1.0.2"
125
129
  },
@@ -138,11 +142,11 @@
138
142
  "vite-svg-loader": "^5.1.0",
139
143
  "vitest": "^1.6.0",
140
144
  "vue-tsc": "^2.0.13",
141
- "@scalar/build-tooling": "0.1.9"
145
+ "@scalar/build-tooling": "0.1.10"
142
146
  },
143
147
  "scripts": {
144
148
  "build": "vite build && pnpm types:build && tsc-alias -p tsconfig.build.json",
145
- "dev": "vite",
149
+ "dev": "pnpm playground:app",
146
150
  "lint:check": "eslint .",
147
151
  "lint:fix": "eslint . --fix",
148
152
  "playground:app": "vite ./playground/app -c ./vite.config.ts",
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../src/App/ApiClientApp.vue"],"names":[],"mappings":";AAgOA,wBAKG"}
@@ -1,56 +0,0 @@
1
- import { defineComponent as n, onMounted as l, watchEffect as m, onBeforeMount as i, computed as d, openBlock as p, createElementBlock as f, Fragment as u, createElementVNode as o, createVNode as t, unref as a } from "vue";
2
- import _ from "../components/SideNav/SideNav.vue.js";
3
- import k from "../components/TopNav/TopNav.vue.js";
4
- import { useWorkspace as y } from "../store/workspace.js";
5
- import { addScalarClassesToHeadless as h } from "@scalar/components";
6
- import { createWorkspace as x } from "@scalar/oas-utils/entities/workspace";
7
- import { getThemeStyles as M } from "@scalar/themes";
8
- import { ScalarToasts as g } from "@scalar/use-toasts";
9
- import { RouterView as v } from "vue-router";
10
- import { useDarkModeState as T } from "../hooks/useDarkModeState.js";
11
- const w = ["innerHTML"], S = { class: "flex min-h-0 flex-1" }, L = { class: "flex flex-1 flex-col min-w-0" }, R = /* @__PURE__ */ n({
12
- __name: "ApiClientApp",
13
- setup(B) {
14
- l(() => {
15
- m(() => {
16
- document.body.classList.toggle("dark-mode", r.value), document.body.classList.toggle("light-mode", !r.value);
17
- });
18
- });
19
- const { isDark: r } = T(), e = y();
20
- i(async () => {
21
- const s = x({
22
- uid: "default",
23
- // TODO: Make this configurable
24
- proxyUrl: "https://proxy.scalar.com"
25
- });
26
- e.workspaceMutators.add(s), e.collectionMutators.add({
27
- uid: "drafts",
28
- spec: {
29
- info: {
30
- title: "Drafts"
31
- }
32
- }
33
- }), e.requestMutators.add({ summary: "My First Request" }, "drafts"), h();
34
- });
35
- const c = d(
36
- () => `<style>
37
- ${M(e.activeWorkspace.value.themeId, {
38
- fonts: !0
39
- })}</style>`
40
- );
41
- return (s, C) => (p(), f(u, null, [
42
- o("div", { innerHTML: c.value }, null, 8, w),
43
- t(k),
44
- o("main", S, [
45
- t(_),
46
- o("div", L, [
47
- t(a(v))
48
- ])
49
- ]),
50
- t(a(g))
51
- ], 64));
52
- }
53
- });
54
- export {
55
- R as default
56
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"createApiClientApp.d.ts","sourceRoot":"","sources":["../../src/App/createApiClientApp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD,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 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/App/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,cAAc,sBAAsB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../src/App.vue"],"names":[],"mappings":";AAiTA,wBAKG;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,sBAAsB,GAAG,gBAAgB,CAAC,OAAO,KAAK,EAAE,gBAAgB,EAAE,EAAE,CAAC,GAAG,gBAAgB,CAAC,OAAO,mBAAmB,EAA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,MAAM,CAAC,KAAK,GAAG,GACnD;SAAG,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI;KAAG,GAC5C,KAAK,GACL,KAAK,CAAC;IACT,KAAK,oBAAoB,CAAC,CAAC,IAAI,oBAAoB,CAClD,yBAAyB,CACxB,0BAA0B,CAAC,CAAC,CAAC,GAAG;SAC9B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,GAAG;YAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;SAAE,GAAG,KAAK;KACtE,CACD,CACD,CAAC;IACF,KAAK,oBAAoB,CAAC,CAAC,IAAI;SAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KAAG,GAAG,EAAE,CAAC;CAC9D;AACD,eAAO,MAAM,oBAAoB,IAAK,CAAC"}
package/dist/App.vue.js DELETED
@@ -1,77 +0,0 @@
1
- import { defineComponent as f, onMounted as p, watchEffect as u, onBeforeMount as _, computed as g, openBlock as s, createElementBlock as h, Fragment as y, createElementVNode as c, createVNode as a, unref as i, withCtx as k, createBlock as m, KeepAlive as x, resolveDynamicComponent as S } from "vue";
2
- import v from "./components/SideNav/SideNav.vue.js";
3
- import M from "./components/TopNav/TopNav.vue.js";
4
- import { useWorkspace as T } from "./store/workspace.js";
5
- import { addScalarClassesToHeadless as w } from "@scalar/components";
6
- import { createWorkspace as b } from "@scalar/oas-utils/entities/workspace";
7
- import { LS_KEYS as B } from "@scalar/object-utils/mutator-record";
8
- import { getThemeStyles as L } from "@scalar/themes";
9
- import { ScalarToasts as C } from "@scalar/use-toasts";
10
- import { RouterView as E } from "vue-router";
11
- import { loadAllResources as K } from "./libs/local-storage.js";
12
- import { useDarkModeState as R } from "./hooks/useDarkModeState.js";
13
- const A = ["innerHTML"], D = { class: "flex min-h-0 flex-1" }, F = { class: "flex flex-1 flex-col min-w-0" }, G = /* @__PURE__ */ f({
14
- __name: "App",
15
- setup(W) {
16
- p(() => {
17
- u(() => {
18
- document.body.classList.toggle("dark-mode", n.value), document.body.classList.toggle("light-mode", !n.value);
19
- });
20
- });
21
- const { isDark: n } = R(), t = T();
22
- _(async () => {
23
- if (localStorage.getItem(`${B.WORKSPACE}default`)) {
24
- console.info("Remove this before going live, but here are the stats: ");
25
- const e = {};
26
- let l = 0, o = 0, r = "";
27
- for (r in localStorage)
28
- Object.prototype.hasOwnProperty.call(localStorage, r) && (o = (localStorage[r].length + r.length) * 2, l += o, e[r] = (o / 1024).toFixed(2) + " KB");
29
- e.Total = (l / 1024).toFixed(2) + " KB", console.table(e), K(t);
30
- } else {
31
- const e = b({
32
- uid: "default",
33
- proxyUrl: "https://proxy.scalar.com"
34
- });
35
- t.workspaceMutators.add(e), t.collectionMutators.add({
36
- uid: "drafts",
37
- spec: {
38
- info: {
39
- title: "Drafts"
40
- }
41
- }
42
- }), t.requestMutators.add(
43
- { summary: "My First Request" },
44
- "drafts"
45
- );
46
- }
47
- w();
48
- });
49
- const d = g(
50
- () => `<style>
51
- ${L(t.activeWorkspace.value.themeId, {
52
- fonts: !0
53
- })}</style>`
54
- );
55
- return (e, l) => (s(), h(y, null, [
56
- c("div", { innerHTML: d.value }, null, 8, A),
57
- a(M),
58
- c("main", D, [
59
- a(v),
60
- c("div", F, [
61
- a(i(E), null, {
62
- default: k(({ Component: o }) => [
63
- (s(), m(x, null, [
64
- (s(), m(S(o)))
65
- ], 1024))
66
- ]),
67
- _: 1
68
- })
69
- ])
70
- ]),
71
- a(i(C))
72
- ], 64));
73
- }
74
- });
75
- export {
76
- G as default
77
- };
package/dist/App.vue3.js DELETED
@@ -1,5 +0,0 @@
1
- import o from "./App.vue.js";
2
- /* empty css */
3
- export {
4
- o as default
5
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../src/Modal/ApiCl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