@scalar/api-client 2.1.35 → 2.1.36

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 (86) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  3. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +105 -119
  4. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  5. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  6. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +14 -14
  7. package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +15 -0
  8. package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +1 -0
  9. package/dist/components/CommandPalette/WatchModeToggle.vue.js +39 -0
  10. package/dist/components/CommandPalette/WatchModeToggle.vue2.js +4 -0
  11. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +1 -1
  12. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
  13. package/dist/components/ImportCollection/DropEventListener.vue.js +39 -33
  14. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
  15. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -20
  16. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +2 -0
  17. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  18. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +159 -100
  19. package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +5 -0
  20. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +2 -0
  21. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  22. package/dist/components/ImportCollection/ImportNowButton.vue.js +35 -31
  23. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +7 -0
  24. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -0
  25. package/dist/components/ImportCollection/IntegrationLogo.vue.js +46 -0
  26. package/dist/components/ImportCollection/IntegrationLogo.vue2.js +4 -0
  27. package/dist/components/ImportCollection/PrefetchError.vue.d.ts +8 -0
  28. package/dist/components/ImportCollection/PrefetchError.vue.d.ts.map +1 -0
  29. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +2 -2
  30. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -1
  31. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +7 -7
  32. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  33. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +2 -2
  34. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +29 -12
  35. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  36. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +34 -42
  37. package/dist/components/OpenApiClientButton.vue.d.ts +13 -0
  38. package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -0
  39. package/dist/components/OpenApiClientButton.vue.js +7 -0
  40. package/dist/components/OpenApiClientButton.vue2.js +36 -0
  41. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  42. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
  43. package/dist/components/index.d.ts +1 -0
  44. package/dist/components/index.d.ts.map +1 -1
  45. package/dist/components/index.js +4 -2
  46. package/dist/layouts/App/create-api-client-app.d.ts +58 -41
  47. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  48. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  49. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  50. package/dist/layouts/Modal/create-api-client-modal.d.ts +116 -82
  51. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  52. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  53. package/dist/layouts/Web/ApiClientWeb.vue.js +42 -38
  54. package/dist/layouts/Web/create-api-client-web.d.ts +58 -41
  55. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  56. package/dist/libs/create-client.d.ts +58 -41
  57. package/dist/libs/create-client.d.ts.map +1 -1
  58. package/dist/store/collections.d.ts +34 -24
  59. package/dist/store/collections.d.ts.map +1 -1
  60. package/dist/store/import-spec.d.ts +6 -4
  61. package/dist/store/import-spec.d.ts.map +1 -1
  62. package/dist/store/store.d.ts +116 -82
  63. package/dist/store/store.d.ts.map +1 -1
  64. package/dist/style.css +1 -1
  65. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  66. package/dist/views/Request/RequestSection/RequestSection.vue2.js +7 -7
  67. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  68. package/dist/views/Request/RequestSidebar.vue2.js +29 -29
  69. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  70. package/dist/views/Request/RequestSidebarItem.vue2.js +76 -76
  71. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +2 -2
  72. package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
  73. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +47 -47
  74. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  75. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  76. package/dist/views/Request/RequestSubpageHeader.vue2.js +67 -42
  77. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  78. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  79. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
  80. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
  81. package/dist/views/Request/components/WorkspaceDropdown.vue.js +1 -1
  82. package/dist/views/Request/hooks/useOpenApiWatcher.js +24 -24
  83. package/dist/views/Request/types/sidebar-item.d.ts +1 -1
  84. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  85. package/package.json +6 -6
  86. package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
@@ -1,21 +1,21 @@
1
- import { defineComponent as A, ref as L, watch as P, onMounted as K, onBeforeUnmount as j, openBlock as r, createElementBlock as w, Fragment as y, createBlock as p, unref as n, withKeys as G, withCtx as u, createVNode as o, createElementVNode as g, createCommentVNode as $, createTextVNode as N, toDisplayString as H } from "vue";
1
+ import { defineComponent as L, ref as P, watch as K, onMounted as F, onBeforeUnmount as j, openBlock as u, createElementBlock as w, Fragment as y, createBlock as p, unref as n, withKeys as G, withCtx as r, createVNode as o, createElementVNode as k, createCommentVNode as M, createTextVNode as N, toDisplayString as H } from "vue";
2
2
  import J from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
3
  import O from "../../components/Sidebar/Actions/EditSidebarListCollection.vue.js";
4
4
  import Q from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
5
5
  import { PathId as b } from "../../router.js";
6
- import { useModal as z, ScalarDropdown as X, ScalarDropdownItem as k, ScalarIcon as v, ScalarModal as F } from "@scalar/components";
6
+ import { useModal as z, ScalarDropdown as X, ScalarDropdownItem as g, ScalarIcon as v, ScalarModal as S } from "@scalar/components";
7
7
  import { useRouter as Y } from "vue-router";
8
8
  import { useWorkspace as Z } from "../../store/store.js";
9
- const ae = /* @__PURE__ */ A({
9
+ const ae = /* @__PURE__ */ L({
10
10
  __name: "RequestSidebarItemMenu",
11
11
  props: {
12
12
  menuItem: {}
13
13
  },
14
- emits: ["closeMenu", "toggleWatchForChanges"],
15
- setup(S, { emit: q }) {
16
- const a = S, h = q, { replace: C } = Y(), { activeWorkspace: E, activeRouterParams: M, events: x } = Z(), d = z(), I = z(), B = () => {
14
+ emits: ["closeMenu", "toggleWatchMode"],
15
+ setup(q, { emit: x }) {
16
+ const a = q, $ = x, { replace: E } = Y(), { activeWorkspace: h, activeRouterParams: C, events: B } = Z(), d = z(), I = z(), T = () => {
17
17
  var e;
18
- return x.commandPalette.emit({
18
+ return B.commandPalette.emit({
19
19
  commandName: "Add Example",
20
20
  metaData: {
21
21
  itemUid: (e = a.menuItem.item) == null ? void 0 : e.entity.uid
@@ -24,55 +24,55 @@ const ae = /* @__PURE__ */ A({
24
24
  }, R = (e, t) => {
25
25
  var m;
26
26
  (m = a.menuItem.item) == null || m.edit(e, t), d.hide();
27
- }, T = () => {
27
+ }, U = () => {
28
28
  var e, t, m;
29
- (e = a.menuItem.item) == null || e.delete(), M.value[b.Request] === ((t = a.menuItem.item) == null ? void 0 : t.entity.uid) && C(`/workspace/${E.value.uid}/request/default`), M.value[b.Examples] === ((m = a.menuItem.item) == null ? void 0 : m.entity.uid) && C(`/workspace/${E.value}/request/default`), I.hide();
30
- }, f = L(null);
31
- P([() => a.menuItem.open, f], async ([e]) => {
29
+ (e = a.menuItem.item) == null || e.delete(), C.value[b.Request] === ((t = a.menuItem.item) == null ? void 0 : t.entity.uid) && E(`/workspace/${h.value.uid}/request/default`), C.value[b.Examples] === ((m = a.menuItem.item) == null ? void 0 : m.entity.uid) && E(`/workspace/${h.value}/request/default`), I.hide();
30
+ }, f = P(null);
31
+ K([() => a.menuItem.open, f], async ([e]) => {
32
32
  var t, m;
33
33
  e && ((m = (t = f.value) == null ? void 0 : t.$parent) != null && m.$el) && f.value.$parent.$el.focus();
34
34
  });
35
- const D = () => a.menuItem.open && h("closeMenu");
36
- K(() => window.addEventListener("click", D)), j(() => window.removeEventListener("click", D));
37
- const U = () => {
38
- h("toggleWatchForChanges", a.menuItem.item);
35
+ const D = () => a.menuItem.open && $("closeMenu");
36
+ F(() => window.addEventListener("click", D)), j(() => window.removeEventListener("click", D));
37
+ const V = () => {
38
+ $("toggleWatchMode", a.menuItem.item);
39
39
  };
40
40
  return (e, t) => {
41
41
  var m, W;
42
- return r(), w(y, null, [
43
- e.menuItem.targetRef && e.menuItem.open ? (r(), p(n(X), {
42
+ return u(), w(y, null, [
43
+ e.menuItem.targetRef && e.menuItem.open ? (u(), p(n(X), {
44
44
  key: 0,
45
45
  static: "",
46
46
  targetRef: e.menuItem.targetRef,
47
47
  teleport: "",
48
48
  onKeydown: t[2] || (t[2] = G((l) => e.$emit("closeMenu"), ["escape"]))
49
49
  }, {
50
- items: u(() => {
50
+ items: r(() => {
51
51
  var l, s;
52
52
  return [
53
- ((l = e.menuItem.item) == null ? void 0 : l.entity.type) === "request" ? (r(), p(n(k), {
53
+ ((l = e.menuItem.item) == null ? void 0 : l.entity.type) === "request" ? (u(), p(n(g), {
54
54
  key: 0,
55
55
  class: "flex gap-2",
56
- onClick: B
56
+ onClick: T
57
57
  }, {
58
- default: u(() => [
58
+ default: r(() => [
59
59
  o(n(v), {
60
60
  class: "inline-flex",
61
61
  icon: "Example",
62
62
  size: "md",
63
63
  thickness: "1.5"
64
64
  }),
65
- t[6] || (t[6] = g("span", null, "Add Example", -1))
65
+ t[6] || (t[6] = k("span", null, "Add Example", -1))
66
66
  ]),
67
67
  _: 1
68
- })) : $("", !0),
69
- o(n(k), {
68
+ })) : M("", !0),
69
+ o(n(g), {
70
70
  ref_key: "menuRef",
71
71
  ref: f,
72
72
  class: "flex gap-2",
73
73
  onClick: t[0] || (t[0] = (i) => n(d).show())
74
74
  }, {
75
- default: u(() => {
75
+ default: r(() => {
76
76
  var i;
77
77
  return [
78
78
  o(n(v), {
@@ -81,10 +81,10 @@ const ae = /* @__PURE__ */ A({
81
81
  size: "md",
82
82
  thickness: "1.5"
83
83
  }),
84
- g("span", null, [
85
- ((i = e.menuItem.item) == null ? void 0 : i.entity.type) === "collection" ? (r(), w(y, { key: 0 }, [
84
+ k("span", null, [
85
+ ((i = e.menuItem.item) == null ? void 0 : i.entity.type) === "collection" ? (u(), w(y, { key: 0 }, [
86
86
  N(" Edit ")
87
- ], 64)) : (r(), w(y, { key: 1 }, [
87
+ ], 64)) : (u(), w(y, { key: 1 }, [
88
88
  N(" Rename ")
89
89
  ], 64))
90
90
  ])
@@ -92,82 +92,82 @@ const ae = /* @__PURE__ */ A({
92
92
  }),
93
93
  _: 1
94
94
  }, 512),
95
- (s = e.menuItem.item) != null && s.documentUrl ? (r(), p(n(k), {
95
+ (s = e.menuItem.item) != null && s.documentUrl ? (u(), p(n(g), {
96
96
  key: 1,
97
97
  ref_key: "menuRef",
98
98
  ref: f,
99
99
  class: "flex gap-2",
100
- onClick: U
100
+ onClick: V
101
101
  }, {
102
- default: u(() => {
102
+ default: r(() => {
103
103
  var i, c;
104
104
  return [
105
105
  o(n(v), {
106
106
  class: "inline-flex",
107
- icon: (i = e.menuItem.item) != null && i.watchForChanges ? "Unwatch" : "Watch",
107
+ icon: (i = e.menuItem.item) != null && i.watchMode ? "Unwatch" : "Watch",
108
108
  size: "md",
109
109
  thickness: "1.5"
110
110
  }, null, 8, ["icon"]),
111
- g("span", null, H((c = e.menuItem.item) != null && c.watchForChanges ? "Disable Watch Mode" : "Enable Watch Mode"), 1)
111
+ k("span", null, H((c = e.menuItem.item) != null && c.watchMode ? "Disable Watch Mode" : "Enable Watch Mode"), 1)
112
112
  ];
113
113
  }),
114
114
  _: 1
115
- }, 512)) : $("", !0),
116
- o(n(k), {
115
+ }, 512)) : M("", !0),
116
+ o(n(g), {
117
117
  class: "flex gap-2",
118
118
  onClick: t[1] || (t[1] = (i) => n(I).show())
119
119
  }, {
120
- default: u(() => [
120
+ default: r(() => [
121
121
  o(n(v), {
122
122
  class: "inline-flex",
123
123
  icon: "Delete",
124
124
  size: "md",
125
125
  thickness: "1.5"
126
126
  }),
127
- t[7] || (t[7] = g("span", null, "Delete", -1))
127
+ t[7] || (t[7] = k("span", null, "Delete", -1))
128
128
  ]),
129
129
  _: 1
130
130
  })
131
131
  ];
132
132
  }),
133
133
  _: 1
134
- }, 8, ["targetRef"])) : $("", !0),
135
- o(n(F), {
134
+ }, 8, ["targetRef"])) : M("", !0),
135
+ o(n(S), {
136
136
  size: "xxs",
137
137
  state: n(I),
138
138
  title: `Delete ${(m = e.menuItem.item) == null ? void 0 : m.resourceTitle}`
139
139
  }, {
140
- default: u(() => {
140
+ default: r(() => {
141
141
  var l, s;
142
142
  return [
143
143
  o(J, {
144
144
  variableName: ((l = e.menuItem.item) == null ? void 0 : l.title) ?? "",
145
145
  warningMessage: (s = e.menuItem.item) == null ? void 0 : s.warning,
146
146
  onClose: t[3] || (t[3] = (i) => n(I).hide()),
147
- onDelete: T
147
+ onDelete: U
148
148
  }, null, 8, ["variableName", "warningMessage"])
149
149
  ];
150
150
  }),
151
151
  _: 1
152
152
  }, 8, ["state", "title"]),
153
- o(n(F), {
153
+ o(n(S), {
154
154
  size: "xxs",
155
155
  state: n(d),
156
156
  title: `Edit ${(W = e.menuItem.item) == null ? void 0 : W.resourceTitle}`
157
157
  }, {
158
- default: u(() => {
158
+ default: r(() => {
159
159
  var l, s, i, c;
160
160
  return [
161
- ((l = e.menuItem.item) == null ? void 0 : l.resourceTitle) === "Collection" ? (r(), p(O, {
161
+ ((l = e.menuItem.item) == null ? void 0 : l.resourceTitle) === "Collection" ? (u(), p(O, {
162
162
  key: 0,
163
163
  icon: ((s = e.menuItem.item) == null ? void 0 : s.icon) || "interface-content-folder",
164
164
  name: (i = e.menuItem.item) == null ? void 0 : i.title,
165
- onClose: t[4] || (t[4] = (V) => n(d).hide()),
165
+ onClose: t[4] || (t[4] = (A) => n(d).hide()),
166
166
  onEdit: R
167
- }, null, 8, ["icon", "name"])) : (r(), p(Q, {
167
+ }, null, 8, ["icon", "name"])) : (u(), p(Q, {
168
168
  key: 1,
169
169
  name: ((c = e.menuItem.item) == null ? void 0 : c.title) ?? "",
170
- onClose: t[5] || (t[5] = (V) => n(d).hide()),
170
+ onClose: t[5] || (t[5] = (A) => n(d).hide()),
171
171
  onEdit: R
172
172
  }, null, 8, ["name"]))
173
173
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":";gBAuEc,OAAO;gBACP,OAAO;;;;;;gBADP,OAAO;gBACP,OAAO;;;;;;AAiNrB,wBAWG"}
1
+ {"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":";gBAsGc,OAAO;gBACP,OAAO;;;;;;gBADP,OAAO;gBACP,OAAO;;;;;;AAwQrB,wBAWG"}
@@ -1,7 +1,7 @@
1
1
  import e from "./RequestSubpageHeader.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-89f09c6b"]]);
4
+ const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-98729408"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,52 +1,77 @@
1
- import { defineComponent as i, openBlock as l, createElementBlock as n, createElementVNode as r, createVNode as m, createBlock as s, unref as d, createCommentVNode as a } from "vue";
2
- import p from "../../components/AddressBar/AddressBar.vue.js";
3
- import u from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
4
- import f from "../../components/Sidebar/SidebarToggle.vue.js";
5
- import { ScalarIcon as c } from "@scalar/components";
6
- import b from "./components/WorkspaceDropdown.vue.js";
7
- const g = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, y = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, k = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, $ = /* @__PURE__ */ i({
1
+ import { defineComponent as b, openBlock as l, createElementBlock as s, createElementVNode as d, createVNode as i, createBlock as a, unref as t, createCommentVNode as n } from "vue";
2
+ import c from "../../components/AddressBar/AddressBar.vue.js";
3
+ import k from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
4
+ import y from "../../components/Sidebar/SidebarToggle.vue.js";
5
+ import { ScalarIcon as g } from "@scalar/components";
6
+ import h from "./components/WorkspaceDropdown.vue.js";
7
+ import C from "../../components/OpenApiClientButton.vue.js";
8
+ import { useWorkspace as v } from "../../store/store.js";
9
+ const w = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, V = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, x = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, z = /* @__PURE__ */ b({
8
10
  __name: "RequestSubpageHeader",
9
11
  props: {
10
12
  modelValue: { type: Boolean },
11
13
  isReadonly: { type: Boolean }
12
14
  },
13
15
  emits: ["update:modelValue", "hideModal", "importCurl"],
14
- setup(x) {
15
- return (o, e) => (l(), n("div", g, [
16
- r("div", y, [
17
- m(f, {
18
- class: "gitbook-hidden",
19
- modelValue: o.modelValue,
20
- "onUpdate:modelValue": e[0] || (e[0] = (t) => o.$emit("update:modelValue", t))
21
- }, null, 8, ["modelValue"]),
22
- o.isReadonly ? a("", !0) : (l(), s(d(b), { key: 0 })),
23
- e[3] || (e[3] = r("a", {
24
- class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
25
- href: "https://scalar.com/",
26
- target: "_blank"
27
- }, " Powered by Scalar.com ", -1))
28
- ]),
29
- m(p, {
30
- onImportCurl: e[1] || (e[1] = (t) => o.$emit("importCurl", t))
31
- }),
32
- r("div", k, [
33
- o.isReadonly ? a("", !0) : (l(), s(u, { key: 0 })),
34
- o.isReadonly ? (l(), n("button", {
35
- key: 1,
36
- class: "text-c-1 hover:bg-b-2 active:text-c-1 p-2 rounded -mr-1.5",
37
- type: "button",
38
- onClick: e[2] || (e[2] = (t) => o.$emit("hideModal"))
39
- }, [
40
- m(d(c), {
41
- icon: "Close",
42
- size: "md",
43
- thickness: "1.75"
44
- })
45
- ])) : a("", !0)
46
- ])
47
- ]));
16
+ setup($) {
17
+ const { activeCollection: m } = v();
18
+ return (e, o) => {
19
+ var p, u, f;
20
+ return l(), s("div", w, [
21
+ d("div", V, [
22
+ i(y, {
23
+ class: "gitbook-hidden",
24
+ modelValue: e.modelValue,
25
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => e.$emit("update:modelValue", r))
26
+ }, null, 8, ["modelValue"]),
27
+ e.isReadonly ? n("", !0) : (l(), a(t(h), { key: 0 })),
28
+ o[4] || (o[4] = d("a", {
29
+ class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
30
+ href: "https://scalar.com/",
31
+ target: "_blank"
32
+ }, " Powered by Scalar.com ", -1))
33
+ ]),
34
+ i(c, {
35
+ onImportCurl: o[1] || (o[1] = (r) => e.$emit("importCurl", r))
36
+ }),
37
+ d("div", x, [
38
+ e.isReadonly ? n("", !0) : (l(), a(k, { key: 0 })),
39
+ e.isReadonly && ((p = t(m)) != null && p.documentUrl) ? (l(), a(t(C), {
40
+ key: 1,
41
+ buttonSource: "modal",
42
+ class: "gitbook-hidden !w-fit lg:-mr-1",
43
+ integration: (u = t(m)) == null ? void 0 : u.integration,
44
+ url: (f = t(m)) == null ? void 0 : f.documentUrl
45
+ }, null, 8, ["integration", "url"])) : n("", !0),
46
+ e.isReadonly ? (l(), s("button", {
47
+ key: 2,
48
+ class: "app-exit-button p-2 rounded-full fixed right-2 top-2 gitbook-hidden",
49
+ type: "button",
50
+ onClick: o[2] || (o[2] = (r) => e.$emit("hideModal"))
51
+ }, [
52
+ i(t(g), {
53
+ icon: "Close",
54
+ size: "lg",
55
+ thickness: "2"
56
+ })
57
+ ])) : n("", !0),
58
+ e.isReadonly ? (l(), s("button", {
59
+ key: 3,
60
+ class: "text-c-1 hover:bg-b-2 active:text-c-1 p-2 rounded -mr-1.5 gitbook-show",
61
+ type: "button",
62
+ onClick: o[3] || (o[3] = (r) => e.$emit("hideModal"))
63
+ }, [
64
+ i(t(g), {
65
+ icon: "Close",
66
+ size: "md",
67
+ thickness: "1.75"
68
+ })
69
+ ])) : n("", !0)
70
+ ])
71
+ ]);
72
+ };
48
73
  }
49
74
  });
50
75
  export {
51
- $ as default
76
+ z as default
52
77
  };
@@ -14,7 +14,7 @@ const v = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, V = { cl
14
14
  s.commandPalette.emit({ commandName: "Create Request" });
15
15
  }, c = (n) => {
16
16
  n != null && n.createNew && x.name === "request" && m();
17
- }, y = "2.1.35";
17
+ }, y = "2.1.36";
18
18
  return R(() => s.hotKeys.on(c)), g(() => s.hotKeys.off(c)), (n, e) => (a(), l("div", v, [
19
19
  t("div", V, [
20
20
  o(f).isReadOnly ? u("", !0) : (a(), l("div", B, [
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA8JA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAkPxC,wBAMG"}
1
+ {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA4JA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAmPxC,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseSection.vue2.js";
2
2
  /* empty css */
3
- import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9b7fd1f2"]]);
3
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-f15e1ace"]]);
5
5
  export {
6
- r as default
6
+ s as default
7
7
  };
@@ -50,7 +50,7 @@ const N = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-
50
50
  return (e, o) => (n(), r(g, null, {
51
51
  title: d(() => [
52
52
  p("div", {
53
- class: B(["flex items-center flex-1", {
53
+ class: B(["flex items-center flex-1 h-8", {
54
54
  "animate-response-heading": e.response
55
55
  }])
56
56
  }, [
@@ -159,7 +159,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
159
159
  ]),
160
160
  default: n(() => [
161
161
  s(e(S), {
162
- class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-3 hover:bg-b-2 w-fit",
162
+ class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
163
163
  fullWidth: "",
164
164
  variant: "ghost"
165
165
  }, {
@@ -1,43 +1,43 @@
1
1
  import { specDictionary as u } from "../../../store/import-spec.js";
2
- import { combineRenameDiffs as y, mutateCollectionDiff as A, mutateSecuritySchemeDiff as R, mutateServerDiff as S, mutateTagDiff as D, mutateRequestDiff as E } from "../libs/live-sync.js";
3
- import { fetchSpecFromUrl as C, createHash as T } from "@scalar/oas-utils/helpers";
2
+ import { combineRenameDiffs as A, mutateCollectionDiff as R, mutateSecuritySchemeDiff as S, mutateServerDiff as d, mutateTagDiff as g, mutateRequestDiff as D } from "../libs/live-sync.js";
3
+ import { fetchSpecFromUrl as E, createHash as T } from "@scalar/oas-utils/helpers";
4
4
  import { parseSchema as l } from "@scalar/oas-utils/transforms";
5
- import { useToasts as d } from "@scalar/use-toasts";
6
- import { useTimeoutPoll as F } from "@vueuse/core";
7
- import I from "microdiff";
8
- import { watch as U } from "vue";
5
+ import { useToasts as M } from "@scalar/use-toasts";
6
+ import { useTimeoutPoll as I } from "@vueuse/core";
7
+ import U from "microdiff";
8
+ import { watch as C } from "vue";
9
9
  import { useWorkspace as L } from "../../../store/store.js";
10
10
  const N = 5 * 1e3, b = 60 * 1e3, V = () => {
11
- const { toast: h } = d(), c = L(), { activeCollection: t, activeWorkspace: g, collectionMutators: i } = c, o = (e) => h(
11
+ const { toast: f } = M(), c = L(), { activeCollection: t, activeWorkspace: v, collectionMutators: i } = c, o = (e) => f(
12
12
  `[useOpenApiWatcher] Changes to the ${e} were not applied`,
13
13
  "error"
14
- ), v = (e) => {
15
- e.path[0] === "info" || e.path[0] === "security" ? A(e, c) || o("collection") : e.path[0] === "components" && e.path[1] === "securitySchemes" ? R(e, c) || o("securitySchemes") : e.path[0] === "servers" ? S(e, c) || o("servers") : e.path[0] === "tags" ? D(e, c) || o("tags") : e.path[0] === "paths" && (E(e, c) || o("requests"));
16
- }, { pause: f, resume: p } = F(async () => {
14
+ ), O = (e) => {
15
+ e.path[0] === "info" || e.path[0] === "security" ? R(e, c) || o("collection") : e.path[0] === "components" && e.path[1] === "securitySchemes" ? S(e, c) || o("securitySchemes") : e.path[0] === "servers" ? d(e, c) || o("servers") : e.path[0] === "tags" ? g(e, c) || o("tags") : e.path[0] === "paths" && (D(e, c) || o("requests"));
16
+ }, { pause: h, resume: p } = I(async () => {
17
17
  var m;
18
18
  const e = (m = t.value) == null ? void 0 : m.documentUrl;
19
19
  if (!e) return;
20
20
  const s = u[e];
21
21
  try {
22
- const r = await C(
22
+ const r = await E(
23
23
  e,
24
- g.value.proxyUrl,
24
+ v.value.proxyUrl,
25
25
  !1
26
26
  ), n = T(r);
27
27
  if (i.edit(
28
28
  t.value.uid,
29
- "watchForChangesStatus",
29
+ "watchModeStatus",
30
30
  "WATCHING"
31
31
  ), s != null && s.hash)
32
32
  if (s.hash && s.hash !== n) {
33
- const { schema: a } = await l(r), O = I(s.schema, a), W = y(O);
33
+ const { schema: a } = await l(r), W = U(s.schema, a), w = A(W);
34
34
  try {
35
- W.forEach(v), u[e] = {
35
+ w.forEach(O), u[e] = {
36
36
  hash: n,
37
37
  schema: a
38
38
  };
39
- } catch (w) {
40
- console.error("[useOpenApiWatcher] Error:", w);
39
+ } catch (y) {
40
+ console.error("[useOpenApiWatcher] Error:", y);
41
41
  }
42
42
  } else console.log("[useOpenApiWatcher] No changes detected yet…");
43
43
  else {
@@ -48,11 +48,11 @@ const N = 5 * 1e3, b = 60 * 1e3, V = () => {
48
48
  });
49
49
  }
50
50
  } catch (r) {
51
- console.error("[useOpenApiWatcher] Error:", r), console.info("[useOpenApiWatcher] Pausing watcher for 60 seconds"), f(), i.edit(
51
+ console.error("[useOpenApiWatcher] Error:", r), console.info("[useOpenApiWatcher] Pausing watcher for 60 seconds"), h(), i.edit(
52
52
  t.value.uid,
53
- "watchForChangesStatus",
53
+ "watchModeStatus",
54
54
  "ERROR"
55
- ), h(
55
+ ), f(
56
56
  "[useOpenApiWatcher] Unable to fetch the spec file, paused the watcher for 60 seconds",
57
57
  "error"
58
58
  ), setTimeout(() => {
@@ -60,7 +60,7 @@ const N = 5 * 1e3, b = 60 * 1e3, V = () => {
60
60
  }, b);
61
61
  }
62
62
  }, N);
63
- U(
63
+ C(
64
64
  [
65
65
  () => {
66
66
  var e;
@@ -68,13 +68,13 @@ const N = 5 * 1e3, b = 60 * 1e3, V = () => {
68
68
  },
69
69
  () => {
70
70
  var e;
71
- return (e = t.value) == null ? void 0 : e.watchForChanges;
71
+ return (e = t.value) == null ? void 0 : e.watchMode;
72
72
  }
73
73
  ],
74
74
  ([e, s]) => {
75
- e && s ? (console.info(`[useOpenApiWatcher] Watching ${e} …`), p()) : t.value && (f(), i.edit(
75
+ e && s ? (console.info(`[useOpenApiWatcher] Watching ${e} …`), p()) : t.value && (h(), i.edit(
76
76
  t.value.uid,
77
- "watchForChangesStatus",
77
+ "watchModeStatus",
78
78
  "IDLE"
79
79
  ));
80
80
  },
@@ -11,7 +11,7 @@ export type SidebarItem = {
11
11
  edit: (name: string, icon?: string) => void;
12
12
  delete: () => void;
13
13
  documentUrl?: string;
14
- watchForChanges?: boolean;
14
+ watchMode?: boolean;
15
15
  };
16
16
  export type SidebarMenuItem = {
17
17
  /** The resource which we are opening the menu for */
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/sidebar-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,GAAG,EACJ,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO,GAAG,cAAc,CAAA;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,OAAO,CAAA;CACd,CAAA"}
1
+ {"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/sidebar-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,GAAG,EACJ,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO,GAAG,cAAc,CAAA;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,OAAO,CAAA;CACd,CAAA"}
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.35",
21
+ "version": "2.1.36",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -153,16 +153,16 @@
153
153
  "whatwg-mimetype": "^4.0.0",
154
154
  "yaml": "^2.4.5",
155
155
  "zod": "^3.23.8",
156
- "@scalar/components": "0.12.61",
156
+ "@scalar/components": "0.12.62",
157
157
  "@scalar/draggable": "0.1.6",
158
158
  "@scalar/icons": "0.1.1",
159
- "@scalar/oas-utils": "0.2.62",
159
+ "@scalar/oas-utils": "0.2.63",
160
160
  "@scalar/object-utils": "1.1.10",
161
- "@scalar/openapi-types": "0.1.4",
162
161
  "@scalar/openapi-parser": "0.8.8",
163
- "@scalar/themes": "0.9.43",
162
+ "@scalar/themes": "0.9.44",
164
163
  "@scalar/types": "0.0.17",
165
- "@scalar/use-codemirror": "0.11.28",
164
+ "@scalar/use-codemirror": "0.11.29",
165
+ "@scalar/openapi-types": "0.1.4",
166
166
  "@scalar/use-toasts": "0.7.7",
167
167
  "@scalar/use-tooltip": "1.0.3"
168
168
  },
@@ -1,4 +0,0 @@
1
- import f from "./ImportCollectionModal.vue.js";
2
- export {
3
- f as default
4
- };