@scalar/api-reference 1.33.0 → 1.34.0

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 (146) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/browser/standalone.js +13260 -13196
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts +24 -0
  5. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -0
  6. package/dist/components/Anchor/WithBreadcrumb.vue.js +4 -0
  7. package/dist/components/Anchor/WithBreadcrumb.vue2.js +46 -0
  8. package/dist/components/Anchor/index.d.ts +1 -0
  9. package/dist/components/Anchor/index.d.ts.map +1 -1
  10. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  11. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  12. package/dist/components/ApiReferenceLayout.vue2.js +184 -201
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  15. package/dist/components/Content/Introduction/Introduction.vue2.js +1 -0
  16. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -0
  17. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Operations/TraversedEntry.vue.js +34 -32
  19. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
  20. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +33 -29
  21. package/dist/components/Content/Operations/get-current-index.d.ts +4 -0
  22. package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -0
  23. package/dist/components/Content/Operations/get-current-index.js +16 -0
  24. package/dist/components/Content/Schema/Schema.preview.d.ts +28 -0
  25. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  26. package/dist/components/Content/Schema/Schema.vue.d.ts +2 -0
  27. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  28. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  29. package/dist/components/Content/Schema/Schema.vue2.js +164 -157
  30. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +1 -0
  31. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  32. package/dist/components/Content/Schema/SchemaComposition.vue.js +58 -53
  33. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +1 -0
  34. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  35. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +52 -40
  36. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -0
  37. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  38. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  39. package/dist/components/Content/Schema/SchemaProperty.vue2.js +100 -87
  40. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  41. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
  42. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +4 -1
  43. package/dist/components/Lazy/Lazy.vue.d.ts +1 -0
  44. package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
  45. package/dist/components/Lazy/Lazy.vue2.js +12 -11
  46. package/dist/components/Lazy/lazyBus.d.ts +5 -3
  47. package/dist/components/Lazy/lazyBus.d.ts.map +1 -1
  48. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
  49. package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
  50. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +4 -4
  51. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  52. package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -0
  53. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  54. package/dist/features/Operation/components/OperationParameters.vue.js +49 -43
  55. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -0
  56. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  57. package/dist/features/Operation/components/OperationResponses.vue.js +4 -3
  58. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +1 -0
  59. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
  60. package/dist/features/Operation/components/ParameterHeaders.vue.js +2 -2
  61. package/dist/features/Operation/components/ParameterHeaders.vue2.js +28 -26
  62. package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -0
  63. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  64. package/dist/features/Operation/components/ParameterList.vue.js +2 -2
  65. package/dist/features/Operation/components/ParameterList.vue2.js +17 -15
  66. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -0
  67. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  68. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  69. package/dist/features/Operation/components/ParameterListItem.vue2.js +17 -16
  70. package/dist/features/Operation/components/RequestBody.vue.d.ts +2 -2
  71. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  72. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  73. package/dist/features/Operation/components/RequestBody.vue2.js +47 -39
  74. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -0
  75. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  76. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  77. package/dist/features/Operation/components/callbacks/Callback.vue2.js +12 -11
  78. package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
  79. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  80. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  81. package/dist/features/Operation/layouts/ModernLayout.vue2.js +63 -61
  82. package/dist/features/Search/{SearchButton.vue.d.ts → components/SearchButton.vue.d.ts} +0 -2
  83. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -0
  84. package/dist/features/Search/components/SearchButton.vue.js +65 -0
  85. package/dist/features/Search/{SearchModal.vue.d.ts → components/SearchModal.vue.d.ts} +0 -2
  86. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -0
  87. package/dist/features/Search/components/SearchModal.vue.js +7 -0
  88. package/dist/features/Search/components/SearchModal.vue2.js +199 -0
  89. package/dist/features/Search/helpers/create-fuse-instance.d.ts +9 -0
  90. package/dist/features/Search/helpers/create-fuse-instance.d.ts.map +1 -0
  91. package/dist/features/Search/helpers/create-fuse-instance.js +46 -0
  92. package/dist/features/Search/helpers/create-search-index.d.ts +7 -0
  93. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -0
  94. package/dist/features/Search/helpers/create-search-index.js +109 -0
  95. package/dist/features/Search/hooks/useSearchIndex.d.ts +14 -0
  96. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -0
  97. package/dist/features/Search/hooks/useSearchIndex.js +46 -0
  98. package/dist/features/Search/index.d.ts +2 -2
  99. package/dist/features/Search/index.d.ts.map +1 -1
  100. package/dist/features/Search/types.d.ts +15 -0
  101. package/dist/features/Search/types.d.ts.map +1 -0
  102. package/dist/features/api-client-modal/useApiClient.d.ts +14 -14
  103. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  104. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +3 -1
  105. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  106. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  107. package/dist/features/traverse-schema/helpers/traverse-schemas.js +18 -18
  108. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
  109. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
  110. package/dist/features/traverse-schema/types.d.ts +10 -6
  111. package/dist/features/traverse-schema/types.d.ts.map +1 -1
  112. package/dist/helpers/test-utils.d.ts +9 -0
  113. package/dist/helpers/test-utils.d.ts.map +1 -1
  114. package/dist/hooks/useNavState.d.ts +4 -1
  115. package/dist/hooks/useNavState.d.ts.map +1 -1
  116. package/dist/index.d.ts +0 -1
  117. package/dist/index.d.ts.map +1 -1
  118. package/dist/index.js +17 -19
  119. package/dist/libs/openapi.d.ts +11 -8
  120. package/dist/libs/openapi.d.ts.map +1 -1
  121. package/dist/libs/openapi.js +34 -55
  122. package/dist/style.css +1 -1
  123. package/dist/types.d.ts +1 -6
  124. package/dist/types.d.ts.map +1 -1
  125. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  126. package/dist/v2/ApiReferenceWorkspace.vue.js +120 -111
  127. package/dist/v2/helpers/get-document-name.d.ts +13 -0
  128. package/dist/v2/helpers/get-document-name.d.ts.map +1 -0
  129. package/dist/v2/helpers/get-document-name.js +15 -0
  130. package/dist/v2/helpers/normalize-content.d.ts +3 -0
  131. package/dist/v2/helpers/normalize-content.d.ts.map +1 -0
  132. package/dist/v2/helpers/normalize-content.js +8 -0
  133. package/package.json +14 -8
  134. package/dist/features/Search/SearchButton.vue.d.ts.map +0 -1
  135. package/dist/features/Search/SearchButton.vue.js +0 -66
  136. package/dist/features/Search/SearchModal.vue.d.ts.map +0 -1
  137. package/dist/features/Search/SearchModal.vue.js +0 -7
  138. package/dist/features/Search/SearchModal.vue2.js +0 -207
  139. package/dist/features/Search/useSearchIndex.d.ts +0 -32
  140. package/dist/features/Search/useSearchIndex.d.ts.map +0 -1
  141. package/dist/features/Search/useSearchIndex.js +0 -170
  142. package/dist/helpers/parse.d.ts +0 -10
  143. package/dist/helpers/parse.d.ts.map +0 -1
  144. package/dist/helpers/parse.js +0 -81
  145. /package/dist/features/Search/{SearchButton.vue2.js → components/SearchButton.vue2.js} +0 -0
  146. /package/dist/features/Search/{SearchModal.vue3.js → components/SearchModal.vue3.js} +0 -0
@@ -1,4 +1,7 @@
1
1
  import type { OpenAPI, OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/parameter';
3
+ import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/path-operations';
4
+ import type { Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard';
2
5
  type PropertyObject = {
3
6
  required?: string[];
4
7
  properties: {
@@ -15,7 +18,7 @@ export declare function formatProperty(key: string, obj: PropertyObject): string
15
18
  /**
16
19
  * Extracts the request body from an operation.
17
20
  */
18
- export declare function extractRequestBody(operation: OpenAPIV3_1.OperationObject): string[] | boolean;
21
+ export declare function extractRequestBody(operation: Dereference<OperationObject>): string[] | boolean;
19
22
  /**
20
23
  * Returns all models from the specification, no matter if it's OpenAPI 3.x.
21
24
  */
@@ -38,18 +41,18 @@ export declare function deepMerge(source: Record<any, any>, target: Record<any,
38
41
  */
39
42
  export declare function createEmptySpecification(partialSpecification?: Partial<OpenAPI.Document>): OpenAPI.Document;
40
43
  export type ParameterMap = {
41
- path: OpenAPIV3_1.ParameterObject[];
42
- query: OpenAPIV3_1.ParameterObject[];
43
- header: OpenAPIV3_1.ParameterObject[];
44
- cookie: OpenAPIV3_1.ParameterObject[];
45
- body: OpenAPIV3_1.ParameterObject[];
46
- formData: OpenAPIV3_1.ParameterObject[];
44
+ path: ParameterObject[];
45
+ query: ParameterObject[];
46
+ header: ParameterObject[];
47
+ cookie: ParameterObject[];
48
+ body: ParameterObject[];
49
+ formData: ParameterObject[];
47
50
  };
48
51
  /**
49
52
  * This function creates a parameter map from an Operation Object, that's easier to consume.
50
53
  *
51
54
  * TODO: Isn't it easier to just stick to the OpenAPI structure, without transforming it?
52
55
  */
53
- export declare function createParameterMap(operation: OpenAPIV3_1.OperationObject): ParameterMap;
56
+ export declare function createParameterMap(operation: Dereference<OperationObject>): ParameterMap;
54
57
  export {};
55
58
  //# sourceMappingURL=openapi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/libs/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,u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C,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,eAAe,EAAE,CAAA;IACvB,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,IAAI,EAAE,eAAe,EAAE,CAAA;IACvB,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B,CAAA;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,gBA2DzE"}
@@ -1,58 +1,42 @@
1
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;
2
+ function d(t, i) {
3
+ var s;
4
+ let o = t;
5
+ const e = (s = i.required) == null ? void 0 : s.includes(t);
6
+ return o += e ? " REQUIRED " : " optional ", i.properties[t] && (o += i.properties[t].type, i.properties[t].description && (o += " " + i.properties[t].description)), o;
7
7
  }
8
- function d(i) {
8
+ function h(t) {
9
9
  var e;
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)
10
+ const i = ["Body"], o = (e = t == null ? void 0 : t.schema) == null ? void 0 : e.properties;
11
+ return o && Object.keys(o).forEach((s) => {
12
+ if (!t.schema)
13
13
  return;
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}`);
14
+ i.push(d(s, t.schema));
15
+ const r = o[s];
16
+ r.type === "object" && !!r.properties && r.properties && Object.keys(r.properties).forEach((n) => {
17
+ var c, f;
18
+ i.push(`${n} ${(f = (c = r.properties) == null ? void 0 : c[n]) == null ? void 0 : f.type}`);
19
19
  });
20
- }), s;
20
+ }), i;
21
21
  }
22
- function q(i) {
23
- var s, o;
22
+ function q(t) {
23
+ var i, o;
24
24
  try {
25
- const e = (o = (s = i == null ? void 0 : i.requestBody) == null ? void 0 : s.content) == null ? void 0 : o["application/json"];
25
+ const e = (o = (i = t == null ? void 0 : t.requestBody) == null ? void 0 : i.content) == null ? void 0 : o["application/json"];
26
26
  if (!e)
27
27
  throw new Error("Body not found");
28
- return d(e);
28
+ return h(e);
29
29
  } catch {
30
30
  return !1;
31
31
  }
32
32
  }
33
- function E(i) {
34
- var o, e;
35
- if (!i)
36
- return {};
37
- const s = (
38
- // OpenAPI 3.x
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 : (
40
- // Fallback
41
- {}
42
- )
43
- );
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;
33
+ function u(t, i) {
34
+ for (const [o, e] of Object.entries(t))
35
+ e !== null && typeof e == "object" ? (i[o] ?? (i[o] = new e.__proto__.constructor()), u(e, i[o])) : typeof e < "u" && (i[o] = e);
36
+ return i;
48
37
  }
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;
53
- }
54
- function O(i) {
55
- return h(i ?? {}, {
38
+ function E(t) {
39
+ return u(t ?? {}, {
56
40
  info: {
57
41
  title: "",
58
42
  description: "",
@@ -70,28 +54,23 @@ function O(i) {
70
54
  tags: []
71
55
  });
72
56
  }
73
- function D(i) {
74
- const s = {
57
+ function O(t) {
58
+ const i = {
75
59
  path: [],
76
60
  query: [],
77
61
  header: [],
78
62
  cookie: [],
79
63
  body: [],
80
64
  formData: []
81
- };
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);
84
- });
85
- const o = i.parameters ?? [];
65
+ }, o = t.parameters ?? [];
86
66
  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;
67
+ p(e) && (typeof e == "object" && e !== null && "$ref" in 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)));
68
+ }), i;
89
69
  }
90
70
  export {
91
- O as createEmptySpecification,
92
- D as createParameterMap,
93
- h as deepMerge,
71
+ E as createEmptySpecification,
72
+ O as createParameterMap,
73
+ u as deepMerge,
94
74
  q as extractRequestBody,
95
- l as formatProperty,
96
- E as getModels
75
+ d as formatProperty
97
76
  };