zudoku 0.6.2-dev.4 → 0.6.2-dev.6
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/cli/dev/handler.js +5 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +9 -0
- package/dist/config/validators/InputSidebarSchema.js +2 -0
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/SidebarSchema.d.ts +9 -3
- package/dist/config/validators/SidebarSchema.js +7 -3
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +26 -0
- package/dist/config/validators/validate.js +6 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +5 -3
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +2 -2
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/icons.d.ts +1 -0
- package/dist/lib/icons.js +2 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/vite/plugin-icons.d.ts +3 -0
- package/dist/vite/plugin-icons.js +47 -0
- package/dist/vite/plugin-icons.js.map +1 -0
- package/dist/vite/plugin-sidebar.js +10 -1
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.js +23 -0
- package/dist/vite/prerender.js.map +1 -1
- package/lib/AuthenticationPlugin-BMjOjKqE.js +54 -0
- package/lib/{AuthenticationPlugin-DYnkydqa.js.map → AuthenticationPlugin-BMjOjKqE.js.map} +1 -1
- package/lib/CategoryHeading-BE8e6QdS.js +9 -0
- package/lib/{CategoryHeading-w2EW676o.js.map → CategoryHeading-BE8e6QdS.js.map} +1 -1
- package/lib/DeveloperHint-Bl9gIdNI.js +12 -0
- package/lib/{DeveloperHint-D87KcpDW.js.map → DeveloperHint-Bl9gIdNI.js.map} +1 -1
- package/lib/ErrorPage-CPR1XVKW.js +12 -0
- package/lib/{ErrorPage-BdHAg3Rg.js.map → ErrorPage-CPR1XVKW.js.map} +1 -1
- package/lib/Input-BBlyeDuG.js +2192 -0
- package/lib/Input-BBlyeDuG.js.map +1 -0
- package/lib/{Markdown-BZUoEvL7.js → Markdown-CCNihH_N.js} +3189 -3354
- package/lib/Markdown-CCNihH_N.js.map +1 -0
- package/lib/MdxPage-BavkYqzi.js +140 -0
- package/lib/MdxPage-BavkYqzi.js.map +1 -0
- package/lib/OperationList-C6Ps2keZ.js +460 -0
- package/lib/OperationList-C6Ps2keZ.js.map +1 -0
- package/lib/Route-xRJ9mJgH.js +13 -0
- package/lib/{Route-5sI-urRK.js.map → Route-xRJ9mJgH.js.map} +1 -1
- package/lib/{SidebarBadge-6EEz-Bwe.js → SidebarBadge-2JcxswKF.js} +47 -47
- package/lib/{SidebarBadge-6EEz-Bwe.js.map → SidebarBadge-2JcxswKF.js.map} +1 -1
- package/lib/SlotletProvider-CuB3Ts8r.js +213 -0
- package/lib/SlotletProvider-CuB3Ts8r.js.map +1 -0
- package/lib/Spinner-BlxzaFFF.js +6 -0
- package/lib/Spinner-BlxzaFFF.js.map +1 -0
- package/lib/{ZudokuContext-BHNQL3XO.js → ZudokuContext-JoyeA9dT.js} +78 -79
- package/lib/{ZudokuContext-BHNQL3XO.js.map → ZudokuContext-JoyeA9dT.js.map} +1 -1
- package/lib/{_commonjsHelpers-BVfed4GL.js → _commonjsHelpers-BkfeUUK-.js} +3 -3
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
- package/lib/{index-DdUotMOQ.js → index-BF4cn28H.js} +1953 -2196
- package/lib/index-BF4cn28H.js.map +1 -0
- package/lib/{index-BGY8VjAV.js → index-BLvMkqjO.js} +26 -26
- package/lib/{index-BGY8VjAV.js.map → index-BLvMkqjO.js.map} +1 -1
- package/lib/{index-CbJpF8Yf.js → index-G1-TGLO1.js} +8 -8
- package/lib/{index-CbJpF8Yf.js.map → index-G1-TGLO1.js.map} +1 -1
- package/lib/jsx-runtime-lNnQYwFN.js +2403 -0
- package/lib/jsx-runtime-lNnQYwFN.js.map +1 -0
- package/lib/{router-BiRCp01d.js → router-D2p7Olpn.js} +22 -22
- package/lib/{router-BiRCp01d.js.map → router-D2p7Olpn.js.map} +1 -1
- package/lib/{slugify-CiPVjteN.js → slugify-DbLhpSPt.js} +2 -2
- package/lib/{slugify-CiPVjteN.js.map → slugify-DbLhpSPt.js.map} +1 -1
- package/lib/{state-DsXXkBLH.js → state-lIwt9isb.js} +15 -15
- package/lib/{state-DsXXkBLH.js.map → state-lIwt9isb.js.map} +1 -1
- package/lib/{utils-BPHLKjns.js → utils-B8R4grFM.js} +152 -153
- package/lib/{utils-BPHLKjns.js.map → utils-B8R4grFM.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +16 -21
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +32 -37
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +485 -505
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +1574 -1782
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.icons.js +2 -0
- package/lib/zudoku.icons.js.map +1 -0
- package/lib/zudoku.openapi-worker.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +153 -268
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-page.js +5 -6
- package/lib/zudoku.plugin-custom-page.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +12 -13
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +8 -8
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/lib/zudoku.plugin-search-inkeep.js +20 -21
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +7 -3
- package/src/lib/components/navigation/SidebarCategory.tsx +43 -31
- package/src/lib/components/navigation/SidebarItem.tsx +2 -1
- package/src/lib/icons.ts +1 -0
- package/lib/AuthenticationPlugin-DYnkydqa.js +0 -55
- package/lib/CategoryHeading-w2EW676o.js +0 -10
- package/lib/DeveloperHint-D87KcpDW.js +0 -16
- package/lib/ErrorPage-BdHAg3Rg.js +0 -18
- package/lib/Input-BmwltPfA.js +0 -2214
- package/lib/Input-BmwltPfA.js.map +0 -1
- package/lib/Markdown-BZUoEvL7.js.map +0 -1
- package/lib/MdxPage-E4NFxzHQ.js +0 -183
- package/lib/MdxPage-E4NFxzHQ.js.map +0 -1
- package/lib/OperationList-DVIuzHN7.js +0 -628
- package/lib/OperationList-DVIuzHN7.js.map +0 -1
- package/lib/Route-5sI-urRK.js +0 -14
- package/lib/SlotletProvider-CNyl5wU0.js +0 -262
- package/lib/SlotletProvider-CNyl5wU0.js.map +0 -1
- package/lib/Spinner-B9eFggre.js +0 -15
- package/lib/Spinner-B9eFggre.js.map +0 -1
- package/lib/_commonjsHelpers-BVfed4GL.js.map +0 -1
- package/lib/index-ChhUJhLT.js +0 -1771
- package/lib/index-ChhUJhLT.js.map +0 -1
- package/lib/index-DdUotMOQ.js.map +0 -1
- package/lib/jsx-runtime-B6kdoens.js +0 -635
- package/lib/jsx-runtime-B6kdoens.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationList-C6Ps2keZ.js","sources":["../src/lib/plugins/openapi/graphql/fragment-masking.ts","../src/lib/plugins/openapi/Endpoint.tsx","../src/lib/util/groupBy.ts","../src/lib/util/renderIf.ts","../src/lib/plugins/openapi/ParameterListItem.tsx","../src/lib/plugins/openapi/ParameterList.tsx","../src/lib/util/objectEntries.ts","../src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx","../src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx","../src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx","../src/lib/plugins/openapi/schema/utils.ts","../src/lib/plugins/openapi/schema/SchemaComponents.tsx","../src/lib/plugins/openapi/schema/SchemaView.tsx","../src/lib/plugins/openapi/OperationListItem.tsx","../src/lib/plugins/openapi/OperationList.tsx"],"sourcesContent":["/* eslint-disable */\nimport type {\n DocumentTypeDecoration,\n ResultOf,\n TypedDocumentNode,\n} from \"@graphql-typed-document-node/core\";\nimport type { FragmentDefinitionNode } from \"graphql\";\nimport type { Incremental } from \"./graphql.js\";\n\nexport type FragmentType<\n TDocumentType extends DocumentTypeDecoration<any, any>,\n> =\n TDocumentType extends DocumentTypeDecoration<infer TType, any>\n ? [TType] extends [{ \" $fragmentName\"?: infer TKey }]\n ? TKey extends string\n ? { \" $fragmentRefs\"?: { [key in TKey]: TType } }\n : never\n : never\n : never;\n\n// return non-nullable if `fragmentType` is non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>,\n): TType;\n// return nullable if `fragmentType` is undefined\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined,\n): TType | undefined;\n// return nullable if `fragmentType` is nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null,\n): TType | null;\n// return nullable if `fragmentType` is nullable or undefined\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | FragmentType<DocumentTypeDecoration<TType, any>>\n | null\n | undefined,\n): TType | null | undefined;\n// return array of non-nullable if `fragmentType` is array of non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>,\n): Array<TType>;\n// return array of nullable if `fragmentType` is array of nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | Array<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined,\n): Array<TType> | null | undefined;\n// return readonly array of non-nullable if `fragmentType` is array of non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>,\n): ReadonlyArray<TType>;\n// return readonly array of nullable if `fragmentType` is array of nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined,\n): ReadonlyArray<TType> | null | undefined;\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | FragmentType<DocumentTypeDecoration<TType, any>>\n | Array<FragmentType<DocumentTypeDecoration<TType, any>>>\n | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined,\n): TType | Array<TType> | ReadonlyArray<TType> | null | undefined {\n return fragmentType as any;\n}\n\nexport function makeFragmentData<\n F extends DocumentTypeDecoration<any, any>,\n FT extends ResultOf<F>,\n>(data: FT, _fragment: F): FragmentType<F> {\n return data as FragmentType<F>;\n}\nexport function isFragmentReady<TQuery, TFrag>(\n queryNode: DocumentTypeDecoration<TQuery, any>,\n fragmentNode: TypedDocumentNode<TFrag>,\n data:\n | FragmentType<TypedDocumentNode<Incremental<TFrag>, any>>\n | null\n | undefined,\n): data is FragmentType<typeof fragmentNode> {\n const deferredFields = (\n queryNode as {\n __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> };\n }\n ).__meta__?.deferredFields;\n\n if (!deferredFields) return true;\n\n const fragDef = fragmentNode.definitions[0] as\n | FragmentDefinitionNode\n | undefined;\n const fragName = fragDef?.name?.value;\n\n const fields = (fragName && deferredFields[fragName]) || [];\n return fields.length > 0 && fields.every((field) => data && field in data);\n}\n","import { CheckIcon, CopyIcon } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { InlineCode } from \"../../components/InlineCode.js\";\n\nexport const Endpoint = ({ url }: { url: string }) => {\n const [isCopied, setIsCopied] = useState(false);\n\n return (\n <div className=\"my-4 flex items-center justify-end gap-2 text-sm\">\n <span className=\"font-medium\">Endpoint:</span>\n <InlineCode className=\"p-1.5 flex gap-2.5 items-center text-xs\">\n {url}\n <button\n onClick={() => {\n void navigator.clipboard.writeText(url).then(() => {\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 2000);\n });\n }}\n type=\"button\"\n >\n {isCopied ? (\n <CheckIcon className=\"text-green-600\" size={14} />\n ) : (\n <CopyIcon size={14} strokeWidth={1.3} />\n )}\n </button>\n </InlineCode>\n </div>\n );\n};\n","export const groupBy = <\n T extends Record<PropertyKey, any>,\n KeySelector extends (item: T) => PropertyKey,\n>(\n arr: T[],\n keySelector: KeySelector,\n): Partial<Record<ReturnType<KeySelector>, T[]>> => {\n return arr.reduce(\n (accumulator, val) => {\n const groupedKey = keySelector(val) as ReturnType<KeySelector>;\n if (!accumulator[groupedKey]) {\n accumulator[groupedKey] = [];\n }\n accumulator[groupedKey].push(val);\n return accumulator;\n },\n {} as Record<ReturnType<KeySelector>, T[]>,\n );\n};\n","export const renderIf = <G, R>(\n variable: G | undefined | null,\n callback: (variable: G) => R,\n): R | undefined => (variable ? callback(variable) : undefined);\n","import { Markdown } from \"../../components/Markdown.js\";\nimport { type SchemaObject } from \"../../oas/graphql/index.js\";\nimport { ColorizedParam } from \"./ColorizedParam.js\";\nimport type { OperationListItemResult } from \"./OperationList.js\";\nimport type { ParameterGroup } from \"./OperationListItem.js\";\n\nconst getParameterSchema = (\n parameter: ParameterListItemResult,\n): SchemaObject => {\n if (parameter.schema != null && typeof parameter.schema === \"object\") {\n return parameter.schema;\n }\n return {\n type: \"string\",\n };\n};\n\nexport type ParameterListItemResult = NonNullable<\n OperationListItemResult[\"parameters\"]\n>[number];\n\nexport const ParameterListItem = ({\n parameter,\n group,\n id,\n}: {\n parameter: ParameterListItemResult;\n group: ParameterGroup;\n id: string;\n}) => (\n <li className=\"p-4 bg-border/20 text-sm flex flex-col gap-1\">\n <div className=\"flex items-center gap-2\">\n <code>\n {group === \"path\" ? (\n <ColorizedParam\n name={parameter.name}\n backgroundOpacity=\"15%\"\n slug={id + \"-\" + parameter.name.toLocaleLowerCase()}\n />\n ) : (\n parameter.name\n )}\n </code>\n {parameter.required && (\n <span className=\"py-px px-1.5 font-medium bg-primary/75 text-muted rounded-lg\">\n required\n </span>\n )}\n {getParameterSchema(parameter).type && (\n <span className=\"text-muted-foreground\">\n {getParameterSchema(parameter).type}\n </span>\n )}\n </div>\n {parameter.description && (\n <Markdown\n content={parameter.description}\n className=\"text-sm prose-p:my-1 prose-code:whitespace-pre-line\"\n />\n )}\n </li>\n);\n","import { Heading } from \"../../components/Heading.js\";\nimport { Card } from \"../../ui/Card.js\";\nimport type { ParameterGroup } from \"./OperationListItem.js\";\nimport {\n ParameterListItem,\n type ParameterListItemResult,\n} from \"./ParameterListItem.js\";\n\nexport const ParameterList = ({\n group,\n parameters,\n id,\n}: {\n group: ParameterGroup;\n parameters: ParameterListItemResult[];\n id: string;\n}) => (\n <>\n <Heading level={3} id={`${id}/${group}-parameters`} className=\"capitalize\">\n {group === \"header\" ? \"Headers\" : `${group} Parameters`}\n </Heading>\n <Card>\n <ul className=\"list-none m-0 px-0 divide-y \">\n {parameters\n .sort((a, b) => (a.required === b.required ? 0 : a.required ? -1 : 1))\n .map((parameter) => (\n <ParameterListItem\n key={`${parameter.name}-${parameter.in}`}\n parameter={parameter}\n id={id}\n group={group}\n />\n ))}\n </ul>\n </Card>\n </>\n);\n","type ValueOf<T> = T[keyof T];\ntype Entries<T> = [keyof T, ValueOf<T>][];\n\nexport const objectEntries = <T extends object>(obj: T): Entries<T> =>\n Object.entries(obj) as Entries<T>;\n","import {\n ChevronDownIcon,\n CircleDotIcon,\n CircleFadingPlusIcon,\n CircleIcon,\n} from \"lucide-react\";\nimport { cn } from \"../../../../util/cn.js\";\n\nimport type { LogicalGroupType } from \"../utils.js\";\n\nconst iconMap = {\n AND: <CircleFadingPlusIcon size={16} className=\"fill-card\" />,\n OR: <CircleDotIcon size={16} className=\"fill-card\" />,\n ONE: <CircleIcon size={14} className=\"fill-card\" />,\n} as const;\n\nconst colorClass = {\n AND: \"text-green-500 dark:text-green-300/60\",\n OR: \"text-blue-400 dark:text-blue-500\",\n ONE: \"text-purple-500 dark:text-purple-300/60\",\n} as const;\n\nexport const LogicalGroupConnector = ({\n type,\n isOpen,\n className,\n}: {\n type: LogicalGroupType;\n isOpen: boolean;\n className?: string;\n}) => {\n return (\n <div\n className={cn(\n colorClass[type],\n \"relative text-sm flex py-2\",\n \"before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']\",\n className,\n )}\n >\n <div className=\"-translate-x-[7px] flex gap-1 items-center\">\n {iconMap[type]}\n <div\n className={cn(\n \"translate-y-px mx-px opacity-0 group-hover:opacity-100 transition\",\n !isOpen && \"-rotate-90\",\n )}\n >\n <ChevronDownIcon size={16} />\n </div>\n </div>\n </div>\n );\n};\n","import * as Collapsible from \"@radix-ui/react-collapsible\";\nimport { useState } from \"react\";\nimport type { SchemaObject } from \"../../../../oas/parser/index.js\";\nimport { SchemaView } from \"../SchemaView.js\";\nimport type { LogicalGroupType } from \"../utils.js\";\nimport { LogicalGroupConnector } from \"./LogicalGroupConnector.js\";\n\nexport const LogicalGroupItem = (props: {\n type: LogicalGroupType;\n schema: SchemaObject;\n level: number;\n}) => {\n const [isOpen, setIsOpen] = useState(true);\n\n return (\n <Collapsible.Root\n open={isOpen}\n onOpenChange={() => setIsOpen((prev) => !prev)}\n className=\"group\"\n >\n <Collapsible.Trigger>\n <LogicalGroupConnector type={props.type} isOpen={isOpen} />\n </Collapsible.Trigger>\n {!isOpen && <div className=\"wavy-line bg-border translate-y-1\" />}\n <Collapsible.Content>\n <SchemaView schema={props.schema} level={props.level + 1} />\n </Collapsible.Content>\n </Collapsible.Root>\n );\n};\n","import * as Collapsible from \"@radix-ui/react-collapsible\";\nimport { SquareMinusIcon, SquarePlusIcon } from \"lucide-react\";\nimport type { SchemaObject } from \"../../../../oas/parser/index.js\";\nimport { Card } from \"../../../../ui/Card.js\";\nimport type { LogicalGroupType } from \"../utils.js\";\nimport { LogicalGroupItem } from \"./LogicalGroupItem.js\";\n\nconst typeLabel = {\n AND: \"All of\",\n OR: \"Any of\",\n ONE: \"One of\",\n};\n\nexport const LogicalGroup = ({\n schemas,\n type,\n isOpen,\n level,\n toggleOpen,\n}: {\n schemas: SchemaObject[];\n type: LogicalGroupType;\n isOpen: boolean;\n toggleOpen: () => void;\n level: number;\n}) => (\n <Collapsible.Root open={isOpen} onOpenChange={toggleOpen} asChild>\n <Card className=\"px-6\">\n <Collapsible.Trigger className=\"flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5\">\n {isOpen ? <SquareMinusIcon size={14} /> : <SquarePlusIcon size={14} />}\n <span>{typeLabel[type]}</span>\n </Collapsible.Trigger>\n\n <Collapsible.Content className=\"pb-4\">\n {schemas.map((subSchema, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <LogicalGroupItem\n key={index}\n type={type}\n schema={subSchema}\n level={level}\n />\n ))}\n </Collapsible.Content>\n </Card>\n </Collapsible.Root>\n);\n","import type { SchemaObject } from \"../../../oas/parser/index.js\";\n\nexport const isComplexType = (value: SchemaObject) =>\n value.type === \"object\" ||\n (value.type === \"array\" &&\n typeof value.items === \"object\" &&\n (!value.items.type || value.items.type === \"object\"));\n\nexport const hasLogicalGroupings = (value: SchemaObject) =>\n Boolean(value.oneOf ?? value.allOf ?? value.anyOf);\n\nexport const LogicalSchemaTypeMap = {\n allOf: \"AND\",\n anyOf: \"OR\",\n oneOf: \"ONE\",\n} as const;\n\nexport type LogicalGroupType = \"AND\" | \"OR\" | \"ONE\";\n","import * as Collapsible from \"@radix-ui/react-collapsible\";\nimport { ListPlusIcon } from \"lucide-react\";\nimport { useCallback, useState } from \"react\";\nimport { Markdown, ProseClasses } from \"../../../components/Markdown.js\";\nimport type { SchemaObject } from \"../../../oas/parser/index.js\";\nimport { Button } from \"../../../ui/Button.js\";\nimport { cn } from \"../../../util/cn.js\";\nimport { objectEntries } from \"../../../util/objectEntries.js\";\nimport { LogicalGroup } from \"./LogicalGroup/LogicalGroup.js\";\nimport { SchemaView } from \"./SchemaView.js\";\nimport {\n hasLogicalGroupings,\n isComplexType,\n LogicalSchemaTypeMap,\n} from \"./utils.js\";\n\nexport const SchemaLogicalGroup = ({\n schema,\n level,\n}: {\n schema: SchemaObject;\n level: number;\n}) => {\n const [isOpen, setIsOpen] = useState(true);\n const toggleOpen = useCallback(() => setIsOpen((prev) => !prev), []);\n\n for (const [key, type] of objectEntries(LogicalSchemaTypeMap)) {\n if (!schema[key]) continue;\n\n return (\n <LogicalGroup\n schemas={schema[key]}\n type={type}\n isOpen={isOpen}\n toggleOpen={toggleOpen}\n level={level}\n />\n );\n }\n};\n\nexport const SchemaPropertyItem = ({\n name,\n schema,\n group,\n level,\n defaultOpen = false,\n showCollapseButton = true,\n}: {\n name: string;\n schema: SchemaObject;\n group: \"required\" | \"optional\" | \"deprecated\";\n level: number;\n defaultOpen?: boolean;\n showCollapseButton?: boolean;\n}) => {\n const [isOpen, setIsOpen] = useState(defaultOpen);\n\n return (\n <li className=\"p-4 bg-border/20 hover:bg-border/30\">\n <div className=\"flex flex-col gap-1 justify-between text-sm\">\n <div className=\"flex gap-2 items-center\">\n <code>{name}</code>\n <span className=\"text-muted-foreground\">\n {schema.type === \"array\" && schema.items.type ? (\n <span>{schema.items.type}[]</span>\n ) : Array.isArray(schema.type) ? (\n <span>{schema.type.join(\" | \")}</span>\n ) : (\n <span>{schema.type}</span>\n )}\n </span>\n {group === \"optional\" && (\n <span className=\"py-px px-1.5 font-medium border rounded-lg\">\n optional\n </span>\n )}\n </div>\n\n {schema.description && (\n <Markdown\n className={cn(ProseClasses, \"text-sm leading-normal line-clamp-4\")}\n content={schema.description}\n />\n )}\n\n {(hasLogicalGroupings(schema) || isComplexType(schema)) && (\n <Collapsible.Root\n defaultOpen={defaultOpen}\n open={isOpen}\n onOpenChange={() => setIsOpen(!isOpen)}\n >\n {showCollapseButton && (\n <Collapsible.Trigger asChild>\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"mt-2 flex gap-1.5\"\n >\n <ListPlusIcon size={18} />\n {!isOpen\n ? \"Show nested properties\"\n : \"Hide nested properties\"}\n </Button>\n </Collapsible.Trigger>\n )}\n <Collapsible.Content>\n <div className=\"mt-2\">\n {hasLogicalGroupings(schema) ? (\n <SchemaLogicalGroup schema={schema} level={level + 1} />\n ) : schema.type === \"object\" ? (\n <SchemaView schema={schema} level={level + 1} />\n ) : (\n schema.type === \"array\" &&\n typeof schema.items === \"object\" && (\n <SchemaView schema={schema.items} level={level + 1} />\n )\n )}\n </div>\n </Collapsible.Content>\n </Collapsible.Root>\n )}\n </div>\n </li>\n );\n};\n","import { Markdown, ProseClasses } from \"../../../components/Markdown.js\";\nimport type { SchemaObject } from \"../../../oas/parser/index.js\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"../../../ui/Card.js\";\nimport { cn } from \"../../../util/cn.js\";\nimport { groupBy } from \"../../../util/groupBy.js\";\nimport { SchemaLogicalGroup, SchemaPropertyItem } from \"./SchemaComponents.js\";\nimport { hasLogicalGroupings } from \"./utils.js\";\n\nexport const SchemaView = ({\n schema,\n level = 0,\n defaultOpen = false,\n}: {\n schema?: SchemaObject | null;\n level?: number;\n defaultOpen?: boolean;\n}) => {\n if (!schema || Object.keys(schema).length === 0) {\n return (\n <Card className=\"p-4\">\n <span className=\"text-sm text-muted-foreground italic\">\n No response specified\n </span>\n </Card>\n );\n }\n\n const renderSchema = (schema: SchemaObject, level: number) => {\n if (hasLogicalGroupings(schema)) {\n return <SchemaLogicalGroup schema={schema} level={level} />;\n }\n\n // Sometimes items is not defined\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (schema.type === \"array\" && schema.items) {\n const itemsSchema = schema.items as SchemaObject;\n\n if (\n typeof itemsSchema.type === \"string\" &&\n [\"string\", \"number\", \"boolean\", \"integer\"].includes(itemsSchema.type)\n ) {\n return (\n <Card className=\"p-4\">\n <span className=\"text-sm text-muted-foreground\">\n {itemsSchema.type}[]\n </span>\n {schema.description && (\n <Markdown\n className={cn(\n ProseClasses,\n \"text-sm leading-normal line-clamp-4\",\n )}\n content={schema.description}\n />\n )}\n </Card>\n );\n } else if (itemsSchema.type === \"object\") {\n return (\n <Card className=\"flex flex-col gap-2 bg-border/30 p-4\">\n <span className=\"text-sm text-muted-foreground\">object[]</span>\n {renderSchema(itemsSchema, level + 1)}\n </Card>\n );\n } else {\n return renderSchema(itemsSchema, level + 1);\n }\n }\n\n if (schema.type === \"object\" && !schema.properties) {\n return (\n <Card className=\"p-4 flex gap-2 items-center\">\n {\"name\" in schema && <>{schema.name}</>}\n <span className=\"text-sm text-muted-foreground\">object</span>\n {schema.description && (\n <Markdown\n className={cn(\n ProseClasses,\n \"text-sm leading-normal line-clamp-4\",\n )}\n content={schema.description}\n />\n )}\n </Card>\n );\n }\n\n if (schema.properties) {\n const groupedProperties = groupBy(\n Object.entries(schema.properties),\n ([propertyName, property]) => {\n return property.deprecated\n ? \"deprecated\"\n : schema.required?.includes(propertyName)\n ? \"required\"\n : \"optional\";\n },\n );\n\n const groupNames = [\"required\", \"optional\", \"deprecated\"] as const;\n\n return (\n <Card className=\"divide-y overflow-hidden\">\n {groupNames.map(\n (group) =>\n groupedProperties[group] && (\n <ul key={group} className=\"divide-y\">\n {groupedProperties[group].map(([name, schema]) => (\n <SchemaPropertyItem\n key={name}\n name={name}\n schema={schema}\n group={group}\n level={level}\n defaultOpen={defaultOpen}\n />\n ))}\n </ul>\n ),\n )}\n </Card>\n );\n }\n\n if (\n typeof schema.type === \"string\" &&\n [\"string\", \"number\", \"boolean\", \"integer\", \"null\"].includes(schema.type)\n ) {\n return (\n <Card className=\"p-4\">\n <span className=\"text-sm text-muted-foreground\">{schema.type}</span>\n {schema.description && (\n <Markdown\n className={cn(\n ProseClasses,\n \"text-sm leading-normal line-clamp-4\",\n )}\n content={schema.description}\n />\n )}\n </Card>\n );\n }\n\n if (schema.additionalProperties) {\n return (\n <Card className=\"my-2\">\n <CardHeader>\n <CardTitle>Additional Properties:</CardTitle>\n </CardHeader>\n <CardContent>\n {renderSchema(\n schema.additionalProperties as SchemaObject,\n level + 1,\n )}\n </CardContent>\n </Card>\n );\n }\n\n return null;\n };\n\n return renderSchema(schema, level);\n};\n","import { useState } from \"react\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { Markdown, ProseClasses } from \"../../components/Markdown.js\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"../../ui/Tabs.js\";\nimport { groupBy } from \"../../util/groupBy.js\";\nimport { renderIf } from \"../../util/renderIf.js\";\nimport { OperationsFragment } from \"./OperationList.js\";\nimport { ParameterList } from \"./ParameterList.js\";\nimport { Sidecar } from \"./Sidecar.js\";\nimport { FragmentType, useFragment } from \"./graphql/index.js\";\nimport { SchemaView } from \"./schema/SchemaView.js\";\n\nexport const PARAM_GROUPS = [\"path\", \"query\", \"header\", \"cookie\"] as const;\nexport type ParameterGroup = (typeof PARAM_GROUPS)[number];\n\nexport const OperationListItem = ({\n operationFragment,\n}: {\n operationFragment: FragmentType<typeof OperationsFragment>;\n}) => {\n const operation = useFragment(OperationsFragment, operationFragment);\n const groupedParameters = groupBy(\n operation.parameters ?? [],\n (param) => param.in,\n );\n\n const first = operation.responses.at(0);\n const [selectedResponse, setSelectedResponse] = useState(first?.statusCode);\n\n return (\n <div\n key={operation.operationId}\n className=\"grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16\"\n >\n <div className=\"flex flex-col gap-4\">\n <Heading level={2} id={operation.slug} registerSidebarAnchor>\n {operation.summary}\n </Heading>\n {operation.description && (\n <Markdown\n className={`${ProseClasses} max-w-full prose-img:max-w-prose`}\n content={operation.description}\n />\n )}\n {operation.parameters && operation.parameters.length > 0 && (\n <>\n {PARAM_GROUPS.flatMap((group) =>\n groupedParameters[group]?.length ? (\n <ParameterList\n key={group}\n id={operation.slug}\n parameters={groupedParameters[group]}\n group={group}\n />\n ) : (\n []\n ),\n )}\n </>\n )}\n {renderIf(operation.requestBody?.content?.at(0)?.schema, (schema) => (\n <div className=\"mt-4 flex flex-col gap-4\">\n <Heading\n level={3}\n className=\"capitalize\"\n id={`${operation.slug}/request-body`}\n registerSidebarAnchor\n >\n Request Body\n </Heading>\n <SchemaView schema={schema} />\n </div>\n ))}\n {operation.responses.length > 0 && (\n <>\n <Heading\n level={3}\n className=\"capitalize mt-8 pt-8 border-t\"\n id={`${operation.slug}/responses`}\n registerSidebarAnchor\n >\n Responses\n </Heading>\n <Tabs\n onValueChange={(value) => setSelectedResponse(value)}\n value={selectedResponse}\n >\n {operation.responses.length > 1 && (\n <TabsList>\n {operation.responses.map((response) => (\n <TabsTrigger\n value={response.statusCode}\n key={response.statusCode}\n title={response.description}\n >\n {response.statusCode}\n </TabsTrigger>\n ))}\n </TabsList>\n )}\n <ul className=\"list-none m-0 px-0\">\n {operation.responses.map((response) => (\n <TabsContent\n value={response.statusCode}\n key={response.statusCode}\n >\n <SchemaView\n schema={\n response.content?.find((content) => content.schema)\n ?.schema\n }\n />\n </TabsContent>\n ))}\n </ul>\n </Tabs>\n </>\n )}\n </div>\n\n <Sidecar\n selectedResponse={selectedResponse}\n onSelectResponse={setSelectedResponse}\n operation={operation}\n />\n </div>\n );\n};\n","import { ResultOf } from \"@graphql-typed-document-node/core\";\nimport { CategoryHeading } from \"../../components/CategoryHeading.js\";\nimport { DeveloperHint } from \"../../components/DeveloperHint.js\";\nimport { ErrorPage } from \"../../components/ErrorPage.js\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { InlineCode } from \"../../components/InlineCode.js\";\nimport { Markdown, ProseClasses } from \"../../components/Markdown.js\";\nimport { SyntaxHighlight } from \"../../components/SyntaxHighlight.js\";\nimport { cn } from \"../../util/cn.js\";\nimport { Endpoint } from \"./Endpoint.js\";\nimport { OperationListItem } from \"./OperationListItem.js\";\nimport StaggeredRender from \"./StaggeredRender.js\";\nimport { useOasConfig } from \"./context.js\";\nimport { graphql } from \"./graphql/index.js\";\nimport { useQuery } from \"./util/urql.js\";\n\nexport const OperationsFragment = graphql(/* GraphQL */ `\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n`);\n\nexport type OperationListItemResult = ResultOf<typeof OperationsFragment>;\n\nconst AllOperationsQuery = graphql(/* GraphQL */ `\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n`);\n\nconst suspenseContext = { suspense: true };\n\nexport const OperationList = () => {\n const { type, input } = useOasConfig();\n\n const [result] = useQuery({\n query: AllOperationsQuery,\n variables: { type, input },\n context: suspenseContext,\n });\n\n const error = result.error?.graphQLErrors.at(0);\n\n // Looks like there is no Suspense level error handling (yet)?\n // So we handle the error case in the component directly\n if (error) {\n return (\n <ErrorPage\n category=\"Error\"\n title=\"Schema cannot be displayed\"\n message={\n <>\n <DeveloperHint className=\"mb-4\">\n Check your configuration value <InlineCode>apis.type</InlineCode>{\" \"}\n and <InlineCode>apis.input</InlineCode> in the Zudoku config.\n </DeveloperHint>\n An error occurred while trying to fetch the API reference:\n <SyntaxHighlight code={error.toString()} language=\"plain\" />\n </>\n }\n />\n );\n }\n\n if (!result.data) return null;\n\n return (\n <div className=\"pt-[--padding-content-top]\">\n <div\n className={cn(ProseClasses, \"mb-16 max-w-full prose-img:max-w-prose\")}\n >\n <CategoryHeading>Overview</CategoryHeading>\n <Heading level={1} id=\"description\" registerSidebarAnchor>\n {result.data.schema.title}\n </Heading>\n <Markdown content={result.data.schema.description ?? \"\"} />\n </div>\n <hr />\n <Endpoint url={result.data.schema.url} />\n\n {result.data.schema.tags\n .filter((tag) => tag.operations.length > 0)\n .map((tag) => (\n <div key={tag.name}>\n {tag.name && <CategoryHeading>{tag.name}</CategoryHeading>}\n {tag.description && (\n <Markdown\n className={`${ProseClasses} max-w-full prose-img:max-w-prose w-full mt-2 mb-12`}\n content={tag.description}\n />\n )}\n <div className=\"operation mb-12\">\n <StaggeredRender>\n {tag.operations.map((fragment) => (\n <OperationListItem\n key={fragment.slug}\n operationFragment={fragment}\n />\n ))}\n </StaggeredRender>\n </div>\n </div>\n ))}\n </div>\n );\n};\n"],"names":["useFragment","_documentNode","fragmentType","Endpoint","url","isCopied","setIsCopied","useState","InlineCode","CheckIcon","CopyIcon","groupBy","arr","keySelector","accumulator","val","groupedKey","renderIf","variable","callback","getParameterSchema","parameter","ParameterListItem","group","id","ColorizedParam","Markdown","ParameterList","parameters","Heading","Card","a","b","objectEntries","obj","iconMap","CircleFadingPlusIcon","CircleDotIcon","CircleIcon","colorClass","LogicalGroupConnector","type","isOpen","className","cn","ChevronDownIcon","LogicalGroupItem","props","setIsOpen","Collapsible.Root","prev","Collapsible.Trigger","Collapsible.Content","SchemaView","typeLabel","LogicalGroup","schemas","level","toggleOpen","SquareMinusIcon","SquarePlusIcon","subSchema","index","isComplexType","value","hasLogicalGroupings","LogicalSchemaTypeMap","SchemaLogicalGroup","schema","useCallback","key","SchemaPropertyItem","name","defaultOpen","showCollapseButton","ProseClasses","Button","ListPlusIcon","renderSchema","itemsSchema","groupedProperties","propertyName","property","groupNames","CardHeader","CardTitle","CardContent","PARAM_GROUPS","OperationListItem","operationFragment","operation","OperationsFragment","groupedParameters","param","first","selectedResponse","setSelectedResponse","_a","_c","_b","Tabs","TabsList","response","TabsTrigger","TabsContent","content","Sidecar","graphql","AllOperationsQuery","suspenseContext","OperationList","input","useOasConfig","result","useQuery","error","ErrorPage","DeveloperHint","SyntaxHighlight","CategoryHeading","tag","StaggeredRender","fragment"],"mappings":";;;;;;;;;;AAqEgB,SAAAA,GACdC,GACAC,GAMgE;AACzD,SAAAA;AACT;AC3EO,MAAMC,KAAW,CAAC,EAAE,KAAAC,QAA2B;AACpD,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK;AAE9C,SACG,sBAAA,cAAA,OAAA,EAAI,WAAU,mDAAA,uCACZ,QAAK,EAAA,WAAU,cAAc,GAAA,WAAS,GACvC,sBAAA,cAACC,GAAW,EAAA,WAAU,6CACnBJ,GACD,sBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAS,MAAM;AACb,QAAK,UAAU,UAAU,UAAUA,CAAG,EAAE,KAAK,MAAM;AACjD,UAAAE,EAAY,EAAI,GAChB,WAAW,MAAMA,EAAY,EAAK,GAAG,GAAI;AAAA,QAAA,CAC1C;AAAA,MACH;AAAA,MACA,MAAK;AAAA,IAAA;AAAA,IAEJD,IACC,sBAAA,cAACI,GAAU,EAAA,WAAU,kBAAiB,MAAM,GAAI,CAAA,IAE/C,sBAAA,cAAAC,GAAA,EAAS,MAAM,IAAI,aAAa,KAAK;AAAA,EAG5C,CAAA,CACF;AAEJ,GC9BaC,IAAU,CAIrBC,GACAC,MAEOD,EAAI;AAAA,EACT,CAACE,GAAaC,MAAQ;AACd,UAAAC,IAAaH,EAAYE,CAAG;AAC9B,WAACD,EAAYE,CAAU,MACbF,EAAAE,CAAU,IAAI,KAEhBF,EAAAE,CAAU,EAAE,KAAKD,CAAG,GACzBD;AAAA,EACT;AAAA,EACA,CAAC;AAAA,GChBQG,KAAW,CACtBC,GACAC,MACmBD,IAAWC,EAASD,CAAQ,IAAI,QCG/CE,IAAqB,CACzBC,MAEIA,EAAU,UAAU,QAAQ,OAAOA,EAAU,UAAW,WACnDA,EAAU,SAEZ;AAAA,EACL,MA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-lNnQYwFN.js";
|
|
4
|
+
function l({
|
|
5
|
+
config: e,
|
|
6
|
+
client: t
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ React.createElement(a, { value: t }, /* @__PURE__ */ React.createElement(r, { value: { config: e } }, /* @__PURE__ */ React.createElement(o, null)));
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
l as OpenApiRoute
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=Route-xRJ9mJgH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route-
|
|
1
|
+
{"version":3,"file":"Route-xRJ9mJgH.js","sources":["../src/lib/plugins/openapi/Route.tsx"],"sourcesContent":["import { Outlet } from \"react-router-dom\";\nimport { OasConfigProvider } from \"./context.js\";\nimport { OasPluginConfig } from \"./interfaces.js\";\n\nimport { Provider, Client as UrqlClient } from \"./util/urql.js\";\n\nexport function OpenApiRoute({\n config,\n client,\n}: {\n config: OasPluginConfig;\n client: typeof UrqlClient;\n}) {\n return (\n <Provider value={client}>\n <OasConfigProvider value={{ config }}>\n <Outlet />\n </OasConfigProvider>\n </Provider>\n );\n}\n"],"names":["OpenApiRoute","config","client","Provider","OasConfigProvider","Outlet"],"mappings":";;;AAMO,SAASA,EAAa;AAAA,EAC3B,QAAAC;AAAA,EACA,QAAAC;AACF,GAGG;AACD,SACG,sBAAA,cAAAC,GAAA,EAAS,OAAOD,EAAA,GACd,sBAAA,cAAAE,GAAA,EAAkB,OAAO,EAAE,QAAAH,EAAO,KAChC,sBAAA,cAAAI,GAAA,IAAO,CACV,CACF;AAEJ;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as s from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { j as c } from "./jsx-runtime-
|
|
2
|
+
import { d as h, e as $, f as xe, c as V, g as Ie, u as Y, h as Ce, P as y, b as v, a as T, R as Ne, S as Ee, i as ye, j as he, F as Ae, D as Te, k as _e, l as Oe } from "./index-BLvMkqjO.js";
|
|
3
|
+
import { j as c } from "./jsx-runtime-lNnQYwFN.js";
|
|
4
4
|
import * as Pe from "react-dom";
|
|
5
|
-
import { a as Fe } from "./Markdown-
|
|
5
|
+
import { a as Fe } from "./Markdown-CCNihH_N.js";
|
|
6
6
|
function we(e, t) {
|
|
7
7
|
return s.useReducer((o, n) => t[o][n] ?? o, e);
|
|
8
8
|
}
|
|
9
9
|
var O = (e) => {
|
|
10
|
-
const { present: t, children: o } = e, n = Se(t), a = typeof o == "function" ? o({ present: n.isPresent }) : s.Children.only(o), r =
|
|
10
|
+
const { present: t, children: o } = e, n = Se(t), a = typeof o == "function" ? o({ present: n.isPresent }) : s.Children.only(o), r = h(n.ref, Me(a));
|
|
11
11
|
return typeof o == "function" || n.isPresent ? s.cloneElement(a, { ref: r }) : null;
|
|
12
12
|
};
|
|
13
13
|
O.displayName = "Presence";
|
|
@@ -62,13 +62,13 @@ function Me(e) {
|
|
|
62
62
|
let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
63
63
|
return o ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
64
64
|
}
|
|
65
|
-
var j = "rovingFocusGroup.onEntryFocus", je = { bubbles: !1, cancelable: !0 }, P = "RovingFocusGroup", [k, H, ke] =
|
|
65
|
+
var j = "rovingFocusGroup.onEntryFocus", je = { bubbles: !1, cancelable: !0 }, P = "RovingFocusGroup", [k, H, ke] = xe(P), [Le, at] = V(
|
|
66
66
|
P,
|
|
67
67
|
[ke]
|
|
68
|
-
), [Ge, Ue] = Le(P),
|
|
68
|
+
), [Ge, Ue] = Le(P), z = s.forwardRef(
|
|
69
69
|
(e, t) => /* @__PURE__ */ c.jsx(k.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(k.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(We, { ...e, ref: t }) }) })
|
|
70
70
|
);
|
|
71
|
-
|
|
71
|
+
z.displayName = P;
|
|
72
72
|
var We = s.forwardRef((e, t) => {
|
|
73
73
|
const {
|
|
74
74
|
__scopeRovingFocusGroup: o,
|
|
@@ -81,11 +81,11 @@ var We = s.forwardRef((e, t) => {
|
|
|
81
81
|
onEntryFocus: i,
|
|
82
82
|
preventScrollOnEntryFocus: g = !1,
|
|
83
83
|
...m
|
|
84
|
-
} = e, I = s.useRef(null), D =
|
|
84
|
+
} = e, I = s.useRef(null), D = h(t, I), f = Ie(r), [C = null, F] = Y({
|
|
85
85
|
prop: u,
|
|
86
86
|
defaultProp: d,
|
|
87
87
|
onChange: l
|
|
88
|
-
}), [
|
|
88
|
+
}), [b, x] = s.useState(!1), w = Ce(i), pe = H(o), S = s.useRef(!1), [me, K] = s.useState(0);
|
|
89
89
|
return s.useEffect(() => {
|
|
90
90
|
const p = I.current;
|
|
91
91
|
if (p)
|
|
@@ -102,7 +102,7 @@ var We = s.forwardRef((e, t) => {
|
|
|
102
102
|
(p) => F(p),
|
|
103
103
|
[F]
|
|
104
104
|
),
|
|
105
|
-
onItemShiftTab: s.useCallback(() =>
|
|
105
|
+
onItemShiftTab: s.useCallback(() => x(!0), []),
|
|
106
106
|
onFocusableItemAdd: s.useCallback(
|
|
107
107
|
() => K((p) => p + 1),
|
|
108
108
|
[]
|
|
@@ -112,9 +112,9 @@ var We = s.forwardRef((e, t) => {
|
|
|
112
112
|
[]
|
|
113
113
|
),
|
|
114
114
|
children: /* @__PURE__ */ c.jsx(
|
|
115
|
-
|
|
115
|
+
y.div,
|
|
116
116
|
{
|
|
117
|
-
tabIndex:
|
|
117
|
+
tabIndex: b || me === 0 ? -1 : 0,
|
|
118
118
|
"data-orientation": n,
|
|
119
119
|
...m,
|
|
120
120
|
ref: D,
|
|
@@ -124,10 +124,10 @@ var We = s.forwardRef((e, t) => {
|
|
|
124
124
|
}),
|
|
125
125
|
onFocus: v(e.onFocus, (p) => {
|
|
126
126
|
const ve = !S.current;
|
|
127
|
-
if (p.target === p.currentTarget && ve && !
|
|
127
|
+
if (p.target === p.currentTarget && ve && !b) {
|
|
128
128
|
const B = new CustomEvent(j, je);
|
|
129
129
|
if (p.currentTarget.dispatchEvent(B), !B.defaultPrevented) {
|
|
130
|
-
const M = pe().filter((N) => N.focusable), Re = M.find((N) => N.active),
|
|
130
|
+
const M = pe().filter((N) => N.focusable), Re = M.find((N) => N.active), be = M.find((N) => N.id === C), De = [Re, be, ...M].filter(
|
|
131
131
|
Boolean
|
|
132
132
|
).map((N) => N.ref.current);
|
|
133
133
|
J(De, g);
|
|
@@ -135,12 +135,12 @@ var We = s.forwardRef((e, t) => {
|
|
|
135
135
|
}
|
|
136
136
|
S.current = !1;
|
|
137
137
|
}),
|
|
138
|
-
onBlur: v(e.onBlur, () =>
|
|
138
|
+
onBlur: v(e.onBlur, () => x(!1))
|
|
139
139
|
}
|
|
140
140
|
)
|
|
141
141
|
}
|
|
142
142
|
);
|
|
143
|
-
}),
|
|
143
|
+
}), q = "RovingFocusGroupItem", Z = s.forwardRef(
|
|
144
144
|
(e, t) => {
|
|
145
145
|
const {
|
|
146
146
|
__scopeRovingFocusGroup: o,
|
|
@@ -148,7 +148,7 @@ var We = s.forwardRef((e, t) => {
|
|
|
148
148
|
active: a = !1,
|
|
149
149
|
tabStopId: r,
|
|
150
150
|
...u
|
|
151
|
-
} = e, d = T(), l = r || d, i = Ue(
|
|
151
|
+
} = e, d = T(), l = r || d, i = Ue(q, o), g = i.currentTabStopId === l, m = H(o), { onFocusableItemAdd: I, onFocusableItemRemove: D } = i;
|
|
152
152
|
return s.useEffect(() => {
|
|
153
153
|
if (n)
|
|
154
154
|
return I(), () => D();
|
|
@@ -160,7 +160,7 @@ var We = s.forwardRef((e, t) => {
|
|
|
160
160
|
focusable: n,
|
|
161
161
|
active: a,
|
|
162
162
|
children: /* @__PURE__ */ c.jsx(
|
|
163
|
-
|
|
163
|
+
y.span,
|
|
164
164
|
{
|
|
165
165
|
tabIndex: g ? 0 : -1,
|
|
166
166
|
"data-orientation": i.orientation,
|
|
@@ -180,14 +180,14 @@ var We = s.forwardRef((e, t) => {
|
|
|
180
180
|
if (C !== void 0) {
|
|
181
181
|
if (f.metaKey || f.ctrlKey || f.altKey || f.shiftKey) return;
|
|
182
182
|
f.preventDefault();
|
|
183
|
-
let
|
|
184
|
-
if (C === "last")
|
|
183
|
+
let b = m().filter((x) => x.focusable).map((x) => x.ref.current);
|
|
184
|
+
if (C === "last") b.reverse();
|
|
185
185
|
else if (C === "prev" || C === "next") {
|
|
186
|
-
C === "prev" &&
|
|
187
|
-
const
|
|
188
|
-
|
|
186
|
+
C === "prev" && b.reverse();
|
|
187
|
+
const x = b.indexOf(f.currentTarget);
|
|
188
|
+
b = i.loop ? Ve(b, x + 1) : b.slice(x + 1);
|
|
189
189
|
}
|
|
190
|
-
setTimeout(() => J(
|
|
190
|
+
setTimeout(() => J(b));
|
|
191
191
|
}
|
|
192
192
|
})
|
|
193
193
|
}
|
|
@@ -196,7 +196,7 @@ var We = s.forwardRef((e, t) => {
|
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
198
|
);
|
|
199
|
-
Z.displayName =
|
|
199
|
+
Z.displayName = q;
|
|
200
200
|
var Ke = {
|
|
201
201
|
ArrowLeft: "prev",
|
|
202
202
|
ArrowUp: "prev",
|
|
@@ -223,7 +223,7 @@ function J(e, t = !1) {
|
|
|
223
223
|
function Ve(e, t) {
|
|
224
224
|
return e.map((o, n) => e[(t + n) % e.length]);
|
|
225
225
|
}
|
|
226
|
-
var st =
|
|
226
|
+
var st = z, it = Z, L = "Dialog", [Q, ct] = V(L), [Ye, R] = Q(L), X = (e) => {
|
|
227
227
|
const {
|
|
228
228
|
__scopeDialog: t,
|
|
229
229
|
children: o,
|
|
@@ -256,9 +256,9 @@ var st = q, it = Z, L = "Dialog", [Q, ct] = V(L), [Ye, R] = Q(L), X = (e) => {
|
|
|
256
256
|
X.displayName = L;
|
|
257
257
|
var ee = "DialogTrigger", te = s.forwardRef(
|
|
258
258
|
(e, t) => {
|
|
259
|
-
const { __scopeDialog: o, ...n } = e, a = R(ee, o), r =
|
|
259
|
+
const { __scopeDialog: o, ...n } = e, a = R(ee, o), r = h(t, a.triggerRef);
|
|
260
260
|
return /* @__PURE__ */ c.jsx(
|
|
261
|
-
|
|
261
|
+
y.button,
|
|
262
262
|
{
|
|
263
263
|
type: "button",
|
|
264
264
|
"aria-haspopup": "dialog",
|
|
@@ -283,18 +283,18 @@ oe.displayName = G;
|
|
|
283
283
|
var _ = "DialogOverlay", re = s.forwardRef(
|
|
284
284
|
(e, t) => {
|
|
285
285
|
const o = ne(_, e.__scopeDialog), { forceMount: n = o.forceMount, ...a } = e, r = R(_, e.__scopeDialog);
|
|
286
|
-
return r.modal ? /* @__PURE__ */ c.jsx(O, { present: n || r.open, children: /* @__PURE__ */ c.jsx(
|
|
286
|
+
return r.modal ? /* @__PURE__ */ c.jsx(O, { present: n || r.open, children: /* @__PURE__ */ c.jsx(ze, { ...a, ref: t }) }) : null;
|
|
287
287
|
}
|
|
288
288
|
);
|
|
289
289
|
re.displayName = _;
|
|
290
|
-
var
|
|
290
|
+
var ze = s.forwardRef(
|
|
291
291
|
(e, t) => {
|
|
292
292
|
const { __scopeDialog: o, ...n } = e, a = R(_, o);
|
|
293
293
|
return (
|
|
294
294
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
295
295
|
// ie. when `Overlay` and `Content` are siblings
|
|
296
296
|
/* @__PURE__ */ c.jsx(Ne, { as: Ee, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ c.jsx(
|
|
297
|
-
|
|
297
|
+
y.div,
|
|
298
298
|
{
|
|
299
299
|
"data-state": W(a.open),
|
|
300
300
|
...n,
|
|
@@ -307,16 +307,16 @@ var qe = s.forwardRef(
|
|
|
307
307
|
), E = "DialogContent", ae = s.forwardRef(
|
|
308
308
|
(e, t) => {
|
|
309
309
|
const o = ne(E, e.__scopeDialog), { forceMount: n = o.forceMount, ...a } = e, r = R(E, e.__scopeDialog);
|
|
310
|
-
return /* @__PURE__ */ c.jsx(O, { present: n || r.open, children: r.modal ? /* @__PURE__ */ c.jsx(
|
|
310
|
+
return /* @__PURE__ */ c.jsx(O, { present: n || r.open, children: r.modal ? /* @__PURE__ */ c.jsx(qe, { ...a, ref: t }) : /* @__PURE__ */ c.jsx(Ze, { ...a, ref: t }) });
|
|
311
311
|
}
|
|
312
312
|
);
|
|
313
313
|
ae.displayName = E;
|
|
314
|
-
var
|
|
314
|
+
var qe = s.forwardRef(
|
|
315
315
|
(e, t) => {
|
|
316
|
-
const o = R(E, e.__scopeDialog), n = s.useRef(null), a =
|
|
316
|
+
const o = R(E, e.__scopeDialog), n = s.useRef(null), a = h(t, o.contentRef, n);
|
|
317
317
|
return s.useEffect(() => {
|
|
318
318
|
const r = n.current;
|
|
319
|
-
if (r) return
|
|
319
|
+
if (r) return ye(r);
|
|
320
320
|
}, []), /* @__PURE__ */ c.jsx(
|
|
321
321
|
se,
|
|
322
322
|
{
|
|
@@ -364,8 +364,8 @@ var ze = s.forwardRef(
|
|
|
364
364
|
}
|
|
365
365
|
), se = s.forwardRef(
|
|
366
366
|
(e, t) => {
|
|
367
|
-
const { __scopeDialog: o, trapFocus: n, onOpenAutoFocus: a, onCloseAutoFocus: r, ...u } = e, d = R(E, o), l = s.useRef(null), i =
|
|
368
|
-
return
|
|
367
|
+
const { __scopeDialog: o, trapFocus: n, onOpenAutoFocus: a, onCloseAutoFocus: r, ...u } = e, d = R(E, o), l = s.useRef(null), i = h(t, l);
|
|
368
|
+
return he(), /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
369
369
|
/* @__PURE__ */ c.jsx(
|
|
370
370
|
Ae,
|
|
371
371
|
{
|
|
@@ -398,14 +398,14 @@ var ze = s.forwardRef(
|
|
|
398
398
|
), U = "DialogTitle", ie = s.forwardRef(
|
|
399
399
|
(e, t) => {
|
|
400
400
|
const { __scopeDialog: o, ...n } = e, a = R(U, o);
|
|
401
|
-
return /* @__PURE__ */ c.jsx(
|
|
401
|
+
return /* @__PURE__ */ c.jsx(y.h2, { id: a.titleId, ...n, ref: t });
|
|
402
402
|
}
|
|
403
403
|
);
|
|
404
404
|
ie.displayName = U;
|
|
405
405
|
var ce = "DialogDescription", ue = s.forwardRef(
|
|
406
406
|
(e, t) => {
|
|
407
407
|
const { __scopeDialog: o, ...n } = e, a = R(ce, o);
|
|
408
|
-
return /* @__PURE__ */ c.jsx(
|
|
408
|
+
return /* @__PURE__ */ c.jsx(y.p, { id: a.descriptionId, ...n, ref: t });
|
|
409
409
|
}
|
|
410
410
|
);
|
|
411
411
|
ue.displayName = ce;
|
|
@@ -413,7 +413,7 @@ var le = "DialogClose", de = s.forwardRef(
|
|
|
413
413
|
(e, t) => {
|
|
414
414
|
const { __scopeDialog: o, ...n } = e, a = R(le, o);
|
|
415
415
|
return /* @__PURE__ */ c.jsx(
|
|
416
|
-
|
|
416
|
+
y.button,
|
|
417
417
|
{
|
|
418
418
|
type: "button",
|
|
419
419
|
...n,
|
|
@@ -448,7 +448,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
448
448
|
t && a && (document.getElementById(t) || console.warn(n));
|
|
449
449
|
}, [n, e, t]), null;
|
|
450
450
|
}, lt = X, dt = te, ft = oe, gt = re, pt = ae, mt = ie, vt = ue, Rt = de;
|
|
451
|
-
const
|
|
451
|
+
const bt = {
|
|
452
452
|
green: "text-green-600",
|
|
453
453
|
blue: "text-sky-600",
|
|
454
454
|
yellow: "text-yellow-600",
|
|
@@ -468,16 +468,16 @@ const xt = {
|
|
|
468
468
|
color: e,
|
|
469
469
|
label: t,
|
|
470
470
|
className: o
|
|
471
|
-
}) => /* @__PURE__ */
|
|
471
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
472
472
|
"span",
|
|
473
473
|
{
|
|
474
474
|
className: Fe(
|
|
475
475
|
"mt-0.5 flex items-center duration-200 transition-opacity text-center uppercase font-mono text-[0.65rem] font-bold rounded text-background dark:text-zinc-50 h-4 px-1",
|
|
476
476
|
et[e],
|
|
477
477
|
o
|
|
478
|
-
)
|
|
479
|
-
|
|
480
|
-
|
|
478
|
+
)
|
|
479
|
+
},
|
|
480
|
+
t
|
|
481
481
|
);
|
|
482
482
|
export {
|
|
483
483
|
pt as C,
|
|
@@ -493,6 +493,6 @@ export {
|
|
|
493
493
|
at as c,
|
|
494
494
|
mt as d,
|
|
495
495
|
lt as e,
|
|
496
|
-
|
|
496
|
+
bt as f
|
|
497
497
|
};
|
|
498
|
-
//# sourceMappingURL=SidebarBadge-
|
|
498
|
+
//# sourceMappingURL=SidebarBadge-2JcxswKF.js.map
|