@scalar/api-client 2.25.0 → 2.26.0

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 (68) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  3. package/dist/components/DataTable/DataTableCheckbox.vue.js +8 -8
  4. package/dist/style.css +1 -1
  5. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  6. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +28 -19
  7. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  8. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  9. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +1 -1
  10. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  11. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +18 -18
  12. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  13. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -1
  14. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +2 -2
  15. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue2.js +19 -19
  16. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  17. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +26 -26
  18. package/dist/v2/components/callout/Callout.vue.d.ts +17 -0
  19. package/dist/v2/components/callout/Callout.vue.d.ts.map +1 -0
  20. package/dist/v2/components/callout/Callout.vue.js +7 -0
  21. package/dist/v2/components/callout/Callout.vue2.js +43 -0
  22. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -1
  23. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +8 -8
  24. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  25. package/dist/v2/components/sidebar/Sidebar.vue.js +40 -41
  26. package/dist/v2/features/app/App.vue.d.ts +2 -2
  27. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  28. package/dist/v2/features/app/App.vue.js +84 -89
  29. package/dist/v2/features/app/app-events.d.ts +1 -1
  30. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  31. package/dist/v2/features/app/app-events.js +10 -10
  32. package/dist/v2/features/app/app-state.d.ts +36 -87
  33. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  34. package/dist/v2/features/app/app-state.js +339 -330
  35. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  36. package/dist/v2/features/app/components/DesktopTabs.vue.js +1 -1
  37. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
  38. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  39. package/dist/v2/features/app/helpers/create-api-client-app.js +9 -9
  40. package/dist/v2/features/app/helpers/get-route-param.d.ts +7 -0
  41. package/dist/v2/features/app/helpers/get-route-param.d.ts.map +1 -0
  42. package/dist/v2/features/app/helpers/get-route-param.js +9 -0
  43. package/dist/v2/features/app/index.d.ts +1 -1
  44. package/dist/v2/features/app/index.d.ts.map +1 -1
  45. package/dist/v2/features/app/index.js +12 -12
  46. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  47. package/dist/v2/features/collection/DocumentCollection.vue.js +72 -65
  48. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +29 -2
  49. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
  50. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +110 -106
  51. package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts +5 -1
  52. package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts.map +1 -1
  53. package/dist/v2/features/command-palette/helpers/load-document-from-source.js +41 -23
  54. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +41 -8
  55. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  56. package/dist/v2/features/command-palette/index.d.ts +1 -2
  57. package/dist/v2/features/command-palette/index.d.ts.map +1 -1
  58. package/dist/v2/features/command-palette/index.js +4 -6
  59. package/dist/v2/features/operation/Operation.vue.js +1 -1
  60. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  61. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
  62. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +24 -23
  63. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  64. package/package.json +9 -9
  65. package/dist/v2/features/app/components/WebTopNav.vue.d.ts +0 -41
  66. package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +0 -1
  67. package/dist/v2/features/app/components/WebTopNav.vue.js +0 -27
  68. package/dist/v2/features/app/components/WebTopNav.vue2.js +0 -4
@@ -1,13 +1,13 @@
1
- import { defineComponent as h, mergeModels as y, useSlots as D, ref as V, useModel as B, computed as M, createBlock as d, openBlock as l, unref as r, withCtx as s, createVNode as C, createSlots as E, renderSlot as i, createElementBlock as v, createCommentVNode as n, Fragment as R, normalizeProps as f, guardReactiveProps as b, createElementVNode as w, isRef as z } from "vue";
1
+ import { defineComponent as D, mergeModels as v, useSlots as V, ref as B, useModel as M, computed as C, createBlock as u, openBlock as l, unref as r, withCtx as s, createVNode as y, createSlots as E, renderSlot as i, createElementBlock as w, createCommentVNode as m, Fragment as R, normalizeProps as f, guardReactiveProps as p, createElementVNode as g, isRef as z } from "vue";
2
2
  import { ScalarIconButton as F, ScalarSidebarSearchInput as N } from "@scalar/components";
3
3
  import { ScalarIconFileDashed as q, ScalarIconMagnifyingGlass as A } from "@scalar/icons";
4
4
  import { ScalarSidebar as U } from "@scalar/sidebar";
5
5
  import j from "./SidebarMenu.vue.js";
6
6
  import { useSearchIndex as G } from "../../features/search/hooks/use-search-index.js";
7
7
  import H from "../resize/Resize.vue.js";
8
- const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K = { class: "flex items-center justify-between" }, L = { key: 1 }, _ = /* @__PURE__ */ h({
8
+ const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K = { class: "flex items-center justify-between" }, L = { key: 1 }, _ = /* @__PURE__ */ D({
9
9
  __name: "Sidebar",
10
- props: /* @__PURE__ */ y({
10
+ props: /* @__PURE__ */ v({
11
11
  sidebarState: {},
12
12
  layout: {},
13
13
  activeWorkspace: {},
@@ -21,67 +21,66 @@ const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K =
21
21
  },
22
22
  sidebarWidthModifiers: {}
23
23
  }),
24
- emits: /* @__PURE__ */ y(["selectItem", "select:workspace", "create:workspace", "reorder"], ["update:sidebarWidth"]),
25
- setup(t, { emit: g }) {
26
- const c = g, p = D(), u = V(!1), k = B(t, "sidebarWidth"), S = (o) => o.type === "example" && o.title === "draft", { query: m, results: x } = G(() => t.documents), I = M(() => x.value ?? t.sidebarState.items.value), W = (o) => {
27
- c("selectItem", o), m.value = "", u.value = !1;
24
+ emits: /* @__PURE__ */ v(["selectItem", "select:workspace", "create:workspace", "reorder"], ["update:sidebarWidth"]),
25
+ setup(a, { emit: x }) {
26
+ const d = x, b = V(), n = B(!1), k = M(a, "sidebarWidth"), S = (o) => o.type === "example" && o.title === "draft", { query: c, results: I } = G(() => a.documents), W = C(() => I.value ?? a.sidebarState.items.value), $ = (o) => {
27
+ d("selectItem", o), c.value = "", n.value = !1;
28
28
  };
29
- return (o, a) => (l(), d(r(H), {
29
+ return (o, t) => (l(), u(r(H), {
30
30
  width: k.value,
31
- "onUpdate:width": a[5] || (a[5] = (e) => k.value = e),
31
+ "onUpdate:width": t[5] || (t[5] = (e) => k.value = e),
32
32
  class: "flex flex-col"
33
33
  }, {
34
34
  default: s(() => [
35
- C(r(U), {
35
+ y(r(U), {
36
36
  class: "flex w-auto flex-1 pt-2",
37
37
  indent: 15,
38
- isDraggable: t.layout !== "modal",
39
- isDroppable: t.isDroppable,
40
- isExpanded: t.sidebarState.isExpanded,
41
- isSelected: t.sidebarState.isSelected,
42
- items: I.value,
38
+ isDraggable: a.layout !== "modal",
39
+ isDroppable: a.isDroppable,
40
+ isExpanded: a.sidebarState.isExpanded,
41
+ isSelected: a.sidebarState.isSelected,
42
+ items: W.value,
43
43
  layout: "client",
44
- onReorder: a[4] || (a[4] = (e, $) => c("reorder", e, $)),
45
- onSelectItem: W
44
+ onReorder: t[4] || (t[4] = (e, h) => d("reorder", e, h)),
45
+ onSelectItem: $
46
46
  }, E({
47
47
  header: s(() => [
48
- w("div", J, [
49
- w("div", K, [
50
- t.layout === "desktop" ? (l(), d(j, {
48
+ g("div", J, [
49
+ g("div", K, [
50
+ a.layout !== "modal" ? (l(), u(j, {
51
51
  key: 0,
52
- activeWorkspace: t.activeWorkspace,
53
- workspaces: t.workspaces,
54
- "onCreate:workspace": a[0] || (a[0] = (e) => c("create:workspace")),
55
- "onSelect:workspace": a[1] || (a[1] = (e) => c("select:workspace", e))
52
+ activeWorkspace: a.activeWorkspace,
53
+ workspaces: a.workspaces,
54
+ "onCreate:workspace": t[0] || (t[0] = (e) => d("create:workspace")),
55
+ "onSelect:workspace": t[1] || (t[1] = (e) => d("select:workspace", e))
56
56
  }, {
57
57
  sidebarMenuActions: s(() => [
58
58
  i(o.$slots, "sidebarMenuActions")
59
59
  ]),
60
60
  _: 3
61
- }, 8, ["activeWorkspace", "workspaces"])) : t.layout === "modal" ? (l(), v("div", L)) : n("", !0),
62
- t.layout !== "web" ? (l(), d(r(F), {
63
- key: 2,
61
+ }, 8, ["activeWorkspace", "workspaces"])) : a.layout === "modal" ? (l(), w("div", L)) : m("", !0),
62
+ y(r(F), {
64
63
  icon: r(A),
65
64
  label: "Search",
66
- onClick: a[2] || (a[2] = (e) => u.value = !u.value)
67
- }, null, 8, ["icon"])) : n("", !0)
65
+ onClick: t[2] || (t[2] = (e) => n.value = !n.value)
66
+ }, null, 8, ["icon"])
68
67
  ]),
69
- u.value || t.layout === "web" ? (l(), d(r(N), {
68
+ n.value ? (l(), u(r(N), {
70
69
  key: 0,
71
- modelValue: r(m),
72
- "onUpdate:modelValue": a[3] || (a[3] = (e) => z(m) ? m.value = e : null),
73
- autofocus: t.layout !== "web"
74
- }, null, 8, ["modelValue", "autofocus"])) : n("", !0)
70
+ modelValue: r(c),
71
+ "onUpdate:modelValue": t[3] || (t[3] = (e) => z(c) ? c.value = e : null),
72
+ autofocus: ""
73
+ }, null, 8, ["modelValue"])) : m("", !0)
75
74
  ])
76
75
  ]),
77
76
  decorator: s((e) => [
78
- i(o.$slots, "decorator", f(b(e)))
77
+ i(o.$slots, "decorator", f(p(e)))
79
78
  ]),
80
79
  icon: s((e) => [
81
- p.icon || S(e.item) ? (l(), v(R, { key: 0 }, [
82
- S(e.item) ? (l(), d(r(q), { key: 0 })) : n("", !0),
83
- i(o.$slots, "icon", f(b(e)))
84
- ], 64)) : n("", !0)
80
+ b.icon || S(e.item) ? (l(), w(R, { key: 0 }, [
81
+ S(e.item) ? (l(), u(r(q), { key: 0 })) : m("", !0),
82
+ i(o.$slots, "icon", f(p(e)))
83
+ ], 64)) : m("", !0)
85
84
  ]),
86
85
  before: s(() => [
87
86
  i(o.$slots, "workspaceButton")
@@ -91,10 +90,10 @@ const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K =
91
90
  ]),
92
91
  _: 2
93
92
  }, [
94
- p.empty ? {
93
+ b.empty ? {
95
94
  name: "empty",
96
95
  fn: s((e) => [
97
- i(o.$slots, "empty", f(b(e)))
96
+ i(o.$slots, "empty", f(p(e)))
98
97
  ]),
99
98
  key: "0"
100
99
  } : void 0
@@ -1,7 +1,7 @@
1
1
  import { type ModalState } from '@scalar/components';
2
+ import type { CommandPaletteState } from '../../../v2/features/command-palette/hooks/use-command-palette-state.js';
2
3
  import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
3
4
  import type { ClientLayout } from '../../../v2/types/layout';
4
- import type { CommandPaletteState } from '../command-palette/hooks/use-command-palette-state.js';
5
5
  import { type AppState } from './app-state.js';
6
6
  /**
7
7
  * Main entry point for the API client for electron and web.
@@ -25,7 +25,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
25
25
  * Slot for customizing the actions section of the sidebar menu.
26
26
  * This slot is used to render custom actions or components within the actions section.
27
27
  */
28
- 'sidebar-menu-actions': [];
28
+ 'sidebar-menu-actions': () => unknown;
29
29
  /**
30
30
  * Slot for customizing the create workspace modal.
31
31
  * This slot is used to render custom actions or components within the create workspace modal.
@@ -1 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AAmQA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAc3B,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;IAC1B;;;OAGG;yBACkB,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,UAAU,CAAA;KAAE,KAAK,OAAO;;AAxBlE,wBA4XC;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":"AAoPA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAY3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAA;AAExG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,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,MAAM,OAAO;IACrC;;;OAGG;yBACkB,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,UAAU,CAAA;KAAE,KAAK,OAAO;;AAxBlE,wBA6WC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,25 +1,24 @@
1
- import { defineComponent as h, computed as c, createBlock as u, openBlock as l, unref as t, withCtx as v, createElementVNode as p, createVNode as n, createElementBlock as k, renderSlot as w, normalizeProps as y, guardReactiveProps as T } from "vue";
2
- import { useModal as g, ScalarTeleportRoot as B } from "@scalar/components";
3
- import { getThemeStyles as C } from "@scalar/themes";
4
- import { ScalarToasts as x } from "@scalar/use-toasts";
5
- import { extensions as E } from "@scalar/workspace-store/schemas/extensions";
6
- import { RouterView as O } from "vue-router";
7
- import _ from "./components/CreateWorkspaceModal.vue.js";
8
- import A from "./components/SplashScreen.vue.js";
9
- import { groupWorkspacesByTeam as U } from "./helpers/group-workspaces.js";
1
+ import { defineComponent as y, computed as p, createBlock as d, openBlock as i, unref as t, withCtx as m, createElementVNode as l, createVNode as r, createElementBlock as u, renderSlot as v, createCommentVNode as k, normalizeProps as T, guardReactiveProps as W } from "vue";
2
+ import { useModal as x, ScalarTeleportRoot as g } from "@scalar/components";
3
+ import { getThemeStyles as B } from "@scalar/themes";
4
+ import { ScalarToasts as C } from "@scalar/use-toasts";
5
+ import { extensions as _ } from "@scalar/workspace-store/schemas/extensions";
6
+ import { RouterView as E } from "vue-router";
7
+ import A from "./components/CreateWorkspaceModal.vue.js";
8
+ import O from "./components/SplashScreen.vue.js";
10
9
  import { useDocumentWatcher as M } from "./hooks/use-document-watcher.js";
11
- import I from "../command-palette/TheCommandPalette.vue.js";
10
+ import U from "../command-palette/TheCommandPalette.vue.js";
12
11
  import { useColorMode as D } from "../../hooks/use-color-mode.js";
13
- import { useGlobalHotKeys as $ } from "../../hooks/use-global-hot-keys.js";
12
+ import { useGlobalHotKeys as I } from "../../hooks/use-global-hot-keys.js";
14
13
  import N from "./components/AppSidebar.vue.js";
15
- import L from "./components/DesktopTabs.vue.js";
16
- import P from "./components/WebTopNav.vue.js";
14
+ import P from "./components/DesktopTabs.vue.js";
15
+ import $ from "./components/DownloadAppButton.vue.js";
17
16
  import { mergeSecurity as H } from "../../blocks/scalar-auth-selector-block/helpers/merge-security.js";
18
- const F = ["innerHTML"], V = {
17
+ const L = ["innerHTML"], V = { key: 0 }, F = { class: "flex h-dvh w-dvw flex-1 flex-col" }, R = { class: "flex min-h-0 flex-1 flex-row" }, G = { class: "flex flex-1 flex-col" }, j = {
19
18
  key: 0,
20
- class: "flex flex-1 flex-col"
21
- }, R = { class: "flex min-h-0 flex-1" }, z = { class: "bg-b-1 flex-1" }, G = { key: 1 }, K = {}, pe = /* @__PURE__ */ h({
22
- ...K,
19
+ class: "flex h-12 items-center justify-end border-b p-2"
20
+ }, z = { class: "bg-b-1 min-h-0 flex-1" }, K = { key: 1 }, q = {}, de = /* @__PURE__ */ y({
21
+ ...q,
23
22
  __name: "App",
24
23
  props: {
25
24
  layout: {},
@@ -29,28 +28,28 @@ const F = ["innerHTML"], V = {
29
28
  },
30
29
  setup(s, { expose: f }) {
31
30
  f({
32
- openCreateWorkspace: () => i.show()
31
+ openCreateWorkspace: () => c.show()
33
32
  });
34
- const e = s.getAppState(), S = s.getCommandPaletteState();
35
- typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), D({ workspaceStore: e.store }), $(e.eventBus, s.layout), M({
36
- documentName: () => e.store.value?.workspace[E.workspace.activeDocument],
33
+ const e = s.getAppState(), w = s.getCommandPaletteState();
34
+ typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), I(e.eventBus, s.layout), M({
35
+ documentName: () => e.store.value?.workspace[_.workspace.activeDocument],
37
36
  store: e.store,
38
37
  initialTimeout: 5e3
39
- });
40
- const b = c(() => {
38
+ }), D({ workspaceStore: e.store });
39
+ const S = p(() => {
41
40
  if (e.store.value === null)
42
41
  return "";
43
- const o = e.store.value.workspace["x-scalar-theme"];
44
- return o ? `<style>${C(o)}</style>` : "";
45
- }), m = (o) => {
46
- if (!o)
42
+ const a = e.store.value.workspace["x-scalar-theme"];
43
+ return a ? `<style>${B(a)}</style>` : "";
44
+ }), h = (a) => {
45
+ if (!a)
47
46
  return;
48
- const a = e.workspace.workspaceList.value?.find(
49
- (r) => r.id === o
47
+ const o = e.workspace.workspaceList.value?.find(
48
+ (n) => n.id === a
50
49
  );
51
- a && e.workspace.navigateToWorkspace(a.namespace, a.slug);
52
- }, i = g(), W = c(() => {
53
- const o = e.store.value?.auth ? H(
50
+ o && e.workspace.navigateToWorkspace(o.namespace, o.slug);
51
+ }, c = x(), b = p(() => {
52
+ const a = e.store.value?.auth ? H(
54
53
  e.document.value?.components?.securitySchemes ?? {},
55
54
  {},
56
55
  e.store.value.auth,
@@ -68,71 +67,67 @@ const F = ["innerHTML"], V = {
68
67
  workspaceStore: e.store.value,
69
68
  activeWorkspace: e.workspace.activeWorkspace.value,
70
69
  plugins: s.plugins,
71
- securitySchemes: o
70
+ securitySchemes: a
72
71
  };
73
- }), d = c(
74
- () => U(
75
- e.workspace.filteredWorkspaceList.value,
76
- e.activeEntities.teamUid.value
77
- )
78
- );
79
- return (o, a) => (l(), u(t(B), null, {
80
- default: v(() => [
81
- p("div", { innerHTML: b.value }, null, 8, F),
82
- n(t(x)),
83
- t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (l(), k("main", V, [
84
- s.layout === "desktop" ? (l(), u(L, {
85
- key: 0,
86
- activeTabIndex: t(e).tabs.activeTabIndex.value,
87
- eventBus: t(e).eventBus,
88
- tabs: t(e).tabs.state.value
89
- }, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : (l(), u(P, {
90
- key: 1,
91
- activeWorkspace: t(e).workspace.activeWorkspace.value,
92
- workspaces: d.value,
93
- "onCreate:workspace": a[0] || (a[0] = (r) => t(i).show()),
94
- "onSelect:workspace": m
95
- }, null, 8, ["activeWorkspace", "workspaces"])),
96
- p("div", R, [
97
- n(N, {
98
- isSidebarOpen: t(e).sidebar.isOpen.value,
99
- "onUpdate:isSidebarOpen": a[1] || (a[1] = (r) => t(e).sidebar.isOpen.value = r),
100
- activeWorkspace: t(e).workspace.activeWorkspace.value,
72
+ });
73
+ return (a, o) => (i(), d(t(g), null, {
74
+ default: m(() => [
75
+ l("div", { innerHTML: S.value }, null, 8, L),
76
+ r(t(C)),
77
+ t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (i(), u("main", V, [
78
+ l("div", F, [
79
+ s.layout === "desktop" ? (i(), d(P, {
80
+ key: 0,
81
+ activeTabIndex: t(e).tabs.activeTabIndex.value,
101
82
  eventBus: t(e).eventBus,
102
- isWorkspaceOpen: t(e).workspace.isOpen.value,
103
- layout: s.layout,
104
- sidebarState: t(e).sidebar.state,
105
- sidebarWidth: t(e).sidebar.width.value,
106
- store: t(e).store.value,
107
- workspaces: d.value,
108
- "onClick:workspace": t(e).workspace.navigateToWorkspace,
109
- "onCreate:workspace": a[2] || (a[2] = (r) => t(i).show()),
110
- "onSelect:workspace": m,
111
- onSelectItem: t(e).sidebar.handleSelectItem,
112
- "onUpdate:sidebarWidth": t(e).sidebar.handleSidebarWidthUpdate
113
- }, {
114
- sidebarMenuActions: v(() => [
115
- w(o.$slots, "sidebar-menu-actions")
116
- ]),
117
- _: 3
118
- }, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onClick:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
119
- p("div", z, [
120
- n(t(O), y(T(W.value)), null, 16)
83
+ tabs: t(e).tabs.state.value
84
+ }, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : k("", !0),
85
+ l("div", R, [
86
+ r(N, {
87
+ isSidebarOpen: t(e).sidebar.isOpen.value,
88
+ "onUpdate:isSidebarOpen": o[0] || (o[0] = (n) => t(e).sidebar.isOpen.value = n),
89
+ activeWorkspace: t(e).workspace.activeWorkspace.value,
90
+ eventBus: t(e).eventBus,
91
+ isWorkspaceOpen: t(e).workspace.isOpen.value,
92
+ layout: s.layout,
93
+ sidebarState: t(e).sidebar.state,
94
+ sidebarWidth: t(e).sidebar.width.value,
95
+ store: t(e).store.value,
96
+ workspaces: t(e).workspace.workspaceGroups.value,
97
+ "onClick:workspace": t(e).workspace.navigateToWorkspace,
98
+ "onCreate:workspace": o[1] || (o[1] = (n) => t(c).show()),
99
+ "onSelect:workspace": h,
100
+ onSelectItem: t(e).sidebar.handleSelectItem,
101
+ "onUpdate:sidebarWidth": t(e).sidebar.handleSidebarWidthUpdate
102
+ }, {
103
+ sidebarMenuActions: m(() => [
104
+ v(a.$slots, "sidebar-menu-actions")
105
+ ]),
106
+ _: 3
107
+ }, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onClick:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
108
+ l("div", G, [
109
+ s.layout === "web" ? (i(), u("nav", j, [
110
+ r($)
111
+ ])) : k("", !0),
112
+ l("div", z, [
113
+ r(t(E), T(W(b.value)), null, 16)
114
+ ])
115
+ ])
121
116
  ])
122
117
  ]),
123
- w(o.$slots, "create-workspace", { state: t(i) }, () => [
124
- n(_, {
125
- state: t(i),
126
- "onCreate:workspace": a[3] || (a[3] = (r) => t(e).workspace.create(r))
118
+ v(a.$slots, "create-workspace", { state: t(c) }, () => [
119
+ r(A, {
120
+ state: t(c),
121
+ "onCreate:workspace": o[2] || (o[2] = (n) => t(e).workspace.create(n))
127
122
  }, null, 8, ["state"])
128
123
  ]),
129
- n(I, {
124
+ r(U, {
130
125
  eventBus: t(e).eventBus,
131
- paletteState: t(S),
126
+ paletteState: t(w),
132
127
  workspaceStore: t(e).store.value
133
128
  }, null, 8, ["eventBus", "paletteState", "workspaceStore"])
134
- ])) : (l(), k("main", G, [
135
- n(A)
129
+ ])) : (i(), u("main", K, [
130
+ r(O)
136
131
  ]))
137
132
  ]),
138
133
  _: 3
@@ -140,5 +135,5 @@ const F = ["innerHTML"], V = {
140
135
  }
141
136
  });
142
137
  export {
143
- pe as default
138
+ de as default
144
139
  };
@@ -5,7 +5,7 @@ import type { Router } from 'vue-router';
5
5
  export declare function initializeAppEventHandlers({ eventBus, store, router, rebuildSidebar, navigateToCurrentTab, onSelectSidebarItem, onAfterExampleCreation, onCopyTabUrl, onToggleSidebar, }: {
6
6
  eventBus: WorkspaceEventBus;
7
7
  store: ShallowRef<WorkspaceStore | null>;
8
- router: ShallowRef<Router | null>;
8
+ router: Router;
9
9
  rebuildSidebar: (documentName?: string) => void;
10
10
  navigateToCurrentTab: () => Promise<void>;
11
11
  onSelectSidebarItem: (id: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"app-events.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/app-events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAC7F,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,KAAK,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,KAAK,EACL,MAAM,EACN,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,YAAY,EACZ,eAAe,GAChB,EAAE;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,KAAK,EAAE,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACxC,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACjC,cAAc,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC,mBAAmB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,sBAAsB,EAAE,CAAC,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAA;IACzD,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,eAAe,EAAE,MAAM,IAAI,CAAA;CAC5B,QAmNA"}
1
+ {"version":3,"file":"app-events.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/app-events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAC7F,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,KAAK,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,KAAK,EACL,MAAM,EACN,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,YAAY,EACZ,eAAe,GAChB,EAAE;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,KAAK,EAAE,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC,mBAAmB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,sBAAsB,EAAE,CAAC,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAA;IACzD,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,eAAe,EAAE,MAAM,IAAI,CAAA;CAC5B,QAmNA"}
@@ -1,5 +1,5 @@
1
- import { computed as v } from "vue";
2
- import { initializeWorkspaceEventHandlers as E } from "../../workspace-events.js";
1
+ import { computed as E } from "vue";
2
+ import { initializeWorkspaceEventHandlers as h } from "../../workspace-events.js";
3
3
  function N({
4
4
  eventBus: m,
5
5
  store: r,
@@ -11,13 +11,13 @@ function N({
11
11
  onCopyTabUrl: i,
12
12
  onToggleSidebar: f
13
13
  }) {
14
- const u = v(() => o.value?.currentRoute?.value), l = ({
14
+ const u = E(() => o.currentRoute?.value), l = ({
15
15
  documentName: e,
16
16
  path: a,
17
17
  method: t,
18
18
  exampleName: n
19
19
  }) => !(e !== void 0 && e !== u.value?.params.documentSlug || a !== void 0 && encodeURIComponent(a) !== u.value?.params.pathEncoded || t !== void 0 && t !== u.value?.params.method || n !== void 0 && n !== u.value?.params.exampleName);
20
- E({
20
+ h({
21
21
  eventBus: m,
22
22
  store: r,
23
23
  hooks: {
@@ -26,7 +26,7 @@ function N({
26
26
  //------------------------------------------------------------------------------------
27
27
  "document:delete:document": {
28
28
  onAfterExecute: async (e) => {
29
- u?.value?.params.documentSlug === e.name && await o.value?.push({
29
+ u?.value?.params.documentSlug === e.name && await o.push({
30
30
  name: "workspace.environment"
31
31
  });
32
32
  }
@@ -38,7 +38,7 @@ function N({
38
38
  onBeforeExecute: (e) => ({
39
39
  ...e,
40
40
  callback: async (a) => {
41
- a === "success" && (await o.value?.replace({
41
+ a === "success" && (await o.replace({
42
42
  name: "example",
43
43
  params: {
44
44
  method: e.payload.method,
@@ -69,7 +69,7 @@ function N({
69
69
  documentName: a,
70
70
  path: t,
71
71
  method: n
72
- }) && await o.value?.replace({
72
+ }) && await o.replace({
73
73
  name: "document.overview",
74
74
  params: {
75
75
  documentSlug: a
@@ -89,7 +89,7 @@ function N({
89
89
  path: t,
90
90
  method: n,
91
91
  exampleName: x
92
- }) && await o.value?.replace({
92
+ }) && await o.replace({
93
93
  name: "example",
94
94
  params: {
95
95
  pathEncoded: encodeURIComponent(t),
@@ -143,8 +143,8 @@ function N({
143
143
  onAfterExecute: c
144
144
  }
145
145
  }
146
- }), m.on("scroll-to:nav-item", ({ id: e }) => d(e)), m.on("ui:toggle:sidebar", f), m.on("ui:route:page", ({ name: e }) => o.value?.push({ name: e })), m.on("ui:route:example", async ({ exampleName: e, callback: a }) => {
147
- const t = await o.value?.replace({
146
+ }), m.on("scroll-to:nav-item", ({ id: e }) => d(e)), m.on("ui:toggle:sidebar", f), m.on("ui:route:page", ({ name: e }) => o.push({ name: e })), m.on("ui:route:example", async ({ exampleName: e, callback: a }) => {
147
+ const t = await o.replace({
148
148
  name: "example",
149
149
  params: {
150
150
  exampleName: e