@cossistant/react 0.0.28 → 0.0.29
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/README.md +1 -1
- package/api.d.ts +1 -1
- package/api.d.ts.map +1 -1
- package/checks.d.ts +1 -1
- package/checks.d.ts.map +1 -1
- package/clsx.d.ts +1 -1
- package/clsx.d.ts.map +1 -1
- package/coerce.d.ts +1 -1
- package/coerce.d.ts.map +1 -1
- package/conversation.d.ts +3 -3
- package/core.d.ts +1 -1
- package/core.d.ts.map +1 -1
- package/errors.d.ts +12 -3
- package/errors.d.ts.map +1 -1
- package/errors2.d.ts +1 -1
- package/errors2.d.ts.map +1 -1
- package/hooks/index.d.ts +2 -2
- package/hooks/private/use-grouped-messages.d.ts +8 -5
- package/hooks/private/use-grouped-messages.d.ts.map +1 -1
- package/hooks/private/use-grouped-messages.js +44 -11
- package/hooks/private/use-grouped-messages.js.map +1 -1
- package/hooks/use-conversation-seen.js +1 -1
- package/hooks/use-conversation-seen.js.map +1 -1
- package/hooks/use-conversation-timeline.d.ts.map +1 -1
- package/hooks/use-conversation-timeline.js +1 -3
- package/hooks/use-conversation-timeline.js.map +1 -1
- package/index.d.ts +2 -2
- package/json-schema.d.ts +70 -0
- package/json-schema.d.ts.map +1 -0
- package/openapi30.d.ts +1 -1
- package/openapi30.d.ts.map +1 -1
- package/openapi31.d.ts +1 -1
- package/openapi31.d.ts.map +1 -1
- package/package.json +3 -3
- package/parse.d.ts +1 -1
- package/parse.d.ts.map +1 -1
- package/primitives/avatar/fallback.d.ts.map +1 -1
- package/primitives/avatar/fallback.js +1 -1
- package/primitives/avatar/fallback.js.map +1 -1
- package/primitives/avatar/image.d.ts +1 -1
- package/primitives/day-separator.d.ts +76 -0
- package/primitives/day-separator.d.ts.map +1 -0
- package/primitives/day-separator.js +111 -0
- package/primitives/day-separator.js.map +1 -0
- package/primitives/index.d.ts +3 -2
- package/primitives/index.js +6 -1
- package/primitives/index.parts.d.ts +2 -1
- package/primitives/index.parts.js +2 -1
- package/primitives/multimodal-input.d.ts +2 -2
- package/primitives/multimodal-input.d.ts.map +1 -1
- package/primitives/timeline-item-group.d.ts.map +1 -1
- package/primitives/timeline-item-group.js +1 -1
- package/primitives/timeline-item-group.js.map +1 -1
- package/primitives/timeline-item.js +1 -1
- package/primitives/timeline-item.js.map +1 -1
- package/realtime/support-provider.js +4 -0
- package/realtime/support-provider.js.map +1 -1
- package/realtime-events.d.ts +127 -3
- package/realtime-events.d.ts.map +1 -1
- package/registries.d.ts +1 -1
- package/registries.d.ts.map +1 -1
- package/schemas.d.ts +305 -7
- package/schemas.d.ts.map +1 -1
- package/schemas2.d.ts +29 -4
- package/schemas2.d.ts.map +1 -1
- package/schemas3.d.ts +1 -1
- package/specification-extension.d.ts +1 -1
- package/specification-extension.d.ts.map +1 -1
- package/standard-schema.d.ts +83 -21
- package/standard-schema.d.ts.map +1 -1
- package/support/components/button.d.ts +1 -1
- package/support/components/conversation-timeline.d.ts +5 -0
- package/support/components/conversation-timeline.d.ts.map +1 -1
- package/support/components/conversation-timeline.js +22 -2
- package/support/components/conversation-timeline.js.map +1 -1
- package/support/text/index.d.ts +1 -1
- package/support/text/index.d.ts.map +1 -1
- package/support/text/index.js.map +1 -1
- package/to-json-schema.d.ts +96 -0
- package/to-json-schema.d.ts.map +1 -0
- package/util.d.ts +6 -2
- package/util.d.ts.map +1 -1
- package/utils/use-render-element.d.ts.map +1 -1
- package/utils/use-render-element.js +18 -3
- package/utils/use-render-element.js.map +1 -1
- package/versions.d.ts +2 -2
- package/versions.d.ts.map +1 -1
- package/zod-extensions.d.ts +1 -1
- package/zod-extensions.d.ts.map +1 -1
package/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","names":["checks","$ZodConfig","errors","schemas","JSONType","JWTAlgorithm","HashAlgorithm","HashEncoding","HashFormat","IPVersion","MimeTypes","ParsedTypes","AssertEqual","V","T","U","AssertNotEqual","AssertExtends","IsAny","Omit","K","Exclude","Pick","OmitKeys","MakePartial","InexactPartial","MakeRequired","Required","Exactly","X","Record","NoUndefined","Whatever","LoosePartial","Mask","Keys","PropertyKey","Writeable","P","EmptyObject","BuiltIn","Symbol","toStringTag","Date","Error","Generator","Promise","RegExp","MakeReadonly","Map","ReadonlyMap","Set","ReadonlySet","Head","Tail","Array","ReadonlyArray","Readonly","SomeObject","Identity","Flatten","k","Mapped","Prettify","NoNeverKeys","NoNever","Extend","A","B","TupleItems","SomeType","AnyFunc","IsProp","MaybeAsync","KeyOf","OmitIndexSignature","ExtractIndexSignature","SchemaClass","EnumValue","EnumLike","ToEnum","KeysEnum","KeysArray","Literal","LiteralArray","Primitive","PrimitiveArray","HasSize","HasLength","Numeric","SafeParseResult","SafeParseSuccess","SafeParseError","$ZodError","PropValues","PrimitiveSet","assertEqual","assertNotEqual","assertIs","assertNever","assert","getEnumValues","joinValues","jsonStringifyReplacer","cached","nullish","cleanRegex","floatSafeRemainder","defineLazy","objectClone","assignProp","mergeDefs","cloneDef","$ZodType","getElementAtPath","promiseAllObject","Awaited","randomString","esc","captureStackTrace","Function","isObject","allowsEval","isPlainObject","shallowClone","numKeys","getParsedType","propertyKeyTypes","primitiveTypes","escapeRegex","clone","EmptyToNever","Normalize","normalizeParams","createTransparentProxy","stringifyPrimitive","optionalKeys","$ZodShape","CleanKey","ToCleanMap","$ZodLooseShape","FromCleanMap","NUMBER_FORMAT_RANGES","$ZodNumberFormats","BIGINT_FORMAT_RANGES","$ZodBigIntFormats","pick","$ZodObject","omit","extend","safeExtend","merge","partial","$ZodOptional","required","$ZodNonOptional","Constructor","Def","aborted","ParsePayload","prefixIssues","$ZodRawIssue","unwrapMessage","finalizeIssue","ParseContextInternal","$ZodIssue","getSizableOrigin","getLengthableOrigin","issue","cleanEnum","base64ToUint8Array","Uint8Array","InstanceType","uint8ArrayToBase64","base64urlToUint8Array","uint8ArrayToBase64url","hexToUint8Array","uint8ArrayToHex","Class"],"sources":["../../../node_modules/zod/v4/core/util.d.cts"],"sourcesContent":["import type * as checks from \"./checks.cjs\";\nimport type { $ZodConfig } from \"./core.cjs\";\nimport type * as errors from \"./errors.cjs\";\nimport type * as schemas from \"./schemas.cjs\";\nexport type JSONType = string | number | boolean | null | JSONType[] | {\n [key: string]: JSONType;\n};\nexport type JWTAlgorithm = \"HS256\" | \"HS384\" | \"HS512\" | \"RS256\" | \"RS384\" | \"RS512\" | \"ES256\" | \"ES384\" | \"ES512\" | \"PS256\" | \"PS384\" | \"PS512\" | \"EdDSA\" | (string & {});\nexport type HashAlgorithm = \"md5\" | \"sha1\" | \"sha256\" | \"sha384\" | \"sha512\";\nexport type HashEncoding = \"hex\" | \"base64\" | \"base64url\";\nexport type HashFormat = `${HashAlgorithm}_${HashEncoding}`;\nexport type IPVersion = \"v4\" | \"v6\";\nexport type MimeTypes = \"application/json\" | \"application/xml\" | \"application/x-www-form-urlencoded\" | \"application/javascript\" | \"application/pdf\" | \"application/zip\" | \"application/vnd.ms-excel\" | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" | \"application/msword\" | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" | \"application/vnd.ms-powerpoint\" | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\" | \"application/octet-stream\" | \"application/graphql\" | \"text/html\" | \"text/plain\" | \"text/css\" | \"text/javascript\" | \"text/csv\" | \"image/png\" | \"image/jpeg\" | \"image/gif\" | \"image/svg+xml\" | \"image/webp\" | \"audio/mpeg\" | \"audio/ogg\" | \"audio/wav\" | \"audio/webm\" | \"video/mp4\" | \"video/webm\" | \"video/ogg\" | \"font/woff\" | \"font/woff2\" | \"font/ttf\" | \"font/otf\" | \"multipart/form-data\" | (string & {});\nexport type ParsedTypes = \"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"file\" | \"date\" | \"array\" | \"map\" | \"set\" | \"nan\" | \"null\" | \"promise\";\nexport type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;\nexport type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;\nexport type AssertExtends<T, U> = T extends U ? T : never;\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\nexport type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;\nexport type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;\nexport type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;\nexport type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;\nexport type NoUndefined<T> = T extends undefined ? never : T;\nexport type Whatever = {} | undefined | null;\nexport type LoosePartial<T extends object> = InexactPartial<T> & {\n [k: string]: unknown;\n};\nexport type Mask<Keys extends PropertyKey> = {\n [K in Keys]?: true;\n};\nexport type Writeable<T> = {\n -readonly [P in keyof T]: T[P];\n} & {};\nexport type InexactPartial<T> = {\n [P in keyof T]?: T[P] | undefined;\n};\nexport type EmptyObject = Record<string, never>;\nexport type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {\n readonly [Symbol.toStringTag]: string;\n} | Date | Error | Generator | Promise<unknown> | RegExp;\nexport type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;\nexport type SomeObject = Record<PropertyKey, any>;\nexport type Identity<T> = T;\nexport type Flatten<T> = Identity<{\n [k in keyof T]: T[k];\n}>;\nexport type Mapped<T> = {\n [k in keyof T]: T[k];\n};\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\nexport type NoNeverKeys<T> = {\n [k in keyof T]: [T[k]] extends [never] ? never : k;\n}[keyof T];\nexport type NoNever<T> = Identity<{\n [k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;\n}>;\nexport type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : {\n [K in keyof A as K extends keyof B ? never : K]: A[K];\n} & {\n [K in keyof B]: B[K];\n}>;\nexport type TupleItems = ReadonlyArray<schemas.SomeType>;\nexport type AnyFunc = (...args: any[]) => any;\nexport type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;\nexport type MaybeAsync<T> = T | Promise<T>;\nexport type KeyOf<T> = keyof OmitIndexSignature<T>;\nexport type OmitIndexSignature<T> = {\n [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];\n};\nexport type ExtractIndexSignature<T> = {\n [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];\n};\nexport type Keys<T extends object> = keyof OmitIndexSignature<T>;\nexport type SchemaClass<T extends schemas.SomeType> = {\n new (def: T[\"_zod\"][\"def\"]): T;\n};\nexport type EnumValue = string | number;\nexport type EnumLike = Readonly<Record<string, EnumValue>>;\nexport type ToEnum<T extends EnumValue> = Flatten<{\n [k in T]: k;\n}>;\nexport type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;\nexport type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;\nexport type Literal = string | number | bigint | boolean | null | undefined;\nexport type LiteralArray = Array<Literal>;\nexport type Primitive = string | number | symbol | bigint | boolean | null | undefined;\nexport type PrimitiveArray = Array<Primitive>;\nexport type HasSize = {\n size: number;\n};\nexport type HasLength = {\n length: number;\n};\nexport type Numeric = number | bigint | Date;\nexport type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;\nexport type SafeParseSuccess<T> = {\n success: true;\n data: T;\n error?: never;\n};\nexport type SafeParseError<T> = {\n success: false;\n data?: never;\n error: errors.$ZodError<T>;\n};\nexport type PropValues = Record<string, Set<Primitive>>;\nexport type PrimitiveSet = Set<Primitive>;\nexport declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;\nexport declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;\nexport declare function assertIs<T>(_arg: T): void;\nexport declare function assertNever(_x: never): never;\nexport declare function assert<T>(_: any): asserts _ is T;\nexport declare function getEnumValues(entries: EnumLike): EnumValue[];\nexport declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;\nexport declare function jsonStringifyReplacer(_: string, value: any): any;\nexport declare function cached<T>(getter: () => T): {\n value: T;\n};\nexport declare function nullish(input: any): boolean;\nexport declare function cleanRegex(source: string): string;\nexport declare function floatSafeRemainder(val: number, step: number): number;\nexport declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;\nexport declare function objectClone(obj: object): any;\nexport declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;\nexport declare function mergeDefs(...defs: Record<string, any>[]): any;\nexport declare function cloneDef(schema: schemas.$ZodType): any;\nexport declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;\nexport declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{\n [k in keyof T]: Awaited<T[k]>;\n}>;\nexport declare function randomString(length?: number): string;\nexport declare function esc(str: string): string;\nexport declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;\nexport declare function isObject(data: any): data is Record<PropertyKey, unknown>;\nexport declare const allowsEval: {\n value: boolean;\n};\nexport declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;\nexport declare function shallowClone(o: any): any;\nexport declare function numKeys(data: any): number;\nexport declare const getParsedType: (data: any) => ParsedTypes;\nexport declare const propertyKeyTypes: Set<string>;\nexport declare const primitiveTypes: Set<string>;\nexport declare function escapeRegex(str: string): string;\nexport declare function clone<T extends schemas.$ZodType>(inst: T, def?: T[\"_zod\"][\"def\"], params?: {\n parent: boolean;\n}): T;\nexport type EmptyToNever<T> = keyof T extends never ? never : T;\nexport type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{\n [k in keyof Omit<T, \"error\" | \"message\">]: T[k];\n} & (\"error\" extends keyof T ? {\n error?: Exclude<T[\"error\"], string>;\n} : unknown)> : never;\nexport declare function normalizeParams<T>(_params: T): Normalize<T>;\nexport declare function createTransparentProxy<T extends object>(getter: () => T): T;\nexport declare function stringifyPrimitive(value: any): string;\nexport declare function optionalKeys(shape: schemas.$ZodShape): string[];\nexport type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;\nexport type ToCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;\n};\nexport type FromCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;\n};\nexport declare const NUMBER_FORMAT_RANGES: Record<checks.$ZodNumberFormats, [number, number]>;\nexport declare const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, bigint]>;\nexport declare function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any;\nexport declare function omit(schema: schemas.$ZodObject, mask: object): any;\nexport declare function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function safeExtend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any;\nexport declare function partial(Class: SchemaClass<schemas.$ZodOptional> | null, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport declare function required(Class: SchemaClass<schemas.$ZodNonOptional>, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;\nexport declare function aborted(x: schemas.ParsePayload, startIndex?: number): boolean;\nexport declare function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIssue[]): errors.$ZodRawIssue[];\nexport declare function unwrapMessage(message: string | {\n message: string;\n} | undefined | null): string | undefined;\nexport declare function finalizeIssue(iss: errors.$ZodRawIssue, ctx: schemas.ParseContextInternal | undefined, config: $ZodConfig): errors.$ZodIssue;\nexport declare function getSizableOrigin(input: any): \"set\" | \"map\" | \"file\" | \"unknown\";\nexport declare function getLengthableOrigin(input: any): \"array\" | \"string\" | \"unknown\";\nexport declare function issue(_iss: string, input: any, inst: any): errors.$ZodRawIssue;\nexport declare function issue(_iss: errors.$ZodRawIssue): errors.$ZodRawIssue;\nexport declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];\nexport declare function base64ToUint8Array(base64: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64(bytes: Uint8Array): string;\nexport declare function base64urlToUint8Array(base64url: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64url(bytes: Uint8Array): string;\nexport declare function hexToUint8Array(hex: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToHex(bytes: Uint8Array): string;\nexport declare abstract class Class {\n constructor(..._args: any[]);\n}\n"],"x_google_ignoreList":[0],"mappings":";;AAkBkEoB,KAXtDf,YAAAA,GAWsDe,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,CAAAA,MAAAA,GAAAA,CAAAA,CAAAA,CAAAA;AAEkBA,KAHxEF,KAGwEE,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,SAAAA,CAAAA,GAH/CN,CAG+CM,GAAAA,IAAAA,GAAAA,KAAAA;AAARE,KAFhEH,IAEgEG,CAAAA,CAAAA,EAAAA,YAAAA,MAFxCR,CAEwCQ,CAAAA,GAFnCA,IAEmCA,CAF9BR,CAE8BQ,EAF3BD,OAE2BC,CAAAA,MAFbR,CAEaQ,EAFVF,GAEUE,CAAAA,CAAAA;AAAD,KAA/DE,WAA+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
+
{"version":3,"file":"util.d.ts","names":["checks","$ZodConfig","errors","schemas","JSONType","JWTAlgorithm","HashAlgorithm","HashEncoding","HashFormat","IPVersion","MimeTypes","ParsedTypes","AssertEqual","V","T","U","AssertNotEqual","AssertExtends","IsAny","Omit","K","Exclude","Pick","OmitKeys","MakePartial","InexactPartial","MakeRequired","Required","Exactly","X","Record","NoUndefined","Whatever","LoosePartial","Mask","Keys","PropertyKey","Writeable","P","EmptyObject","BuiltIn","Symbol","toStringTag","Date","Error","Generator","Promise","RegExp","MakeReadonly","Map","ReadonlyMap","Set","ReadonlySet","Head","Tail","Array","ReadonlyArray","Readonly","SomeObject","Identity","Flatten","k","Mapped","Prettify","NoNeverKeys","NoNever","Extend","A","B","TupleItems","SomeType","AnyFunc","IsProp","MaybeAsync","KeyOf","OmitIndexSignature","ExtractIndexSignature","SchemaClass","EnumValue","EnumLike","ToEnum","KeysEnum","KeysArray","Literal","LiteralArray","Primitive","PrimitiveArray","HasSize","HasLength","Numeric","SafeParseResult","SafeParseSuccess","SafeParseError","$ZodError","PropValues","PrimitiveSet","assertEqual","assertNotEqual","assertIs","assertNever","assert","getEnumValues","joinValues","jsonStringifyReplacer","cached","nullish","cleanRegex","floatSafeRemainder","defineLazy","objectClone","assignProp","mergeDefs","cloneDef","$ZodType","getElementAtPath","promiseAllObject","Awaited","randomString","esc","slugify","captureStackTrace","Function","isObject","allowsEval","isPlainObject","shallowClone","numKeys","getParsedType","propertyKeyTypes","primitiveTypes","escapeRegex","clone","EmptyToNever","Normalize","normalizeParams","createTransparentProxy","stringifyPrimitive","optionalKeys","$ZodShape","CleanKey","ToCleanMap","$ZodLooseShape","FromCleanMap","NUMBER_FORMAT_RANGES","$ZodNumberFormats","BIGINT_FORMAT_RANGES","$ZodBigIntFormats","pick","$ZodObject","omit","extend","safeExtend","merge","partial","$ZodOptional","required","$ZodNonOptional","Constructor","Def","aborted","ParsePayload","prefixIssues","$ZodRawIssue","unwrapMessage","finalizeIssue","ParseContextInternal","$ZodIssue","getSizableOrigin","getLengthableOrigin","issue","cleanEnum","base64ToUint8Array","Uint8Array","InstanceType","uint8ArrayToBase64","base64urlToUint8Array","uint8ArrayToBase64url","hexToUint8Array","uint8ArrayToHex","Class"],"sources":["../../../node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/util.d.cts"],"sourcesContent":["import type * as checks from \"./checks.cjs\";\nimport type { $ZodConfig } from \"./core.cjs\";\nimport type * as errors from \"./errors.cjs\";\nimport type * as schemas from \"./schemas.cjs\";\nexport type JSONType = string | number | boolean | null | JSONType[] | {\n [key: string]: JSONType;\n};\nexport type JWTAlgorithm = \"HS256\" | \"HS384\" | \"HS512\" | \"RS256\" | \"RS384\" | \"RS512\" | \"ES256\" | \"ES384\" | \"ES512\" | \"PS256\" | \"PS384\" | \"PS512\" | \"EdDSA\" | (string & {});\nexport type HashAlgorithm = \"md5\" | \"sha1\" | \"sha256\" | \"sha384\" | \"sha512\";\nexport type HashEncoding = \"hex\" | \"base64\" | \"base64url\";\nexport type HashFormat = `${HashAlgorithm}_${HashEncoding}`;\nexport type IPVersion = \"v4\" | \"v6\";\nexport type MimeTypes = \"application/json\" | \"application/xml\" | \"application/x-www-form-urlencoded\" | \"application/javascript\" | \"application/pdf\" | \"application/zip\" | \"application/vnd.ms-excel\" | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" | \"application/msword\" | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" | \"application/vnd.ms-powerpoint\" | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\" | \"application/octet-stream\" | \"application/graphql\" | \"text/html\" | \"text/plain\" | \"text/css\" | \"text/javascript\" | \"text/csv\" | \"image/png\" | \"image/jpeg\" | \"image/gif\" | \"image/svg+xml\" | \"image/webp\" | \"audio/mpeg\" | \"audio/ogg\" | \"audio/wav\" | \"audio/webm\" | \"video/mp4\" | \"video/webm\" | \"video/ogg\" | \"font/woff\" | \"font/woff2\" | \"font/ttf\" | \"font/otf\" | \"multipart/form-data\" | (string & {});\nexport type ParsedTypes = \"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"file\" | \"date\" | \"array\" | \"map\" | \"set\" | \"nan\" | \"null\" | \"promise\";\nexport type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;\nexport type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;\nexport type AssertExtends<T, U> = T extends U ? T : never;\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\nexport type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;\nexport type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;\nexport type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;\nexport type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;\nexport type NoUndefined<T> = T extends undefined ? never : T;\nexport type Whatever = {} | undefined | null;\nexport type LoosePartial<T extends object> = InexactPartial<T> & {\n [k: string]: unknown;\n};\nexport type Mask<Keys extends PropertyKey> = {\n [K in Keys]?: true;\n};\nexport type Writeable<T> = {\n -readonly [P in keyof T]: T[P];\n} & {};\nexport type InexactPartial<T> = {\n [P in keyof T]?: T[P] | undefined;\n};\nexport type EmptyObject = Record<string, never>;\nexport type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {\n readonly [Symbol.toStringTag]: string;\n} | Date | Error | Generator | Promise<unknown> | RegExp;\nexport type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;\nexport type SomeObject = Record<PropertyKey, any>;\nexport type Identity<T> = T;\nexport type Flatten<T> = Identity<{\n [k in keyof T]: T[k];\n}>;\nexport type Mapped<T> = {\n [k in keyof T]: T[k];\n};\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\nexport type NoNeverKeys<T> = {\n [k in keyof T]: [T[k]] extends [never] ? never : k;\n}[keyof T];\nexport type NoNever<T> = Identity<{\n [k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;\n}>;\nexport type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : {\n [K in keyof A as K extends keyof B ? never : K]: A[K];\n} & {\n [K in keyof B]: B[K];\n}>;\nexport type TupleItems = ReadonlyArray<schemas.SomeType>;\nexport type AnyFunc = (...args: any[]) => any;\nexport type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;\nexport type MaybeAsync<T> = T | Promise<T>;\nexport type KeyOf<T> = keyof OmitIndexSignature<T>;\nexport type OmitIndexSignature<T> = {\n [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];\n};\nexport type ExtractIndexSignature<T> = {\n [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];\n};\nexport type Keys<T extends object> = keyof OmitIndexSignature<T>;\nexport type SchemaClass<T extends schemas.SomeType> = {\n new (def: T[\"_zod\"][\"def\"]): T;\n};\nexport type EnumValue = string | number;\nexport type EnumLike = Readonly<Record<string, EnumValue>>;\nexport type ToEnum<T extends EnumValue> = Flatten<{\n [k in T]: k;\n}>;\nexport type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;\nexport type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;\nexport type Literal = string | number | bigint | boolean | null | undefined;\nexport type LiteralArray = Array<Literal>;\nexport type Primitive = string | number | symbol | bigint | boolean | null | undefined;\nexport type PrimitiveArray = Array<Primitive>;\nexport type HasSize = {\n size: number;\n};\nexport type HasLength = {\n length: number;\n};\nexport type Numeric = number | bigint | Date;\nexport type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;\nexport type SafeParseSuccess<T> = {\n success: true;\n data: T;\n error?: never;\n};\nexport type SafeParseError<T> = {\n success: false;\n data?: never;\n error: errors.$ZodError<T>;\n};\nexport type PropValues = Record<string, Set<Primitive>>;\nexport type PrimitiveSet = Set<Primitive>;\nexport declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;\nexport declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;\nexport declare function assertIs<T>(_arg: T): void;\nexport declare function assertNever(_x: never): never;\nexport declare function assert<T>(_: any): asserts _ is T;\nexport declare function getEnumValues(entries: EnumLike): EnumValue[];\nexport declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;\nexport declare function jsonStringifyReplacer(_: string, value: any): any;\nexport declare function cached<T>(getter: () => T): {\n value: T;\n};\nexport declare function nullish(input: any): boolean;\nexport declare function cleanRegex(source: string): string;\nexport declare function floatSafeRemainder(val: number, step: number): number;\nexport declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;\nexport declare function objectClone(obj: object): any;\nexport declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;\nexport declare function mergeDefs(...defs: Record<string, any>[]): any;\nexport declare function cloneDef(schema: schemas.$ZodType): any;\nexport declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;\nexport declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{\n [k in keyof T]: Awaited<T[k]>;\n}>;\nexport declare function randomString(length?: number): string;\nexport declare function esc(str: string): string;\nexport declare function slugify(input: string): string;\nexport declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;\nexport declare function isObject(data: any): data is Record<PropertyKey, unknown>;\nexport declare const allowsEval: {\n value: boolean;\n};\nexport declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;\nexport declare function shallowClone(o: any): any;\nexport declare function numKeys(data: any): number;\nexport declare const getParsedType: (data: any) => ParsedTypes;\nexport declare const propertyKeyTypes: Set<string>;\nexport declare const primitiveTypes: Set<string>;\nexport declare function escapeRegex(str: string): string;\nexport declare function clone<T extends schemas.$ZodType>(inst: T, def?: T[\"_zod\"][\"def\"], params?: {\n parent: boolean;\n}): T;\nexport type EmptyToNever<T> = keyof T extends never ? never : T;\nexport type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{\n [k in keyof Omit<T, \"error\" | \"message\">]: T[k];\n} & (\"error\" extends keyof T ? {\n error?: Exclude<T[\"error\"], string>;\n} : unknown)> : never;\nexport declare function normalizeParams<T>(_params: T): Normalize<T>;\nexport declare function createTransparentProxy<T extends object>(getter: () => T): T;\nexport declare function stringifyPrimitive(value: any): string;\nexport declare function optionalKeys(shape: schemas.$ZodShape): string[];\nexport type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;\nexport type ToCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;\n};\nexport type FromCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;\n};\nexport declare const NUMBER_FORMAT_RANGES: Record<checks.$ZodNumberFormats, [number, number]>;\nexport declare const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, bigint]>;\nexport declare function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any;\nexport declare function omit(schema: schemas.$ZodObject, mask: object): any;\nexport declare function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function safeExtend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any;\nexport declare function partial(Class: SchemaClass<schemas.$ZodOptional> | null, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport declare function required(Class: SchemaClass<schemas.$ZodNonOptional>, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;\nexport declare function aborted(x: schemas.ParsePayload, startIndex?: number): boolean;\nexport declare function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIssue[]): errors.$ZodRawIssue[];\nexport declare function unwrapMessage(message: string | {\n message: string;\n} | undefined | null): string | undefined;\nexport declare function finalizeIssue(iss: errors.$ZodRawIssue, ctx: schemas.ParseContextInternal | undefined, config: $ZodConfig): errors.$ZodIssue;\nexport declare function getSizableOrigin(input: any): \"set\" | \"map\" | \"file\" | \"unknown\";\nexport declare function getLengthableOrigin(input: any): \"array\" | \"string\" | \"unknown\";\nexport declare function issue(_iss: string, input: any, inst: any): errors.$ZodRawIssue;\nexport declare function issue(_iss: errors.$ZodRawIssue): errors.$ZodRawIssue;\nexport declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];\nexport declare function base64ToUint8Array(base64: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64(bytes: Uint8Array): string;\nexport declare function base64urlToUint8Array(base64url: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64url(bytes: Uint8Array): string;\nexport declare function hexToUint8Array(hex: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToHex(bytes: Uint8Array): string;\nexport declare abstract class Class {\n constructor(..._args: any[]);\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;AAkBoCc,KAXxBT,YAAAA,GAWwBS,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,CAAAA,MAAAA,GAAAA,CAAAA,CAAAA,CAAAA;AAAKQ,KAN7BZ,SAAAA,GAM6BY,kBAAAA,GAAAA,iBAAAA,GAAAA,mCAAAA,GAAAA,wBAAAA,GAAAA,iBAAAA,GAAAA,iBAAAA,GAAAA,0B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A,CAAAA;AAc2DqD,KAoBnEW,SAAAA,GApBmEX,MAAAA,GAAAA,MAAAA;AAAUC,KAqB7EW,QAAAA,GAAWtB,QArBkEW,CAqBzDtC,MArByDsC,CAAAA,MAAAA,EAqB1CU,SArB0CV,CAAAA,CAAAA;AAAkBD,KAsB/Fa,MAtB+Fb,CAAAA,UAsB9EW,SAtB8EX,CAAAA,GAsBjEP,OAtBiEO,CAAAA,QAuBjGrD,CAvBqGsD,GAuBjGP,CAvBiGO,EAC/FD,CAAAA;AAAiC/C,KA0BrC+D,OAAAA,GA1BqC/D,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,OAAAA,GAAAA,IAAAA,GAAAA,SAAAA;AAAMA,KA4B3CiE,SAAAA,GA5B2CjE,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,OAAAA,GAAAA,IAAAA,GAAAA,SAAAA;AADiB,KAkC5DoE,SAAAA,GAlC4D;EAK5DnB,MAAAA,EAAAA,MAAU;AACtB,CAAA;AAEYI,KA6BAgB,OAAAA,GA7BU,MAAA3E,GAAA,MAAA,GA6BkB6B,IA7BlB;AAcOmC,KA2BjBgB,UAAAA,GAAahE,MA3BIgD,CAAAA,MAAAA,EA2BW3B,GA3BX2B,CA2BeO,SA3BfP,CAAAA,CAAAA;AACnBhE,KA2BEiF,YAAAA,GAAe5C,GA3BjBrC,CA2BqBuE,SA3BrBvE,CAAAA;KAqEEsH,wBAAwBtH,0BAA0BA;uBA4ChCqK,KAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-render-element.d.ts","names":[],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":[],"mappings":";;;;AAI+B,
|
|
1
|
+
{"version":3,"file":"use-render-element.d.ts","names":[],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":[],"mappings":";;;;AAI+B,KA8B1B,YAAA,GAAY,MAAS,GAAA,CAAI,iBAAA;AAAiB,KAE1C,SA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with both React 18 and React 19.
|
|
8
|
+
*
|
|
9
|
+
* - Before React 19: accessing `element.props.ref` throws a warning, use `element.ref`
|
|
10
|
+
* - After React 19: accessing `element.ref` throws a warning, use `element.props.ref`
|
|
11
|
+
*
|
|
12
|
+
* This function detects which version of React is being used by checking for the
|
|
13
|
+
* `isReactWarning` property descriptor that React adds in DEV mode.
|
|
14
|
+
*
|
|
15
|
+
* @see https://github.com/radix-ui/primitives/pull/2811
|
|
16
|
+
*/
|
|
17
|
+
function getElementRef(element) {
|
|
18
|
+
const getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
19
|
+
if (getter && "isReactWarning" in getter && getter.isReactWarning) return element.ref;
|
|
20
|
+
return element.props.ref ?? element.ref;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
7
23
|
* Slot component that properly forwards refs when using asChild pattern.
|
|
8
24
|
* Uses forwardRef to receive the ref and merges it with any existing ref on the child.
|
|
9
25
|
*/
|
|
10
26
|
const Slot = React$1.forwardRef(({ children,...props }, forwardedRef) => {
|
|
11
|
-
const
|
|
12
|
-
const mergedRef = mergeRefs([forwardedRef, childRef]);
|
|
27
|
+
const mergedRef = mergeRefs([forwardedRef, getElementRef(children)]);
|
|
13
28
|
return React$1.cloneElement(children, {
|
|
14
29
|
...props,
|
|
15
30
|
ref: mergedRef,
|
|
@@ -33,7 +48,7 @@ function useRenderElement(tag, componentProps, params) {
|
|
|
33
48
|
if (typeof render === "function") return render(mergedProps, state);
|
|
34
49
|
if (React$1.isValidElement(render)) return React$1.cloneElement(render, {
|
|
35
50
|
...mergedProps,
|
|
36
|
-
ref: render
|
|
51
|
+
ref: getElementRef(render) || ref
|
|
37
52
|
});
|
|
38
53
|
if (asChild && React$1.isValidElement(propsWithClassName.children)) {
|
|
39
54
|
const { ref: slotRef,...restMergedProps } = mergedProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-render-element.js","names":["React"],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: works well here */\n/** biome-ignore-all lint/nursery/noUnnecessaryConditions: ok */\n\nimport type { JSX } from \"react\";\nimport * as React from \"react\";\nimport { mergeRefs } from \"./merge-refs\";\n\ntype IntrinsicTag = keyof JSX.IntrinsicElements;\n\ntype ClassName<State> = string | ((state: State) => string);\n\ntype RenderFn<Props, State> = (\n\tprops: Props,\n\tstate: State\n) => React.ReactElement;\n\ntype RenderProps<State, Tag extends IntrinsicTag> = {\n\trender?: React.ReactElement | RenderFn<JSX.IntrinsicElements[Tag], State>;\n\tclassName?: ClassName<State>;\n\tasChild?: boolean;\n};\n\ntype RenderParams<State, Tag extends IntrinsicTag> = {\n\tstate?: State;\n\tref?: React.Ref<any>;\n\tprops?: Partial<JSX.IntrinsicElements[Tag]>;\n\tenabled?: boolean;\n};\n\ntype SlotProps = {\n\tchildren: React.ReactElement;\n\t[key: string]: any;\n};\n\n/**\n * Slot component that properly forwards refs when using asChild pattern.\n * Uses forwardRef to receive the ref and merges it with any existing ref on the child.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>(\n\t({ children, ...props }, forwardedRef) => {\n\t\t// Get the child's existing ref
|
|
1
|
+
{"version":3,"file":"use-render-element.js","names":["React"],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: works well here */\n/** biome-ignore-all lint/nursery/noUnnecessaryConditions: ok */\n\nimport type { JSX } from \"react\";\nimport * as React from \"react\";\nimport { mergeRefs } from \"./merge-refs\";\n\n/**\n * Gets the ref from a React element in a way that's compatible with both React 18 and React 19.\n *\n * - Before React 19: accessing `element.props.ref` throws a warning, use `element.ref`\n * - After React 19: accessing `element.ref` throws a warning, use `element.props.ref`\n *\n * This function detects which version of React is being used by checking for the\n * `isReactWarning` property descriptor that React adds in DEV mode.\n *\n * @see https://github.com/radix-ui/primitives/pull/2811\n */\nfunction getElementRef(element: React.ReactElement): React.Ref<unknown> | null {\n\t// React 18 in DEV mode will throw a warning when accessing `element.props.ref`\n\t// and suggest using `element.ref` instead.\n\t// We detect this by checking for the `isReactWarning` getter on `props.ref`.\n\tconst getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n\tconst mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n\n\tif (mayWarn) {\n\t\t// React 18: use element.ref\n\t\treturn (element as any).ref;\n\t}\n\n\t// React 19 or production: prefer props.ref, fallback to element.ref for older versions\n\treturn (element.props as any).ref ?? (element as any).ref;\n}\n\ntype IntrinsicTag = keyof JSX.IntrinsicElements;\n\ntype ClassName<State> = string | ((state: State) => string);\n\ntype RenderFn<Props, State> = (\n\tprops: Props,\n\tstate: State\n) => React.ReactElement;\n\ntype RenderProps<State, Tag extends IntrinsicTag> = {\n\trender?: React.ReactElement | RenderFn<JSX.IntrinsicElements[Tag], State>;\n\tclassName?: ClassName<State>;\n\tasChild?: boolean;\n};\n\ntype RenderParams<State, Tag extends IntrinsicTag> = {\n\tstate?: State;\n\tref?: React.Ref<any>;\n\tprops?: Partial<JSX.IntrinsicElements[Tag]>;\n\tenabled?: boolean;\n};\n\ntype SlotProps = {\n\tchildren: React.ReactElement;\n\t[key: string]: any;\n};\n\n/**\n * Slot component that properly forwards refs when using asChild pattern.\n * Uses forwardRef to receive the ref and merges it with any existing ref on the child.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>(\n\t({ children, ...props }, forwardedRef) => {\n\t\t// Get the child's existing ref using React 18/19 compatible helper\n\t\tconst childRef = getElementRef(children);\n\n\t\t// Merge the forwarded ref with the child's ref\n\t\tconst mergedRef = mergeRefs([forwardedRef, childRef]);\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...props,\n\t\t\tref: mergedRef,\n\t\t\tclassName: [(children.props as any).className, props.className]\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(\" \"),\n\t\t} as any);\n\t}\n);\n\n/**\n * Utility hook to support slot-style component overrides.\n */\nexport function useRenderElement<\n\tState extends Record<string, any>,\n\tTag extends IntrinsicTag,\n>(\n\ttag: Tag,\n\tcomponentProps: RenderProps<State, Tag>,\n\tparams?: RenderParams<State, Tag>\n): React.ReactElement | null {\n\tconst { render, className: classNameProp, asChild = false } = componentProps;\n\n\tconst {\n\t\tstate = {} as State,\n\t\tref,\n\t\tprops = {} as Partial<JSX.IntrinsicElements[Tag]>,\n\t\tenabled = true,\n\t} = params || {};\n\n\tif (!enabled) {\n\t\treturn null;\n\t}\n\n\tconst computedClassName =\n\t\ttypeof classNameProp === \"function\" ? classNameProp(state) : classNameProp;\n\n\tconst propsWithClassName = props as {\n\t\tclassName?: string;\n\t\tchildren?: React.ReactNode;\n\t};\n\tconst mergedProps = {\n\t\t...props,\n\t\tclassName: [propsWithClassName.className, computedClassName]\n\t\t\t.filter(Boolean)\n\t\t\t.join(\" \"),\n\t\tref,\n\t};\n\n\tif (typeof render === \"function\") {\n\t\treturn render(mergedProps as JSX.IntrinsicElements[Tag], state);\n\t}\n\n\tif (React.isValidElement(render)) {\n\t\treturn React.cloneElement(render, {\n\t\t\t...mergedProps,\n\t\t\tref: getElementRef(render) || ref,\n\t\t});\n\t}\n\n\tif (asChild && React.isValidElement(propsWithClassName.children)) {\n\t\t// Extract ref to pass explicitly to the forwardRef Slot component\n\t\t// React extracts ref from spread props, so we must pass it separately\n\t\tconst { ref: slotRef, ...restMergedProps } = mergedProps;\n\t\treturn (\n\t\t\t<Slot ref={slotRef} {...restMergedProps}>\n\t\t\t\t{propsWithClassName.children}\n\t\t\t</Slot>\n\t\t);\n\t}\n\n\treturn React.createElement(tag, mergedProps as any);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,SAAS,cAAc,SAAwD;CAI9E,MAAM,SAAS,OAAO,yBAAyB,QAAQ,OAAO,MAAM,EAAE;AAGtE,KAFgB,UAAU,oBAAoB,UAAU,OAAO,eAI9D,QAAQ,QAAgB;AAIzB,QAAQ,QAAQ,MAAc,OAAQ,QAAgB;;;;;;AAkCvD,MAAM,OAAOA,QAAM,YACjB,EAAE,SAAU,GAAG,SAAS,iBAAiB;CAKzC,MAAM,YAAY,UAAU,CAAC,cAHZ,cAAc,SAAS,CAGY,CAAC;AAErD,QAAOA,QAAM,aAAa,UAAU;EACnC,GAAG;EACH,KAAK;EACL,WAAW,CAAE,SAAS,MAAc,WAAW,MAAM,UAAU,CAC7D,OAAO,QAAQ,CACf,KAAK,IAAI;EACX,CAAQ;EAEV;;;;AAKD,SAAgB,iBAIf,KACA,gBACA,QAC4B;CAC5B,MAAM,EAAE,QAAQ,WAAW,eAAe,UAAU,UAAU;CAE9D,MAAM,EACL,QAAQ,EAAE,EACV,KACA,QAAQ,EAAE,EACV,UAAU,SACP,UAAU,EAAE;AAEhB,KAAI,CAAC,QACJ,QAAO;CAGR,MAAM,oBACL,OAAO,kBAAkB,aAAa,cAAc,MAAM,GAAG;CAE9D,MAAM,qBAAqB;CAI3B,MAAM,cAAc;EACnB,GAAG;EACH,WAAW,CAAC,mBAAmB,WAAW,kBAAkB,CAC1D,OAAO,QAAQ,CACf,KAAK,IAAI;EACX;EACA;AAED,KAAI,OAAO,WAAW,WACrB,QAAO,OAAO,aAA2C,MAAM;AAGhE,KAAIA,QAAM,eAAe,OAAO,CAC/B,QAAOA,QAAM,aAAa,QAAQ;EACjC,GAAG;EACH,KAAK,cAAc,OAAO,IAAI;EAC9B,CAAC;AAGH,KAAI,WAAWA,QAAM,eAAe,mBAAmB,SAAS,EAAE;EAGjE,MAAM,EAAE,KAAK,QAAS,GAAG,oBAAoB;AAC7C,SACC,oBAAC;GAAK,KAAK;GAAS,GAAI;aACtB,mBAAmB;IACd;;AAIT,QAAOA,QAAM,cAAc,KAAK,YAAmB"}
|
package/versions.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//#region ../../node_modules/zod/v4/core/versions.d.cts
|
|
1
|
+
//#region ../../node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/versions.d.cts
|
|
2
2
|
declare const version: {
|
|
3
3
|
readonly major: 4;
|
|
4
|
-
readonly minor:
|
|
4
|
+
readonly minor: 2;
|
|
5
5
|
readonly patch: number;
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
package/versions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","names":["version"],"sources":["../../../node_modules/zod/v4/core/versions.d.cts"],"sourcesContent":["export declare const version: {\n readonly major: 4;\n readonly minor:
|
|
1
|
+
{"version":3,"file":"versions.d.ts","names":["version"],"sources":["../../../node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/versions.d.cts"],"sourcesContent":["export declare const version: {\n readonly major: 4;\n readonly minor: 2;\n readonly patch: number;\n};\n"],"x_google_ignoreList":[0],"mappings":";cAAqBA;EAAAA,SAAAA,KAIpB,EAAA,CAAA"}
|
package/zod-extensions.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ParameterObject, SchemaObject } from "./openapi30.js";
|
|
|
2
2
|
import { ParameterObject as ParameterObject$1, SchemaObject as SchemaObject$1 } from "./openapi31.js";
|
|
3
3
|
import { $ZodType, $ZodTypeInternals } from "./schemas.js";
|
|
4
4
|
|
|
5
|
-
//#region ../../node_modules/@asteasolutions/zod-to-openapi/dist/zod-extensions.d.ts
|
|
5
|
+
//#region ../../node_modules/.bun/@asteasolutions+zod-to-openapi@8.1.0+68156bc0b5d50bb8/node_modules/@asteasolutions/zod-to-openapi/dist/zod-extensions.d.ts
|
|
6
6
|
type ExampleValue<T> = T extends Date ? string : T;
|
|
7
7
|
type ParameterObject$2 = ParameterObject | ParameterObject$1;
|
|
8
8
|
type SchemaObject$2 = SchemaObject | SchemaObject$1;
|
package/zod-extensions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-extensions.d.ts","names":["ParameterObject","ParameterObject30","SchemaObject","SchemaObject30","ParameterObject31","SchemaObject31","ZodObject","z","core","ExampleValue","T","Date","UnionPreferredType","ZodOpenAPIMetadata","E","Omit","Partial","OpenApiOptions","InternalUserOnlyZodOpenAPIInternalMetadata","ZodOpenApiFullMetadataForRegistry","ZodOpenAPIInternalMetadata","ZodOpenApiFullMetadata","_0","Output","Input","Internals","$ZodTypeInternals","$ZodType","sideEffect","extendZodWithOpenApi"],"sources":["../../../node_modules/@asteasolutions/zod-to-openapi/dist/zod-extensions.d.ts"],"sourcesContent":["import { ParameterObject as ParameterObject30, SchemaObject as SchemaObject30 } from 'openapi3-ts/oas30';\nimport { ParameterObject as ParameterObject31, SchemaObject as SchemaObject31 } from 'openapi3-ts/oas31';\nimport type { ZodObject } from 'zod';\nimport { z } from 'zod';\nimport type { core } from 'zod';\ntype ExampleValue<T> = T extends Date ? string : T;\ntype ParameterObject = ParameterObject30 | ParameterObject31;\ntype SchemaObject = SchemaObject30 | SchemaObject31;\nexport type UnionPreferredType = 'oneOf' | 'anyOf';\nexport type ZodOpenAPIMetadata<T = any, E = ExampleValue<T>> = Omit<SchemaObject, 'example' | 'examples' | 'default'> & {\n param?: Partial<ParameterObject> & {\n example?: E;\n };\n example?: E;\n examples?: E[];\n default?: T;\n _internal?: never;\n};\ninterface OpenApiOptions {\n unionPreferredType?: UnionPreferredType;\n}\n/**\n *\n * Since this commit https://github.com/colinhacks/zod/commit/6707ebb14c885b1c577ce64a240475e26e3ff182\n * zod started preserving metadata from functions. Since the ZodObject type contains some function types\n * that also have generics this leads to a too deep type instantiation. We only use this type internally\n * so I've opted to type the _internal metadata in the registry as any. However the Metadata.getInternalMetadata\n * method has an explicit return type of ZodOpenAPIInternalMetadata.\n */\ninterface InternalUserOnlyZodOpenAPIInternalMetadata extends OpenApiOptions {\n refId?: string;\n extendedFrom?: {\n refId: string;\n schema: any;\n };\n}\n/**\n *\n * The metadata that is received from the registry should be obtained using the Metadata methods that have an\n * explicit return type of ZodOpenApiFullMetadata or ZodOpenAPIInternalMetadata.\n *\n * @deprecated Do not use for anything other than the registry. See the comment above for more details.\n */\nexport interface ZodOpenApiFullMetadataForRegistry<T = any> extends Omit<ZodOpenAPIMetadata<T>, '_internal'> {\n _internal?: InternalUserOnlyZodOpenAPIInternalMetadata;\n [k: string]: unknown;\n}\nexport interface ZodOpenAPIInternalMetadata extends InternalUserOnlyZodOpenAPIInternalMetadata {\n extendedFrom?: {\n refId: string;\n schema: ZodObject;\n };\n}\nexport interface ZodOpenApiFullMetadata<T = any> extends ZodOpenApiFullMetadataForRegistry<T> {\n _internal?: ZodOpenAPIInternalMetadata;\n}\ndeclare module 'zod' {\n interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {\n openapi(metadata: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;\n openapi(refId: string, metadata?: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;\n }\n}\nexport declare function extendZodWithOpenApi(zod: typeof z): void;\nexport {};\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAIgC,KAC3BS,YAAAA,CAAAA,CAAY,CAAA,GAAMC,CAAN,SAAgBC,IAAhB,GAAA,MAAA,GAAgCD,CAAhC;KACZV,iBAAAA,GAAkBC,eADAS,GACoBN,iBADpBM;KAElBR,cAAAA,GAAeC,YAFaQ,GAEIN,cAFJM;AAAgBD,KAGrCE,kBAAAA,GAHqCF,OAAAA,GAAAA,OAAAA;AAAC,KAItCG,kBAJsC,CAAA,IAAA,GAAA,EAAA,IAINJ,YAJM,CAIOC,CAJP,CAAA,CAAA,GAIaK,IAJb,CAIkBb,cAJlB,EAAA,SAAA,GAAA,UAAA,GAAA,SAAA,CAAA,GAAA;EAC7CF,KAAAA,CAAAA,EAIOgB,OAJPhB,CAIeA,iBAJA,CAAA,GAAGC;IAClBC,OAAAA,CAAAA,EAIaY,CAJbZ;EACOU,CAAAA;EACAC,OAAAA,CAAAA,EAIEC,CAJFD;EAA6CH,QAAAA,CAAAA,EAK1CI,CAL0CJ,EAAAA;EAAbD,OAAAA,CAAAA,EAM9BC,CAN8BD;EAAwBP,SAAAA,CAAAA,EAAAA,KAAAA;CAALa;UASrDE,cAAAA,CARUjB;EAARgB,kBAAAA,CAAAA,EASaJ,kBATbI;;;;;;AAOV;AAsCD;;;;;qFAEsFR,kBAAuBe,QAAQC,SAAShB,kBAAuBe,QAAQC,gBAAgBhB,SAAce,QAAQC,OAAOC;sBACjLT,QAAQH,mBAAmBW,mBAAmBP;sCAC9BD,QAAQH,mBAAmBW,mBAAmBP"}
|
|
1
|
+
{"version":3,"file":"zod-extensions.d.ts","names":["ParameterObject","ParameterObject30","SchemaObject","SchemaObject30","ParameterObject31","SchemaObject31","ZodObject","z","core","ExampleValue","T","Date","UnionPreferredType","ZodOpenAPIMetadata","E","Omit","Partial","OpenApiOptions","InternalUserOnlyZodOpenAPIInternalMetadata","ZodOpenApiFullMetadataForRegistry","ZodOpenAPIInternalMetadata","ZodOpenApiFullMetadata","_0","Output","Input","Internals","$ZodTypeInternals","$ZodType","sideEffect","extendZodWithOpenApi"],"sources":["../../../node_modules/.bun/@asteasolutions+zod-to-openapi@8.1.0+68156bc0b5d50bb8/node_modules/@asteasolutions/zod-to-openapi/dist/zod-extensions.d.ts"],"sourcesContent":["import { ParameterObject as ParameterObject30, SchemaObject as SchemaObject30 } from 'openapi3-ts/oas30';\nimport { ParameterObject as ParameterObject31, SchemaObject as SchemaObject31 } from 'openapi3-ts/oas31';\nimport type { ZodObject } from 'zod';\nimport { z } from 'zod';\nimport type { core } from 'zod';\ntype ExampleValue<T> = T extends Date ? string : T;\ntype ParameterObject = ParameterObject30 | ParameterObject31;\ntype SchemaObject = SchemaObject30 | SchemaObject31;\nexport type UnionPreferredType = 'oneOf' | 'anyOf';\nexport type ZodOpenAPIMetadata<T = any, E = ExampleValue<T>> = Omit<SchemaObject, 'example' | 'examples' | 'default'> & {\n param?: Partial<ParameterObject> & {\n example?: E;\n };\n example?: E;\n examples?: E[];\n default?: T;\n _internal?: never;\n};\ninterface OpenApiOptions {\n unionPreferredType?: UnionPreferredType;\n}\n/**\n *\n * Since this commit https://github.com/colinhacks/zod/commit/6707ebb14c885b1c577ce64a240475e26e3ff182\n * zod started preserving metadata from functions. Since the ZodObject type contains some function types\n * that also have generics this leads to a too deep type instantiation. We only use this type internally\n * so I've opted to type the _internal metadata in the registry as any. However the Metadata.getInternalMetadata\n * method has an explicit return type of ZodOpenAPIInternalMetadata.\n */\ninterface InternalUserOnlyZodOpenAPIInternalMetadata extends OpenApiOptions {\n refId?: string;\n extendedFrom?: {\n refId: string;\n schema: any;\n };\n}\n/**\n *\n * The metadata that is received from the registry should be obtained using the Metadata methods that have an\n * explicit return type of ZodOpenApiFullMetadata or ZodOpenAPIInternalMetadata.\n *\n * @deprecated Do not use for anything other than the registry. See the comment above for more details.\n */\nexport interface ZodOpenApiFullMetadataForRegistry<T = any> extends Omit<ZodOpenAPIMetadata<T>, '_internal'> {\n _internal?: InternalUserOnlyZodOpenAPIInternalMetadata;\n [k: string]: unknown;\n}\nexport interface ZodOpenAPIInternalMetadata extends InternalUserOnlyZodOpenAPIInternalMetadata {\n extendedFrom?: {\n refId: string;\n schema: ZodObject;\n };\n}\nexport interface ZodOpenApiFullMetadata<T = any> extends ZodOpenApiFullMetadataForRegistry<T> {\n _internal?: ZodOpenAPIInternalMetadata;\n}\ndeclare module 'zod' {\n interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {\n openapi(metadata: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;\n openapi(refId: string, metadata?: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;\n }\n}\nexport declare function extendZodWithOpenApi(zod: typeof z): void;\nexport {};\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAIgC,KAC3BS,YAAAA,CAAAA,CAAY,CAAA,GAAMC,CAAN,SAAgBC,IAAhB,GAAA,MAAA,GAAgCD,CAAhC;KACZV,iBAAAA,GAAkBC,eADAS,GACoBN,iBADpBM;KAElBR,cAAAA,GAAeC,YAFaQ,GAEIN,cAFJM;AAAgBD,KAGrCE,kBAAAA,GAHqCF,OAAAA,GAAAA,OAAAA;AAAC,KAItCG,kBAJsC,CAAA,IAAA,GAAA,EAAA,IAINJ,YAJM,CAIOC,CAJP,CAAA,CAAA,GAIaK,IAJb,CAIkBb,cAJlB,EAAA,SAAA,GAAA,UAAA,GAAA,SAAA,CAAA,GAAA;EAC7CF,KAAAA,CAAAA,EAIOgB,OAJPhB,CAIeA,iBAJA,CAAA,GAAGC;IAClBC,OAAAA,CAAAA,EAIaY,CAJbZ;EACOU,CAAAA;EACAC,OAAAA,CAAAA,EAIEC,CAJFD;EAA6CH,QAAAA,CAAAA,EAK1CI,CAL0CJ,EAAAA;EAAbD,OAAAA,CAAAA,EAM9BC,CAN8BD;EAAwBP,SAAAA,CAAAA,EAAAA,KAAAA;CAALa;UASrDE,cAAAA,CARUjB;EAARgB,kBAAAA,CAAAA,EASaJ,kBATbI;;;;;;AAOV;AAsCD;;;;;qFAEsFR,kBAAuBe,QAAQC,SAAShB,kBAAuBe,QAAQC,gBAAgBhB,SAAce,QAAQC,OAAOC;sBACjLT,QAAQH,mBAAmBW,mBAAmBP;sCAC9BD,QAAQH,mBAAmBW,mBAAmBP"}
|