fumadocs-openapi 12.1.0 → 12.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/css/generated/shared.css +1 -1
  2. package/dist/.translations/index.d.ts +63 -17
  3. package/dist/.translations/keys.js +63 -17
  4. package/dist/operation.d.ts +6 -1
  5. package/dist/operation.js +2 -4
  6. package/dist/packages/shared-api/dist/components/select.js +8 -7
  7. package/dist/playground/auth.d.ts +13 -3
  8. package/dist/playground/auth.js +58 -46
  9. package/dist/playground/fetcher.d.ts +8 -0
  10. package/dist/playground/fetcher.js +30 -1
  11. package/dist/playground/index.d.ts +2 -1
  12. package/dist/playground/index.js +2 -1
  13. package/dist/playground/use-playground.d.ts +62 -0
  14. package/dist/playground/use-playground.js +140 -0
  15. package/dist/ui/components/endpoint.js +37 -0
  16. package/dist/ui/operation/index.js +6 -14
  17. package/dist/ui/playground/client.d.ts +9 -26
  18. package/dist/ui/playground/client.js +150 -390
  19. package/dist/ui/playground/components/fields.js +693 -0
  20. package/dist/ui/playground/components/oauth-panel.js +182 -0
  21. package/dist/ui/playground/components/request-panel.js +480 -0
  22. package/dist/ui/playground/components/response-panel.js +150 -0
  23. package/dist/ui/playground/components/result-display.d.ts +1 -0
  24. package/dist/ui/playground/components/result-display.js +187 -147
  25. package/dist/ui/playground/components/segmented.js +21 -0
  26. package/dist/ui/playground/components/server-select.js +100 -89
  27. package/dist/ui/playground/components/url-bar.js +96 -0
  28. package/dist/ui/playground/status-info.js +32 -45
  29. package/dist/utils/document/load.js +1 -1
  30. package/package.json +10 -10
  31. package/dist/packages/shared-api/dist/components/collapsible.d.ts +0 -7
  32. package/dist/packages/shared-api/dist/components/collapsible.js +0 -16
  33. package/dist/packages/shared-api/dist/components/dialog.js +0 -55
  34. package/dist/packages/shared-api/dist/components/input.js +0 -14
  35. package/dist/packages/shared-api/dist/components/label.js +0 -11
  36. package/dist/packages/shared-api/dist/components/playground/inputs.js +0 -439
  37. package/dist/ui/playground/components/oauth-dialog.js +0 -259
@@ -1 +1 @@
1
- @source inline("!isDefined *:data-[collapsible=true]:order-last *:min-w-0 --- --accordion-panel-height --anchor-width --available-height --available-width --collapsible-panel-height --fd-docs-row-1 --min-height --spacing --transform-origin -mode -ms-2 -mx-3 -translate-x-1/2 -translate-y-1/2 @4xl:flex-row @4xl:items-start @4xl:sticky @4xl:top-[calc(var(--fd-docs-row-1,2rem)+1rem)] @4xl:w-[400px] @container @default @fuma-translate/react @fumadocs/json-schema @fumari/stf @md:grid-cols-2 @param @private @returns @scalar/api-client-react @see @typescript-eslint/no-explicit-any [&[hidden]:not([hidden='until-found'])]:hidden [&_svg]:size-3.5 a absolute accept access access_token accordion actual adapter adapters additionalProperties again against alias align allFlows allOf allow already alt always an anchor anchorIdStartsWith anchorSegments and animate-spin anyFields anyOf apiExample apiKey apiPlayground applicable application/javascript application/json application/x-javascript application/x-www-form-urlencoded application/xml apply are aria-label aria-live arkdown array as asSchema async at audience auth auth-specific authCodeQuery authNode authSchemes authorization authorizationCode authorizationUrl authorization_code authorize authorizes autoComplete avoid await back backdrop-blur-lg backdrop-blur-sm badgeVariants base baseDir basic be because before behavior belong bg-black/30 bg-fd-background/50 bg-fd-card bg-fd-muted bg-fd-popover bg-fd-popover/60 bg-fd-primary bg-fd-primary/10 bg-fd-secondary bg-transparent binary blob block blocks blue body bodyMediaType bodyNode boolean border border-0 border-b border-current border-fd-primary/20 border-s border-t border-y bottom break-all buffer built-in bundled button buttonVariants by byteLength bytes cache cached cachedDocFiles callbacks callbacksNode can cannot case catch center change charset children class-variance-authority className cleanup client clientAuth clientAuthMethods clientCredentials clientHeight clientId clientSecret client_auth client_credentials client_error client_id client_secret cloned closed cn code codeProps codeUsages codeblock col-span-full collapsible color compiler components configuration const content contentType contentTypes cookie cookies copying core createContext createOAuthHandler createOpenAPIPageBase createProxy credentials css csv ctx current currentValue custom customise customization cva dark dark:text-blue-400 dark:text-green-400 dark:text-orange-400 dark:text-red-400 dark:text-yellow-400 data data-[closed]:animate-fd-popover-out data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[highlighted]:bg-fd-accent data-[highlighted]:text-fd-accent-foreground data-[open]:animate-fd-popover-in data-[open]:border-b-0 data-[popup-open]:text-fd-accent-foreground data-closed:animate-fd-dialog-out data-closed:animate-fd-fade-out data-collapsible data-ending-style:h-0 data-ending-style:opacity-0 data-object-search-input data-open:animate-fd-dialog-in data-open:animate-fd-fade-in data-placeholder:text-fd-muted-foreground data-starting-style:h-0 data-starting-style:opacity-0 data-type dataEngine decoded default defaultMdxComponents defaultOpen defaultShikiFactory defaultShikiOptions defaultValue defaultValues defaults deferredValue define definitions delete deprecated depth dereference dereferenced description descriptionNode development deviceAuthorization dialog didn disable disableCache disabled disabled:cursor-not-allowed disabled:opacity-50 display displayNames div do doc docCache docFilesCache docRoot docs document documents domain downloaded drives duplicated duration-200 during dynamic dynamicSource e eading ease-out element else empty empty:hidden enabled encode encodeRequestData encoded end end-2 endpoint enforce engine ensure entries entry enum error eslint-disable eslint-disable-next-line example exampleId examples export exported extends fallback false fast-content-type-parse fd-page-tree-item-name fd-scroll-container fetch fetcher field fieldData fieldLabelVariants fieldName fields file filePath files filtered fine first first:border-t-0 firstItemRef fixed flex flex-1 flex-col flex-col-reverse flex-row flex-wrap flow flows focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-fd-ring focus-within:[&_svg]:text-fd-primary focus-within:ring focus-within:ring-2 focus-within:ring-fd-ring focus:outline-none focus:ring focus:ring-0 focus:ring-fd-ring folder folderStyle font-medium font-mono font-normal font-semibold for form form-encoded formData format fragment from fs full fumadocs-core/source fumadocs-core/toc fumadocs-openapi-oauth fumadocs-ui/mdx fumadocs:openapi fumadocs_openapi_requests fumadocs_openapi_responses function gap-0.5 gap-1 gap-1.5 gap-2 gap-2.5 gap-24 gap-3 gap-4 gap-6 gap-x-4 gap-x-6 gap-y-1 gap-y-4 generate generateDefault generateSchemaUI generated get getOpenAPIPageProps getSchema getSchemas getWatchPaths ghost github-dark github-light given go grant_type gray green grid grid-cols-1 grid-cols-[auto_1fr] group group-data-[panel-open]/accordion:rotate-90 group-data-[panel-open]:rotate-180 group/accordion groupId h-(--accordion-panel-height) h-(--collapsible-panel-height) h-10 h-9 h-[240px] h-px h1 hash hast-util-to-jsx-runtime have headNode header headers heading headingLevel headless hidden hiddenProperties highlighted highlighter holding hook hover:bg-fd-accent hover:text-fd-accent-foreground hover:underline how href html htmlFor http hydration i icon icon-sm icon-xs id idx if ignore img implicit import imports in in-popover index indexItemMatch info infoTags init initial inline-flex input inputs inset-0 inside installed instanceof instead integer interface internal into invalid is isDefined isDuplicated isDynamic isLazy isLoading isMounted isNumber isRequired issues it item items items-center items-start its j js json json-schema-typed justify-between justify-center keep key keyed keyof kind label labelClassName lang last last:border-b-0 last:mb-0 lazy leading-none leave left left-1/2 length let light like line-through link links list list-disc list-inside listed load loadDocument loaderPlugin localStorage location lucide-react map mapValues marker:text-fd-muted-foreground matching max-age max-h-(--available-height) max-h-[460px] max-w-(--available-width) max-w-[98vw] max-w-full max-w-lg may mb-1 mb-2 mb-auto md mdxComponents me-auto media mediaAdapters mediaType member merge mergeRefs message meta metaData method methods mime min-h-(--min-height,200px) min-w-0 min-w-[240px] min-w-[calc(var(--anchor-width)+--spacing(2))] modify mounted ms-auto mt-0! mt-10 mt-2 mt-3 multipart/form-data multiple must mx-1 my-0! my-1 my-1.5 my-2 my-2! my-4 name name! named namespace navigating navigation needs nested never new no no-cache node node:fs node:path noop normalizes not not-last:pb-0 not-prose note null number oauth2 oauthRedirectUrl object objectSearchOverrides objectSet objects of off omit on onChange onClick onCopy onKeyDown onOpenChange onScrollEnd onSubmit onValueChange one oneOf ones only opacity-80 open openApiData openIdConnect openapi openapiMeta opened opens operation options or orange order-last origin origin-(--transform-origin) other out outline outline-none output over overflow-auto overflow-hidden overflow-x-auto overflow-y-auto overflow-y-hidden p-1 p-1.5 p-2 p-3 p-4 packages page pageData pages panelVariants param parameter parameterLabel parameterNode parameters params parent parentPathIndex parents parsed part parts party pass password path pathIndex pathItem pathName pathnameFromRequest pattern patternProperties payload pb-0 pb-2 pe-2 pe-3 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 pending pendingFlowKey persist persisted picked place placeholder placeholder:text-fd-muted-foreground playground playgrounds please plugins polite popover popoverRef positions pre preloadOpenAPIPage preloaded preventScroll previous primitive processor properties property props prose prose-no-margin prose-sm proxy proxyForwardCookie proxyUrl ps-1 ps-2 ps-3 ps-4.5 ps-6 pt-0 pt-1 pt-2 pt-2.5 px px-1 px-2 px-3 px-4 py-0 py-0.5 py-1 py-1.5 py-2 py-4 query querySelector quiet random raw rawSearch re-triggering react react-hooks/exhaustive-deps react/jsx-runtime read readOnly readonly record red redirect redirectUrl redirect_uri ref reference refs regenerated rehype-react relative relativePath remark remark-rehype remarkGfm remarkRehype remove removeItem removing render renderBodyField renderCodeblock renderMarkdown renderParameterField renderPopoverTrigger renderTrigger rendered renderers renders replace represents request request-body requestBody requestData requestInit requestTimeout requestUrl requests required requirement requirements res reset resize-none resolve resolveMediaAdapter resolveUrl resolved resolvedInput resolvedTheme response response-body responseNode responseTabs response_type responses rest restored result return returning returns role root rootId roots rotate-90 rounded-2xl rounded-b-none rounded-lg rounded-md rounded-sm rounded-t-md rounded-xl route s-highlight safeParse same satisfies scalar scan schema schemaId schemaPropKeys schemaUI scheme schemeId schemes scope scopes scroll scroll-m-20 scrollTop scrollTops search secondary seconds secret section sections security see segments segs select select-none selected selectedType selections selector send sends sep separator server server-to-server serverSchema serverUrl services sessionStorage set setClientAuth setError setInfo setIsJson setNextName setObjectUrl setOpen setPath setSearch setSelected setServerVariables setShow setStore setToken setType setValue shadow-lg shadow-md shadow-sm shared shiki shikiOptions show showDescription showExample showResponseSchema showSelect showTitle showing shrink-0 side sideOffset signal single size size-3.5 size-4 skipNonRequired skipReadOnly slot slotType slots sm sm:flex-row sm:gap-2 sm:justify-end sm:text-start smooth so some sr-only src stable start started state staticSource status statusInfo step stf stfSync sticky still storageKey store stored string stringify stringifyFieldKey structuredData styles submit such supported svg switch t tab tabDepth tabValues tabs tag target testQuery text text-[0.8125rem] text-blue-600 text-center text-end text-fd-card-foreground text-fd-foreground text-fd-muted-foreground text-fd-muted-foreground/70 text-fd-popover-foreground text-fd-primary text-fd-primary-foreground text-fd-secondary-foreground text-green-500 text-green-600 text-lg text-nowrap text-orange-400 text-orange-600 text-red-400 text-red-400/80 text-red-500 text-red-600 text-sm text-start text-xs text-yellow-600 text/css text/csv text/html text/plain that the their them themes they this through throw timeout timerRef tips title to toJsxRuntime toStaticData toc token tokenInfo tokenUrl token_type token_url toolbar top top-0 top-1/2 top-10 top-2 tracking-tight transform transformPageTree transition-[height,opacity] transition-[height] transition-colors transition-transform translations tree trigger true truncate try ts type typeVariants typeof types unchanged undefined under underline unexpected union unionField unions unknown unlisted unselected up update updateInfo updated updatedSchemeId updating url usageTabs use useAnchorId useApiClient useComponents useCopyButton useFieldValue useListener useMemo useNamespace useObject useOnChange useOpenAPI useOperation usePlaygroundAuth useQuery useRef useRenderContext useResponseExamples useServer useState useStatusInfo useStf useSyncExternalStore useTheme useTranslations useTypeScriptDefinitions used username users using utf-8 v value valueSchema values variable variables variant variants via view virtual void w-0 w-14 w-[600px] w-fit w-full warn was we webhook webhooks when where will with without won wrap-break-word wrapping write writeOnly x-exclusiveCodeSample x-playground-lazy xml yellow you your z-20 z-50");
1
+ @source inline("!isDefined !readOnly !renderBodyField !required !supported *:data-[collapsible=true]:order-last *:flex-1 *:justify-center *:min-w-0 --- --accordion-panel-height --active-tab-height --active-tab-left --active-tab-top --active-tab-width --anchor-width --available-height --available-width --collapsible-panel-height --fd-docs-row-1 --min-height --spacing --transform-origin -mode -ms-0.5 -mx-3 -translate-x-1/2 -translate-y-1/2 -z-1 @4xl:flex-row @4xl:items-start @4xl:sticky @4xl:top-[calc(var(--fd-docs-row-1,2rem)+1rem)] @4xl:w-[400px] @container @default @deprecated @fuma-translate/react @fumadocs/json-schema @fumari/stf @max-sm:bg-fd-secondary/50 @max-sm:border @max-sm:empty:w-2 @max-sm:mx-4 @max-sm:overflow-hidden @max-sm:pb-1.5 @max-sm:pb-3 @max-sm:pe-2 @max-sm:rounded-lg @md:block @md:grid-cols-2 @param @private @returns @scalar/api-client-react @see @sm:-me-2 @sm:-me-2.5 @sm:border-s @sm:grid-cols-[minmax(9rem,1fr)_minmax(0,2fr)] @sm:min-h-10 @sm:pe-7.5 @sm:pe-8 @typescript-eslint/no-explicit-any [&[hidden]:not([hidden='until-found'])]:hidden [&_*]:inline [&_a]:underline [&_code]:font-mono [&_svg]:size-3 [&_svg]:size-3.5 [grid-area:1/1] [scrollbar-width:none] a above absolute accept access access_token accordion actions active:scale-[0.97] actual adapter adapters added additionalProperties after again against alias align all allOf allow allowJson already alt always among an anchor anchorIdStartsWith anchorSegments and animate-spin animates any anyFields anyOf anyway apiExample apiKey apiPlayground appearance-none applicable application/javascript application/json application/x-javascript application/x-www-form-urlencoded application/xml applies apply are aria-checked aria-current aria-label aria-live aria-pressed aria-pressed:bg-fd-background aria-pressed:ring-1 aria-pressed:ring-fd-border aria-pressed:shadow-sm aria-pressed:text-fd-foreground arkdown array arrow as asSchema async at audience auth authCodeQuery authNode authSchemes authorization authorizationCode authorizationUrl authorization_code authorization_url authorize authorizes autoComplete avoid await back backdrop-blur-[1px] backdrop-blur-lg backdrop-blur-sm backdrop-blur-xs background badgeVariants bar base baseDir basic be before behavior belong bg-amber-500 bg-amber-500/10 bg-black/30 bg-black/40 bg-blue-500 bg-current/10 bg-fd-background bg-fd-background/50 bg-fd-card bg-fd-card/70 bg-fd-muted bg-fd-popover bg-fd-popover/60 bg-fd-primary bg-fd-primary/10 bg-fd-secondary bg-green-500 bg-linear-to-b bg-linear-to-t bg-red-500 bg-transparent binary block blocks blue body bodyMediaType bodyNode bodyUrlRef boolean border border-0 border-b border-current border-fd-muted-foreground/50 border-fd-primary border-fd-primary/20 border-s border-t bottom bottom-0 box break-all built-in bundled but button buttonVariants by bytes cache cached cachedDocFiles callbacks callbacksNode can candidates cannot case catch cell center ch change changes charset check checkbox checked children class class-variance-authority className cleanup clearResponse click client clientAuth clientCredentials clientHeight clientId clientSecret client_auth client_credentials client_error client_id client_secret cloned closeDelay closed cn code codeProps codeUsages codeblock col-span-full collapsible color compiler components compute configuration const constraints content contentTypes control cookie cookies copying core count createContext createOAuthHandler createOpenAPIPageBase createProxy credentials cross-origin crumbClassName css csv ctx current currentValue cursor-pointer custom customise customization cva dark dark:aria-pressed:bg-fd-accent dark:bg-fd-accent dark:text-amber-400 dark:text-blue-400 dark:text-green-400 dark:text-orange-400 dark:text-red-400 dark:text-yellow-400 data data-[closed]:animate-fd-popover-out data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[highlighted]:bg-fd-accent data-[highlighted]:text-fd-accent-foreground data-[open]:animate-fd-popover-in data-[open]:border-b-0 data-[popup-open]:text-fd-accent-foreground data-active:text-fd-foreground data-closed:animate-fd-dialog-out data-closed:animate-fd-fade-out data-collapsible data-ending-style:duration-150 data-ending-style:h-0 data-ending-style:opacity-0 data-ending-style:scale-95 data-ending-style:scale-[0.98] data-object-search-input data-open:animate-fd-dialog-in data-open:animate-fd-fade-in data-placeholder:text-fd-muted-foreground data-popup-open:bg-fd-accent data-popup-open:text-fd-accent-foreground data-popup-open:text-fd-foreground data-starting-style:h-0 data-starting-style:opacity-0 data-starting-style:scale-95 data-starting-style:scale-[0.98] dataEngine decimal declare decode decoded default defaultMdxComponents defaultShikiFactory defaultShikiOptions defaultValue defaultValues defaults deferredValue define definitions delay delay-150 delete deprecated depth dereference dereferenced description descriptionNode descriptions development deviceAuthorization dialog didn directories disable disableCache disabled disabled:cursor-not-allowed disabled:opacity-50 disabled:opacity-80 display displayNames disposition div do doc docCache docFilesCache docRoot docs document documented documents does doesn domain download downloaded drives duplicated duration duration-150 duration-200 duration-250 during dynamic dynamicSource e eading ease-[cubic-bezier(0.16,1,0.3,1)] ease-out edge edited editor edits element elements else empty empty:hidden enabled encode encodeRequestData encoded end end-2 endpoint enforce engine ensure entries entry enum err error eslint-disable eslint-disable-next-line even example examples exclusiveMax exclusiveMin export exported extended extends fades fallback false fast-content-type-parse fd-page-tree-item-name fd-scroll-container fetch fetchOptions fetcher field field-sizing-content fieldData fieldLabelVariants fieldName fields file fileName filePath files fill-current filling fills filtered first first:border-t-0 firstItemRef fixed flex flex-1 flex-col flex-col-reverse flex-row flex-wrap flow flowInfo flowReturned flows focus-visible:bg-fd-accent focus-visible:bg-fd-primary/15 focus-visible:bg-fd-secondary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-2 focus-visible:ring-fd-primary/30 focus-visible:ring-fd-ring focus-visible:ring-fd-ring/50 focus-visible:ring-fd-ring/60 focus-visible:ring-inset focus-within:[&_svg]:text-fd-primary focus-within:ring-2 focus-within:ring-fd-ring focus:outline-none focus:ring focus:ring-0 focus:ring-fd-ring folder folderStyle follow font-light font-medium font-mono font-normal font-sans font-semibold for form form-encoded format forward fragment from from-fd-popover fs full fumadocs-core/source fumadocs-core/toc fumadocs-openapi-oauth fumadocs-ui/mdx fumadocs:openapi fumadocs_openapi_requests fumadocs_openapi_responses function gap-0.5 gap-1 gap-1.5 gap-2 gap-2.5 gap-24 gap-3 gap-4 gap-x-3 gap-x-6 gap-y-1 gap-y-4 generate generateDefault generateSchemaUI generated get getOpenAPIPageProps getPreferredType getSchema getSchemas getWatchPaths ghost github-dark github-light given go goes going grant_type gray green grid grid-cols-1 grid-cols-[auto_minmax(0,1fr)] grid-cols-[minmax(0,2fr)_minmax(0,3fr)] group group-data-[panel-open]/accordion:rotate-90 group-data-popup-open:rotate-180 group-hover/nav:translate-x-0.5 group-hover:translate-x-px group/accordion group/nav group/row groupId h-(--accordion-panel-height) h-(--active-tab-height) h-(--collapsible-panel-height) h-10 h-12 h-5 h-6 h-7 h-8 h-9 h-[240px] h-auto h-full h-px h1 has has-focus-visible:bg-fd-secondary has-focus-visible:ring-1 has-focus-visible:ring-fd-ring/60 has-focus-visible:ring-inset hasSecret hash hast-util-to-jsx-runtime have headNode header headers heading headingLevel headless here hidden hiddenKeys hiddenProperties highlighted highlighter hint holding holds hook hover hover:bg-fd-accent hover:bg-fd-accent/40 hover:bg-fd-primary/15 hover:bg-transparent hover:text-fd-accent-foreground hover:text-fd-foreground hover:underline how href html htmlFor http hydration i icon icon-sm icon-xs iconButtonClassName id idx if ignore img implicit import imports in in-popover including index indexItemMatch indicator info infoTags init initAuth initial inline inline-flex input inputMode inputs inset-0 inset-x-0 inside installed instanceof instead integer interface internal into invalid invisible is isDefined isDuplicated isDynamic isLazy isLoading isMac isNumber isRequired isSending issues it item itemSchema items items-baseline items-center items-start items-stretch its itself j js json json-schema-typed justify-between justify-center justify-end kB keep keeping key keyed keyof keys kind label labelClassName labelled lang last last:border-b-0 last:mb-0 last:shrink-0 lazy leading-none leading-relaxed leave left left-0 left-1/2 length let light like line-through link links list list-disc list-inside listed listen listener listeners load loadDocument loaderPlugin loading localStorage location long lucide-react map mapValues marked marker:text-fd-muted-foreground match matching max max-age max-h-(--available-height) max-h-[460px] max-h-[min(18rem,30vh)] max-h-none max-md:hidden max-w-(--available-width) max-w-1/2 max-w-40 max-w-60 max-w-64 max-w-[98vw] max-w-[calc(100vw-2rem)] max-w-full max-w-lg may mb-2 mb-3 mb-auto md md:border-s md:grid-cols-[minmax(0,11fr)_minmax(0,9fr)] md:hidden mdxComponents me-1 me-auto media mediaAdapters mediaType member members merge mergeRefs message meta metaData metaKey method methods milliseconds mime min min-h-(--min-height,200px) min-h-0 min-h-10 min-h-11 min-h-60 min-h-9 min-h-full min-w-0 min-w-16 min-w-[240px] min-w-[calc(var(--anchor-width)+--spacing(2))] mode motion motion-reduce:transition-none motion-reduce:transition-opacity motion-safe:-translate-x-6 motion-safe:duration-300 motion-safe:ease-[cubic-bezier(0.16,1,0.3,1)] motion-safe:starting:-translate-x-6 motion-safe:starting:-translate-y-4 motion-safe:starting:opacity-0 motion-safe:starting:scale-0 motion-safe:starting:translate-x-6 motion-safe:starting:translate-y-1 motion-safe:starting:translate-y-4 motion-safe:transition-[opacity,translate] motion-safe:transition-opacity motion-safe:transition-transform motionClassNames mounted ms ms-auto mt-0! mt-0.5 mt-1 mt-1.5 mt-10 mt-2 mt-2.5 mt-3 multipart/form-data multiple must mx-1 mx-3 mx-px my-0 my-0! my-1 my-1.5 my-2 my-2! my-4 name name! named namespace nav navigating navigation navigator needs nested never new next next/previous no no-cache noValidate node node:fs node:path noop normalizes not not-prose note null number oauth oauth2 oauthRedirectUrl object objectSearchOverrides objectSet objects obtain of off omit on onAppend onAuthorized onBack onChange onCheckedChange onClick onCopy onKeyDown onNavigate onOAuth onOpenChange onRemove onReset onRoot onScrollEnd onSelect onSubmit onToken onValueChange one oneOf ones only opacity-0 opacity-80 open openApiData openIdConnect openOnHover openapi openapiMeta opened opening opens operation options or orange order-last origin origin-(--transform-origin) other otherwise out outline outline-none output over overflow-auto overflow-hidden overflow-x-auto overflow-y-auto overflow-y-hidden overview own p-0 p-0.5 p-1 p-1.5 p-2 p-2.5 p-3 p-4 p-6 packages padding page pageData pages panel panelCodeBlock panels param parameter parameterLabel parameterNode parameters params parent parentPathIndex parents parsed part parts party pass password path pathIndex pathItem pathName pathnameFromRequest pattern patternProperties payload pb-0 pb-1 pb-2 pb-3 pe-1 pe-1.5 pe-2 pe-3 pe-4 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 pending pendingFlowKey persisted picked pill placed placeholder placeholder:text-fd-muted-foreground placeholder:text-fd-muted-foreground/70 placeholder:text-fd-primary/50 playground playgrounds please plugins polite popover popoverRef position positions pre preferred prefers preloadOpenAPIPage preloaded prev preventScroll preview previous primary primitive processor properties property props prose prose-no-margin prose-sm proxy proxyForwardCookie proxyUrl ps-1 ps-1.5 ps-2 ps-3 ps-3.5 ps-4 ps-4.5 ps-6 pt-0 pt-1.5 pt-2 pt-2.5 px px-1 px-1.5 px-2 px-2.5 px-3 px-4 py-0 py-0.5 py-1 py-1.5 py-2 py-2.5 py-3 py-4 query querySelector quiet random range raw rawSearch re-triggering react react-hooks/exhaustive-deps react/jsx-runtime read read-only readOnly readonly record red redirect redirectUrl redirect_uri redirected redirects ref reference refs regenerated rehype-react relative relativePath remark remark-rehype remarkGfm remarkRehype removable removal remove removeItem removed removing render renderBodyField renderCodeblock renderMarkdown renderParameterField renderPopoverTrigger renderTrigger rendered renderers renders replace represents request request-body requestBody requestData requestInit requestTimeout requestUrl requested requests required requirement requirements res reserved reset resize-none resolve resolveMediaAdapter resolveUrl resolved resolvedInput resolvedTheme response response-body responseNode responseTabs response_type responses rest restored result return returned returning returns revoked right ring-1 ring-fd-border role root rootId roots rotate-90 rounded rounded-2xl rounded-[5px] rounded-full rounded-lg rounded-md rounded-none rounded-sm rounded-xl route row rowButtonClassName rows s s-highlight safeParse same satisfies scalar scan schema schemaId schemaKeys schemaPropKeys schemaUI scheme schemeId schemes scope scopeOptions scopes scroll scroll-m-20 scrollArrowClassName scrollTop scrollTops search secondary seconds secret section sectionIcons sectionNames sections security see segments segs select select-none selected selectedType selections selector selectors selects send sends sep separator server server-to-server serverSchema serverUrl services sessionStorage set setClientAuth setCode setDraft setError setInfo setMode setMotion setName setNextName setOAuth setOpen setOrigin setPath setResponse setScopes setSearch setSelected setSending setServerVariables setShow setStack setStore setType setValue setView shadow-lg shadow-md shadow-none shadow-sm shared shiki shikiOptions show showDescription showExample showResponseSchema showSelect showTitle showing shown shrink shrink-0 sibling siblings side sideOffset signal single size size-2 size-3 size-3.5 size-4 size-5 skipNonRequired skipReadOnly sliding slot slotClassName slotType slots sm sm:-translate-x-1/2 sm:-translate-y-1/2 sm:border sm:flex-row sm:gap-2 sm:h-[min(52rem,calc(100dvh-3rem))] sm:inline sm:inset-auto sm:justify-end sm:left-1/2 sm:mb-4 sm:mx-4 sm:ps-5 sm:px-4 sm:rounded-2xl sm:shadow-2xl sm:text-start sm:top-1/2 sm:w-[min(80rem,calc(100vw-3rem))] smooth so some something spellCheck sr-only src stable stack stacked start started starting starting:opacity-0 state staticSource status statusInfo stays step stf sticky still storageKey store stored string stringify stringifyFieldKey structuredData style styles submit subscribe such supported svg switch switches sync syncExample synced t tPlayground tab tabDepth tabValues tables tabs tabular-nums tag takes target tell text text-4xl text-[0.8125rem] text-amber-600 text-blue-600 text-center text-end text-fd-card-foreground text-fd-foreground text-fd-muted-foreground text-fd-muted-foreground/60 text-fd-muted-foreground/70 text-fd-popover-foreground text-fd-primary text-fd-primary-foreground text-fd-primary-foreground/60 text-fd-secondary-foreground text-green-600 text-lg text-nowrap text-orange-400 text-orange-600 text-red-400 text-red-400/80 text-red-600 text-sm text-start text-xs text-yellow-600 text/css text/csv text/html text/plain that the their them themes then they this through throw timeout timer timerRef tips title to to-transparent toJsxRuntime toStaticData toc toggled token tokenInfo tokenUrl token_type token_url tokens toolbar top top-(--active-tab-top) top-0 top-1/2 top-10 top-2 tracking-tight transform transformAuthInputs transformPageTree transition-[background-color,scale] transition-[height,opacity] transition-[height] transition-[opacity,scale] transition-[translate,width] transition-colors transition-opacity transition-transform transitionClassName translate-x-(--active-tab-left) translations tree trigger true truncate try ts type typeClassName typeVariants typeof types unchanged undefined under underline unexpected union unionField unions unique unit unknown unlisted unselected unset up update updateInfo updated updating url usageTabs usages use useAnchorId useApiClient useComponents useCopyButton useFieldValue useListener useMemo useNamespace useObject useOnChange useOpenAPI useOperation usePlaygroundAuth useQuery useRef useRenderContext useResolvedSchema useResponseExamples useServer useState useStatusInfo useStf useSyncExternalStore useTheme useTranslations useTypeScriptDefinitions used username users using v value valueSchema values variable variables variant variants via view viewportProps virtual void w-(--active-tab-width) w-0 w-7 w-72 w-[600px] w-[min(26rem,calc(100vw-2rem))] w-auto w-fit w-full warn was we webhook webhooks when where while whitespace-pre width will with without won would wrap-break-word wrapping write writeOnly x-exclusiveCodeSample x-playground-lazy xml yellow you your z-0 z-10 z-20 z-50");
@@ -1,45 +1,64 @@
1
1
  //#region src/.translations/index.d.ts
2
2
  export type Translations = {
3
- "Access Token(playground)": string;
3
+ "1 item(playground)": string;
4
+ "Accepted(playground status info)": string;
5
+ "Add Item(playground)": string;
6
+ "Add(playground)": string;
4
7
  "Authenticate using username and password.(OAuth dialog)": string;
5
8
  "Authenticate with 3rd party services(OAuth dialog)": string;
6
9
  "Authenticate with device.(OAuth dialog)": string;
7
10
  "Authorization code(OAuth dialog)": string;
8
- "Authorization(OAuth dialog)": string;
9
11
  "Authorization(operation page)": string;
10
12
  "Authorization(playground)": string;
11
13
  "Authorization(security scheme)": string;
14
+ "Authorize(OAuth dialog)": string;
12
15
  "Authorize(playground)": string;
16
+ "Back(playground)": string;
17
+ "Bad Gateway(playground status info)": string;
13
18
  "Bad Request(playground status info)": string;
14
19
  "Basic <token>(security scheme)": string;
15
20
  "Bearer <token>(security scheme)": string;
16
21
  "Binary response body, {length} bytes(playground result display)": string;
22
+ "Body(playground result display)": string;
17
23
  "Body(playground)": string;
24
+ "Breadcrumb(playground)": string;
18
25
  "Callbacks(operation page)": string;
19
- "Client Authentication(OAuth dialog)": string;
26
+ "Check the server URL. If the API does not allow cross-origin requests from this site, a proxy is needed.(playground result display)": string;
27
+ "Choose a file(playground)": string;
28
+ "Clear(playground result display)": string;
20
29
  "Client Credentials(OAuth dialog)": string;
21
- "Client Error(playground result display)": string;
22
- "Client ID(OAuth dialog)": string;
23
- "Client Secret(OAuth dialog)": string;
24
- "Close JSON Editor(playground)": string;
25
- "Close(playground result display)": string;
30
+ "Close(playground)": string;
31
+ "Conflict(playground status info)": string;
26
32
  "Cookie Parameters(operation page)": string;
27
33
  "Cookies(playground)": string;
28
34
  "Copy(TypeScript definitions)": string;
35
+ "Created(playground status info)": string;
29
36
  "Default(operation page)": string;
37
+ "Default(schema UI)": string;
30
38
  "Deprecated(operation page)": string;
39
+ "Deprecated(playground)": string;
31
40
  "Deprecated(security scheme)": string;
32
41
  "Device Authorization(OAuth dialog)": string;
42
+ "Download(playground result display)": string;
43
+ "Editor(playground)": string;
44
+ "Empty response body(playground result display)": string;
33
45
  "Empty(operation page)": string;
46
+ "Enter Property Name(playground)": string;
34
47
  "Enter Value(playground server select)": string;
35
- "Enter value(OAuth dialog)": string;
48
+ "Enter value(playground)": string;
36
49
  "Error(playground status info)": string;
37
50
  "Example Requests(operation page)": string;
38
51
  "Example {key}(operation page)": string;
39
52
  "Example(operation page)": string;
53
+ "Example(playground)": string;
54
+ "Example(schema UI)": string;
40
55
  "Failed to fetch token(playground)": string;
41
56
  "Fetching token...(playground)": string;
57
+ "Field Info(playground)": string;
42
58
  "Forbidden(playground status info)": string;
59
+ "Form(playground)": string;
60
+ "Format(schema UI)": string;
61
+ "Found(playground status info)": string;
43
62
  "Header Parameters(operation page)": string;
44
63
  "Header(playground)": string;
45
64
  "Headers(playground result display)": string;
@@ -48,38 +67,65 @@ export type Translations = {
48
67
  "Include the client ID and secret in the token request body.(OAuth dialog)": string;
49
68
  "Intended for the server-to-server authentication.(OAuth dialog)": string;
50
69
  "Internal Server Error(playground status info)": string;
70
+ "Items(schema UI)": string;
71
+ "Length(schema UI)": string;
72
+ "Match(schema UI)": string;
73
+ "Method Not Allowed(playground status info)": string;
74
+ "Moved Permanently(playground status info)": string;
75
+ "No Content(playground status info)": string;
76
+ "No example available.(playground)": string;
51
77
  "Not Found(playground status info)": string;
52
- "Obtain the access token for API.(OAuth dialog)": string;
53
- "Open JSON Editor(playground)": string;
78
+ "Not Modified(playground status info)": string;
79
+ "Not set(playground)": string;
80
+ "OK(playground status info)": string;
54
81
  "OpenID Connect is not supported at the moment, you can still set an access token here.(playground)": string;
55
82
  "OpenID Connect(security scheme)": string;
56
- "Password(OAuth dialog)": string;
57
83
  "Path Parameters(operation page)": string;
58
84
  "Path(playground)": string;
85
+ "Property Name(playground)": string;
59
86
  "Query Parameters(operation page)": string;
60
87
  "Query(playground)": string;
88
+ "Range(schema UI)": string;
89
+ "Redirect(playground status info)": string;
90
+ "Remove Item(playground)(aria-label)": string;
91
+ "Remove(playground)": string;
61
92
  "Request Body(operation page)": string;
93
+ "Request Failed(playground result display)": string;
94
+ "Request(playground)": string;
62
95
  "Resource Owner Password Flow(OAuth dialog)": string;
63
96
  "Response Body(operation page)": string;
97
+ "Response(playground)": string;
64
98
  "Retrieve the access token directly.(OAuth dialog)": string;
99
+ "Schema(playground)": string;
65
100
  "Scope(security scheme)": string;
66
- "Select a flow(OAuth dialog)": string;
101
+ "Scopes(OAuth dialog)": string;
102
+ "Select(playground)": string;
103
+ "Send a request to see its response.(playground)": string;
67
104
  "Send as Basic Auth header(OAuth dialog)": string;
68
105
  "Send client credentials in body(OAuth dialog)": string;
69
106
  "Send the client ID and secret in the Authorization header.(OAuth dialog)": string;
70
107
  "Send(playground)": string;
108
+ "Sending request...(playground)": string;
71
109
  "Server URL(playground server select)": string;
72
- "Submit(OAuth dialog)": string;
110
+ "Service Unavailable(playground status info)": string;
111
+ "Show Property(playground)": string;
73
112
  "Successful(playground status info)": string;
113
+ "Switch Field(playground)": string;
74
114
  "Test(scalar API client)": string;
75
- "The base URL of your API endpoint.(playground server select)": string;
76
115
  "The client ID of your OAuth application.(OAuth dialog)": string;
77
116
  "The client secret of your OAuth application.(OAuth dialog)": string;
117
+ "This endpoint has no parameters.(playground)": string;
118
+ "Too Many Requests(playground status info)": string;
119
+ "Try in Playground(playground)": string;
120
+ "Type(playground)": string;
78
121
  "TypeScript Definitions(TypeScript definitions)": string;
79
122
  "Unauthorized(playground status info)": string;
123
+ "Unprocessable Content(playground status info)": string;
124
+ "Unset(playground)": string;
80
125
  "Unsupported(OAuth dialog)": string;
81
126
  "Use the {name} type in TypeScript.(TypeScript definitions)": string;
82
- "Username(OAuth dialog)": string;
83
- "loading...(playground server select)": string;
127
+ "Variables(playground server select)": string;
128
+ "You will be redirected to authorize, then back to this page.(OAuth dialog)": string;
129
+ "{count} items(playground)": string;
84
130
  };
85
131
  //#endregion
@@ -1,45 +1,64 @@
1
1
  //#region src/.translations/keys.json
2
2
  var keys_default = [
3
- "Access Token(playground)",
3
+ "1 item(playground)",
4
+ "Accepted(playground status info)",
5
+ "Add Item(playground)",
6
+ "Add(playground)",
4
7
  "Authenticate using username and password.(OAuth dialog)",
5
8
  "Authenticate with 3rd party services(OAuth dialog)",
6
9
  "Authenticate with device.(OAuth dialog)",
7
10
  "Authorization code(OAuth dialog)",
8
- "Authorization(OAuth dialog)",
9
11
  "Authorization(operation page)",
10
12
  "Authorization(playground)",
11
13
  "Authorization(security scheme)",
14
+ "Authorize(OAuth dialog)",
12
15
  "Authorize(playground)",
16
+ "Back(playground)",
17
+ "Bad Gateway(playground status info)",
13
18
  "Bad Request(playground status info)",
14
19
  "Basic <token>(security scheme)",
15
20
  "Bearer <token>(security scheme)",
16
21
  "Binary response body, {length} bytes(playground result display)",
22
+ "Body(playground result display)",
17
23
  "Body(playground)",
24
+ "Breadcrumb(playground)",
18
25
  "Callbacks(operation page)",
19
- "Client Authentication(OAuth dialog)",
26
+ "Check the server URL. If the API does not allow cross-origin requests from this site, a proxy is needed.(playground result display)",
27
+ "Choose a file(playground)",
28
+ "Clear(playground result display)",
20
29
  "Client Credentials(OAuth dialog)",
21
- "Client Error(playground result display)",
22
- "Client ID(OAuth dialog)",
23
- "Client Secret(OAuth dialog)",
24
- "Close JSON Editor(playground)",
25
- "Close(playground result display)",
30
+ "Close(playground)",
31
+ "Conflict(playground status info)",
26
32
  "Cookie Parameters(operation page)",
27
33
  "Cookies(playground)",
28
34
  "Copy(TypeScript definitions)",
35
+ "Created(playground status info)",
29
36
  "Default(operation page)",
37
+ "Default(schema UI)",
30
38
  "Deprecated(operation page)",
39
+ "Deprecated(playground)",
31
40
  "Deprecated(security scheme)",
32
41
  "Device Authorization(OAuth dialog)",
42
+ "Download(playground result display)",
43
+ "Editor(playground)",
44
+ "Empty response body(playground result display)",
33
45
  "Empty(operation page)",
46
+ "Enter Property Name(playground)",
34
47
  "Enter Value(playground server select)",
35
- "Enter value(OAuth dialog)",
48
+ "Enter value(playground)",
36
49
  "Error(playground status info)",
37
50
  "Example Requests(operation page)",
38
51
  "Example {key}(operation page)",
39
52
  "Example(operation page)",
53
+ "Example(playground)",
54
+ "Example(schema UI)",
40
55
  "Failed to fetch token(playground)",
41
56
  "Fetching token...(playground)",
57
+ "Field Info(playground)",
42
58
  "Forbidden(playground status info)",
59
+ "Form(playground)",
60
+ "Format(schema UI)",
61
+ "Found(playground status info)",
43
62
  "Header Parameters(operation page)",
44
63
  "Header(playground)",
45
64
  "Headers(playground result display)",
@@ -48,39 +67,66 @@ var keys_default = [
48
67
  "Include the client ID and secret in the token request body.(OAuth dialog)",
49
68
  "Intended for the server-to-server authentication.(OAuth dialog)",
50
69
  "Internal Server Error(playground status info)",
70
+ "Items(schema UI)",
71
+ "Length(schema UI)",
72
+ "Match(schema UI)",
73
+ "Method Not Allowed(playground status info)",
74
+ "Moved Permanently(playground status info)",
75
+ "No Content(playground status info)",
76
+ "No example available.(playground)",
51
77
  "Not Found(playground status info)",
52
- "Obtain the access token for API.(OAuth dialog)",
53
- "Open JSON Editor(playground)",
78
+ "Not Modified(playground status info)",
79
+ "Not set(playground)",
80
+ "OK(playground status info)",
54
81
  "OpenID Connect is not supported at the moment, you can still set an access token here.(playground)",
55
82
  "OpenID Connect(security scheme)",
56
- "Password(OAuth dialog)",
57
83
  "Path Parameters(operation page)",
58
84
  "Path(playground)",
85
+ "Property Name(playground)",
59
86
  "Query Parameters(operation page)",
60
87
  "Query(playground)",
88
+ "Range(schema UI)",
89
+ "Redirect(playground status info)",
90
+ "Remove Item(playground)(aria-label)",
91
+ "Remove(playground)",
61
92
  "Request Body(operation page)",
93
+ "Request Failed(playground result display)",
94
+ "Request(playground)",
62
95
  "Resource Owner Password Flow(OAuth dialog)",
63
96
  "Response Body(operation page)",
97
+ "Response(playground)",
64
98
  "Retrieve the access token directly.(OAuth dialog)",
99
+ "Schema(playground)",
65
100
  "Scope(security scheme)",
66
- "Select a flow(OAuth dialog)",
101
+ "Scopes(OAuth dialog)",
102
+ "Select(playground)",
103
+ "Send a request to see its response.(playground)",
67
104
  "Send as Basic Auth header(OAuth dialog)",
68
105
  "Send client credentials in body(OAuth dialog)",
69
106
  "Send the client ID and secret in the Authorization header.(OAuth dialog)",
70
107
  "Send(playground)",
108
+ "Sending request...(playground)",
71
109
  "Server URL(playground server select)",
72
- "Submit(OAuth dialog)",
110
+ "Service Unavailable(playground status info)",
111
+ "Show Property(playground)",
73
112
  "Successful(playground status info)",
113
+ "Switch Field(playground)",
74
114
  "Test(scalar API client)",
75
- "The base URL of your API endpoint.(playground server select)",
76
115
  "The client ID of your OAuth application.(OAuth dialog)",
77
116
  "The client secret of your OAuth application.(OAuth dialog)",
117
+ "This endpoint has no parameters.(playground)",
118
+ "Too Many Requests(playground status info)",
119
+ "Try in Playground(playground)",
120
+ "Type(playground)",
78
121
  "TypeScript Definitions(TypeScript definitions)",
79
122
  "Unauthorized(playground status info)",
123
+ "Unprocessable Content(playground status info)",
124
+ "Unset(playground)",
80
125
  "Unsupported(OAuth dialog)",
81
126
  "Use the {name} type in TypeScript.(TypeScript definitions)",
82
- "Username(OAuth dialog)",
83
- "loading...(playground server select)"
127
+ "Variables(playground server select)",
128
+ "You will be redirected to authorize, then back to this page.(OAuth dialog)",
129
+ "{count} items(playground)"
84
130
  ];
85
131
  //#endregion
86
132
  export { keys_default as default };
@@ -5,8 +5,13 @@ import { ReactNode } from "react";
5
5
  //#region src/operation.d.ts
6
6
  export interface OperationParameters {
7
7
  in: 'path' | 'query' | 'header' | 'cookie';
8
- items: ParameterObject[];
8
+ items: OperationParameter[];
9
9
  }
10
+ /** a resolved parameter, with the `name` and `in` required by OpenAPI */
11
+ export type OperationParameter = ParameterObject & {
12
+ name: string;
13
+ in: OperationParameters['in'];
14
+ };
10
15
  export interface OperationSecurity {
11
16
  key: string;
12
17
  scopes: string[];
package/dist/operation.js CHANGED
@@ -36,7 +36,6 @@ function OperationProvider({ type = "operation", path, method, operation, pathIt
36
36
  };
37
37
  }
38
38
  const resolvedParameters = [];
39
- const groups = {};
40
39
  const keys = /* @__PURE__ */ new Set();
41
40
  for (const list of [operation.parameters, pathItem.parameters]) for (const item of list ?? []) {
42
41
  const param = resolve(item);
@@ -44,12 +43,11 @@ function OperationProvider({ type = "operation", path, method, operation, pathIt
44
43
  if (keys.has(key)) continue;
45
44
  keys.add(key);
46
45
  resolvedParameters.push(param);
47
- (groups[param.in] ??= []).push(param);
48
46
  }
49
47
  const parameters = [];
50
48
  for (const location of parameterLocations) {
51
- const items = groups[location];
52
- if (items) parameters.push({
49
+ const items = resolvedParameters.filter((param) => param.in === location && param.name !== void 0);
50
+ if (items.length > 0) parameters.push({
53
51
  in: location,
54
52
  items
55
53
  });
@@ -1,7 +1,7 @@
1
1
  import { cn } from "../utils/cn.js";
2
2
  import "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import { Check, ChevronDown, ChevronUp } from "lucide-react";
4
+ import { Check, ChevronDown } from "lucide-react";
5
5
  import { Select } from "@base-ui/react/select";
6
6
  //#region ../shared-api/dist/components/select.js
7
7
  const Select$1 = Select.Root;
@@ -18,20 +18,21 @@ function SelectTrigger({ className, children, ref, ...props }) {
18
18
  })]
19
19
  });
20
20
  }
21
+ const scrollArrowClassName = "inset-x-0 z-10 h-6 from-fd-popover to-transparent";
21
22
  function SelectScrollUpButton({ className, ref, ...props }) {
22
23
  return /* @__PURE__ */ jsx(Select.ScrollUpArrow, {
23
24
  ref,
24
- className: cn("flex items-center justify-center py-1", className),
25
+ className: cn(scrollArrowClassName, "top-0 bg-linear-to-b", className),
25
26
  ...props,
26
- children: /* @__PURE__ */ jsx(ChevronUp, { className: "size-4" })
27
+ children: null
27
28
  });
28
29
  }
29
30
  function SelectScrollDownButton({ className, ref, ...props }) {
30
31
  return /* @__PURE__ */ jsx(Select.ScrollDownArrow, {
31
32
  ref,
32
- className: cn("flex items-center justify-center py-1", className),
33
+ className: cn(scrollArrowClassName, "bottom-0 bg-linear-to-t", className),
33
34
  ...props,
34
- children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" })
35
+ children: null
35
36
  });
36
37
  }
37
38
  function SelectContent({ className, children, align = "start", side = "bottom", sideOffset = 4, ref, ...props }) {
@@ -42,7 +43,7 @@ function SelectContent({ className, children, align = "start", side = "bottom",
42
43
  className: "z-50",
43
44
  children: /* @__PURE__ */ jsxs(Select.Popup, {
44
45
  ref,
45
- className: cn("z-50 min-w-[calc(var(--anchor-width)+--spacing(2))] overflow-hidden rounded-lg border bg-fd-popover text-fd-popover-foreground shadow-md", className),
46
+ className: cn("relative z-50 min-w-[calc(var(--anchor-width)+--spacing(2))] overflow-hidden rounded-lg border bg-fd-popover text-fd-popover-foreground shadow-md", className),
46
47
  ...props,
47
48
  children: [
48
49
  /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
@@ -58,7 +59,7 @@ function SelectContent({ className, children, align = "start", side = "bottom",
58
59
  function SelectItem({ className, children, ref, ...props }) {
59
60
  return /* @__PURE__ */ jsxs(Select.Item, {
60
61
  ref,
61
- className: cn("flex select-none flex-row items-center rounded-md py-1.5 px-2 text-sm outline-none data-[highlighted]:bg-fd-accent data-[highlighted]:text-fd-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
62
+ className: cn("flex select-none flex-row items-center gap-2 rounded-md py-1.5 px-2 text-sm outline-none data-[highlighted]:bg-fd-accent data-[highlighted]:text-fd-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
62
63
  ...props,
63
64
  children: [/* @__PURE__ */ jsx(Select.ItemText, { children }), /* @__PURE__ */ jsx(Select.ItemIndicator, {
64
65
  className: "ms-auto shrink-0",
@@ -11,12 +11,17 @@ export interface OAuthFlowInput {
11
11
  clientSecret: string;
12
12
  username: string;
13
13
  password: string;
14
- /** where the password and client credentials flows send the client credentials */
14
+ /**
15
+ * where token requests send the client credentials,
16
+ * `header` (HTTP Basic) applies only with a client secret, otherwise the `client_id` goes in the body
17
+ */
15
18
  clientAuth: 'body' | 'header';
16
19
  /** URL of the selected server, relative URLs of the flow resolve against it */
17
20
  serverUrl: string;
18
21
  /** URL of the `createOAuthHandler()` route, defaults to the page */
19
22
  redirectUrl?: string;
23
+ /** where the flow started, like an operation, restored when it returns to the page */
24
+ origin?: string;
20
25
  }
21
26
  /**
22
27
  * Run an OAuth flow and resolve its token.
@@ -24,24 +29,29 @@ export interface OAuthFlowInput {
24
29
  * `implicit` and `authorizationCode` leave the page instead: the token is picked up on return,
25
30
  * in `usePlaygroundAuth().store`.
26
31
  */
27
- export declare function requestOAuthToken(scheme: OAuth2SecurityScheme, type: OAuthFlowType, { schemeId, scopes, clientId, clientSecret, username, password, clientAuth, serverUrl, redirectUrl }: OAuthFlowInput): Promise<string | undefined>;
32
+ export declare function requestOAuthToken(scheme: OAuth2SecurityScheme, type: OAuthFlowType, { schemeId, scopes, clientId, clientSecret, username, password, clientAuth, serverUrl, redirectUrl, origin }: OAuthFlowInput): Promise<string | undefined>;
28
33
  /** scheme name -> token info */
29
34
  type TokenStore = Record<string, TokenInfo | undefined>;
30
35
  type TokenInfo = {
31
36
  type: 'authorization_code';
32
37
  client_id: string;
33
38
  client_secret: string;
39
+ client_auth: OAuthFlowInput['clientAuth'];
34
40
  token: string;
35
41
  } | {
36
42
  type: 'implicit';
37
43
  client_id: string;
38
44
  token: string;
39
45
  };
46
+ type TokenListener = (schemeId: string, token: string) => void;
40
47
  interface AuthContextType {
41
48
  store: TokenStore;
42
- updatedSchemeId: string | null;
43
49
  isLoading: boolean;
44
50
  error?: unknown;
51
+ /** `origin` of the flow that returned to the page */
52
+ origin?: string;
53
+ /** listen to the tokens of flows returning to the page, returns a cleanup */
54
+ subscribe: (listener: TokenListener) => () => void;
45
55
  }
46
56
  export declare function usePlaygroundAuth(): AuthContextType;
47
57
  export interface AuthRequirement {