@scalar/api-client 2.18.3 → 2.18.4

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 (27) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/style.css +1 -1
  3. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
  4. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  5. package/dist/v2/components/sidebar/Sidebar.vue.js +31 -26
  6. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +11 -1
  7. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  8. package/dist/v2/components/sidebar/SidebarMenu.vue.js +31 -32
  9. package/dist/v2/features/app/App.vue.d.ts +16 -2
  10. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  11. package/dist/v2/features/app/App.vue.js +53 -48
  12. package/dist/v2/features/app/app-state.d.ts +2 -1
  13. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  14. package/dist/v2/features/app/app-state.js +10 -10
  15. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +11 -1
  16. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  17. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  18. package/dist/v2/features/app/components/AppSidebar.vue2.js +77 -74
  19. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +5 -59
  20. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  21. package/dist/v2/features/app/helpers/create-api-client-app.js +9 -8
  22. package/dist/v2/features/app/index.d.ts +5 -1
  23. package/dist/v2/features/app/index.d.ts.map +1 -1
  24. package/dist/v2/features/app/index.js +8 -2
  25. package/dist/v2/features/operation/Operation.vue.js +1 -1
  26. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  27. package/package.json +10 -10
@@ -39,6 +39,8 @@ type __VLS_Slots = {
39
39
  empty?(props: {
40
40
  item: TraversedEntry;
41
41
  }): unknown;
42
+ /** Slot for customizing the actions section of the sidebar menu. */
43
+ sidebarMenuActions?(): unknown;
42
44
  };
43
45
  type __VLS_PublicProps = __VLS_Props & {
44
46
  /** Controls the width of the sidebar */
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"AAsJA,OAAO,EAAoB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE/E,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAKhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,iDAAiD;IACjD,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAC1C,4BAA4B;IAC5B,MAAM,EAAE,YAAY,CAAA;IACpB,qCAAqC;IACrC,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B,2CAA2C;IAC3C,UAAU,EAAE,mBAAmB,EAAE,CAAA;IACjC,kEAAkE;IAClE,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,+CAA+C;IAC/C,SAAS,EAAE,iBAAiB,EAAE,CAAA;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EACR,OAAO,GACP,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAA;CACxE,CAAC;AAeF,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,eAAe,CAAC,IAAI,OAAO,CAAA;IAC3B,sDAAsD;IACtD,SAA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e,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B,2CAA2C;IAC3C,UAAU,EAAE,mBAAmB,EAAE,CAAA;IACjC,kEAAkE;IAClE,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,+CAA+C;IAC/C,SAAS,EAAE,iBAAiB,EAAE,CAAA;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EACR,OAAO,GACP,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAA;CACxE,CAAC;AAeF,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,eAAe,CAAC,IAAI,OAAO,CAAA;IAC3B,sDAAsD;IACtD,SAAS,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAA;IACpD,mDAAmD;IACnD,MAAM,CAAC,IAAI,OAAO,CAAA;IAClB,yDAAyD;IACzD,KAAK,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAA;IAChD,oEAAoE;IACpE,kBAAkB,CAAC,IAAI,OAAO,CAAA;CAC/B,CAAC;AAiBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACtB,CAAC;AA2NF,QAAA,MAAM,eAAe;;;;;;;;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,9 +1,9 @@
1
- import { defineComponent as y, mergeModels as f, useSlots as g, ref as x, useModel as B, createBlock as d, openBlock as a, unref as r, withCtx as s, createVNode as W, createSlots as $, renderSlot as n, normalizeProps as b, guardReactiveProps as p, createElementVNode as k, createCommentVNode as m, createElementBlock as D } from "vue";
2
- import { ScalarIconButton as C } from "@scalar/components";
3
- import { ScalarIconMagnifyingGlass as E } from "@scalar/icons";
4
- import { ScalarSidebar as I } from "@scalar/sidebar";
5
- import h from "./SidebarMenu.vue.js";
6
- import M from "../resize/Resize.vue.js";
1
+ import { defineComponent as y, mergeModels as f, useSlots as g, ref as B, useModel as x, createBlock as n, openBlock as r, unref as i, withCtx as s, createVNode as W, createSlots as $, renderSlot as l, normalizeProps as b, guardReactiveProps as p, createElementVNode as k, createCommentVNode as u, createElementBlock as D } from "vue";
2
+ import { ScalarIconButton as M } from "@scalar/components";
3
+ import { ScalarIconMagnifyingGlass as C } from "@scalar/icons";
4
+ import { ScalarSidebar as E } from "@scalar/sidebar";
5
+ import I from "./SidebarMenu.vue.js";
6
+ import h from "../resize/Resize.vue.js";
7
7
  import V from "../../features/search/components/SearchButton.vue.js";
8
8
  const z = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, N = { class: "flex items-center justify-between" }, R = { key: 1 }, H = /* @__PURE__ */ y({
9
9
  __name: "Sidebar",
@@ -24,14 +24,14 @@ const z = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, N =
24
24
  }),
25
25
  emits: /* @__PURE__ */ f(["selectItem", "select:workspace", "create:workspace", "reorder"], ["update:sidebarWidth"]),
26
26
  setup(e, { emit: v }) {
27
- const i = v, w = g(), c = x(!1), u = B(e, "sidebarWidth");
28
- return (l, o) => (a(), d(r(M), {
29
- width: u.value,
30
- "onUpdate:width": o[5] || (o[5] = (t) => u.value = t),
27
+ const d = v, w = g(), c = B(!1), m = x(e, "sidebarWidth");
28
+ return (a, o) => (r(), n(i(h), {
29
+ width: m.value,
30
+ "onUpdate:width": o[5] || (o[5] = (t) => m.value = t),
31
31
  class: "flex flex-col"
32
32
  }, {
33
33
  default: s(() => [
34
- W(r(I), {
34
+ W(i(E), {
35
35
  class: "flex w-auto flex-1 pt-2",
36
36
  indent: 15,
37
37
  isDraggable: e.layout !== "modal",
@@ -40,48 +40,53 @@ const z = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, N =
40
40
  isSelected: e.sidebarState.isSelected,
41
41
  items: e.sidebarState.items.value,
42
42
  layout: "client",
43
- onReorder: o[3] || (o[3] = (t, S) => i("reorder", t, S)),
44
- onSelectItem: o[4] || (o[4] = (t) => i("selectItem", t))
43
+ onReorder: o[3] || (o[3] = (t, S) => d("reorder", t, S)),
44
+ onSelectItem: o[4] || (o[4] = (t) => d("selectItem", t))
45
45
  }, $({
46
46
  header: s(() => [
47
47
  k("div", z, [
48
48
  k("div", N, [
49
- e.layout === "desktop" ? (a(), d(h, {
49
+ e.layout === "desktop" ? (r(), n(I, {
50
50
  key: 0,
51
51
  activeWorkspace: e.activeWorkspace,
52
52
  workspaces: e.workspaces,
53
- "onCreate:workspace": o[0] || (o[0] = (t) => i("create:workspace")),
54
- "onSelect:workspace": o[1] || (o[1] = (t) => i("select:workspace", t))
55
- }, null, 8, ["activeWorkspace", "workspaces"])) : e.layout === "modal" ? (a(), D("div", R)) : m("", !0),
56
- e.layout !== "web" ? (a(), d(r(C), {
53
+ "onCreate:workspace": o[0] || (o[0] = (t) => d("create:workspace")),
54
+ "onSelect:workspace": o[1] || (o[1] = (t) => d("select:workspace", t))
55
+ }, {
56
+ sidebarMenuActions: s(() => [
57
+ l(a.$slots, "sidebarMenuActions")
58
+ ]),
59
+ _: 3
60
+ }, 8, ["activeWorkspace", "workspaces"])) : e.layout === "modal" ? (r(), D("div", R)) : u("", !0),
61
+ e.layout !== "web" ? (r(), n(i(M), {
57
62
  key: 2,
58
- icon: r(E),
63
+ icon: i(C),
59
64
  label: "Search",
60
65
  onClick: o[2] || (o[2] = (t) => c.value = !c.value)
61
- }, null, 8, ["icon"])) : m("", !0)
66
+ }, null, 8, ["icon"])) : u("", !0)
62
67
  ]),
63
- c.value || e.layout === "web" ? (a(), d(r(V), {
68
+ c.value || e.layout === "web" ? (r(), n(i(V), {
64
69
  key: 0,
65
70
  documents: e.documents,
66
71
  eventBus: e.eventBus
67
- }, null, 8, ["documents", "eventBus"])) : m("", !0)
72
+ }, null, 8, ["documents", "eventBus"])) : u("", !0)
68
73
  ])
69
74
  ]),
70
75
  decorator: s((t) => [
71
- n(l.$slots, "decorator", b(p(t)))
76
+ l(a.$slots, "decorator", b(p(t)))
72
77
  ]),
73
78
  before: s(() => [
74
- n(l.$slots, "workspaceButton")
79
+ l(a.$slots, "workspaceButton")
75
80
  ]),
76
81
  footer: s(() => [
77
- n(l.$slots, "footer")
82
+ l(a.$slots, "footer")
78
83
  ]),
79
84
  _: 2
80
85
  }, [
81
86
  w.empty ? {
82
87
  name: "empty",
83
88
  fn: s((t) => [
84
- n(l.$slots, "empty", b(p(t)))
89
+ l(a.$slots, "empty", b(p(t)))
85
90
  ]),
86
91
  key: "0"
87
92
  } : void 0
@@ -13,12 +13,22 @@ type __VLS_Props = {
13
13
  */
14
14
  workspaces: ScalarListboxOption[];
15
15
  };
16
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
16
+ type __VLS_Slots = {
17
+ /** Slot for customizing the actions section of the sidebar menu. */
18
+ sidebarMenuActions?(): unknown;
19
+ };
20
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
21
  "create:workspace": () => any;
18
22
  "select:workspace": (id?: string | undefined) => any;
19
23
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
24
  "onCreate:workspace"?: (() => any) | undefined;
21
25
  "onSelect:workspace"?: ((id?: string | undefined) => any) | undefined;
22
26
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
23
28
  export default _default;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
24
34
  //# sourceMappingURL=SidebarMenu.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"names":[],"mappings":"AA2EA,OAAO,EAOL,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAA;AAI3B,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B;;;OAGG;IACH,UAAU,EAAE,mBAAmB,EAAE,CAAA;CAClC,CAAC;;;;;;;;AAwIF,wBAOG"}
1
+ {"version":3,"file":"SidebarMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"names":[],"mappings":"AAoEA,OAAO,EAOL,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAA;AAI3B,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B;;;OAGG;IACH,UAAU,EAAE,mBAAmB,EAAE,CAAA;CAClC,CAAC;AAWF,KAAK,WAAW,GAAG;IACjB,oEAAoE;IACpE,kBAAkB,CAAC,IAAI,OAAO,CAAA;CAC/B,CAAC;AA8HF,QAAA,MAAM,eAAe;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
- import { defineComponent as p, createBlock as u, openBlock as k, unref as o, withCtx as t, createVNode as r, createTextVNode as i } from "vue";
2
- import { ScalarMenu as m, ScalarMenuSection as d, ScalarMenuWorkspacePicker as S, ScalarMenuLink as f, ScalarMenuResources as w, ScalarMenuSupport as M } from "@scalar/components";
3
- import { ScalarIconGear as C } from "@scalar/icons";
4
- import { RouterLink as V } from "vue-router";
1
+ import { defineComponent as p, createBlock as u, openBlock as k, unref as o, withCtx as t, createVNode as r, renderSlot as m, createTextVNode as d } from "vue";
2
+ import { ScalarMenu as S, ScalarMenuSection as f, ScalarMenuWorkspacePicker as w, ScalarMenuLink as M, ScalarMenuResources as C, ScalarMenuSupport as V } from "@scalar/components";
3
+ import { ScalarIconGear as W } from "@scalar/icons";
4
+ import { RouterLink as v } from "vue-router";
5
5
  const L = /* @__PURE__ */ p({
6
6
  __name: "SidebarMenu",
7
7
  props: {
@@ -9,40 +9,39 @@ const L = /* @__PURE__ */ p({
9
9
  workspaces: {}
10
10
  },
11
11
  emits: ["create:workspace", "select:workspace"],
12
- setup(a, { emit: l }) {
13
- const n = l;
14
- return (x, e) => (k(), u(o(m), null, {
12
+ setup(a, { emit: i }) {
13
+ const n = i;
14
+ return (c, e) => (k(), u(o(S), null, {
15
15
  products: t(() => [...e[2] || (e[2] = [])]),
16
- sections: t(({ close: c }) => [
17
- r(o(d), null, {
18
- title: t(() => [...e[3] || (e[3] = [
19
- i("Team", -1)
20
- ])]),
16
+ sections: t(({ close: l }) => [
17
+ r(o(f), null, {
21
18
  default: t(() => [
22
- r(o(S), {
23
- modelValue: a.activeWorkspace.id,
24
- workspaceOptions: a.workspaces,
25
- onCreateWorkspace: e[0] || (e[0] = (s) => n("create:workspace")),
26
- "onUpdate:modelValue": e[1] || (e[1] = (s) => n("select:workspace", s))
27
- }, null, 8, ["modelValue", "workspaceOptions"]),
28
- r(o(f), {
29
- is: o(V),
30
- icon: o(C),
31
- to: "/settings",
32
- onClick: c
33
- }, {
34
- default: t(() => [...e[4] || (e[4] = [
35
- i(" Settings ", -1)
36
- ])]),
37
- _: 1
38
- }, 8, ["is", "icon", "onClick"])
19
+ m(c.$slots, "sidebarMenuActions", {}, () => [
20
+ r(o(w), {
21
+ modelValue: a.activeWorkspace.id,
22
+ workspaceOptions: a.workspaces,
23
+ onCreateWorkspace: e[0] || (e[0] = (s) => n("create:workspace")),
24
+ "onUpdate:modelValue": e[1] || (e[1] = (s) => n("select:workspace", s))
25
+ }, null, 8, ["modelValue", "workspaceOptions"]),
26
+ r(o(M), {
27
+ is: o(v),
28
+ icon: o(W),
29
+ to: "/settings",
30
+ onClick: l
31
+ }, {
32
+ default: t(() => [...e[3] || (e[3] = [
33
+ d(" Settings ", -1)
34
+ ])]),
35
+ _: 1
36
+ }, 8, ["is", "icon", "onClick"])
37
+ ])
39
38
  ]),
40
39
  _: 2
41
40
  }, 1024),
42
- r(o(w)),
43
- r(o(M))
41
+ r(o(C)),
42
+ r(o(V))
44
43
  ]),
45
- _: 1
44
+ _: 3
46
45
  }));
47
46
  }
48
47
  });
@@ -1,16 +1,30 @@
1
1
  import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
2
2
  import type { ClientLayout } from '../../../v2/types/layout';
3
+ import { type AppState } from './app-state.js';
3
4
  /**
4
5
  * Main entry point for the API client for electron and web.
5
6
  *
6
7
  * This component handles all events and store business logic for the application.
7
8
  */
8
- declare const _default: import("vue").DefineComponent<{
9
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
9
10
  layout: Exclude<ClientLayout, "modal">;
10
11
  plugins?: ClientPlugin[];
12
+ getAppState: () => AppState;
11
13
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
12
14
  layout: Exclude<ClientLayout, "modal">;
13
15
  plugins?: ClientPlugin[];
14
- }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ getAppState: () => AppState;
17
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
18
+ /**
19
+ * Slot for customizing the actions section of the sidebar menu.
20
+ * This slot is used to render custom actions or components within the actions section.
21
+ */
22
+ 'sidebar-menu-actions': [];
23
+ }>;
15
24
  export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
16
30
  //# sourceMappingURL=App.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AA0MA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAQrD;;;;GAIG;;YAGO,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;;YADhB,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;;AAH1B,wBAmTC"}
1
+ {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AA2NA,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;;YAFnB,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;iBACX,MAAM,QAAQ;;IAS3B;;;OAGG;4BACqB,EAAE;;AAjB5B,wBAuUC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,111 +1,116 @@
1
- import { defineComponent as k, computed as u, createElementBlock as w, createBlock as c, unref as t, openBlock as n, Fragment as S, createElementVNode as p, createVNode as o, withCtx as f, normalizeProps as b, guardReactiveProps as h } from "vue";
2
- import { useModal as W, ScalarTeleportRoot as T } from "@scalar/components";
3
- import { getThemeStyles as y } from "@scalar/themes";
1
+ import { defineComponent as w, computed as p, createElementBlock as S, createBlock as c, unref as t, openBlock as i, Fragment as f, createElementVNode as u, createVNode as s, withCtx as m, renderSlot as b, normalizeProps as h, guardReactiveProps as W } from "vue";
2
+ import { useModal as y, ScalarTeleportRoot as T } from "@scalar/components";
3
+ import { getThemeStyles as g } from "@scalar/themes";
4
4
  import { ScalarToasts as B } from "@scalar/use-toasts";
5
- import { extensions as g } from "@scalar/workspace-store/schemas/extensions";
6
- import { RouterView as x } from "vue-router";
7
- import C from "./components/CreateWorkspaceModal.vue.js";
8
- import E from "./components/SplashScreen.vue.js";
9
- import { useDocumentWatcher as _ } from "./hooks/use-document-watcher.js";
10
- import O from "../command-palette/components/TheCommandPalette.vue.js";
11
- import { useColorMode as I } from "../../hooks/use-color-mode.js";
12
- import { useGlobalHotKeys as U } from "../../hooks/use-global-hot-keys.js";
13
- import { useAppState as M } from "./app-state.js";
14
- import A from "./components/AppSidebar.vue.js";
5
+ import { extensions as C } from "@scalar/workspace-store/schemas/extensions";
6
+ import { RouterView as E } from "vue-router";
7
+ import x from "./components/CreateWorkspaceModal.vue.js";
8
+ import O from "./components/SplashScreen.vue.js";
9
+ import { useDocumentWatcher as I } from "./hooks/use-document-watcher.js";
10
+ import _ from "../command-palette/components/TheCommandPalette.vue.js";
11
+ import { useColorMode as U } from "../../hooks/use-color-mode.js";
12
+ import { useGlobalHotKeys as A } from "../../hooks/use-global-hot-keys.js";
13
+ import M from "./components/AppSidebar.vue.js";
15
14
  import D from "./components/DesktopTabs.vue.js";
16
15
  import N from "./components/WebTopNav.vue.js";
17
- const L = ["innerHTML"], $ = { class: "flex min-h-0 flex-1" }, H = { class: "bg-b-1 flex-1" }, P = {}, se = /* @__PURE__ */ k({
16
+ const $ = ["innerHTML"], L = { class: "flex min-h-0 flex-1" }, H = { class: "bg-b-1 flex-1" }, P = {}, oe = /* @__PURE__ */ w({
18
17
  ...P,
19
18
  __name: "App",
20
19
  props: {
21
20
  layout: {},
22
- plugins: { default: () => [] }
21
+ plugins: { default: () => [] },
22
+ getAppState: { type: Function }
23
23
  },
24
- setup(s) {
25
- const e = M();
26
- typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), I({ workspaceStore: e.store }), U(e.eventBus, s.layout), _({
27
- documentName: () => e.store.value?.workspace[g.workspace.activeDocument],
24
+ setup(o) {
25
+ const e = o.getAppState();
26
+ typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), U({ workspaceStore: e.store }), A(e.eventBus, o.layout), I({
27
+ documentName: () => e.store.value?.workspace[C.workspace.activeDocument],
28
28
  store: e.store,
29
29
  initialTimeout: 5e3
30
30
  });
31
- const m = u(() => {
31
+ const d = p(() => {
32
32
  if (e.store.value === null)
33
33
  return "";
34
- const l = e.store.value.workspace["x-scalar-theme"];
35
- return l ? `<style>${y(l)}</style>` : "";
36
- }), d = () => e.router.value?.push({
34
+ const n = e.store.value.workspace["x-scalar-theme"];
35
+ return n ? `<style>${g(n)}</style>` : "";
36
+ }), v = () => e.router.value?.push({
37
37
  name: "workspace.environment",
38
38
  params: {
39
39
  workspaceSlug: e.activeEntities.workspaceSlug.value
40
40
  }
41
- }), i = W(), v = u(() => ({
41
+ }), l = y(), k = p(() => ({
42
42
  documentSlug: e.activeEntities.documentSlug.value ?? "",
43
43
  document: e.store.value?.workspace.activeDocument ?? null,
44
44
  environment: e.environment.value,
45
45
  eventBus: e.eventBus,
46
46
  exampleName: e.activeEntities.exampleName.value,
47
- layout: s.layout,
47
+ layout: o.layout,
48
48
  method: e.activeEntities.method.value,
49
49
  path: e.activeEntities.path.value,
50
50
  workspaceStore: e.store.value,
51
51
  activeWorkspace: e.workspace.activeWorkspace.value,
52
- plugins: s.plugins,
52
+ plugins: o.plugins,
53
53
  securitySchemes: e.document.value?.components?.securitySchemes ?? {}
54
54
  }));
55
- return (l, a) => t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (n(), w(S, { key: 0 }, [
56
- p("div", { innerHTML: m.value }, null, 8, L),
57
- o(t(T), null, {
58
- default: f(() => [
59
- o(t(B)),
60
- s.layout === "desktop" ? (n(), c(D, {
55
+ return (n, a) => t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (i(), S(f, { key: 0 }, [
56
+ u("div", { innerHTML: d.value }, null, 8, $),
57
+ s(t(T), null, {
58
+ default: m(() => [
59
+ s(t(B)),
60
+ o.layout === "desktop" ? (i(), c(D, {
61
61
  key: 0,
62
62
  activeTabIndex: t(e).tabs.activeTabIndex.value,
63
63
  eventBus: t(e).eventBus,
64
64
  tabs: t(e).tabs.state.value
65
- }, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : (n(), c(N, {
65
+ }, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : (i(), c(N, {
66
66
  key: 1,
67
67
  activeWorkspace: t(e).workspace.activeWorkspace.value,
68
68
  workspaces: t(e).workspace.workspaceList.value,
69
- "onCreate:workspace": a[0] || (a[0] = (r) => t(i).show()),
69
+ "onCreate:workspace": a[0] || (a[0] = (r) => t(l).show()),
70
70
  "onSelect:workspace": t(e).workspace.setId
71
71
  }, null, 8, ["activeWorkspace", "workspaces", "onSelect:workspace"])),
72
- p("main", $, [
73
- o(A, {
72
+ u("main", L, [
73
+ s(M, {
74
74
  isSidebarOpen: t(e).sidebar.isOpen.value,
75
75
  "onUpdate:isSidebarOpen": a[1] || (a[1] = (r) => t(e).sidebar.isOpen.value = r),
76
76
  activeWorkspace: t(e).workspace.activeWorkspace.value,
77
77
  eventBus: t(e).eventBus,
78
78
  isWorkspaceOpen: t(e).workspace.isOpen.value,
79
- layout: s.layout,
79
+ layout: o.layout,
80
80
  sidebarState: t(e).sidebar.state,
81
81
  sidebarWidth: t(e).sidebar.width.value,
82
82
  store: t(e).store.value,
83
83
  workspaces: t(e).workspace.workspaceList.value,
84
- "onClick:workspace": d,
85
- "onCreate:workspace": a[2] || (a[2] = (r) => t(i).show()),
84
+ "onClick:workspace": v,
85
+ "onCreate:workspace": a[2] || (a[2] = (r) => t(l).show()),
86
86
  "onSelect:workspace": t(e).workspace.setId,
87
87
  onSelectItem: t(e).sidebar.handleSelectItem,
88
88
  "onUpdate:sidebarWidth": t(e).sidebar.handleSidebarWidthUpdate
89
- }, null, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onSelect:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
90
- o(C, {
91
- state: t(i),
89
+ }, {
90
+ "sidebar-menu-actions": m(() => [
91
+ b(n.$slots, "sidebar-menu-actions")
92
+ ]),
93
+ _: 3
94
+ }, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onSelect:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
95
+ s(x, {
96
+ state: t(l),
92
97
  "onCreate:workspace": a[3] || (a[3] = (r) => t(e).workspace.create(r))
93
98
  }, null, 8, ["state"]),
94
- o(O, {
99
+ s(_, {
95
100
  eventBus: t(e).eventBus,
96
101
  paletteState: t(e).commandPalette,
97
102
  workspaceStore: t(e).store.value
98
103
  }, null, 8, ["eventBus", "paletteState", "workspaceStore"]),
99
- p("div", H, [
100
- o(t(x), b(h(v.value)), null, 16)
104
+ u("div", H, [
105
+ s(t(E), h(W(k.value)), null, 16)
101
106
  ])
102
107
  ])
103
108
  ]),
104
- _: 1
109
+ _: 3
105
110
  })
106
- ], 64)) : (n(), c(E, { key: 1 }));
111
+ ], 64)) : (i(), c(O, { key: 1 }));
107
112
  }
108
113
  });
109
114
  export {
110
- se as default
115
+ oe as default
111
116
  };
@@ -94,7 +94,7 @@ declare const handleSidebarWidthUpdate: (width: number) => void | undefined;
94
94
  * @throws Will silently fail if clipboard API is unavailable or the tab does not exist.
95
95
  */
96
96
  declare const copyTabUrl: (index: number) => Promise<void>;
97
- export declare function useAppState(): {
97
+ export type AppState = {
98
98
  store: ShallowRef<WorkspaceStore | null>;
99
99
  sidebar: {
100
100
  state: typeof sidebarState;
@@ -131,5 +131,6 @@ export declare function useAppState(): {
131
131
  environment: ComputedRef<XScalarEnvironment>;
132
132
  document: ComputedRef<WorkspaceDocument | null>;
133
133
  };
134
+ export declare function useAppState(_router: Router): AppState;
134
135
  export {};
135
136
  //# sourceMappingURL=app-state.d.ts.map
@@ -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,EAAE,KAAK,iBAAiB,EAA2B,MAAM,gCAAgC,CAAA;AAMhG,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oEAAoE,CAAA;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAChF,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAoC,MAAM,KAAK,CAAA;AACnG,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAOxE,OAAO,EACL,KAAK,4BAA4B,EAElC,MAAM,oDAAoD,CAAA;AAmJ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E,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAA;QACzC,eAAe,EAAE,UAAU,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAA;QACvD,KAAK,EAAE,OAAO,cAAc,CAAA;QAC5B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;KAC7B,CAAA;IACD,cAAc,EAAE,4BAA4B,CAAA;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACjC,YAAY,EAAE,GAAG,CAAC,8BAA8B,GAAG,IAAI,CAAC,CAAA;IACxD,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,cAAc,EAAE;QACd,aAAa,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;QACtC,YAAY,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;QACrC,IAAI,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;QAC7B,MAAM,EAAE,GAAG,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;QACnC,WAAW,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;KACrC,CAAA;IACD,WAAW,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAA;IAC5C,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;CAChD,CAAA;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CA0CrD"}
@@ -9,7 +9,7 @@ import { getParentEntry as p } from "@scalar/workspace-store/navigation";
9
9
  import { createWorkspaceStorePersistence as z } from "@scalar/workspace-store/persistence";
10
10
  import { persistencePlugin as J } from "@scalar/workspace-store/plugins/client";
11
11
  import { extensions as M } from "@scalar/workspace-store/schemas/extensions";
12
- import { computed as l, ref as i, shallowRef as S, watch as G } from "vue";
12
+ import { shallowRef as S, computed as l, ref as i, watch as G } from "vue";
13
13
  import { getActiveEnvironment as Q } from "../../helpers/get-active-environment.js";
14
14
  import { getTabDetails as X } from "../../helpers/get-tab-details.js";
15
15
  import { slugify as Z } from "../../helpers/slugify.js";
@@ -194,7 +194,7 @@ const re = async ({ workspaceId: e }) => R({
194
194
  return;
195
195
  const e = n.value.workspace["x-scalar-active-tab"] ?? 0, t = n.value.workspace["x-scalar-tabs"]?.[e];
196
196
  t && await c.value?.replace(t.path);
197
- }, _ = (e) => {
197
+ }, N = (e) => {
198
198
  e && n.value?.buildSidebar(e);
199
199
  }, ie = (e) => {
200
200
  const t = h.value?.["x-scalar-navigation"]?.name;
@@ -206,7 +206,7 @@ const re = async ({ workspaceId: e }) => R({
206
206
  method: e.method,
207
207
  example: e.exampleKey
208
208
  });
209
- (!a || a.type !== "example") && _(t);
209
+ (!a || a.type !== "example") && N(t);
210
210
  }, pe = 288, de = l(() => n.value?.workspace?.["x-scalar-sidebar-width"] ?? pe), me = (e) => n.value?.update("x-scalar-sidebar-width", e), k = i(!0), ve = "x-scalar-tabs", fe = "x-scalar-active-tab", I = (e) => {
211
211
  const t = s("method", e), a = s("pathEncoded", e), r = s("documentSlug", e), u = s("workspaceSlug", e);
212
212
  return {
@@ -219,8 +219,8 @@ const re = async ({ workspaceId: e }) => R({
219
219
  }),
220
220
  path: f.value?.path ?? ""
221
221
  };
222
- }, N = l(() => n.value?.workspace[ve] ?? [I(f.value)]), he = l(() => n.value?.workspace[fe] ?? 0), F = async (e) => {
223
- const t = N.value[e];
222
+ }, _ = l(() => n.value?.workspace[ve] ?? [I(f.value)]), he = l(() => n.value?.workspace[fe] ?? 0), F = async (e) => {
223
+ const t = _.value[e];
224
224
  if (!t) {
225
225
  console.warn(`Cannot copy URL: tab at index ${e} does not exist`);
226
226
  return;
@@ -264,15 +264,15 @@ ae({
264
264
  getStore: () => n.value,
265
265
  document: h,
266
266
  navigateToCurrentTab: ue,
267
- rebuildSidebar: _,
267
+ rebuildSidebar: N,
268
268
  onAfterExampleCreation: ie,
269
269
  onOpenCommandPalette: K.open,
270
270
  onSelectSidebarItem: L,
271
271
  onCopyTabUrl: (e) => F(e),
272
272
  onToggleSidebar: () => k.value = !k.value
273
273
  });
274
- function Ne() {
275
- return {
274
+ function _e(e) {
275
+ return e && (c.value = e), {
276
276
  /** Active workspace store */
277
277
  store: n,
278
278
  sidebar: {
@@ -284,7 +284,7 @@ function Ne() {
284
284
  getEntryByLocation: x
285
285
  },
286
286
  tabs: {
287
- state: N,
287
+ state: _,
288
288
  activeTabIndex: he,
289
289
  copyTabUrl: F
290
290
  },
@@ -312,5 +312,5 @@ function Ne() {
312
312
  };
313
313
  }
314
314
  export {
315
- Ne as useAppState
315
+ _e as useAppState
316
316
  };
@@ -41,13 +41,17 @@ type __VLS_Props = {
41
41
  */
42
42
  store: WorkspaceStore;
43
43
  };
44
+ type __VLS_Slots = {
45
+ /** Slot for customizing the actions section of the sidebar menu. */
46
+ sidebarMenuActions?(): unknown;
47
+ };
44
48
  type __VLS_PublicProps = __VLS_Props & {
45
49
  /** Controls the visibility of the sidebar */
46
50
  'isSidebarOpen': boolean;
47
51
  /** Controls the width of the sidebar */
48
52
  'sidebarWidth': number;
49
53
  };
50
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
54
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
51
55
  "update:sidebarWidth": (value: number) => any;
52
56
  "update:isSidebarOpen": (value: boolean) => any;
53
57
  } & {
@@ -63,5 +67,11 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {},
63
67
  "onClick:workspace"?: (() => any) | undefined;
64
68
  "onUpdate:isSidebarOpen"?: ((value: boolean) => any) | undefined;
65
69
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
70
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
66
71
  export default _default;
72
+ type __VLS_WithSlots<T, S> = T & {
73
+ new (): {
74
+ $slots: S;
75
+ };
76
+ };
67
77
  //# sourceMappingURL=AppSidebar.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppSidebar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/AppSidebar.vue"],"names":[],"mappings":"AAgcA,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAA;AAM3B,OAAO,KAAK,EAA6B,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAUhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,KAAK,WAAW,GAAG;IACf;;OAEG;IACH,MAAM,EAAE,YAAY,CAAA;IAEpB;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAE1C;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;OAGG;IACH,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C;;;OAGG;IACH,UAAU,EAAE,mBAAmB,EAAE,CAAA;IACjC;;;OAGG;IACH,QAAQ,EAAE,iBAAiB,CAAA;IAC3B;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;AAgMJ,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,6CAA6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACtB,CAAC;;;;;;;;;;;;;;;;;AAicF,wBAOG"}
1
+ {"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AQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./AppSidebar.vue2.js";
2
2
  /* empty css */
3
3
  import p from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ p(o, [["__scopeId", "data-v-9bec4555"]]);
4
+ const e = /* @__PURE__ */ p(o, [["__scopeId", "data-v-9f160e4c"]]);
5
5
  export {
6
6
  e as default
7
7
  };