@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.
- package/package.json +9 -10
- package/src/components/ApiClientModal.vue +0 -205
- package/src/components/ApiReference.vue +0 -750
- package/src/components/Card/Card.vue +0 -12
- package/src/components/Card/CardContent.vue +0 -45
- package/src/components/Card/CardFooter.vue +0 -13
- package/src/components/Card/CardHeader.vue +0 -37
- package/src/components/Card/CardTab.vue +0 -32
- package/src/components/Card/CardTabHeader.vue +0 -32
- package/src/components/Card/index.ts +0 -6
- package/src/components/Content/Content.vue +0 -145
- package/src/components/Content/Introduction/BaseUrl.vue +0 -49
- package/src/components/Content/Introduction/Introduction.vue +0 -141
- package/src/components/Content/Introduction/LanguageSelector.vue +0 -361
- package/src/components/Content/Introduction/index.ts +0 -1
- package/src/components/Content/MarkdownRenderer.vue +0 -177
- package/src/components/Content/ReferenceEndpoint/Copy.vue +0 -101
- package/src/components/Content/ReferenceEndpoint/ExampleRequest.vue +0 -331
- package/src/components/Content/ReferenceEndpoint/ExampleResponseTab.vue +0 -22
- package/src/components/Content/ReferenceEndpoint/ExampleResponses/ExampleResponses.vue +0 -168
- package/src/components/Content/ReferenceEndpoint/ExampleResponses/Headers.vue +0 -83
- package/src/components/Content/ReferenceEndpoint/ExampleResponses/SelectExample.vue +0 -129
- package/src/components/Content/ReferenceEndpoint/ExampleResponses/index.ts +0 -1
- package/src/components/Content/ReferenceEndpoint/ParameterItem.vue +0 -26
- package/src/components/Content/ReferenceEndpoint/Parameters.vue +0 -23
- package/src/components/Content/ReferenceEndpoint/ReferenceEndpoint.vue +0 -29
- package/src/components/Content/ReferenceEndpoint/RequestBody.vue +0 -125
- package/src/components/Content/ReferenceEndpoint/RequestBodyProperties.vue +0 -54
- package/src/components/Content/ReferenceEndpoint/RequestBodyPropertiesChild.vue +0 -39
- package/src/components/Content/ReferenceEndpoint/index.ts +0 -1
- package/src/components/Content/ReferenceTag.vue +0 -99
- package/src/components/Content/Spinner.vue +0 -51
- package/src/components/Content/index.ts +0 -1
- package/src/components/FindAnythingButton.vue +0 -76
- package/src/components/FlowButton.vue +0 -184
- package/src/components/FlowIconButton.vue +0 -25
- package/src/components/FlowLoader.vue +0 -207
- package/src/components/FlowModal.vue +0 -133
- package/src/components/HelpfulLink.vue +0 -19
- package/src/components/Icon/FlowIcon.vue +0 -19
- package/src/components/Icon/Icon.vue +0 -23
- package/src/components/Icon/SvgRenderer.ts +0 -66
- package/src/components/Icon/brand/brand-adobe.svg +0 -1
- package/src/components/Icon/brand/brand-amazon.svg +0 -1
- package/src/components/Icon/brand/brand-browser-firefox.svg +0 -5
- package/src/components/Icon/brand/brand-browser-googlechrome.svg +0 -5
- package/src/components/Icon/brand/brand-creative-commons.svg +0 -1
- package/src/components/Icon/brand/brand-ecommerce-etsy.svg +0 -1
- package/src/components/Icon/brand/brand-ecommerce-patreon.svg +0 -1
- package/src/components/Icon/brand/brand-ecommerce-shopify.svg +0 -5
- package/src/components/Icon/brand/brand-ecommerce-wordpress.svg +0 -1
- package/src/components/Icon/brand/brand-gaming-nintendo-switch.svg +0 -5
- package/src/components/Icon/brand/brand-gaming-playstation.svg +0 -1
- package/src/components/Icon/brand/brand-gaming-xbox-live.svg +0 -5
- package/src/components/Icon/brand/brand-google-drive.svg +0 -5
- package/src/components/Icon/brand/brand-google-gmail.svg +0 -5
- package/src/components/Icon/brand/brand-google.svg +0 -1
- package/src/components/Icon/brand/brand-music-itunes.svg +0 -1
- package/src/components/Icon/brand/brand-music-soundcloud.svg +0 -1
- package/src/components/Icon/brand/brand-music-spotify.svg +0 -1
- package/src/components/Icon/brand/brand-office-dropbox.svg +0 -5
- package/src/components/Icon/brand/brand-office-slack.svg +0 -5
- package/src/components/Icon/brand/brand-office-zoom.svg +0 -1
- package/src/components/Icon/brand/brand-payments-alipay.svg +0 -1
- package/src/components/Icon/brand/brand-payments-paypal.svg +0 -1
- package/src/components/Icon/brand/brand-payments-stripe.svg +0 -1
- package/src/components/Icon/brand/brand-platform-android.svg +0 -1
- package/src/components/Icon/brand/brand-platform-apple.svg +0 -5
- package/src/components/Icon/brand/brand-platform-linux.svg +0 -5
- package/src/components/Icon/brand/brand-platform-microsoft-windows.svg +0 -4
- package/src/components/Icon/brand/brand-social-chat-discord.svg +0 -5
- package/src/components/Icon/brand/brand-social-chat-kuaishou.svg +0 -5
- package/src/components/Icon/brand/brand-social-chat-line.svg +0 -5
- package/src/components/Icon/brand/brand-social-chat-messenger.svg +0 -5
- package/src/components/Icon/brand/brand-social-chat-signal.svg +0 -5
- package/src/components/Icon/brand/brand-social-chat-snapchat.svg +0 -5
- package/src/components/Icon/brand/brand-social-chat-telegram.svg +0 -5
- package/src/components/Icon/brand/brand-social-chat-wechat.svg +0 -5
- package/src/components/Icon/brand/brand-social-chat-whatsapp.svg +0 -5
- package/src/components/Icon/brand/brand-social-media-deviantart.svg +0 -5
- package/src/components/Icon/brand/brand-social-media-dribbble.svg +0 -1
- package/src/components/Icon/brand/brand-social-media-facebook.svg +0 -1
- package/src/components/Icon/brand/brand-social-media-instagram.svg +0 -5
- package/src/components/Icon/brand/brand-social-media-linkedin.svg +0 -5
- package/src/components/Icon/brand/brand-social-media-pinterest.svg +0 -5
- package/src/components/Icon/brand/brand-social-media-reddit.svg +0 -1
- package/src/components/Icon/brand/brand-social-media-sina-weibo.svg +0 -5
- package/src/components/Icon/brand/brand-social-media-threads.svg +0 -1
- package/src/components/Icon/brand/brand-social-media-tiktok.svg +0 -5
- package/src/components/Icon/brand/brand-social-media-tinder.svg +0 -1
- package/src/components/Icon/brand/brand-social-media-tumblr.svg +0 -5
- package/src/components/Icon/brand/brand-social-media-twitter.svg +0 -5
- package/src/components/Icon/brand/brand-software-design-figma.svg +0 -1
- package/src/components/Icon/brand/brand-software-development-authy.svg +0 -1
- package/src/components/Icon/brand/brand-software-development-digital-ocean.svg +0 -1
- package/src/components/Icon/brand/brand-software-development-docker.svg +0 -5
- package/src/components/Icon/brand/brand-software-development-github.svg +0 -5
- package/src/components/Icon/brand/brand-software-development-jira.svg +0 -1
- package/src/components/Icon/brand/brand-software-development-openai.svg +0 -1
- package/src/components/Icon/brand/brand-software-development-stackexchange.svg +0 -5
- package/src/components/Icon/brand/brand-software-development-stackoverflow.svg +0 -1
- package/src/components/Icon/brand/brand-video-netflix.svg +0 -5
- package/src/components/Icon/brand/brand-video-twitch.svg +0 -1
- package/src/components/Icon/brand/brand-video-vimeo.svg +0 -5
- package/src/components/Icon/brand/brand-video-youtube.svg +0 -5
- package/src/components/Icon/brand/programming-framework-angular.svg +0 -5
- package/src/components/Icon/brand/programming-framework-astro.svg +0 -5
- package/src/components/Icon/brand/programming-framework-laravel.svg +0 -1
- package/src/components/Icon/brand/programming-framework-nextdotjs.svg +0 -5
- package/src/components/Icon/brand/programming-framework-react.svg +0 -5
- package/src/components/Icon/brand/programming-framework-vuedotjs.svg +0 -1
- package/src/components/Icon/brand/programming-language-c.svg +0 -5
- package/src/components/Icon/brand/programming-language-clojure.svg +0 -5
- package/src/components/Icon/brand/programming-language-csharp.svg +0 -4
- package/src/components/Icon/brand/programming-language-css3.svg +0 -4
- package/src/components/Icon/brand/programming-language-go.svg +0 -4
- package/src/components/Icon/brand/programming-language-html5.svg +0 -4
- package/src/components/Icon/brand/programming-language-java.svg +0 -21
- package/src/components/Icon/brand/programming-language-javascript-js.svg +0 -4
- package/src/components/Icon/brand/programming-language-json.svg +0 -8
- package/src/components/Icon/brand/programming-language-kotlin.svg +0 -3
- package/src/components/Icon/brand/programming-language-node.svg +0 -10
- package/src/components/Icon/brand/programming-language-objc.svg +0 -6
- package/src/components/Icon/brand/programming-language-ocaml.svg +0 -4
- package/src/components/Icon/brand/programming-language-php.svg +0 -4
- package/src/components/Icon/brand/programming-language-powershell.svg +0 -10
- package/src/components/Icon/brand/programming-language-python.svg +0 -4
- package/src/components/Icon/brand/programming-language-r.svg +0 -7
- package/src/components/Icon/brand/programming-language-ruby.svg +0 -5
- package/src/components/Icon/brand/programming-language-scala.svg +0 -5
- package/src/components/Icon/brand/programming-language-shell.svg +0 -5
- package/src/components/Icon/brand/programming-language-swift.svg +0 -4
- package/src/components/Icon/brand/programming-language-typescript.svg +0 -5
- package/src/components/Icon/brand/programming-tool-git.svg +0 -1
- package/src/components/Icon/brand/programming-tool-tailwindcss.svg +0 -5
- package/src/components/Icon/icons/Add.svg +0 -4
- package/src/components/Icon/icons/ArrowDown.svg +0 -3
- package/src/components/Icon/icons/ArrowLeft.svg +0 -3
- package/src/components/Icon/icons/ArrowRight.svg +0 -3
- package/src/components/Icon/icons/ArrowUp.svg +0 -3
- package/src/components/Icon/icons/Background.svg +0 -8
- package/src/components/Icon/icons/CallToAction.svg +0 -5
- package/src/components/Icon/icons/CheckMark.svg +0 -3
- package/src/components/Icon/icons/ChevronDown.svg +0 -3
- package/src/components/Icon/icons/ChevronLeft.svg +0 -3
- package/src/components/Icon/icons/ChevronRight.svg +0 -3
- package/src/components/Icon/icons/ChevronUp.svg +0 -3
- package/src/components/Icon/icons/Close.svg +0 -3
- package/src/components/Icon/icons/DarkMode.svg +0 -4
- package/src/components/Icon/icons/Delete.svg +0 -5
- package/src/components/Icon/icons/Discord.svg +0 -5
- package/src/components/Icon/icons/Duplicate.svg +0 -6
- package/src/components/Icon/icons/Edit.svg +0 -4
- package/src/components/Icon/icons/EditorBold.svg +0 -4
- package/src/components/Icon/icons/EditorCode.svg +0 -6
- package/src/components/Icon/icons/EditorHighlight.svg +0 -12
- package/src/components/Icon/icons/EditorItalic.svg +0 -4
- package/src/components/Icon/icons/EditorLink.svg +0 -8
- package/src/components/Icon/icons/EditorStrike.svg +0 -4
- package/src/components/Icon/icons/EditorUnderline.svg +0 -6
- package/src/components/Icon/icons/Ellipses.svg +0 -4
- package/src/components/Icon/icons/Error.svg +0 -4
- package/src/components/Icon/icons/ExternalLink.svg +0 -7
- package/src/components/Icon/icons/Folder.svg +0 -4
- package/src/components/Icon/icons/GitHub.svg +0 -4
- package/src/components/Icon/icons/Google.svg +0 -4
- package/src/components/Icon/icons/Hide.svg +0 -5
- package/src/components/Icon/icons/Key.svg +0 -5
- package/src/components/Icon/icons/Leave.svg +0 -5
- package/src/components/Icon/icons/LightMode.svg +0 -6
- package/src/components/Icon/icons/Link.svg +0 -5
- package/src/components/Icon/icons/Lock.svg +0 -4
- package/src/components/Icon/icons/Logo.svg +0 -4
- package/src/components/Icon/icons/LogoAPI.svg +0 -4
- package/src/components/Icon/icons/LogoClient.svg +0 -4
- package/src/components/Icon/icons/LogoMarket.svg +0 -4
- package/src/components/Icon/icons/LogoSwagger.svg +0 -4
- package/src/components/Icon/icons/Magic.svg +0 -5
- package/src/components/Icon/icons/Menu.svg +0 -3
- package/src/components/Icon/icons/Page.svg +0 -8
- package/src/components/Icon/icons/Payment.svg +0 -5
- package/src/components/Icon/icons/Refresh.svg +0 -4
- package/src/components/Icon/icons/Search.svg +0 -4
- package/src/components/Icon/icons/Show.svg +0 -5
- package/src/components/Icon/icons/Sigma.svg +0 -4
- package/src/components/Icon/icons/Trash.svg +0 -5
- package/src/components/Icon/icons/index.ts +0 -65
- package/src/components/Icon/index.ts +0 -2
- package/src/components/Icon/line/arrow-chevron-down.svg +0 -1
- package/src/components/Icon/line/arrow-chevron-left.svg +0 -1
- package/src/components/Icon/line/arrow-chevron-right.svg +0 -1
- package/src/components/Icon/line/arrow-chevron-up.svg +0 -1
- package/src/components/Icon/line/arrow-down.svg +0 -1
- package/src/components/Icon/line/arrow-left.svg +0 -1
- package/src/components/Icon/line/arrow-right.svg +0 -1
- package/src/components/Icon/line/arrow-up.svg +0 -1
- package/src/components/Icon/line/basic-shape-diamond.svg +0 -1
- package/src/components/Icon/line/basic-shape-hexagon.svg +0 -1
- package/src/components/Icon/line/basic-shape-primary-circle-ellipse-round.svg +0 -1
- package/src/components/Icon/line/basic-shape-primary-square-rectangle.svg +0 -1
- package/src/components/Icon/line/basic-shape-shield.svg +0 -1
- package/src/components/Icon/line/computer-device-desktop-monitor.svg +0 -1
- package/src/components/Icon/line/computer-device-desktop.svg +0 -1
- package/src/components/Icon/line/computer-device-laptop.svg +0 -1
- package/src/components/Icon/line/computer-device-mobile-phone-android-samsung-back.svg +0 -1
- package/src/components/Icon/line/computer-device-mobile-phone-android-samsung.svg +0 -1
- package/src/components/Icon/line/computer-device-mobile-phone-iphone-x-back.svg +0 -1
- package/src/components/Icon/line/computer-device-mobile-phone-iphone-x.svg +0 -1
- package/src/components/Icon/line/computer-device-mobile-tablet-touch.svg +0 -1
- package/src/components/Icon/line/computer-device-mobile-tablet.svg +0 -1
- package/src/components/Icon/line/computer-device-network-ethernet-cat6.svg +0 -1
- package/src/components/Icon/line/computer-device-network-lan-www.svg +0 -1
- package/src/components/Icon/line/computer-device-network-wifi-connection.svg +0 -1
- package/src/components/Icon/line/computer-device-network-wifi-router.svg +0 -1
- package/src/components/Icon/line/computer-keyboard-alt.svg +0 -1
- package/src/components/Icon/line/computer-keyboard-command-cmd-control-ctrl.svg +0 -1
- package/src/components/Icon/line/computer-keyboard-option.svg +0 -1
- package/src/components/Icon/line/computer-keyboard-shift.svg +0 -1
- package/src/components/Icon/line/ecology-science-erlenmeyer-flask.svg +0 -1
- package/src/components/Icon/line/entertainment-control-button-circle-left-arrow-rewind.svg +0 -1
- package/src/components/Icon/line/entertainment-control-button-circle-pause.svg +0 -1
- package/src/components/Icon/line/entertainment-control-button-circle-right-arrow-fast-forward.svg +0 -1
- package/src/components/Icon/line/entertainment-control-button-circle-stop-square.svg +0 -1
- package/src/components/Icon/line/entertainment-control-button-play-circle.svg +0 -1
- package/src/components/Icon/line/entertainment-party-popper-confetti.svg +0 -1
- package/src/components/Icon/line/image-flash-lightning.svg +0 -1
- package/src/components/Icon/line/image-photo-frame.svg +0 -1
- package/src/components/Icon/line/image-picture-flower.svg +0 -1
- package/src/components/Icon/line/interface-add.svg +0 -1
- package/src/components/Icon/line/interface-alert-error-exclamation-block-square.svg +0 -1
- package/src/components/Icon/line/interface-alert-error-x-block-square.svg +0 -1
- package/src/components/Icon/line/interface-alert-exclamation-diamond.svg +0 -1
- package/src/components/Icon/line/interface-alert-exclamation-triangle-warning.svg +0 -1
- package/src/components/Icon/line/interface-alert-information-circle.svg +0 -1
- package/src/components/Icon/line/interface-award-crown.svg +0 -1
- package/src/components/Icon/line/interface-bookmark-tag.svg +0 -1
- package/src/components/Icon/line/interface-bookmark.svg +0 -1
- package/src/components/Icon/line/interface-calendar-date-one.svg +0 -1
- package/src/components/Icon/line/interface-close.svg +0 -1
- package/src/components/Icon/line/interface-content-book-open-pages.svg +0 -1
- package/src/components/Icon/line/interface-content-book-page.svg +0 -1
- package/src/components/Icon/line/interface-content-file.svg +0 -8
- package/src/components/Icon/line/interface-content-folder.svg +0 -1
- package/src/components/Icon/line/interface-copy-clipboard.svg +0 -1
- package/src/components/Icon/line/interface-delete-bin-trash.svg +0 -1
- package/src/components/Icon/line/interface-dots-horizontal.svg +0 -1
- package/src/components/Icon/line/interface-dots-vertical.svg +0 -1
- package/src/components/Icon/line/interface-edit-attachment.svg +0 -1
- package/src/components/Icon/line/interface-edit-binocular.svg +0 -1
- package/src/components/Icon/line/interface-edit-magic-wand.svg +0 -1
- package/src/components/Icon/line/interface-edit-tool-eraser.svg +0 -1
- package/src/components/Icon/line/interface-edit-tool-paint-brush.svg +0 -1
- package/src/components/Icon/line/interface-edit-tool-paint-roller.svg +0 -1
- package/src/components/Icon/line/interface-edit-tool-pen.svg +0 -1
- package/src/components/Icon/line/interface-edit-tool-pencil.svg +0 -1
- package/src/components/Icon/line/interface-edit-view-eye.svg +0 -1
- package/src/components/Icon/line/interface-favorite-award.svg +0 -1
- package/src/components/Icon/line/interface-favorite-flag.svg +0 -1
- package/src/components/Icon/line/interface-favorite-heart.svg +0 -1
- package/src/components/Icon/line/interface-favorite-star.svg +0 -1
- package/src/components/Icon/line/interface-favorite-stars-shining.svg +0 -1
- package/src/components/Icon/line/interface-favorite-stars-sparkles.svg +0 -1
- package/src/components/Icon/line/interface-hierarchy-flowchart.svg +0 -1
- package/src/components/Icon/line/interface-home-house.svg +0 -1
- package/src/components/Icon/line/interface-hyperlink.svg +0 -1
- package/src/components/Icon/line/interface-lighting-brightness.svg +0 -1
- package/src/components/Icon/line/interface-lock-closed.svg +0 -1
- package/src/components/Icon/line/interface-lock-open-unlock.svg +0 -1
- package/src/components/Icon/line/interface-login-key.svg +0 -1
- package/src/components/Icon/line/interface-search.svg +0 -1
- package/src/components/Icon/line/interface-setting-cog.svg +0 -1
- package/src/components/Icon/line/interface-share-megaphone-bullhorn.svg +0 -1
- package/src/components/Icon/line/interface-share-rocket.svg +0 -1
- package/src/components/Icon/line/interface-share-satellite.svg +0 -1
- package/src/components/Icon/line/interface-share-space-ship.svg +0 -1
- package/src/components/Icon/line/interface-share.svg +0 -1
- package/src/components/Icon/line/interface-signal-square.svg +0 -1
- package/src/components/Icon/line/interface-text-formatting-left-open-quote.svg +0 -1
- package/src/components/Icon/line/interface-text-formatting-right-close-quote.svg +0 -1
- package/src/components/Icon/line/interface-time-clock-circle.svg +0 -1
- package/src/components/Icon/line/interface-time-hour-glass.svg +0 -1
- package/src/components/Icon/line/interface-users-multiple.svg +0 -1
- package/src/components/Icon/line/interface-validation-checkbox-square.svg +0 -1
- package/src/components/Icon/line/interface-weather-moon.svg +0 -1
- package/src/components/Icon/line/legal-justice-hammer-gavel.svg +0 -1
- package/src/components/Icon/line/mail-chat-bubble-square.svg +0 -1
- package/src/components/Icon/line/mail-send-email-paper-airplane.svg +0 -1
- package/src/components/Icon/line/mail-send-envelope.svg +0 -1
- package/src/components/Icon/line/mail-sign-hashtag.svg +0 -1
- package/src/components/Icon/line/money-cashier-receipt.svg +0 -1
- package/src/components/Icon/line/money-currency-dollar-pay.svg +0 -1
- package/src/components/Icon/line/money-graph-arrow-increase.svg +0 -1
- package/src/components/Icon/line/money-graph-bar-chart-increase.svg +0 -1
- package/src/components/Icon/line/nature-ecology-leaf.svg +0 -1
- package/src/components/Icon/line/phone-telephone.svg +0 -1
- package/src/components/Icon/line/programming-bug.svg +0 -1
- package/src/components/Icon/line/programming-cloud.svg +0 -1
- package/src/components/Icon/line/programming-computer-database-server.svg +0 -1
- package/src/components/Icon/line/programming-computer-database.svg +0 -1
- package/src/components/Icon/line/programming-module-four-layout.svg +0 -1
- package/src/components/Icon/line/programming-module-three.svg +0 -1
- package/src/components/Icon/line/programming-module.svg +0 -1
- package/src/components/Icon/line/programming-script-code.svg +0 -1
- package/src/components/Icon/line/shopping-cart.svg +0 -8
- package/src/components/Icon/line/shopping-gift-present.svg +0 -1
- package/src/components/Icon/line/shopping-shipping-box-parcel-package.svg +0 -1
- package/src/components/Icon/line/tag-new-circle.svg +0 -1
- package/src/components/Icon/line/travel-map-earth-globe.svg +0 -1
- package/src/components/Icon/localIcons.ts +0 -68
- package/src/components/Icon/solid/arrow-chevron-down.svg +0 -1
- package/src/components/Icon/solid/arrow-chevron-left.svg +0 -1
- package/src/components/Icon/solid/arrow-chevron-right.svg +0 -1
- package/src/components/Icon/solid/arrow-chevron-up.svg +0 -1
- package/src/components/Icon/solid/arrow-down.svg +0 -1
- package/src/components/Icon/solid/arrow-left.svg +0 -1
- package/src/components/Icon/solid/arrow-right.svg +0 -1
- package/src/components/Icon/solid/arrow-up.svg +0 -1
- package/src/components/Icon/solid/basic-shape-diamond.svg +0 -1
- package/src/components/Icon/solid/basic-shape-hexagon.svg +0 -1
- package/src/components/Icon/solid/basic-shape-primary-circle-ellipse-round.svg +0 -1
- package/src/components/Icon/solid/basic-shape-primary-square-rectangle.svg +0 -1
- package/src/components/Icon/solid/basic-shape-shield.svg +0 -1
- package/src/components/Icon/solid/computer-device-desktop-monitor.svg +0 -1
- package/src/components/Icon/solid/computer-device-desktop.svg +0 -1
- package/src/components/Icon/solid/computer-device-laptop.svg +0 -1
- package/src/components/Icon/solid/computer-device-mobile-phone-android-samsung-back.svg +0 -1
- package/src/components/Icon/solid/computer-device-mobile-phone-android-samsung.svg +0 -1
- package/src/components/Icon/solid/computer-device-mobile-phone-iphone-x-back.svg +0 -1
- package/src/components/Icon/solid/computer-device-mobile-phone-iphone-x.svg +0 -1
- package/src/components/Icon/solid/computer-device-mobile-tablet-touch.svg +0 -1
- package/src/components/Icon/solid/computer-device-mobile-tablet.svg +0 -1
- package/src/components/Icon/solid/computer-device-network-ethernet-cat6.svg +0 -1
- package/src/components/Icon/solid/computer-device-network-lan-www.svg +0 -1
- package/src/components/Icon/solid/computer-device-network-wifi-connection.svg +0 -5
- package/src/components/Icon/solid/computer-device-network-wifi-router.svg +0 -1
- package/src/components/Icon/solid/computer-keyboard-alt.svg +0 -1
- package/src/components/Icon/solid/computer-keyboard-command-cmd-control-ctrl.svg +0 -1
- package/src/components/Icon/solid/computer-keyboard-option.svg +0 -1
- package/src/components/Icon/solid/computer-keyboard-shift.svg +0 -1
- package/src/components/Icon/solid/ecology-science-erlenmeyer-flask.svg +0 -1
- package/src/components/Icon/solid/entertainment-control-button-circle-left-arrow-rewind.svg +0 -1
- package/src/components/Icon/solid/entertainment-control-button-circle-pause.svg +0 -1
- package/src/components/Icon/solid/entertainment-control-button-circle-play.svg +0 -5
- package/src/components/Icon/solid/entertainment-control-button-circle-right-arrow-fast-forward.svg +0 -1
- package/src/components/Icon/solid/entertainment-control-button-circle-stop-square.svg +0 -1
- package/src/components/Icon/solid/entertainment-party-popper-confetti.svg +0 -1
- package/src/components/Icon/solid/image-flash-lightning.svg +0 -5
- package/src/components/Icon/solid/image-photo-frame.svg +0 -11
- package/src/components/Icon/solid/image-picture-flower.svg +0 -5
- package/src/components/Icon/solid/interface-add-square.svg +0 -5
- package/src/components/Icon/solid/interface-alert-error-exclamation-block-square.svg +0 -1
- package/src/components/Icon/solid/interface-alert-error-x-block-square.svg +0 -1
- package/src/components/Icon/solid/interface-alert-exclamation-diamond.svg +0 -1
- package/src/components/Icon/solid/interface-alert-exclamation-triangle-warning.svg +0 -1
- package/src/components/Icon/solid/interface-alert-information-circle.svg +0 -5
- package/src/components/Icon/solid/interface-award-crown.svg +0 -5
- package/src/components/Icon/solid/interface-bookmark-tag.svg +0 -1
- package/src/components/Icon/solid/interface-bookmark.svg +0 -5
- package/src/components/Icon/solid/interface-calendar-date-one.svg +0 -5
- package/src/components/Icon/solid/interface-close.svg +0 -8
- package/src/components/Icon/solid/interface-content-book-open-pages.svg +0 -13
- package/src/components/Icon/solid/interface-content-book-page.svg +0 -5
- package/src/components/Icon/solid/interface-content-file.svg +0 -5
- package/src/components/Icon/solid/interface-content-folder.svg +0 -1
- package/src/components/Icon/solid/interface-copy-clipboard.svg +0 -5
- package/src/components/Icon/solid/interface-delete-bin-trash.svg +0 -1
- package/src/components/Icon/solid/interface-dots-horizontal.svg +0 -1
- package/src/components/Icon/solid/interface-dots-vertical.svg +0 -1
- package/src/components/Icon/solid/interface-edit-attachment.svg +0 -5
- package/src/components/Icon/solid/interface-edit-binocular.svg +0 -5
- package/src/components/Icon/solid/interface-edit-magic-wand.svg +0 -7
- package/src/components/Icon/solid/interface-edit-tool-eraser.svg +0 -1
- package/src/components/Icon/solid/interface-edit-tool-paint-brush.svg +0 -1
- package/src/components/Icon/solid/interface-edit-tool-paint-roller.svg +0 -5
- package/src/components/Icon/solid/interface-edit-tool-pen.svg +0 -5
- package/src/components/Icon/solid/interface-edit-tool-pencil.svg +0 -1
- package/src/components/Icon/solid/interface-edit-view-eye.svg +0 -7
- package/src/components/Icon/solid/interface-favorite-award.svg +0 -5
- package/src/components/Icon/solid/interface-favorite-flag.svg +0 -1
- package/src/components/Icon/solid/interface-favorite-heart.svg +0 -5
- package/src/components/Icon/solid/interface-favorite-star.svg +0 -5
- package/src/components/Icon/solid/interface-favorite-stars-shining.svg +0 -1
- package/src/components/Icon/solid/interface-favorite-stars-sparkles.svg +0 -1
- package/src/components/Icon/solid/interface-hierarchy-flowchart.svg +0 -5
- package/src/components/Icon/solid/interface-home-house.svg +0 -5
- package/src/components/Icon/solid/interface-hyperlink.svg +0 -5
- package/src/components/Icon/solid/interface-lighting-brightness.svg +0 -22
- package/src/components/Icon/solid/interface-lock-closed.svg +0 -5
- package/src/components/Icon/solid/interface-lock-open-unlock.svg +0 -1
- package/src/components/Icon/solid/interface-login-key.svg +0 -5
- package/src/components/Icon/solid/interface-search.svg +0 -5
- package/src/components/Icon/solid/interface-setting-cog.svg +0 -5
- package/src/components/Icon/solid/interface-share-megaphone-bullhorn.svg +0 -5
- package/src/components/Icon/solid/interface-share-rocket.svg +0 -1
- package/src/components/Icon/solid/interface-share-satellite.svg +0 -8
- package/src/components/Icon/solid/interface-share-space-ship.svg +0 -1
- package/src/components/Icon/solid/interface-share.svg +0 -5
- package/src/components/Icon/solid/interface-signal-square.svg +0 -5
- package/src/components/Icon/solid/interface-text-formatting-left-open-quote.svg +0 -1
- package/src/components/Icon/solid/interface-text-formatting-right-close-quote.svg +0 -1
- package/src/components/Icon/solid/interface-time-clock-circle.svg +0 -5
- package/src/components/Icon/solid/interface-time-hour-glass.svg +0 -1
- package/src/components/Icon/solid/interface-users-multiple.svg +0 -11
- package/src/components/Icon/solid/interface-validation-checkbox-square.svg +0 -5
- package/src/components/Icon/solid/interface-weather-moon.svg +0 -5
- package/src/components/Icon/solid/legal-justice-hammer-gavel.svg +0 -1
- package/src/components/Icon/solid/mail-chat-bubble-square.svg +0 -5
- package/src/components/Icon/solid/mail-send-email-paper-airplane.svg +0 -5
- package/src/components/Icon/solid/mail-send-envelope.svg +0 -1
- package/src/components/Icon/solid/mail-sign-hashtag.svg +0 -5
- package/src/components/Icon/solid/money-cashier-receipt.svg +0 -1
- package/src/components/Icon/solid/money-currency-dollar-pay.svg +0 -5
- package/src/components/Icon/solid/money-graph-arrow-increase.svg +0 -5
- package/src/components/Icon/solid/money-graph-bar-chart-increase.svg +0 -1
- package/src/components/Icon/solid/nature-ecology-leaf.svg +0 -5
- package/src/components/Icon/solid/phone-telephone.svg +0 -5
- package/src/components/Icon/solid/programming-bug.svg +0 -5
- package/src/components/Icon/solid/programming-cloud.svg +0 -4
- package/src/components/Icon/solid/programming-computer-database-server.svg +0 -5
- package/src/components/Icon/solid/programming-computer-database.svg +0 -5
- package/src/components/Icon/solid/programming-module-four-layout.svg +0 -1
- package/src/components/Icon/solid/programming-module-three.svg +0 -1
- package/src/components/Icon/solid/programming-module.svg +0 -1
- package/src/components/Icon/solid/programming-script-code.svg +0 -5
- package/src/components/Icon/solid/shopping-cart.svg +0 -1
- package/src/components/Icon/solid/shopping-gift-present.svg +0 -16
- package/src/components/Icon/solid/shopping-shipping-box-parcel-package.svg +0 -11
- package/src/components/Icon/solid/tag-new-circle.svg +0 -7
- package/src/components/Icon/solid/travel-map-earth-globe.svg +0 -5
- package/src/components/SearchModal.vue +0 -305
- package/src/components/Sidebar.vue +0 -293
- package/src/components/SidebarElement.vue +0 -133
- package/src/components/SidebarGroup.vue +0 -12
- package/src/components/SimpleTable/SimpleCell.vue +0 -47
- package/src/components/SimpleTable/SimpleHeader.vue +0 -17
- package/src/components/SimpleTable/SimpleRow.vue +0 -5
- package/src/components/SimpleTable/SimpleTable.vue +0 -13
- package/src/components/SimpleTable/index.ts +0 -4
- package/src/declarations/typographic-base.d.ts +0 -1
- package/src/helpers/generateAxiosCodeFromRequest.ts +0 -42
- package/src/helpers/generateLaravelCodeFromRequest.ts +0 -20
- package/src/helpers/index.ts +0 -5
- package/src/helpers/mapFromObject.ts +0 -11
- package/src/helpers/objectMerge.ts +0 -19
- package/src/helpers/specHelpers.ts +0 -62
- package/src/helpers/transformToJson.test.ts +0 -7
- package/src/helpers/transformToJson.ts +0 -22
- package/src/hooks/useRefOnMount.ts +0 -12
- package/src/index.ts +0 -9
- package/src/standalone.ts +0 -27
- package/src/stores/template.ts +0 -66
- package/src/stores/utility.ts +0 -23
- package/src/types.ts +0 -153
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { type ParamMap, useOperation } from '@scalar/api-client'
|
|
3
|
-
import { useKeyboardEvent } from '@scalar/use-keyboard-event'
|
|
4
|
-
import Fuse from 'fuse.js'
|
|
5
|
-
import { computed, nextTick, ref, toRef, watch } from 'vue'
|
|
6
|
-
|
|
7
|
-
import { extractRequestBody } from '../helpers/specHelpers'
|
|
8
|
-
import { useTemplateStore } from '../stores/template'
|
|
9
|
-
import type { Spec } from '../types'
|
|
10
|
-
import FlowModal, { useModalState } from './FlowModal.vue'
|
|
11
|
-
|
|
12
|
-
const props = defineProps<{ spec: Spec }>()
|
|
13
|
-
const reactiveSpec = toRef(props, 'spec')
|
|
14
|
-
const modalState = useModalState()
|
|
15
|
-
|
|
16
|
-
type FuseData = {
|
|
17
|
-
title: string
|
|
18
|
-
operationId?: string
|
|
19
|
-
description: string
|
|
20
|
-
body?: string | string[] | ParamMap
|
|
21
|
-
httpVerb?: string
|
|
22
|
-
path?: string
|
|
23
|
-
tag?: string
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
let fuseDataArray: FuseData[] = []
|
|
27
|
-
const searchResults = ref<Fuse.FuseResult<FuseData>[]>([])
|
|
28
|
-
const selectedSearchResult = ref<number>(0)
|
|
29
|
-
const searchText = ref<string>('')
|
|
30
|
-
const searchModalRef = ref<HTMLElement | null>(null)
|
|
31
|
-
|
|
32
|
-
const fuse = new Fuse(fuseDataArray, {
|
|
33
|
-
keys: ['title', 'description', 'body'],
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
const { state, setItem, setCollapsedSidebarItem } = useTemplateStore()
|
|
37
|
-
|
|
38
|
-
const fuseSearch = (): void => {
|
|
39
|
-
selectedSearchResult.value = 0
|
|
40
|
-
searchResults.value = fuse.search(searchText.value)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
watch(
|
|
44
|
-
() => state.showSearch,
|
|
45
|
-
() => {
|
|
46
|
-
if (state.showSearch) {
|
|
47
|
-
searchText.value = ''
|
|
48
|
-
selectedSearchResult.value = 0
|
|
49
|
-
searchResults.value = []
|
|
50
|
-
modalState.show()
|
|
51
|
-
} else {
|
|
52
|
-
modalState.hide()
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
watch(
|
|
58
|
-
() => modalState.open,
|
|
59
|
-
() => {
|
|
60
|
-
if (!modalState.open) {
|
|
61
|
-
setItem('showSearch', false)
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
async function openSearchResult(entry: Fuse.FuseResult<FuseData>) {
|
|
67
|
-
const tag = entry.item.tag
|
|
68
|
-
const operation = entry.item.operationId
|
|
69
|
-
|
|
70
|
-
if (!tag) {
|
|
71
|
-
return
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
setCollapsedSidebarItem(tag, true)
|
|
75
|
-
|
|
76
|
-
modalState.hide()
|
|
77
|
-
await nextTick()
|
|
78
|
-
|
|
79
|
-
const elementId = operation ? `endpoint/${operation}` : `tag/${tag}`
|
|
80
|
-
const element = document.getElementById(elementId)
|
|
81
|
-
element?.scrollIntoView()
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
watch(reactiveSpec.value, () => {
|
|
85
|
-
fuseDataArray = []
|
|
86
|
-
|
|
87
|
-
if (!props.spec.tags.length) {
|
|
88
|
-
fuse.setCollection([])
|
|
89
|
-
return
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// TODO: We need to go through the operations, not the tags. Spec files can have zero tags.
|
|
93
|
-
props.spec.tags.forEach((tag) => {
|
|
94
|
-
const tagData = {
|
|
95
|
-
title: tag.name,
|
|
96
|
-
description: tag.description,
|
|
97
|
-
tag: tag.name,
|
|
98
|
-
body: '',
|
|
99
|
-
}
|
|
100
|
-
fuseDataArray.push(tagData)
|
|
101
|
-
|
|
102
|
-
if (tag.operations) {
|
|
103
|
-
tag.operations.forEach((operation) => {
|
|
104
|
-
const { parameterMap } = useOperation({ operation })
|
|
105
|
-
const bodyData = extractRequestBody(operation) || parameterMap.value
|
|
106
|
-
let body = null
|
|
107
|
-
if (typeof bodyData !== 'boolean') {
|
|
108
|
-
body = bodyData
|
|
109
|
-
}
|
|
110
|
-
const operationData: FuseData = {
|
|
111
|
-
title: operation.name,
|
|
112
|
-
operationId: operation.operationId,
|
|
113
|
-
description: operation.description,
|
|
114
|
-
httpVerb: operation.httpVerb,
|
|
115
|
-
path: operation.path,
|
|
116
|
-
tag: tag.name,
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (body) {
|
|
120
|
-
operationData.body = body
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
fuseDataArray.push(operationData)
|
|
124
|
-
})
|
|
125
|
-
}
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
fuse.setCollection(fuseDataArray)
|
|
129
|
-
})
|
|
130
|
-
|
|
131
|
-
useKeyboardEvent({
|
|
132
|
-
element: searchModalRef,
|
|
133
|
-
keyList: ['enter'],
|
|
134
|
-
active: () => modalState.open,
|
|
135
|
-
handler: () => {
|
|
136
|
-
openSearchResult(
|
|
137
|
-
searchResultsWithPlaceholderResults.value[selectedSearchResult.value],
|
|
138
|
-
)
|
|
139
|
-
},
|
|
140
|
-
})
|
|
141
|
-
|
|
142
|
-
useKeyboardEvent({
|
|
143
|
-
element: searchModalRef,
|
|
144
|
-
keyList: ['ArrowDown'],
|
|
145
|
-
active: () => modalState.open,
|
|
146
|
-
handler: () => {
|
|
147
|
-
if (
|
|
148
|
-
selectedSearchResult.value <
|
|
149
|
-
searchResultsWithPlaceholderResults.value.length - 1
|
|
150
|
-
) {
|
|
151
|
-
selectedSearchResult.value++
|
|
152
|
-
} else {
|
|
153
|
-
selectedSearchResult.value = 0
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
})
|
|
157
|
-
|
|
158
|
-
useKeyboardEvent({
|
|
159
|
-
element: searchModalRef,
|
|
160
|
-
keyList: ['ArrowUp'],
|
|
161
|
-
active: () => modalState.open,
|
|
162
|
-
handler: () => {
|
|
163
|
-
if (selectedSearchResult.value > 0) {
|
|
164
|
-
selectedSearchResult.value--
|
|
165
|
-
} else {
|
|
166
|
-
selectedSearchResult.value =
|
|
167
|
-
searchResultsWithPlaceholderResults.value.length - 1
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
})
|
|
171
|
-
|
|
172
|
-
const searchResultsWithPlaceholderResults = computed(
|
|
173
|
-
(): Fuse.FuseResult<FuseData>[] => {
|
|
174
|
-
if (searchText.value.length === 0) {
|
|
175
|
-
return fuseDataArray.map((item) => {
|
|
176
|
-
return {
|
|
177
|
-
item: item,
|
|
178
|
-
} as Fuse.FuseResult<FuseData>
|
|
179
|
-
})
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return searchResults.value
|
|
183
|
-
},
|
|
184
|
-
)
|
|
185
|
-
</script>
|
|
186
|
-
<template>
|
|
187
|
-
<FlowModal :state="modalState">
|
|
188
|
-
<div ref="searchModalRef">
|
|
189
|
-
<input
|
|
190
|
-
v-model="searchText"
|
|
191
|
-
class="ref-search-input"
|
|
192
|
-
placeholder="Search …"
|
|
193
|
-
type="text"
|
|
194
|
-
@input="fuseSearch" />
|
|
195
|
-
</div>
|
|
196
|
-
<div v-if="searchResultsWithPlaceholderResults.length">
|
|
197
|
-
<button
|
|
198
|
-
v-for="(entry, index) in searchResultsWithPlaceholderResults"
|
|
199
|
-
:key="entry.refIndex"
|
|
200
|
-
class="item-entry"
|
|
201
|
-
:class="{
|
|
202
|
-
'item-entry--active': index === selectedSearchResult,
|
|
203
|
-
}"
|
|
204
|
-
type="submit"
|
|
205
|
-
@click="openSearchResult(entry)">
|
|
206
|
-
<div
|
|
207
|
-
v-if="entry.item.title || entry.item.operationId"
|
|
208
|
-
class="item-entry-title">
|
|
209
|
-
{{ entry.item.title || entry.item.operationId }}
|
|
210
|
-
</div>
|
|
211
|
-
<div
|
|
212
|
-
v-if="entry.item.httpVerb || entry.item.path"
|
|
213
|
-
class="item-entry-request">
|
|
214
|
-
<div
|
|
215
|
-
class="item-entry-http-verb"
|
|
216
|
-
:class="`item-entry-http-verb--${entry.item.httpVerb}`">
|
|
217
|
-
{{ entry.item.httpVerb }}
|
|
218
|
-
</div>
|
|
219
|
-
<div class="item-entry-path">
|
|
220
|
-
{{ entry.item.path }}
|
|
221
|
-
</div>
|
|
222
|
-
</div>
|
|
223
|
-
<div v-else-if="entry.item.description">
|
|
224
|
-
{{ entry.item.description }}
|
|
225
|
-
</div>
|
|
226
|
-
</button>
|
|
227
|
-
</div>
|
|
228
|
-
</FlowModal>
|
|
229
|
-
</template>
|
|
230
|
-
<style scoped>
|
|
231
|
-
/** Input */
|
|
232
|
-
.ref-search-input {
|
|
233
|
-
width: 100%;
|
|
234
|
-
background: transparent;
|
|
235
|
-
padding: 12px;
|
|
236
|
-
font-size: 13px;
|
|
237
|
-
outline: none;
|
|
238
|
-
border: 1px solid var(--theme-border-color);
|
|
239
|
-
border-radius: var(--theme-radius);
|
|
240
|
-
color: var(--theme-color-1);
|
|
241
|
-
font-weight: var(--theme-semibold);
|
|
242
|
-
font-size: var(--theme-font-size-3);
|
|
243
|
-
appearance: none;
|
|
244
|
-
margin-bottom: 12px;
|
|
245
|
-
}
|
|
246
|
-
.ref-search-input::-webkit-input-placeholder,
|
|
247
|
-
.ref-search-input::placeholder {
|
|
248
|
-
color: var(--theme-color-3);
|
|
249
|
-
font-family: var(--theme-font);
|
|
250
|
-
font-weight: var(--theme-regular);
|
|
251
|
-
}
|
|
252
|
-
/** Results */
|
|
253
|
-
.item-entry {
|
|
254
|
-
appearance: none;
|
|
255
|
-
background: transparent;
|
|
256
|
-
border: none;
|
|
257
|
-
outline: none;
|
|
258
|
-
padding: 6px 12px;
|
|
259
|
-
width: 100%;
|
|
260
|
-
font-size: var(--theme-font-size-3);
|
|
261
|
-
text-align: left;
|
|
262
|
-
border-radius: var(--theme-radius);
|
|
263
|
-
display: flex;
|
|
264
|
-
flex-direction: column;
|
|
265
|
-
gap: 6px;
|
|
266
|
-
}
|
|
267
|
-
.item-entry--active {
|
|
268
|
-
background: var(--theme-background-2);
|
|
269
|
-
box-shadow: 0 0 0 1px var(--theme-background-2);
|
|
270
|
-
}
|
|
271
|
-
.item-entry:hover {
|
|
272
|
-
background: var(--theme-background-2);
|
|
273
|
-
box-shadow: 0 0 0 1px var(--theme-background-2);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.item-entry-title {
|
|
277
|
-
font-weight: var(--theme-semibold);
|
|
278
|
-
}
|
|
279
|
-
.item-entry-request {
|
|
280
|
-
display: flex;
|
|
281
|
-
gap: 3px;
|
|
282
|
-
font-family: var(--theme-font-code);
|
|
283
|
-
}
|
|
284
|
-
.item-entry-http-verb {
|
|
285
|
-
text-transform: uppercase;
|
|
286
|
-
}
|
|
287
|
-
.item-entry-http-verb--post {
|
|
288
|
-
color: var(--theme-post-color);
|
|
289
|
-
}
|
|
290
|
-
.item-entry-http-verb--patch {
|
|
291
|
-
color: var(--theme-patch-color);
|
|
292
|
-
}
|
|
293
|
-
.item-entry-http-verb--get {
|
|
294
|
-
color: var(--theme-get-color);
|
|
295
|
-
}
|
|
296
|
-
.item-entry-http-verb--delete {
|
|
297
|
-
color: var(--theme-delete-color);
|
|
298
|
-
}
|
|
299
|
-
.item-entry-http-verb--put {
|
|
300
|
-
color: var(--theme-put-color);
|
|
301
|
-
}
|
|
302
|
-
.item-entry-path {
|
|
303
|
-
color: var(--theme-color-3);
|
|
304
|
-
}
|
|
305
|
-
</style>
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
generateRequest,
|
|
4
|
-
useApiClientRequestStore,
|
|
5
|
-
useApiClientStore,
|
|
6
|
-
useOperation,
|
|
7
|
-
} from '@scalar/api-client'
|
|
8
|
-
import { useKeyboardEvent } from '@scalar/use-keyboard-event'
|
|
9
|
-
import { useMediaQuery } from '@vueuse/core'
|
|
10
|
-
|
|
11
|
-
import { useTemplateStore } from '../stores/template'
|
|
12
|
-
import type { Operation, Spec } from '../types'
|
|
13
|
-
import FindAnythingButton from './FindAnythingButton.vue'
|
|
14
|
-
import SidebarElement from './SidebarElement.vue'
|
|
15
|
-
import SidebarGroup from './SidebarGroup.vue'
|
|
16
|
-
|
|
17
|
-
const props = defineProps<{ spec: Spec }>()
|
|
18
|
-
|
|
19
|
-
const { state, setActiveSidebar, toggleApiClient } = useApiClientStore()
|
|
20
|
-
|
|
21
|
-
const { setActiveRequest } = useApiClientRequestStore()
|
|
22
|
-
|
|
23
|
-
function showItemInClient(operation: Operation) {
|
|
24
|
-
const { parameterMap } = useOperation({ operation })
|
|
25
|
-
const item = generateRequest(
|
|
26
|
-
operation,
|
|
27
|
-
parameterMap.value,
|
|
28
|
-
props.spec.servers[0],
|
|
29
|
-
)
|
|
30
|
-
setActiveRequest(item)
|
|
31
|
-
toggleApiClient(item, true)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const scrollToEndpoint = (item: Operation) => {
|
|
35
|
-
setActiveSidebar(item.operationId)
|
|
36
|
-
if (state.showApiClient) {
|
|
37
|
-
showItemInClient(item)
|
|
38
|
-
}
|
|
39
|
-
document.getElementById(`endpoint/${item.operationId}`)?.scrollIntoView()
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const isMobile = useMediaQuery('(max-width: 1000px)')
|
|
43
|
-
|
|
44
|
-
const {
|
|
45
|
-
state: templateState,
|
|
46
|
-
setItem: setTemplateItem,
|
|
47
|
-
toggleCollapsedSidebarItem,
|
|
48
|
-
setCollapsedSidebarItem,
|
|
49
|
-
} = useTemplateStore()
|
|
50
|
-
|
|
51
|
-
useKeyboardEvent({
|
|
52
|
-
keyList: ['k'],
|
|
53
|
-
withCtrlCmd: true,
|
|
54
|
-
handler: () => setTemplateItem('showSearch', !templateState.showSearch),
|
|
55
|
-
})
|
|
56
|
-
</script>
|
|
57
|
-
<template>
|
|
58
|
-
<div class="sidebar">
|
|
59
|
-
<FindAnythingButton
|
|
60
|
-
v-if="!isMobile"
|
|
61
|
-
@click="setTemplateItem('showSearch', true)" />
|
|
62
|
-
<div class="pages custom-scroll custom-scroll-self-contain-overflow">
|
|
63
|
-
<SidebarGroup :level="0">
|
|
64
|
-
<template v-for="tag in spec.tags">
|
|
65
|
-
<SidebarElement
|
|
66
|
-
v-if="tag.operations?.length > 0"
|
|
67
|
-
:key="tag.name"
|
|
68
|
-
:hasChildren="true"
|
|
69
|
-
:isActive="false"
|
|
70
|
-
:item="{
|
|
71
|
-
uid: '',
|
|
72
|
-
title: tag.name.toUpperCase(),
|
|
73
|
-
type: 'Folder',
|
|
74
|
-
}"
|
|
75
|
-
:open="templateState.collapsedSidebarItems[tag.name]"
|
|
76
|
-
@select="() => toggleCollapsedSidebarItem(tag.name)"
|
|
77
|
-
@toggleOpen="toggleCollapsedSidebarItem(tag.name)">
|
|
78
|
-
<SidebarGroup :level="0">
|
|
79
|
-
<SidebarElement
|
|
80
|
-
v-for="operation in tag.operations"
|
|
81
|
-
:key="operation.operationId"
|
|
82
|
-
:isActive="state.activeSidebar === operation.operationId"
|
|
83
|
-
:item="{
|
|
84
|
-
uid: '',
|
|
85
|
-
title: operation.name || operation.path,
|
|
86
|
-
type: 'Page',
|
|
87
|
-
}"
|
|
88
|
-
@select="
|
|
89
|
-
() => {
|
|
90
|
-
setCollapsedSidebarItem(tag.name, true)
|
|
91
|
-
scrollToEndpoint(operation)
|
|
92
|
-
}
|
|
93
|
-
" />
|
|
94
|
-
</SidebarGroup>
|
|
95
|
-
</SidebarElement>
|
|
96
|
-
</template>
|
|
97
|
-
</SidebarGroup>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
</template>
|
|
101
|
-
|
|
102
|
-
<style>
|
|
103
|
-
.sidebar {
|
|
104
|
-
--theme-sidebar-indent-base: 6px;
|
|
105
|
-
/* prettier-ignore */
|
|
106
|
-
background: var(--sidebar-background-1, var(--theme-background-1));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* ----------------------------------------------------- */
|
|
110
|
-
/* Main sidebar styles */
|
|
111
|
-
|
|
112
|
-
.sidebar {
|
|
113
|
-
flex: 1;
|
|
114
|
-
height: 100%;
|
|
115
|
-
display: flex;
|
|
116
|
-
flex-direction: column;
|
|
117
|
-
/* prettier-ignore */
|
|
118
|
-
background: var(--sidebar-background-1, var(--theme-background-1));
|
|
119
|
-
--sidebar-level: 0;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.pages {
|
|
123
|
-
padding-top: 9px;
|
|
124
|
-
padding-bottom: 9px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.sidebar-group {
|
|
128
|
-
list-style: none;
|
|
129
|
-
width: 100%;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.sidebar-heading {
|
|
133
|
-
display: flex;
|
|
134
|
-
gap: 6px;
|
|
135
|
-
|
|
136
|
-
/* prettier-ignore */
|
|
137
|
-
color: var(--sidebar-color-2, var(--theme-color-2));
|
|
138
|
-
font-size: var(--theme-mini);
|
|
139
|
-
font-weight: var(--theme-semibold);
|
|
140
|
-
word-break: break-word;
|
|
141
|
-
line-height: 1.385;
|
|
142
|
-
display: flex;
|
|
143
|
-
align-items: center;
|
|
144
|
-
max-width: 100%;
|
|
145
|
-
position: relative;
|
|
146
|
-
cursor: pointer;
|
|
147
|
-
/* prettier-ignore */
|
|
148
|
-
border-radius: 0 var(--theme-radius-lg) var(--theme-radius-lg) 0;
|
|
149
|
-
flex: 1;
|
|
150
|
-
padding-right: 12px;
|
|
151
|
-
user-select: none;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/* Folder/page collapse icon */
|
|
155
|
-
.toggle-nested-icon {
|
|
156
|
-
border: none;
|
|
157
|
-
position: absolute !important;
|
|
158
|
-
left: 2px;
|
|
159
|
-
top: 50%;
|
|
160
|
-
transform: translateY(-50%);
|
|
161
|
-
color: currentColor;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.toggle-nested-icon:hover,
|
|
165
|
-
.toggle-nested-icon:focus-visible {
|
|
166
|
-
color: currentColor;
|
|
167
|
-
filter: drop-shadow(0 0.125px 0 currentColor)
|
|
168
|
-
drop-shadow(0 -0.125px 0 currentColor);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/* We indent each level of nesting further */
|
|
172
|
-
.sidebar-indent-nested .sidebar-heading {
|
|
173
|
-
/* prettier-ignore */
|
|
174
|
-
padding-left: calc((var(--sidebar-level) * var(--theme-sidebar-indent-base)) + 24px) !important;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* Collapse/expand icons must also be offset */
|
|
178
|
-
.sidebar-indent-nested .sidebar-heading .toggle-nested-icon {
|
|
179
|
-
/* prettier-ignore */
|
|
180
|
-
left: calc((var(--sidebar-level) * var(--theme-sidebar-indent-base)) + 2px) !important;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.sidebar-heading-link {
|
|
184
|
-
padding-right: 12px;
|
|
185
|
-
padding: 6px 0;
|
|
186
|
-
display: flex;
|
|
187
|
-
align-items: center;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/* Sidebar link icon */
|
|
191
|
-
.link-icon {
|
|
192
|
-
position: relative;
|
|
193
|
-
left: 4px;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.sidebar-icon {
|
|
197
|
-
display: flex;
|
|
198
|
-
align-items: center;
|
|
199
|
-
justify-content: center;
|
|
200
|
-
margin-right: 6px;
|
|
201
|
-
|
|
202
|
-
width: 13px;
|
|
203
|
-
height: 13px;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.sidebar-icon > svg {
|
|
207
|
-
width: 13px;
|
|
208
|
-
height: 13px;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.sidebar-heading:hover {
|
|
212
|
-
/* prettier-ignore */
|
|
213
|
-
color: var(--sidebar-color-1, var(--theme-color-1));
|
|
214
|
-
/* prettier-ignore */
|
|
215
|
-
background: var(--sidebar-item-hover-background, var(--theme-background-2));
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.active_page.sidebar-heading:hover,
|
|
219
|
-
.active_page.sidebar-heading,
|
|
220
|
-
.marc_active .sidebar-heading {
|
|
221
|
-
/* prettier-ignore */
|
|
222
|
-
background: var(--sidebar-item-active-background, var(--theme-background-accent)) !important;
|
|
223
|
-
/* prettier-ignore */
|
|
224
|
-
color: var(--theme-color-accent, var(--theme-background-accent)) !important;
|
|
225
|
-
}
|
|
226
|
-
.sidebar-group-item {
|
|
227
|
-
position: relative;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/* Change font colors and weights for nested items */
|
|
231
|
-
.sidebar-indent-nested .sidebar-heading {
|
|
232
|
-
/* prettier-ignore */
|
|
233
|
-
color: var(--sidebar-color-1, var(--theme-color-1));
|
|
234
|
-
}
|
|
235
|
-
.sidebar-indent-nested .sidebar-indent-nested .sidebar-heading {
|
|
236
|
-
/* prettier-ignore */
|
|
237
|
-
color: var(--sidebar-color-2, var(--theme-color-2));
|
|
238
|
-
}
|
|
239
|
-
.sidebar-indent-nested > div:has(.active_page) .sidebar-heading {
|
|
240
|
-
font-weight: var(--theme-bold);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.sidebar-mobile-header {
|
|
244
|
-
display: flex;
|
|
245
|
-
align-items: center;
|
|
246
|
-
gap: 12px;
|
|
247
|
-
height: 100%;
|
|
248
|
-
width: 100%;
|
|
249
|
-
padding: 0 6px;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.sidebar-mobile-breadcrumbs {
|
|
253
|
-
flex: 1;
|
|
254
|
-
min-width: 0;
|
|
255
|
-
overflow: hidden;
|
|
256
|
-
white-space: nowrap;
|
|
257
|
-
text-overflow: ellipsis;
|
|
258
|
-
font-size: var(--theme-small);
|
|
259
|
-
font-weight: var(--theme-semibold);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.sidebar-mobile-actions {
|
|
263
|
-
display: flex;
|
|
264
|
-
flex-direction: row;
|
|
265
|
-
gap: 4px;
|
|
266
|
-
height: 24px;
|
|
267
|
-
align-items: center;
|
|
268
|
-
padding: 0 4px;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.sidebar-mobile-actions .sidebar-mobile-darkmode-toggle {
|
|
272
|
-
height: 16px;
|
|
273
|
-
width: 16px;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
@media (max-width: 1000px) {
|
|
277
|
-
.sidebar {
|
|
278
|
-
min-height: 0;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.pages {
|
|
282
|
-
padding-top: 12px;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
@media (max-width: 500px) {
|
|
287
|
-
.header-item-link.header-item-active,
|
|
288
|
-
.sidebar-section,
|
|
289
|
-
.sidebar-heading {
|
|
290
|
-
font-size: var(--theme-micro);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
</style>
|