@scalar/api-client 2.22.2 → 2.22.3

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 (28) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/style.css +1 -1
  3. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
  4. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +9 -9
  5. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  6. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  7. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +100 -91
  8. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +2 -0
  9. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
  10. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +2 -2
  11. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +43 -37
  12. package/dist/v2/components/layout/ValueEmitter.vue.d.ts +6 -2
  13. package/dist/v2/components/layout/ValueEmitter.vue.d.ts.map +1 -1
  14. package/dist/v2/components/layout/ValueEmitter.vue.js +10 -10
  15. package/dist/v2/components/server/ServerDropdown.vue.d.ts +2 -0
  16. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  17. package/dist/v2/components/server/ServerDropdown.vue.js +48 -42
  18. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  19. package/dist/v2/features/app/App.vue.js +48 -46
  20. package/dist/v2/features/app/app-state.d.ts +23 -12
  21. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  22. package/dist/v2/features/app/app-state.js +194 -163
  23. package/dist/v2/features/app/helpers/routes.d.ts +1 -1
  24. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  25. package/dist/v2/features/app/helpers/routes.js +7 -7
  26. package/dist/v2/features/operation/Operation.vue.js +1 -1
  27. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  28. package/package.json +10 -10
@@ -1,8 +1,9 @@
1
- import { defineComponent as y, computed as p, createBlock as m, openBlock as t, unref as a, withCtx as o, createVNode as n, createElementBlock as d, Fragment as c, createElementVNode as s, createTextVNode as h, toDisplayString as U, createCommentVNode as w, renderList as C } from "vue";
2
- import { ScalarPopover as B, ScalarButton as z, ScalarFloatingBackdrop as N } from "@scalar/components";
3
- import { ScalarIconPlus as V, ScalarIconPencilSimple as D } from "@scalar/icons";
1
+ import { defineComponent as y, computed as m, createBlock as f, openBlock as o, unref as n, withCtx as u, createVNode as l, createElementBlock as d, Fragment as v, createElementVNode as s, createTextVNode as U, toDisplayString as C, createCommentVNode as w, renderList as h } from "vue";
2
+ import { ScalarPopover as B, ScalarButton as $, ScalarFloatingBackdrop as N } from "@scalar/components";
3
+ import { ScalarIconPlus as V, ScalarIconPencilSimple as z } from "@scalar/icons";
4
+ import D from "../layout/ValueEmitter.vue.js";
4
5
  import I from "./ServerDropdownItem.vue.js";
5
- const P = ["onClick"], $ = { class: "flex items-center justify-center" }, W = /* @__PURE__ */ y({
6
+ const P = ["onClick"], q = { class: "flex items-center justify-center" }, A = /* @__PURE__ */ y({
6
7
  __name: "ServerDropdown",
7
8
  props: {
8
9
  servers: {},
@@ -10,64 +11,69 @@ const P = ["onClick"], $ = { class: "flex items-center justify-center" }, W = /*
10
11
  target: {},
11
12
  layout: {}
12
13
  },
13
- emits: ["update:selectedServer", "update:variable", "update:servers"],
14
- setup(e, { emit: f }) {
15
- const i = f, b = p(
16
- () => e.servers.map((u) => ({
17
- id: u.url,
18
- label: u.url ?? "Unknown server"
14
+ emits: ["update:selectedServer", "update:variable", "update:servers", "update:open"],
15
+ setup(t, { emit: x }) {
16
+ const a = x, S = m(
17
+ () => t.servers.map((i) => ({
18
+ id: i.url,
19
+ label: i.url ?? "Unknown server"
19
20
  }))
20
- ), x = p(() => e.server?.url?.endsWith("/") ? e.server.url.slice(0, -1) : e.server?.url || "");
21
- return (u, r) => (t(), m(a(B), {
21
+ ), b = m(() => t.server?.url?.endsWith("/") ? t.server.url.slice(0, -1) : t.server?.url || "");
22
+ return (i, e) => (o(), f(n(B), {
22
23
  class: "max-h-[inherit] p-0 text-base",
23
24
  focus: "",
24
25
  offset: 0,
25
- placement: "bottom-start",
26
+ placement: "bottom",
26
27
  resize: "",
27
- target: e.target,
28
- teleport: `#${e.target}`
28
+ target: t.target,
29
+ teleport: `#${t.target}`
29
30
  }, {
30
- popover: o(({ close: S }) => [
31
+ popover: u(({ close: p }) => [
31
32
  s("div", {
32
- class: "custom-scroll flex max-h-[inherit] flex-col gap-1 border-t p-1",
33
- onClick: S
33
+ class: "custom-scroll flex max-h-[inherit] flex-col gap-1 p-1",
34
+ onClick: p
34
35
  }, [
35
- (t(!0), d(c, null, C(b.value, (l, g) => (t(), m(I, {
36
- key: l.id,
37
- server: e.server,
38
- serverOption: l,
36
+ (o(!0), d(v, null, h(S.value, (r, g) => (o(), f(I, {
37
+ key: r.id,
38
+ server: t.server,
39
+ serverOption: r,
39
40
  type: "request",
40
- "onUpdate:selectedServer": (v) => i("update:selectedServer", { url: l.id }),
41
- "onUpdate:variable": (v, k) => i("update:variable", { index: g, key: v, value: k })
41
+ "onUpdate:selectedServer": (c) => a("update:selectedServer", { url: r.id }),
42
+ "onUpdate:variable": (c, k) => a("update:variable", { index: g, key: c, value: k })
42
43
  }, null, 8, ["server", "serverOption", "onUpdate:selectedServer", "onUpdate:variable"]))), 128)),
43
- e.layout !== "modal" ? (t(), d("button", {
44
+ t.layout !== "modal" ? (o(), d("button", {
44
45
  key: 0,
45
46
  class: "text-xxs hover:bg-b-2 flex cursor-pointer items-center gap-1.5 rounded p-1.75",
46
47
  type: "button",
47
- onClick: r[0] || (r[0] = (l) => i("update:servers"))
48
+ onClick: e[0] || (e[0] = (r) => a("update:servers"))
48
49
  }, [
49
- s("div", $, [
50
- n(a(D), { class: "size-4" })
50
+ s("div", q, [
51
+ l(n(z), { class: "size-4" })
51
52
  ]),
52
- r[3] || (r[3] = s("span", null, "Update Servers", -1))
53
+ e[5] || (e[5] = s("span", null, "Update Servers", -1))
53
54
  ])) : w("", !0)
54
55
  ], 8, P)
55
56
  ]),
56
- backdrop: o(() => [
57
- n(a(N), { class: "-top-(--scalar-address-bar-height) rounded-lg" })
57
+ backdrop: u(({ open: p }) => [
58
+ l(D, {
59
+ value: p,
60
+ onChange: e[1] || (e[1] = (r) => a("update:open", r)),
61
+ onUnmount: e[2] || (e[2] = (r) => a("update:open", !1))
62
+ }, null, 8, ["value"]),
63
+ l(n(N), { class: "inset-x-px rounded-none rounded-b-lg" })
58
64
  ]),
59
- default: o(() => [
60
- n(a(z), {
61
- class: "z-context-plus hover:bg-b-2 font-code text-c-2 ml-0.75 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap",
65
+ default: u(() => [
66
+ l(n($), {
67
+ class: "hover:bg-b-2 font-code text-c-2 ml-0.75 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap",
62
68
  variant: "ghost"
63
69
  }, {
64
- default: o(() => [
65
- e.server ? (t(), d(c, { key: 0 }, [
66
- r[1] || (r[1] = s("span", { class: "sr-only" }, "Server:", -1)),
67
- h(" " + U(x.value), 1)
68
- ], 64)) : (t(), d(c, { key: 1 }, [
69
- r[2] || (r[2] = s("span", { class: "sr-only" }, "Add Server", -1)),
70
- n(a(V), { class: "size-3" })
70
+ default: u(() => [
71
+ t.server ? (o(), d(v, { key: 0 }, [
72
+ e[3] || (e[3] = s("span", { class: "sr-only" }, "Server:", -1)),
73
+ U(" " + C(b.value), 1)
74
+ ], 64)) : (o(), d(v, { key: 1 }, [
75
+ e[4] || (e[4] = s("span", { class: "sr-only" }, "Add Server", -1)),
76
+ l(n(V), { class: "size-3" })
71
77
  ], 64))
72
78
  ]),
73
79
  _: 1
@@ -78,5 +84,5 @@ const P = ["onClick"], $ = { class: "flex items-center justify-center" }, W = /*
78
84
  }
79
85
  });
80
86
  export {
81
- W as default
87
+ A as default
82
88
  };
@@ -1 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AAmOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAA;AAC7F,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAM3C;;;;GAIG;;YAGO,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;iBACX,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;;;YAHzC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;iBACX,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;IAUjD;;;OAGG;4BACqB,EAAE;;AAnB5B,wBAiVC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AAwOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAA;AAC7F,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAM3C;;;;GAIG;;YAGO,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;iBACX,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;;;YAHzC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;iBACX,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;IAUjD;;;OAGG;4BACqB,EAAE;;AAnB5B,wBAsVC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,19 +1,19 @@
1
- import { defineComponent as f, computed as u, createElementBlock as b, createBlock as c, unref as t, openBlock as l, Fragment as h, createElementVNode as p, createVNode as s, withCtx as m, renderSlot as W, normalizeProps as y, guardReactiveProps as T } from "vue";
1
+ import { defineComponent as S, computed as m, createElementBlock as b, createBlock as l, unref as t, openBlock as c, Fragment as W, createElementVNode as p, createVNode as n, withCtx as d, renderSlot as T, normalizeProps as h, guardReactiveProps as y } from "vue";
2
2
  import { useModal as g, ScalarTeleportRoot as C } from "@scalar/components";
3
3
  import { getThemeStyles as B } from "@scalar/themes";
4
4
  import { ScalarToasts as x } from "@scalar/use-toasts";
5
5
  import { extensions as E } from "@scalar/workspace-store/schemas/extensions";
6
6
  import { RouterView as O } from "vue-router";
7
- import I from "./components/CreateWorkspaceModal.vue.js";
8
- import A from "./components/SplashScreen.vue.js";
9
- import { useDocumentWatcher as M } from "./hooks/use-document-watcher.js";
10
- import U from "../command-palette/TheCommandPalette.vue.js";
7
+ import A from "./components/CreateWorkspaceModal.vue.js";
8
+ import M from "./components/SplashScreen.vue.js";
9
+ import { useDocumentWatcher as U } from "./hooks/use-document-watcher.js";
10
+ import I from "../command-palette/TheCommandPalette.vue.js";
11
11
  import { useColorMode as _ } from "../../hooks/use-color-mode.js";
12
12
  import { useGlobalHotKeys as D } from "../../hooks/use-global-hot-keys.js";
13
- import N from "./components/AppSidebar.vue.js";
14
- import $ from "./components/DesktopTabs.vue.js";
15
- import L from "./components/WebTopNav.vue.js";
16
- const P = ["innerHTML"], F = { class: "flex min-h-0 flex-1" }, H = { class: "bg-b-1 flex-1" }, V = {}, re = /* @__PURE__ */ f({
13
+ import L from "./components/AppSidebar.vue.js";
14
+ import N from "./components/DesktopTabs.vue.js";
15
+ import $ from "./components/WebTopNav.vue.js";
16
+ const P = ["innerHTML"], F = { class: "flex min-h-0 flex-1" }, H = { class: "bg-b-1 flex-1" }, V = {}, re = /* @__PURE__ */ S({
17
17
  ...V,
18
18
  __name: "App",
19
19
  props: {
@@ -22,27 +22,29 @@ const P = ["innerHTML"], F = { class: "flex min-h-0 flex-1" }, H = { class: "bg-
22
22
  getAppState: { type: Function },
23
23
  getCommandPaletteState: { type: Function }
24
24
  },
25
- setup(o, { expose: d }) {
26
- d({
27
- openCreateWorkspace: () => n.show()
25
+ setup(o, { expose: v }) {
26
+ v({
27
+ openCreateWorkspace: () => i.show()
28
28
  });
29
- const e = o.getAppState(), v = o.getCommandPaletteState();
30
- typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), _({ workspaceStore: e.store }), D(e.eventBus, o.layout), M({
29
+ const e = o.getAppState(), k = o.getCommandPaletteState();
30
+ typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), _({ workspaceStore: e.store }), D(e.eventBus, o.layout), U({
31
31
  documentName: () => e.store.value?.workspace[E.workspace.activeDocument],
32
32
  store: e.store,
33
33
  initialTimeout: 5e3
34
34
  });
35
- const k = u(() => {
35
+ const w = m(() => {
36
36
  if (e.store.value === null)
37
37
  return "";
38
- const i = e.store.value.workspace["x-scalar-theme"];
39
- return i ? `<style>${B(i)}</style>` : "";
40
- }), w = () => e.router.value?.push({
41
- name: "workspace.environment",
42
- params: {
43
- workspaceSlug: e.activeEntities.workspaceSlug.value
44
- }
45
- }), n = g(), S = u(() => ({
38
+ const s = e.store.value.workspace["x-scalar-theme"];
39
+ return s ? `<style>${B(s)}</style>` : "";
40
+ }), u = (s) => {
41
+ if (!s)
42
+ return;
43
+ const a = e.workspace.workspaceList.value?.find(
44
+ (r) => r.id === s
45
+ );
46
+ a && e.workspace.navigateToWorkspace(a.namespace, a.slug);
47
+ }, i = g(), f = m(() => ({
46
48
  documentSlug: e.activeEntities.documentSlug.value ?? "",
47
49
  document: e.store.value?.workspace.activeDocument ?? null,
48
50
  environment: e.environment.value,
@@ -56,25 +58,25 @@ const P = ["innerHTML"], F = { class: "flex min-h-0 flex-1" }, H = { class: "bg-
56
58
  plugins: o.plugins,
57
59
  securitySchemes: e.document.value?.components?.securitySchemes ?? {}
58
60
  }));
59
- return (i, a) => t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (l(), b(h, { key: 0 }, [
60
- p("div", { innerHTML: k.value }, null, 8, P),
61
- s(t(C), null, {
62
- default: m(() => [
63
- s(t(x)),
64
- o.layout === "desktop" ? (l(), c($, {
61
+ return (s, a) => t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (c(), b(W, { key: 0 }, [
62
+ p("div", { innerHTML: w.value }, null, 8, P),
63
+ n(t(C), null, {
64
+ default: d(() => [
65
+ n(t(x)),
66
+ o.layout === "desktop" ? (c(), l(N, {
65
67
  key: 0,
66
68
  activeTabIndex: t(e).tabs.activeTabIndex.value,
67
69
  eventBus: t(e).eventBus,
68
70
  tabs: t(e).tabs.state.value
69
- }, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : (l(), c(L, {
71
+ }, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : (c(), l($, {
70
72
  key: 1,
71
73
  activeWorkspace: t(e).workspace.activeWorkspace.value,
72
74
  workspaces: t(e).workspace.workspaceList.value,
73
- "onCreate:workspace": a[0] || (a[0] = (r) => t(n).show()),
74
- "onSelect:workspace": t(e).workspace.setId
75
- }, null, 8, ["activeWorkspace", "workspaces", "onSelect:workspace"])),
75
+ "onCreate:workspace": a[0] || (a[0] = (r) => t(i).show()),
76
+ "onSelect:workspace": u
77
+ }, null, 8, ["activeWorkspace", "workspaces"])),
76
78
  p("main", F, [
77
- s(N, {
79
+ n(L, {
78
80
  isSidebarOpen: t(e).sidebar.isOpen.value,
79
81
  "onUpdate:isSidebarOpen": a[1] || (a[1] = (r) => t(e).sidebar.isOpen.value = r),
80
82
  activeWorkspace: t(e).workspace.activeWorkspace.value,
@@ -85,34 +87,34 @@ const P = ["innerHTML"], F = { class: "flex min-h-0 flex-1" }, H = { class: "bg-
85
87
  sidebarWidth: t(e).sidebar.width.value,
86
88
  store: t(e).store.value,
87
89
  workspaces: t(e).workspace.workspaceList.value,
88
- "onClick:workspace": w,
89
- "onCreate:workspace": a[2] || (a[2] = (r) => t(n).show()),
90
- "onSelect:workspace": t(e).workspace.setId,
90
+ "onClick:workspace": t(e).workspace.navigateToWorkspace,
91
+ "onCreate:workspace": a[2] || (a[2] = (r) => t(i).show()),
92
+ "onSelect:workspace": u,
91
93
  onSelectItem: t(e).sidebar.handleSelectItem,
92
94
  "onUpdate:sidebarWidth": t(e).sidebar.handleSidebarWidthUpdate
93
95
  }, {
94
- sidebarMenuActions: m(() => [
95
- W(i.$slots, "sidebar-menu-actions")
96
+ sidebarMenuActions: d(() => [
97
+ T(s.$slots, "sidebar-menu-actions")
96
98
  ]),
97
99
  _: 3
98
- }, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onSelect:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
99
- s(I, {
100
- state: t(n),
100
+ }, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onClick:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
101
+ n(A, {
102
+ state: t(i),
101
103
  "onCreate:workspace": a[3] || (a[3] = (r) => t(e).workspace.create(r))
102
104
  }, null, 8, ["state"]),
103
- s(U, {
105
+ n(I, {
104
106
  eventBus: t(e).eventBus,
105
- paletteState: t(v),
107
+ paletteState: t(k),
106
108
  workspaceStore: t(e).store.value
107
109
  }, null, 8, ["eventBus", "paletteState", "workspaceStore"]),
108
110
  p("div", H, [
109
- s(t(O), y(T(S.value)), null, 16)
111
+ n(t(O), h(y(f.value)), null, 16)
110
112
  ])
111
113
  ])
112
114
  ]),
113
115
  _: 3
114
116
  })
115
- ], 64)) : (l(), c(A, { key: 1 }));
117
+ ], 64)) : (c(), l(M, { key: 1 }));
116
118
  }
117
119
  });
118
120
  export {
@@ -8,18 +8,22 @@ import type { Tab } from '@scalar/workspace-store/schemas/extensions/workspace/x
8
8
  import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
9
9
  import { type ComputedRef, type Ref, type ShallowRef } from 'vue';
10
10
  import type { RouteLocationNormalizedGeneric, Router } from 'vue-router';
11
+ type WorkspaceOption = ScalarListboxOption & {
12
+ teamUid: string;
13
+ namespace: string;
14
+ slug: string;
15
+ };
11
16
  /**
12
- * Updates the route to reflect the currently selected workspace.
13
- * Navigates to the workspace's main environment view, with an option to control
14
- * whether the previous route path should be loaded via a query parameter.
17
+ * Navigates to the overview page of the specified workspace.
18
+ * Updates the route based on the given namespace and slug.
15
19
  *
16
- * @param id - The workspace slug (unique identifier) to navigate to.
17
- * @param loadFromSession - If true, includes "loadFromSession=true" in the query to indicate state/session should be restored.
20
+ * @param namespace - The workspace namespace.
21
+ * @param slug - The unique workspace slug (identifier).
18
22
  */
19
- declare const setWorkspaceId: (id?: string) => Promise<void>;
23
+ declare const navigateToWorkspace: (namespace?: string, slug?: string) => Promise<void>;
20
24
  /**
21
25
  * Creates a new workspace with the provided name.
22
- * - Generates a unique ID for the workspace (sluggified from the name and guaranteed unique).
26
+ * - Generates a unique slug for the workspace (sluggified from the name and guaranteed unique).
23
27
  * - Adds a default blank document ("drafts") to the workspace.
24
28
  * - Persists the workspace and navigates to it.
25
29
  *
@@ -27,12 +31,18 @@ declare const setWorkspaceId: (id?: string) => Promise<void>;
27
31
  * await createWorkspace({ name: 'My Awesome API' })
28
32
  * // -> Navigates to /workspace/my-awesome-api (if available)
29
33
  */
30
- declare const createWorkspace: ({ id, name, }: {
31
- id?: string;
34
+ declare const createWorkspace: ({ key, name, }: {
35
+ key?: {
36
+ teamUid?: string;
37
+ namespace?: string;
38
+ slug: string;
39
+ };
32
40
  name: string;
33
41
  }) => Promise<{
34
- id: string;
42
+ slug: string;
35
43
  name: string;
44
+ namespace: string;
45
+ teamUid: string;
36
46
  } | undefined>;
37
47
  declare const sidebarState: {
38
48
  items: ComputedRef<TraversedEntry[]>;
@@ -110,9 +120,9 @@ export type AppState = {
110
120
  };
111
121
  workspace: {
112
122
  create: typeof createWorkspace;
113
- workspaceList: Ref<ScalarListboxOption[]>;
123
+ workspaceList: Ref<WorkspaceOption[]>;
114
124
  activeWorkspace: ShallowRef<ScalarListboxOption | null>;
115
- setId: typeof setWorkspaceId;
125
+ navigateToWorkspace: typeof navigateToWorkspace;
116
126
  isOpen: ComputedRef<boolean>;
117
127
  };
118
128
  eventBus: WorkspaceEventBus;
@@ -120,6 +130,7 @@ export type AppState = {
120
130
  currentRoute: Ref<RouteLocationNormalizedGeneric | null>;
121
131
  loading: Ref<boolean>;
122
132
  activeEntities: {
133
+ namespace: Ref<string | undefined>;
123
134
  workspaceSlug: Ref<string | undefined>;
124
135
  documentSlug: Ref<string | undefined>;
125
136
  path: Ref<string | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"app-state.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/app-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAG7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGnE,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,gCAAgC,CAAA;AAC1F,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAA;AAKvC,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEnF,OAAO,KAAK,EAAE,kBAAkB,EA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