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