@semcore/core 16.0.0-prerelease.12 → 16.0.0-prerelease.13

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.
@@ -70,9 +70,9 @@ export type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args:
70
70
  declare const Root: Root;
71
71
  export { Root };
72
72
  /** @deprecated */
73
- declare abstract class RootComponent<Props = {}, Context = {}, State = {}, Enhance extends readonly ((...args: any[]) => any)[] = []> extends PureComponent<Props, State> {
73
+ declare abstract class RootComponent<Props = {}, Context = {}, State = {}, Enhance extends readonly ((...args: any[]) => any)[] = [], InnerProps = {}> extends PureComponent<Props, State> {
74
74
  get handlers(): Readonly<IRootComponentHandlers>;
75
- get asProps(): Readonly<Merge<Props & IRootComponentProps<Props, Context> & Intergalactic.InternalTypings.ExtractEnhanceType<Enhance>, React.AllHTMLAttributes<any>>>;
75
+ get asProps(): Readonly<Merge<Props & IRootComponentProps<Props, Context> & Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> & InnerProps, React.AllHTMLAttributes<any>>>;
76
76
  Root: Root;
77
77
  isControlled: boolean;
78
78
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","names":["_react","require","_symbols","Root","undefined","exports","RootComponent","_PureComponent","_inherits2","_super","_createSuper2","_this","_len","arguments","length","args","Array","_key","_classCallCheck2","call","apply","concat","_defineProperty2","_assertThisInitialized2","_createClass2","key","get","PureComponent","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled/index';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<\n Props &\n IRootComponentProps<Props, Context> &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance>,\n AllHTMLAttributes<any>\n >\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,QAAA,GAAAD,OAAA;AAmFA,IAAME,IAAU,GAAGC,SAAgB;AAACC,OAAA,CAAAF,IAAA,GAAAA,IAAA;AAIpC;AAAA,IACeG,aAAa,0BAAAC,cAAA;EAAA,IAAAC,UAAA,aAAAF,aAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,aAAA;EAAA,SAAAA,cAAA;IAAA,IAAAK,KAAA;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAA,IAAAC,gBAAA,mBAAAZ,aAAA;IAAAK,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAN,IAAA;IAAA,IAAAO,gBAAA,iBAAAC,uBAAA,aAAAZ,KAAA,WAqBbP,SAAS;IAAA,IAAAkB,gBAAA,iBAAAC,uBAAA,aAAAZ,KAAA,mBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAA,IAAAa,aAAA,aAAAlB,aAAA;IAAAmB,GAAA;IAAAC,GAAA,EAjBpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IAQX;EAAC;EAAA,OAAApB,aAAA;AAAA,EAdOqB,oBAAa;AAqBhB,IAAMC,SAAS,GAAGtB,aAAa;AACtC;AAAAD,OAAA,CAAAuB,SAAA,GAAAA,SAAA;AAAA,IAAAC,aAAA;AAAAxB,OAAA,CAAAwB,aAAA,GAAAA,aAAA;AAAA,WAAAC,cAAA;EAAA,IAAAC,eAAA;EAAA,WAAAC,gBAAA,MA4CmBD,eAAe,KAAfA,eAAe,GAAAD,cAAA,CAAfC,eAAe,KAAAD,cAAA,CAAfC,eAAe;AAAA,GA5BjBF,aAAa,KAAAxB,OAAA,CAAAwB,aAAA,GAAbA,aAAa;AA2LvB,IAAMI,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO;AAAC7B,OAAA,CAAA4B,0BAAA,GAAAA,0BAAA"}
1
+ {"version":3,"file":"Component.js","names":["_react","require","_symbols","Root","undefined","exports","RootComponent","_PureComponent","_inherits2","_super","_createSuper2","_this","_len","arguments","length","args","Array","_key","_classCallCheck2","call","apply","concat","_defineProperty2","_assertThisInitialized2","_createClass2","key","get","PureComponent","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled/index';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n InnerProps = {},\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<\n Props &\n IRootComponentProps<Props, Context> &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> &\n InnerProps,\n AllHTMLAttributes<any>\n >\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,QAAA,GAAAD,OAAA;AAmFA,IAAME,IAAU,GAAGC,SAAgB;AAACC,OAAA,CAAAF,IAAA,GAAAA,IAAA;AAIpC;AAAA,IACeG,aAAa,0BAAAC,cAAA;EAAA,IAAAC,UAAA,aAAAF,aAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,aAAA;EAAA,SAAAA,cAAA;IAAA,IAAAK,KAAA;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAA,IAAAC,gBAAA,mBAAAZ,aAAA;IAAAK,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAN,IAAA;IAAA,IAAAO,gBAAA,iBAAAC,uBAAA,aAAAZ,KAAA,WAuBbP,SAAS;IAAA,IAAAkB,gBAAA,iBAAAC,uBAAA,aAAAZ,KAAA,mBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAA,IAAAa,aAAA,aAAAlB,aAAA;IAAAmB,GAAA;IAAAC,GAAA,EAlBpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IASX;EAAC;EAAA,OAAApB,aAAA;AAAA,EAfOqB,oBAAa;AAsBhB,IAAMC,SAAS,GAAGtB,aAAa;AACtC;AAAAD,OAAA,CAAAuB,SAAA,GAAAA,SAAA;AAAA,IAAAC,aAAA;AAAAxB,OAAA,CAAAwB,aAAA,GAAAA,aAAA;AAAA,WAAAC,cAAA;EAAA,IAAAC,eAAA;EAAA,WAAAC,gBAAA,MA4CmBD,eAAe,KAAfA,eAAe,GAAAD,cAAA,CAAfC,eAAe,KAAAD,cAAA,CAAfC,eAAe;AAAA,GA5BjBF,aAAa,KAAAxB,OAAA,CAAAwB,aAAA,GAAbA,aAAa;AA2LvB,IAAMI,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO;AAAC7B,OAAA,CAAA4B,0BAAA,GAAAA,0BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Component.mjs","names":["PureComponent","CORE_COMPONENT","CREATE_COMPONENT","Root","undefined","RootComponent","_PureComponent","_inherits","_super","_createSuper","_this","_len","arguments","length","args","Array","_key","_classCallCheck","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","get","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled/index';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<\n Props &\n IRootComponentProps<Props, Context> &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance>,\n AllHTMLAttributes<any>\n >\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n"],"mappings":";;;;;;AAAA,SAGEA,aAAa,QAIR,OAAO;AAEd,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,eAAW;;AAE5D;;AAiFA,IAAMC,IAAU,GAAGC,SAAgB;AAEnC,SAASD,IAAI;;AAEb;AAAA,IACeE,aAAa,0BAAAC,cAAA;EAAAC,SAAA,CAAAF,aAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,aAAA;EAAA,SAAAA,cAAA;IAAA,IAAAK,KAAA;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAC,eAAA,OAAAZ,aAAA;IAAAK,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAN,IAAA;IAAAO,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,WAqBbN,SAAS;IAAAiB,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,mBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAAa,YAAA,CAAAlB,aAAA;IAAAmB,GAAA;IAAAC,GAAA,EAjBpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IAQX;EAAC;EAAA,OAAApB,aAAA;AAAA,EAdOL,aAAa;AAqBvB,OAAO,IAAM0B,SAAS,GAAGrB,aAAa;AACtC;;AAgBA,WAAAsB,aAAA;AAyLC,WAAAC,cAAA;EAAA,IAAAC,eAAA;EAAA,WAAAC,gBAAA,MA7JkBD,eAAe,KAAfA,eAAe,GAAAD,cAAA,CAAfC,eAAe,KAAAD,cAAA,CAAfC,eAAe;AAAA,GA5BjBF,aAAa,KAAbA,aAAa;AA2L9B,OAAO,IAAMI,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO"}
1
+ {"version":3,"file":"Component.mjs","names":["PureComponent","CORE_COMPONENT","CREATE_COMPONENT","Root","undefined","RootComponent","_PureComponent","_inherits","_super","_createSuper","_this","_len","arguments","length","args","Array","_key","_classCallCheck","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","get","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled/index';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n InnerProps = {},\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<\n Props &\n IRootComponentProps<Props, Context> &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> &\n InnerProps,\n AllHTMLAttributes<any>\n >\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n"],"mappings":";;;;;;AAAA,SAGEA,aAAa,QAIR,OAAO;AAEd,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,eAAW;;AAE5D;;AAiFA,IAAMC,IAAU,GAAGC,SAAgB;AAEnC,SAASD,IAAI;;AAEb;AAAA,IACeE,aAAa,0BAAAC,cAAA;EAAAC,SAAA,CAAAF,aAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,aAAA;EAAA,SAAAA,cAAA;IAAA,IAAAK,KAAA;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAC,eAAA,OAAAZ,aAAA;IAAAK,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAN,IAAA;IAAAO,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,WAuBbN,SAAS;IAAAiB,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,mBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAAa,YAAA,CAAAlB,aAAA;IAAAmB,GAAA;IAAAC,GAAA,EAlBpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IASX;EAAC;EAAA,OAAApB,aAAA;AAAA,EAfOL,aAAa;AAsBvB,OAAO,IAAM0B,SAAS,GAAGrB,aAAa;AACtC;;AAgBA,WAAAsB,aAAA;AAyLC,WAAAC,cAAA;EAAA,IAAAC,eAAA;EAAA,WAAAC,gBAAA,MA7JkBD,eAAe,KAAfA,eAAe,GAAAD,cAAA,CAAfC,eAAe,KAAAD,cAAA,CAAfC,eAAe;AAAA,GA5BjBF,aAAa,KAAbA,aAAa;AA2L9B,OAAO,IAAMI,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/core",
3
3
  "description": "Semrush Core Component",
4
- "version": "16.0.0-prerelease.12",
4
+ "version": "16.0.0-prerelease.13",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.mjs",
7
7
  "typings": "lib/index.d.ts",
@@ -19,250 +19,250 @@
19
19
  "types": "./src/index.ts"
20
20
  },
21
21
  "./lib/themes/default.css": {
22
- "require": "./lib/themes/default.css",
23
- "import": "./lib/themes/default.css"
22
+ "require": "./lib/esm/theme/themes/default.css",
23
+ "import": "./lib/esm/theme/themes/default.css"
24
24
  },
25
25
  "./lib/themes/light.css": {
26
- "require": "./lib/themes/light.css",
27
- "import": "./lib/themes/light.css"
26
+ "require": "./lib/esm/theme/themes/light.css",
27
+ "import": "./lib/esm/theme/themes/light.css"
28
28
  },
29
29
  "./lib/themes/dark.css": {
30
- "require": "./lib/themes/dark.css",
31
- "import": "./lib/themes/dark.css"
30
+ "require": "./lib/esm/theme/themes/dark.css",
31
+ "import": "./lib/esm/theme/themes/dark.css"
32
32
  },
33
33
  "./lib/themes/auto.css": {
34
- "require": "./lib/themes/auto.css",
35
- "import": "./lib/themes/auto.css"
34
+ "require": "./lib/esm/theme/themes/auto.css",
35
+ "import": "./lib/esm/theme/themes/auto.css"
36
36
  },
37
37
  "./lib/utils/focus-lock/getFocusableIn": {
38
- "require": "./lib/utils/focus-lock/getFocusableIn.js",
39
- "import": "./lib/utils/focus-lock/getFocusableIn.mjs",
40
- "types": "./lib/utils/focus-lock/getFocusableIn.d.ts"
38
+ "require": "./lib/cjs/utils/focus-lock/getFocusableIn.js",
39
+ "import": "./lib/esm/utils/focus-lock/getFocusableIn.mjs",
40
+ "types": "./lib/types/utils/focus-lock/getFocusableIn.d.ts"
41
41
  },
42
42
  "./lib/utils/focus-lock/isFocusable": {
43
- "require": "./lib/utils/focus-lock/isFocusable.js",
44
- "import": "./lib/utils/focus-lock/isFocusable.mjs",
45
- "types": "./lib/utils/focus-lock/isFocusable.d.ts"
43
+ "require": "./lib/cjs/utils/focus-lock/isFocusable.js",
44
+ "import": "./lib/esm/utils/focus-lock/isFocusable.mjs",
45
+ "types": "./lib/types/utils/focus-lock/isFocusable.d.ts"
46
46
  },
47
47
  "./lib/utils/enhances/a11yEnhance": {
48
- "require": "./lib/utils/enhances/a11yEnhance.js",
49
- "import": "./lib/utils/enhances/a11yEnhance.mjs",
50
- "types": "./lib/utils/enhances/a11yEnhance.d.ts"
48
+ "require": "./lib/cjs/utils/enhances/a11yEnhance.js",
49
+ "import": "./lib/esm/utils/enhances/a11yEnhance.mjs",
50
+ "types": "./lib/types/utils/enhances/a11yEnhance.d.ts"
51
51
  },
52
52
  "./lib/utils/enhances/animatedSizeEnhance": {
53
- "require": "./lib/utils/enhances/animatedSizeEnhance.js",
54
- "import": "./lib/utils/enhances/animatedSizeEnhance.mjs",
55
- "types": "./lib/utils/enhances/animatedSizeEnhance.d.ts"
53
+ "require": "./lib/cjs/utils/enhances/animatedSizeEnhance.js",
54
+ "import": "./lib/esm/utils/enhances/animatedSizeEnhance.mjs",
55
+ "types": "./lib/types/utils/enhances/animatedSizeEnhance.d.ts"
56
56
  },
57
57
  "./lib/utils/enhances/autoFocusEnhance": {
58
- "require": "./lib/utils/enhances/autoFocusEnhance.js",
59
- "import": "./lib/utils/enhances/autoFocusEnhance.mjs",
60
- "types": "./lib/utils/enhances/autoFocusEnhance.d.ts"
58
+ "require": "./lib/cjs/utils/enhances/autoFocusEnhance.js",
59
+ "import": "./lib/esm/utils/enhances/autoFocusEnhance.mjs",
60
+ "types": "./lib/types/utils/enhances/autoFocusEnhance.d.ts"
61
61
  },
62
62
  "./lib/utils/enhances/contextEnhance": {
63
- "require": "./lib/utils/enhances/contextEnhance.js",
64
- "import": "./lib/utils/enhances/contextEnhance.mjs",
65
- "types": "./lib/utils/enhances/contextEnhance.d.ts"
63
+ "require": "./lib/cjs/utils/enhances/contextEnhance.js",
64
+ "import": "./lib/esm/utils/enhances/contextEnhance.mjs",
65
+ "types": "./lib/types/utils/enhances/contextEnhance.d.ts"
66
66
  },
67
67
  "./lib/utils/enhances/focusSourceEnhance": {
68
- "require": "./lib/utils/enhances/focusSourceEnhance.js",
69
- "import": "./lib/utils/enhances/focusSourceEnhance.mjs",
70
- "types": "./lib/utils/enhances/focusSourceEnhance.d.ts"
68
+ "require": "./lib/cjs/utils/enhances/focusSourceEnhance.js",
69
+ "import": "./lib/esm/utils/enhances/focusSourceEnhance.mjs",
70
+ "types": "./lib/types/utils/enhances/focusSourceEnhance.d.ts"
71
71
  },
72
72
  "./lib/utils/enhances/keyboardFocusEnhance": {
73
- "require": "./lib/utils/enhances/keyboardFocusEnhance.js",
74
- "import": "./lib/utils/enhances/keyboardFocusEnhance.mjs",
75
- "types": "./lib/utils/enhances/keyboardFocusEnhance.d.ts"
73
+ "require": "./lib/cjs/utils/enhances/keyboardFocusEnhance.js",
74
+ "import": "./lib/esm/utils/enhances/keyboardFocusEnhance.mjs",
75
+ "types": "./lib/types/utils/enhances/keyboardFocusEnhance.d.ts"
76
76
  },
77
77
  "./lib/utils/enhances/i18nEnhance": {
78
- "require": "./lib/utils/enhances/i18nEnhance.js",
79
- "import": "./lib/utils/enhances/i18nEnhance.mjs",
80
- "types": "./lib/utils/enhances/i18nEnhance.d.ts"
78
+ "require": "./lib/cjs/utils/enhances/i18nEnhance.js",
79
+ "import": "./lib/esm/utils/enhances/i18nEnhance.mjs",
80
+ "types": "./lib/types/utils/enhances/i18nEnhance.d.ts"
81
81
  },
82
82
  "./lib/utils/enhances/resolveColorEnhance": {
83
- "require": "./lib/utils/enhances/resolveColorEnhance.js",
84
- "import": "./lib/utils/enhances/resolveColorEnhance.mjs",
85
- "types": "./lib/utils/enhances/resolveColorEnhance.d.ts"
83
+ "require": "./lib/cjs/utils/enhances/resolveColorEnhance.js",
84
+ "import": "./lib/esm/utils/enhances/resolveColorEnhance.mjs",
85
+ "types": "./lib/types/utils/enhances/resolveColorEnhance.d.ts"
86
86
  },
87
87
  "./lib/utils/enhances/WithI18n": {
88
- "require": "./lib/utils/enhances/WithI18n.js",
89
- "import": "./lib/utils/enhances/WithI18n.mjs",
90
- "types": "./lib/utils/enhances/WithI18n.d.ts"
88
+ "require": "./lib/cjs/utils/enhances/WithI18n.js",
89
+ "import": "./lib/esm/utils/enhances/WithI18n.mjs",
90
+ "types": "./lib/types/utils/enhances/WithI18n.d.ts"
91
91
  },
92
92
  "./lib/utils/use/useEnhancedEffect": {
93
- "require": "./lib/utils/use/useEnhancedEffect.js",
94
- "import": "./lib/utils/use/useEnhancedEffect.mjs",
95
- "types": "./lib/utils/use/useEnhancedEffect.d.ts"
93
+ "require": "./lib/cjs/utils/use/useEnhancedEffect.js",
94
+ "import": "./lib/esm/utils/use/useEnhancedEffect.mjs",
95
+ "types": "./lib/types/utils/use/useEnhancedEffect.d.ts"
96
96
  },
97
97
  "./lib/utils/use/useFocusLock": {
98
- "require": "./lib/utils/use/useFocusLock.js",
99
- "import": "./lib/utils/use/useFocusLock.mjs",
100
- "types": "./lib/utils/use/useFocusLock.d.ts"
98
+ "require": "./lib/cjs/utils/use/useFocusLock.js",
99
+ "import": "./lib/esm/utils/use/useFocusLock.mjs",
100
+ "types": "./lib/types/utils/use/useFocusLock.d.ts"
101
101
  },
102
102
  "./lib/utils/use/useColorResolver": {
103
- "require": "./lib/utils/use/useColorResolver.js",
104
- "import": "./lib/utils/use/useColorResolver.mjs",
105
- "types": "./lib/utils/use/useColorResolver.d.ts"
103
+ "require": "./lib/cjs/utils/use/useColorResolver.js",
104
+ "import": "./lib/esm/utils/use/useColorResolver.mjs",
105
+ "types": "./lib/types/utils/use/useColorResolver.d.ts"
106
106
  },
107
107
  "./lib/utils/use/useEventCallback": {
108
- "require": "./lib/utils/use/useEventCallback.js",
109
- "import": "./lib/utils/use/useEventCallback.mjs",
110
- "types": "./lib/utils/use/useEventCallback.d.ts"
108
+ "require": "./lib/cjs/utils/use/useEventCallback.js",
109
+ "import": "./lib/esm/utils/use/useEventCallback.mjs",
110
+ "types": "./lib/types/utils/use/useEventCallback.d.ts"
111
111
  },
112
112
  "./lib/utils/use/usePreventScroll": {
113
- "require": "./lib/utils/use/usePreventScroll.js",
114
- "import": "./lib/utils/use/usePreventScroll.mjs",
115
- "types": "./lib/utils/use/usePreventScroll.d.ts"
113
+ "require": "./lib/cjs/utils/use/usePreventScroll.js",
114
+ "import": "./lib/esm/utils/use/usePreventScroll.mjs",
115
+ "types": "./lib/types/utils/use/usePreventScroll.d.ts"
116
116
  },
117
117
  "./lib/utils/addonTextChildren": {
118
- "require": "./lib/utils/addonTextChildren.js",
119
- "import": "./lib/utils/addonTextChildren.mjs",
120
- "types": "./lib/utils/addonTextChildren.d.ts"
118
+ "require": "./lib/cjs/utils/addonTextChildren.js",
119
+ "import": "./lib/esm/utils/addonTextChildren.mjs",
120
+ "types": "./lib/types/utils/addonTextChildren.d.ts"
121
121
  },
122
122
  "./lib/utils/ariaProps": {
123
- "require": "./lib/utils/ariaProps.js",
124
- "import": "./lib/utils/ariaProps.mjs",
125
- "types": "./lib/utils/ariaProps.d.ts"
123
+ "require": "./lib/cjs/utils/ariaProps.js",
124
+ "import": "./lib/esm/utils/ariaProps.mjs",
125
+ "types": "./lib/types/utils/ariaProps.d.ts"
126
126
  },
127
127
  "./lib/utils/assignProps": {
128
- "require": "./lib/utils/assignProps.js",
129
- "import": "./lib/utils/assignProps.mjs",
130
- "types": "./lib/utils/assignProps.d.ts"
128
+ "require": "./lib/cjs/utils/assignProps.js",
129
+ "import": "./lib/esm/utils/assignProps.mjs",
130
+ "types": "./lib/types/utils/assignProps.d.ts"
131
131
  },
132
132
  "./lib/utils/capitalizeFirstLetter": {
133
- "require": "./lib/utils/capitalizeFirstLetter.js",
134
- "import": "./lib/utils/capitalizeFirstLetter.mjs",
135
- "types": "./lib/utils/capitalizeFirstLetter.d.ts"
133
+ "require": "./lib/cjs/utils/capitalizeFirstLetter.js",
134
+ "import": "./lib/esm/utils/capitalizeFirstLetter.mjs",
135
+ "types": "./lib/types/utils/capitalizeFirstLetter.d.ts"
136
136
  },
137
137
  "./lib/utils/canUseDOM": {
138
- "require": "./lib/utils/canUseDOM.js",
139
- "import": "./lib/utils/canUseDOM.mjs",
140
- "types": "./lib/utils/canUseDOM.d.ts"
138
+ "require": "./lib/cjs/utils/canUseDOM.js",
139
+ "import": "./lib/esm/utils/canUseDOM.mjs",
140
+ "types": "./lib/types/utils/canUseDOM.d.ts"
141
141
  },
142
142
  "./lib/utils/cssToIntDefault": {
143
- "require": "./lib/utils/cssToIntDefault.js",
144
- "import": "./lib/utils/cssToIntDefault.mjs",
145
- "types": "./lib/utils/cssToIntDefault.d.ts"
143
+ "require": "./lib/cjs/utils/cssToIntDefault.js",
144
+ "import": "./lib/esm/utils/cssToIntDefault.mjs",
145
+ "types": "./lib/types/utils/cssToIntDefault.d.ts"
146
146
  },
147
147
  "./lib/utils/eventEmitter": {
148
- "require": "./lib/utils/eventEmitter.js",
149
- "import": "./lib/utils/eventEmitter.mjs",
150
- "types": "./lib/utils/eventEmitter.d.ts"
148
+ "require": "./lib/cjs/utils/eventEmitter.js",
149
+ "import": "./lib/esm/utils/eventEmitter.mjs",
150
+ "types": "./lib/types/utils/eventEmitter.d.ts"
151
151
  },
152
152
  "./lib/utils/fire": {
153
- "require": "./lib/utils/fire.js",
154
- "import": "./lib/utils/fire.mjs",
155
- "types": "./lib/utils/fire.d.ts"
153
+ "require": "./lib/cjs/utils/fire.js",
154
+ "import": "./lib/esm/utils/fire.mjs",
155
+ "types": "./lib/types/utils/fire.d.ts"
156
156
  },
157
157
  "./lib/utils/findComponent": {
158
- "require": "./lib/utils/findComponent.js",
159
- "import": "./lib/utils/findComponent.mjs",
160
- "types": "./lib/utils/findComponent.d.ts"
158
+ "require": "./lib/cjs/utils/findComponent.js",
159
+ "import": "./lib/esm/utils/findComponent.mjs",
160
+ "types": "./lib/types/utils/findComponent.d.ts"
161
161
  },
162
162
  "./lib/utils/getAccessibleName": {
163
- "require": "./lib/utils/getAccessibleName.js",
164
- "import": "./lib/utils/getAccessibleName.mjs",
165
- "types": "./lib/utils/getAccessibleName.d.ts"
163
+ "require": "./lib/cjs/utils/getAccessibleName.js",
164
+ "import": "./lib/esm/utils/getAccessibleName.mjs",
165
+ "types": "./lib/types/utils/getAccessibleName.d.ts"
166
166
  },
167
167
  "./lib/utils/getEventTarget": {
168
- "require": "./lib/utils/getEventTarget.js",
169
- "import": "./lib/utils/getEventTarget.mjs",
170
- "types": "./lib/utils/getEventTarget.d.ts"
168
+ "require": "./lib/cjs/utils/getEventTarget.js",
169
+ "import": "./lib/esm/utils/getEventTarget.mjs",
170
+ "types": "./lib/types/utils/getEventTarget.d.ts"
171
171
  },
172
172
  "./lib/utils/getOriginChildren": {
173
- "require": "./lib/utils/getOriginChildren.js",
174
- "import": "./lib/utils/getOriginChildren.mjs",
175
- "types": "./lib/utils/getOriginChildren.d.ts"
173
+ "require": "./lib/cjs/utils/getOriginChildren.js",
174
+ "import": "./lib/esm/utils/getOriginChildren.mjs",
175
+ "types": "./lib/types/utils/getOriginChildren.d.ts"
176
176
  },
177
177
  "./lib/utils/hasLabels": {
178
- "require": "./lib/utils/hasLabels.js",
179
- "import": "./lib/utils/hasLabels.mjs",
180
- "types": "./lib/utils/hasLabels.d.ts"
178
+ "require": "./lib/cjs/utils/hasLabels.js",
179
+ "import": "./lib/esm/utils/hasLabels.mjs",
180
+ "types": "./lib/types/utils/hasLabels.d.ts"
181
181
  },
182
182
  "./lib/utils/hasParent": {
183
- "require": "./lib/utils/hasParent.js",
184
- "import": "./lib/utils/hasParent.mjs",
185
- "types": "./lib/utils/hasParent.d.ts"
183
+ "require": "./lib/cjs/utils/hasParent.js",
184
+ "import": "./lib/esm/utils/hasParent.mjs",
185
+ "types": "./lib/types/utils/hasParent.d.ts"
186
186
  },
187
187
  "./lib/utils/inputProps": {
188
- "require": "./lib/utils/inputProps.js",
189
- "import": "./lib/utils/inputProps.mjs",
190
- "types": "./lib/utils/inputProps.d.ts"
188
+ "require": "./lib/cjs/utils/inputProps.js",
189
+ "import": "./lib/esm/utils/inputProps.mjs",
190
+ "types": "./lib/types/utils/inputProps.d.ts"
191
191
  },
192
192
  "./lib/utils/isNode": {
193
- "require": "./lib/utils/isNode.js",
194
- "import": "./lib/utils/isNode.mjs",
195
- "types": "./lib/utils/isNode.d.ts"
193
+ "require": "./lib/cjs/utils/isNode.js",
194
+ "import": "./lib/esm/utils/isNode.mjs",
195
+ "types": "./lib/types/utils/isNode.d.ts"
196
196
  },
197
197
  "./lib/utils/isRetina": {
198
- "require": "./lib/utils/isRetina.js",
199
- "import": "./lib/utils/isRetina.mjs",
200
- "types": "./lib/utils/isRetina.d.ts"
198
+ "require": "./lib/cjs/utils/isRetina.js",
199
+ "import": "./lib/esm/utils/isRetina.mjs",
200
+ "types": "./lib/types/utils/isRetina.d.ts"
201
201
  },
202
202
  "./lib/utils/ownerDocument": {
203
- "require": "./lib/utils/ownerDocument.js",
204
- "import": "./lib/utils/ownerDocument.mjs",
205
- "types": "./lib/utils/ownerDocument.d.ts"
203
+ "require": "./lib/cjs/utils/ownerDocument.js",
204
+ "import": "./lib/esm/utils/ownerDocument.mjs",
205
+ "types": "./lib/types/utils/ownerDocument.d.ts"
206
206
  },
207
207
  "./lib/utils/pick": {
208
- "require": "./lib/utils/pick.js",
209
- "import": "./lib/utils/pick.mjs",
210
- "types": "./lib/utils/pick.d.ts"
208
+ "require": "./lib/cjs/utils/pick.js",
209
+ "import": "./lib/esm/utils/pick.mjs",
210
+ "types": "./lib/types/utils/pick.d.ts"
211
211
  },
212
212
  "./lib/utils/propsForElement": {
213
- "require": "./lib/utils/propsForElement.js",
214
- "import": "./lib/utils/propsForElement.mjs",
215
- "types": "./lib/utils/propsForElement.d.ts"
213
+ "require": "./lib/cjs/utils/propsForElement.js",
214
+ "import": "./lib/esm/utils/propsForElement.mjs",
215
+ "types": "./lib/types/utils/propsForElement.d.ts"
216
216
  },
217
217
  "./lib/utils/logger": {
218
- "require": "./lib/utils/logger.js",
219
- "import": "./lib/utils/logger.mjs",
220
- "types": "./lib/utils/logger.d.ts"
218
+ "require": "./lib/cjs/utils/logger.js",
219
+ "import": "./lib/esm/utils/logger.mjs",
220
+ "types": "./lib/types/utils/logger.d.ts"
221
221
  },
222
222
  "./lib/utils/rafTrottle": {
223
- "require": "./lib/utils/rafTrottle.js",
224
- "import": "./lib/utils/rafTrottle.mjs",
225
- "types": "./lib/utils/rafTrottle.d.ts"
223
+ "require": "./lib/cjs/utils/rafTrottle.js",
224
+ "import": "./lib/esm/utils/rafTrottle.mjs",
225
+ "types": "./lib/types/utils/rafTrottle.d.ts"
226
226
  },
227
227
  "./lib/utils/reactToText": {
228
- "require": "./lib/utils/reactToText.js",
229
- "import": "./lib/utils/reactToText.mjs",
230
- "types": "./lib/utils/reactToText.d.ts"
228
+ "require": "./lib/cjs/utils/reactToText.js",
229
+ "import": "./lib/esm/utils/reactToText.mjs",
230
+ "types": "./lib/types/utils/reactToText.d.ts"
231
231
  },
232
232
  "./lib/utils/ref": {
233
- "require": "./lib/utils/ref.js",
234
- "import": "./lib/utils/ref.mjs",
235
- "types": "./lib/utils/ref.d.ts"
233
+ "require": "./lib/cjs/utils/ref.js",
234
+ "import": "./lib/esm/utils/ref.mjs",
235
+ "types": "./lib/types/utils/ref.d.ts"
236
236
  },
237
237
  "./lib/utils/ScreenReaderOnly": {
238
- "require": "./lib/utils/ScreenReaderOnly.js",
239
- "import": "./lib/utils/ScreenReaderOnly.mjs",
240
- "types": "./lib/utils/ScreenReaderOnly.d.ts"
238
+ "require": "./lib/cjs/utils/ScreenReaderOnly.js",
239
+ "import": "./lib/esm/utils/ScreenReaderOnly.mjs",
240
+ "types": "./lib/types/utils/ScreenReaderOnly.d.ts"
241
241
  },
242
242
  "./lib/utils/syncScroll": {
243
- "require": "./lib/utils/syncScroll.js",
244
- "import": "./lib/utils/syncScroll.mjs",
245
- "types": "./lib/utils/syncScroll.d.ts"
243
+ "require": "./lib/cjs/utils/syncScroll.js",
244
+ "import": "./lib/esm/utils/syncScroll.mjs",
245
+ "types": "./lib/types/utils/syncScroll.d.ts"
246
246
  },
247
247
  "./lib/utils/ThemeProvider": {
248
- "require": "./lib/utils/ThemeProvider.js",
249
- "import": "./lib/utils/ThemeProvider.mjs",
250
- "types": "./lib/utils/ThemeProvider.d.ts"
248
+ "require": "./lib/cjs/utils/ThemeProvider.js",
249
+ "import": "./lib/esm/utils/ThemeProvider.mjs",
250
+ "types": "./lib/types/utils/ThemeProvider.d.ts"
251
251
  },
252
252
  "./lib/utils/uniqueID": {
253
- "require": "./lib/utils/uniqueID.js",
254
- "import": "./lib/utils/uniqueID.mjs",
255
- "types": "./lib/utils/uniqueID.d.ts"
253
+ "require": "./lib/cjs/utils/uniqueID.js",
254
+ "import": "./lib/esm/utils/uniqueID.mjs",
255
+ "types": "./lib/types/utils/uniqueID.d.ts"
256
256
  },
257
257
  "./lib/utils/useCssVariable": {
258
- "require": "./lib/utils/useCssVariable.js",
259
- "import": "./lib/utils/useCssVariable.mjs",
260
- "types": "./lib/utils/useCssVariable.d.ts"
258
+ "require": "./lib/cjs/utils/useCssVariable.js",
259
+ "import": "./lib/esm/utils/useCssVariable.mjs",
260
+ "types": "./lib/types/utils/useCssVariable.d.ts"
261
261
  },
262
262
  "./lib/utils/zIndexStacking": {
263
- "require": "./lib/utils/zIndexStacking.js",
264
- "import": "./lib/utils/zIndexStacking.mjs",
265
- "types": "./lib/utils/zIndexStacking.d.ts"
263
+ "require": "./lib/cjs/utils/zIndexStacking.js",
264
+ "import": "./lib/esm/utils/zIndexStacking.mjs",
265
+ "types": "./lib/types/utils/zIndexStacking.d.ts"
266
266
  }
267
267
  },
268
268
  "dependencies": {