chore(docs): Updated UI Reference (automated) (#13968)
* chore(docs): Generated + Updated UI Reference (automated) * fix react-docs-generator not resolving external types * sort undefined --------- Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
committed by
GitHub
parent
924d651188
commit
423b6d94dc
@@ -16,8 +16,8 @@
|
||||
"dependencies": {
|
||||
"@mdx-js/loader": "^3.1.0",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@medusajs/icons": "2.11.2",
|
||||
"@medusajs/ui": "4.0.26",
|
||||
"@medusajs/icons": "2.11.3",
|
||||
"@medusajs/ui": "4.0.27",
|
||||
"@next/mdx": "15.3.5",
|
||||
"@react-hook/resize-observer": "^2.0.2",
|
||||
"@readme/openapi-parser": "^2.5.0",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"dependencies": {
|
||||
"@mdx-js/loader": "^3.1.0",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@medusajs/icons": "2.11.2",
|
||||
"@medusajs/icons": "2.11.3",
|
||||
"@next/mdx": "15.3.5",
|
||||
"@stefanprobst/rehype-extract-toc": "^3.0.0",
|
||||
"clsx": "^2.1.0",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"dependencies": {
|
||||
"@mdx-js/loader": "^3.1.0",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@medusajs/icons": "2.11.2",
|
||||
"@medusajs/icons": "2.11.3",
|
||||
"@next/mdx": "15.3.5",
|
||||
"@sanity/client": "^7.11.0",
|
||||
"@stefanprobst/rehype-extract-toc": "^3.0.0",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"dependencies": {
|
||||
"@mdx-js/loader": "^3.1.0",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@medusajs/icons": "2.11.2",
|
||||
"@medusajs/icons": "2.11.3",
|
||||
"@next/mdx": "15.3.5",
|
||||
"@stefanprobst/rehype-extract-toc": "^3.0.0",
|
||||
"clsx": "^2.1.0",
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
"dependencies": {
|
||||
"@mdx-js/loader": "^3.1.0",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@medusajs/icons": "2.11.2",
|
||||
"@medusajs/ui": "4.0.26",
|
||||
"@medusajs/ui-preset": "2.11.2",
|
||||
"@medusajs/icons": "2.11.3",
|
||||
"@medusajs/ui": "4.0.27",
|
||||
"@medusajs/ui-preset": "2.11.3",
|
||||
"@next/mdx": "15.3.5",
|
||||
"@stefanprobst/rehype-extract-toc": "^3.0.0",
|
||||
"clsx": "^2.1.0",
|
||||
|
||||
@@ -31,6 +31,13 @@
|
||||
"name": "string"
|
||||
}
|
||||
},
|
||||
"autoComplete": {
|
||||
"description": "Describes the type of autocomplete functionality the input should provide if any. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete).",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
}
|
||||
},
|
||||
"autoFocus": {
|
||||
"description": "Whether the element should receive focus on render.",
|
||||
"required": false,
|
||||
@@ -88,6 +95,51 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"firstDayOfWeek": {
|
||||
"description": "The day that starts the week.",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "union",
|
||||
"raw": "\"sun\" \\| \"mon\" \\| \"tue\" \\| \"wed\" \\| \"thu\" \\| \"fri\" \\| \"sat\"",
|
||||
"elements": [
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"sun\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"mon\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"tue\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"wed\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"thu\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"fri\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"sat\""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"form": {
|
||||
"description": "The `<form>` element to associate the input with.\nThe value of this attribute must be the id of a `<form>` in the same document.\nSee [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form).",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
}
|
||||
},
|
||||
"hideTimeZone": {
|
||||
"description": "Whether to hide the time zone abbreviation.",
|
||||
"required": false,
|
||||
@@ -331,8 +383,11 @@
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "union",
|
||||
"raw": "CalendarDate \\| CalendarDateTime",
|
||||
"raw": "null \\| CalendarDate \\| CalendarDateTime",
|
||||
"elements": [
|
||||
{
|
||||
"name": "null"
|
||||
},
|
||||
{
|
||||
"name": "CalendarDate",
|
||||
"elements": [],
|
||||
|
||||
@@ -10,9 +10,36 @@
|
||||
},
|
||||
"description": "The position of the created toasts.",
|
||||
"tsType": {
|
||||
"name": "Position",
|
||||
"elements": [],
|
||||
"raw": "Position"
|
||||
"name": "union",
|
||||
"elements": [
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"top-left\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"top-center\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"top-right\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"bottom-left\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"bottom-center\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"bottom-right\""
|
||||
},
|
||||
{
|
||||
"name": "undefined"
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": false
|
||||
},
|
||||
@@ -35,13 +62,15 @@
|
||||
"description": "The space from the edges of the screen.",
|
||||
"tsType": {
|
||||
"name": "union",
|
||||
"raw": "string \\| number",
|
||||
"elements": [
|
||||
{
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"name": "number"
|
||||
},
|
||||
{
|
||||
"name": "undefined"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"dependencies": {
|
||||
"@mdx-js/loader": "^3.1.0",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@medusajs/icons": "2.11.2",
|
||||
"@medusajs/icons": "2.11.3",
|
||||
"@next/mdx": "15.3.5",
|
||||
"@stefanprobst/rehype-extract-toc": "^3.0.0",
|
||||
"clsx": "^2.1.0",
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
"dependencies": {
|
||||
"@emotion/is-prop-valid": "^1.3.1",
|
||||
"@kapaai/react-sdk": "^0.9.0",
|
||||
"@medusajs/icons": "2.11.2",
|
||||
"@medusajs/ui": "4.0.26",
|
||||
"@medusajs/icons": "2.11.3",
|
||||
"@medusajs/ui": "4.0.27",
|
||||
"@next/third-parties": "15.3.5",
|
||||
"@react-hook/resize-observer": "^1.2.6",
|
||||
"@segment/analytics-next": "^1.75.0",
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"postcss.config.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@medusajs/ui-preset": "2.11.2",
|
||||
"@medusajs/ui-preset": "2.11.3",
|
||||
"tailwindcss-animate": "^1.0.7"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/icons": "2.11.2",
|
||||
"@medusajs/icons": "2.11.3",
|
||||
"@types/node": "^20.11.20",
|
||||
"rimraf": "^5.0.5",
|
||||
"tsconfig": "*",
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
TSFunctionSignatureType,
|
||||
TypeDescriptor,
|
||||
} from "react-docgen/dist/Documentation.js"
|
||||
import { Comment, ReferenceReflection, ReferenceType } from "typedoc"
|
||||
import { Comment, ReferenceReflection } from "typedoc"
|
||||
import {
|
||||
Application,
|
||||
Context,
|
||||
@@ -18,12 +18,14 @@ import {
|
||||
SomeType,
|
||||
SourceReference,
|
||||
} from "typedoc"
|
||||
import ts from "typescript"
|
||||
import {
|
||||
getFunctionType,
|
||||
getProjectChild,
|
||||
getType,
|
||||
getTypeChildren,
|
||||
} from "utils"
|
||||
import { getTypescriptTsType } from "../utils/get-typescript-ts-type.js"
|
||||
|
||||
type MappedReflectionSignature = {
|
||||
source: SourceReference
|
||||
@@ -36,7 +38,7 @@ type Options = {
|
||||
verbose?: boolean
|
||||
}
|
||||
|
||||
type TsType = TypeDescriptor<TSFunctionSignatureType>
|
||||
export type TsType = TypeDescriptor<TSFunctionSignatureType>
|
||||
|
||||
type ExcludeExternalOptions = {
|
||||
parentReflection: DeclarationReflection
|
||||
@@ -121,17 +123,14 @@ export default class TypedocManager {
|
||||
return spec
|
||||
}
|
||||
|
||||
const doesReflectionHaveSignature =
|
||||
reflection.type?.type === "reference" &&
|
||||
reflection.type.reflection instanceof DeclarationReflection &&
|
||||
reflection.type.reflection.signatures?.length
|
||||
if (reflection.type?.type === "reference") {
|
||||
reflection = reflection.type.reflection as DeclarationReflection
|
||||
}
|
||||
|
||||
let signature: SignatureReflection | undefined
|
||||
let props: DeclarationReflection[] = []
|
||||
if (doesReflectionHaveSignature) {
|
||||
signature = (
|
||||
(reflection.type! as ReferenceType).reflection as DeclarationReflection
|
||||
).signatures![0]
|
||||
if (reflection.signatures?.length) {
|
||||
signature = reflection.signatures![0]
|
||||
props =
|
||||
signature?.parameters?.length && signature.parameters[0].type
|
||||
? getTypeChildren({
|
||||
@@ -282,7 +281,7 @@ export default class TypedocManager {
|
||||
|
||||
// Retrieves the `tsType` stored in a spec's prop
|
||||
// The format is based on the expected format of React Docgen.
|
||||
getTsType(reflectionType: SomeType, level = 1): TsType {
|
||||
getTsType(reflectionType: SomeType, symbol?: ts.Symbol, level = 1): TsType {
|
||||
const rawValue = getType({
|
||||
reflectionType,
|
||||
...this.getTypeOptions,
|
||||
@@ -294,7 +293,11 @@ export default class TypedocManager {
|
||||
}
|
||||
switch (reflectionType.type) {
|
||||
case "array": {
|
||||
const elements = this.getTsType(reflectionType.elementType, level + 1)
|
||||
const elements = this.getTsType(
|
||||
reflectionType.elementType,
|
||||
symbol,
|
||||
level + 1
|
||||
)
|
||||
return {
|
||||
name: "Array",
|
||||
elements: [elements],
|
||||
@@ -306,16 +309,27 @@ export default class TypedocManager {
|
||||
(reflectionType.reflection as DeclarationReflection) ||
|
||||
getProjectChild(this.project!, reflectionType.name)
|
||||
const elements: TsType[] = []
|
||||
if (!referenceReflection && symbol) {
|
||||
return (
|
||||
getTypescriptTsType(symbol) || {
|
||||
name: reflectionType.name,
|
||||
raw: rawValue,
|
||||
elements,
|
||||
}
|
||||
)
|
||||
}
|
||||
if (referenceReflection?.children) {
|
||||
referenceReflection.children?.forEach((child) => {
|
||||
if (!child.type) {
|
||||
return
|
||||
}
|
||||
|
||||
elements.push(this.getTsType(child.type, level + 1))
|
||||
elements.push(this.getTsType(child.type, symbol, level + 1))
|
||||
})
|
||||
} else if (referenceReflection?.type) {
|
||||
elements.push(this.getTsType(referenceReflection.type, level + 1))
|
||||
elements.push(
|
||||
this.getTsType(referenceReflection.type, symbol, level + 1)
|
||||
)
|
||||
}
|
||||
return {
|
||||
name: reflectionType.name,
|
||||
@@ -344,7 +358,7 @@ export default class TypedocManager {
|
||||
typeData.signature.properties.push({
|
||||
key: property.name,
|
||||
value: property.type
|
||||
? this.getTsType(property.type, level + 1)
|
||||
? this.getTsType(property.type, symbol, level + 1)
|
||||
: {
|
||||
name: "unknown",
|
||||
},
|
||||
@@ -390,7 +404,7 @@ export default class TypedocManager {
|
||||
const elementData: TsType[] = []
|
||||
|
||||
elements.forEach((element) => {
|
||||
elementData.push(this.getTsType(element, level + 1))
|
||||
elementData.push(this.getTsType(element, undefined, level + 1))
|
||||
})
|
||||
|
||||
return elementData
|
||||
@@ -462,10 +476,12 @@ export default class TypedocManager {
|
||||
return: undefined,
|
||||
},
|
||||
}
|
||||
const signatureSymbol = this.getReflectionSymbol(signature)
|
||||
|
||||
signature.parameters?.forEach((parameter) => {
|
||||
const parameterSymbol = this.getReflectionSymbol(parameter)
|
||||
const parameterType = parameter.type
|
||||
? this.getTsType(parameter.type, level + 1)
|
||||
? this.getTsType(parameter.type, parameterSymbol, level + 1)
|
||||
: undefined
|
||||
typeData.signature.arguments.push({
|
||||
name: parameter.name,
|
||||
@@ -475,14 +491,14 @@ export default class TypedocManager {
|
||||
})
|
||||
|
||||
typeData.signature.return = signature.type
|
||||
? this.getTsType(signature.type, level + 1)
|
||||
? this.getTsType(signature.type, signatureSymbol, level + 1)
|
||||
: undefined
|
||||
|
||||
return typeData
|
||||
}
|
||||
|
||||
// Checks if a TsType only has a `name` field.
|
||||
doesOnlyHaveName(obj: TsType): boolean {
|
||||
onlyHasName(obj: TsType): boolean {
|
||||
const primitiveTypes = ["string", "number", "object", "boolean", "function"]
|
||||
const keys = Object.keys(obj)
|
||||
|
||||
@@ -493,6 +509,34 @@ export default class TypedocManager {
|
||||
)
|
||||
}
|
||||
|
||||
isRawTypeEmpty(tsType: TsType): boolean {
|
||||
if (!("raw" in tsType)) {
|
||||
return false
|
||||
}
|
||||
|
||||
if ("elements" in tsType && tsType.elements.length > 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
if ("signature" in tsType && tsType.signature) {
|
||||
if (
|
||||
"arguments" in tsType.signature &&
|
||||
tsType.signature.arguments.length > 0
|
||||
) {
|
||||
return false
|
||||
}
|
||||
if (
|
||||
"properties" in tsType.signature &&
|
||||
tsType.signature.properties.length > 0
|
||||
) {
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// retrieves a reflection by the provided name
|
||||
// and check if its type is ReactNode
|
||||
// this is useful for the CustomResolver to check
|
||||
@@ -559,7 +603,10 @@ export default class TypedocManager {
|
||||
return null
|
||||
}
|
||||
|
||||
return this.getTsType(childReflection.type as SomeType)
|
||||
return this.getTsType(
|
||||
childReflection.type as SomeType,
|
||||
this.getReflectionSymbol(childReflection)
|
||||
)
|
||||
}
|
||||
|
||||
// used to check if a reflection (typically of a prop)
|
||||
@@ -686,4 +733,8 @@ export default class TypedocManager {
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
|
||||
getReflectionSymbol(reflection: Reflection): ts.Symbol | undefined {
|
||||
return this.project?.getSymbolFromReflection(reflection)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ function resolveDocumentation(
|
||||
utils.setPropDescription(documentation, propertyPath)
|
||||
|
||||
// set type if missing
|
||||
if (!propDescriptor.tsType && typedocManager) {
|
||||
if (typedocManager && !propDescriptor.tsType) {
|
||||
const typeAnnotation = utils.getTypeAnnotation(path)
|
||||
if (typeAnnotation?.isTSTypeReference()) {
|
||||
const typeName = typeAnnotation.get("typeName")
|
||||
@@ -71,7 +71,8 @@ function resolveDocumentation(
|
||||
}
|
||||
} else if (
|
||||
propDescriptor.tsType &&
|
||||
typedocManager?.doesOnlyHaveName(propDescriptor.tsType)
|
||||
(typedocManager?.onlyHasName(propDescriptor.tsType) ||
|
||||
typedocManager?.isRawTypeEmpty(propDescriptor.tsType))
|
||||
) {
|
||||
// see if the type needs to be resolved.
|
||||
const typeReflection = typedocManager?.getReflectionByName(
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
import ts from "typescript"
|
||||
import { TsType } from "../classes/typedoc-manager.js"
|
||||
|
||||
const MAX_LEVEL = 3
|
||||
|
||||
export function getTypescriptTsType(
|
||||
symbol: ts.Symbol | undefined
|
||||
): TsType | null {
|
||||
if (!symbol) {
|
||||
return null
|
||||
}
|
||||
let convertedType: TsType | null = null
|
||||
if ("type" in symbol) {
|
||||
convertedType = convertTypeToTsType(symbol.type as ts.Type, 1)
|
||||
}
|
||||
if (
|
||||
!convertedType &&
|
||||
"links" in symbol &&
|
||||
"type" in (symbol.links as Record<string, unknown>)
|
||||
) {
|
||||
const symbolTypeLink = (symbol.links as Record<string, unknown>)
|
||||
.type as ts.Type
|
||||
|
||||
convertedType = convertTypeToTsType(symbolTypeLink, 1)
|
||||
}
|
||||
|
||||
return convertedType
|
||||
}
|
||||
|
||||
function convertTypeToTsType(type: ts.Type, level = 1): TsType | null {
|
||||
if (level > MAX_LEVEL) {
|
||||
return null
|
||||
}
|
||||
|
||||
// Handle union types
|
||||
if (type.isUnion()) {
|
||||
const elements: TsType[] = type.types
|
||||
.map((unionedType) => convertTypeToTsType(unionedType, level + 1))
|
||||
.filter((element): element is TsType => element !== null)
|
||||
|
||||
// If all elements were filtered out, return null
|
||||
if (elements.length === 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
// Sort elements to put undefined at the end
|
||||
elements.sort((a, b) => {
|
||||
const aIsUndefined = a.name === "undefined"
|
||||
const bIsUndefined = b.name === "undefined"
|
||||
|
||||
if (aIsUndefined && !bIsUndefined) {
|
||||
return 1
|
||||
}
|
||||
if (!aIsUndefined && bIsUndefined) {
|
||||
return -1
|
||||
}
|
||||
return 0
|
||||
})
|
||||
|
||||
return {
|
||||
name: "union",
|
||||
raw: undefined,
|
||||
elements,
|
||||
}
|
||||
}
|
||||
|
||||
// Handle intersection types
|
||||
if (type.isIntersection()) {
|
||||
const elements: TsType[] = type.types
|
||||
.map((intersectedType) => convertTypeToTsType(intersectedType, level + 1))
|
||||
.filter((element): element is TsType => element !== null)
|
||||
|
||||
// If all elements were filtered out, return null
|
||||
if (elements.length === 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
return {
|
||||
name: "intersection",
|
||||
raw: undefined,
|
||||
elements,
|
||||
}
|
||||
}
|
||||
|
||||
const typeFlags = type.flags
|
||||
|
||||
// Handle string literal
|
||||
if (typeFlags & ts.TypeFlags.StringLiteral) {
|
||||
const literalType = type as ts.StringLiteralType
|
||||
return {
|
||||
name: "literal",
|
||||
value: `"${literalType.value}"`,
|
||||
}
|
||||
}
|
||||
|
||||
// Handle number literal
|
||||
if (typeFlags & ts.TypeFlags.NumberLiteral) {
|
||||
const literalType = type as ts.NumberLiteralType
|
||||
return {
|
||||
name: "literal",
|
||||
value: literalType.value.toString(),
|
||||
}
|
||||
}
|
||||
|
||||
// Handle boolean literal
|
||||
if (typeFlags & ts.TypeFlags.BooleanLiteral) {
|
||||
const literalType = type as ts.Type & { intrinsicName?: string }
|
||||
return {
|
||||
name: "literal",
|
||||
value: literalType.intrinsicName || "boolean",
|
||||
}
|
||||
}
|
||||
|
||||
// Handle null
|
||||
if (typeFlags & ts.TypeFlags.Null) {
|
||||
return {
|
||||
name: "null",
|
||||
}
|
||||
}
|
||||
|
||||
// Handle undefined
|
||||
if (typeFlags & ts.TypeFlags.Undefined) {
|
||||
return {
|
||||
name: "undefined",
|
||||
}
|
||||
}
|
||||
|
||||
// Handle primitive types
|
||||
if (typeFlags & ts.TypeFlags.String) {
|
||||
return { name: "string" }
|
||||
}
|
||||
if (typeFlags & ts.TypeFlags.Number) {
|
||||
return { name: "number" }
|
||||
}
|
||||
if (typeFlags & ts.TypeFlags.Boolean) {
|
||||
return { name: "boolean" }
|
||||
}
|
||||
if (typeFlags & ts.TypeFlags.Void) {
|
||||
return { name: "void" }
|
||||
}
|
||||
if (typeFlags & ts.TypeFlags.Any) {
|
||||
return { name: "any" }
|
||||
}
|
||||
if (typeFlags & ts.TypeFlags.Unknown) {
|
||||
return null
|
||||
}
|
||||
if (typeFlags & ts.TypeFlags.Never) {
|
||||
return { name: "never" }
|
||||
}
|
||||
|
||||
// Handle object types
|
||||
if (typeFlags & ts.TypeFlags.Object) {
|
||||
const objectType = type as ts.ObjectType
|
||||
|
||||
// Handle reference types (named types)
|
||||
if (objectType.objectFlags & ts.ObjectFlags.Reference) {
|
||||
const typeRef = type as ts.TypeReference
|
||||
const typeName = typeRef.symbol?.name || "unknown"
|
||||
|
||||
const elements: TsType[] = []
|
||||
if (typeRef.typeArguments) {
|
||||
typeRef.typeArguments.forEach((typeArg) => {
|
||||
const convertedType = convertTypeToTsType(typeArg, level + 1)
|
||||
if (convertedType) {
|
||||
elements.push(convertedType)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
name: typeRef.symbol?.name || typeName,
|
||||
elements: elements.length > 0 ? elements : undefined,
|
||||
raw: undefined,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback: return the string representation of the type
|
||||
return null
|
||||
}
|
||||
@@ -737,7 +737,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@dnd-kit/core@npm:^6.0.0":
|
||||
"@dnd-kit/core@npm:^6.1.0":
|
||||
version: 6.3.1
|
||||
resolution: "@dnd-kit/core@npm:6.3.1"
|
||||
dependencies:
|
||||
@@ -751,20 +751,20 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@dnd-kit/sortable@npm:^7.0.0":
|
||||
version: 7.0.2
|
||||
resolution: "@dnd-kit/sortable@npm:7.0.2"
|
||||
"@dnd-kit/sortable@npm:^8.0.0":
|
||||
version: 8.0.0
|
||||
resolution: "@dnd-kit/sortable@npm:8.0.0"
|
||||
dependencies:
|
||||
"@dnd-kit/utilities": ^3.2.0
|
||||
"@dnd-kit/utilities": ^3.2.2
|
||||
tslib: ^2.0.0
|
||||
peerDependencies:
|
||||
"@dnd-kit/core": ^6.0.7
|
||||
"@dnd-kit/core": ^6.1.0
|
||||
react: ">=16.8.0"
|
||||
checksum: 06aeb113eeeb470bb2443bf1c48d597157bb3a1caa9740e60c2fa73a3076e753cd083a2d381f0556bd7e9873e851a49ce8ea14796ac02e2d796eabea4e27196d
|
||||
checksum: a6066c652b892c6a11320c7d8f5c18fdf723e721e8eea37f4ab657dee1ac5e7ca710ac32ce0712a57fe968bc07c13bcea5d5599d90dfdd95619e162befd4d2fb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@dnd-kit/utilities@npm:^3.2.0, @dnd-kit/utilities@npm:^3.2.2":
|
||||
"@dnd-kit/utilities@npm:^3.2.2":
|
||||
version: 3.2.2
|
||||
resolution: "@dnd-kit/utilities@npm:3.2.2"
|
||||
dependencies:
|
||||
@@ -1533,35 +1533,35 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@medusajs/icons@npm:2.11.2":
|
||||
version: 2.11.2
|
||||
resolution: "@medusajs/icons@npm:2.11.2"
|
||||
"@medusajs/icons@npm:2.11.3":
|
||||
version: 2.11.3
|
||||
resolution: "@medusajs/icons@npm:2.11.3"
|
||||
peerDependencies:
|
||||
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
|
||||
checksum: 5fd7403175a8409c7b5b405006885ecdab867df9c048defafb4a135228e9b99bb4385c909ae4405698f7b54dc9fdcd2065f0a02687c390186425f306493ab150
|
||||
react: ^18.3.1
|
||||
checksum: 5d070954b41b80852468692388231c3ffbc1989596c2cfe4204db286ed02738eb5cfe3df277c4cb4395f5c64cd1d1342427d72d129bc436bc07c5a2dfaef0903
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@medusajs/ui-preset@npm:2.11.2":
|
||||
version: 2.11.2
|
||||
resolution: "@medusajs/ui-preset@npm:2.11.2"
|
||||
"@medusajs/ui-preset@npm:2.11.3":
|
||||
version: 2.11.3
|
||||
resolution: "@medusajs/ui-preset@npm:2.11.3"
|
||||
dependencies:
|
||||
"@tailwindcss/forms": ^0.5.3
|
||||
tailwindcss-animate: ^1.0.6
|
||||
peerDependencies:
|
||||
tailwindcss: ">=3.0.0"
|
||||
checksum: d61a50f69f5a0f133caab1117596dca89ae49d33be420c9b049d073161f724d7ff49f0360e5e6fe88570a56f60eaa1f2582f834bb2190c5114551cc590ac0f6c
|
||||
tailwindcss: ^3.4.3
|
||||
checksum: 9b16fff0c4f447157427454bff1e2a2b843c4846a88057d33b2abdd27b603d76d13af011c4bdc433b23f2a46d8216e569d68a78ade678cdb830714b7d581115e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@medusajs/ui@npm:4.0.26":
|
||||
version: 4.0.26
|
||||
resolution: "@medusajs/ui@npm:4.0.26"
|
||||
"@medusajs/ui@npm:4.0.27":
|
||||
version: 4.0.27
|
||||
resolution: "@medusajs/ui@npm:4.0.27"
|
||||
dependencies:
|
||||
"@dnd-kit/core": ^6.0.0
|
||||
"@dnd-kit/sortable": ^7.0.0
|
||||
"@dnd-kit/utilities": ^3.2.0
|
||||
"@medusajs/icons": 2.11.2
|
||||
"@dnd-kit/core": ^6.1.0
|
||||
"@dnd-kit/sortable": ^8.0.0
|
||||
"@dnd-kit/utilities": ^3.2.2
|
||||
"@medusajs/icons": 2.11.3
|
||||
"@radix-ui/react-dialog": 1.1.4
|
||||
"@radix-ui/react-dismissable-layer": 1.1.4
|
||||
"@tanstack/react-table": 8.20.5
|
||||
@@ -1569,7 +1569,7 @@ __metadata:
|
||||
copy-to-clipboard: ^3.3.3
|
||||
cva: 1.0.0-beta.1
|
||||
prism-react-renderer: ^2.0.6
|
||||
prismjs: ^1.29.0
|
||||
prismjs: ^1.30.0
|
||||
radix-ui: 1.1.2
|
||||
react-aria: ^3.33.1
|
||||
react-currency-input-field: ^3.6.11
|
||||
@@ -1577,9 +1577,9 @@ __metadata:
|
||||
sonner: ^1.5.0
|
||||
tailwind-merge: ^2.2.1
|
||||
peerDependencies:
|
||||
react: ^18.0.0 || ^19.0.0 || ^19.0.0-rc
|
||||
react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-rc
|
||||
checksum: 671dd9a58bc5b030ecb2614c27db6736e228c156e6f94779885198121a1a5c281c94b0932f18a6db681f96baebc5fb68eb70b6881ae0c6d7b0b31ce612ca72fd
|
||||
react: ^18.3.1
|
||||
react-dom: ^18.3.1
|
||||
checksum: f6e2cd715a5b3761f7d8d9cf3aad431171783a22ef9acf155cb6359eb544d7872aa131daea5a28ccc69430a295e0582ac8803b21898c932839cddd1c9a4da6aa
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -5551,8 +5551,8 @@ __metadata:
|
||||
dependencies:
|
||||
"@mdx-js/loader": ^3.1.0
|
||||
"@mdx-js/react": ^3.1.0
|
||||
"@medusajs/icons": 2.11.2
|
||||
"@medusajs/ui": 4.0.26
|
||||
"@medusajs/icons": 2.11.3
|
||||
"@medusajs/ui": 4.0.27
|
||||
"@next/bundle-analyzer": 15.3.5
|
||||
"@next/mdx": 15.3.5
|
||||
"@react-hook/resize-observer": ^2.0.2
|
||||
@@ -5927,7 +5927,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@mdx-js/loader": ^3.1.0
|
||||
"@mdx-js/react": ^3.1.0
|
||||
"@medusajs/icons": 2.11.2
|
||||
"@medusajs/icons": 2.11.3
|
||||
"@next/mdx": 15.3.5
|
||||
"@stefanprobst/rehype-extract-toc": ^3.0.0
|
||||
"@types/mdx": ^2.0.13
|
||||
@@ -6283,7 +6283,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@mdx-js/loader": ^3.1.0
|
||||
"@mdx-js/react": ^3.1.0
|
||||
"@medusajs/icons": 2.11.2
|
||||
"@medusajs/icons": 2.11.3
|
||||
"@next/mdx": 15.3.5
|
||||
"@sanity/client": ^7.11.0
|
||||
"@stefanprobst/rehype-extract-toc": ^3.0.0
|
||||
@@ -7248,8 +7248,8 @@ __metadata:
|
||||
dependencies:
|
||||
"@emotion/is-prop-valid": ^1.3.1
|
||||
"@kapaai/react-sdk": ^0.9.0
|
||||
"@medusajs/icons": 2.11.2
|
||||
"@medusajs/ui": 4.0.26
|
||||
"@medusajs/icons": 2.11.3
|
||||
"@medusajs/ui": 4.0.27
|
||||
"@next/third-parties": 15.3.5
|
||||
"@react-hook/resize-observer": ^1.2.6
|
||||
"@segment/analytics-next": ^1.75.0
|
||||
@@ -12584,10 +12584,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"prismjs@npm:^1.29.0":
|
||||
version: 1.29.0
|
||||
resolution: "prismjs@npm:1.29.0"
|
||||
checksum: d906c4c4d01b446db549b4f57f72d5d7e6ccaca04ecc670fb85cea4d4b1acc1283e945a9cbc3d81819084a699b382f970e02f9d1378e14af9808d366d9ed7ec6
|
||||
"prismjs@npm:^1.30.0":
|
||||
version: 1.30.0
|
||||
resolution: "prismjs@npm:1.30.0"
|
||||
checksum: f56205bfd58ef71ccfcbcb691fd0eb84adc96c6ff21b0b69fc6fdcf02be42d6ef972ba4aed60466310de3d67733f6a746f89f2fb79c00bf217406d465b3e8f23
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -13436,7 +13436,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@mdx-js/loader": ^3.1.0
|
||||
"@mdx-js/react": ^3.1.0
|
||||
"@medusajs/icons": 2.11.2
|
||||
"@medusajs/icons": 2.11.3
|
||||
"@next/bundle-analyzer": ^15.3.5
|
||||
"@next/mdx": 15.3.5
|
||||
"@stefanprobst/rehype-extract-toc": ^3.0.0
|
||||
@@ -14485,7 +14485,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "tailwind@workspace:packages/tailwind"
|
||||
dependencies:
|
||||
"@medusajs/ui-preset": 2.11.2
|
||||
"@medusajs/ui-preset": 2.11.3
|
||||
tailwindcss-animate: ^1.0.7
|
||||
peerDependencies:
|
||||
docs-ui: "*"
|
||||
@@ -15132,7 +15132,7 @@ turbo@latest:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "types@workspace:packages/types"
|
||||
dependencies:
|
||||
"@medusajs/icons": 2.11.2
|
||||
"@medusajs/icons": 2.11.3
|
||||
"@types/node": ^20.11.20
|
||||
openapi-types: ^12.1.3
|
||||
rimraf: ^5.0.5
|
||||
@@ -15221,9 +15221,9 @@ turbo@latest:
|
||||
dependencies:
|
||||
"@mdx-js/loader": ^3.1.0
|
||||
"@mdx-js/react": ^3.1.0
|
||||
"@medusajs/icons": 2.11.2
|
||||
"@medusajs/ui": 4.0.26
|
||||
"@medusajs/ui-preset": 2.11.2
|
||||
"@medusajs/icons": 2.11.3
|
||||
"@medusajs/ui": 4.0.27
|
||||
"@medusajs/ui-preset": 2.11.3
|
||||
"@next/mdx": 15.3.5
|
||||
"@stefanprobst/rehype-extract-toc": ^3.0.0
|
||||
"@types/mdx": ^2.0.13
|
||||
@@ -15573,7 +15573,7 @@ turbo@latest:
|
||||
dependencies:
|
||||
"@mdx-js/loader": ^3.1.0
|
||||
"@mdx-js/react": ^3.1.0
|
||||
"@medusajs/icons": 2.11.2
|
||||
"@medusajs/icons": 2.11.3
|
||||
"@next/mdx": 15.3.5
|
||||
"@stefanprobst/rehype-extract-toc": ^3.0.0
|
||||
"@types/mdx": ^2.0.13
|
||||
|
||||
Reference in New Issue
Block a user