main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

3
node_modules/class-variance-authority/README.md generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# class-variance-authority
For documentation, visit [cva.style](https://cva.style).

21
node_modules/class-variance-authority/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import { clsx } from "clsx";
import type { ClassProp, ClassValue, OmitUndefined, StringToBoolean } from "./types";
export type VariantProps<Component extends (...args: any) => any> = Omit<OmitUndefined<Parameters<Component>[0]>, "class" | "className">;
export type CxOptions = Parameters<typeof clsx>;
export type CxReturn = ReturnType<typeof clsx>;
export declare const cx: typeof clsx;
type ConfigSchema = Record<string, Record<string, ClassValue>>;
type ConfigVariants<T extends ConfigSchema> = {
[Variant in keyof T]?: StringToBoolean<keyof T[Variant]> | null | undefined;
};
type ConfigVariantsMulti<T extends ConfigSchema> = {
[Variant in keyof T]?: StringToBoolean<keyof T[Variant]> | StringToBoolean<keyof T[Variant]>[] | undefined;
};
type Config<T> = T extends ConfigSchema ? {
variants?: T;
defaultVariants?: ConfigVariants<T>;
compoundVariants?: (T extends ConfigSchema ? (ConfigVariants<T> | ConfigVariantsMulti<T>) & ClassProp : ClassProp)[];
} : never;
type Props<T> = T extends ConfigSchema ? ConfigVariants<T> & ClassProp : ClassProp;
export declare const cva: <T>(base?: ClassValue, config?: Config<T> | undefined) => (props?: Props<T> | undefined) => string;
export {};

53
node_modules/class-variance-authority/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.cva = exports.cx = void 0;
var _clsx = require("clsx");
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
const cx = _clsx.clsx;
exports.cx = cx;
const cva = (base, config)=>{
return (props)=>{
var ref;
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
const { variants , defaultVariants } = config;
const getVariantClassNames = Object.keys(variants).map((variant)=>{
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
if (variantProp === null) return null;
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
return variants[variant][variantKey];
});
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
let [key, value] = param;
if (value === undefined) {
return acc;
}
acc[key] = value;
return acc;
}, {});
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
return Object.entries(compoundVariantOptions).every((param)=>{
let [key, value] = param;
return Array.isArray(value) ? value.includes({
...defaultVariants,
...propsWithoutUndefined
}[key]) : ({
...defaultVariants,
...propsWithoutUndefined
})[key] === value;
}) ? [
...acc,
cvClass,
cvClassName
] : acc;
}, []);
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
};
};
exports.cva = cva;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}

46
node_modules/class-variance-authority/dist/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,46 @@
import { clsx } from "clsx";
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
export const cx = clsx;
export const cva = (base, config)=>{
return (props)=>{
var ref;
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
const { variants , defaultVariants } = config;
const getVariantClassNames = Object.keys(variants).map((variant)=>{
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
if (variantProp === null) return null;
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
return variants[variant][variantKey];
});
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
let [key, value] = param;
if (value === undefined) {
return acc;
}
acc[key] = value;
return acc;
}, {});
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
return Object.entries(compoundVariantOptions).every((param)=>{
let [key, value] = param;
return Array.isArray(value) ? value.includes({
...defaultVariants,
...propsWithoutUndefined
}[key]) : ({
...defaultVariants,
...propsWithoutUndefined
})[key] === value;
}) ? [
...acc,
cvClass,
cvClassName
] : acc;
}, []);
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
};
};
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}

15
node_modules/class-variance-authority/dist/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import type * as CLSX from "clsx";
export type ClassPropKey = "class" | "className";
export type ClassValue = CLSX.ClassValue;
export type ClassProp = {
class: ClassValue;
className?: never;
} | {
class?: never;
className: ClassValue;
} | {
class?: never;
className?: never;
};
export type OmitUndefined<T> = T extends undefined ? never : T;
export type StringToBoolean<T> = T extends "true" | "false" ? boolean : T;

View File

@@ -0,0 +1,6 @@
export type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined;
export type ClassDictionary = Record<string, any>;
export type ClassArray = ClassValue[];
export function clsx(...inputs: ClassValue[]): string;
export default clsx;

View File

@@ -0,0 +1,10 @@
declare namespace clsx {
type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined;
type ClassDictionary = Record<string, any>;
type ClassArray = ClassValue[];
function clsx(...inputs: ClassValue[]): string;
}
declare function clsx(...inputs: clsx.ClassValue[]): string;
export = clsx;

View File

@@ -0,0 +1 @@
function e(r){var o,t,f="";if("string"==typeof r||"number"==typeof r)f+=r;else if("object"==typeof r)if(Array.isArray(r))for(o=0;o<r.length;o++)r[o]&&(t=e(r[o]))&&(f&&(f+=" "),f+=t);else for(o in r)r[o]&&(f&&(f+=" "),f+=o);return f}function r(){for(var r,o,t=0,f="";t<arguments.length;)(r=arguments[t++])&&(o=e(r))&&(f&&(f+=" "),f+=o);return f}module.exports=r,module.exports.clsx=r;

View File

@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.clsx=n()}(this,(function(){function e(n){var t,f,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n))for(t=0;t<n.length;t++)n[t]&&(f=e(n[t]))&&(o&&(o+=" "),o+=f);else for(t in n)n[t]&&(o&&(o+=" "),o+=t);return o}function n(){for(var n,t,f=0,o="";f<arguments.length;)(n=arguments[f++])&&(t=e(n))&&(o&&(o+=" "),o+=t);return o}return n.clsx=n,n}));

View File

@@ -0,0 +1 @@
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}export function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}export default clsx;

View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,48 @@
{
"name": "clsx",
"version": "2.0.0",
"repository": "lukeed/clsx",
"description": "A tiny (234B) utility for constructing className strings conditionally.",
"module": "dist/clsx.mjs",
"unpkg": "dist/clsx.min.js",
"main": "dist/clsx.js",
"exports": {
"import": {
"types": "./clsx.d.mts",
"default": "./dist/clsx.mjs"
},
"default": {
"types": "./clsx.d.ts",
"default": "./dist/clsx.js"
}
},
"types": "clsx.d.ts",
"license": "MIT",
"author": {
"name": "Luke Edwards",
"email": "luke.edwards05@gmail.com",
"url": "https://lukeed.com"
},
"engines": {
"node": ">=6"
},
"scripts": {
"build": "node bin",
"test": "uvu -r esm test"
},
"files": [
"*.d.mts",
"*.d.ts",
"dist"
],
"keywords": [
"classes",
"classname",
"classnames"
],
"devDependencies": {
"esm": "3.2.25",
"terser": "4.8.0",
"uvu": "0.5.4"
}
}

View File

@@ -0,0 +1,109 @@
# clsx [![CI](https://github.com/lukeed/clsx/workflows/CI/badge.svg)](https://github.com/lukeed/clsx/actions?query=workflow%3ACI) [![codecov](https://badgen.net/codecov/c/github/lukeed/clsx)](https://codecov.io/gh/lukeed/clsx)
> A tiny (234B) utility for constructing `className` strings conditionally.<Br>Also serves as a [faster](/bench) & smaller drop-in replacement for the `classnames` module.
This module is available in three formats:
* **ES Module**: `dist/clsx.m.js`
* **CommonJS**: `dist/clsx.js`
* **UMD**: `dist/clsx.min.js`
## Install
```
$ npm install --save clsx
```
## Usage
```js
import clsx from 'clsx';
// or
import { clsx } from 'clsx';
// Strings (variadic)
clsx('foo', true && 'bar', 'baz');
//=> 'foo bar baz'
// Objects
clsx({ foo:true, bar:false, baz:isTrue() });
//=> 'foo baz'
// Objects (variadic)
clsx({ foo:true }, { bar:false }, null, { '--foobar':'hello' });
//=> 'foo --foobar'
// Arrays
clsx(['foo', 0, false, 'bar']);
//=> 'foo bar'
// Arrays (variadic)
clsx(['foo'], ['', 0, false, 'bar'], [['baz', [['hello'], 'there']]]);
//=> 'foo bar baz hello there'
// Kitchen sink (with nesting)
clsx('foo', [1 && 'bar', { baz:false, bat:null }, ['hello', ['world']]], 'cya');
//=> 'foo bar hello world cya'
```
## API
### clsx(...input)
Returns: `String`
#### input
Type: `Mixed`
The `clsx` function can take ***any*** number of arguments, each of which can be an Object, Array, Boolean, or String.
> **Important:** _Any_ falsey values are discarded!<br>Standalone Boolean values are discarded as well.
```js
clsx(true, false, '', null, undefined, 0, NaN);
//=> ''
```
## Benchmarks
For snapshots of cross-browser results, check out the [`bench`](/bench) directory~!
## Support
All versions of Node.js are supported.
All browsers that support [`Array.isArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Browser_compatibility) are supported (IE9+).
>**Note:** For IE8 support and older, please install `clsx@1.0.x` and beware of [#17](https://github.com/lukeed/clsx/issues/17).
## Tailwind Support
Here some additional (optional) steps to enable classes autocompletion using `clsx` with Tailwind CSS.
<details>
<summary>
Visual Studio Code
</summary>
1. [Install the "Tailwind CSS IntelliSense" Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
2. Add the following to your [`settings.json`](https://code.visualstudio.com/docs/getstarted/settings):
```json
{
"tailwindCSS.experimental.classRegex": [
["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
}
```
</details>
## Related
- [obj-str](https://github.com/lukeed/obj-str) - A smaller (96B) and similiar utility that only works with Objects.
## License
MIT © [Luke Edwards](https://lukeed.com)

75
node_modules/class-variance-authority/package.json generated vendored Normal file
View File

@@ -0,0 +1,75 @@
{
"name": "class-variance-authority",
"version": "0.7.0",
"description": "Class Variance Authority 🧬",
"keywords": [
"Class Variance Authority",
"class-variance-authority",
"classes",
"classname",
"classnames",
"css",
"cva",
"stitches",
"vanilla-extract",
"variants"
],
"homepage": "https://github.com/joe-bell/cva#readme",
"bugs": "https://github.com/joe-bell/cva/issues",
"repository": "https://github.com/joe-bell/cva.git",
"funding": "https://joebell.co.uk",
"license": "Apache-2.0",
"author": "Joe Bell (https://joebell.co.uk)",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./types": {
"types": "./dist/types.d.ts"
}
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist/*.mjs",
"dist/*.mjs.map",
"dist/*.js",
"dist/*.js.map",
"dist/*.d.ts"
],
"scripts": {
"build": "run-p build:**",
"build:cjs": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.js -C module.type=commonjs",
"build:esm": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.mjs -C module.type=es6 ",
"build:tsc": "tsc --project .config/tsconfig.build.json",
"check": "tsc --project tsconfig.json --noEmit",
"dev": "jest --config .config/jest.config.ts --watch",
"prepublishOnly": "pnpm build",
"test": "run-p test:*",
"test:jest": "jest --config .config/jest.config.ts --coverage",
"test:size": "pnpm build && bundlesize -f 'dist/*.js' -s 850B"
},
"dependencies": {
"clsx": "2.0.0"
},
"devDependencies": {
"@jest/types": "28.1.1",
"@swc/cli": "0.1.57",
"@swc/core": "1.2.198",
"@swc/jest": "0.2.21",
"@types/jest": "28.1.1",
"@types/node": "18.11.18",
"@types/react": "18.0.12",
"@types/react-dom": "18.0.5",
"bundlesize": "0.18.1",
"jest": "28.1.1",
"npm-run-all": "4.1.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"ts-node": "10.8.1",
"typescript": "5.1.3"
}
}