Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

onno

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onno - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0

85

dist/index.d.ts

@@ -1,33 +0,66 @@

import { ClassValue } from 'clsx';
export { ClassValue, clsx } from 'clsx';
import { ClassValue } from "clsx"
export { ClassValue, clsx } from "clsx"
type ClassKey = "className";
type ClassProps = Partial<Record<ClassKey, ClassValue>>;
type Flatten<T> = T extends object ? {} & {
[P in keyof T]: T[P];
} : T;
type OnnoClassValue = string | string[];
type OnnoClassProps = Record<ClassKey, OnnoClassValue>;
type OnnoClassMap = Record<string, OnnoClassValue>;
type OnnoVariants = Record<string, OnnoClassValue | OnnoClassMap>;
type ClassKey = "className"
type ClassProps = Partial<Record<ClassKey, ClassValue>>
type Flatten<T> = T extends object
? {} & {
[P in keyof T]: T[P]
}
: T
type OnnoClassValue = string | string[]
type OnnoClassProps = Record<ClassKey, OnnoClassValue>
type OnnoClassMap = Record<string, OnnoClassValue>
type OnnoVariants = Record<string, OnnoClassValue | OnnoClassMap>
type OnnoDefaults<T extends OnnoVariants> = {
[K in keyof T]?: T[K] extends OnnoClassMap ? keyof T[K] : boolean;
};
[K in keyof T]?: T[K] extends OnnoClassMap ? keyof T[K] : boolean
}
type OnnoCompound<T extends OnnoVariants> = {
[K in keyof T]?: T[K] extends OnnoClassMap ? keyof T[K] | Array<keyof T[K]> : boolean;
} & OnnoClassProps;
[K in keyof T]?: T[K] extends OnnoClassMap
? keyof T[K] | Array<keyof T[K]>
: boolean
} & OnnoClassProps
interface OnnoConfig<T extends OnnoVariants> {
baseline?: OnnoClassValue;
compound?: Flatten<OnnoCompound<T>>[];
defaults?: Flatten<OnnoDefaults<T>>;
variants: T;
baseline?: OnnoClassValue
compound?: Flatten<OnnoCompound<T>>[]
defaults?: Flatten<OnnoDefaults<T>>
variants: T
}
type OnnoOptions<T extends OnnoVariants> = OnnoDefaults<T> & ClassProps;
type OnnoFunction<T extends OnnoVariants> = (options?: Flatten<OnnoOptions<T>>) => string;
type OnnoFactory = <T extends OnnoVariants>(config: OnnoConfig<T>) => OnnoFunction<T>;
type OnnoVariantProps<F extends OnnoFunction<any>> = Omit<Exclude<Parameters<F>[0], undefined>, ClassKey>;
type OnnoProps<F extends OnnoFunction<any>, K extends keyof OnnoVariantProps<F> = never> = Flatten<OnnoVariantProps<F> & Required<Pick<OnnoVariantProps<F>, K>> & ClassProps>;
type OnnoOptions<T extends OnnoVariants> = OnnoDefaults<T> & ClassProps
type OnnoFunction<T extends OnnoVariants> = (
options?: Flatten<OnnoOptions<T>>,
) => string
type OnnoFactory = <T extends OnnoVariants>(
config: OnnoConfig<T>,
) => OnnoFunction<T>
type OnnoVariantProps<F extends OnnoFunction<any>> = Omit<
Exclude<Parameters<F>[0], undefined>,
ClassKey
>
type OnnoProps<
F extends OnnoFunction<any>,
K extends keyof OnnoVariantProps<F> = never,
> = Flatten<
OnnoVariantProps<F> & Required<Pick<OnnoVariantProps<F>, K>> & ClassProps
>
declare const onno: OnnoFactory;
declare const onno: OnnoFactory
export { ClassKey, ClassProps, Flatten, OnnoClassMap, OnnoClassProps, OnnoClassValue, OnnoCompound, OnnoConfig, OnnoDefaults, OnnoFactory, OnnoFunction, OnnoOptions, OnnoProps, OnnoVariantProps, OnnoVariants, onno };
export {
ClassKey,
ClassProps,
Flatten,
OnnoClassMap,
OnnoClassProps,
OnnoClassValue,
OnnoCompound,
OnnoConfig,
OnnoDefaults,
OnnoFactory,
OnnoFunction,
OnnoOptions,
OnnoProps,
OnnoVariantProps,
OnnoVariants,
onno,
}
{
"name": "onno",
"license": "MIT",
"version": "2.1.2",
"version": "2.2.0",
"homepage": "https://onnojs.com",

@@ -31,5 +31,5 @@ "keywords": [

"build": "pkgroll",
"lint": "prettier --write .",
"clean": "rm -rf coverage dist",
"lint": "prettier --write --ignore-path .prettierignore .",
"test": "vitest run --coverage",
"clean": "rm -rf coverage dist",
"changelog": "pnpm auto-changelog",

@@ -36,0 +36,0 @@ "prepare": "husky install",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc