@scalar/api-client 2.1.49 → 2.1.51

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 (52) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  3. package/dist/components/CodeInput/CodeInput.vue2.js +1 -1
  4. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  5. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  6. package/dist/components/Sidebar/SidebarListElementActions.vue.js +1 -1
  7. package/dist/components/TopNav/TopNav.vue.js +2 -2
  8. package/dist/components/TopNav/TopNav.vue2.js +7 -7
  9. package/dist/hooks/index.d.ts +0 -2
  10. package/dist/hooks/index.d.ts.map +1 -1
  11. package/dist/hooks/index.js +8 -12
  12. package/dist/layouts/App/ApiClientApp.vue.js +19 -19
  13. package/dist/layouts/App/create-api-client-app.d.ts +317 -151
  14. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  15. package/dist/layouts/Modal/create-api-client-modal.d.ts +634 -302
  16. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  17. package/dist/layouts/Web/ApiClientWeb.vue.js +20 -20
  18. package/dist/layouts/Web/create-api-client-web.d.ts +317 -151
  19. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  20. package/dist/libs/create-client.d.ts +310 -144
  21. package/dist/libs/create-client.d.ts.map +1 -1
  22. package/dist/store/collections.d.ts +134 -4
  23. package/dist/store/collections.d.ts.map +1 -1
  24. package/dist/store/cookies.d.ts +4 -4
  25. package/dist/store/environment.d.ts +4 -4
  26. package/dist/store/import-spec.d.ts +26 -0
  27. package/dist/store/import-spec.d.ts.map +1 -1
  28. package/dist/store/request-example.d.ts +22 -72
  29. package/dist/store/request-example.d.ts.map +1 -1
  30. package/dist/store/requests.d.ts +15 -15
  31. package/dist/store/requests.d.ts.map +1 -1
  32. package/dist/store/servers.d.ts +4 -4
  33. package/dist/store/store.d.ts +632 -300
  34. package/dist/store/store.d.ts.map +1 -1
  35. package/dist/store/tags.d.ts +34 -34
  36. package/dist/store/tags.d.ts.map +1 -1
  37. package/dist/style.css +1 -1
  38. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  39. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  40. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  41. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  42. package/dist/views/Request/RequestSection/RequestBody.vue2.js +20 -21
  43. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  44. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -1
  45. package/dist/views/Settings/SettingsGeneralMode.vue.js +38 -46
  46. package/package.json +5 -4
  47. package/dist/hooks/useClipboard.d.ts +0 -4
  48. package/dist/hooks/useClipboard.d.ts.map +0 -1
  49. package/dist/hooks/useClipboard.js +0 -14
  50. package/dist/hooks/useDarkModeState.d.ts +0 -8
  51. package/dist/hooks/useDarkModeState.d.ts.map +0 -1
  52. package/dist/hooks/useDarkModeState.js +0 -46
@@ -27,8 +27,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
27
27
  onInputFocus?: (() => any) | undefined;
28
28
  onInputBlur?: (() => any) | undefined;
29
29
  }>, {
30
- required: boolean;
31
30
  readOnly: boolean;
31
+ required: boolean;
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
33
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
34
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AAoDA,KAAK,WAAW,GAAG;IACf,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAqBJ,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;yBATpB,GAAG;sBACN,GAAG;;;;EAa7B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cAtJN,OAAO;cAEP,OAAO;6EA6JpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AAoDA,KAAK,WAAW,GAAG;IACf,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAqBJ,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;yBATpB,GAAG;sBACN,GAAG;;;;EAa7B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cApJN,OAAO;cAFP,OAAO;6EA+JpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"AAohBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AA00BF,wBAOG"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"AAmhBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAw0BF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-33e11d9f"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8da1a870"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as G, computed as w, ref as K, watch as S, openBlock as p, createBlock as b, withCtx as u, createTextVNode as q, toDisplayString as F, createVNode as s, unref as c, createElementVNode as x, createElementBlock as R, Fragment as Q, nextTick as Z } from "vue";
1
+ import { defineComponent as G, computed as w, ref as K, watch as S, openBlock as f, createBlock as b, withCtx as u, createTextVNode as q, toDisplayString as F, createVNode as s, unref as c, createElementVNode as x, createElementBlock as R, Fragment as Q, nextTick as Z } from "vue";
2
2
  import I from "../../../components/CodeInput/CodeInput.vue.js";
3
3
  import ee from "../../../components/DataTable/DataTable.vue.js";
4
4
  import ae from "../../../components/DataTable/DataTableHeader.vue.js";
@@ -7,9 +7,9 @@ import te from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
7
  import { ScalarListbox as oe, ScalarButton as _, ScalarIcon as L } from "@scalar/components";
8
8
  import { requestExampleParametersSchema as M } from "@scalar/oas-utils/entities/spec";
9
9
  import { canMethodHaveBody as ne } from "@scalar/oas-utils/helpers";
10
- import W from "./RequestTable.vue.js";
10
+ import A from "./RequestTable.vue.js";
11
11
  import { useWorkspace as le } from "../../../store/store.js";
12
- import { useFileDialog as A } from "../../../hooks/useFileDialog.js";
12
+ import { useFileDialog as W } from "../../../hooks/useFileDialog.js";
13
13
  const re = {
14
14
  key: 0,
15
15
  class: "text-c-3 flex min-h-10 w-full items-center justify-center p-2 text-sm"
@@ -144,7 +144,7 @@ const re = {
144
144
  encoding: "html",
145
145
  header: "application/html"
146
146
  } : { activeBody: "raw", encoding: void 0, header: void 0 }, C = (e) => {
147
- var f, y;
147
+ var p, y;
148
148
  if (!a.value) return;
149
149
  const { activeBody: t, encoding: o, header: l } = H(e);
150
150
  if (r.edit(
@@ -154,7 +154,7 @@ const re = {
154
154
  ), o && t === "raw")
155
155
  r.edit(a.value.uid, "body.raw", {
156
156
  encoding: o,
157
- value: ((f = a.value.body.raw) == null ? void 0 : f.value) ?? ""
157
+ value: ((p = a.value.body.raw) == null ? void 0 : p.value) ?? ""
158
158
  });
159
159
  else if (o && t === "formData")
160
160
  r.edit(a.value.uid, "body.formData", {
@@ -178,7 +178,7 @@ const re = {
178
178
  n
179
179
  );
180
180
  }, j = async (e) => {
181
- const { open: t } = A({
181
+ const { open: t } = W({
182
182
  onChange: async (o) => {
183
183
  const l = o == null ? void 0 : o[0];
184
184
  if (l && i.value && a.value) {
@@ -214,7 +214,7 @@ const re = {
214
214
  );
215
215
  }
216
216
  function X() {
217
- const { open: e } = A({
217
+ const { open: e } = W({
218
218
  onChange: async (t) => {
219
219
  const o = t == null ? void 0 : t[0];
220
220
  o && i.value && a.value && r.edit(
@@ -246,7 +246,7 @@ const re = {
246
246
  ) && E();
247
247
  },
248
248
  { immediate: !0 }
249
- ), (e, t) => (p(), b(te, null, {
249
+ ), (e, t) => (f(), b(te, null, {
250
250
  title: u(() => [
251
251
  q(F(e.title), 1)
252
252
  ]),
@@ -255,19 +255,18 @@ const re = {
255
255
  default: u(() => [
256
256
  s(k, null, {
257
257
  default: u(() => [
258
- s(ae, { class: "relative col-span-full flex h-8 cursor-pointer items-center px-[2.25px] py-[2.25px]" }, {
258
+ s(ae, { class: "relative col-span-full flex h-8 cursor-pointer items-center !p-0" }, {
259
259
  default: u(() => [
260
260
  s(c(oe), {
261
261
  modelValue: m.value,
262
262
  "onUpdate:modelValue": t[0] || (t[0] = (o) => m.value = o),
263
- class: "text-xxs w-full",
264
- fullWidth: "",
263
+ class: "text-xxs",
265
264
  options: c(h),
266
265
  teleport: ""
267
266
  }, {
268
267
  default: u(() => [
269
268
  s(c(_), {
270
- class: "flex gap-1.5 h-auto px-1.5 text-c-2 font-normal hover:text-c-1",
269
+ class: "flex gap-1.5 h-full px-2 text-c-2 font-normal hover:text-c-1",
271
270
  fullWidth: "",
272
271
  variant: "ghost"
273
272
  }, {
@@ -295,12 +294,12 @@ const re = {
295
294
  }),
296
295
  s(k, null, {
297
296
  default: u(() => {
298
- var o, l, n, d, f;
297
+ var o, l, n, d, p;
299
298
  return [
300
- m.value.id === "none" ? (p(), R("div", re, t[1] || (t[1] = [
299
+ m.value.id === "none" ? (f(), R("div", re, t[1] || (t[1] = [
301
300
  x("span", null, "No Body", -1)
302
- ]))) : m.value.id === "binaryFile" ? (p(), R("div", de, [
303
- (o = c(a)) != null && o.body.binary ? (p(), R(Q, { key: 0 }, [
301
+ ]))) : m.value.id === "binaryFile" ? (f(), R("div", de, [
302
+ (o = c(a)) != null && o.body.binary ? (f(), R(Q, { key: 0 }, [
304
303
  x("span", ie, F(((l = c(a)) == null ? void 0 : l.body.binary).name), 1),
305
304
  s(c(_), {
306
305
  class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1 shadow-none",
@@ -313,7 +312,7 @@ const re = {
313
312
  ])),
314
313
  _: 1
315
314
  })
316
- ], 64)) : (p(), b(c(_), {
315
+ ], 64)) : (f(), b(c(_), {
317
316
  key: 1,
318
317
  class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 shadow-none",
319
318
  size: "sm",
@@ -331,7 +330,7 @@ const re = {
331
330
  ]),
332
331
  _: 1
333
332
  }))
334
- ])) : m.value.id == "multipartForm" ? (p(), b(W, {
333
+ ])) : m.value.id == "multipartForm" ? (f(), b(A, {
335
334
  key: 2,
336
335
  ref_key: "tableWrapperRef",
337
336
  ref: g,
@@ -345,7 +344,7 @@ const re = {
345
344
  onToggleRow: P,
346
345
  onUpdateRow: T,
347
346
  onUploadFile: j
348
- }, null, 8, ["items"])) : m.value.id == "formUrlEncoded" ? (p(), b(W, {
347
+ }, null, 8, ["items"])) : m.value.id == "formUrlEncoded" ? (f(), b(A, {
349
348
  key: 3,
350
349
  ref_key: "tableWrapperRef",
351
350
  ref: g,
@@ -359,13 +358,13 @@ const re = {
359
358
  onToggleRow: P,
360
359
  onUpdateRow: T,
361
360
  onUploadFile: j
362
- }, null, 8, ["items"])) : (p(), b(I, {
361
+ }, null, 8, ["items"])) : (f(), b(I, {
363
362
  key: 4,
364
363
  content: "",
365
364
  language: O.value,
366
365
  lineNumbers: "",
367
366
  lint: "",
368
- modelValue: ((f = (d = (n = c(a)) == null ? void 0 : n.body) == null ? void 0 : d.raw) == null ? void 0 : f.value) ?? "",
367
+ modelValue: ((p = (d = (n = c(a)) == null ? void 0 : n.body) == null ? void 0 : d.raw) == null ? void 0 : p.value) ?? "",
369
368
  "onUpdate:modelValue": $
370
369
  }, null, 8, ["language", "modelValue"]))
371
370
  ];
@@ -16,7 +16,7 @@ const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, w = {
16
16
  a.commandPalette.emit({ commandName: "Create Request" });
17
17
  }, y = (i) => {
18
18
  i != null && i.createNew && v.name === "request" && f();
19
- }, h = "2.1.49";
19
+ }, h = "2.1.51";
20
20
  return b(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (l(), n("div", B, [
21
21
  o("div", {
22
22
  class: k(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsGeneralMode.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/SettingsGeneralMode.vue"],"names":[],"mappings":";AAuVA,wBAKG"}
1
+ {"version":3,"file":"SettingsGeneralMode.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/SettingsGeneralMode.vue"],"names":[],"mappings":";AAsSA,wBAKG"}
@@ -1,79 +1,71 @@
1
- import { defineComponent as y, ref as g, openBlock as l, createElementBlock as v, Fragment as h, createElementVNode as s, createVNode as a, unref as r, normalizeClass as n, withCtx as c, createBlock as d, createCommentVNode as u, createTextVNode as i } from "vue";
2
- import { ScalarButton as f, ScalarIcon as m } from "@scalar/components";
3
- import { useDarkModeState as w } from "../../hooks/useDarkModeState.js";
4
- const C = { class: "flex flex-col gap-2" }, S = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, M = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, D = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, B = /* @__PURE__ */ y({
1
+ import { defineComponent as b, openBlock as r, createElementBlock as k, Fragment as x, createElementVNode as o, createVNode as n, unref as t, normalizeClass as a, withCtx as d, createBlock as i, createCommentVNode as c, createTextVNode as f } from "vue";
2
+ import { ScalarButton as u, ScalarIcon as m } from "@scalar/components";
3
+ import { useColorMode as g } from "@scalar/use-hooks/useColorMode";
4
+ const y = { class: "flex flex-col gap-2" }, w = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, C = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, h = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, N = /* @__PURE__ */ b({
5
5
  __name: "SettingsGeneralMode",
6
- setup(_) {
7
- const { colorMode: k, setDarkMode: o } = w(), e = g("System Preference");
8
- k.value === "system" ? e.value = "System Preference" : k.value === "dark" ? e.value = "Dark" : e.value = "Light";
9
- const p = () => {
10
- o(null), e.value = "System Preference";
11
- }, b = () => {
12
- o(!1), e.value = "Light";
13
- }, x = () => {
14
- o(!0), e.value = "Dark";
15
- };
16
- return (P, t) => (l(), v(h, null, [
17
- t[3] || (t[3] = s("h3", { class: "font-bold mb-1 mt-8" }, "Appearance", -1)),
18
- t[4] || (t[4] = s("p", { class: "text-c-2 mb-4 leading-[21px]" }, " Choose between light, dark, or system-based appearance for your workspace. ", -1)),
19
- s("div", C, [
20
- a(r(f), {
21
- class: n([
6
+ setup(v) {
7
+ const { colorMode: s, setColorMode: l } = g();
8
+ return (j, e) => (r(), k(x, null, [
9
+ e[6] || (e[6] = o("h3", { class: "font-bold mb-1 mt-8" }, "Appearance", -1)),
10
+ e[7] || (e[7] = o("p", { class: "text-c-2 mb-4 leading-[21px]" }, " Choose between light, dark, or system-based appearance for your workspace. ", -1)),
11
+ o("div", y, [
12
+ n(t(u), {
13
+ class: a([
22
14
  "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border-1/2",
23
- e.value === "System Preference" ? "bg-b-2 text-c-1" : "bg-b-1"
15
+ t(s) === "system" ? "bg-b-2 text-c-1" : "bg-b-1"
24
16
  ]),
25
- onClick: p
17
+ onClick: e[0] || (e[0] = (p) => t(l)("system"))
26
18
  }, {
27
- default: c(() => [
28
- s("div", S, [
29
- e.value === "System Preference" ? (l(), d(r(m), {
19
+ default: d(() => [
20
+ o("div", w, [
21
+ t(s) === "system" ? (r(), i(t(m), {
30
22
  key: 0,
31
23
  icon: "Checkmark",
32
24
  size: "xs",
33
25
  thickness: "3.5"
34
- })) : u("", !0)
26
+ })) : c("", !0)
35
27
  ]),
36
- t[0] || (t[0] = i(" System Preference (default) "))
28
+ e[3] || (e[3] = f(" System Preference (default) "))
37
29
  ]),
38
30
  _: 1
39
31
  }, 8, ["class"]),
40
- a(r(f), {
41
- class: n([
32
+ n(t(u), {
33
+ class: a([
42
34
  "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border-1/2",
43
- e.value === "Light" ? "bg-b-2 text-c-1" : "bg-b-1"
35
+ t(s) === "light" ? "bg-b-2 text-c-1" : "bg-b-1"
44
36
  ]),
45
- onClick: b
37
+ onClick: e[1] || (e[1] = (p) => t(l)("light"))
46
38
  }, {
47
- default: c(() => [
48
- s("div", M, [
49
- e.value === "Light" ? (l(), d(r(m), {
39
+ default: d(() => [
40
+ o("div", C, [
41
+ t(s) === "light" ? (r(), i(t(m), {
50
42
  key: 0,
51
43
  icon: "Checkmark",
52
44
  size: "xs",
53
45
  thickness: "3.5"
54
- })) : u("", !0)
46
+ })) : c("", !0)
55
47
  ]),
56
- t[1] || (t[1] = i(" Light Mode Always "))
48
+ e[4] || (e[4] = f(" Light Mode Always "))
57
49
  ]),
58
50
  _: 1
59
51
  }, 8, ["class"]),
60
- a(r(f), {
61
- class: n([
52
+ n(t(u), {
53
+ class: a([
62
54
  "w-full shadow-none text-c-1 justify-start pl-2 gap-2 mb-8 border-1/2",
63
- e.value === "Dark" ? "bg-b-2 text-c-1" : "bg-b-1"
55
+ t(s) === "dark" ? "bg-b-2 text-c-1" : "bg-b-1"
64
56
  ]),
65
- onClick: x
57
+ onClick: e[2] || (e[2] = (p) => t(l)("dark"))
66
58
  }, {
67
- default: c(() => [
68
- s("div", D, [
69
- e.value === "Dark" ? (l(), d(r(m), {
59
+ default: d(() => [
60
+ o("div", h, [
61
+ t(s) === "dark" ? (r(), i(t(m), {
70
62
  key: 0,
71
63
  icon: "Checkmark",
72
64
  size: "xs",
73
65
  thickness: "3.5"
74
- })) : u("", !0)
66
+ })) : c("", !0)
75
67
  ]),
76
- t[2] || (t[2] = i(" Dark Mode Always "))
68
+ e[5] || (e[5] = f(" Dark Mode Always "))
77
69
  ]),
78
70
  _: 1
79
71
  }, 8, ["class"])
@@ -82,5 +74,5 @@ const C = { class: "flex flex-col gap-2" }, S = { class: "flex items-center just
82
74
  }
83
75
  });
84
76
  export {
85
- B as default
77
+ N as default
86
78
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.49",
21
+ "version": "2.1.51",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -155,17 +155,18 @@
155
155
  "whatwg-mimetype": "^4.0.0",
156
156
  "yaml": "^2.4.5",
157
157
  "zod": "^3.23.8",
158
- "@scalar/components": "0.12.69",
158
+ "@scalar/components": "0.12.71",
159
159
  "@scalar/draggable": "0.1.7",
160
160
  "@scalar/icons": "0.1.1",
161
161
  "@scalar/import": "0.1.1",
162
- "@scalar/oas-utils": "0.2.75",
162
+ "@scalar/oas-utils": "0.2.76",
163
163
  "@scalar/object-utils": "1.1.12",
164
164
  "@scalar/openapi-parser": "0.8.9",
165
165
  "@scalar/openapi-types": "0.1.5",
166
166
  "@scalar/themes": "0.9.48",
167
- "@scalar/use-codemirror": "0.11.36",
168
167
  "@scalar/types": "0.0.19",
168
+ "@scalar/use-codemirror": "0.11.38",
169
+ "@scalar/use-hooks": "0.1.0",
169
170
  "@scalar/use-toasts": "0.7.7",
170
171
  "@scalar/use-tooltip": "1.0.4"
171
172
  },
@@ -1,4 +0,0 @@
1
- export declare const useClipboard: () => {
2
- copyToClipboard: (value: string) => void;
3
- };
4
- //# sourceMappingURL=useClipboard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../src/hooks/useClipboard.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;6BAGS,MAAM;CAQvC,CAAA"}
@@ -1,14 +0,0 @@
1
- import { useToasts as r } from "@scalar/use-toasts";
2
- const a = () => {
3
- const { toast: o } = r();
4
- return {
5
- copyToClipboard: (t) => {
6
- navigator.clipboard.writeText(t).then(() => {
7
- o("Copied to the clipboard.", "info");
8
- });
9
- }
10
- };
11
- };
12
- export {
13
- a as useClipboard
14
- };
@@ -1,8 +0,0 @@
1
- /** This hook helps with retrieving the dark mode setting from local storage or from system settings. */
2
- export declare function useDarkModeState(): {
3
- colorMode: import("vue").Ref<"light" | "dark" | "system", "light" | "dark" | "system">;
4
- toggleDarkMode: () => void;
5
- setDarkMode: (value: boolean | null) => void;
6
- getSystemModePreference: () => boolean;
7
- };
8
- //# sourceMappingURL=useDarkModeState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDarkModeState.d.ts","sourceRoot":"","sources":["../../src/hooks/useDarkModeState.ts"],"names":[],"mappings":"AAIA,wGAAwG;AACxG,wBAAgB,gBAAgB;;;yBAYF,OAAO,GAAG,IAAI;;EA+E3C"}
@@ -1,46 +0,0 @@
1
- import { ref as r, watch as l, onMounted as s, onUnmounted as c } from "vue";
2
- const o = r("dark");
3
- function f() {
4
- const a = () => {
5
- var e;
6
- o.value = o.value === "dark" ? "light" : "dark", typeof window < "u" && ((e = window == null ? void 0 : window.localStorage) == null || e.setItem("colorMode", o.value));
7
- };
8
- function i(e) {
9
- var d;
10
- o.value = e === null ? "system" : e ? "dark" : "light", typeof window < "u" && ((d = window == null ? void 0 : window.localStorage) == null || d.setItem("colorMode", o.value));
11
- }
12
- const t = () => {
13
- var e;
14
- return typeof window < "u" && typeof (window == null ? void 0 : window.matchMedia) == "function" ? (e = window == null ? void 0 : window.matchMedia("(prefers-color-scheme: dark)")) == null ? void 0 : e.matches : !1;
15
- }, n = (e) => {
16
- typeof document < "u" && (e === null ? (document.body.classList.toggle("dark-mode", t()), document.body.classList.toggle("light-mode", !t())) : (document.body.classList.toggle("dark-mode", e === !0), document.body.classList.toggle("light-mode", e === !1)));
17
- };
18
- return o.value = typeof window > "u" ? "dark" : localStorage.getItem("colorMode") || "dark", n(
19
- o.value === "dark" || o.value === "system" && t()
20
- ), l(
21
- o,
22
- (e) => {
23
- n(
24
- e === "dark" || e === "system" && t()
25
- );
26
- },
27
- { immediate: !0 }
28
- ), s(() => {
29
- if (typeof window < "u" && typeof window.matchMedia == "function") {
30
- const e = window.matchMedia("(prefers-color-scheme: dark)"), d = () => {
31
- o.value === "system" && n(t());
32
- };
33
- e.addEventListener("change", d), c(() => {
34
- e.removeEventListener("change", d);
35
- });
36
- }
37
- }), {
38
- colorMode: o,
39
- toggleDarkMode: a,
40
- setDarkMode: i,
41
- getSystemModePreference: t
42
- };
43
- }
44
- export {
45
- f as useDarkModeState
46
- };