@scalar/api-client 2.21.1 → 2.22.1

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 (37) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
  3. package/dist/components/OpenApiClientButton.vue.js +2 -2
  4. package/dist/components/OpenApiClientButton.vue2.js +1 -1
  5. package/dist/hooks/useClientConfig.d.ts +9 -0
  6. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  7. package/dist/layouts/App/create-api-client-app.d.ts +2 -2
  8. package/dist/layouts/Web/create-api-client-web.d.ts +2 -2
  9. package/dist/libs/create-client.d.ts +2 -2
  10. package/dist/store/request-example.d.ts +2 -2
  11. package/dist/store/store.d.ts +2 -2
  12. package/dist/style.css +1 -1
  13. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +2 -2
  14. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  15. package/dist/v2/blocks/operation-block/helpers/get-example.js +29 -22
  16. package/dist/v2/blocks/operation-block/index.d.ts +1 -0
  17. package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
  18. package/dist/v2/blocks/operation-block/index.js +2 -0
  19. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  20. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +3 -2
  21. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  22. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +96 -78
  23. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue3.js +5 -0
  24. package/dist/v2/features/app/App.vue.d.ts +3 -1
  25. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  26. package/dist/v2/features/app/App.vue.js +46 -43
  27. package/dist/v2/features/app/index.d.ts +3 -0
  28. package/dist/v2/features/app/index.d.ts.map +1 -1
  29. package/dist/v2/features/app/index.js +17 -11
  30. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  31. package/dist/v2/features/modal/Modal.vue.js +2 -2
  32. package/dist/v2/features/modal/Modal.vue2.js +17 -15
  33. package/dist/v2/features/operation/Operation.vue.js +1 -1
  34. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
  35. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  36. package/package.json +14 -14
  37. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AA6YA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAExE,OAAO,EASL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAA;AAIZ,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAIxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAKxD,MAAM,MAAM,UAAU,GAAG;IACvB,4DAA4D;IAC5D,cAAc,EAAE,cAAc,CAAA;IAC9B,qDAAqD;IACrD,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,4CAA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EAAE,cAAc,CAAA;IAC9B,qDAAqD;IACrD,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,4CAA4C;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,mDAAmD;IACnD,MAAM,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC3C,yDAAyD;IACzD,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,2CAA2C;IAC3C,UAAU,EAAE,UAAU,CAAA;IACtB,0DAA0D;IAC1D,YAAY,EAAE,qBAAqB,CAAA;IACnC,iDAAiD;IACjD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,wDAAwD;IACxD,OAAO,EAAE,gBAAgB,CACvB,OAAO,CACL,IAAI,CACF,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,SAAS,CACZ,CACF,CACF,CAAA;CACF,CAAA;AAED;;;;GAIG;;;;;AACH,wBA0WC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Modal.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-9f4696a7"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b54530a3"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as W, ref as w, useId as I, watch as N, nextTick as D, onBeforeMount as E, onBeforeUnmount as F, computed as d, toValue as U, withDirectives as k, createElementBlock as u, openBlock as m, createElementVNode as i, unref as o, createVNode as l, withCtx as V, vShow as b } from "vue";
1
+ import { defineComponent as W, ref as w, useId as D, watch as I, nextTick as N, onBeforeMount as E, onBeforeUnmount as F, computed as d, toValue as U, withDirectives as k, createElementBlock as u, openBlock as m, createElementVNode as s, unref as o, createVNode as l, withCtx as V, vShow as b } from "vue";
2
2
  import { addScalarClassesToHeadless as A, ScalarTeleportRoot as $ } from "@scalar/components";
3
3
  import { ScalarToasts as z } from "@scalar/use-toasts";
4
4
  import { useFocusTrap as H } from "@vueuse/integrations/useFocusTrap";
@@ -44,20 +44,22 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
44
44
  modalState: e.modalState,
45
45
  store: e.workspaceStore
46
46
  }), j(e.eventBus, "modal");
47
- const v = w(null), f = I(), { activate: p, deactivate: y } = H(v, {
47
+ const v = w(null), f = D(), { activate: y, deactivate: B } = H(v, {
48
48
  allowOutsideClick: !0,
49
49
  fallbackFocus: `#${f}`
50
50
  }), S = () => {
51
- y(), e.eventBus.emit("operation:cancel:request");
52
- }, B = q(() => typeof window < "u" ? window.document.body : null);
53
- N(
51
+ B(), e.eventBus.emit("operation:cancel:request"), e.workspaceStore.revertDocumentChanges(
52
+ e.document.value?.["x-scalar-navigation"]?.name ?? ""
53
+ );
54
+ }, g = q(() => typeof window < "u" ? window.document.body : null);
55
+ I(
54
56
  () => e.modalState.open,
55
57
  (a) => {
56
- B.value = a, a ? p({ checkCanFocusTrap: () => D() }) : S();
58
+ g.value = a, a ? y({ checkCanFocusTrap: () => N() }) : S();
57
59
  }
58
60
  ), E(() => A()), F(() => S());
59
- const g = 288, c = d(
60
- () => e.workspaceStore?.workspace?.["x-scalar-sidebar-width"] ?? g
61
+ const p = 288, c = d(
62
+ () => e.workspaceStore?.workspace?.["x-scalar-sidebar-width"] ?? p
61
63
  ), T = (a) => e.workspaceStore?.update("x-scalar-sidebar-width", a), h = d(
62
64
  () => R(e.workspaceStore, e.document.value)
63
65
  ), C = d(
@@ -70,8 +72,8 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
70
72
  sidebarWidth: c,
71
73
  environment: h
72
74
  }), (a, t) => k((m(), u("div", P, [
73
- i("div", J, [
74
- i("div", {
75
+ s("div", J, [
76
+ s("div", {
75
77
  id: o(f),
76
78
  ref_key: "client",
77
79
  ref: v,
@@ -87,13 +89,13 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
87
89
  e.document.value && e.path?.value && e.method?.value ? (m(), u("main", X, [
88
90
  l(o(G), {
89
91
  modelValue: n.value,
90
- "onUpdate:modelValue": t[0] || (t[0] = (s) => n.value = s),
92
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => n.value = i),
91
93
  class: "absolute top-2 left-3 z-[10001]"
92
94
  }, null, 8, ["modelValue"]),
93
95
  k(l(o(K), {
94
96
  sidebarWidth: c.value,
95
97
  "onUpdate:sidebarWidth": [
96
- t[1] || (t[1] = (s) => c.value = s),
98
+ t[1] || (t[1] = (i) => c.value = i),
97
99
  T
98
100
  ],
99
101
  activeWorkspace: r,
@@ -125,15 +127,15 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
125
127
  workspaceStore: e.workspaceStore
126
128
  }, null, 8, ["document", "documentSlug", "environment", "eventBus", "exampleName", "method", "options", "path", "plugins", "securitySchemes", "workspaceStore"])
127
129
  ])) : (m(), u("div", Y, [...t[3] || (t[3] = [
128
- i("span", { class: "text-c-3" }, "No document selected", -1)
130
+ s("span", { class: "text-c-3" }, "No document selected", -1)
129
131
  ])]))
130
132
  ]),
131
133
  _: 1
132
134
  })
133
135
  ], 8, Q),
134
- i("div", {
136
+ s("div", {
135
137
  class: "scalar-app-exit",
136
- onClick: t[2] || (t[2] = (s) => e.modalState.hide())
138
+ onClick: t[2] || (t[2] = (i) => e.modalState.hide())
137
139
  })
138
140
  ])
139
141
  ], 512)), [
@@ -69,7 +69,7 @@ const b = {
69
69
  type: "document"
70
70
  }), h = n(
71
71
  () => C(o(e.options)?.hiddenClients)
72
- ), f = "2.21.1";
72
+ ), f = "2.22.1";
73
73
  return (t, a) => e.path && e.method && e.exampleName && l.value ? (c(), x(i(p), {
74
74
  key: 0,
75
75
  appVersion: i(f),
@@ -19,7 +19,7 @@ type __VLS_Props = {
19
19
  label?: string;
20
20
  };
21
21
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
22
- updateRow: (idx: number, field: "value" | "key", value: string) => any;
22
+ updateRow: (idx: number, field: "key" | "value", value: string) => any;
23
23
  toggleRow: (idx: number, enabled: boolean) => any;
24
24
  addRow: () => any;
25
25
  deleteRow: (idx: number) => any;
@@ -28,7 +28,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
28
28
  uploadFile: (idx: number) => any;
29
29
  removeFile: (idx: number) => any;
30
30
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
31
- onUpdateRow?: ((idx: number, field: "value" | "key", value: string) => any) | undefined;
31
+ onUpdateRow?: ((idx: number, field: "key" | "value", value: string) => any) | undefined;
32
32
  onToggleRow?: ((idx: number, enabled: boolean) => any) | undefined;
33
33
  onAddRow?: (() => any) | undefined;
34
34
  onDeleteRow?: ((idx: number) => any) | undefined;
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
33
33
  }));
34
34
  }, f = (u) => {
35
35
  u?.createNew && g.name === "request" && p();
36
- }, v = "2.21.1";
36
+ }, v = "2.22.1";
37
37
  return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (u, e) => (l(), n("div", W, [
38
38
  s("div", {
39
39
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.21.1",
21
+ "version": "2.22.1",
22
22
  "engines": {
23
23
  "node": ">=20"
24
24
  },
@@ -318,34 +318,34 @@
318
318
  "type-fest": "^5.3.1",
319
319
  "vue": "^3.5.26",
320
320
  "vue-router": "4.6.2",
321
- "whatwg-mimetype": "^4.0.0",
321
+ "whatwg-mimetype": "4.0.0",
322
322
  "yaml": "^2.8.0",
323
323
  "zod": "^4.3.5",
324
324
  "@scalar/analytics-client": "1.0.1",
325
- "@scalar/components": "0.16.32",
325
+ "@scalar/components": "0.17.0",
326
326
  "@scalar/draggable": "0.3.0",
327
327
  "@scalar/helpers": "0.2.9",
328
328
  "@scalar/icons": "0.5.2",
329
329
  "@scalar/import": "0.4.46",
330
330
  "@scalar/json-magic": "0.9.4",
331
- "@scalar/oas-utils": "0.6.29",
331
+ "@scalar/oas-utils": "0.6.30",
332
332
  "@scalar/object-utils": "1.2.23",
333
- "@scalar/openapi-parser": "0.24.5",
334
333
  "@scalar/openapi-types": "0.5.3",
335
- "@scalar/sidebar": "0.7.22",
336
334
  "@scalar/postman-to-openapi": "0.4.1",
337
- "@scalar/snippetz": "0.6.8",
338
- "@scalar/themes": "0.13.26",
339
- "@scalar/use-codemirror": "0.13.26",
340
- "@scalar/types": "0.5.10",
335
+ "@scalar/sidebar": "0.7.23",
336
+ "@scalar/themes": "0.14.0",
337
+ "@scalar/snippetz": "0.6.9",
338
+ "@scalar/openapi-parser": "0.24.5",
339
+ "@scalar/types": "0.6.0",
340
+ "@scalar/use-codemirror": "0.13.27",
341
341
  "@scalar/use-hooks": "0.3.6",
342
342
  "@scalar/use-toasts": "0.9.1",
343
- "@scalar/workspace-store": "0.27.1"
343
+ "@scalar/workspace-store": "0.27.2"
344
344
  },
345
345
  "devDependencies": {
346
346
  "@tailwindcss/vite": "^4.1.18",
347
347
  "@types/shell-quote": "^1.7.5",
348
- "@types/whatwg-mimetype": "^3.0.2",
348
+ "@types/whatwg-mimetype": "3.0.2",
349
349
  "@vitejs/plugin-vue": "^6.0.3",
350
350
  "@vue/test-utils": "2.4.6",
351
351
  "fake-indexeddb": "6.2.3",
@@ -355,8 +355,8 @@
355
355
  "vite": "^7.3.1",
356
356
  "vite-svg-loader": "5.1.0",
357
357
  "vitest": "4.0.16",
358
- "@scalar/build-tooling": "0.4.1",
359
- "@scalar/galaxy": "0.5.12"
358
+ "@scalar/galaxy": "0.5.12",
359
+ "@scalar/build-tooling": "0.4.1"
360
360
  },
361
361
  "scripts": {
362
362
  "build": "scalar-build-vite",
@@ -1,4 +0,0 @@
1
- import f from "./OAuthScopesInput.vue.js";
2
- export {
3
- f as default
4
- };