@scalar/api-client 2.29.3 → 2.31.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 (82) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dist/hooks/useClientConfig.d.ts +3 -0
  3. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  4. package/dist/style.css +1 -1
  5. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +9 -69
  6. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  7. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +74 -76
  8. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +15 -8
  9. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  10. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
  11. package/dist/v2/blocks/operation-block/components/Header.vue2.js +29 -28
  12. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +1 -1
  13. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -1
  14. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +18 -21
  15. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  16. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +2 -2
  17. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +12 -0
  18. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  19. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +12 -0
  20. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  21. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  22. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +13 -8
  23. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  24. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  25. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +97 -85
  26. package/dist/v2/components/server/ServerDropdown.vue.d.ts +16 -5
  27. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  28. package/dist/v2/components/server/ServerDropdown.vue.js +27 -24
  29. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  30. package/dist/v2/features/app/app-events.js +29 -14
  31. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  32. package/dist/v2/features/app/app-state.js +57 -57
  33. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  34. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  35. package/dist/v2/features/app/components/AppSidebar.vue2.js +171 -148
  36. package/dist/v2/features/app/helpers/routes.d.ts +42 -12
  37. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  38. package/dist/v2/features/app/helpers/routes.js +57 -26
  39. package/dist/v2/features/collection/OperationCollection.vue.d.ts +6 -0
  40. package/dist/v2/features/collection/OperationCollection.vue.d.ts.map +1 -0
  41. package/dist/v2/features/collection/OperationCollection.vue.js +83 -0
  42. package/dist/v2/features/collection/OperationCollection.vue2.js +4 -0
  43. package/dist/v2/features/collection/components/Authentication.vue.d.ts +2 -2
  44. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  45. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  46. package/dist/v2/features/collection/components/Authentication.vue2.js +99 -49
  47. package/dist/v2/features/collection/components/Cookies.vue.d.ts +9 -4
  48. package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
  49. package/dist/v2/features/collection/components/Cookies.vue.js +12 -10
  50. package/dist/v2/features/collection/components/Environment.vue.d.ts +9 -4
  51. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  52. package/dist/v2/features/collection/components/Environment.vue.js +18 -16
  53. package/dist/v2/features/collection/components/LabelInput.vue.d.ts +6 -2
  54. package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
  55. package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
  56. package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -18
  57. package/dist/v2/features/collection/components/Overview.vue.d.ts +2 -2
  58. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
  59. package/dist/v2/features/collection/components/Overview.vue.js +1 -1
  60. package/dist/v2/features/collection/components/Overview.vue2.js +177 -75
  61. package/dist/v2/features/collection/components/Servers.vue.d.ts +2 -2
  62. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  63. package/dist/v2/features/collection/components/Servers.vue.js +154 -98
  64. package/dist/v2/features/collection/components/Settings.vue.d.ts +2 -2
  65. package/dist/v2/features/collection/components/Tabs.vue.d.ts +2 -1
  66. package/dist/v2/features/collection/components/Tabs.vue.d.ts.map +1 -1
  67. package/dist/v2/features/collection/components/Tabs.vue.js +25 -27
  68. package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.d.ts +12 -0
  69. package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.d.ts.map +1 -0
  70. package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js +13 -0
  71. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  72. package/dist/v2/features/operation/Operation.vue.js +61 -63
  73. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +5 -3
  74. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
  75. package/dist/v2/features/operation/helpers/get-selected-security.js +7 -8
  76. package/dist/v2/features/operation/helpers/get-selected-server.d.ts +8 -6
  77. package/dist/v2/features/operation/helpers/get-selected-server.d.ts.map +1 -1
  78. package/dist/v2/features/operation/helpers/get-selected-server.js +2 -2
  79. package/dist/v2/workspace-events.d.ts.map +1 -1
  80. package/dist/v2/workspace-events.js +25 -15
  81. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  82. package/package.json +13 -13
@@ -1,24 +1,24 @@
1
- import { defineComponent as L, mergeModels as W, computed as k, capitalize as R, useModel as h, ref as V, createElementBlock as p, openBlock as u, createVNode as d, createBlock as w, createCommentVNode as m, unref as i, createSlots as j, withCtx as r, createTextVNode as b, createElementVNode as l, withKeys as g, withModifiers as v, toDisplayString as F, renderSlot as G, normalizeClass as H, Fragment as I, nextTick as U } from "vue";
2
- import { useModal as J, ScalarSidebarItem as $, ScalarIconButton as Y, ScalarButton as E, ScalarModal as Q } from "@scalar/components";
3
- import { isMacOS as X } from "@scalar/helpers/general/is-mac-os";
4
- import { ScalarIconPlus as Z, ScalarIconDotsThree as _ } from "@scalar/icons";
5
- import { LibraryIcon as ee } from "@scalar/icons/library";
6
- import { getParentEntry as S } from "@scalar/workspace-store/navigation";
7
- import te from "../../../../assets/rabbit.ascii.js";
8
- import ae from "../../../../assets/rabbitjump.ascii.js";
9
- import O from "../../../../components/ScalarAsciiArt.vue.js";
10
- import oe from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
11
- import ne from "./DownloadAppButton.vue.js";
12
- import ie from "./SidebarItemMenu.vue.js";
13
- import { dragHandleFactory as se } from "../../../helpers/drag-handle-factory.js";
14
- import re from "../../../components/sidebar/Sidebar.vue.js";
15
- const le = { class: "flex" }, de = {
1
+ import { defineComponent as V, mergeModels as W, computed as S, capitalize as j, useModel as $, ref as F, createElementBlock as b, openBlock as d, createVNode as u, createBlock as f, createCommentVNode as c, unref as i, createSlots as G, withCtx as l, createTextVNode as y, createElementVNode as r, withKeys as p, withModifiers as m, toDisplayString as H, renderSlot as U, normalizeClass as J, Fragment as I, nextTick as Y } from "vue";
2
+ import { useModal as Q, ScalarSidebarItem as O, ScalarIconButton as E, ScalarButton as A, ScalarModal as X } from "@scalar/components";
3
+ import { isMacOS as Z } from "@scalar/helpers/general/is-mac-os";
4
+ import { ScalarIconPlus as _, ScalarIconGearSix as ee, ScalarIconDotsThree as te } from "@scalar/icons";
5
+ import { LibraryIcon as ae } from "@scalar/icons/library";
6
+ import { getParentEntry as g } from "@scalar/workspace-store/navigation";
7
+ import oe from "../../../../assets/rabbit.ascii.js";
8
+ import ne from "../../../../assets/rabbitjump.ascii.js";
9
+ import D from "../../../../components/ScalarAsciiArt.vue.js";
10
+ import ie from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
11
+ import se from "./DownloadAppButton.vue.js";
12
+ import re from "./SidebarItemMenu.vue.js";
13
+ import { dragHandleFactory as le } from "../../../helpers/drag-handle-factory.js";
14
+ import de from "../../../components/sidebar/Sidebar.vue.js";
15
+ const ue = { class: "flex" }, me = { class: "flex items-center gap-0.5" }, ce = {
16
16
  key: 0,
17
17
  class: "relative flex items-center"
18
- }, ue = {
18
+ }, pe = {
19
19
  key: 0,
20
20
  class: "empty-sidebar-item-content overflow-hidden px-2.5 py-2.5"
21
- }, me = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, ce = { class: "flex flex-col gap-1.5 p-2" }, pe = { class: "text-sidebar-c-2 rounded border px-1.25 py-1 text-xs leading-none font-medium uppercase" }, Ie = /* @__PURE__ */ L({
21
+ }, ve = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, be = { class: "flex flex-col gap-1.5 p-2" }, fe = { class: "text-sidebar-c-2 rounded border px-1.25 py-1 text-xs leading-none font-medium uppercase" }, Ee = /* @__PURE__ */ V({
22
22
  __name: "AppSidebar",
23
23
  props: /* @__PURE__ */ W({
24
24
  layout: {},
@@ -38,242 +38,265 @@ const le = { class: "flex" }, de = {
38
38
  sidebarWidthModifiers: {}
39
39
  }),
40
40
  emits: /* @__PURE__ */ W(["click:workspace", "selectItem", "select:workspace", "create:workspace"], ["update:isSidebarOpen", "update:sidebarWidth"]),
41
- setup(a, { emit: A }) {
42
- const f = A, D = k(() => R(a.activeWorkspace.label)), M = h(a, "isSidebarOpen"), B = h(a, "sidebarWidth"), x = k(() => a.sidebarState.items.value.length <= 1), C = k(
43
- () => se({
44
- store: a.store,
45
- sidebarState: a.sidebarState
41
+ setup(o, { emit: N }) {
42
+ const k = N, K = S(() => j(o.activeWorkspace.label)), M = $(o, "isSidebarOpen"), h = $(o, "sidebarWidth"), x = S(() => o.sidebarState.items.value.length <= 1), C = S(
43
+ () => le({
44
+ store: o.store,
45
+ sidebarState: o.sidebarState
46
46
  })
47
- ), N = (o, e) => C.value.handleDragEnd(o, e), T = (o, e) => C.value.isDroppable(o, e), s = V(null), y = J(), K = k(() => {
48
- const o = s.value?.item;
49
- return o?.type === "document" ? "This cannot be undone. You're about to delete the document and all tags and operations inside it." : `Are you sure you want to delete this ${o?.type ?? "item"}? This action cannot be undone.`;
50
- }), z = () => {
51
- const o = s.value?.item;
52
- if (!o)
47
+ ), T = (a, e) => C.value.handleDragEnd(a, e), P = (a, e) => C.value.isDroppable(a, e), s = F(null), w = Q(), z = S(() => {
48
+ const a = s.value?.item;
49
+ return a?.type === "document" ? "This cannot be undone. You're about to delete the document and all tags and operations inside it." : `Are you sure you want to delete this ${a?.type ?? "item"}? This action cannot be undone.`;
50
+ }), q = () => {
51
+ const a = s.value?.item;
52
+ if (!a)
53
53
  return;
54
- const e = a.sidebarState.getEntryById(o.id), t = S("document", e), n = S("operation", e);
54
+ const e = o.sidebarState.getEntryById(a.id), t = g("document", e), n = g("operation", e);
55
55
  if (t) {
56
- if (o.type === "document")
57
- a.eventBus.emit("document:delete:document", { name: t.name });
58
- else if (o.type === "tag")
59
- a.eventBus.emit("tag:delete:tag", {
56
+ if (a.type === "document")
57
+ o.eventBus.emit("document:delete:document", { name: t.name });
58
+ else if (a.type === "tag")
59
+ o.eventBus.emit("tag:delete:tag", {
60
60
  documentName: t.name,
61
- name: o.name
61
+ name: a.name
62
62
  });
63
- else if (o.type === "operation") {
63
+ else if (a.type === "operation") {
64
64
  if (!n)
65
65
  return;
66
- a.eventBus.emit("operation:delete:operation", {
66
+ o.eventBus.emit("operation:delete:operation", {
67
67
  meta: {
68
68
  method: n.method,
69
69
  path: n.path
70
70
  },
71
71
  documentName: t.name
72
72
  });
73
- } else if (o.type === "example") {
73
+ } else if (a.type === "example") {
74
74
  if (!n)
75
75
  return;
76
- a.eventBus.emit("operation:delete:example", {
76
+ o.eventBus.emit("operation:delete:example", {
77
77
  meta: {
78
78
  method: n.method,
79
79
  path: n.path,
80
- exampleKey: o.name
80
+ exampleKey: a.name
81
81
  },
82
82
  documentName: t.name
83
83
  });
84
84
  }
85
- y.hide(), s.value = null;
85
+ w.hide(), s.value = null;
86
86
  }
87
- }, c = async (o, e) => {
87
+ }, v = async (a, e) => {
88
88
  if (s.value?.showMenu)
89
89
  return;
90
- const t = o.currentTarget;
91
- s.value = { item: e, el: t, showMenu: !0 }, await U();
92
- const n = o instanceof MouseEvent ? new MouseEvent(o.type, o) : new KeyboardEvent(o.type, o);
90
+ const t = a.currentTarget;
91
+ s.value = { item: e, el: t, showMenu: !0 }, await Y();
92
+ const n = a instanceof MouseEvent ? new MouseEvent(a.type, a) : new KeyboardEvent(a.type, a);
93
93
  s.value?.el.dispatchEvent(n);
94
- }, P = () => {
94
+ }, L = () => {
95
95
  s.value && (s.value.showMenu = !1);
96
- }, q = (o) => {
97
- const e = a.sidebarState.getEntryById(o.id), t = S("document", e), n = S("tag", e);
98
- a.eventBus.emit("ui:open:command-palette", {
96
+ }, R = (a) => {
97
+ const e = o.sidebarState.getEntryById(a.id), t = g("document", e), n = g("tag", e);
98
+ o.eventBus.emit("ui:open:command-palette", {
99
99
  action: "create-request",
100
100
  payload: {
101
101
  documentName: t?.name,
102
102
  tagId: n?.name
103
103
  }
104
104
  });
105
+ }, B = (a) => {
106
+ const e = o.sidebarState.getEntryById(a.id), t = g("document", e)?.name;
107
+ o.eventBus.emit("ui:navigate", {
108
+ page: "operation",
109
+ path: "overview",
110
+ operationPath: a.path,
111
+ method: a.method,
112
+ documentSlug: t
113
+ });
105
114
  };
106
- return (o, e) => (u(), p("div", le, [
107
- d(i(re), {
115
+ return (a, e) => (d(), b("div", ue, [
116
+ u(i(de), {
108
117
  isSidebarOpen: M.value,
109
118
  "onUpdate:isSidebarOpen": e[3] || (e[3] = (t) => M.value = t),
110
- sidebarWidth: B.value,
111
- "onUpdate:sidebarWidth": e[4] || (e[4] = (t) => B.value = t),
112
- activeWorkspace: a.activeWorkspace,
113
- documents: Object.values(a.store.workspace.documents),
114
- isDroppable: T,
115
- layout: a.layout,
116
- sidebarState: a.sidebarState,
117
- workspaces: a.workspaces,
118
- "onCreate:workspace": e[5] || (e[5] = (t) => f("create:workspace")),
119
- "onNavigate:to:settings": e[6] || (e[6] = (t) => a.eventBus.emit("ui:navigate", { page: "workspace", path: "settings" })),
120
- onReorder: e[7] || (e[7] = (t, n) => N(t, n)),
121
- "onSelect:workspace": e[8] || (e[8] = (t) => f("select:workspace", t)),
122
- onSelectItem: e[9] || (e[9] = (t) => f("selectItem", t))
123
- }, j({
124
- sidebarMenuActions: r(() => [
125
- G(o.$slots, "sidebarMenuActions", {}, void 0, !0)
119
+ sidebarWidth: h.value,
120
+ "onUpdate:sidebarWidth": e[4] || (e[4] = (t) => h.value = t),
121
+ activeWorkspace: o.activeWorkspace,
122
+ documents: Object.values(o.store.workspace.documents),
123
+ isDroppable: P,
124
+ layout: o.layout,
125
+ sidebarState: o.sidebarState,
126
+ workspaces: o.workspaces,
127
+ "onCreate:workspace": e[5] || (e[5] = (t) => k("create:workspace")),
128
+ "onNavigate:to:settings": e[6] || (e[6] = (t) => o.eventBus.emit("ui:navigate", { page: "workspace", path: "settings" })),
129
+ onReorder: e[7] || (e[7] = (t, n) => T(t, n)),
130
+ "onSelect:workspace": e[8] || (e[8] = (t) => k("select:workspace", t)),
131
+ onSelectItem: e[9] || (e[9] = (t) => k("selectItem", t))
132
+ }, G({
133
+ sidebarMenuActions: l(() => [
134
+ U(a.$slots, "sidebarMenuActions", {}, void 0, !0)
126
135
  ]),
127
- workspaceButton: r(() => [
128
- d(i($), {
136
+ workspaceButton: l(() => [
137
+ u(i(O), {
129
138
  is: "button",
130
- active: a.isWorkspaceOpen,
131
- onClick: e[0] || (e[0] = (t) => f("click:workspace"))
139
+ active: o.isWorkspaceOpen,
140
+ onClick: e[0] || (e[0] = (t) => k("click:workspace"))
132
141
  }, {
133
- default: r(() => [
134
- b(F(D.value), 1)
142
+ default: l(() => [
143
+ y(H(K.value), 1)
135
144
  ]),
136
145
  _: 1
137
146
  }, 8, ["active"])
138
147
  ]),
139
- decorator: r(({ item: t }) => [
140
- d(i(Y), {
141
- "aria-expanded": "false",
142
- "aria-haspopup": "menu",
143
- icon: i(_),
144
- label: "More options",
145
- size: "sm",
146
- weight: "bold",
147
- onClick: v((n) => c(n, t), ["stop"]),
148
- onKeydown: [
149
- g(v((n) => c(n, t), ["stop"]), ["down"]),
150
- g(v((n) => c(n, t), ["stop"]), ["enter"]),
151
- g(v((n) => c(n, t), ["stop"]), ["space"]),
152
- g(v((n) => c(n, t), ["stop"]), ["up"])
153
- ]
154
- }, null, 8, ["icon", "onClick", "onKeydown"])
148
+ decorator: l(({ item: t }) => [
149
+ r("div", me, [
150
+ t.type === "operation" ? (d(), f(i(E), {
151
+ key: 0,
152
+ icon: i(ee),
153
+ label: "Operation settings",
154
+ size: "sm",
155
+ weight: "bold",
156
+ onClick: m((n) => B(t), ["stop"]),
157
+ onKeydown: [
158
+ p(m((n) => B(t), ["stop"]), ["enter"]),
159
+ p(m((n) => B(t), ["stop"]), ["space"])
160
+ ]
161
+ }, null, 8, ["icon", "onClick", "onKeydown"])) : c("", !0),
162
+ u(i(E), {
163
+ "aria-expanded": "false",
164
+ "aria-haspopup": "menu",
165
+ icon: i(te),
166
+ label: "More options",
167
+ size: "sm",
168
+ weight: "bold",
169
+ onClick: m((n) => v(n, t), ["stop"]),
170
+ onKeydown: [
171
+ p(m((n) => v(n, t), ["stop"]), ["down"]),
172
+ p(m((n) => v(n, t), ["stop"]), ["enter"]),
173
+ p(m((n) => v(n, t), ["stop"]), ["space"]),
174
+ p(m((n) => v(n, t), ["stop"]), ["up"])
175
+ ]
176
+ }, null, 8, ["icon", "onClick", "onKeydown"])
177
+ ])
155
178
  ]),
156
- icon: r(({ item: t }) => [
157
- t.type === "document" && a.store.workspace.documents[t.name]?.["x-scalar-is-dirty"] === !0 ? (u(), p("div", de, [
158
- d(i(ee), {
179
+ icon: l(({ item: t }) => [
180
+ t.type === "document" && o.store.workspace.documents[t.name]?.["x-scalar-is-dirty"] === !0 ? (d(), b("div", ce, [
181
+ u(i(ae), {
159
182
  class: "block",
160
183
  src: "icon" in t && t.icon || "interface-content-folder"
161
184
  }, null, 8, ["src"]),
162
- e[12] || (e[12] = l("div", { class: "bg-orange absolute -top-1.25 -right-1.25 flex h-2.5 w-2.5 items-center justify-center rounded-full text-[9px] font-bold text-white" }, " ! ", -1))
163
- ])) : m("", !0)
185
+ e[12] || (e[12] = r("div", { class: "bg-orange absolute -top-1.25 -right-1.25 flex h-2.5 w-2.5 items-center justify-center rounded-full text-[9px] font-bold text-white" }, " ! ", -1))
186
+ ])) : c("", !0)
164
187
  ]),
165
- empty: r(({ item: t }) => [
166
- d(i($), {
188
+ empty: l(({ item: t }) => [
189
+ u(i(O), {
167
190
  is: "button",
168
- onClick: (n) => q(t)
191
+ onClick: (n) => R(t)
169
192
  }, {
170
- icon: r(() => [
171
- d(i(Z))
193
+ icon: l(() => [
194
+ u(i(_))
172
195
  ]),
173
- default: r(() => [...e[13] || (e[13] = [
174
- b("Add operation", -1)
196
+ default: l(() => [...e[13] || (e[13] = [
197
+ y("Add operation", -1)
175
198
  ])]),
176
199
  _: 1
177
200
  }, 8, ["onClick"])
178
201
  ]),
179
202
  _: 2
180
203
  }, [
181
- a.layout !== "modal" ? {
204
+ o.layout !== "modal" ? {
182
205
  name: "footer",
183
- fn: r(() => [
184
- l("div", {
185
- class: H({
206
+ fn: l(() => [
207
+ r("div", {
208
+ class: J({
186
209
  "empty-sidebar-item border-t": x.value
187
210
  })
188
211
  }, [
189
- x.value ? (u(), p("div", ue, [
190
- l("div", me, [
191
- d(O, {
192
- art: i(te),
212
+ x.value ? (d(), b("div", pe, [
213
+ r("div", ve, [
214
+ u(D, {
215
+ art: i(oe),
193
216
  class: "rabbitsit font-bold"
194
217
  }, null, 8, ["art"]),
195
- d(O, {
196
- art: i(ae),
218
+ u(D, {
219
+ art: i(ne),
197
220
  class: "rabbitjump absolute top-0 left-0 font-bold"
198
221
  }, null, 8, ["art"])
199
222
  ]),
200
- e[14] || (e[14] = l("div", { class: "mt-2 mb-2 text-center text-sm text-balance" }, [
201
- l("b", { class: "font-medium" }, "Let's Get Started"),
202
- l("p", { class: "mt-2 leading-3" }, " Create request, folder, collection or import from OpenAPI/Postman ")
223
+ e[14] || (e[14] = r("div", { class: "mt-2 mb-2 text-center text-sm text-balance" }, [
224
+ r("b", { class: "font-medium" }, "Let's Get Started"),
225
+ r("p", { class: "mt-2 leading-3" }, " Create request, folder, collection or import from OpenAPI/Postman ")
203
226
  ], -1))
204
- ])) : m("", !0),
205
- l("div", ce, [
206
- x.value ? (u(), w(i(E), {
227
+ ])) : c("", !0),
228
+ r("div", be, [
229
+ x.value ? (d(), f(i(A), {
207
230
  key: 0,
208
231
  class: "w-full",
209
232
  size: "sm",
210
- onClick: e[1] || (e[1] = (t) => a.eventBus.emit("ui:open:command-palette", {
233
+ onClick: e[1] || (e[1] = (t) => o.eventBus.emit("ui:open:command-palette", {
211
234
  action: "import-from-openapi-swagger-postman-curl",
212
235
  payload: void 0
213
236
  }))
214
237
  }, {
215
- default: r(() => [...e[15] || (e[15] = [
216
- b(" Import Collection ", -1)
238
+ default: l(() => [...e[15] || (e[15] = [
239
+ y(" Import Collection ", -1)
217
240
  ])]),
218
241
  _: 1
219
- })) : m("", !0),
220
- d(i(E), {
242
+ })) : c("", !0),
243
+ u(i(A), {
221
244
  class: "w-full",
222
245
  hotkey: "K",
223
246
  size: "sm",
224
247
  variant: "outlined",
225
- onClick: e[2] || (e[2] = (t) => a.eventBus.emit("ui:open:command-palette"))
248
+ onClick: e[2] || (e[2] = (t) => o.eventBus.emit("ui:open:command-palette"))
226
249
  }, {
227
- default: r(() => [
228
- e[21] || (e[21] = b(" Add Item   ", -1)),
229
- l("span", pe, [
230
- i(X)() ? (u(), p(I, { key: 0 }, [
231
- e[16] || (e[16] = l("span", { class: "sr-only" }, "Command", -1)),
232
- e[17] || (e[17] = l("span", { "aria-hidden": "true" }, "⌘", -1))
233
- ], 64)) : (u(), p(I, { key: 1 }, [
234
- e[18] || (e[18] = l("span", { class: "sr-only" }, "CTRL", -1)),
235
- e[19] || (e[19] = l("span", { "aria-hidden": "true" }, "⌃", -1))
250
+ default: l(() => [
251
+ e[21] || (e[21] = y(" Add Item   ", -1)),
252
+ r("span", fe, [
253
+ i(Z)() ? (d(), b(I, { key: 0 }, [
254
+ e[16] || (e[16] = r("span", { class: "sr-only" }, "Command", -1)),
255
+ e[17] || (e[17] = r("span", { "aria-hidden": "true" }, "⌘", -1))
256
+ ], 64)) : (d(), b(I, { key: 1 }, [
257
+ e[18] || (e[18] = r("span", { class: "sr-only" }, "CTRL", -1)),
258
+ e[19] || (e[19] = r("span", { "aria-hidden": "true" }, "⌃", -1))
236
259
  ], 64)),
237
- e[20] || (e[20] = b(" K ", -1))
260
+ e[20] || (e[20] = y(" K ", -1))
238
261
  ])
239
262
  ]),
240
263
  _: 1
241
264
  }),
242
- a.layout === "web" ? (u(), w(ne, { key: 1 })) : m("", !0)
265
+ o.layout === "web" ? (d(), f(se, { key: 1 })) : c("", !0)
243
266
  ])
244
267
  ], 2)
245
268
  ]),
246
269
  key: "0"
247
270
  } : void 0
248
271
  ]), 1032, ["isSidebarOpen", "sidebarWidth", "activeWorkspace", "documents", "layout", "sidebarState", "workspaces"]),
249
- s.value?.showMenu ? (u(), w(ie, {
272
+ s.value?.showMenu ? (d(), f(re, {
250
273
  key: 0,
251
- eventBus: a.eventBus,
274
+ eventBus: o.eventBus,
252
275
  item: s.value.item,
253
- sidebarState: a.sidebarState,
276
+ sidebarState: o.sidebarState,
254
277
  target: s.value.el,
255
- onCloseMenu: P,
256
- onShowDeleteModal: e[10] || (e[10] = (t) => i(y).show())
257
- }, null, 8, ["eventBus", "item", "sidebarState", "target"])) : m("", !0),
258
- s.value ? (u(), w(i(Q), {
278
+ onCloseMenu: L,
279
+ onShowDeleteModal: e[10] || (e[10] = (t) => i(w).show())
280
+ }, null, 8, ["eventBus", "item", "sidebarState", "target"])) : c("", !0),
281
+ s.value ? (d(), f(i(X), {
259
282
  key: 1,
260
283
  size: "xxs",
261
- state: i(y),
284
+ state: i(w),
262
285
  title: `Delete ${s.value.item.title}`
263
286
  }, {
264
- default: r(() => [
265
- d(oe, {
287
+ default: l(() => [
288
+ u(ie, {
266
289
  variableName: s.value.item.title,
267
- warningMessage: K.value,
268
- onClose: e[11] || (e[11] = (t) => i(y).hide()),
269
- onDelete: z
290
+ warningMessage: z.value,
291
+ onClose: e[11] || (e[11] = (t) => i(w).hide()),
292
+ onDelete: q
270
293
  }, null, 8, ["variableName", "warningMessage"])
271
294
  ]),
272
295
  _: 1
273
- }, 8, ["state", "title"])) : m("", !0)
296
+ }, 8, ["state", "title"])) : c("", !0)
274
297
  ]));
275
298
  }
276
299
  });
277
300
  export {
278
- Ie as default
301
+ Ee as default
279
302
  };
@@ -28,7 +28,7 @@ export type RouteProps = {
28
28
  };
29
29
  /** When in the collections pages */
30
30
  export type CollectionProps = RouteProps & ({
31
- collectionType: 'document';
31
+ collectionType: 'document' | 'operation';
32
32
  document: WorkspaceDocument;
33
33
  } | {
34
34
  collectionType: 'workspace';
@@ -41,14 +41,44 @@ export declare const ROUTES: ({
41
41
  children: ({
42
42
  path: string;
43
43
  children: ({
44
- name: string;
45
44
  path: string;
46
- component: import("vue").DefineComponent<RouteProps & {
47
- options?: import("../../modal/Modal.vue.js").ModalProps["options"];
48
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps & {
49
- options?: import("../../modal/Modal.vue.js").ModalProps["options"];
50
- }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
51
- children?: undefined;
45
+ children: ({
46
+ name: string;
47
+ path: string;
48
+ component: import("vue").DefineComponent<RouteProps & {
49
+ options?: import("../../modal/Modal.vue.js").ModalProps["options"];
50
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps & {
51
+ options?: import("../../modal/Modal.vue.js").ModalProps["options"];
52
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
53
+ redirect?: undefined;
54
+ children?: undefined;
55
+ } | {
56
+ name: string;
57
+ path: string;
58
+ component: import("vue").DefineComponent<RouteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
59
+ redirect: {
60
+ name: string;
61
+ };
62
+ children: {
63
+ name: string;
64
+ path: string;
65
+ component: import("vue").DefineComponent<(RouteProps & {
66
+ collectionType: "document" | "operation";
67
+ document: WorkspaceDocument;
68
+ }) | (RouteProps & {
69
+ collectionType: "workspace";
70
+ document: null;
71
+ }), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<(RouteProps & {
72
+ collectionType: "document" | "operation";
73
+ document: WorkspaceDocument;
74
+ }) | (RouteProps & {
75
+ collectionType: "workspace";
76
+ document: null;
77
+ })> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
78
+ }[];
79
+ })[];
80
+ name?: undefined;
81
+ component?: undefined;
52
82
  } | {
53
83
  name: string;
54
84
  path: string;
@@ -64,13 +94,13 @@ export declare const ROUTES: ({
64
94
  name: string;
65
95
  path: string;
66
96
  component: import("vue").DefineComponent<(RouteProps & {
67
- collectionType: "document";
97
+ collectionType: "document" | "operation";
68
98
  document: WorkspaceDocument;
69
99
  }) | (RouteProps & {
70
100
  collectionType: "workspace";
71
101
  document: null;
72
102
  }), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<(RouteProps & {
73
- collectionType: "document";
103
+ collectionType: "document" | "operation";
74
104
  document: WorkspaceDocument;
75
105
  }) | (RouteProps & {
76
106
  collectionType: "workspace";
@@ -89,13 +119,13 @@ export declare const ROUTES: ({
89
119
  name: string;
90
120
  path: string;
91
121
  component: import("vue").DefineComponent<(RouteProps & {
92
- collectionType: "document";
122
+ collectionType: "document" | "operation";
93
123
  document: WorkspaceDocument;
94
124
  }) | (RouteProps & {
95
125
  collectionType: "workspace";
96
126
  document: null;
97
127
  }), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<(RouteProps & {
98
- collectionType: "document";
128
+ collectionType: "document" | "operation";
99
129
  document: WorkspaceDocument;
100
130
  }) | (RouteProps & {
101
131
  collectionType: "workspace";
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAGlF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAA;AAW1G,OA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