@scalar/api-client 2.0.22 → 2.0.24

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 (58) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/Modal/api-client-modal.js +6 -6
  3. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  5. package/dist/components/AddressBar/AddressBar.vue2.js +2 -2
  6. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  7. package/dist/components/AddressBar/AddressBarHistory.vue.js +11 -10
  8. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  9. package/dist/components/AddressBar/AddressBarServer.vue.js +36 -29
  10. package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +1 -1
  11. package/dist/components/CommandPalette/CommandPalette.vue.js +1 -1
  12. package/dist/components/CommandPalette/CommandPalette.vue2.js +18 -17
  13. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +7 -6
  14. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  15. package/dist/components/DataTable/DataTableCheckbox.vue.js +3 -2
  16. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  17. package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -14
  18. package/dist/components/Search/SearchButton.vue.d.ts.map +1 -1
  19. package/dist/components/Search/SearchButton.vue.js +7 -6
  20. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  21. package/dist/components/SideNav/SideNavLink.vue.js +17 -15
  22. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  23. package/dist/components/Sidebar/SidebarListElementActions.vue.js +2 -2
  24. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  25. package/dist/components/TopNav/TopNav.vue.js +2 -2
  26. package/dist/components/TopNav/TopNav.vue2.js +0 -1
  27. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  28. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  29. package/dist/components/TopNav/TopNavItem.vue2.js +9 -10
  30. package/dist/router.d.ts +20 -3
  31. package/dist/router.d.ts.map +1 -1
  32. package/dist/router.js +100 -68
  33. package/dist/store/workspace.d.ts +32 -32
  34. package/dist/store/workspace.d.ts.map +1 -1
  35. package/dist/store/workspace.js +49 -53
  36. package/dist/style.css +1 -1
  37. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  38. package/dist/views/Request/Request.vue.js +1 -1
  39. package/dist/views/Request/Request.vue2.js +3 -3
  40. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  41. package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -4
  42. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  43. package/dist/views/Request/RequestSection/RequestSection.vue.js +4 -4
  44. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  45. package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -4
  46. package/dist/views/Request/RequestSection/RequestTable.vue2.js +4 -3
  47. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  48. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  49. package/dist/views/Request/RequestSidebarItem.vue2.js +68 -60
  50. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  51. package/dist/views/Request/RequestSidebarItemMenu.vue.js +19 -19
  52. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  53. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -5
  54. package/package.json +5 -5
  55. package/dist/views/Collection/Collection.vue.js +0 -4
  56. package/dist/views/Collection/Collection.vue2.js +0 -136
  57. package/dist/views/Components/Schemas/Schemas.vue.js +0 -4
  58. package/dist/views/Components/Schemas/Schemas.vue2.js +0 -20
@@ -1 +1 @@
1
- {"version":3,"file":"SideNavLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavLink.vue"],"names":[],"mappings":"AAyBA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAI/C,KAAK,SAAS,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAA;AAa1D,iBAAS,cAAc;qBAwDO,GAAG;EAehC;AACD,QAAA,MAAM,eAAe;UAlFb,SAAS,CAAC,MAAM,CAAC;UACjB,MAAM;aACH,OAAO;;UAFV,SAAS,CAAC,MAAM,CAAC;UACjB,MAAM;aACH,OAAO;aAsFhB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,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"}
1
+ {"version":3,"file":"SideNavLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavLink.vue"],"names":[],"mappings":"AA6BA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAI/C,KAAK,SAAS,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAA;AAe1D,iBAAS,cAAc;qBAuDO,GAAG;EAgBhC;AACD,QAAA,MAAM,eAAe;UApFb,SAAS,CAAC,MAAM,CAAC;UACjB,MAAM;aACH,OAAO;;UAFV,SAAS,CAAC,MAAM,CAAC;UACjB,MAAM;aACH,OAAO;aAwFhB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,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"}
@@ -1,27 +1,29 @@
1
- import { defineComponent as t, resolveComponent as n, openBlock as r, createBlock as a, normalizeClass as s, withCtx as c, createVNode as l, unref as i, createElementVNode as p, renderSlot as u } from "vue";
2
- import { ScalarIcon as m } from "@scalar/components";
3
- const d = { class: "sr-only" }, k = /* @__PURE__ */ t({
1
+ import { defineComponent as r, resolveComponent as s, openBlock as a, createBlock as c, normalizeClass as i, unref as o, withCtx as l, createVNode as p, createElementVNode as u, renderSlot as m } from "vue";
2
+ import { useWorkspace as d } from "../../store/workspace.js";
3
+ import { ScalarIcon as f } from "@scalar/components";
4
+ const k = { class: "sr-only" }, x = /* @__PURE__ */ r({
4
5
  __name: "SideNavLink",
5
6
  props: {
6
7
  icon: {},
7
8
  path: {},
8
9
  active: { type: Boolean }
9
10
  },
10
- setup(f) {
11
+ setup(v) {
12
+ const { activeWorkspace: t } = d();
11
13
  return (e, _) => {
12
- const o = n("router-link");
13
- return r(), a(o, {
14
+ const n = s("router-link");
15
+ return a(), c(n, {
14
16
  activeClass: "active-link",
15
- class: s(["w-[37px] hover:bg-b-2 active:text-c-1 flex items-center justify-center rounded-lg p-[7px]", { "bg-b-2 transition-none hover:cursor-auto text-c-1": e.active }]),
16
- to: e.path
17
+ class: i(["w-[37px] hover:bg-b-2 active:text-c-1 flex items-center justify-center rounded-lg p-[7px]", { "bg-b-2 transition-none hover:cursor-auto text-c-1": e.active }]),
18
+ to: `/workspace/${o(t).uid}${e.path}`
17
19
  }, {
18
- default: c(() => [
19
- l(i(m), {
20
- class: "stroke-[1.5]",
21
- icon: e.icon
20
+ default: l(() => [
21
+ p(o(f), {
22
+ icon: e.icon,
23
+ thickness: "1.5"
22
24
  }, null, 8, ["icon"]),
23
- p("span", d, [
24
- u(e.$slots, "default")
25
+ u("span", k, [
26
+ m(e.$slots, "default")
25
27
  ])
26
28
  ]),
27
29
  _: 3
@@ -30,5 +32,5 @@ const d = { class: "sr-only" }, k = /* @__PURE__ */ t({
30
32
  }
31
33
  });
32
34
  export {
33
- k as default
35
+ x as default
34
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";cAmFY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;cAJS;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;AA4LH,wBAOG;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":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";cAmFY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;cAJS;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;AA0LH,wBAOG;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"}
@@ -27,7 +27,7 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
27
27
  onClick: o[0] || (o[0] = (s) => a(C)(e.variable.name))
28
28
  }, [
29
29
  r(a(d), {
30
- class: "h-3 w-3 stroke-[1.5]",
30
+ class: "h-3 w-3",
31
31
  icon: "Clipboard"
32
32
  })
33
33
  ]),
@@ -41,7 +41,7 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
41
41
  ), ["prevent"]))
42
42
  }, [
43
43
  r(a(d), {
44
- class: "h-3.5 w-3.5 stroke-[1.5]",
44
+ class: "h-3.5 w-3.5",
45
45
  icon: "Close"
46
46
  })
47
47
  ]))
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";AA+NA,wBAKG"}
1
+ {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";AA6NA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./TopNav.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d4581e27"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-24eea304"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -19,7 +19,6 @@ const h = { class: "flex h-10 t-app__top-nav" }, C = { class: "flex h-10 flex-1
19
19
  c("div", C, [
20
20
  e(o).length === 1 ? (l(), a("div", B, [
21
21
  i(e(m), {
22
- class: "stroke-[2]",
23
22
  icon: e(o)[0].icon,
24
23
  size: "xs"
25
24
  }, null, 8, ["icon"]),
@@ -1 +1 @@
1
- {"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AA6HA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;;aAM3B,MAAM;YACP,OAAO;;;;;aADN,MAAM;YACP,OAAO;;;;;AAsJnB,wBAOG;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":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AA4HA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;;aAM3B,MAAM;YACP,OAAO;;;;;aADN,MAAM;YACP,OAAO;;;;;AAoJnB,wBAOG;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,7 +1,7 @@
1
1
  import o from "./TopNavItem.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a1e15ecf"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7c0ee464"]]);
5
5
  export {
6
- p as default
6
+ r as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as m, openBlock as n, createBlock as i, unref as s, withCtx as l, createElementVNode as o, normalizeClass as p, createVNode as a, toDisplayString as k, createCommentVNode as f } from "vue";
1
+ import { defineComponent as m, openBlock as i, createBlock as s, unref as n, withCtx as l, createElementVNode as o, normalizeClass as p, createVNode as a, toDisplayString as f, createCommentVNode as k } from "vue";
2
2
  import v from "../ScalarHotkey.vue.js";
3
3
  import { ScalarTooltip as y, ScalarIcon as c } from "@scalar/components";
4
4
  const d = { class: "nav-item-icon-copy flex flex-1 items-center justify-center gap-1.5" }, u = { class: "nav-item-copy text-xs" }, b = /* @__PURE__ */ m({
@@ -11,7 +11,7 @@ const d = { class: "nav-item-icon-copy flex flex-1 items-center justify-center g
11
11
  },
12
12
  emits: ["click", "close"],
13
13
  setup(C) {
14
- return (e, t) => (n(), i(s(y), {
14
+ return (e, t) => (i(), s(n(y), {
15
15
  class: "scalar-client",
16
16
  delay: 500,
17
17
  resize: "",
@@ -23,30 +23,29 @@ const d = { class: "nav-item-icon-copy flex flex-1 items-center justify-center g
23
23
  onClick: t[1] || (t[1] = (r) => e.$emit("click"))
24
24
  }, [
25
25
  o("div", d, [
26
- a(s(c), {
27
- class: "stroke-[2]",
26
+ a(n(c), {
28
27
  icon: e.icon,
29
28
  size: "xs"
30
29
  }, null, 8, ["icon"]),
31
- o("span", u, k(e.label), 1)
30
+ o("span", u, f(e.label), 1)
32
31
  ]),
33
32
  o("button", {
34
33
  class: "nav-item-close",
35
34
  type: "button",
36
35
  onClick: t[0] || (t[0] = (r) => e.$emit("close"))
37
36
  }, [
38
- a(s(c), {
39
- class: "stroke-[1.75]",
40
- icon: "Close"
37
+ a(n(c), {
38
+ icon: "Close",
39
+ thickness: "1.75"
41
40
  })
42
41
  ])
43
42
  ], 2)
44
43
  ]),
45
44
  content: l(() => [
46
- e.hotkey ? (n(), i(v, {
45
+ e.hotkey ? (i(), s(v, {
47
46
  key: 0,
48
47
  hotkey: e.hotkey
49
- }, null, 8, ["hotkey"])) : f("", !0)
48
+ }, null, 8, ["hotkey"])) : k("", !0)
50
49
  ]),
51
50
  _: 1
52
51
  }));
package/dist/router.d.ts CHANGED
@@ -5,16 +5,32 @@ export declare enum PathId {
5
5
  Collection = "collection",
6
6
  Schema = "schema",
7
7
  Environment = "environment",
8
- Server = "server"
8
+ Server = "server",
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: PathId;
25
+ path: string;
26
+ component: () => Promise<typeof import("./views/Request/Request.vue.js")>;
27
+ redirect?: undefined;
28
+ } | {
29
+ path: string;
30
+ component: () => Promise<typeof import("./views/Request/Request.vue.js")>;
31
+ redirect?: undefined;
32
+ name?: undefined;
33
+ })[];
18
34
  redirect?: undefined;
19
35
  })[];
20
36
  /**
@@ -31,6 +47,7 @@ export declare const activeRouterParams: import("vue").ComputedRef<{
31
47
  schema: string;
32
48
  cookies: string;
33
49
  server: string;
50
+ workspace: string;
34
51
  }>;
35
52
  /** If we try to navigate to a entity UID that does not exist then we fallback to the default */
36
53
  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,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAuBD,0CAA0C;AAC1C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;IAaI,CAAA;AAwE5B;;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"}
package/dist/router.js CHANGED
@@ -1,80 +1,111 @@
1
- import { computed as m } from "vue";
2
- import { createRouter as c, createWebHistory as l, createMemoryHistory as i } from "vue-router";
3
- var u = /* @__PURE__ */ ((e) => (e.Request = "request", e.Example = "example", e.Cookies = "cookies", e.Collection = "collection", e.Schema = "schema", e.Environment = "environment", e.Server = "server", e))(u || {});
4
- const s = [
5
- { path: "/", redirect: "/request/default" },
1
+ import { computed as p } from "vue";
2
+ import { createRouter as c, createWebHistory as n, createMemoryHistory as i } from "vue-router";
3
+ var s = /* @__PURE__ */ ((e) => (e.Request = "request", e.Example = "example", e.Cookies = "cookies", e.Collection = "collection", e.Schema = "schema", e.Environment = "environment", e.Server = "server", e.Workspace = "workspace", e))(s || {});
4
+ const l = [
6
5
  {
7
- path: "/request",
8
- redirect: "/request/default"
6
+ path: "",
7
+ redirect: (e) => `${e.fullPath.replace(/\/$/, "")}/request/default`
9
8
  },
10
9
  {
11
- path: "/request/:request",
12
- component: () => import("./views/Request/Request.vue.js")
10
+ path: "request",
11
+ redirect: (e) => `${e.fullPath.replace(/\/$/, "")}/default`
13
12
  },
14
13
  {
15
- path: "/request/:request/example/:example",
14
+ name: "request",
15
+ path: "request/:request",
16
16
  component: () => import("./views/Request/Request.vue.js")
17
- }
18
- ], p = [
19
- ...s,
20
- {
21
- path: "/collection",
22
- redirect: "/collection/default"
23
- },
24
- {
25
- name: "collection",
26
- path: "/collection/:collection",
27
- component: () => import("./views/Collection/Collection.vue.js"),
28
- children: [
29
- // Nested collection request
30
- {
31
- path: "request/request",
32
- component: () => import("./views/Request/Request.vue.js")
33
- }
34
- ]
35
17
  },
36
- /** Components will map to each section of the spec components object */
37
18
  {
38
- path: "/components",
39
- redirect: "/components/schemas/default",
40
- children: [
41
- {
42
- path: "schemas/:schema",
43
- component: () => import("./views/Components/Schemas/Schemas.vue.js")
44
- }
45
- ]
46
- },
19
+ path: "request/:request/example/:example",
20
+ component: () => import("./views/Request/Request.vue.js")
21
+ }
22
+ ], m = [
47
23
  {
48
- path: "/environment",
49
- redirect: "/environment/default"
24
+ path: "/",
25
+ redirect: "/workspace/default/request/default"
50
26
  },
51
27
  {
52
- path: "/environment/:environment",
53
- component: () => import("./views/Environment/Environment.vue.js")
28
+ path: "/workspace",
29
+ redirect: "/workspace/default/request/default"
54
30
  },
55
31
  {
56
- path: "/cookies",
57
- redirect: "/cookies/default"
58
- },
32
+ path: "/workspace/:workspace",
33
+ children: l
34
+ }
35
+ ], f = [
59
36
  {
60
- path: "/cookies/:cookies",
61
- component: () => import("./views/Cookies/Cookies.vue.js")
37
+ path: "/",
38
+ redirect: "/workspace/default/request/default"
62
39
  },
63
40
  {
64
- path: "/servers",
65
- redirect: "/servers/default"
41
+ path: "/workspace",
42
+ redirect: "/workspace/default/request/default"
66
43
  },
67
44
  {
68
- path: "/servers/:server",
69
- component: () => import("./views/Servers/Servers.vue.js")
45
+ path: "/workspace/:workspace",
46
+ children: [
47
+ ...l,
48
+ // {
49
+ // path: 'collection',
50
+ // redirect: (to) =>
51
+ // `${to.fullPath.replace(/\/$/, '')}/default`,
52
+ // },
53
+ // {
54
+ // name: PathId.Collection,
55
+ // path: `collection/:${PathId.Collection}`,
56
+ // component: () => import('./views/Collection/Collection.vue'),
57
+ // children: [
58
+ // // Nested collection request
59
+ // {
60
+ // path: `request/${PathId.Request}`,
61
+ // component: () => import('./views/Request/Request.vue.js'),
62
+ // },
63
+ // ],
64
+ // },
65
+ /** Components will map to each section of the spec components object */
66
+ // {
67
+ // path: 'components',
68
+ // redirect: '/components/schemas/default',
69
+ // children: [
70
+ // {
71
+ // path: `schemas/:${PathId.Schema}`,
72
+ // component: () => import('./views/Components/Schemas/Schemas.vue'),
73
+ // },
74
+ // ],
75
+ // },
76
+ {
77
+ path: "environment",
78
+ redirect: (e) => `${e.fullPath.replace(/\/$/, "")}/default`
79
+ },
80
+ {
81
+ path: "environment/:environment",
82
+ component: () => import("./views/Environment/Environment.vue.js")
83
+ },
84
+ {
85
+ path: "cookies",
86
+ redirect: (e) => `${e.fullPath.replace(/\/$/, "")}/default`
87
+ },
88
+ {
89
+ path: "cookies/:cookies",
90
+ component: () => import("./views/Cookies/Cookies.vue.js")
91
+ },
92
+ {
93
+ path: "servers",
94
+ redirect: (e) => `${e.fullPath.replace(/\/$/, "")}/default`
95
+ },
96
+ {
97
+ path: "servers/:server",
98
+ component: () => import("./views/Servers/Servers.vue.js")
99
+ }
100
+ ]
70
101
  }
71
102
  ], t = c({
72
- history: l(),
73
- routes: p
74
- }), n = c({
103
+ history: n(),
104
+ routes: f
105
+ }), u = c({
75
106
  history: i(),
76
- routes: s
77
- }), d = m(() => {
107
+ routes: m
108
+ }), v = p(() => {
78
109
  const e = {
79
110
  collection: "default",
80
111
  environment: "default",
@@ -82,16 +113,17 @@ const s = [
82
113
  example: "default",
83
114
  schema: "default",
84
115
  cookies: "default",
85
- server: "default"
86
- }, o = n.currentRoute.value.matched.length ? n.currentRoute.value : t.currentRoute.value;
87
- return o && Object.values(u).forEach((r) => {
88
- o.params[r] && (e[r] = o.params[r]);
116
+ server: "default",
117
+ workspace: "default"
118
+ }, a = u.currentRoute.value.matched.length ? u.currentRoute.value : t.currentRoute.value;
119
+ return a && Object.values(s).forEach((r) => {
120
+ a.params[r] && (e[r] = a.params[r]);
89
121
  }), e;
90
122
  });
91
- function f(e, o) {
92
- var r, a;
123
+ function $(e, a) {
124
+ var r, o;
93
125
  t.currentRoute.value && // If the item is missing then we know the UID is no longer in use and redirect to the default
94
- !o && ((r = t.currentRoute.value) != null && r.params[e]) && ((a = t.currentRoute.value) == null ? void 0 : a.params[e]) !== "default" && // We only redirect if the key is missing for the matching route
126
+ !a && ((r = t.currentRoute.value) != null && r.params[e]) && ((o = t.currentRoute.value) == null ? void 0 : o.params[e]) !== "default" && // We only redirect if the key is missing for the matching route
95
127
  t.currentRoute.value.path.includes(e) && t.push({
96
128
  params: {
97
129
  ...t.currentRoute.value.params,
@@ -100,10 +132,10 @@ function f(e, o) {
100
132
  });
101
133
  }
102
134
  export {
103
- u as PathId,
104
- d as activeRouterParams,
105
- f as fallbackMissingParams,
106
- n as modalRouter,
107
- s as modalRoutes,
135
+ s as PathId,
136
+ v as activeRouterParams,
137
+ $ as fallbackMissingParams,
138
+ u as modalRouter,
139
+ m as modalRoutes,
108
140
  t as router
109
141
  };