@scalar/api-reference 1.32.5 → 1.32.7

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 (94) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/browser/standalone.js +9924 -9851
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReference.vue.js +8 -8
  6. package/dist/components/Badge/Badge.vue.js +1 -1
  7. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +1 -1
  9. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +28 -26
  10. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  12. package/dist/components/Content/Schema/Schema.vue2.js +97 -156
  13. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts +7 -0
  14. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -0
  15. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +7 -0
  16. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +25 -0
  17. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
  19. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +73 -90
  20. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +21 -0
  21. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -0
  22. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +92 -0
  23. package/dist/components/Content/Schema/SchemaObjectProperties.vue2.js +4 -0
  24. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -2
  25. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  27. package/dist/components/Content/Schema/SchemaProperty.vue2.js +54 -55
  28. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +2 -2
  29. package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +0 -2
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  32. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  33. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +81 -97
  34. package/dist/components/Content/Schema/helpers/{formatExample.d.ts → format-example.d.ts} +1 -1
  35. package/dist/components/Content/Schema/helpers/format-example.d.ts.map +1 -0
  36. package/dist/components/Content/Schema/helpers/is-type-object.d.ts +3 -0
  37. package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -0
  38. package/dist/components/Content/Schema/helpers/is-type-object.js +17 -0
  39. package/dist/components/Content/Schema/helpers/{optimizeValueForDisplay.d.ts → optimize-value-for-display.d.ts} +1 -1
  40. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -0
  41. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  43. package/dist/components/Content/Tag/OperationsListItem.vue2.js +1 -1
  44. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  45. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  46. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  47. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -2
  48. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  49. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  50. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +8 -8
  51. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +4 -2
  52. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  53. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  54. package/dist/features/Operation/layouts/ModernLayout.vue2.js +30 -30
  55. package/dist/features/api-client-modal/useApiClient.d.ts +84 -4
  56. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  57. package/dist/features/download-link/DownloadLink.vue.d.ts.map +1 -1
  58. package/dist/features/download-link/DownloadLink.vue.js +1 -1
  59. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -1
  60. package/dist/features/example-request/ExampleRequest.vue.js +1 -1
  61. package/dist/features/example-request/ExampleRequest.vue2.js +126 -124
  62. package/dist/features/example-responses/ExampleResponse.vue.js +2 -2
  63. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  64. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
  65. package/dist/features/sidebar/components/SidebarElement.vue.js +2 -2
  66. package/dist/features/sidebar/components/SidebarElement.vue2.js +16 -15
  67. package/dist/helpers/convert-security-scheme.d.ts +9 -0
  68. package/dist/helpers/convert-security-scheme.d.ts.map +1 -0
  69. package/dist/index.js +1 -1
  70. package/dist/libs/openapi.d.ts +0 -13
  71. package/dist/libs/openapi.d.ts.map +1 -1
  72. package/dist/libs/openapi.js +49 -63
  73. package/dist/stores/useHttpClientStore.js +20 -20
  74. package/dist/style.css +1 -1
  75. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  76. package/dist/v2/ApiReferenceWorkspace.vue.js +84 -75
  77. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +19 -0
  78. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -0
  79. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +21 -72
  80. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  81. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +4 -2
  82. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -1
  83. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +5 -0
  84. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +1 -0
  85. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +1 -1
  86. package/dist/v2/events/definitions.d.ts +13 -4
  87. package/dist/v2/events/definitions.d.ts.map +1 -1
  88. package/dist/v2/hooks/useStore.d.ts +9 -0
  89. package/dist/v2/hooks/useStore.d.ts.map +1 -0
  90. package/package.json +13 -12
  91. package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +0 -1
  92. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +0 -1
  93. /package/dist/components/Content/Schema/helpers/{formatExample.js → format-example.js} +0 -0
  94. /package/dist/components/Content/Schema/helpers/{optimizeValueForDisplay.js → optimize-value-for-display.js} +0 -0
@@ -1,5 +1,4 @@
1
1
  import type { OpenAPI, OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import { XScalarStability } from '@scalar/types/legacy';
3
2
  type PropertyObject = {
4
3
  required?: string[];
5
4
  properties: {
@@ -38,18 +37,6 @@ export declare function deepMerge(source: Record<any, any>, target: Record<any,
38
37
  * The returning object has the same structure as a valid OpenAPI specification, but everything is empty.
39
38
  */
40
39
  export declare function createEmptySpecification(partialSpecification?: Partial<OpenAPI.Document>): OpenAPI.Document;
41
- /**
42
- * Returns if an operation is considered deprecated.
43
- */
44
- export declare function isOperationDeprecated(operation: OpenAPIV3_1.OperationObject): boolean;
45
- /**
46
- * Get operation stability.
47
- */
48
- export declare function getOperationStability(operation: OpenAPIV3_1.OperationObject): XScalarStability | undefined;
49
- /**
50
- * Get Operation stability color
51
- */
52
- export declare function getOperationStabilityColor(operation: OpenAPIV3_1.OperationObject): string;
53
40
  export type ParameterMap = {
54
41
  path: OpenAPIV3_1.ParameterObject[];
55
42
  query: OpenAPIV3_1.ParameterObject[];
@@ -1 +1 @@
1
- {"version":3,"file":"openap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CAsBxD;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,aAAc,WAAW,CAAC,QAAQ,YAUvD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,cAAe,WAAW,CAAC,QAAQ,YAU1D,CAAA;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,oBAW3E;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAiBjF,OAAO,CAAC,QAAQ,CACvB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACnC,KAAK,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACpC,MAAM,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACrC,MAAM,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACrC,IAAI,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IACnC,QAAQ,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;CACxC,CAAA;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,gBAqDxE"}
@@ -1,59 +1,58 @@
1
- import { isDereferenced as h } from "@scalar/openapi-types/helpers";
2
- import { XScalarStability as o } from "@scalar/types/legacy";
3
- function d(t, i) {
4
- var r;
5
- let s = t;
6
- const e = (r = i.required) == null ? void 0 : r.includes(t);
7
- return s += e ? " REQUIRED " : " optional ", i.properties[t] && (s += i.properties[t].type, i.properties[t].description && (s += " " + i.properties[t].description)), s;
1
+ import { isDereferenced as p } from "@scalar/openapi-types/helpers";
2
+ function l(i, s) {
3
+ var n;
4
+ let o = i;
5
+ const e = (n = s.required) == null ? void 0 : n.includes(i);
6
+ return o += e ? " REQUIRED " : " optional ", s.properties[i] && (o += s.properties[i].type, s.properties[i].description && (o += " " + s.properties[i].description)), o;
8
7
  }
9
- function a(t) {
8
+ function d(i) {
10
9
  var e;
11
- const i = ["Body"], s = (e = t == null ? void 0 : t.schema) == null ? void 0 : e.properties;
12
- return s && Object.keys(s).forEach((r) => {
13
- if (!t.schema)
10
+ const s = ["Body"], o = (e = i == null ? void 0 : i.schema) == null ? void 0 : e.properties;
11
+ return o && Object.keys(o).forEach((n) => {
12
+ if (!i.schema)
14
13
  return;
15
- i.push(d(r, t.schema));
16
- const n = s[r];
17
- n.type === "object" && !!n.properties && n.properties && Object.keys(n.properties).forEach((f) => {
18
- var u, p;
19
- i.push(`${f} ${(p = (u = n.properties) == null ? void 0 : u[f]) == null ? void 0 : p.type}`);
14
+ s.push(l(n, i.schema));
15
+ const t = o[n];
16
+ t.type === "object" && !!t.properties && t.properties && Object.keys(t.properties).forEach((c) => {
17
+ var f, u;
18
+ s.push(`${c} ${(u = (f = t.properties) == null ? void 0 : f[c]) == null ? void 0 : u.type}`);
20
19
  });
21
- }), i;
20
+ }), s;
22
21
  }
23
- function D(t) {
24
- var i, s;
22
+ function q(i) {
23
+ var s, o;
25
24
  try {
26
- const e = (s = (i = t == null ? void 0 : t.requestBody) == null ? void 0 : i.content) == null ? void 0 : s["application/json"];
25
+ const e = (o = (s = i == null ? void 0 : i.requestBody) == null ? void 0 : s.content) == null ? void 0 : o["application/json"];
27
26
  if (!e)
28
27
  throw new Error("Body not found");
29
- return a(e);
28
+ return d(e);
30
29
  } catch {
31
30
  return !1;
32
31
  }
33
32
  }
34
- function O(t) {
35
- var s, e;
36
- if (!t)
33
+ function E(i) {
34
+ var o, e;
35
+ if (!i)
37
36
  return {};
38
- const i = (
37
+ const s = (
39
38
  // OpenAPI 3.x
40
- Object.keys(((s = t == null ? void 0 : t.components) == null ? void 0 : s.schemas) ?? {}).length ? (e = t == null ? void 0 : t.components) == null ? void 0 : e.schemas : (
39
+ Object.keys(((o = i == null ? void 0 : i.components) == null ? void 0 : o.schemas) ?? {}).length ? (e = i == null ? void 0 : i.components) == null ? void 0 : e.schemas : (
41
40
  // Fallback
42
41
  {}
43
42
  )
44
43
  );
45
- return Object.keys(i ?? {}).forEach((r) => {
46
- var n, c;
47
- (((n = i[r]) == null ? void 0 : n["x-internal"]) === !0 || ((c = i[r]) == null ? void 0 : c["x-scalar-ignore"]) === !0) && delete i[r];
48
- }), i;
44
+ return Object.keys(s ?? {}).forEach((n) => {
45
+ var t, r;
46
+ (((t = s[n]) == null ? void 0 : t["x-internal"]) === !0 || ((r = s[n]) == null ? void 0 : r["x-scalar-ignore"]) === !0) && delete s[n];
47
+ }), s;
49
48
  }
50
- function l(t, i) {
51
- for (const [s, e] of Object.entries(t))
52
- e !== null && typeof e == "object" ? (i[s] ?? (i[s] = new e.__proto__.constructor()), l(e, i[s])) : typeof e < "u" && (i[s] = e);
53
- return i;
49
+ function h(i, s) {
50
+ for (const [o, e] of Object.entries(i))
51
+ e !== null && typeof e == "object" ? (s[o] ?? (s[o] = new e.__proto__.constructor()), h(e, s[o])) : typeof e < "u" && (s[o] = e);
52
+ return s;
54
53
  }
55
- function E(t) {
56
- return l(t ?? {}, {
54
+ function O(i) {
55
+ return h(i ?? {}, {
57
56
  info: {
58
57
  title: "",
59
58
  description: "",
@@ -71,18 +70,8 @@ function E(t) {
71
70
  tags: []
72
71
  });
73
72
  }
74
- function q(t) {
75
- return t.deprecated !== void 0 ? t.deprecated : !!(t["x-scalar-stability"] && t["x-scalar-stability"] === o.Deprecated);
76
- }
77
- function y(t) {
78
- return t.deprecated ? o.Deprecated : t["x-scalar-stability"];
79
- }
80
- function S(t) {
81
- const i = y(t);
82
- return i === o.Deprecated ? "text-red" : i === o.Experimental ? "text-orange" : i === o.Stable ? "text-green" : "";
83
- }
84
- function v(t) {
85
- const i = {
73
+ function D(i) {
74
+ const s = {
86
75
  path: [],
87
76
  query: [],
88
77
  header: [],
@@ -90,22 +79,19 @@ function v(t) {
90
79
  body: [],
91
80
  formData: []
92
81
  };
93
- t.pathParameters && t.pathParameters.forEach((e) => {
94
- e.in === "path" ? i.path.push(e) : e.in === "query" ? i.query.push(e) : e.in === "header" ? i.header.push(e) : e.in === "cookie" ? i.cookie.push(e) : e.in === "body" ? i.body.push(e) : e.in === "formData" && i.formData.push(e);
82
+ i.pathParameters && i.pathParameters.forEach((e) => {
83
+ e.in === "path" ? s.path.push(e) : e.in === "query" ? s.query.push(e) : e.in === "header" ? s.header.push(e) : e.in === "cookie" ? s.cookie.push(e) : e.in === "body" ? s.body.push(e) : e.in === "formData" && s.formData.push(e);
95
84
  });
96
- const s = t.parameters ?? [];
97
- return s && s.forEach((e) => {
98
- h(e) && (e.in === "path" ? i.path.push(e) : e.in === "query" ? i.query.push(e) : e.in === "header" ? i.header.push(e) : e.in === "cookie" ? i.cookie.push(e) : e.in === "body" ? i.body.push(e) : e.in === "formData" && i.formData.push(e));
99
- }), i;
85
+ const o = i.parameters ?? [];
86
+ return o && o.forEach((e) => {
87
+ p(e) && (e.in === "path" ? s.path.push(e) : e.in === "query" ? s.query.push(e) : e.in === "header" ? s.header.push(e) : e.in === "cookie" ? s.cookie.push(e) : e.in === "body" ? s.body.push(e) : e.in === "formData" && s.formData.push(e));
88
+ }), s;
100
89
  }
101
90
  export {
102
- E as createEmptySpecification,
103
- v as createParameterMap,
104
- l as deepMerge,
105
- D as extractRequestBody,
106
- d as formatProperty,
107
- O as getModels,
108
- y as getOperationStability,
109
- S as getOperationStabilityColor,
110
- q as isOperationDeprecated
91
+ O as createEmptySpecification,
92
+ D as createParameterMap,
93
+ h as deepMerge,
94
+ q as extractRequestBody,
95
+ l as formatProperty,
96
+ E as getModels
111
97
  };
@@ -1,21 +1,21 @@
1
- import { safeLocalStorage as E, REFERENCE_LS_KEYS as m } from "@scalar/helpers/object/local-storage";
1
+ import { safeLocalStorage as T, REFERENCE_LS_KEYS as m } from "@scalar/helpers/object/local-storage";
2
2
  import { objectReplace as p } from "@scalar/helpers/object/object-replace";
3
- import { snippetz as k } from "@scalar/snippetz";
4
- import { computed as o, readonly as a, ref as C, reactive as A } from "vue";
3
+ import { snippetz as A } from "@scalar/snippetz";
4
+ import { computed as o, readonly as a, ref as C, reactive as k } from "vue";
5
5
  const y = {
6
6
  targetKey: "shell",
7
7
  clientKey: "curl"
8
- }, { clients: H } = k();
8
+ }, { clients: H } = A();
9
9
  function d(t) {
10
10
  var n;
11
11
  return ((n = r.value.find((e) => e.key === t.targetKey)) == null ? void 0 : n.title) ?? t.targetKey;
12
12
  }
13
- function K(t) {
13
+ function E(t) {
14
14
  var n, e;
15
15
  return ((e = (n = r.value.find((i) => i.key === t.targetKey)) == null ? void 0 : n.clients.find((i) => i.client === t.clientKey)) == null ? void 0 : e.title) ?? t.clientKey;
16
16
  }
17
- const L = o(() => d(l)), S = o(() => K(l));
18
- function b(t, n) {
17
+ const L = o(() => d(l)), S = o(() => E(l));
18
+ function _(t, n) {
19
19
  return n.value === !0 ? [] : t.flatMap((e) => {
20
20
  var i;
21
21
  return typeof n.value != "object" ? [] : Array.isArray(n.value) ? (e.clients = e.clients.filter(
@@ -25,9 +25,9 @@ function b(t, n) {
25
25
  n.value[e.key].includes(s.client))), (i = e == null ? void 0 : e.clients) != null && i.length ? [e] : []);
26
26
  });
27
27
  }
28
- const r = o(() => b(H(), c)), c = C({}), f = C();
29
- function _(t) {
30
- t !== void 0 && (f.value = t, T(u()));
28
+ const r = o(() => _(H(), c)), c = C({}), f = C();
29
+ function b(t) {
30
+ t !== void 0 && (f.value = t, K(u()));
31
31
  }
32
32
  const u = () => {
33
33
  var t, n, e, i;
@@ -41,30 +41,30 @@ function v(t) {
41
41
  (n) => n.key === t.targetKey && n.clients.find((e) => e.client === t.clientKey)
42
42
  );
43
43
  }
44
- function h() {
44
+ function D() {
45
45
  p(l, u());
46
46
  }
47
- const l = A(u()), T = (t) => {
47
+ const l = k(u()), K = (t) => {
48
48
  Object.assign(l, {
49
49
  ...l,
50
50
  ...t
51
- }), E().setItem(m.SELECTED_CLIENT, JSON.stringify(l));
52
- }, R = () => ({
51
+ }), T().setItem(m.SELECTED_CLIENT_DEPRECATED, JSON.stringify(l));
52
+ }, I = () => ({
53
53
  httpClient: a(l),
54
- resetState: h,
55
- setHttpClient: T,
56
- setDefaultHttpClient: _,
54
+ resetState: D,
55
+ setHttpClient: K,
56
+ setDefaultHttpClient: b,
57
57
  excludedClients: a(c),
58
58
  setExcludedClients: (t) => {
59
59
  c.value = t, p(l, u());
60
60
  },
61
61
  availableTargets: r,
62
- getClientTitle: K,
62
+ getClientTitle: E,
63
63
  getTargetTitle: d,
64
64
  httpTargetTitle: L,
65
65
  httpClientTitle: S
66
66
  });
67
67
  export {
68
- b as filterHiddenClients,
69
- R as useHttpClientStore
68
+ _ as filterHiddenClients,
69
+ I as useHttpClientStore
70
70
  };