@scalar/api-reference 1.35.7 → 1.36.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 (194) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/browser/standalone.js +14984 -15007
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  6. package/dist/components/ApiReferenceLayout.vue2.js +148 -150
  7. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  8. package/dist/components/Content/Content.vue.js +44 -51
  9. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +4 -1
  10. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
  12. package/dist/components/Content/Models/ClassicLayout.vue2.js +49 -40
  13. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  14. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Models/Models.vue.js +25 -23
  16. package/dist/components/Content/Models/ModernLayout.vue.d.ts +1 -0
  17. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  19. package/dist/components/Content/Models/ModernLayout.vue2.js +54 -51
  20. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -2
  21. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Operations/TraversedEntry.vue.js +24 -24
  23. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
  25. package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
  26. package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
  27. package/dist/components/Content/Operations/get-current-index.js +1 -1
  28. package/dist/components/Content/Schema/Schema.vue.d.ts +3 -4
  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 +72 -75
  32. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -5
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/SchemaComposition.vue.js +46 -49
  35. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -7
  36. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  37. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +33 -54
  38. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -6
  39. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  41. package/dist/components/Content/Schema/SchemaProperty.vue2.js +72 -76
  42. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts +16 -0
  43. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts.map +1 -0
  44. package/dist/components/Content/Schema/helpers/sort-property-names.js +36 -0
  45. package/dist/components/Content/Schema/types.d.ts +17 -0
  46. package/dist/components/Content/Schema/types.d.ts.map +1 -0
  47. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
  48. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
  49. package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
  50. package/dist/components/Content/Tags/ClassicLayout.vue2.js +1 -1
  51. package/dist/components/Content/Tags/ModernLayout.vue.d.ts +1 -1
  52. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
  53. package/dist/components/Content/Tags/ModernLayout.vue.js +2 -2
  54. package/dist/components/Content/Tags/ModernLayout.vue2.js +2 -2
  55. package/dist/components/Content/Tags/Tag.vue.d.ts +1 -1
  56. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
  57. package/dist/components/Content/Tags/TagSection.vue.d.ts +1 -1
  58. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
  59. package/dist/components/Content/Tags/TagSection.vue.js +4 -4
  60. package/dist/components/MobileHeader.vue.js +2 -2
  61. package/dist/components/MobileHeader.vue2.js +1 -1
  62. package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
  63. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  64. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  65. package/dist/components/OperationsList/OperationsList.vue2.js +9 -11
  66. package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
  67. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
  68. package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
  69. package/dist/components/OperationsList/OperationsListItem.vue2.js +24 -27
  70. package/dist/components/Section/Section.vue.d.ts.map +1 -1
  71. package/dist/components/Section/Section.vue.js +2 -2
  72. package/dist/components/Section/Section.vue2.js +12 -13
  73. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  74. package/dist/components/Section/SectionAccordion.vue.js +1 -1
  75. package/dist/components/Section/SectionAccordion.vue2.js +36 -37
  76. package/dist/components/ShowMoreButton.vue.js +2 -2
  77. package/dist/components/ShowMoreButton.vue2.js +3 -3
  78. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  79. package/dist/features/Operation/Operation.vue.js +32 -22
  80. package/dist/features/Operation/components/Header.vue.d.ts +2 -0
  81. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  82. package/dist/features/Operation/components/Header.vue.js +15 -10
  83. package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
  84. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  85. package/dist/features/Operation/components/Headers.vue.js +1 -1
  86. package/dist/features/Operation/components/Headers.vue2.js +23 -21
  87. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  88. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  89. package/dist/features/Operation/components/ParameterListItem.vue2.js +55 -48
  90. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  91. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  92. package/dist/features/Operation/components/RequestBody.vue2.js +74 -49
  93. package/dist/features/Operation/helpers/get-first-server.d.ts +9 -0
  94. package/dist/features/Operation/helpers/get-first-server.d.ts.map +1 -0
  95. package/dist/features/Operation/helpers/get-first-server.js +20 -0
  96. package/dist/features/Search/components/SearchButton.vue.d.ts +2 -0
  97. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  98. package/dist/features/Search/components/SearchButton.vue.js +19 -17
  99. package/dist/features/Search/components/SearchModal.vue.d.ts +2 -1
  100. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  101. package/dist/features/Search/components/SearchModal.vue.js +2 -2
  102. package/dist/features/Search/components/SearchModal.vue2.js +74 -75
  103. package/dist/features/Search/helpers/create-search-index.d.ts +2 -2
  104. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  105. package/dist/features/Search/helpers/create-search-index.js +68 -66
  106. package/dist/features/Search/hooks/useSearchIndex.d.ts +3 -2
  107. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  108. package/dist/features/Search/hooks/useSearchIndex.js +13 -13
  109. package/dist/features/Search/types.d.ts +1 -1
  110. package/dist/features/Search/types.d.ts.map +1 -1
  111. package/dist/features/api-client-modal/useApiClient.d.ts +40 -40
  112. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  113. package/dist/helpers/convert-security-scheme.d.ts +1 -1
  114. package/dist/helpers/test-utils.d.ts +367 -5
  115. package/dist/helpers/test-utils.d.ts.map +1 -1
  116. package/dist/hooks/useNavState.d.ts +1 -15
  117. package/dist/hooks/useNavState.d.ts.map +1 -1
  118. package/dist/hooks/useNavState.js +29 -53
  119. package/dist/index.d.ts +5 -6
  120. package/dist/index.d.ts.map +1 -1
  121. package/dist/index.js +16 -20
  122. package/dist/style.css +1 -1
  123. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
  124. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +5 -6
  125. package/dist/{features/sidebar/components/Sidebar.vue.d.ts → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts} +1 -1
  126. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -0
  127. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +7 -0
  128. package/dist/{features/sidebar/components/Sidebar.vue2.js → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js} +15 -15
  129. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue.d.ts +1 -1
  130. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -0
  131. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +7 -0
  132. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue2.js +41 -43
  133. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.d.ts.map +1 -0
  134. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.js +7 -0
  135. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.js +7 -0
  137. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue2.js +1 -1
  138. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +385 -0
  139. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -0
  140. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.js +35 -0
  141. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +189 -0
  142. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -0
  143. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.js +9 -0
  144. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/hooks/useSidebar.d.ts +4 -8
  145. package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.d.ts.map +1 -0
  146. package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.js +18 -0
  147. package/dist/v2/blocks/scalar-sidebar-block/index.d.ts +4 -0
  148. package/dist/v2/blocks/scalar-sidebar-block/index.d.ts.map +1 -0
  149. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  150. package/package.json +11 -11
  151. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +0 -1
  152. package/dist/features/sidebar/components/Sidebar.vue.js +0 -7
  153. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +0 -1
  154. package/dist/features/sidebar/components/SidebarElement.vue.js +0 -7
  155. package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +0 -1
  156. package/dist/features/sidebar/components/SidebarGroup.vue.js +0 -7
  157. package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +0 -1
  158. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +0 -7
  159. package/dist/features/sidebar/helpers/create-sidebar.d.ts +0 -28
  160. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +0 -1
  161. package/dist/features/sidebar/helpers/create-sidebar.js +0 -32
  162. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +0 -1
  163. package/dist/features/sidebar/hooks/useSidebar.js +0 -18
  164. package/dist/features/sidebar/index.d.ts +0 -4
  165. package/dist/features/sidebar/index.d.ts.map +0 -1
  166. package/dist/features/traverse-schema/helpers/get-tag.d.ts +0 -6
  167. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +0 -1
  168. package/dist/features/traverse-schema/helpers/get-tag.js +0 -7
  169. package/dist/features/traverse-schema/helpers/traverse-description.d.ts +0 -11
  170. package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +0 -1
  171. package/dist/features/traverse-schema/helpers/traverse-description.js +0 -32
  172. package/dist/features/traverse-schema/helpers/traverse-document.d.ts +0 -16
  173. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +0 -1
  174. package/dist/features/traverse-schema/helpers/traverse-document.js +0 -33
  175. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +0 -18
  176. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +0 -1
  177. package/dist/features/traverse-schema/helpers/traverse-paths.js +0 -30
  178. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +0 -8
  179. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +0 -1
  180. package/dist/features/traverse-schema/helpers/traverse-schemas.js +0 -21
  181. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +0 -11
  182. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +0 -1
  183. package/dist/features/traverse-schema/helpers/traverse-tags.js +0 -43
  184. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +0 -10
  185. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +0 -1
  186. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +0 -24
  187. package/dist/features/traverse-schema/index.d.ts +0 -5
  188. package/dist/features/traverse-schema/index.d.ts.map +0 -1
  189. package/dist/features/traverse-schema/types.d.ts +0 -55
  190. package/dist/features/traverse-schema/types.d.ts.map +0 -1
  191. package/dist/libs/markdown.js +0 -18
  192. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue.d.ts +0 -0
  193. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue2.js +0 -0
  194. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue.d.ts +0 -0
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAiD0i3C,CAAC;;;gBAAyH,CAAC;;;;;mBAAsS,CAAC;uBAAyC,CAAC;;;gBAA1N,CAAC;;;;kBAA4W,CAAC;;;CADpt4C,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAiD0g3C,CAAC;;;gBAAyH,CAAC;;;;;mBAAsS,CAAC;uBAAyC,CAAC;;;gBAA1N,CAAC;;;;kBAA4W,CAAC;;;CADpr4C,CAAA"}
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.35.7",
23
+ "version": "1.36.1",
24
24
  "engines": {
25
25
  "node": ">=20"
26
26
  },
@@ -57,14 +57,14 @@
57
57
  "vue": "^3.5.17",
58
58
  "zod": "3.24.1",
59
59
  "@scalar/code-highlight": "0.2.0",
60
- "@scalar/helpers": "0.0.11",
60
+ "@scalar/api-client": "2.6.0",
61
+ "@scalar/components": "0.14.37",
61
62
  "@scalar/icons": "0.4.7",
62
- "@scalar/api-client": "2.5.34",
63
- "@scalar/oas-utils": "0.4.30",
64
- "@scalar/components": "0.14.35",
65
- "@scalar/json-magic": "0.5.0",
63
+ "@scalar/oas-utils": "0.4.32",
66
64
  "@scalar/object-utils": "1.2.7",
67
- "@scalar/openapi-parser": "0.21.0",
65
+ "@scalar/helpers": "0.0.11",
66
+ "@scalar/json-magic": "0.5.2",
67
+ "@scalar/openapi-parser": "0.21.2",
68
68
  "@scalar/openapi-types": "0.3.7",
69
69
  "@scalar/openapi-upgrader": "0.1.0",
70
70
  "@scalar/snippetz": "0.4.10",
@@ -72,7 +72,7 @@
72
72
  "@scalar/types": "0.2.16",
73
73
  "@scalar/use-hooks": "0.2.5",
74
74
  "@scalar/use-toasts": "0.8.0",
75
- "@scalar/workspace-store": "0.15.7"
75
+ "@scalar/workspace-store": "0.16.0"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@hono/node-server": "^1.11.0",
@@ -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/build-tooling": "0.2.7",
96
95
  "@scalar/core": "0.3.17",
97
- "@scalar/galaxy": "0.5.8",
98
- "@scalar/react-renderer": "0.2.1"
96
+ "@scalar/build-tooling": "0.2.7",
97
+ "@scalar/react-renderer": "0.2.1",
98
+ "@scalar/galaxy": "0.5.8"
99
99
  },
100
100
  "scripts": {
101
101
  "build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/components/Sidebar.vue"],"names":[],"mappings":"AAgRA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AAmSF,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAY,CAAE;AAC7C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACpD;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA8BtD,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,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 "./Sidebar.vue2.js";
2
- /* empty css */
3
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-603204fe"]]);
5
- export {
6
- f as default
7
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/components/SidebarElement.vue"],"names":[],"mappings":"AAwYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAMhE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AAkSF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA8BtD,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,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 "./SidebarElement.vue2.js";
2
- /* empty css */
3
- import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c1dfe8cc"]]);
5
- export {
6
- m as default
7
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"SidebarGroup.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/components/SidebarGroup.vue"],"names":[],"mappings":"AA8CA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AAkCF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAmB/C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,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 "./SidebarGroup.vue2.js";
2
- /* empty css */
3
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a0601651"]]);
5
- export {
6
- m as default
7
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"SidebarHttpBadge.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/components/SidebarHttpBadge.vue"],"names":[],"mappings":"AA2CA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AA8CF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAoB/C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,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 t from "./SidebarHttpBadge.vue2.js";
2
- /* empty css */
3
- import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-522f945c"]]);
5
- export {
6
- e as default
7
- };
@@ -1,28 +0,0 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import { type Ref } from 'vue';
3
- import type { TraverseSpecOptions } from '../../../features/traverse-schema';
4
- /** Track which sidebar items are opened */
5
- type CollapsedSidebarItems = Record<string, boolean>;
6
- /** Sidebar initialization options */
7
- export type SidebarOptions = TraverseSpecOptions;
8
- /**
9
- * Creating sidebar with only one traversal of the spec
10
- *
11
- * TODO:
12
- * - add the search index creation as well
13
- * - update docs
14
- * - tagged models
15
- */
16
- export declare const createSidebar: (dereferencedDocument: Ref<OpenAPIV3_1.Document>, options: SidebarOptions) => {
17
- collapsedSidebarItems: CollapsedSidebarItems;
18
- isSidebarOpen: Ref<boolean, boolean>;
19
- items: import("vue").ComputedRef<{
20
- entries: import("../../../features/traverse-schema").TraversedEntry[];
21
- titles: Map<string, string>;
22
- }>;
23
- scrollToOperation: (operationId: string, focus?: boolean) => void;
24
- setCollapsedSidebarItem: (key: string, value: boolean) => boolean;
25
- toggleCollapsedSidebarItem: (key: string) => boolean;
26
- };
27
- export {};
28
- //# sourceMappingURL=create-sidebar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-sidebar.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/helpers/create-sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,OAAO,EAAE,KAAK,GAAG,EAA2B,MAAM,KAAK,CAAA;AAEvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAIrE,2CAA2C;AAC3C,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEpD,qCAAqC;AACrC,MAAM,MAAM,cAAc,GAAG,mBAAmB,CAAA;AAEhD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,sBAAsB,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,SAAS,cAAc;;;;;;;qCAa5D,MAAM,UAAU,OAAO;mCARzB,MAAM,SAAS,OAAO;sCADnB,MAAM;CAgDhD,CAAA"}
@@ -1,32 +0,0 @@
1
- import { reactive as b, ref as p, computed as S } from "vue";
2
- import { scrollToId as l } from "@scalar/helpers/dom/scroll-to-id";
3
- import { traverseDocument as g } from "../../traverse-schema/helpers/traverse-document.js";
4
- import { lazyBus as v } from "../../../components/Lazy/lazyBus.js";
5
- const h = (i, o) => {
6
- const r = b({}), a = p(!1), n = (e) => r[e] = !r[e], c = (e, t) => r[e] = t, m = (e, t) => {
7
- const s = o.getSectionId(e);
8
- if (s && s !== e)
9
- if (r[s])
10
- l(e, t);
11
- else {
12
- const f = v.on((u) => {
13
- u.loaded === e && (l(e, t), f());
14
- });
15
- c(s, !0);
16
- }
17
- }, d = S(() => {
18
- const e = g(i.value, o);
19
- return o.config.value.defaultOpenAllTags && e.entries.forEach((t) => c(t.id, !0)), e;
20
- });
21
- return {
22
- collapsedSidebarItems: r,
23
- isSidebarOpen: a,
24
- items: d,
25
- scrollToOperation: m,
26
- setCollapsedSidebarItem: c,
27
- toggleCollapsedSidebarItem: n
28
- };
29
- };
30
- export {
31
- h as createSidebar
32
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/hooks/useSidebar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAmB,MAAM,KAAK,CAAA;AAElE,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,2CAA2C,CAAA;AAG9F,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,CAAC,OAAO,CAAY,CAAA;AAE7D,KAAK,UAAU,GAAG;IAChB,IAAI,OAAO,CAAA;IACX,CAAC,OAAO,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAA;CACvE,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,UAuBxB,CAAA"}
@@ -1,18 +0,0 @@
1
- import { provide as t, inject as n } from "vue";
2
- import { createSidebar as s } from "../helpers/create-sidebar.js";
3
- const i = Symbol(), l = (e, r) => {
4
- if (e && r) {
5
- const a = s(e, r);
6
- return t(i, a), a;
7
- }
8
- const o = n(i);
9
- if (!o)
10
- throw new Error(
11
- "useSidebar() was called without a collection and no sidebar instance was found. Make sure to call useSidebar(collection) in a parent component first."
12
- );
13
- return o;
14
- };
15
- export {
16
- i as SIDEBAR_SYMBOL,
17
- l as useSidebar
18
- };
@@ -1,4 +0,0 @@
1
- export { default as Sidebar } from './components/Sidebar.vue.js';
2
- export { useSidebar, SIDEBAR_SYMBOL } from './hooks/useSidebar.js';
3
- export { createSidebar, type SidebarOptions } from './helpers/create-sidebar.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAE7D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAA"}
@@ -1,6 +0,0 @@
1
- import type { TagsMap } from '../../../features/traverse-schema/types';
2
- type TagMapValue = NonNullable<TagsMap extends Map<string, infer V> ? V : never>;
3
- /** Grabs the tag from the dict or creates one if it doesn't exist */
4
- export declare const getTag: (tagsMap: TagsMap, name: string) => TagMapValue;
5
- export {};
6
- //# sourceMappingURL=get-tag.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-tag.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/get-tag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAA;AAE/D,KAAK,WAAW,GAAG,WAAW,CAAC,OAAO,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;AAEhF,qEAAqE;AACrE,eAAO,MAAM,MAAM,GAAI,SAAS,OAAO,EAAE,MAAM,MAAM,KAAG,WAWvD,CAAA"}
@@ -1,7 +0,0 @@
1
- const r = (g, e) => {
2
- let t = g.get(e);
3
- return t || (t = { entries: [], tag: { name: e } }, g.set(e, t)), t;
4
- };
5
- export {
6
- r as getTag
7
- };
@@ -1,11 +0,0 @@
1
- import type { TraversedDescription } from '../../../features/traverse-schema/types';
2
- import type { Heading } from '@scalar/types/legacy';
3
- export declare const DEFAULT_INTRODUCTION_SLUG = "introduction";
4
- /**
5
- * Creates sidebar entries from markdown headings in the OpenAPI description.
6
- * Only includes the top two levels of headings for a clean hierarchy.
7
- */
8
- export declare const traverseDescription: (description: string | undefined,
9
- /** Map of titles for the mobile header */
10
- titlesMap: Map<string, string>, getHeadingId: (heading: Heading) => string) => TraversedDescription[];
11
- //# sourceMappingURL=traverse-description.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"traverse-description.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAE5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,eAAO,MAAM,yBAAyB,iBAAiB,CAAA;AAEvD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,MAAM,GAAG,SAAS;AAC/B,0CAA0C;AAC1C,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,cAAc,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,KACzC,oBAAoB,EAmDtB,CAAA"}
@@ -1,32 +0,0 @@
1
- import { getHeadingsFromMarkdown as h, getLowestHeadingLevel as d } from "../../../libs/markdown.js";
2
- const a = "introduction", g = (n, i, l) => {
3
- if (!n?.trim())
4
- return [];
5
- const c = h(n), o = d(c), r = [];
6
- let s = null;
7
- if (n && !n.trim().startsWith("#")) {
8
- const e = {
9
- depth: 1,
10
- value: "Introduction",
11
- slug: a
12
- }, t = l(e), u = e.value;
13
- r.push({
14
- id: t,
15
- title: u
16
- }), i.set(t, u);
17
- }
18
- for (const e of c) {
19
- if (e.depth !== o && e.depth !== o + 1)
20
- continue;
21
- const t = {
22
- id: l(e),
23
- title: e.value
24
- };
25
- i.set(t.id, t.title), e.depth === o ? (t.children = [], r.push(t), s = t) : s && s.children?.push(t);
26
- }
27
- return r;
28
- };
29
- export {
30
- a as DEFAULT_INTRODUCTION_SLUG,
31
- g as traverseDescription
32
- };
@@ -1,16 +0,0 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { TraverseSpecOptions, TraversedEntry } from '../../../features/traverse-schema/types';
3
- /**
4
- * Travers the OpenAPI Document and ensure we only do it once
5
- *
6
- * We are generating the following:
7
- * - the sidebar
8
- * - the search index (todo)
9
- *
10
- * Currently its called by createSidebar, but we can move this into the de-reference process as a plugin for even more gains
11
- */
12
- export declare const traverseDocument: (document: OpenAPIV3_1.Document, { config, getHeadingId, getOperationId, getWebhookId, getModelId, getTagId }: TraverseSpecOptions) => {
13
- entries: TraversedEntry[];
14
- titles: Map<string, string>;
15
- };
16
- //# sourceMappingURL=traverse-document.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"traverse-document.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAOxD,OAAO,KAAK,EAAW,mBAAmB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAEpG;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,WAAW,CAAC,QAAQ,EAC9B,8EAA8E,mBAAmB;;;CA8ClG,CAAA"}
@@ -1,33 +0,0 @@
1
- import { traverseDescription as c } from "./traverse-description.js";
2
- import { traversePaths as f } from "./traverse-paths.js";
3
- import { traverseSchemas as g } from "./traverse-schemas.js";
4
- import { traverseTags as S } from "./traverse-tags.js";
5
- import { traverseWebhooks as u } from "./traverse-webhooks.js";
6
- const w = (e, { config: a, getHeadingId: h, getOperationId: l, getWebhookId: i, getModelId: n, getTagId: m }) => {
7
- const r = /* @__PURE__ */ new Map(), t = new Map(
8
- e.tags?.map((s) => [s.name ?? "Untitled Tag", { tag: s, entries: [] }]) ?? []
9
- );
10
- f(e, t, r, l);
11
- const o = c(e.info?.description, r, h), p = u(e, t, r, i), v = S(e, t, r, {
12
- getTagId: m,
13
- tagsSorter: a.value.tagsSorter,
14
- operationsSorter: a.value.operationsSorter
15
- });
16
- if (o.push(...v), p.length && o.push({
17
- id: i(),
18
- isWebhooks: !0,
19
- title: "Webhooks",
20
- children: p
21
- }), !a.value.hideModels && e.components?.schemas) {
22
- const s = g(e, t, r, n);
23
- s.length && o.push({
24
- id: n(),
25
- title: "Models",
26
- children: s
27
- });
28
- }
29
- return { entries: o, titles: r };
30
- };
31
- export {
32
- w as traverseDocument
33
- };
@@ -1,18 +0,0 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { TraversedEntry } from '../../../features/traverse-schema/types';
3
- import type { UseNavState } from '../../../hooks/useNavState.js';
4
- import type { TagObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
5
- /**
6
- * Traverse the paths of the spec and build a map of tags and operations
7
- *
8
- * Default tag is to match what we have now we can improve later
9
- */
10
- export declare const traversePaths: (content: OpenAPIV3_1.Document,
11
- /** Map of tags and their entries */
12
- tagsMap: Map<string, {
13
- tag: TagObject;
14
- entries: TraversedEntry[];
15
- }>,
16
- /** Map of titles for the mobile header */
17
- titlesMap: Map<string, string>, getOperationId: UseNavState["getOperationId"]) => void;
18
- //# sourceMappingURL=traverse-paths.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"traverse-paths.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,kCAAkC,CAAA;AAC1F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,8DAA8D,CAAA;AAyB9G;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,SAAS,WAAW,CAAC,QAAQ;AAC7B,oCAAoC;AACpC,SAAS,GAAG,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC;AACnE,0CAA0C;AAC1C,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,gBAAgB,WAAW,CAAC,gBAAgB,CAAC,SA+B9C,CAAA"}
@@ -1,30 +0,0 @@
1
- import { httpMethods as m } from "@scalar/helpers/http/http-methods";
2
- import { getTag as l } from "./get-tag.js";
3
- const E = (s, t, r = "Unknown", c, f, h) => {
4
- const i = h({ ...s, method: t, path: r }, c), e = s.summary?.trim() ? s.summary : r;
5
- return f.set(i, e), {
6
- id: i,
7
- title: e,
8
- path: r,
9
- method: t,
10
- operation: s
11
- };
12
- }, a = (s, t, r, c) => {
13
- Object.entries(s.paths ?? {}).forEach(([f, h]) => {
14
- Object.entries(h ?? {}).forEach(([e, n]) => {
15
- if (!(n["x-internal"] || n["x-scalar-ignore"] || !m.has(e)))
16
- if (n.tags?.length)
17
- n.tags.forEach((u) => {
18
- const { tag: g } = l(t, u);
19
- t.get(u)?.entries.push(E(n, e, f, g, r, c));
20
- });
21
- else {
22
- const { tag: u } = l(t, "default");
23
- t.get("default")?.entries.push(E(n, e, f, u, r, c));
24
- }
25
- });
26
- });
27
- };
28
- export {
29
- a as traversePaths
30
- };
@@ -1,8 +0,0 @@
1
- import type { TagsMap, TraversedSchema } from '../../../features/traverse-schema/types';
2
- import type { UseNavState } from '../../../hooks/useNavState.js';
3
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
4
- /** Traverse components.schemas to create entries for models */
5
- export declare const traverseSchemas: (content: OpenAPIV3_1.Document, tagsMap: TagsMap,
6
- /** Map of titles for the mobile header */
7
- titlesMap: Map<string, string>, getModelId: UseNavState["getModelId"]) => TraversedSchema[];
8
- //# sourceMappingURL=traverse-schemas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"traverse-schemas.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AA2BxD,+DAA+D;AAC/D,eAAO,MAAM,eAAe,GAC1B,SAAS,WAAW,CAAC,QAAQ,EAC7B,SAAS,OAAO;AAChB,0CAA0C;AAC1C,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,YAAY,WAAW,CAAC,YAAY,CAAC,KACpC,eAAe,EAyBjB,CAAA"}
@@ -1,21 +0,0 @@
1
- import { getTag as f } from "./get-tag.js";
2
- const g = (e, s = "Unkown", r, c, n) => {
3
- const o = c({ name: s }, n), t = "title" in e && typeof e.title == "string" ? e.title : s;
4
- return r.set(o, t), {
5
- id: o,
6
- title: t,
7
- name: s,
8
- schema: e
9
- };
10
- }, l = (e, s, r, c) => {
11
- const n = e.components?.schemas ?? {}, o = [];
12
- for (const t in n)
13
- n[t]["x-internal"] || n[t]["x-scalar-ignore"] || !Object.hasOwn(n, t) || (n[t]["x-tags"]?.length ? n[t]["x-tags"].forEach((i) => {
14
- const { tag: a } = f(s, i);
15
- s.get(i)?.entries.push(g(n[t], t, r, c, a));
16
- }) : o.push(g(n[t], t, r, c)));
17
- return o;
18
- };
19
- export {
20
- l as traverseSchemas
21
- };
@@ -1,11 +0,0 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
3
- import type { TagsMap, TraversedEntry } from '../../../features/traverse-schema/types';
4
- import type { UseNavState } from '../../../hooks/useNavState.js';
5
- type Options = Pick<UseNavState, 'getTagId'> & Pick<ApiReferenceConfiguration, 'tagsSorter' | 'operationsSorter'>;
6
- /** Traverses our tags map creates entries, also handles sorting and tagGroups */
7
- export declare const traverseTags: (content: OpenAPIV3_1.Document, tagsMap: TagsMap,
8
- /** Map of titles for the mobile title */
9
- titlesMap: Map<string, string>, { getTagId, tagsSorter, operationsSorter }: Options) => TraversedEntry[];
10
- export {};
11
- //# sourceMappingURL=traverse-tags.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"traverse-tags.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-tags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAgB,MAAM,kCAAkC,CAAA;AAC7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAItD,KAAK,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,yBAAyB,EAAE,YAAY,GAAG,kBAAkB,CAAC,CAAA;AAkGjH,iFAAiF;AACjF,eAAO,MAAM,YAAY,GACvB,SAAS,WAAW,CAAC,QAAQ,EAC7B,SAAS,OAAO;AAChB,yCAAyC;AACzC,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,4CAA4C,OAAO,KAClD,cAAc,EAyBhB,CAAA"}
@@ -1,43 +0,0 @@
1
- import { getTag as f } from "./get-tag.js";
2
- const u = (n, o, m, c, s = !1) => {
3
- const i = m(n), d = n["x-displayName"] || n.name || "Untitled Tag";
4
- return o.set(i, d), {
5
- id: i,
6
- title: d,
7
- tag: n,
8
- children: c,
9
- isGroup: s
10
- };
11
- }, p = (n, o, m, { getTagId: c, tagsSorter: s, operationsSorter: i }) => {
12
- const d = n.includes("default"), l = d ? n.filter((a) => a !== "default") : n;
13
- return s === "alpha" ? l.sort((a, r) => {
14
- const h = f(o, a).tag["x-displayName"] || a || "Untitle Tag", t = f(o, r).tag["x-displayName"] || r || "Untitled Tag";
15
- return h.localeCompare(t);
16
- }) : typeof s == "function" && l.sort((a, r) => s(f(o, a).tag, f(o, r).tag)), d && l.push("default"), l.flatMap((a) => {
17
- const { tag: r, entries: h } = f(o, a);
18
- return r["x-internal"] || r["x-scalar-ignore"] ? [] : (i === "alpha" ? h.sort((t, e) => "method" in t && "method" in e ? t.title.localeCompare(e.title) : 0) : i === "method" ? h.sort((t, e) => "method" in t && "method" in e ? t.method.localeCompare(e.method) : 0) : typeof i == "function" && h.sort((t, e) => {
19
- if (!("method" in t) || !("method" in e))
20
- return 0;
21
- const x = "path" in t ? t.path : t.name, y = "path" in e ? e.path : e.name, g = "operation" in t ? t.operation : t.webhook, T = "operation" in e ? e.operation : e.webhook;
22
- return i(
23
- { method: t.method, httpVerb: t.method, path: x, operation: g },
24
- { method: e.method, httpVerb: e.method, path: y, operation: T }
25
- );
26
- }), h.length ? u(r, m, c, h) : []);
27
- });
28
- }, k = (n, o, m, { getTagId: c, tagsSorter: s, operationsSorter: i }) => {
29
- if (n["x-tagGroups"])
30
- return n["x-tagGroups"].flatMap((r) => {
31
- const h = p(r.tags ?? [], o, m, {
32
- getTagId: c,
33
- tagsSorter: s,
34
- operationsSorter: i
35
- });
36
- return h.length ? u(r, m, c, h, !0) : [];
37
- });
38
- const d = Array.from(o.keys()), l = p(d, o, m, { getTagId: c, tagsSorter: s, operationsSorter: i });
39
- return l.length === 1 && l[0].title === "default" ? l[0].children ?? [] : l;
40
- };
41
- export {
42
- k as traverseTags
43
- };
@@ -1,10 +0,0 @@
1
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { TagsMap, TraversedWebhook } from '../../../features/traverse-schema/types';
3
- import type { UseNavState } from '../../../hooks/useNavState.js';
4
- /** When traversing webhooks, we pass in the tags in from operations to save on memory */
5
- export declare const traverseWebhooks: (content: OpenAPIV3_1.Document,
6
- /** The tag map from from traversing paths */
7
- tagsMap: TagsMap,
8
- /** Map of titles for the mobile title */
9
- titlesMap: Map<string, string>, getWebhookId: UseNavState["getWebhookId"]) => TraversedWebhook[];
10
- //# sourceMappingURL=traverse-webhooks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"traverse-webhooks.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AA0BtD,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,GAC3B,SAAS,WAAW,CAAC,QAAQ;AAC7B,6CAA6C;AAC7C,SAAS,OAAO;AAChB,yCAAyC;AACzC,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,cAAc,WAAW,CAAC,cAAc,CAAC,KACxC,gBAAgB,EA4BlB,CAAA"}
@@ -1,24 +0,0 @@
1
- import { getTag as i } from "./get-tag.js";
2
- const E = (e, r, t = "Unknown", n, c, h) => {
3
- const g = e.summary || t, o = c({ name: t, method: r }, h);
4
- return n.set(o, g), {
5
- id: o,
6
- title: g,
7
- name: t,
8
- webhook: e,
9
- method: r
10
- };
11
- }, l = (e, r, t, n) => {
12
- const c = [];
13
- return Object.entries(e.webhooks ?? {}).forEach(([h, g]) => {
14
- Object.entries(g ?? {}).forEach(([u, s]) => {
15
- s["x-internal"] || s["x-scalar-ignore"] || (s.tags?.length ? s.tags.forEach((f) => {
16
- const { tag: b } = i(r, f);
17
- r.get(f)?.entries.push(E(s, u, h, t, n, b));
18
- }) : c.push(E(s, u, h, t, n)));
19
- });
20
- }), c;
21
- };
22
- export {
23
- l as traverseWebhooks
24
- };
@@ -1,5 +0,0 @@
1
- export type { TraverseSpecOptions, TraversedOperation, TraversedEntry, TraversedDescription, TraversedTag, TraversedWebhook, TagsMap, } from './types';
2
- export { traverseDocument } from './helpers/traverse-document.js';
3
- export { traverseTags } from './helpers/traverse-tags.js';
4
- export { DEFAULT_INTRODUCTION_SLUG } from './helpers/traverse-description.js';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/traverse-schema/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,OAAO,GACR,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA"}
@@ -1,55 +0,0 @@
1
- import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
- import type { UseNavState } from '../../hooks/useNavState.js';
3
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
4
- import type { OperationObject, TagObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
5
- import type { Ref } from 'vue';
6
- /** Map of tagNames and their entries */
7
- export type TagsMap = Map<string, {
8
- tag: TagObject;
9
- entries: TraversedEntry[];
10
- }>;
11
- /** Description entry returned from traversing the document */
12
- export type TraversedDescription = {
13
- id: string;
14
- title: string;
15
- children?: TraversedDescription[];
16
- };
17
- /** Operation entry returned from traversing the document */
18
- export type TraversedOperation = {
19
- id: string;
20
- title: string;
21
- method: OpenAPIV3_1.HttpMethods;
22
- path: string;
23
- operation: OperationObject;
24
- };
25
- /** Model entry returned from traversing the document */
26
- export type TraversedSchema = {
27
- id: string;
28
- title: string;
29
- name: string;
30
- schema: SchemaObject;
31
- };
32
- /** Tag entry returned from traversing the document, includes tagGroups */
33
- export type TraversedTag = {
34
- id: string;
35
- title: string;
36
- children: TraversedEntry[];
37
- tag: TagObject;
38
- isGroup: boolean;
39
- isWebhooks?: boolean;
40
- };
41
- /** Webhook entry returned from traversing the document, basically the same as an operaation but with name instead of path */
42
- export type TraversedWebhook = {
43
- id: string;
44
- title: string;
45
- method: OpenAPIV3_1.HttpMethods;
46
- name: string;
47
- webhook: OperationObject;
48
- };
49
- /** Entries returned from traversing the document */
50
- export type TraversedEntry = TraversedDescription | TraversedOperation | TraversedSchema | TraversedTag | TraversedWebhook;
51
- /** Options for traversing the spec */
52
- export type TraverseSpecOptions = {
53
- config: Ref<ApiReferenceConfiguration>;
54
- } & Pick<UseNavState, 'getHeadingId' | 'getModelId' | 'getOperationId' | 'getSectionId' | 'getTagId' | 'getWebhookId'>;
55
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/traverse-schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EACV,eAAe,EACf,SAAS,EACT,YAAY,EACb,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAAA;AAEhF,8DAA8D;AAC9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAA;CAClC,CAAA;AAED,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,eAAe,CAAA;CAC3B,CAAA;AAED,wDAAwD;AACxD,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,YAAY,CAAA;CACrB,CAAA;AAED,0EAA0E;AAC1E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,6HAA6H;AAC7H,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,eAAe,CAAA;CACzB,CAAA;AAED,oDAAoD;AACpD,MAAM,MAAM,cAAc,GACtB,oBAAoB,GACpB,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,gBAAgB,CAAA;AAEpB,sCAAsC;AACtC,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAA;CACvC,GAAG,IAAI,CAAC,WAAW,EAAE,cAAc,GAAG,YAAY,GAAG,gBAAgB,GAAG,cAAc,GAAG,UAAU,GAAG,cAAc,CAAC,CAAA"}
@@ -1,18 +0,0 @@
1
- import { getHeadings as r } from "@scalar/code-highlight/markdown";
2
- import o from "github-slugger";
3
- const s = (n, e) => n.map((t) => ({
4
- ...t,
5
- slug: e.slug(t.value)
6
- }));
7
- function i(n) {
8
- const e = new o(), t = r(n);
9
- return s(t, e);
10
- }
11
- const l = (n) => {
12
- const e = Math.min(...n.map((t) => t.depth));
13
- return e >= 1 && e <= 6 ? e : 1;
14
- };
15
- export {
16
- i as getHeadingsFromMarkdown,
17
- l as getLowestHeadingLevel
18
- };