@scalar/api-reference 0.5.1 → 0.5.2

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 (453) hide show
  1. package/package.json +9 -10
  2. package/src/components/ApiClientModal.vue +0 -205
  3. package/src/components/ApiReference.vue +0 -750
  4. package/src/components/Card/Card.vue +0 -12
  5. package/src/components/Card/CardContent.vue +0 -45
  6. package/src/components/Card/CardFooter.vue +0 -13
  7. package/src/components/Card/CardHeader.vue +0 -37
  8. package/src/components/Card/CardTab.vue +0 -32
  9. package/src/components/Card/CardTabHeader.vue +0 -32
  10. package/src/components/Card/index.ts +0 -6
  11. package/src/components/Content/Content.vue +0 -145
  12. package/src/components/Content/Introduction/BaseUrl.vue +0 -49
  13. package/src/components/Content/Introduction/Introduction.vue +0 -141
  14. package/src/components/Content/Introduction/LanguageSelector.vue +0 -361
  15. package/src/components/Content/Introduction/index.ts +0 -1
  16. package/src/components/Content/MarkdownRenderer.vue +0 -177
  17. package/src/components/Content/ReferenceEndpoint/Copy.vue +0 -101
  18. package/src/components/Content/ReferenceEndpoint/ExampleRequest.vue +0 -331
  19. package/src/components/Content/ReferenceEndpoint/ExampleResponseTab.vue +0 -22
  20. package/src/components/Content/ReferenceEndpoint/ExampleResponses/ExampleResponses.vue +0 -168
  21. package/src/components/Content/ReferenceEndpoint/ExampleResponses/Headers.vue +0 -83
  22. package/src/components/Content/ReferenceEndpoint/ExampleResponses/SelectExample.vue +0 -129
  23. package/src/components/Content/ReferenceEndpoint/ExampleResponses/index.ts +0 -1
  24. package/src/components/Content/ReferenceEndpoint/ParameterItem.vue +0 -26
  25. package/src/components/Content/ReferenceEndpoint/Parameters.vue +0 -23
  26. package/src/components/Content/ReferenceEndpoint/ReferenceEndpoint.vue +0 -29
  27. package/src/components/Content/ReferenceEndpoint/RequestBody.vue +0 -125
  28. package/src/components/Content/ReferenceEndpoint/RequestBodyProperties.vue +0 -54
  29. package/src/components/Content/ReferenceEndpoint/RequestBodyPropertiesChild.vue +0 -39
  30. package/src/components/Content/ReferenceEndpoint/index.ts +0 -1
  31. package/src/components/Content/ReferenceTag.vue +0 -99
  32. package/src/components/Content/Spinner.vue +0 -51
  33. package/src/components/Content/index.ts +0 -1
  34. package/src/components/FindAnythingButton.vue +0 -76
  35. package/src/components/FlowButton.vue +0 -184
  36. package/src/components/FlowIconButton.vue +0 -25
  37. package/src/components/FlowLoader.vue +0 -207
  38. package/src/components/FlowModal.vue +0 -133
  39. package/src/components/HelpfulLink.vue +0 -19
  40. package/src/components/Icon/FlowIcon.vue +0 -19
  41. package/src/components/Icon/Icon.vue +0 -23
  42. package/src/components/Icon/SvgRenderer.ts +0 -66
  43. package/src/components/Icon/brand/brand-adobe.svg +0 -1
  44. package/src/components/Icon/brand/brand-amazon.svg +0 -1
  45. package/src/components/Icon/brand/brand-browser-firefox.svg +0 -5
  46. package/src/components/Icon/brand/brand-browser-googlechrome.svg +0 -5
  47. package/src/components/Icon/brand/brand-creative-commons.svg +0 -1
  48. package/src/components/Icon/brand/brand-ecommerce-etsy.svg +0 -1
  49. package/src/components/Icon/brand/brand-ecommerce-patreon.svg +0 -1
  50. package/src/components/Icon/brand/brand-ecommerce-shopify.svg +0 -5
  51. package/src/components/Icon/brand/brand-ecommerce-wordpress.svg +0 -1
  52. package/src/components/Icon/brand/brand-gaming-nintendo-switch.svg +0 -5
  53. package/src/components/Icon/brand/brand-gaming-playstation.svg +0 -1
  54. package/src/components/Icon/brand/brand-gaming-xbox-live.svg +0 -5
  55. package/src/components/Icon/brand/brand-google-drive.svg +0 -5
  56. package/src/components/Icon/brand/brand-google-gmail.svg +0 -5
  57. package/src/components/Icon/brand/brand-google.svg +0 -1
  58. package/src/components/Icon/brand/brand-music-itunes.svg +0 -1
  59. package/src/components/Icon/brand/brand-music-soundcloud.svg +0 -1
  60. package/src/components/Icon/brand/brand-music-spotify.svg +0 -1
  61. package/src/components/Icon/brand/brand-office-dropbox.svg +0 -5
  62. package/src/components/Icon/brand/brand-office-slack.svg +0 -5
  63. package/src/components/Icon/brand/brand-office-zoom.svg +0 -1
  64. package/src/components/Icon/brand/brand-payments-alipay.svg +0 -1
  65. package/src/components/Icon/brand/brand-payments-paypal.svg +0 -1
  66. package/src/components/Icon/brand/brand-payments-stripe.svg +0 -1
  67. package/src/components/Icon/brand/brand-platform-android.svg +0 -1
  68. package/src/components/Icon/brand/brand-platform-apple.svg +0 -5
  69. package/src/components/Icon/brand/brand-platform-linux.svg +0 -5
  70. package/src/components/Icon/brand/brand-platform-microsoft-windows.svg +0 -4
  71. package/src/components/Icon/brand/brand-social-chat-discord.svg +0 -5
  72. package/src/components/Icon/brand/brand-social-chat-kuaishou.svg +0 -5
  73. package/src/components/Icon/brand/brand-social-chat-line.svg +0 -5
  74. package/src/components/Icon/brand/brand-social-chat-messenger.svg +0 -5
  75. package/src/components/Icon/brand/brand-social-chat-signal.svg +0 -5
  76. package/src/components/Icon/brand/brand-social-chat-snapchat.svg +0 -5
  77. package/src/components/Icon/brand/brand-social-chat-telegram.svg +0 -5
  78. package/src/components/Icon/brand/brand-social-chat-wechat.svg +0 -5
  79. package/src/components/Icon/brand/brand-social-chat-whatsapp.svg +0 -5
  80. package/src/components/Icon/brand/brand-social-media-deviantart.svg +0 -5
  81. package/src/components/Icon/brand/brand-social-media-dribbble.svg +0 -1
  82. package/src/components/Icon/brand/brand-social-media-facebook.svg +0 -1
  83. package/src/components/Icon/brand/brand-social-media-instagram.svg +0 -5
  84. package/src/components/Icon/brand/brand-social-media-linkedin.svg +0 -5
  85. package/src/components/Icon/brand/brand-social-media-pinterest.svg +0 -5
  86. package/src/components/Icon/brand/brand-social-media-reddit.svg +0 -1
  87. package/src/components/Icon/brand/brand-social-media-sina-weibo.svg +0 -5
  88. package/src/components/Icon/brand/brand-social-media-threads.svg +0 -1
  89. package/src/components/Icon/brand/brand-social-media-tiktok.svg +0 -5
  90. package/src/components/Icon/brand/brand-social-media-tinder.svg +0 -1
  91. package/src/components/Icon/brand/brand-social-media-tumblr.svg +0 -5
  92. package/src/components/Icon/brand/brand-social-media-twitter.svg +0 -5
  93. package/src/components/Icon/brand/brand-software-design-figma.svg +0 -1
  94. package/src/components/Icon/brand/brand-software-development-authy.svg +0 -1
  95. package/src/components/Icon/brand/brand-software-development-digital-ocean.svg +0 -1
  96. package/src/components/Icon/brand/brand-software-development-docker.svg +0 -5
  97. package/src/components/Icon/brand/brand-software-development-github.svg +0 -5
  98. package/src/components/Icon/brand/brand-software-development-jira.svg +0 -1
  99. package/src/components/Icon/brand/brand-software-development-openai.svg +0 -1
  100. package/src/components/Icon/brand/brand-software-development-stackexchange.svg +0 -5
  101. package/src/components/Icon/brand/brand-software-development-stackoverflow.svg +0 -1
  102. package/src/components/Icon/brand/brand-video-netflix.svg +0 -5
  103. package/src/components/Icon/brand/brand-video-twitch.svg +0 -1
  104. package/src/components/Icon/brand/brand-video-vimeo.svg +0 -5
  105. package/src/components/Icon/brand/brand-video-youtube.svg +0 -5
  106. package/src/components/Icon/brand/programming-framework-angular.svg +0 -5
  107. package/src/components/Icon/brand/programming-framework-astro.svg +0 -5
  108. package/src/components/Icon/brand/programming-framework-laravel.svg +0 -1
  109. package/src/components/Icon/brand/programming-framework-nextdotjs.svg +0 -5
  110. package/src/components/Icon/brand/programming-framework-react.svg +0 -5
  111. package/src/components/Icon/brand/programming-framework-vuedotjs.svg +0 -1
  112. package/src/components/Icon/brand/programming-language-c.svg +0 -5
  113. package/src/components/Icon/brand/programming-language-clojure.svg +0 -5
  114. package/src/components/Icon/brand/programming-language-csharp.svg +0 -4
  115. package/src/components/Icon/brand/programming-language-css3.svg +0 -4
  116. package/src/components/Icon/brand/programming-language-go.svg +0 -4
  117. package/src/components/Icon/brand/programming-language-html5.svg +0 -4
  118. package/src/components/Icon/brand/programming-language-java.svg +0 -21
  119. package/src/components/Icon/brand/programming-language-javascript-js.svg +0 -4
  120. package/src/components/Icon/brand/programming-language-json.svg +0 -8
  121. package/src/components/Icon/brand/programming-language-kotlin.svg +0 -3
  122. package/src/components/Icon/brand/programming-language-node.svg +0 -10
  123. package/src/components/Icon/brand/programming-language-objc.svg +0 -6
  124. package/src/components/Icon/brand/programming-language-ocaml.svg +0 -4
  125. package/src/components/Icon/brand/programming-language-php.svg +0 -4
  126. package/src/components/Icon/brand/programming-language-powershell.svg +0 -10
  127. package/src/components/Icon/brand/programming-language-python.svg +0 -4
  128. package/src/components/Icon/brand/programming-language-r.svg +0 -7
  129. package/src/components/Icon/brand/programming-language-ruby.svg +0 -5
  130. package/src/components/Icon/brand/programming-language-scala.svg +0 -5
  131. package/src/components/Icon/brand/programming-language-shell.svg +0 -5
  132. package/src/components/Icon/brand/programming-language-swift.svg +0 -4
  133. package/src/components/Icon/brand/programming-language-typescript.svg +0 -5
  134. package/src/components/Icon/brand/programming-tool-git.svg +0 -1
  135. package/src/components/Icon/brand/programming-tool-tailwindcss.svg +0 -5
  136. package/src/components/Icon/icons/Add.svg +0 -4
  137. package/src/components/Icon/icons/ArrowDown.svg +0 -3
  138. package/src/components/Icon/icons/ArrowLeft.svg +0 -3
  139. package/src/components/Icon/icons/ArrowRight.svg +0 -3
  140. package/src/components/Icon/icons/ArrowUp.svg +0 -3
  141. package/src/components/Icon/icons/Background.svg +0 -8
  142. package/src/components/Icon/icons/CallToAction.svg +0 -5
  143. package/src/components/Icon/icons/CheckMark.svg +0 -3
  144. package/src/components/Icon/icons/ChevronDown.svg +0 -3
  145. package/src/components/Icon/icons/ChevronLeft.svg +0 -3
  146. package/src/components/Icon/icons/ChevronRight.svg +0 -3
  147. package/src/components/Icon/icons/ChevronUp.svg +0 -3
  148. package/src/components/Icon/icons/Close.svg +0 -3
  149. package/src/components/Icon/icons/DarkMode.svg +0 -4
  150. package/src/components/Icon/icons/Delete.svg +0 -5
  151. package/src/components/Icon/icons/Discord.svg +0 -5
  152. package/src/components/Icon/icons/Duplicate.svg +0 -6
  153. package/src/components/Icon/icons/Edit.svg +0 -4
  154. package/src/components/Icon/icons/EditorBold.svg +0 -4
  155. package/src/components/Icon/icons/EditorCode.svg +0 -6
  156. package/src/components/Icon/icons/EditorHighlight.svg +0 -12
  157. package/src/components/Icon/icons/EditorItalic.svg +0 -4
  158. package/src/components/Icon/icons/EditorLink.svg +0 -8
  159. package/src/components/Icon/icons/EditorStrike.svg +0 -4
  160. package/src/components/Icon/icons/EditorUnderline.svg +0 -6
  161. package/src/components/Icon/icons/Ellipses.svg +0 -4
  162. package/src/components/Icon/icons/Error.svg +0 -4
  163. package/src/components/Icon/icons/ExternalLink.svg +0 -7
  164. package/src/components/Icon/icons/Folder.svg +0 -4
  165. package/src/components/Icon/icons/GitHub.svg +0 -4
  166. package/src/components/Icon/icons/Google.svg +0 -4
  167. package/src/components/Icon/icons/Hide.svg +0 -5
  168. package/src/components/Icon/icons/Key.svg +0 -5
  169. package/src/components/Icon/icons/Leave.svg +0 -5
  170. package/src/components/Icon/icons/LightMode.svg +0 -6
  171. package/src/components/Icon/icons/Link.svg +0 -5
  172. package/src/components/Icon/icons/Lock.svg +0 -4
  173. package/src/components/Icon/icons/Logo.svg +0 -4
  174. package/src/components/Icon/icons/LogoAPI.svg +0 -4
  175. package/src/components/Icon/icons/LogoClient.svg +0 -4
  176. package/src/components/Icon/icons/LogoMarket.svg +0 -4
  177. package/src/components/Icon/icons/LogoSwagger.svg +0 -4
  178. package/src/components/Icon/icons/Magic.svg +0 -5
  179. package/src/components/Icon/icons/Menu.svg +0 -3
  180. package/src/components/Icon/icons/Page.svg +0 -8
  181. package/src/components/Icon/icons/Payment.svg +0 -5
  182. package/src/components/Icon/icons/Refresh.svg +0 -4
  183. package/src/components/Icon/icons/Search.svg +0 -4
  184. package/src/components/Icon/icons/Show.svg +0 -5
  185. package/src/components/Icon/icons/Sigma.svg +0 -4
  186. package/src/components/Icon/icons/Trash.svg +0 -5
  187. package/src/components/Icon/icons/index.ts +0 -65
  188. package/src/components/Icon/index.ts +0 -2
  189. package/src/components/Icon/line/arrow-chevron-down.svg +0 -1
  190. package/src/components/Icon/line/arrow-chevron-left.svg +0 -1
  191. package/src/components/Icon/line/arrow-chevron-right.svg +0 -1
  192. package/src/components/Icon/line/arrow-chevron-up.svg +0 -1
  193. package/src/components/Icon/line/arrow-down.svg +0 -1
  194. package/src/components/Icon/line/arrow-left.svg +0 -1
  195. package/src/components/Icon/line/arrow-right.svg +0 -1
  196. package/src/components/Icon/line/arrow-up.svg +0 -1
  197. package/src/components/Icon/line/basic-shape-diamond.svg +0 -1
  198. package/src/components/Icon/line/basic-shape-hexagon.svg +0 -1
  199. package/src/components/Icon/line/basic-shape-primary-circle-ellipse-round.svg +0 -1
  200. package/src/components/Icon/line/basic-shape-primary-square-rectangle.svg +0 -1
  201. package/src/components/Icon/line/basic-shape-shield.svg +0 -1
  202. package/src/components/Icon/line/computer-device-desktop-monitor.svg +0 -1
  203. package/src/components/Icon/line/computer-device-desktop.svg +0 -1
  204. package/src/components/Icon/line/computer-device-laptop.svg +0 -1
  205. package/src/components/Icon/line/computer-device-mobile-phone-android-samsung-back.svg +0 -1
  206. package/src/components/Icon/line/computer-device-mobile-phone-android-samsung.svg +0 -1
  207. package/src/components/Icon/line/computer-device-mobile-phone-iphone-x-back.svg +0 -1
  208. package/src/components/Icon/line/computer-device-mobile-phone-iphone-x.svg +0 -1
  209. package/src/components/Icon/line/computer-device-mobile-tablet-touch.svg +0 -1
  210. package/src/components/Icon/line/computer-device-mobile-tablet.svg +0 -1
  211. package/src/components/Icon/line/computer-device-network-ethernet-cat6.svg +0 -1
  212. package/src/components/Icon/line/computer-device-network-lan-www.svg +0 -1
  213. package/src/components/Icon/line/computer-device-network-wifi-connection.svg +0 -1
  214. package/src/components/Icon/line/computer-device-network-wifi-router.svg +0 -1
  215. package/src/components/Icon/line/computer-keyboard-alt.svg +0 -1
  216. package/src/components/Icon/line/computer-keyboard-command-cmd-control-ctrl.svg +0 -1
  217. package/src/components/Icon/line/computer-keyboard-option.svg +0 -1
  218. package/src/components/Icon/line/computer-keyboard-shift.svg +0 -1
  219. package/src/components/Icon/line/ecology-science-erlenmeyer-flask.svg +0 -1
  220. package/src/components/Icon/line/entertainment-control-button-circle-left-arrow-rewind.svg +0 -1
  221. package/src/components/Icon/line/entertainment-control-button-circle-pause.svg +0 -1
  222. package/src/components/Icon/line/entertainment-control-button-circle-right-arrow-fast-forward.svg +0 -1
  223. package/src/components/Icon/line/entertainment-control-button-circle-stop-square.svg +0 -1
  224. package/src/components/Icon/line/entertainment-control-button-play-circle.svg +0 -1
  225. package/src/components/Icon/line/entertainment-party-popper-confetti.svg +0 -1
  226. package/src/components/Icon/line/image-flash-lightning.svg +0 -1
  227. package/src/components/Icon/line/image-photo-frame.svg +0 -1
  228. package/src/components/Icon/line/image-picture-flower.svg +0 -1
  229. package/src/components/Icon/line/interface-add.svg +0 -1
  230. package/src/components/Icon/line/interface-alert-error-exclamation-block-square.svg +0 -1
  231. package/src/components/Icon/line/interface-alert-error-x-block-square.svg +0 -1
  232. package/src/components/Icon/line/interface-alert-exclamation-diamond.svg +0 -1
  233. package/src/components/Icon/line/interface-alert-exclamation-triangle-warning.svg +0 -1
  234. package/src/components/Icon/line/interface-alert-information-circle.svg +0 -1
  235. package/src/components/Icon/line/interface-award-crown.svg +0 -1
  236. package/src/components/Icon/line/interface-bookmark-tag.svg +0 -1
  237. package/src/components/Icon/line/interface-bookmark.svg +0 -1
  238. package/src/components/Icon/line/interface-calendar-date-one.svg +0 -1
  239. package/src/components/Icon/line/interface-close.svg +0 -1
  240. package/src/components/Icon/line/interface-content-book-open-pages.svg +0 -1
  241. package/src/components/Icon/line/interface-content-book-page.svg +0 -1
  242. package/src/components/Icon/line/interface-content-file.svg +0 -8
  243. package/src/components/Icon/line/interface-content-folder.svg +0 -1
  244. package/src/components/Icon/line/interface-copy-clipboard.svg +0 -1
  245. package/src/components/Icon/line/interface-delete-bin-trash.svg +0 -1
  246. package/src/components/Icon/line/interface-dots-horizontal.svg +0 -1
  247. package/src/components/Icon/line/interface-dots-vertical.svg +0 -1
  248. package/src/components/Icon/line/interface-edit-attachment.svg +0 -1
  249. package/src/components/Icon/line/interface-edit-binocular.svg +0 -1
  250. package/src/components/Icon/line/interface-edit-magic-wand.svg +0 -1
  251. package/src/components/Icon/line/interface-edit-tool-eraser.svg +0 -1
  252. package/src/components/Icon/line/interface-edit-tool-paint-brush.svg +0 -1
  253. package/src/components/Icon/line/interface-edit-tool-paint-roller.svg +0 -1
  254. package/src/components/Icon/line/interface-edit-tool-pen.svg +0 -1
  255. package/src/components/Icon/line/interface-edit-tool-pencil.svg +0 -1
  256. package/src/components/Icon/line/interface-edit-view-eye.svg +0 -1
  257. package/src/components/Icon/line/interface-favorite-award.svg +0 -1
  258. package/src/components/Icon/line/interface-favorite-flag.svg +0 -1
  259. package/src/components/Icon/line/interface-favorite-heart.svg +0 -1
  260. package/src/components/Icon/line/interface-favorite-star.svg +0 -1
  261. package/src/components/Icon/line/interface-favorite-stars-shining.svg +0 -1
  262. package/src/components/Icon/line/interface-favorite-stars-sparkles.svg +0 -1
  263. package/src/components/Icon/line/interface-hierarchy-flowchart.svg +0 -1
  264. package/src/components/Icon/line/interface-home-house.svg +0 -1
  265. package/src/components/Icon/line/interface-hyperlink.svg +0 -1
  266. package/src/components/Icon/line/interface-lighting-brightness.svg +0 -1
  267. package/src/components/Icon/line/interface-lock-closed.svg +0 -1
  268. package/src/components/Icon/line/interface-lock-open-unlock.svg +0 -1
  269. package/src/components/Icon/line/interface-login-key.svg +0 -1
  270. package/src/components/Icon/line/interface-search.svg +0 -1
  271. package/src/components/Icon/line/interface-setting-cog.svg +0 -1
  272. package/src/components/Icon/line/interface-share-megaphone-bullhorn.svg +0 -1
  273. package/src/components/Icon/line/interface-share-rocket.svg +0 -1
  274. package/src/components/Icon/line/interface-share-satellite.svg +0 -1
  275. package/src/components/Icon/line/interface-share-space-ship.svg +0 -1
  276. package/src/components/Icon/line/interface-share.svg +0 -1
  277. package/src/components/Icon/line/interface-signal-square.svg +0 -1
  278. package/src/components/Icon/line/interface-text-formatting-left-open-quote.svg +0 -1
  279. package/src/components/Icon/line/interface-text-formatting-right-close-quote.svg +0 -1
  280. package/src/components/Icon/line/interface-time-clock-circle.svg +0 -1
  281. package/src/components/Icon/line/interface-time-hour-glass.svg +0 -1
  282. package/src/components/Icon/line/interface-users-multiple.svg +0 -1
  283. package/src/components/Icon/line/interface-validation-checkbox-square.svg +0 -1
  284. package/src/components/Icon/line/interface-weather-moon.svg +0 -1
  285. package/src/components/Icon/line/legal-justice-hammer-gavel.svg +0 -1
  286. package/src/components/Icon/line/mail-chat-bubble-square.svg +0 -1
  287. package/src/components/Icon/line/mail-send-email-paper-airplane.svg +0 -1
  288. package/src/components/Icon/line/mail-send-envelope.svg +0 -1
  289. package/src/components/Icon/line/mail-sign-hashtag.svg +0 -1
  290. package/src/components/Icon/line/money-cashier-receipt.svg +0 -1
  291. package/src/components/Icon/line/money-currency-dollar-pay.svg +0 -1
  292. package/src/components/Icon/line/money-graph-arrow-increase.svg +0 -1
  293. package/src/components/Icon/line/money-graph-bar-chart-increase.svg +0 -1
  294. package/src/components/Icon/line/nature-ecology-leaf.svg +0 -1
  295. package/src/components/Icon/line/phone-telephone.svg +0 -1
  296. package/src/components/Icon/line/programming-bug.svg +0 -1
  297. package/src/components/Icon/line/programming-cloud.svg +0 -1
  298. package/src/components/Icon/line/programming-computer-database-server.svg +0 -1
  299. package/src/components/Icon/line/programming-computer-database.svg +0 -1
  300. package/src/components/Icon/line/programming-module-four-layout.svg +0 -1
  301. package/src/components/Icon/line/programming-module-three.svg +0 -1
  302. package/src/components/Icon/line/programming-module.svg +0 -1
  303. package/src/components/Icon/line/programming-script-code.svg +0 -1
  304. package/src/components/Icon/line/shopping-cart.svg +0 -8
  305. package/src/components/Icon/line/shopping-gift-present.svg +0 -1
  306. package/src/components/Icon/line/shopping-shipping-box-parcel-package.svg +0 -1
  307. package/src/components/Icon/line/tag-new-circle.svg +0 -1
  308. package/src/components/Icon/line/travel-map-earth-globe.svg +0 -1
  309. package/src/components/Icon/localIcons.ts +0 -68
  310. package/src/components/Icon/solid/arrow-chevron-down.svg +0 -1
  311. package/src/components/Icon/solid/arrow-chevron-left.svg +0 -1
  312. package/src/components/Icon/solid/arrow-chevron-right.svg +0 -1
  313. package/src/components/Icon/solid/arrow-chevron-up.svg +0 -1
  314. package/src/components/Icon/solid/arrow-down.svg +0 -1
  315. package/src/components/Icon/solid/arrow-left.svg +0 -1
  316. package/src/components/Icon/solid/arrow-right.svg +0 -1
  317. package/src/components/Icon/solid/arrow-up.svg +0 -1
  318. package/src/components/Icon/solid/basic-shape-diamond.svg +0 -1
  319. package/src/components/Icon/solid/basic-shape-hexagon.svg +0 -1
  320. package/src/components/Icon/solid/basic-shape-primary-circle-ellipse-round.svg +0 -1
  321. package/src/components/Icon/solid/basic-shape-primary-square-rectangle.svg +0 -1
  322. package/src/components/Icon/solid/basic-shape-shield.svg +0 -1
  323. package/src/components/Icon/solid/computer-device-desktop-monitor.svg +0 -1
  324. package/src/components/Icon/solid/computer-device-desktop.svg +0 -1
  325. package/src/components/Icon/solid/computer-device-laptop.svg +0 -1
  326. package/src/components/Icon/solid/computer-device-mobile-phone-android-samsung-back.svg +0 -1
  327. package/src/components/Icon/solid/computer-device-mobile-phone-android-samsung.svg +0 -1
  328. package/src/components/Icon/solid/computer-device-mobile-phone-iphone-x-back.svg +0 -1
  329. package/src/components/Icon/solid/computer-device-mobile-phone-iphone-x.svg +0 -1
  330. package/src/components/Icon/solid/computer-device-mobile-tablet-touch.svg +0 -1
  331. package/src/components/Icon/solid/computer-device-mobile-tablet.svg +0 -1
  332. package/src/components/Icon/solid/computer-device-network-ethernet-cat6.svg +0 -1
  333. package/src/components/Icon/solid/computer-device-network-lan-www.svg +0 -1
  334. package/src/components/Icon/solid/computer-device-network-wifi-connection.svg +0 -5
  335. package/src/components/Icon/solid/computer-device-network-wifi-router.svg +0 -1
  336. package/src/components/Icon/solid/computer-keyboard-alt.svg +0 -1
  337. package/src/components/Icon/solid/computer-keyboard-command-cmd-control-ctrl.svg +0 -1
  338. package/src/components/Icon/solid/computer-keyboard-option.svg +0 -1
  339. package/src/components/Icon/solid/computer-keyboard-shift.svg +0 -1
  340. package/src/components/Icon/solid/ecology-science-erlenmeyer-flask.svg +0 -1
  341. package/src/components/Icon/solid/entertainment-control-button-circle-left-arrow-rewind.svg +0 -1
  342. package/src/components/Icon/solid/entertainment-control-button-circle-pause.svg +0 -1
  343. package/src/components/Icon/solid/entertainment-control-button-circle-play.svg +0 -5
  344. package/src/components/Icon/solid/entertainment-control-button-circle-right-arrow-fast-forward.svg +0 -1
  345. package/src/components/Icon/solid/entertainment-control-button-circle-stop-square.svg +0 -1
  346. package/src/components/Icon/solid/entertainment-party-popper-confetti.svg +0 -1
  347. package/src/components/Icon/solid/image-flash-lightning.svg +0 -5
  348. package/src/components/Icon/solid/image-photo-frame.svg +0 -11
  349. package/src/components/Icon/solid/image-picture-flower.svg +0 -5
  350. package/src/components/Icon/solid/interface-add-square.svg +0 -5
  351. package/src/components/Icon/solid/interface-alert-error-exclamation-block-square.svg +0 -1
  352. package/src/components/Icon/solid/interface-alert-error-x-block-square.svg +0 -1
  353. package/src/components/Icon/solid/interface-alert-exclamation-diamond.svg +0 -1
  354. package/src/components/Icon/solid/interface-alert-exclamation-triangle-warning.svg +0 -1
  355. package/src/components/Icon/solid/interface-alert-information-circle.svg +0 -5
  356. package/src/components/Icon/solid/interface-award-crown.svg +0 -5
  357. package/src/components/Icon/solid/interface-bookmark-tag.svg +0 -1
  358. package/src/components/Icon/solid/interface-bookmark.svg +0 -5
  359. package/src/components/Icon/solid/interface-calendar-date-one.svg +0 -5
  360. package/src/components/Icon/solid/interface-close.svg +0 -8
  361. package/src/components/Icon/solid/interface-content-book-open-pages.svg +0 -13
  362. package/src/components/Icon/solid/interface-content-book-page.svg +0 -5
  363. package/src/components/Icon/solid/interface-content-file.svg +0 -5
  364. package/src/components/Icon/solid/interface-content-folder.svg +0 -1
  365. package/src/components/Icon/solid/interface-copy-clipboard.svg +0 -5
  366. package/src/components/Icon/solid/interface-delete-bin-trash.svg +0 -1
  367. package/src/components/Icon/solid/interface-dots-horizontal.svg +0 -1
  368. package/src/components/Icon/solid/interface-dots-vertical.svg +0 -1
  369. package/src/components/Icon/solid/interface-edit-attachment.svg +0 -5
  370. package/src/components/Icon/solid/interface-edit-binocular.svg +0 -5
  371. package/src/components/Icon/solid/interface-edit-magic-wand.svg +0 -7
  372. package/src/components/Icon/solid/interface-edit-tool-eraser.svg +0 -1
  373. package/src/components/Icon/solid/interface-edit-tool-paint-brush.svg +0 -1
  374. package/src/components/Icon/solid/interface-edit-tool-paint-roller.svg +0 -5
  375. package/src/components/Icon/solid/interface-edit-tool-pen.svg +0 -5
  376. package/src/components/Icon/solid/interface-edit-tool-pencil.svg +0 -1
  377. package/src/components/Icon/solid/interface-edit-view-eye.svg +0 -7
  378. package/src/components/Icon/solid/interface-favorite-award.svg +0 -5
  379. package/src/components/Icon/solid/interface-favorite-flag.svg +0 -1
  380. package/src/components/Icon/solid/interface-favorite-heart.svg +0 -5
  381. package/src/components/Icon/solid/interface-favorite-star.svg +0 -5
  382. package/src/components/Icon/solid/interface-favorite-stars-shining.svg +0 -1
  383. package/src/components/Icon/solid/interface-favorite-stars-sparkles.svg +0 -1
  384. package/src/components/Icon/solid/interface-hierarchy-flowchart.svg +0 -5
  385. package/src/components/Icon/solid/interface-home-house.svg +0 -5
  386. package/src/components/Icon/solid/interface-hyperlink.svg +0 -5
  387. package/src/components/Icon/solid/interface-lighting-brightness.svg +0 -22
  388. package/src/components/Icon/solid/interface-lock-closed.svg +0 -5
  389. package/src/components/Icon/solid/interface-lock-open-unlock.svg +0 -1
  390. package/src/components/Icon/solid/interface-login-key.svg +0 -5
  391. package/src/components/Icon/solid/interface-search.svg +0 -5
  392. package/src/components/Icon/solid/interface-setting-cog.svg +0 -5
  393. package/src/components/Icon/solid/interface-share-megaphone-bullhorn.svg +0 -5
  394. package/src/components/Icon/solid/interface-share-rocket.svg +0 -1
  395. package/src/components/Icon/solid/interface-share-satellite.svg +0 -8
  396. package/src/components/Icon/solid/interface-share-space-ship.svg +0 -1
  397. package/src/components/Icon/solid/interface-share.svg +0 -5
  398. package/src/components/Icon/solid/interface-signal-square.svg +0 -5
  399. package/src/components/Icon/solid/interface-text-formatting-left-open-quote.svg +0 -1
  400. package/src/components/Icon/solid/interface-text-formatting-right-close-quote.svg +0 -1
  401. package/src/components/Icon/solid/interface-time-clock-circle.svg +0 -5
  402. package/src/components/Icon/solid/interface-time-hour-glass.svg +0 -1
  403. package/src/components/Icon/solid/interface-users-multiple.svg +0 -11
  404. package/src/components/Icon/solid/interface-validation-checkbox-square.svg +0 -5
  405. package/src/components/Icon/solid/interface-weather-moon.svg +0 -5
  406. package/src/components/Icon/solid/legal-justice-hammer-gavel.svg +0 -1
  407. package/src/components/Icon/solid/mail-chat-bubble-square.svg +0 -5
  408. package/src/components/Icon/solid/mail-send-email-paper-airplane.svg +0 -5
  409. package/src/components/Icon/solid/mail-send-envelope.svg +0 -1
  410. package/src/components/Icon/solid/mail-sign-hashtag.svg +0 -5
  411. package/src/components/Icon/solid/money-cashier-receipt.svg +0 -1
  412. package/src/components/Icon/solid/money-currency-dollar-pay.svg +0 -5
  413. package/src/components/Icon/solid/money-graph-arrow-increase.svg +0 -5
  414. package/src/components/Icon/solid/money-graph-bar-chart-increase.svg +0 -1
  415. package/src/components/Icon/solid/nature-ecology-leaf.svg +0 -5
  416. package/src/components/Icon/solid/phone-telephone.svg +0 -5
  417. package/src/components/Icon/solid/programming-bug.svg +0 -5
  418. package/src/components/Icon/solid/programming-cloud.svg +0 -4
  419. package/src/components/Icon/solid/programming-computer-database-server.svg +0 -5
  420. package/src/components/Icon/solid/programming-computer-database.svg +0 -5
  421. package/src/components/Icon/solid/programming-module-four-layout.svg +0 -1
  422. package/src/components/Icon/solid/programming-module-three.svg +0 -1
  423. package/src/components/Icon/solid/programming-module.svg +0 -1
  424. package/src/components/Icon/solid/programming-script-code.svg +0 -5
  425. package/src/components/Icon/solid/shopping-cart.svg +0 -1
  426. package/src/components/Icon/solid/shopping-gift-present.svg +0 -16
  427. package/src/components/Icon/solid/shopping-shipping-box-parcel-package.svg +0 -11
  428. package/src/components/Icon/solid/tag-new-circle.svg +0 -7
  429. package/src/components/Icon/solid/travel-map-earth-globe.svg +0 -5
  430. package/src/components/SearchModal.vue +0 -305
  431. package/src/components/Sidebar.vue +0 -293
  432. package/src/components/SidebarElement.vue +0 -133
  433. package/src/components/SidebarGroup.vue +0 -12
  434. package/src/components/SimpleTable/SimpleCell.vue +0 -47
  435. package/src/components/SimpleTable/SimpleHeader.vue +0 -17
  436. package/src/components/SimpleTable/SimpleRow.vue +0 -5
  437. package/src/components/SimpleTable/SimpleTable.vue +0 -13
  438. package/src/components/SimpleTable/index.ts +0 -4
  439. package/src/declarations/typographic-base.d.ts +0 -1
  440. package/src/helpers/generateAxiosCodeFromRequest.ts +0 -42
  441. package/src/helpers/generateLaravelCodeFromRequest.ts +0 -20
  442. package/src/helpers/index.ts +0 -5
  443. package/src/helpers/mapFromObject.ts +0 -11
  444. package/src/helpers/objectMerge.ts +0 -19
  445. package/src/helpers/specHelpers.ts +0 -62
  446. package/src/helpers/transformToJson.test.ts +0 -7
  447. package/src/helpers/transformToJson.ts +0 -22
  448. package/src/hooks/useRefOnMount.ts +0 -12
  449. package/src/index.ts +0 -9
  450. package/src/standalone.ts +0 -27
  451. package/src/stores/template.ts +0 -66
  452. package/src/stores/utility.ts +0 -23
  453. package/src/types.ts +0 -153
@@ -1,133 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- import FlowIconButton from '../components/FlowIconButton.vue'
5
- import { FlowIcon, Icon } from './Icon'
6
-
7
- const props = defineProps<{
8
- item: {
9
- uid: string
10
- title: string
11
- type: 'Page' | 'Folder' | 'Link'
12
- link?: string
13
- icon?: {
14
- src: string
15
- }
16
- }
17
- isActive?: boolean
18
- hasChildren?: boolean
19
- open?: boolean
20
- }>()
21
-
22
- const emit = defineEmits<{
23
- (e: 'select'): void
24
- (e: 'toggleOpen'): void
25
- }>()
26
-
27
- enum ElementType {
28
- Page = 'Page',
29
- Folder = 'Folder',
30
- Link = 'Link',
31
- }
32
-
33
- const linkProps = computed(() => {
34
- const item = props.item
35
- if (item.type === ElementType.Link) {
36
- return {
37
- href: item.link,
38
- rel: 'noopener noreferrer',
39
- target: '_blank',
40
- }
41
- }
42
-
43
- return {}
44
- })
45
-
46
- function handleClick() {
47
- if (props.item.type === ElementType.Link) return
48
-
49
- if (props.item.type === ElementType.Folder) {
50
- emit('toggleOpen')
51
- return
52
- }
53
-
54
- emit('select')
55
- }
56
-
57
- function handleToggleOpen() {
58
- // Allow bubbled event to trigger folder open
59
- if (props.item.type === ElementType.Folder) return
60
-
61
- emit('toggleOpen')
62
- }
63
- </script>
64
- <template>
65
- <li class="sidebar-group-item">
66
- <div
67
- class="sidebar-heading"
68
- :class="{ active_page: isActive }"
69
- @click="handleClick">
70
- <!-- If children are detected then show the nesting icon -->
71
- <FlowIconButton
72
- v-if="hasChildren || item.type === ElementType.Folder"
73
- class="toggle-nested-icon"
74
- :icon="open ? 'ChevronDown' : 'ChevronRight'"
75
- label="Toggle group"
76
- variant="text"
77
- width="20px"
78
- @click="handleToggleOpen" />
79
- <a
80
- class="flex-1 sidebar-heading-link"
81
- v-bind="linkProps">
82
- <Icon
83
- v-if="item?.icon?.src"
84
- class="sidebar-icon"
85
- :src="item.icon.src" />
86
- <p>{{ item.title }}</p>
87
- </a>
88
- <FlowIcon
89
- v-if="item?.type === ElementType.Link"
90
- class="link-icon"
91
- icon="ExternalLink"
92
- width="16px" />
93
- </div>
94
- <slot v-if="open" />
95
- <div
96
- v-if="$slots['action-menu']"
97
- class="action-menu">
98
- <slot name="action-menu"></slot>
99
- </div>
100
- </li>
101
- </template>
102
- <style scoped>
103
- .action-menu {
104
- position: absolute;
105
- top: 5px;
106
- right: 5px;
107
- display: flex;
108
- gap: 6px;
109
- }
110
- /**
111
- * Some awkwardness to make the dropdown buttons hidden when not hovered
112
- * but still show when the panel is open and focused
113
- */
114
- .action-menu :deep(.button-wrapper button) {
115
- /* Hide the icons by default */
116
- opacity: 0;
117
- width: 20px;
118
- height: 20px;
119
- padding: 4px;
120
- }
121
- .action-menu:hover :deep(.button-wrapper button),
122
- .action-menu :deep(.button-wrapper button:hover),
123
- .sidebar-heading:hover ~ .action-menu :deep(.button-wrapper button),
124
- .action-menu :deep(.button-wrapper button[aria-expanded='true']) {
125
- opacity: 1;
126
- }
127
- .sidebar-heading:has(~ .action-menu:hover) {
128
- /* prettier-ignore */
129
- color: var(--sidebar-color-1, var(--theme-color-1));
130
- /* prettier-ignore */
131
- background: var(--sidebar-item-hover-background, var(--theme-background-2));
132
- }
133
- </style>
@@ -1,12 +0,0 @@
1
- <script setup lang="ts">
2
- defineProps<{
3
- level: number
4
- }>()
5
- </script>
6
- <template>
7
- <ul
8
- class="sidebar-group sidebar-indent-nested"
9
- :style="{ '--sidebar-level': level }">
10
- <slot />
11
- </ul>
12
- </template>
@@ -1,47 +0,0 @@
1
- <script lang="ts" setup>
2
- import HelpfulLink from '../HelpfulLink.vue'
3
-
4
- withDefaults(
5
- defineProps<{ wrap?: boolean; strong?: boolean; href?: string | null }>(),
6
- {
7
- wrap: true,
8
- strong: false,
9
- href: null,
10
- },
11
- )
12
- </script>
13
- <template>
14
- <td
15
- class="simple-cell"
16
- :class="{ wrap: wrap, strong: strong }">
17
- <template v-if="href">
18
- <HelpfulLink :href="href">
19
- <slot />
20
- </HelpfulLink>
21
- </template>
22
- <template v-else>
23
- <slot />
24
- </template>
25
- </td>
26
- </template>
27
- <style scoped>
28
- .simple-cell {
29
- position: relative;
30
- padding: 0.25em 0.5em;
31
- color: var(--theme-color-1);
32
- white-space: nowrap;
33
- vertical-align: top;
34
- }
35
-
36
- .simple-cell:last-of-type {
37
- border-right: none;
38
- }
39
-
40
- .simple-cell.wrap {
41
- white-space: normal;
42
- }
43
-
44
- .simple-cell.strong {
45
- font-weight: var(--theme-semibold);
46
- }
47
- </style>
@@ -1,17 +0,0 @@
1
- <script lang="ts" setup>
2
- import SimpleCell from './SimpleCell.vue'
3
- </script>
4
- <template>
5
- <SimpleCell
6
- as="th"
7
- class="simple-header">
8
- <slot />
9
- </SimpleCell>
10
- </template>
11
- <style scoped>
12
- .simple-header {
13
- color: var(--theme-color-disabled);
14
- font-weight: var(--theme-bold);
15
- text-transform: uppercase;
16
- }
17
- </style>
@@ -1,5 +0,0 @@
1
- <template>
2
- <tr class="simple-row">
3
- <slot />
4
- </tr>
5
- </template>
@@ -1,13 +0,0 @@
1
- <template>
2
- <table class="simple-table">
3
- <slot />
4
- </table>
5
- </template>
6
-
7
- <style scoped>
8
- .simple-table {
9
- display: table;
10
- width: 100%;
11
- font-size: var(--theme-micro);
12
- }
13
- </style>
@@ -1,4 +0,0 @@
1
- export { default as SimpleCell } from './SimpleCell.vue'
2
- export { default as SimpleHeader } from './SimpleHeader.vue'
3
- export { default as SimpleRow } from './SimpleRow.vue'
4
- export { default as SimpleTable } from './SimpleTable.vue'
@@ -1 +0,0 @@
1
- declare module 'typographic-base'
@@ -1,42 +0,0 @@
1
- type HarRequestHeader = {
2
- name: string
3
- value: string
4
- }
5
-
6
- type HarRequest = {
7
- url: string
8
- method: string
9
- headers?: HarRequestHeader[]
10
- }
11
-
12
- export const generateAxiosCodeFromRequest = (request: HarRequest) => {
13
- const lines: string[] = []
14
-
15
- lines.push(`import axios from 'axios'`)
16
- lines.push(``)
17
- lines.push(`axios({`)
18
-
19
- const url = request.url
20
- lines.push(` url: '${url}',`)
21
-
22
- const method = request.method.toLowerCase()
23
- lines.push(` method: '${method}',`)
24
-
25
- if (request.headers) {
26
- const headers = request.headers
27
- .map((header) => {
28
- return ` '${header.name}': '${header.value}',`
29
- })
30
- .join('\n')
31
-
32
- lines.push(` headers: [`)
33
- lines.push(`${headers}`)
34
- lines.push(` ],`)
35
- }
36
-
37
- lines.push(`}).then(response => {`)
38
- lines.push(` console.log(response)`)
39
- lines.push(`})`)
40
-
41
- return lines.join('\n')
42
- }
@@ -1,20 +0,0 @@
1
- type HarRequest = {
2
- url: string
3
- method: string
4
- }
5
-
6
- export const generateLaravelCodeFromRequest = (request: HarRequest) => {
7
- const lines: string[] = []
8
-
9
- lines.push(`<?php`)
10
- lines.push(``)
11
- lines.push(`use Illuminate\\Support\\Facades\\Http;`)
12
- lines.push(``)
13
-
14
- const method = request.method.toLowerCase()
15
- const url = request.url
16
-
17
- lines.push(`$response = Http::${method}('${url}');`)
18
-
19
- return lines.join('\n')
20
- }
@@ -1,5 +0,0 @@
1
- export { generateAxiosCodeFromRequest } from './generateAxiosCodeFromRequest'
2
- export { generateLaravelCodeFromRequest } from './generateLaravelCodeFromRequest'
3
- export { mapFromObject } from './mapFromObject'
4
- export { objectMerge } from './objectMerge'
5
- export { transformToJson } from './transformToJson'
@@ -1,11 +0,0 @@
1
- /**
2
- * Map an object to an array of key-value pairs.
3
- */
4
- export const mapFromObject = (object: Record<string, any>) => {
5
- return Object.keys(object).map((key) => {
6
- return {
7
- key,
8
- value: object[key],
9
- }
10
- })
11
- }
@@ -1,19 +0,0 @@
1
- // TODO: This is a copy of packages/core-interface/src/database/utility.ts
2
- /**
3
- * Overwrite a target object a new replacement object handling removed keys
4
- **/
5
- export function objectMerge<A extends object, B extends object>(
6
- target: A,
7
- replacement: B,
8
- ) {
9
- // Clear any keys that have been removed in the replacement
10
- Object.keys(target).forEach((key) => {
11
- if (!Object.hasOwn(replacement, key)) {
12
- delete target[key as keyof A]
13
- }
14
- })
15
-
16
- Object.assign(target, replacement)
17
-
18
- return target as unknown as B
19
- }
@@ -1,62 +0,0 @@
1
- import type { ContentSchema, Operation } from '../types'
2
-
3
- type PropertyObject = {
4
- required?: string[]
5
- properties: {
6
- [key: string]: {
7
- type: string
8
- description?: string
9
- }
10
- }
11
- }
12
-
13
- function formatProperty(key: string, obj: PropertyObject): string {
14
- let output = key
15
- const isRequired = obj.required && obj.required.includes(key)
16
- output += isRequired ? ' REQUIRED ' : ' optional '
17
-
18
- // Check existence before accessing
19
- if (obj.properties[key]) {
20
- output += obj.properties[key].type
21
- if (obj.properties[key].description) {
22
- output += ' ' + obj.properties[key].description
23
- }
24
- }
25
-
26
- return output
27
- }
28
-
29
- function recursiveLogger(obj: ContentSchema): string[] {
30
- const results: string[] = ['Body']
31
-
32
- const properties = obj?.schema?.properties
33
- if (properties) {
34
- Object.keys(properties).forEach((key) => {
35
- results.push(formatProperty(key, obj.schema))
36
-
37
- const property = properties[key]
38
- const isNestedObject = property.type === 'object' && !!property.properties
39
- if (isNestedObject && property.properties) {
40
- Object.keys(property.properties).forEach((subKey) => {
41
- results.push(`${subKey} ${property.properties?.[subKey]?.type}`)
42
- })
43
- }
44
- })
45
- }
46
-
47
- return results
48
- }
49
-
50
- function extractRequestBody(operation: Operation): string[] | boolean {
51
- try {
52
- // Using optional chaining here as well
53
- const body =
54
- operation?.information?.requestBody?.content['application/json']
55
- if (!body) throw new Error('Body not found')
56
- return recursiveLogger(body)
57
- } catch (error) {
58
- return false
59
- }
60
- }
61
-
62
- export { formatProperty, recursiveLogger, extractRequestBody }
@@ -1,7 +0,0 @@
1
- import { describe, expect, it } from 'vitest'
2
-
3
- describe('example', () => {
4
- it('executes tests', () => {
5
- expect(true).toBe(true)
6
- })
7
- })
@@ -1,22 +0,0 @@
1
- import yaml from 'js-yaml'
2
-
3
- /**
4
- * This helper is used to transform the content of the swagger file to JSON, even it was YAML.
5
- */
6
- export const transformToJson = (value: string) => {
7
- try {
8
- // JSON
9
- JSON.parse(value)
10
-
11
- return value
12
- } catch {
13
- try {
14
- // Yaml to JSON
15
- const doc = yaml.load(value)
16
- return JSON.stringify(doc)
17
- } catch {
18
- // Invalid
19
- return value
20
- }
21
- }
22
- }
@@ -1,12 +0,0 @@
1
- import { type Ref, onMounted, ref } from 'vue'
2
-
3
- // Set a ref value on mount when needed to access properties that are not SSR friendly
4
- export function useRefOnMount<T>(setter: () => T) {
5
- const value: Ref<T | null> = ref(null)
6
-
7
- onMounted(() => {
8
- value.value = setter()
9
- })
10
-
11
- return value
12
- }
package/src/index.ts DELETED
@@ -1,9 +0,0 @@
1
- export {
2
- default as ApiClientModal,
3
- useApiClientStore,
4
- } from './components/ApiClientModal.vue'
5
- export { default as ApiReference } from './components/ApiReference.vue'
6
- export { default as Sidebar } from './components/Sidebar.vue'
7
- export { default as RenderedReference } from './components/Content/Content.vue'
8
-
9
- export * from './types'
package/src/standalone.ts DELETED
@@ -1,27 +0,0 @@
1
- import { createApp } from 'vue'
2
-
3
- import ApiReference from './components/ApiReference.vue'
4
-
5
- const specElement = document.querySelector('[data-spec]')
6
- const specUrlElement = document.querySelector('[data-spec-url]')
7
-
8
- if (!specUrlElement && !specElement) {
9
- console.error(
10
- 'Couldn’t find a [data-spec] or [data-spec-url] element. Try adding it like this: %c<div data-spec-url="https://petstore.swagger.io/v2/swagger.json" />',
11
- 'font-family: monospace;',
12
- )
13
- } else {
14
- const properties = specElement
15
- ? {
16
- spec: specElement.getAttribute('data-spec'),
17
- }
18
- : {
19
- specUrl: specUrlElement?.getAttribute('data-spec-url') ?? '',
20
- }
21
-
22
- document.querySelector('body')?.classList.add('light-mode')
23
-
24
- const container = specElement ? '[data-spec]' : '[data-spec-url]'
25
-
26
- createApp(ApiReference, properties).mount(container)
27
- }
@@ -1,66 +0,0 @@
1
- /**
2
- * TODO: This is a copy of projects/web/src/stores/template.ts
3
- */
4
- import { type TargetId, availableTargets } from 'httpsnippet-lite'
5
- import { reactive, readonly } from 'vue'
6
-
7
- import { objectMerge } from '../helpers/objectMerge'
8
- import { setItemFactory, toggleItemFactory } from './utility'
9
-
10
- export enum NavState {
11
- Guide = 'Guide',
12
- Reference = 'Reference',
13
- }
14
-
15
- type TemplateState = {
16
- isDark: boolean
17
- showSideBar: boolean
18
- showSearch: boolean
19
- activeNavState: NavState
20
- collapsedSidebarItems: Partial<Record<string, boolean>>
21
- preferredLanguage: TargetId | 'axios' | 'laravel'
22
- }
23
-
24
- const defaultTemplateState = (): TemplateState => ({
25
- isDark: false,
26
- showSearch: false,
27
- showSideBar: true,
28
- activeNavState: NavState.Guide,
29
- collapsedSidebarItems: {},
30
- preferredLanguage: 'shell',
31
- })
32
-
33
- const state = reactive<TemplateState>(defaultTemplateState())
34
-
35
- function resetState() {
36
- objectMerge(state, defaultTemplateState())
37
- }
38
-
39
- function toggleCollapsedSidebarItem(key: string) {
40
- state.collapsedSidebarItems[key] = !state.collapsedSidebarItems[key] ?? true
41
- }
42
-
43
- function setCollapsedSidebarItem(key: string, value: boolean) {
44
- state.collapsedSidebarItems[key] = value
45
- }
46
-
47
- // getLanguageTitleByKey('javascript') => 'JavaScript'
48
- function getLanguageTitleByKey(language: TargetId | 'axios' | 'laravel') {
49
- if (language === 'axios') {
50
- return 'JavaScript (Axios)'
51
- } else if (language === 'laravel') {
52
- return 'PHP (Laravel)'
53
- }
54
-
55
- return availableTargets().find((target) => language === target.key)?.title
56
- }
57
-
58
- export const useTemplateStore = () => ({
59
- state: readonly(state),
60
- resetState,
61
- setItem: setItemFactory(state),
62
- toggleItem: toggleItemFactory(state),
63
- toggleCollapsedSidebarItem,
64
- setCollapsedSidebarItem,
65
- getLanguageTitleByKey,
66
- })
@@ -1,23 +0,0 @@
1
- /**
2
- * TODO: This is a copy of projects/web/src/stores/utility.ts
3
- */
4
- export type KeyOfType<T, V> = keyof {
5
- [P in keyof T as T[P] extends V ? P : never]: any
6
- }
7
-
8
- /** Generic set item for a given store state */
9
- export function setItemFactory<State extends object>(state: State) {
10
- return function setItem<K extends keyof State>(key: K, value: State[K]) {
11
- state[key] = value
12
- }
13
- }
14
-
15
- export function toggleItemFactory<State extends object>(state: State) {
16
- return function toggleItem(key: KeyOfType<State, boolean>) {
17
- if (typeof state[key] === 'boolean') {
18
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
19
- // @ts-ignore
20
- state[key] = !state[key]
21
- }
22
- }
23
- }