@scalar/api-reference 1.28.33 → 1.29.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 (227) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/browser/standalone.js +12818 -13331
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  5. package/dist/components/Anchor/Anchor.vue.js +2 -2
  6. package/dist/components/Anchor/Anchor.vue2.js +24 -22
  7. package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
  8. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  10. package/dist/components/ApiReferenceLayout.vue2.js +50 -50
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  12. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  13. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +5 -5
  14. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts +1 -1
  15. package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts.map +1 -1
  16. package/dist/components/Content/Content.vue.js +2 -2
  17. package/dist/components/Content/Content.vue2.js +31 -32
  18. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  19. package/dist/components/Content/Introduction/Introduction.vue2.js +21 -21
  20. package/dist/components/Content/Lazy/Loading.vue.js +22 -22
  21. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Models/Models.vue.js +2 -2
  23. package/dist/components/Content/Models/Models.vue2.js +17 -17
  24. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
  26. package/dist/components/Content/Models/ModelsAccordion.vue2.js +14 -14
  27. package/dist/components/Content/Schema/Schema.preview.d.ts +98 -15
  28. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  29. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  31. package/dist/components/Content/Schema/Schema.vue2.js +2 -1
  32. package/dist/components/Content/Schema/{SchemaDiscriminator.vue.d.ts → SchemaComposition.vue.d.ts} +3 -2
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -0
  34. package/dist/components/Content/Schema/SchemaComposition.vue.js +187 -0
  35. package/dist/components/Content/Schema/SchemaComposition.vue2.js +4 -0
  36. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
  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 +31 -30
  40. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +0 -1
  41. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +3 -3
  43. package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +8 -9
  44. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  45. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  46. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +165 -146
  47. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +1 -1
  48. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  49. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +50 -40
  50. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +3 -2
  51. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  52. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +13 -13
  53. package/dist/components/Content/Schema/helpers/schema-composition.d.ts +12 -0
  54. package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -0
  55. package/dist/components/Content/Schema/helpers/schema-composition.js +8 -0
  56. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +4 -0
  57. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -0
  58. package/dist/components/Content/Tag/OperationsListItem.vue.js +1 -1
  59. package/dist/components/Content/Tag/OperationsListItem.vue2.js +1 -1
  60. package/dist/components/Content/Tag/TagAccordion.vue.js +2 -2
  61. package/dist/components/Content/Tag/TagAccordion.vue2.js +10 -10
  62. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  63. package/dist/components/Content/Tag/TagList.vue.js +8 -8
  64. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  65. package/dist/components/Content/Tag/TagSection.vue.js +2 -2
  66. package/dist/components/Content/Tag/TagSection.vue2.js +8 -8
  67. package/dist/components/GettingStarted.vue.d.ts +2 -2
  68. package/dist/components/Layouts/Layouts.vue.d.ts +3 -0
  69. package/dist/components/Layouts/Layouts.vue.d.ts.map +1 -1
  70. package/dist/components/Layouts/Layouts.vue.js +14 -23
  71. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
  72. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  73. package/dist/components/Layouts/ModernLayout.vue2.js +51 -45
  74. package/dist/components/MobileHeader.vue.js +3 -3
  75. package/dist/components/Section/CompactSection.vue.js +2 -2
  76. package/dist/components/Section/CompactSection.vue2.js +4 -4
  77. package/dist/components/Section/Section.vue.d.ts.map +1 -1
  78. package/dist/components/Section/Section.vue.js +1 -1
  79. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  80. package/dist/components/ShowMoreButton.vue.js +2 -2
  81. package/dist/components/Sidebar/Sidebar.vue.d.ts +1 -1
  82. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  83. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  84. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  85. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  86. package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
  87. package/dist/components/Sidebar/SidebarElement.vue2.js +6 -6
  88. package/dist/components/SingleApiReference.vue.d.ts +1 -0
  89. package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
  90. package/dist/components/SingleApiReference.vue.js +25 -22
  91. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +1 -1
  92. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  93. package/dist/features/ApiClientModal/ApiClientModal.vue.js +3 -3
  94. package/dist/features/ApiClientModal/index.d.ts +1 -1
  95. package/dist/features/ApiClientModal/index.d.ts.map +1 -1
  96. package/dist/features/ApiClientModal/useApiClient.d.ts +186 -146
  97. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  98. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
  99. package/dist/features/BaseUrl/BaseUrl.vue.js +11 -10
  100. package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
  101. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  102. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  103. package/dist/features/DownloadLink/DownloadLink.vue2.js +17 -17
  104. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  105. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  106. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +12 -12
  107. package/dist/features/Operation/Webhooks.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/Webhooks.vue.js +2 -2
  109. package/dist/features/Operation/Webhooks.vue2.js +13 -13
  110. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  111. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  112. package/dist/features/Operation/components/ParameterListItem.vue2.js +18 -18
  113. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  114. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  115. package/dist/features/Operation/components/RequestBody.vue2.js +38 -32
  116. package/dist/features/Operation/hooks/useResponses.d.ts +1 -0
  117. package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
  118. package/dist/features/Operation/hooks/useResponses.js +13 -12
  119. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  120. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  121. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +1 -1
  122. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  123. package/dist/features/Operation/layouts/ModernLayout.vue2.js +1 -1
  124. package/dist/features/Search/SearchButton.vue.js +2 -2
  125. package/dist/features/Search/SearchButton.vue2.js +1 -1
  126. package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
  127. package/dist/features/Search/SearchModal.vue.js +2 -2
  128. package/dist/features/Search/SearchModal.vue2.js +1 -1
  129. package/dist/features/Search/useSearchIndex.d.ts +1 -1
  130. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  131. package/dist/features/Search/useSearchIndex.js +20 -21
  132. package/dist/helpers/{isMacOs.d.ts → is-mac-os.d.ts} +1 -1
  133. package/dist/helpers/is-mac-os.d.ts.map +1 -0
  134. package/dist/helpers/parse.d.ts.map +1 -1
  135. package/dist/helpers/parse.js +1 -1
  136. package/dist/helpers/{scrollToId.d.ts → scroll-to-id.d.ts} +1 -1
  137. package/dist/helpers/scroll-to-id.d.ts.map +1 -0
  138. package/dist/helpers/sleep.d.ts +0 -2
  139. package/dist/helpers/sleep.d.ts.map +1 -1
  140. package/dist/hooks/useNavState.d.ts.map +1 -1
  141. package/dist/hooks/useNavState.js +28 -28
  142. package/dist/hooks/useReactiveSpec.js +1 -1
  143. package/dist/hooks/useSidebar.d.ts.map +1 -1
  144. package/dist/hooks/useSidebar.js +45 -49
  145. package/dist/index.d.ts +3 -3
  146. package/dist/index.d.ts.map +1 -1
  147. package/dist/index.js +44 -43
  148. package/dist/legacy/fixtures/index.d.ts +1 -1
  149. package/dist/legacy/fixtures/index.d.ts.map +1 -1
  150. package/dist/legacy/helpers/index.d.ts +1 -1
  151. package/dist/legacy/helpers/index.d.ts.map +1 -1
  152. package/dist/libs/download.d.ts +9 -0
  153. package/dist/libs/download.d.ts.map +1 -0
  154. package/dist/libs/download.js +19 -0
  155. package/dist/{helpers/getLowestHeadingLevel.d.ts → libs/markdown.d.ts} +5 -1
  156. package/dist/libs/markdown.d.ts.map +1 -0
  157. package/dist/libs/markdown.js +18 -0
  158. package/dist/libs/openapi.d.ts +56 -0
  159. package/dist/libs/openapi.d.ts.map +1 -0
  160. package/dist/libs/openapi.js +102 -0
  161. package/dist/style.css +1 -1
  162. package/dist/types.d.ts +1 -45
  163. package/dist/types.d.ts.map +1 -1
  164. package/package.json +22 -27
  165. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
  166. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -7
  167. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -167
  168. package/dist/esm.js +0 -34
  169. package/dist/helpers/createEmptySpecification.d.ts +0 -8
  170. package/dist/helpers/createEmptySpecification.d.ts.map +0 -1
  171. package/dist/helpers/createEmptySpecification.js +0 -27
  172. package/dist/helpers/deepMerge.d.ts +0 -5
  173. package/dist/helpers/deepMerge.d.ts.map +0 -1
  174. package/dist/helpers/deepMerge.js +0 -8
  175. package/dist/helpers/generateParameters.d.ts +0 -6
  176. package/dist/helpers/generateParameters.d.ts.map +0 -1
  177. package/dist/helpers/get-request.d.ts +0 -59
  178. package/dist/helpers/get-request.d.ts.map +0 -1
  179. package/dist/helpers/getHeadingsFromMarkdown.d.ts +0 -6
  180. package/dist/helpers/getHeadingsFromMarkdown.d.ts.map +0 -1
  181. package/dist/helpers/getHeadingsFromMarkdown.js +0 -13
  182. package/dist/helpers/getLowestHeadingLevel.d.ts.map +0 -1
  183. package/dist/helpers/getLowestHeadingLevel.js +0 -7
  184. package/dist/helpers/getModels.d.ts +0 -7
  185. package/dist/helpers/getModels.d.ts.map +0 -1
  186. package/dist/helpers/getModels.js +0 -22
  187. package/dist/helpers/getVariableNames.d.ts +0 -5
  188. package/dist/helpers/getVariableNames.d.ts.map +0 -1
  189. package/dist/helpers/hasModels.d.ts +0 -3
  190. package/dist/helpers/hasModels.d.ts.map +0 -1
  191. package/dist/helpers/hasModels.js +0 -5
  192. package/dist/helpers/hasSecuritySchemes.d.ts +0 -3
  193. package/dist/helpers/hasSecuritySchemes.d.ts.map +0 -1
  194. package/dist/helpers/hasWebhooks.d.ts +0 -3
  195. package/dist/helpers/hasWebhooks.d.ts.map +0 -1
  196. package/dist/helpers/hasWebhooks.js +0 -4
  197. package/dist/helpers/index.d.ts +0 -17
  198. package/dist/helpers/index.d.ts.map +0 -1
  199. package/dist/helpers/isMacOs.d.ts.map +0 -1
  200. package/dist/helpers/mapFromObject.d.ts +0 -8
  201. package/dist/helpers/mapFromObject.d.ts.map +0 -1
  202. package/dist/helpers/mergeAllObjects.d.ts +0 -5
  203. package/dist/helpers/mergeAllObjects.d.ts.map +0 -1
  204. package/dist/helpers/scrollToId.d.ts.map +0 -1
  205. package/dist/helpers/specDownloads.d.ts +0 -7
  206. package/dist/helpers/specDownloads.d.ts.map +0 -1
  207. package/dist/helpers/specDownloads.js +0 -19
  208. package/dist/helpers/specHelpers.d.ts +0 -16
  209. package/dist/helpers/specHelpers.d.ts.map +0 -1
  210. package/dist/helpers/specHelpers.js +0 -36
  211. package/dist/helpers/waitFor.d.ts +0 -5
  212. package/dist/helpers/waitFor.d.ts.map +0 -1
  213. package/dist/hooks/index.d.ts +0 -5
  214. package/dist/hooks/index.d.ts.map +0 -1
  215. package/dist/legacy/helpers/encodeStringAsBase64.d.ts +0 -5
  216. package/dist/legacy/helpers/encodeStringAsBase64.d.ts.map +0 -1
  217. package/dist/legacy/index.d.ts +0 -5
  218. package/dist/legacy/index.d.ts.map +0 -1
  219. package/dist/legacy/types.d.ts +0 -94
  220. package/dist/legacy/types.d.ts.map +0 -1
  221. package/dist/libs/operation.d.ts +0 -15
  222. package/dist/libs/operation.d.ts.map +0 -1
  223. package/dist/libs/operation.js +0 -16
  224. package/dist/stores/index.d.ts +0 -2
  225. package/dist/stores/index.d.ts.map +0 -1
  226. /package/dist/helpers/{isMacOs.js → is-mac-os.js} +0 -0
  227. /package/dist/helpers/{scrollToId.js → scroll-to-id.js} +0 -0
package/dist/types.d.ts CHANGED
@@ -1,10 +1,6 @@
1
- import type { ThemeId } from '@scalar/themes';
2
1
  import type { AnyApiReferenceConfiguration, ApiReferenceConfiguration } from '@scalar/types/api-reference';
3
- import type { ContentType, ReferenceConfiguration, Spec } from '@scalar/types/legacy';
4
- import type { HarRequest } from '@scalar/types/snippetz';
5
- import type { Slot } from 'vue';
2
+ import type { Spec } from '@scalar/types/legacy';
6
3
  export type { ApiReferenceConfiguration };
7
- export type { ReferenceConfiguration };
8
4
  export type ReferenceProps = {
9
5
  configuration?: AnyApiReferenceConfiguration;
10
6
  };
@@ -18,12 +14,6 @@ export type ReferenceLayoutProps = {
18
14
  isDark: boolean;
19
15
  };
20
16
  export type GettingStartedExamples = 'Petstore' | 'CoinMarketCap';
21
- export type Parameter = {
22
- name: string;
23
- required: boolean;
24
- displayType: string;
25
- description: string;
26
- };
27
17
  export type ContentProperties = {
28
18
  [key: string]: {
29
19
  type: string;
@@ -42,33 +32,6 @@ export type ContentSchema = {
42
32
  properties: ContentProperties;
43
33
  };
44
34
  };
45
- export type Content = {
46
- [key in ContentType]: ContentSchema;
47
- };
48
- export type Contact = {
49
- email: string;
50
- };
51
- export type License = {
52
- name: string;
53
- url: string;
54
- };
55
- export type Info = {
56
- title: string;
57
- description?: string;
58
- termsOfService?: string;
59
- contact?: Contact;
60
- license?: License;
61
- version?: string;
62
- };
63
- export type HarRequestWithPath = HarRequest & {
64
- path: string;
65
- };
66
- export type ReferenceLayoutType = 'modern' | 'classic';
67
- /** Slots required for standalone reference components */
68
- export type ReferenceSlot = 'footer';
69
- export type ReferenceSlots = {
70
- [x in ReferenceSlot]: Slot<Record<string, never>>;
71
- };
72
35
  /** Slots required for reference base / layout component */
73
36
  export type ReferenceLayoutSlot = 'header' | 'footer' | 'editor' | 'content-start' | 'content-end' | 'sidebar-start' | 'sidebar-end';
74
37
  export type ReferenceLayoutSlots = {
@@ -81,11 +44,4 @@ export type ReferenceSlotProps = {
81
44
  spec: Spec;
82
45
  breadcrumb: string;
83
46
  };
84
- export type ReferenceLayoutEvents = {
85
- (e: 'changeTheme', value: ThemeId): void;
86
- (e: 'updateContent', value: string): void;
87
- (e: 'loadSwaggerFile'): void;
88
- (e: 'linkSwaggerFile'): void;
89
- (e: 'toggleDarkMode'): void;
90
- };
91
47
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,KAAK,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC1G,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE/B,YAAY,EAAE,yBAAyB,EAAE,CAAA;AAEzC,YAAY,EAAE,sBAAsB,EAAE,CAAA;AAEtC,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;IACjD,UAAU,EAAE,IAAI,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,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AAE,kBAAkB,KAAK,GAAG;CAC/D,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,GAAG,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,IAAI,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalar/api-reference",
3
- "description": "generate beautiful API references from OpenAPI specs",
3
+ "description": "Generate beautiful API references from OpenAPI documents",
4
4
  "license": "MIT",
5
5
  "author": "Scalar (https://github.com/scalar)",
6
6
  "homepage": "https://github.com/scalar/scalar",
@@ -20,9 +20,9 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.28.33",
23
+ "version": "1.29.1",
24
24
  "engines": {
25
- "node": ">=18"
25
+ "node": ">=20"
26
26
  },
27
27
  "type": "module",
28
28
  "main": "./dist/index.js",
@@ -37,9 +37,6 @@
37
37
  "!dist/webpack-stats.json",
38
38
  "CHANGELOG.md"
39
39
  ],
40
- "imports": {
41
- "#legacy": "./src/legacy/index.ts"
42
- },
43
40
  "browser": "./dist/browser/standalone.js",
44
41
  "esm.sh": {
45
42
  "bundle": true
@@ -57,18 +54,18 @@
57
54
  "nanoid": "^5.1.5",
58
55
  "vue": "^3.5.12",
59
56
  "zod": "3.24.1",
60
- "@scalar/api-client": "2.3.33",
61
- "@scalar/components": "0.13.58",
62
- "@scalar/icons": "0.3.6",
63
- "@scalar/code-highlight": "0.0.29",
64
- "@scalar/oas-utils": "0.2.143",
65
- "@scalar/openapi-parser": "0.10.17",
66
- "@scalar/openapi-types": "0.2.3",
67
- "@scalar/themes": "0.11.2",
68
- "@scalar/snippetz": "0.2.20",
69
- "@scalar/use-toasts": "0.7.10",
70
- "@scalar/types": "0.1.15",
71
- "@scalar/use-hooks": "0.1.49"
57
+ "@scalar/code-highlight": "0.1.0",
58
+ "@scalar/api-client": "2.4.1",
59
+ "@scalar/components": "0.14.1",
60
+ "@scalar/icons": "0.4.1",
61
+ "@scalar/oas-utils": "0.3.1",
62
+ "@scalar/openapi-parser": "0.11.0",
63
+ "@scalar/openapi-types": "0.3.1",
64
+ "@scalar/snippetz": "0.3.0",
65
+ "@scalar/types": "0.2.1",
66
+ "@scalar/use-hooks": "0.2.1",
67
+ "@scalar/themes": "0.12.1",
68
+ "@scalar/use-toasts": "0.8.0"
72
69
  },
73
70
  "devDependencies": {
74
71
  "@types/react": "^19.0.1",
@@ -86,27 +83,25 @@
86
83
  "vite-plugin-banner": "^0.7.1",
87
84
  "vite-plugin-css-injected-by-js": "^3.4.0",
88
85
  "vitest": "^1.6.0",
89
- "@scalar/build-tooling": "0.1.19",
90
- "@scalar/galaxy": "0.3.2",
91
- "@scalar/react-renderer": "0.1.0"
86
+ "@scalar/build-tooling": "0.2.0",
87
+ "@scalar/react-renderer": "0.2.0",
88
+ "@scalar/galaxy": "0.4.1"
92
89
  },
93
90
  "scripts": {
94
- "analyze:default": "pnpm dlx vite-bundle-visualizer",
95
- "analyze:standalone": "pnpm dlx vite-bundle-visualizer -c vite.standalone.config.ts",
96
91
  "build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
97
92
  "build:default": "vite build",
98
93
  "build:standalone": "vite build -c vite.standalone.config.ts",
99
94
  "dev": "vite",
100
95
  "dev:standalone": "vite -c vite.standalone.config.ts",
101
- "lint:check": "eslint .",
102
- "lint:fix": "eslint . --fix",
96
+ "lint:check": "scalar-lint-check",
97
+ "lint:fix": "scalar-lint-fix",
103
98
  "playground:components": "vite ./playground/components -c ./playground/components/vite.config.ts",
104
99
  "playground:esm": "vite ./playground/esm -c ./playground/esm/vite.config.ts",
105
100
  "playground:ssr": "cd ./playground/ssr && pnpm dev",
106
101
  "playground:vue": "vite ./playground/vue -c ./playground/vue/vite.config.ts",
107
102
  "preview": "vite preview",
108
103
  "test": "vitest",
109
- "types:build": "vue-tsc -p tsconfig.build.json",
110
- "types:check": "vue-tsc --noEmit --skipLibCheck --composite false"
104
+ "types:build": "scalar-types-build-vue",
105
+ "types:check": "scalar-types-check-vue"
111
106
  }
112
107
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"SchemaDiscriminator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaDiscriminator.vue"],"names":[],"mappings":"AA+QA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAU9E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AA4UF,wBAOG"}
@@ -1,7 +0,0 @@
1
- import o from "./SchemaDiscriminator.vue2.js";
2
- /* empty css */
3
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-97ac13d3"]]);
5
- export {
6
- c as default
7
- };
@@ -1,167 +0,0 @@
1
- import { defineComponent as B, ref as v, onMounted as N, nextTick as L, computed as C, createElementBlock as b, openBlock as n, createBlock as i, unref as l, withCtx as o, createVNode as u, createElementVNode as m, toDisplayString as y, Fragment as V, renderList as O, normalizeClass as T } from "vue";
2
- import { TabGroup as U, TabList as A, Tab as D, TabPanel as H } from "@headlessui/vue";
3
- import { cva as $, cx as w, ScalarListbox as E } from "@scalar/components";
4
- import { ScalarIconCaretDown as F } from "@scalar/icons";
5
- import { stringify as z } from "flatted";
6
- import { mergeAllOfSchemas as I } from "./helpers/merge-all-of-schemas.js";
7
- import h from "./Schema.vue.js";
8
- const M = { class: "property-rule" }, W = { class: "text-c-3" }, G = { class: "schema-tab-label z-1 relative" }, P = { class: "schema-tab-label z-1 text-c-1 relative" }, x = /* @__PURE__ */ B({
9
- __name: "SchemaDiscriminator",
10
- props: {
11
- discriminator: {},
12
- schemas: {},
13
- name: {},
14
- value: {},
15
- level: {},
16
- compact: { type: Boolean },
17
- hideHeading: { type: Boolean }
18
- },
19
- setup(s) {
20
- const r = v(0), d = v(null), p = v(!1);
21
- N(async () => {
22
- if (await L(), d.value) {
23
- const e = d.value;
24
- p.value = e.scrollWidth > e.clientWidth;
25
- }
26
- });
27
- const g = $({
28
- base: "schema-tab",
29
- variants: {
30
- selected: {
31
- true: "schema-tab-selected",
32
- false: "text-c-3"
33
- }
34
- }
35
- }), k = C(
36
- () => s.value[s.discriminator].map((e, a) => ({
37
- id: String(a),
38
- label: S(e) || "Schema"
39
- }))
40
- ), f = C({
41
- get: () => k.value.find(
42
- (e) => e.id === String(r.value)
43
- ),
44
- set: (e) => r.value = Number(e.id)
45
- }), S = (e) => {
46
- if (!e)
47
- return null;
48
- if (e.name)
49
- return e.name;
50
- if (e.title)
51
- return e.title;
52
- if (s.schemas && typeof s.schemas == "object") {
53
- for (const [a, t] of Object.entries(s.schemas))
54
- if (z(t) === z(e))
55
- return a;
56
- return Object.keys(e)[0];
57
- }
58
- if (e.type === "array" && e.items)
59
- return `Array of ${e.items.type || "any"}`;
60
- if (e.type)
61
- return e.type;
62
- if (typeof e == "object") {
63
- const a = Object.keys(e);
64
- if (a.length > 0)
65
- return a[0];
66
- }
67
- return null;
68
- }, j = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (a) => a.toUpperCase()).toLowerCase().replace(/^(\w)/, (a) => a.toUpperCase());
69
- return (e, a) => (n(), b("div", M, [
70
- e.discriminator === "oneOf" || e.discriminator === "anyOf" ? (n(), i(l(U), {
71
- key: 0,
72
- modelValue: r.value,
73
- "onUpdate:modelValue": a[1] || (a[1] = (t) => r.value = t),
74
- as: "div"
75
- }, {
76
- default: o(() => [
77
- u(l(A), { class: "discriminator-tab-list py-1.25 flex flex-col gap-1 rounded-t-lg border border-b-0 px-2 pr-3" }, {
78
- default: o(() => [
79
- m("span", W, y(j(e.discriminator)), 1),
80
- m("div", {
81
- ref_key: "tabsContainer",
82
- ref: d,
83
- class: "flex items-center gap-1.5"
84
- }, [
85
- p.value ? (n(), i(l(E), {
86
- key: 1,
87
- modelValue: f.value,
88
- "onUpdate:modelValue": a[0] || (a[0] = (t) => f.value = t),
89
- options: k.value,
90
- resize: ""
91
- }, {
92
- default: o(() => {
93
- var t;
94
- return [
95
- m("div", {
96
- class: T(["flex cursor-pointer items-center gap-1", l(w)(l(g)({ selected: !0 }))])
97
- }, [
98
- m("span", P, y(((t = f.value) == null ? void 0 : t.label) || "Schema"), 1),
99
- u(l(F), { class: "z-1" })
100
- ], 2)
101
- ];
102
- }),
103
- _: 1
104
- }, 8, ["modelValue", "options"])) : (n(!0), b(V, { key: 0 }, O(e.value[e.discriminator], (t, c) => (n(), i(l(D), {
105
- key: c,
106
- class: T(
107
- l(w)(l(g)({ selected: r.value === c }))
108
- ),
109
- onClick: (Z) => r.value = c
110
- }, {
111
- default: o(() => [
112
- m("span", G, y(S(t) || "Schema"), 1)
113
- ]),
114
- _: 2
115
- }, 1032, ["class", "onClick"]))), 128))
116
- ], 512)
117
- ]),
118
- _: 1
119
- }),
120
- p.value ? (n(), i(l(H), {
121
- key: 1,
122
- class: "discriminator-panel"
123
- }, {
124
- default: o(() => [
125
- u(h, {
126
- compact: e.compact,
127
- hideHeading: e.hideHeading,
128
- name: e.name,
129
- noncollapsible: !0,
130
- schemas: e.schemas,
131
- value: e.value[e.discriminator][r.value]
132
- }, null, 8, ["compact", "hideHeading", "name", "schemas", "value"])
133
- ]),
134
- _: 1
135
- })) : (n(!0), b(V, { key: 0 }, O(e.value[e.discriminator], (t, c) => (n(), i(l(H), {
136
- key: c,
137
- class: "discriminator-panel"
138
- }, {
139
- default: o(() => [
140
- u(h, {
141
- compact: e.compact,
142
- hideHeading: e.hideHeading,
143
- name: e.name,
144
- noncollapsible: !0,
145
- schemas: e.schemas,
146
- value: t
147
- }, null, 8, ["compact", "hideHeading", "name", "schemas", "value"])
148
- ]),
149
- _: 2
150
- }, 1024))), 128))
151
- ]),
152
- _: 1
153
- }, 8, ["modelValue"])) : (n(), i(h, {
154
- key: 1,
155
- compact: e.compact,
156
- level: e.level,
157
- name: e.name,
158
- noncollapsible: e.level == 0,
159
- schemas: e.schemas,
160
- value: l(I)(e.value[e.discriminator])
161
- }, null, 8, ["compact", "level", "name", "noncollapsible", "schemas", "value"]))
162
- ]));
163
- }
164
- });
165
- export {
166
- x as default
167
- };
package/dist/esm.js DELETED
@@ -1,34 +0,0 @@
1
- import { objectMerge as f } from "@scalar/oas-utils/helpers";
2
- import { createHead as p } from "@unhead/vue";
3
- import { reactive as u, createApp as m } from "vue";
4
- import l from "./components/ApiReference.vue.js";
5
- function S(o, a, c = !0) {
6
- console.warn(
7
- "createScalarReferences is deprecated. Please import { createApiReference } from '@scalar/api-reference' instead."
8
- );
9
- const r = u(a), t = m(l, { configuration: r }), i = p();
10
- t.use(i);
11
- function n(e = o) {
12
- if (!e) {
13
- console.warn("Invalid HTML element provided. Cannot mount Scalar References");
14
- return;
15
- }
16
- t.mount(e);
17
- }
18
- return c && n(), {
19
- /** Update the configuration for a mounted reference */
20
- updateConfig(e, s = !0) {
21
- s ? Object.assign(r, e) : f(r, e);
22
- },
23
- updateSpec(e) {
24
- Array.isArray(r) ? console.error("Cannot update the content for multiple configurations.") : Object.assign(r, e);
25
- },
26
- /** Mount the references to a given element */
27
- mount: n,
28
- /** Unmount the app from an element */
29
- unmount: () => t.unmount()
30
- };
31
- }
32
- export {
33
- S as createScalarReferences
34
- };
@@ -1,8 +0,0 @@
1
- import type { OpenAPI } from '@scalar/openapi-types';
2
- import type { Spec } from '@scalar/types/legacy';
3
- /**
4
- * Creates an empty specification object.
5
- * The returning object has the same structure as a valid OpenAPI specification, but everything is empty.
6
- */
7
- export declare function createEmptySpecification(partialSpecification?: Partial<OpenAPI.Document>): Spec;
8
- //# sourceMappingURL=createEmptySpecification.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createEmptySpecification.d.ts","sourceRoot":"","sources":["../../src/helpers/createEmptySpecification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAIhD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAqBjF,IAAI,CACX"}
@@ -1,27 +0,0 @@
1
- import { deepMerge as r } from "./deepMerge.js";
2
- function i(e) {
3
- return r(e ?? {}, {
4
- info: {
5
- title: "",
6
- description: "",
7
- termsOfService: "",
8
- version: "",
9
- license: {
10
- name: "",
11
- url: ""
12
- },
13
- contact: {
14
- email: ""
15
- }
16
- },
17
- externalDocs: {
18
- description: "",
19
- url: ""
20
- },
21
- servers: [],
22
- tags: []
23
- });
24
- }
25
- export {
26
- i as createEmptySpecification
27
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * Deep merge for objects
3
- */
4
- export declare function deepMerge(source: Record<any, any>, target: Record<any, any>): Record<any, any>;
5
- //# sourceMappingURL=deepMerge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/helpers/deepMerge.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,oBAW3E"}
@@ -1,8 +0,0 @@
1
- function c(f, o) {
2
- for (const [e, n] of Object.entries(f))
3
- n !== null && typeof n == "object" ? (o[e] ?? (o[e] = new n.__proto__.constructor()), c(n, o[e])) : typeof n < "u" && (o[e] = n);
4
- return o;
5
- }
6
- export {
7
- c as deepMerge
8
- };
@@ -1,6 +0,0 @@
1
- import type { BaseParameter, Parameters } from '@scalar/types/legacy';
2
- /**
3
- * Generate parameters for the request from the parameters in the swagger file
4
- */
5
- export declare function generateParameters(parameters: Parameters[]): BaseParameter[];
6
- //# sourceMappingURL=generateParameters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateParameters.d.ts","sourceRoot":"","sources":["../../src/helpers/generateParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAErE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,mBAc1D"}
@@ -1,59 +0,0 @@
1
- import type { WorkspaceStore } from '@scalar/api-client/store';
2
- /** Grabs the request from a path + method */
3
- export declare const getRequest: (requests: WorkspaceStore["requests"], path: string, method: string) => {
4
- uid: string & import("zod").BRAND<"operation">;
5
- path: string;
6
- type: "request";
7
- selectedSecuritySchemeUids: ((string & import("zod").BRAND<"securityScheme">) | (string & import("zod").BRAND<"securityScheme">)[])[];
8
- selectedServerUid: (string & import("zod").BRAND<"server">) | null;
9
- servers: (string & import("zod").BRAND<"server">)[];
10
- examples: (string & import("zod").BRAND<"example">)[];
11
- method: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace";
12
- description?: string | undefined;
13
- summary?: string | undefined;
14
- externalDocs?: {
15
- url: string;
16
- description?: string | undefined;
17
- } | undefined;
18
- 'x-internal'?: boolean | undefined;
19
- 'x-scalar-ignore'?: boolean | undefined;
20
- security?: Record<string, string[]>[] | undefined;
21
- tags?: string[] | undefined;
22
- deprecated?: boolean | undefined;
23
- operationId?: string | undefined;
24
- parameters?: {
25
- name: string;
26
- required: boolean;
27
- deprecated: boolean;
28
- in: "cookie" | "path" | "query" | "header";
29
- description?: string | undefined;
30
- example?: unknown;
31
- examples?: unknown[] | Record<string, {
32
- value?: unknown;
33
- summary?: string | undefined;
34
- externalValue?: string | undefined;
35
- }> | undefined;
36
- schema?: unknown;
37
- content?: unknown;
38
- style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
39
- }[] | undefined;
40
- requestBody?: any;
41
- responses?: Record<string, any> | undefined;
42
- 'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
43
- 'x-codeSamples'?: {
44
- source: string;
45
- label?: string | undefined;
46
- lang?: string | undefined;
47
- }[] | undefined;
48
- 'x-code-samples'?: {
49
- source: string;
50
- label?: string | undefined;
51
- lang?: string | undefined;
52
- }[] | undefined;
53
- 'x-custom-examples'?: {
54
- source: string;
55
- label?: string | undefined;
56
- lang?: string | undefined;
57
- }[] | undefined;
58
- } | undefined;
59
- //# sourceMappingURL=get-request.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,aAAc,cAAc,CAAC,UAAU,CAAC,QAAQ,MAAM,UAAU,MAAM;yBAEy+T,KAAK;;;kDAA2H,KAAK,8CAA8C,KAAK;wCAA6E,KAAK;8BAA6D,KAAK;+BAAyD,KAAK;;;;;;mBAAwR,CAAC;;;;;;;;;;;;;mBAA8f,CAAC;eAAyC,CAAC;gBAA+B,CAAC;iBAAoD,CAAC;mBAAkC,CAAC;yBAAmD,CAAC;;cAAoE,CAAC;eAA8B,CAAC;aAA4B,CAAC;;;;kCAAyP,eAAe;;;aAAyG,CAAC;YAAsC,CAAC;;;;aAAyH,CAAC;YAAsC,CAAC;;;;aAA4H,CAAC;YAAsC,CAAC;;aADprY,CAAA"}
@@ -1,6 +0,0 @@
1
- import type { Heading } from '@scalar/types/legacy';
2
- /**
3
- * Extracts all headings from a Markdown string.
4
- */
5
- export declare function getHeadingsFromMarkdown(input: string): Heading[];
6
- //# sourceMappingURL=getHeadingsFromMarkdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getHeadingsFromMarkdown.d.ts","sourceRoot":"","sources":["../../src/helpers/getHeadingsFromMarkdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAWnD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAMhE"}
@@ -1,13 +0,0 @@
1
- import { getHeadings as g } from "@scalar/code-highlight/markdown";
2
- import n from "github-slugger";
3
- const o = (t, e) => t.map((r) => ({
4
- ...r,
5
- slug: e.slug(r.value)
6
- }));
7
- function i(t) {
8
- const e = new n(), r = g(t);
9
- return o(r, e);
10
- }
11
- export {
12
- i as getHeadingsFromMarkdown
13
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"getLowestHeadingLevel.d.ts","sourceRoot":"","sources":["../../src/helpers/getLowestHeadingLevel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEjD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,aAAc,OAAO,EAAE,KAAG,aAQ3D,CAAA"}
@@ -1,7 +0,0 @@
1
- const o = (t) => {
2
- const e = Math.min(...t.map((n) => n.depth));
3
- return e >= 1 && e <= 6 ? e : 1;
4
- };
5
- export {
6
- o as getLowestHeadingLevel
7
- };
@@ -1,7 +0,0 @@
1
- import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { Spec } from '@scalar/types/legacy';
3
- /**
4
- * Returns all models from the specification, no matter if it’s Swagger 2.0 or OpenAPI 3.x.
5
- */
6
- export declare function getModels(spec?: Spec): OpenAPIV2.DefinitionsObject | Record<string, OpenAPIV3_1.SchemaObject> | Record<string, OpenAPIV3.SchemaObject>;
7
- //# sourceMappingURL=getModels.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getModels.d.ts","sourceRoot":"","sources":["../../src/helpers/getModels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,mHAyBpC"}
@@ -1,22 +0,0 @@
1
- function l(t) {
2
- var o, i;
3
- if (!t)
4
- return {};
5
- const n = (
6
- // OpenAPI 3.x
7
- Object.keys(((o = t == null ? void 0 : t.components) == null ? void 0 : o.schemas) ?? {}).length ? (i = t == null ? void 0 : t.components) == null ? void 0 : i.schemas : (
8
- // Swagger 2.0
9
- Object.keys((t == null ? void 0 : t.definitions) ?? {}).length ? t == null ? void 0 : t.definitions : (
10
- // Fallback
11
- {}
12
- )
13
- )
14
- );
15
- return Object.keys(n ?? {}).forEach((r) => {
16
- var f;
17
- ((f = n[r]) == null ? void 0 : f["x-internal"]) === !0 && delete n[r];
18
- }), n;
19
- }
20
- export {
21
- l as getModels
22
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * Returns all variables used in a string
3
- */
4
- export declare function getVariableNames(value?: string): string[];
5
- //# sourceMappingURL=getVariableNames.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getVariableNames.d.ts","sourceRoot":"","sources":["../../src/helpers/getVariableNames.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,YAO9C"}
@@ -1,3 +0,0 @@
1
- import type { Spec } from '@scalar/types/legacy';
2
- export declare const hasModels: (spec?: Spec) => boolean;
3
- //# sourceMappingURL=hasModels.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hasModels.d.ts","sourceRoot":"","sources":["../../src/helpers/hasModels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAIhD,eAAO,MAAM,SAAS,UAAW,IAAI,YAUpC,CAAA"}
@@ -1,5 +0,0 @@
1
- import { getModels as r } from "./getModels.js";
2
- const o = (e) => e ? !!Object.keys(r(e) ?? {}).length : !1;
3
- export {
4
- o as hasModels
5
- };
@@ -1,3 +0,0 @@
1
- import type { Spec } from '@scalar/types/legacy';
2
- export declare const hasSecuritySchemes: (spec?: Spec) => boolean;
3
- //# sourceMappingURL=hasSecuritySchemes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hasSecuritySchemes.d.ts","sourceRoot":"","sources":["../../src/helpers/hasSecuritySchemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD,eAAO,MAAM,kBAAkB,UAAW,IAAI,YAO7C,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { Spec } from '@scalar/types/legacy';
2
- export declare const hasWebhooks: (spec?: Spec) => boolean;
3
- //# sourceMappingURL=hasWebhooks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hasWebhooks.d.ts","sourceRoot":"","sources":["../../src/helpers/hasWebhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEhD,eAAO,MAAM,WAAW,UAAW,IAAI,YAUtC,CAAA"}