@scalar/api-reference 1.36.2 → 1.38.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 (242) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/browser/standalone.js +28796 -26431
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceContent.vue.d.ts +34 -0
  5. package/dist/components/ApiReferenceContent.vue.d.ts.map +1 -0
  6. package/dist/components/ApiReferenceContent.vue.js +8 -0
  7. package/dist/components/ApiReferenceContent.vue2.js +148 -0
  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 +239 -219
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +2 -2
  12. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  13. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +1 -1
  14. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  15. package/dist/components/Content/ClientLibraries/featured-clients.d.ts +1 -1
  16. package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -1
  17. package/dist/components/Content/Content.vue.d.ts +21 -3
  18. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Content.vue.js +132 -95
  20. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +4 -2
  21. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  23. package/dist/components/Content/Models/ClassicLayout.vue2.js +28 -28
  24. package/dist/components/Content/Models/Models.vue.d.ts +10 -2
  25. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Models/Models.vue.js +25 -27
  27. package/dist/components/Content/Models/ModernLayout.vue.d.ts +6 -2
  28. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
  30. package/dist/components/Content/Models/ModernLayout.vue2.js +30 -29
  31. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +20 -6
  32. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  33. package/dist/components/Content/Operations/TraversedEntry.vue.js +58 -46
  34. package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
  35. package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
  36. package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
  37. package/dist/components/Content/Schema/helpers/get-ref-name.js +9 -7
  38. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +1 -1
  39. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  40. package/dist/components/Content/Schema/helpers/schema-name.js +15 -14
  41. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
  42. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
  44. package/dist/components/Content/Tags/ModernLayout.vue.d.ts +3 -1
  45. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
  47. package/dist/components/Content/Tags/ModernLayout.vue2.js +34 -30
  48. package/dist/components/Content/Tags/Tag.vue.d.ts +3 -1
  49. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
  50. package/dist/components/Content/Tags/Tag.vue.js +14 -12
  51. package/dist/components/Content/Tags/TagSection.vue.d.ts +2 -1
  52. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
  53. package/dist/components/Content/Tags/TagSection.vue.js +49 -52
  54. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  55. package/dist/components/GettingStarted.vue.js +2 -2
  56. package/dist/components/GettingStarted.vue2.js +22 -22
  57. package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
  58. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  59. package/dist/components/OperationsList/OperationsList.vue.js +2 -2
  60. package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
  61. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
  62. package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
  63. package/dist/components/ShowMoreButton.vue.d.ts +1 -0
  64. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  65. package/dist/components/ShowMoreButton.vue.js +2 -2
  66. package/dist/components/ShowMoreButton.vue2.js +12 -12
  67. package/dist/esm.d.ts +2 -2
  68. package/dist/esm.d.ts.map +1 -1
  69. package/dist/features/Operation/Operation.vue.d.ts +21 -9
  70. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  71. package/dist/features/Operation/Operation.vue.js +42 -53
  72. package/dist/features/Operation/components/Header.vue.d.ts +2 -2
  73. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  74. package/dist/features/Operation/components/Header.vue.js +9 -8
  75. package/dist/features/Operation/components/Headers.vue.d.ts +2 -2
  76. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  77. package/dist/features/Operation/components/Headers.vue.js +2 -2
  78. package/dist/features/Operation/components/Headers.vue2.js +31 -29
  79. package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -0
  80. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  81. package/dist/features/Operation/components/OperationParameters.vue.js +37 -31
  82. package/dist/features/Operation/components/OperationResponses.vue.d.ts +5 -1
  83. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  84. package/dist/features/Operation/components/OperationResponses.vue.js +16 -17
  85. package/dist/features/Operation/components/ParameterList.vue.d.ts +6 -2
  86. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/components/ParameterList.vue.js +17 -19
  88. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +6 -2
  89. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  90. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  91. package/dist/features/Operation/components/ParameterListItem.vue2.js +64 -65
  92. package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -0
  93. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  94. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  95. package/dist/features/Operation/components/RequestBody.vue2.js +65 -65
  96. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -0
  97. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  98. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  99. package/dist/features/Operation/components/callbacks/Callback.vue2.js +29 -22
  100. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +6 -0
  101. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  102. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -16
  103. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -5
  104. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  105. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  106. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +99 -90
  107. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -5
  108. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  109. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  110. package/dist/features/Operation/layouts/ModernLayout.vue2.js +99 -87
  111. package/dist/features/Search/helpers/create-search-index.d.ts +2 -1
  112. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  113. package/dist/features/Search/types.d.ts +1 -1
  114. package/dist/features/Search/types.d.ts.map +1 -1
  115. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  116. package/dist/features/api-client-modal/ApiClientModal.vue.js +23 -26
  117. package/dist/features/api-client-modal/useApiClient.d.ts +3039 -2895
  118. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  119. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts +2 -2
  120. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
  121. package/dist/features/document-source/hooks/useDocumentFetcher.js +13 -11
  122. package/dist/features/document-source/hooks/useDocumentSource.d.ts +2 -2
  123. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  124. package/dist/features/document-source/hooks/useDocumentSource.js +38 -34
  125. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  126. package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
  127. package/dist/features/example-responses/ExampleResponse.vue2.js +26 -18
  128. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  129. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  130. package/dist/features/example-responses/ExampleResponses.vue2.js +53 -53
  131. package/dist/features/multiple-documents/DocumentSelector.vue.d.ts +2 -2
  132. package/dist/features/multiple-documents/DocumentSelector.vue.d.ts.map +1 -1
  133. package/dist/features/multiple-documents/useMultipleDocuments.d.ts +10 -7
  134. package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
  135. package/dist/features/multiple-documents/useMultipleDocuments.js +47 -44
  136. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  137. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  138. package/dist/features/test-request-button/TestRequestButton.vue2.js +15 -21
  139. package/dist/features/toolbar/ApiReferenceToolbar.vue.js +18 -18
  140. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +1 -1
  141. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +2 -2
  142. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +1 -1
  143. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +1 -1
  144. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +8 -8
  145. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  146. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +34 -28
  147. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +27 -27
  148. package/dist/helpers/test-utils.d.ts +3 -365
  149. package/dist/helpers/test-utils.d.ts.map +1 -1
  150. package/dist/hooks/useNavState.d.ts +4 -2
  151. package/dist/hooks/useNavState.d.ts.map +1 -1
  152. package/dist/hooks/useNavState.js +31 -27
  153. package/dist/index.d.ts +1 -0
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/index.js +21 -19
  156. package/dist/standalone/lib/html-api.d.ts +3 -3
  157. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  158. package/dist/standalone/lib/register-globals.d.ts.map +1 -1
  159. package/dist/style.css +1 -1
  160. package/dist/types.d.ts +2 -2
  161. package/dist/types.d.ts.map +1 -1
  162. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  163. package/dist/v2/ApiReferenceWorkspace.vue.js +46 -40
  164. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  165. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  166. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +18 -19
  167. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  168. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  169. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +2 -2
  170. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +11 -11
  171. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  172. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  173. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +2 -2
  174. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -10
  175. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  176. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  177. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +3 -0
  178. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  179. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
  180. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +32 -31
  181. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +15 -8
  182. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
  183. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +25 -20
  184. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +8 -7
  185. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  186. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +2 -2
  187. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +27 -32
  188. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -22
  189. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  190. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts +8 -0
  191. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -1
  192. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +2 -2
  193. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js +70 -65
  194. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts +9 -1
  195. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -1
  196. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +2 -2
  197. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue2.js +60 -57
  198. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +3 -365
  199. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -1
  200. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +3 -183
  201. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -1
  202. package/dist/v2/helpers/map-configuration.d.ts +24 -24
  203. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  204. package/package.json +20 -17
  205. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +0 -13
  206. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +0 -1
  207. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +0 -52
  208. package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +0 -4
  209. package/dist/components/Content/Operations/index.d.ts +0 -2
  210. package/dist/components/Content/Operations/index.d.ts.map +0 -1
  211. package/dist/hooks/useConfig.d.ts +0 -9
  212. package/dist/hooks/useConfig.d.ts.map +0 -1
  213. package/dist/hooks/useConfig.js +0 -10
  214. package/dist/legacy/stores/index.d.ts +0 -2
  215. package/dist/legacy/stores/index.d.ts.map +0 -1
  216. package/dist/legacy/stores/useExampleStore.d.ts +0 -5
  217. package/dist/legacy/stores/useExampleStore.d.ts.map +0 -1
  218. package/dist/legacy/stores/useExampleStore.js +0 -8
  219. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +0 -14
  220. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +0 -1
  221. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
  222. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -55
  223. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +0 -79
  224. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +0 -1
  225. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
  226. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -236
  227. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +0 -41
  228. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +0 -1
  229. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +0 -22
  230. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +0 -20
  231. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +0 -1
  232. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -33
  233. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +0 -17
  234. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +0 -1
  235. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -26
  236. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +0 -4
  237. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +0 -1
  238. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
  239. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +0 -3
  240. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +0 -1
  241. package/dist/v2/blocks/scalar-request-example-block/types.d.ts +0 -29
  242. package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +0 -1
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.36.2",
23
+ "version": "1.38.0",
24
24
  "engines": {
25
25
  "node": ">=20"
26
26
  },
@@ -55,28 +55,28 @@
55
55
  "nanoid": "5.1.5",
56
56
  "type-fest": "^4.41.0",
57
57
  "vue": "^3.5.17",
58
- "zod": "3.24.1",
59
- "@scalar/api-client": "2.6.1",
58
+ "zod": "4.1.11",
60
59
  "@scalar/code-highlight": "0.2.0",
61
- "@scalar/components": "0.14.38",
60
+ "@scalar/api-client": "2.8.0",
61
+ "@scalar/components": "0.15.0",
62
62
  "@scalar/helpers": "0.0.11",
63
+ "@scalar/json-magic": "0.6.0",
64
+ "@scalar/oas-utils": "0.5.1",
63
65
  "@scalar/icons": "0.4.7",
64
- "@scalar/json-magic": "0.5.2",
66
+ "@scalar/openapi-parser": "0.22.2",
65
67
  "@scalar/object-utils": "1.2.7",
66
- "@scalar/openapi-types": "0.3.7",
67
- "@scalar/oas-utils": "0.4.33",
68
- "@scalar/openapi-upgrader": "0.1.0",
69
- "@scalar/themes": "0.13.19",
70
- "@scalar/openapi-parser": "0.21.2",
71
- "@scalar/types": "0.2.16",
68
+ "@scalar/openapi-types": "0.4.1",
69
+ "@scalar/snippetz": "0.5.0",
70
+ "@scalar/themes": "0.13.21",
72
71
  "@scalar/use-hooks": "0.2.5",
73
- "@scalar/snippetz": "0.4.10",
72
+ "@scalar/openapi-upgrader": "0.1.2",
73
+ "@scalar/types": "0.3.1",
74
74
  "@scalar/use-toasts": "0.8.0",
75
- "@scalar/workspace-store": "0.16.0"
75
+ "@scalar/workspace-store": "0.17.0"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@hono/node-server": "^1.11.0",
79
- "@playwright/test": "1.55.0",
79
+ "@playwright/test": "1.56.0",
80
80
  "@tailwindcss/vite": "^4.1.7",
81
81
  "@types/react": "^19.1.8",
82
82
  "@types/react-dom": "^19.1.6",
@@ -92,10 +92,10 @@
92
92
  "vite-plugin-banner": "^0.7.1",
93
93
  "vite-plugin-css-injected-by-js": "^3.4.0",
94
94
  "vitest": "3.2.4",
95
+ "@scalar/core": "0.3.19",
95
96
  "@scalar/build-tooling": "0.2.7",
96
97
  "@scalar/galaxy": "0.5.8",
97
- "@scalar/react-renderer": "0.2.1",
98
- "@scalar/core": "0.3.17"
98
+ "@scalar/react-renderer": "0.2.1"
99
99
  },
100
100
  "scripts": {
101
101
  "build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
@@ -111,8 +111,11 @@
111
111
  "playground:vue": "vite ./playground/vue -c ./playground/vue/vite.config.ts",
112
112
  "preview": "vite preview",
113
113
  "test": "vitest",
114
+ "test:benchmark": "vitest bench",
115
+ "test:benchmark:compare": "vitest bench --compare test-results/test-benchmark.json",
116
+ "test:benchmark:save": "vitest bench --outputJson test-results/test-benchmark.json",
114
117
  "test:e2e": "playwright test",
115
- "test:e2e:playwright": "docker run --network=host -e PORT=5001 -p 5001:5001 scalarapi/playwright:1.55.0",
118
+ "test:e2e:playwright": "docker run --network=host -e PORT=5001 -p 5001:5001 scalarapi/playwright:1.56.0",
116
119
  "test:e2e:report": "playwright show-report",
117
120
  "test:e2e:snapshots": "PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:5001/ playwright test -c playwright.snapshots.config.ts",
118
121
  "test:e2e:snapshots:ci": "playwright test -c playwright.snapshots.config.ts",
@@ -1,13 +0,0 @@
1
- import type { ApiReferenceConfiguration } from '@scalar/types';
2
- import type { WorkspaceStore } from '@scalar/workspace-store/client';
3
- import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
4
- import type { ClientOptionGroup } from '../../../v2/blocks/scalar-request-example-block/types';
5
- type __VLS_Props = {
6
- config: ApiReferenceConfiguration;
7
- clientOptions: ClientOptionGroup[];
8
- document: OpenApiDocument;
9
- store: WorkspaceStore;
10
- };
11
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
- export default _default;
13
- //# sourceMappingURL=TraversedEntryContainer.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TraversedEntryContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/TraversedEntryContainer.vue"],"names":[],"mappings":"AAyFA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAKnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAKvF,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,QAAQ,EAAE,eAAe,CAAA;IACzB,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;AA6GF,wBAMG"}
@@ -1,52 +0,0 @@
1
- import { defineComponent as m, computed as r, createElementBlock as d, createCommentVNode as f, unref as c, openBlock as p, createVNode as g } from "vue";
2
- import { useWorkspace as C, useActiveEntities as S } from "@scalar/api-client/store";
3
- import { getSlugUid as h } from "@scalar/oas-utils/transforms";
4
- import { getCurrentIndex as _ } from "./get-current-index.js";
5
- import { useNavState as k } from "../../../hooks/useNavState.js";
6
- import I from "./TraversedEntry.vue.js";
7
- import { useSidebar as O } from "../../../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
8
- const E = { key: 0 }, T = /* @__PURE__ */ m({
9
- __name: "TraversedEntryContainer",
10
- props: {
11
- config: {},
12
- clientOptions: {},
13
- document: {},
14
- store: {}
15
- },
16
- setup(n) {
17
- const { collections: s, servers: i } = C(), { activeCollection: l } = S(), t = r(() => {
18
- if (n.config?.slug) {
19
- const e = s[h(n.config.slug)];
20
- if (e)
21
- return e;
22
- }
23
- return l.value;
24
- }), u = r(() => {
25
- if (t.value) {
26
- if (t.value.selectedServerUid) {
27
- const e = i[t.value.selectedServerUid];
28
- if (e)
29
- return e;
30
- }
31
- return i[t.value.servers[0]];
32
- }
33
- }), { items: o } = O(), { hash: a } = k(), v = r(
34
- () => _(a.value, o.value.entries)
35
- );
36
- return (e, N) => c(o).entries.length && t.value ? (p(), d("div", E, [
37
- g(I, {
38
- activeCollection: t.value,
39
- activeServer: u.value,
40
- clientOptions: e.clientOptions,
41
- config: e.config,
42
- document: e.document,
43
- entries: c(o).entries,
44
- rootIndex: v.value,
45
- store: e.store
46
- }, null, 8, ["activeCollection", "activeServer", "clientOptions", "config", "document", "entries", "rootIndex", "store"])
47
- ])) : f("", !0);
48
- }
49
- });
50
- export {
51
- T as default
52
- };
@@ -1,4 +0,0 @@
1
- import f from "./TraversedEntryContainer.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1,2 +0,0 @@
1
- export { default as TraversedEntryContainer } from './TraversedEntryContainer.vue.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Operations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,+BAA+B,CAAA"}
@@ -1,9 +0,0 @@
1
- import { type ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
- import { type ComputedRef, type InjectionKey } from 'vue';
3
- export declare const CONFIGURATION_SYMBOL: InjectionKey<ComputedRef<ApiReferenceConfiguration>>;
4
- /**
5
- * New hook for reactive access to the client config
6
- * TODO: we need to move some properties from the store this way so that they are reactive
7
- */
8
- export declare const useConfig: () => ComputedRef<ApiReferenceConfiguration>;
9
- //# sourceMappingURL=useConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC7G,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAoB,MAAM,KAAK,CAAA;AAE3E,eAAO,MAAM,oBAAoB,EAAe,YAAY,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC,CAAA;AAEpG;;;GAGG;AACH,eAAO,MAAM,SAAS,8CAMrB,CAAA"}
@@ -1,10 +0,0 @@
1
- import { apiReferenceConfigurationSchema as o } from "@scalar/types/api-reference";
2
- import { inject as e, computed as n } from "vue";
3
- const r = Symbol(), f = () => e(
4
- r,
5
- n(() => o.parse({}))
6
- );
7
- export {
8
- r as CONFIGURATION_SYMBOL,
9
- f as useConfig
10
- };
@@ -1,2 +0,0 @@
1
- export { useExampleStore } from './useExampleStore.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/stores/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
@@ -1,5 +0,0 @@
1
- export declare const useExampleStore: () => {
2
- selectedExampleKey: import("vue").Ref<string | undefined, string | undefined>;
3
- operationId: import("vue").Ref<string | undefined, string | undefined>;
4
- };
5
- //# sourceMappingURL=useExampleStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useExampleStore.d.ts","sourceRoot":"","sources":["../../../src/legacy/stores/useExampleStore.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;;;CAG1B,CAAA"}
@@ -1,8 +0,0 @@
1
- import { ref as e } from "vue";
2
- const o = e(), t = e(), p = () => ({
3
- selectedExampleKey: o,
4
- operationId: t
5
- });
6
- export {
7
- p as useExampleStore
8
- };
@@ -1,14 +0,0 @@
1
- import type { MediaTypeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
- type __VLS_Props = {
3
- examples?: MediaTypeObject['examples'];
4
- };
5
- type __VLS_PublicProps = __VLS_Props & {
6
- modelValue: string;
7
- };
8
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
- "update:modelValue": (value: string) => any;
10
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
12
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
- export default _default;
14
- //# sourceMappingURL=ExamplePicker.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAGnG,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;CACvC,CAAC;AAwBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;;;;;;AA0GF,wBAOG"}
@@ -1,4 +0,0 @@
1
- import f from "./ExamplePicker.vue2.js";
2
- export {
3
- f as default
4
- };
@@ -1,55 +0,0 @@
1
- import { defineComponent as u, mergeModels as c, useModel as p, computed as n, createBlock as f, openBlock as x, unref as l, withCtx as r, createVNode as i, createElementVNode as v, toDisplayString as w } from "vue";
2
- import { ScalarListbox as V, ScalarButton as b } from "@scalar/components";
3
- import { ScalarIconCaretDown as g } from "@scalar/icons";
4
- const h = { class: "min-w-0 flex-1 truncate" }, k = /* @__PURE__ */ u({
5
- __name: "ExamplePicker",
6
- props: /* @__PURE__ */ c({
7
- examples: { default: () => ({}) }
8
- }, {
9
- modelValue: {
10
- required: !0
11
- },
12
- modelModifiers: {}
13
- }),
14
- emits: ["update:modelValue"],
15
- setup(o) {
16
- const s = p(o, "modelValue"), m = n(
17
- () => Object.entries(o.examples).map(([e, t]) => ({
18
- id: e,
19
- label: t?.summary ?? e
20
- }))
21
- ), a = n({
22
- get: () => m.value.find(({ id: e }) => e === s.value),
23
- set: (e) => s.value = e?.id ?? ""
24
- });
25
- return (e, t) => (x(), f(l(V), {
26
- modelValue: a.value,
27
- "onUpdate:modelValue": t[0] || (t[0] = (d) => a.value = d),
28
- class: "w-fit min-w-32",
29
- options: m.value,
30
- placement: "bottom-start"
31
- }, {
32
- default: r(() => [
33
- i(l(b), {
34
- class: "text-c-2 hover:text-c-1 flex h-full w-fit min-w-0 gap-1.5 px-1.5 py-0.75 text-base font-normal",
35
- "data-testid": "example-picker",
36
- fullWidth: "",
37
- variant: "ghost"
38
- }, {
39
- default: r(() => [
40
- v("div", h, w(a.value?.label ?? "Select an example"), 1),
41
- i(l(g), {
42
- class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
43
- weight: "bold"
44
- })
45
- ]),
46
- _: 1
47
- })
48
- ]),
49
- _: 1
50
- }, 8, ["modelValue", "options"]));
51
- }
52
- });
53
- export {
54
- k as default
55
- };
@@ -1,79 +0,0 @@
1
- import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
2
- import { type AvailableClients } from '@scalar/snippetz';
3
- import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
4
- import type { ClientOptionGroup } from '../../../../v2/blocks/scalar-request-example-block/types';
5
- export type RequestExampleProps = {
6
- /**
7
- * List of all http clients formatted into option groups for the client selector
8
- */
9
- clientOptions: ClientOptionGroup[];
10
- /**
11
- * Pre-selected client, this will determine which client is initially selected in the dropdown
12
- *
13
- * @defaults to shell/curl or a custom sample if one is available
14
- */
15
- selectedClient?: AvailableClients[number];
16
- /**
17
- * Which server from the spec to use for the code example
18
- */
19
- selectedServer?: ServerObject | undefined;
20
- /**
21
- * The selected content type from the requestBody.content, this will determine which examples are available
22
- * as well as the content type of the code example
23
- *
24
- * @defaults to the first content type
25
- */
26
- selectedContentType?: string;
27
- /**
28
- * In case you wish to pre-select an example from the requestBody.content.examples
29
- */
30
- selectedExample?: string;
31
- /**
32
- * The security schemes which are applicable to this operation
33
- */
34
- securitySchemes?: SecuritySchemeObject[];
35
- /**
36
- * HTTP method of the operation
37
- */
38
- method: HttpMethodType;
39
- /**
40
- * Path of the operation
41
- */
42
- path: string;
43
- /**
44
- * De-referenced OpenAPI Operation object
45
- */
46
- operation: OperationObject;
47
- /**
48
- * If true and there's no example, we will display a small card with the method and path only
49
- */
50
- fallback?: boolean;
51
- /**
52
- * A method to generate the label of the block, should return an html string
53
- */
54
- generateLabel?: () => string;
55
- /**
56
- * If true, render this as a webhook request example
57
- */
58
- isWebhook?: boolean;
59
- };
60
- /**
61
- * Request Example
62
- *
63
- * The core component for rendering a request example block,
64
- * this component does not have much of its own state but operates on props and custom events
65
- *
66
- * @event scalar-update-selected-client - Emitted when the selected client changes
67
- * @event scalar-update-selected-example - Emitted when the selected example changes
68
- */
69
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<RequestExampleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RequestExampleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
70
- header: () => unknown;
71
- footer: () => unknown;
72
- }>;
73
- export default _default;
74
- type __VLS_WithSlots<T, S> = T & {
75
- new (): {
76
- $slots: S;
77
- };
78
- };
79
- //# sourceMappingURL=RequestExample.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"AAqcA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,kBAAkB,CAAA;AAGvE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AASrE,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gDAAgD,CAAA;AAKvD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,eAAe,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;;YAkBO,MAAM,OAAO;YACb,MAAM,OAAO;;AAlBvB,wBAuiBC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +0,0 @@
1
- import o from "./RequestExample.vue2.js";
2
- /* empty css */
3
- import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8b2bccdf"]]);
5
- export {
6
- r as default
7
- };
@@ -1,236 +0,0 @@
1
- import { defineComponent as D, computed as u, ref as k, watch as H, useId as I, createBlock as h, createCommentVNode as m, openBlock as i, unref as o, withCtx as n, createVNode as s, createSlots as N, createElementVNode as y, createElementBlock as S, renderSlot as C, toDisplayString as z } from "vue";
2
- import { ScalarCard as E, ScalarCardHeader as K, ScalarCombobox as M, ScalarButton as F, ScalarCardSection as q, ScalarCodeBlock as U, ScalarCardFooter as A } from "@scalar/components";
3
- import { freezeElement as G } from "@scalar/helpers/dom/freeze-element";
4
- import { ScalarIconCaretDown as J } from "@scalar/icons";
5
- import { operationToHar as P } from "@scalar/oas-utils/helpers/operation-to-har";
6
- import { emitCustomEvent as T } from "@scalar/workspace-store/events";
7
- import { getResolvedRef as Q } from "@scalar/workspace-store/helpers/get-resolved-ref";
8
- import { getResolvedRefDeep as $ } from "../../../../features/example-responses/helpers/get-resolved-ref-deep.js";
9
- import { findClient as j } from "../helpers/find-client.js";
10
- import { generateCustomId as B } from "../helpers/generate-client-options.js";
11
- import { generateCodeSnippet as X } from "../helpers/generate-code-snippet.js";
12
- import { getSecrets as Y } from "../helpers/get-secrets.js";
13
- import Z from "./ExamplePicker.vue2.js";
14
- import V from "../../../../components/HttpMethod/HttpMethod.vue.js";
15
- const _ = ["innerHTML"], ee = { class: "text-base font-normal" }, te = ["id"], le = {
16
- key: 0,
17
- class: "request-card-footer-addon"
18
- }, oe = { class: "request-header" }, ae = {}, be = /* @__PURE__ */ D({
19
- ...ae,
20
- __name: "RequestExample",
21
- props: {
22
- clientOptions: {},
23
- selectedClient: {},
24
- selectedServer: { default: () => ({ url: "/" }) },
25
- selectedContentType: {},
26
- selectedExample: {},
27
- securitySchemes: { default: () => [] },
28
- method: {},
29
- path: {},
30
- operation: {},
31
- fallback: { type: Boolean },
32
- generateLabel: { type: Function },
33
- isWebhook: { type: Boolean }
34
- },
35
- setup(l) {
36
- const c = u(() => {
37
- const e = Q(l.operation.requestBody)?.content ?? {}, t = l.selectedContentType || Object.keys(e)[0];
38
- return e[t]?.examples ?? {};
39
- }), f = k(
40
- l.selectedExample ?? Object.keys(c.value)[0]
41
- ), b = u(() => [
42
- "x-custom-examples",
43
- "x-codeSamples",
44
- "x-code-samples"
45
- ].flatMap((t) => l.operation[t] ?? [])), p = u(() => b.value.length ? [
46
- {
47
- label: "Code Examples",
48
- options: b.value.map((t) => {
49
- const a = B(t), v = t.label || t.lang || a;
50
- return {
51
- id: a,
52
- lang: t.lang || "plaintext",
53
- title: v,
54
- label: v
55
- };
56
- })
57
- },
58
- ...l.clientOptions
59
- ] : l.clientOptions), r = k(
60
- j(p.value, l.selectedClient) ?? null
61
- );
62
- H(
63
- () => l.selectedClient,
64
- (e) => {
65
- const t = j(p.value, e);
66
- t && (r.value = t);
67
- }
68
- );
69
- const g = u(() => {
70
- if (!l.isWebhook) return null;
71
- try {
72
- const e = c.value[f.value || ""], t = $(e), a = t?.value ?? t?.summary;
73
- return P({ operation: l.operation, method: l.method, path: l.path, example: a });
74
- } catch (e) {
75
- return console.error("[webhookHar]", e), null;
76
- }
77
- }), x = u(() => {
78
- try {
79
- if (r.value?.id.startsWith("custom"))
80
- return b.value.find(
81
- (v) => B(v) === r.value?.id
82
- )?.source ?? "Custom example not found";
83
- const e = c.value[f.value || ""], t = $(e), a = t?.value ?? t?.summary;
84
- return l.isWebhook ? g.value?.postData?.text ?? "" : X({
85
- clientId: r.value?.id,
86
- operation: l.operation,
87
- method: l.method,
88
- server: l.selectedServer,
89
- securitySchemes: l.securitySchemes,
90
- contentType: l.selectedContentType,
91
- path: l.path,
92
- example: a
93
- });
94
- } catch (e) {
95
- return console.error("[generateSnippet]", e), "";
96
- }
97
- }), w = u(() => l.isWebhook ? O.value : r.value?.lang), O = u(() => {
98
- if (!g.value?.postData) return "json";
99
- const e = g.value.postData.mimeType;
100
- return e?.includes("json") ? "json" : e?.includes("xml") ? "xml" : e?.includes("yaml") || e?.includes("yml") ? "yaml" : e?.includes("text/plain") ? "text" : "json";
101
- }), W = u(() => Y(l.securitySchemes)), d = k(null), L = (e) => {
102
- if (d.value) {
103
- const t = G(d.value.$el);
104
- setTimeout(() => {
105
- t();
106
- }, 300);
107
- }
108
- r.value = e, e.id.startsWith("custom") || T(d.value?.$el, "scalar-update-selected-client", e.id);
109
- }, R = I();
110
- return (e, t) => x.value ? (i(), h(o(E), {
111
- key: 0,
112
- ref_key: "elem",
113
- ref: d,
114
- class: "request-card dark-mode"
115
- }, {
116
- default: n(() => [
117
- s(o(K), { class: "pr-2.5" }, N({
118
- default: n(() => [
119
- t[3] || (t[3] = y("span", { class: "sr-only" }, "Request Example for", -1)),
120
- s(o(V), {
121
- as: "span",
122
- class: "request-method",
123
- method: e.method
124
- }, null, 8, ["method"]),
125
- e.generateLabel ? (i(), S("span", {
126
- key: 0,
127
- innerHTML: e.generateLabel()
128
- }, null, 8, _)) : m("", !0),
129
- C(e.$slots, "header", {}, void 0, !0)
130
- ]),
131
- _: 2
132
- }, [
133
- !e.isWebhook && p.value.length ? {
134
- name: "actions",
135
- fn: n(() => [
136
- s(o(M), {
137
- class: "max-h-80",
138
- modelValue: r.value,
139
- options: p.value,
140
- placement: "bottom-end",
141
- teleport: "",
142
- "onUpdate:modelValue": t[0] || (t[0] = (a) => L(a))
143
- }, {
144
- default: n(() => [
145
- s(o(F), {
146
- class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5",
147
- "data-testid": "client-picker",
148
- fullWidth: "",
149
- variant: "ghost"
150
- }, {
151
- default: n(() => [
152
- y("span", ee, z(r.value.title), 1),
153
- s(o(J), {
154
- class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
155
- weight: "bold"
156
- })
157
- ]),
158
- _: 1
159
- })
160
- ]),
161
- _: 1
162
- }, 8, ["modelValue", "options"])
163
- ]),
164
- key: "0"
165
- } : void 0
166
- ]), 1024),
167
- s(o(q), { class: "request-editor-section custom-scroll p-0" }, {
168
- default: n(() => [
169
- y("div", {
170
- id: `${o(R)}-example`,
171
- class: "code-snippet"
172
- }, [
173
- s(o(U), {
174
- class: "bg-b-2 !min-h-full -outline-offset-2",
175
- content: x.value,
176
- hideCredentials: W.value,
177
- lang: w.value,
178
- lineNumbers: ""
179
- }, null, 8, ["content", "hideCredentials", "lang"])
180
- ], 8, te)
181
- ]),
182
- _: 1
183
- }),
184
- Object.keys(c.value).length > 1 || e.$slots.footer ? (i(), h(o(A), {
185
- key: 0,
186
- class: "request-card-footer bg-b-3"
187
- }, {
188
- default: n(() => [
189
- Object.keys(c.value).length > 1 ? (i(), S("div", le, [
190
- Object.keys(c.value).length ? (i(), h(Z, {
191
- key: 0,
192
- modelValue: f.value,
193
- "onUpdate:modelValue": [
194
- t[1] || (t[1] = (a) => f.value = a),
195
- t[2] || (t[2] = (a) => o(T)(
196
- d.value?.$el,
197
- "scalar-update-selected-example",
198
- a
199
- ))
200
- ],
201
- examples: c.value
202
- }, null, 8, ["modelValue", "examples"])) : m("", !0)
203
- ])) : m("", !0),
204
- C(e.$slots, "footer", {}, void 0, !0)
205
- ]),
206
- _: 3
207
- })) : m("", !0)
208
- ]),
209
- _: 3
210
- }, 512)) : e.fallback ? (i(), h(o(E), {
211
- key: 1,
212
- class: "request-card dark-mode"
213
- }, {
214
- default: n(() => [
215
- s(o(q), { class: "request-card-simple" }, {
216
- default: n(() => [
217
- y("div", oe, [
218
- s(o(V), {
219
- as: "span",
220
- class: "request-method",
221
- method: e.method
222
- }, null, 8, ["method"]),
223
- C(e.$slots, "header", {}, void 0, !0)
224
- ]),
225
- C(e.$slots, "footer", {}, void 0, !0)
226
- ]),
227
- _: 3
228
- })
229
- ]),
230
- _: 3
231
- })) : m("", !0);
232
- }
233
- });
234
- export {
235
- be as default
236
- };