@scalar/api-client 2.18.0 → 2.18.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 (30) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/hooks/useClientConfig.js +1 -1
  3. package/dist/hooks/useLayout.js +1 -1
  4. package/dist/hooks/useSidebar.js +1 -1
  5. package/dist/plugins/hooks/usePluginManager.js +1 -1
  6. package/dist/store/active-entities.js +1 -1
  7. package/dist/style.css +1 -1
  8. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  9. package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -2
  10. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +1 -1
  11. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  12. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +36 -35
  13. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  14. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +17 -17
  15. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
  16. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  17. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +130 -122
  18. package/dist/v2/features/app/helpers/routes.d.ts +5 -1
  19. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  20. package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
  21. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  22. package/dist/v2/features/modal/Modal.vue.js +1 -1
  23. package/dist/v2/features/modal/Modal.vue2.js +26 -25
  24. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +3 -3
  25. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  26. package/dist/v2/features/operation/Operation.vue.d.ts +5 -1
  27. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  28. package/dist/v2/features/operation/Operation.vue.js +22 -20
  29. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  30. package/package.json +13 -13
@@ -1,13 +1,13 @@
1
- import { defineComponent as p, computed as r, onMounted as h, watch as v, createBlock as y, createElementBlock as f, openBlock as s, unref as u, createElementVNode as S } from "vue";
1
+ import { defineComponent as h, computed as o, onMounted as p, watch as v, createBlock as y, createElementBlock as f, openBlock as u, unref as s, createElementVNode as S } from "vue";
2
2
  import { getResolvedRef as l } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
3
  import { combineParams as k } from "./helpers/combine-params.js";
4
4
  import { getOperationHeader as g } from "./helpers/get-operation-header.js";
5
- import { getSelectedServer as w } from "./helpers/get-selected-server.js";
6
- import B from "../../blocks/operation-block/OperationBlock.vue.js";
7
- const C = {
5
+ import { getSelectedServer as B } from "./helpers/get-selected-server.js";
6
+ import C from "../../blocks/operation-block/OperationBlock.vue.js";
7
+ const w = {
8
8
  key: 1,
9
9
  class: "flex h-full w-full items-center justify-center"
10
- }, N = {}, R = /* @__PURE__ */ p({
10
+ }, N = {}, V = /* @__PURE__ */ h({
11
11
  ...N,
12
12
  __name: "Operation",
13
13
  props: {
@@ -22,10 +22,11 @@ const C = {
22
22
  securitySchemes: {},
23
23
  workspaceStore: {},
24
24
  activeWorkspace: {},
25
- plugins: {}
25
+ plugins: {},
26
+ hideClientButton: { type: Boolean }
26
27
  },
27
28
  setup(t) {
28
- const o = r(() => {
29
+ const r = o(() => {
29
30
  if (!t.path || !t.method)
30
31
  return null;
31
32
  const e = l(t.document?.paths?.[t.path]?.[t.method]);
@@ -36,14 +37,14 @@ const C = {
36
37
  return e;
37
38
  const n = k(a.parameters, e.parameters);
38
39
  return { ...e, parameters: n };
39
- }), m = r(() => [
40
+ }), i = o(() => [
40
41
  ...t.workspaceStore.workspace?.["x-scalar-cookies"] ?? [],
41
42
  ...t.document?.["x-scalar-cookies"] ?? []
42
- ]), i = r(() => w(t.document));
43
- h(() => {
43
+ ]), m = o(() => B(t.document));
44
+ p(() => {
44
45
  typeof t.document?.["x-scalar-selected-server"] > "u" && t.document?.servers?.[0]?.url && t.eventBus.emit("server:update:selected", { url: t.document.servers[0].url });
45
46
  }), v(
46
- o,
47
+ r,
47
48
  (e) => {
48
49
  e && t.path && t.method && !g({
49
50
  operation: e,
@@ -61,16 +62,16 @@ const C = {
61
62
  },
62
63
  { immediate: !0 }
63
64
  );
64
- const c = r(() => t.document?.["x-scalar-set-operation-security"] ? {
65
+ const c = o(() => t.document?.["x-scalar-set-operation-security"] ? {
65
66
  type: "operation",
66
67
  path: t.path ?? "",
67
68
  method: t.method ?? "get"
68
69
  } : {
69
70
  type: "document"
70
- }), d = "2.18.0";
71
- return (e, a) => e.path && e.method && e.exampleName && o.value ? (s(), y(u(B), {
71
+ }), d = "2.18.1";
72
+ return (e, a) => e.path && e.method && e.exampleName && r.value ? (u(), y(s(C), {
72
73
  key: 0,
73
- appVersion: u(d),
74
+ appVersion: s(d),
74
75
  authMeta: c.value,
75
76
  documentSecurity: e.document?.security ?? [],
76
77
  documentSelectedSecurity: e.document?.["x-scalar-selected-security"],
@@ -78,27 +79,28 @@ const C = {
78
79
  environment: e.environment,
79
80
  eventBus: e.eventBus,
80
81
  exampleKey: e.exampleName,
81
- globalCookies: m.value,
82
+ globalCookies: i.value,
83
+ hideClientButton: e.hideClientButton,
82
84
  history: [],
83
85
  httpClients: e.workspaceStore.config["x-scalar-reference-config"]?.httpClients,
84
86
  layout: e.layout,
85
87
  method: e.method,
86
- operation: o.value,
88
+ operation: r.value,
87
89
  path: e.path,
88
90
  plugins: e.plugins,
89
91
  proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
90
92
  securitySchemes: e.securitySchemes,
91
93
  selectedClient: e.workspaceStore.workspace["x-scalar-default-client"],
92
- server: i.value,
94
+ server: m.value,
93
95
  servers: e.document?.servers ?? [],
94
96
  setOperationSecurity: e.document?.["x-scalar-set-operation-security"] ?? !1,
95
97
  totalPerformedRequests: 0,
96
98
  "onUpdate:servers": a[0] || (a[0] = (n) => e.eventBus.emit("ui:route:page", { name: "document.servers" }))
97
- }, null, 8, ["appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "eventBus", "exampleKey", "globalCookies", "httpClients", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (s(), f("div", C, [...a[1] || (a[1] = [
99
+ }, null, 8, ["appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "httpClients", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (u(), f("div", w, [...a[1] || (a[1] = [
98
100
  S("span", { class: "text-c-3" }, "Select an operation to view details", -1)
99
101
  ])]));
100
102
  }
101
103
  });
102
104
  export {
103
- R as default
105
+ V as default
104
106
  };
@@ -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 = (o) => {
35
35
  o?.createNew && g.name === "request" && d();
36
- }, v = "2.18.0";
36
+ }, v = "2.18.1";
37
37
  return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (o, e) => (i(), l("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.18.0",
21
+ "version": "2.18.1",
22
22
  "engines": {
23
23
  "node": ">=20"
24
24
  },
@@ -327,28 +327,28 @@
327
327
  "yaml": "^2.8.0",
328
328
  "zod": "^4.1.11",
329
329
  "@scalar/analytics-client": "1.0.1",
330
- "@scalar/components": "0.16.19",
331
- "@scalar/draggable": "0.3.0",
332
330
  "@scalar/helpers": "0.2.7",
331
+ "@scalar/draggable": "0.3.0",
333
332
  "@scalar/icons": "0.5.2",
334
333
  "@scalar/import": "0.4.44",
335
- "@scalar/oas-utils": "0.6.16",
336
334
  "@scalar/json-magic": "0.9.0",
337
335
  "@scalar/object-utils": "1.2.21",
336
+ "@scalar/components": "0.16.20",
337
+ "@scalar/oas-utils": "0.6.17",
338
338
  "@scalar/openapi-parser": "0.23.13",
339
+ "@scalar/sidebar": "0.7.10",
340
+ "@scalar/postman-to-openapi": "0.3.58",
339
341
  "@scalar/openapi-types": "0.5.3",
340
- "@scalar/postman-to-openapi": "0.3.57",
341
342
  "@scalar/snippetz": "0.6.4",
342
- "@scalar/types": "0.5.7",
343
- "@scalar/sidebar": "0.7.9",
344
- "@scalar/use-codemirror": "0.13.13",
345
343
  "@scalar/themes": "0.13.26",
346
- "@scalar/use-hooks": "0.3.6",
344
+ "@scalar/types": "0.5.7",
345
+ "@scalar/use-codemirror": "0.13.14",
347
346
  "@scalar/use-toasts": "0.9.1",
348
- "@scalar/workspace-store": "0.24.6"
347
+ "@scalar/use-hooks": "0.3.6",
348
+ "@scalar/workspace-store": "0.24.7"
349
349
  },
350
350
  "devDependencies": {
351
- "@tailwindcss/vite": "^4.1.7",
351
+ "@tailwindcss/vite": "^4.1.18",
352
352
  "@types/shell-quote": "^1.7.5",
353
353
  "@types/whatwg-mimetype": "^3.0.2",
354
354
  "@vitejs/plugin-vue": "6.0.1",
@@ -356,8 +356,8 @@
356
356
  "fake-indexeddb": "6.2.3",
357
357
  "fastify": "^5.3.3",
358
358
  "jsdom": "26.1.0",
359
- "tailwindcss": "^4.1.7",
360
- "vite": "7.1.11",
359
+ "tailwindcss": "^4.1.18",
360
+ "vite": "7.3.0",
361
361
  "vite-svg-loader": "5.1.0",
362
362
  "vitest": "3.2.4",
363
363
  "@scalar/build-tooling": "0.4.1",