@fuf-stack/pixel-utils 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cn.ts","../src/theme.ts","../src/tv.ts"],"names":[
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/uniform/uniform/packages/pixel-utils/dist/index.cjs","../src/cn.ts","../src/theme.ts","../src/tv.ts"],"names":[],"mappings":"AAAA;ACEA,gGAA8B;ADA9B;AACA;AEFA,0CAAuB;AFIvB;AACA;AGJA,qDAAmB;AAYZ,IAAM,qBAAA,EAAuB,CAClC,QAAA,EACA,SAAA,EACA,QAAA,EAAA,GAC4B;AAC5B,EAAA,MAAM,aAAA,EAAgB,OAAO,UAAA,IAAc,SAAA,GAAY,UAAA,GAAc,CAAC,CAAA;AAEtE,EAAA,OAAO,MAAA,CAAO,WAAA;AAAA,IACZ,MAAA,CAAO,OAAA,CAAQ,QAAQ,CAAA,CAAE,GAAA,CAAI,CAAC,CAAC,IAAA,EAAM,SAAS,CAAA,EAAA,GAAM;AAAA,MAClD,IAAA;AAAA,MACA,SAAA,GAAY,KAAA,IAAS,SAAA,EAAA;AAAA;AAAA,QAEhB,SAAA,CAAU;AAAA,UACT,SAAA,EACE,OAAO,UAAA,IAAc,SAAA,EAAW,UAAA,EAAY,YAAA,CAAa,IAAI;AAAA,QACjE,CAAC;AAAA,MAAA,EAAA,EAAA;AAAA;AAAA,QAEA,SAAA,CAAU,EAAE,SAAA,EAAW,YAAA,CAAa,IAAI,EAAE,CAAC;AAAA,MAAA;AAAA,IAClD,CAAC;AAAA,EACH,CAAA;AACF,CAAA;AHTA;AACE;AACA;AACA;AACA;AACF,0JAAC","file":"/home/runner/work/uniform/uniform/packages/pixel-utils/dist/index.cjs","sourcesContent":[null,"/* eslint-disable import/prefer-default-export */\n\nexport { default as cn } from 'classnames';\n","/* eslint-disable import/prefer-default-export */\nexport { nextui } from '@nextui-org/theme';\n","import type { VariantProps } from '@nextui-org/theme';\n\nexport { tv } from 'tailwind-variants';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type TVProps<Component extends (...args: any) => any> =\n VariantProps<Component>;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type TVClassName<Component extends (...args: any) => any> =\n | Partial<Record<keyof ReturnType<Component>, string>>\n | string;\n\n// converts tailwind-variants slots instance to actual classnames object\nexport const variantsToClassNames = <T extends Record<string, unknown>>(\n variants: T,\n className?: string | Record<string, string>,\n baseSlot?: keyof T,\n): Record<keyof T, string> => {\n const classNameObj = (typeof className === 'object' && className) || {};\n // @ts-expect-error could be improved\n return Object.fromEntries(\n Object.entries(variants).map(([slot, variantFn]) => [\n slot as keyof T,\n baseSlot && slot === baseSlot\n ? // @ts-expect-error could be improved\n (variantFn({\n className:\n typeof className === 'string' ? className : classNameObj[slot],\n }) as string)\n : // @ts-expect-error could be improved\n (variantFn({ className: classNameObj[slot] }) as string),\n ]),\n );\n};\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fuf-stack/pixel-utils",
|
|
3
3
|
"description": "fuf pixels helper utils",
|
|
4
4
|
"author": "Hannes Tiede",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
8
8
|
"module": "./dist/index.js",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
13
14
|
"import": "./dist/index.js",
|
|
14
|
-
"require": "./dist/index.cjs"
|
|
15
|
-
"types": "./dist/index.d.ts"
|
|
15
|
+
"require": "./dist/index.cjs"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"url": "https://github.com/fuf-stack/uniform/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@nextui-org/theme": "2.2.
|
|
40
|
+
"@nextui-org/theme": "2.2.11",
|
|
41
41
|
"classnames": "2.5.1",
|
|
42
42
|
"tailwind-variants": "0.2.1"
|
|
43
43
|
},
|