@scalar/api-reference 1.36.2 → 1.37.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 (226) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/browser/standalone.js +26143 -25935
  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/OperationsList/OperationsList.vue.d.ts +1 -1
  55. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  56. package/dist/components/OperationsList/OperationsList.vue.js +2 -2
  57. package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
  58. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
  59. package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
  60. package/dist/components/ShowMoreButton.vue.d.ts +1 -0
  61. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  62. package/dist/components/ShowMoreButton.vue.js +2 -2
  63. package/dist/components/ShowMoreButton.vue2.js +12 -12
  64. package/dist/features/Operation/Operation.vue.d.ts +21 -9
  65. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  66. package/dist/features/Operation/Operation.vue.js +42 -53
  67. package/dist/features/Operation/components/Header.vue.d.ts +2 -2
  68. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  69. package/dist/features/Operation/components/Header.vue.js +9 -8
  70. package/dist/features/Operation/components/Headers.vue.d.ts +2 -2
  71. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  72. package/dist/features/Operation/components/Headers.vue.js +2 -2
  73. package/dist/features/Operation/components/Headers.vue2.js +31 -29
  74. package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -0
  75. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  76. package/dist/features/Operation/components/OperationParameters.vue.js +37 -31
  77. package/dist/features/Operation/components/OperationResponses.vue.d.ts +5 -1
  78. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  79. package/dist/features/Operation/components/OperationResponses.vue.js +16 -17
  80. package/dist/features/Operation/components/ParameterList.vue.d.ts +6 -2
  81. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  82. package/dist/features/Operation/components/ParameterList.vue.js +17 -19
  83. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +6 -2
  84. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  85. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  86. package/dist/features/Operation/components/ParameterListItem.vue2.js +64 -65
  87. package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -0
  88. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  89. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  90. package/dist/features/Operation/components/RequestBody.vue2.js +65 -65
  91. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -0
  92. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  93. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  94. package/dist/features/Operation/components/callbacks/Callback.vue2.js +29 -22
  95. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +6 -0
  96. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  97. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -16
  98. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -5
  99. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  100. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  101. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +99 -90
  102. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -5
  103. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  105. package/dist/features/Operation/layouts/ModernLayout.vue2.js +99 -87
  106. package/dist/features/Search/helpers/create-search-index.d.ts +2 -1
  107. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  108. package/dist/features/Search/types.d.ts +1 -1
  109. package/dist/features/Search/types.d.ts.map +1 -1
  110. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  111. package/dist/features/api-client-modal/ApiClientModal.vue.js +23 -26
  112. package/dist/features/api-client-modal/useApiClient.d.ts +3032 -2888
  113. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  114. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
  115. package/dist/features/document-source/hooks/useDocumentFetcher.js +13 -11
  116. package/dist/features/document-source/hooks/useDocumentSource.d.ts +1 -1
  117. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  118. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  119. package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
  120. package/dist/features/example-responses/ExampleResponse.vue2.js +26 -18
  121. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  122. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  123. package/dist/features/example-responses/ExampleResponses.vue2.js +53 -53
  124. package/dist/features/multiple-documents/useMultipleDocuments.d.ts +8 -5
  125. package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
  126. package/dist/features/multiple-documents/useMultipleDocuments.js +46 -43
  127. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  128. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  129. package/dist/features/test-request-button/TestRequestButton.vue2.js +15 -21
  130. package/dist/features/toolbar/ApiReferenceToolbar.vue.js +18 -18
  131. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +1 -1
  132. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +2 -2
  133. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +1 -1
  134. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +1 -1
  135. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +8 -8
  136. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  137. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +34 -28
  138. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +27 -27
  139. package/dist/helpers/test-utils.d.ts +3 -365
  140. package/dist/helpers/test-utils.d.ts.map +1 -1
  141. package/dist/hooks/useNavState.d.ts +4 -2
  142. package/dist/hooks/useNavState.d.ts.map +1 -1
  143. package/dist/hooks/useNavState.js +31 -27
  144. package/dist/index.d.ts +1 -0
  145. package/dist/index.d.ts.map +1 -1
  146. package/dist/index.js +21 -19
  147. package/dist/style.css +1 -1
  148. package/dist/types.d.ts.map +1 -1
  149. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  150. package/dist/v2/ApiReferenceWorkspace.vue.js +46 -40
  151. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  152. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  153. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +2 -2
  154. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +11 -11
  155. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  156. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  157. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +2 -2
  158. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -10
  159. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  160. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  161. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +3 -0
  162. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  163. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
  164. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +32 -31
  165. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +15 -8
  166. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
  167. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +25 -20
  168. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +8 -7
  169. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  170. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +2 -2
  171. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +27 -32
  172. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -22
  173. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  174. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts +8 -0
  175. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -1
  176. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +2 -2
  177. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js +70 -65
  178. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts +9 -1
  179. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -1
  180. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +2 -2
  181. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue2.js +60 -57
  182. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +3 -365
  183. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -1
  184. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +3 -183
  185. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -1
  186. package/dist/v2/helpers/map-configuration.d.ts +22 -22
  187. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  188. package/package.json +19 -16
  189. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +0 -13
  190. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +0 -1
  191. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +0 -52
  192. package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +0 -4
  193. package/dist/components/Content/Operations/index.d.ts +0 -2
  194. package/dist/components/Content/Operations/index.d.ts.map +0 -1
  195. package/dist/hooks/useConfig.d.ts +0 -9
  196. package/dist/hooks/useConfig.d.ts.map +0 -1
  197. package/dist/hooks/useConfig.js +0 -10
  198. package/dist/legacy/stores/index.d.ts +0 -2
  199. package/dist/legacy/stores/index.d.ts.map +0 -1
  200. package/dist/legacy/stores/useExampleStore.d.ts +0 -5
  201. package/dist/legacy/stores/useExampleStore.d.ts.map +0 -1
  202. package/dist/legacy/stores/useExampleStore.js +0 -8
  203. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +0 -14
  204. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +0 -1
  205. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
  206. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -55
  207. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +0 -79
  208. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +0 -1
  209. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
  210. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -236
  211. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +0 -41
  212. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +0 -1
  213. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +0 -22
  214. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +0 -20
  215. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +0 -1
  216. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -33
  217. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +0 -17
  218. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +0 -1
  219. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -26
  220. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +0 -4
  221. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +0 -1
  222. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
  223. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +0 -3
  224. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +0 -1
  225. package/dist/v2/blocks/scalar-request-example-block/types.d.ts +0 -29
  226. package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +0 -1
@@ -1,189 +1,9 @@
1
- import type { OpenApiDocument, TraversedEntry } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
1
+ import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
2
+ import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
3
  /**
3
4
  * Generate a reverse index for fast lookups of entities by their IDs.
4
5
  */
5
- export declare const generateReverseIndex: (navigation?: OpenApiDocument["x-scalar-navigation"]) => Map<string, (({
6
- title: string;
7
- id: string;
8
- } & {
9
- description?: string | undefined;
10
- children?: (({
11
- title: string;
12
- id: string;
13
- } & /*elided*/ any) | ({
14
- title: string;
15
- id: string;
16
- } & {
17
- children?: (({
18
- title: string;
19
- id: string;
20
- } & /*elided*/ any) | ({
21
- title: string;
22
- id: string;
23
- } & /*elided*/ any) | ({
24
- title: string;
25
- id: string;
26
- } & {
27
- isDeprecated?: boolean | undefined;
28
- path: string;
29
- method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
30
- type: "operation";
31
- ref: string;
32
- }) | ({
33
- title: string;
34
- id: string;
35
- } & {
36
- type: "model";
37
- ref: string;
38
- name: string;
39
- }) | ({
40
- title: string;
41
- id: string;
42
- } & {
43
- isDeprecated?: boolean | undefined;
44
- method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
45
- type: "webhook";
46
- ref: string;
47
- name: string;
48
- }))[] | undefined;
49
- type: "text";
50
- }) | ({
51
- title: string;
52
- id: string;
53
- } & {
54
- isDeprecated?: boolean | undefined;
55
- path: string;
56
- method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
57
- type: "operation";
58
- ref: string;
59
- }) | ({
60
- title: string;
61
- id: string;
62
- } & {
63
- type: "model";
64
- ref: string;
65
- name: string;
66
- }) | ({
67
- title: string;
68
- id: string;
69
- } & {
70
- isDeprecated?: boolean | undefined;
71
- method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
72
- type: "webhook";
73
- ref: string;
74
- name: string;
75
- }))[] | undefined;
76
- isWebhooks?: boolean | undefined;
77
- xKeys?: {
78
- [x: string]: unknown;
79
- } | undefined;
80
- type: "tag";
81
- name: string;
82
- isGroup: boolean;
83
- }) | ({
84
- title: string;
85
- id: string;
86
- } & {
87
- children?: (({
88
- title: string;
89
- id: string;
90
- } & {
91
- description?: string | undefined;
92
- children?: (({
93
- title: string;
94
- id: string;
95
- } & /*elided*/ any) | ({
96
- title: string;
97
- id: string;
98
- } & /*elided*/ any) | ({
99
- title: string;
100
- id: string;
101
- } & {
102
- isDeprecated?: boolean | undefined;
103
- path: string;
104
- method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
105
- type: "operation";
106
- ref: string;
107
- }) | ({
108
- title: string;
109
- id: string;
110
- } & {
111
- type: "model";
112
- ref: string;
113
- name: string;
114
- }) | ({
115
- title: string;
116
- id: string;
117
- } & {
118
- isDeprecated?: boolean | undefined;
119
- method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
120
- type: "webhook";
121
- ref: string;
122
- name: string;
123
- }))[] | undefined;
124
- isWebhooks?: boolean | undefined;
125
- xKeys?: {
126
- [x: string]: unknown;
127
- } | undefined;
128
- type: "tag";
129
- name: string;
130
- isGroup: boolean;
131
- }) | ({
132
- title: string;
133
- id: string;
134
- } & /*elided*/ any) | ({
135
- title: string;
136
- id: string;
137
- } & {
138
- isDeprecated?: boolean | undefined;
139
- path: string;
140
- method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
141
- type: "operation";
142
- ref: string;
143
- }) | ({
144
- title: string;
145
- id: string;
146
- } & {
147
- type: "model";
148
- ref: string;
149
- name: string;
150
- }) | ({
151
- title: string;
152
- id: string;
153
- } & {
154
- isDeprecated?: boolean | undefined;
155
- method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
156
- type: "webhook";
157
- ref: string;
158
- name: string;
159
- }))[] | undefined;
160
- type: "text";
161
- }) | ({
162
- title: string;
163
- id: string;
164
- } & {
165
- isDeprecated?: boolean | undefined;
166
- path: string;
167
- method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
168
- type: "operation";
169
- ref: string;
170
- }) | ({
171
- title: string;
172
- id: string;
173
- } & {
174
- type: "model";
175
- ref: string;
176
- name: string;
177
- }) | ({
178
- title: string;
179
- id: string;
180
- } & {
181
- isDeprecated?: boolean | undefined;
182
- method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
183
- type: "webhook";
184
- ref: string;
185
- name: string;
186
- })) & {
6
+ export declare const generateReverseIndex: (navigation?: OpenApiDocument["x-scalar-navigation"]) => Map<string, TraversedEntry & {
187
7
  parent?: TraversedEntry;
188
8
  }>;
189
9
  //# sourceMappingURL=generate-reverse-index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-reverse-index.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAA;AAEnH;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,aAAY,eAAe,CAAC,qBAAqB,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAE9B,cAAc;EAe3E,CAAA"}
1
+ {"version":3,"file":"generate-reverse-index.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAEnG;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,aAAY,eAAe,CAAC,qBAAqB,CAAM;aAE9B,cAAc;EAe3E,CAAA"}
@@ -28,7 +28,7 @@ export declare const mapConfiguration: (config: Partial<ApiReferenceConfiguratio
28
28
  initialColorMode: "dark" | undefined;
29
29
  layout: "modern" | "classic" | undefined;
30
30
  loadDefaultFonts: boolean | undefined;
31
- theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none" | undefined;
31
+ theme: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none" | undefined;
32
32
  };
33
33
  routing: {
34
34
  basePath: string | undefined;
@@ -40,27 +40,27 @@ export declare const mapConfiguration: (config: Partial<ApiReferenceConfiguratio
40
40
  servers: any[] | undefined;
41
41
  };
42
42
  meta: any;
43
- tagSort: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
44
- operationsSorter: "alpha" | "method" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
45
- generateHeadingSlug: ((args_0: {
46
- slug?: string | undefined;
47
- }, ...args: unknown[]) => string) | undefined;
48
- generateModelSlug: ((args_0: {
49
- name?: string | undefined;
50
- }, ...args: unknown[]) => string) | undefined;
51
- generateOperationSlug: ((args_0: {
52
- path: string;
53
- method: string;
54
- summary?: string | undefined;
55
- operationId?: string | undefined;
56
- }, ...args: unknown[]) => string) | undefined;
57
- generateTagSlug: ((args_0: {
58
- name?: string | undefined;
59
- }, ...args: unknown[]) => string) | undefined;
60
- generateWebhookSlug: ((args_0: {
61
- name: string;
62
- method?: string | undefined;
63
- }, ...args: unknown[]) => string) | undefined;
43
+ tagSort: "alpha" | import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodAny, import("zod").ZodAny], null>, import("zod").ZodNumber> | undefined;
44
+ operationsSorter: "alpha" | import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodAny, import("zod").ZodAny], null>, import("zod").ZodNumber> | "method" | undefined;
45
+ generateHeadingSlug: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
46
+ slug: import("zod").ZodDefault<import("zod").ZodString>;
47
+ }, import("zod/v4/core").$strip>], null>, import("zod").ZodString> | undefined;
48
+ generateModelSlug: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
49
+ name: import("zod").ZodDefault<import("zod").ZodString>;
50
+ }, import("zod/v4/core").$strip>], null>, import("zod").ZodString> | undefined;
51
+ generateOperationSlug: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
52
+ path: import("zod").ZodString;
53
+ operationId: import("zod").ZodOptional<import("zod").ZodString>;
54
+ method: import("zod").ZodString;
55
+ summary: import("zod").ZodOptional<import("zod").ZodString>;
56
+ }, import("zod/v4/core").$strip>], null>, import("zod").ZodString> | undefined;
57
+ generateTagSlug: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
58
+ name: import("zod").ZodDefault<import("zod").ZodString>;
59
+ }, import("zod/v4/core").$strip>], null>, import("zod").ZodString> | undefined;
60
+ generateWebhookSlug: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
61
+ name: import("zod").ZodString;
62
+ method: import("zod").ZodOptional<import("zod").ZodString>;
63
+ }, import("zod/v4/core").$strip>], null>, import("zod").ZodString> | undefined;
64
64
  };
65
65
  };
66
66
  //# sourceMappingURL=map-configuration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"map-configuration.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/map-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAG9D;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAiD+o4C,CAAC;;;gBAAyH,CAAC;;;;;mBAAsS,CAAC;uBAAyC,CAAC;;;gBAA1N,CAAC;;;;kBAA4W,CAAC;;;CADzz5C,CAAA"}
1
+ {"version":3,"file":"map-configuration.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/map-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAG9D;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD1E,CAAA"}
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.36.2",
23
+ "version": "1.37.0",
24
24
  "engines": {
25
25
  "node": ">=20"
26
26
  },
@@ -55,24 +55,24 @@
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",
60
- "@scalar/code-highlight": "0.2.0",
61
- "@scalar/components": "0.14.38",
58
+ "zod": "4.1.11",
59
+ "@scalar/api-client": "2.7.0",
62
60
  "@scalar/helpers": "0.0.11",
61
+ "@scalar/components": "0.14.40",
63
62
  "@scalar/icons": "0.4.7",
64
- "@scalar/json-magic": "0.5.2",
63
+ "@scalar/code-highlight": "0.2.0",
64
+ "@scalar/json-magic": "0.6.0",
65
+ "@scalar/oas-utils": "0.5.0",
65
66
  "@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",
67
+ "@scalar/openapi-types": "0.4.0",
68
+ "@scalar/openapi-parser": "0.22.1",
69
+ "@scalar/snippetz": "0.4.11",
70
+ "@scalar/themes": "0.13.20",
71
+ "@scalar/types": "0.3.0",
72
+ "@scalar/openapi-upgrader": "0.1.1",
72
73
  "@scalar/use-hooks": "0.2.5",
73
- "@scalar/snippetz": "0.4.10",
74
74
  "@scalar/use-toasts": "0.8.0",
75
- "@scalar/workspace-store": "0.16.0"
75
+ "@scalar/workspace-store": "0.16.2"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@hono/node-server": "^1.11.0",
@@ -93,9 +93,9 @@
93
93
  "vite-plugin-css-injected-by-js": "^3.4.0",
94
94
  "vitest": "3.2.4",
95
95
  "@scalar/build-tooling": "0.2.7",
96
+ "@scalar/core": "0.3.18",
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,6 +111,9 @@
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
118
  "test:e2e:playwright": "docker run --network=host -e PORT=5001 -p 5001:5001 scalarapi/playwright:1.55.0",
116
119
  "test:e2e:report": "playwright show-report",
@@ -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
- };