unocss-merge 0.5.2 → 0.6.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/README.md +27 -2
- package/dist/index-DT_3AX6M.d.ts +11 -0
- package/dist/index.d.ts +1 -10
- package/dist/index.js +1 -1
- package/dist/memoize.d.ts +12 -0
- package/dist/memoize.js +1 -0
- package/dist/react.js +1 -1
- package/dist/{src-PDpx2c42.js → src-Diw-4Z6_.js} +1 -1
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ expect(unoMerge('cursor-pointer', 'cursor-not-allowed')).toBe('cursor-not-allowe
|
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
> [!TIP]
|
|
36
|
-
> This function does not provide any cache mechanism, wrap with your own cache if needed.
|
|
36
|
+
> This function does not provide any cache mechanism, use `unoMergeMemoized` or wrap with your own cache if needed.
|
|
37
37
|
|
|
38
38
|
### `useUnoMerge`
|
|
39
39
|
|
|
@@ -49,6 +49,25 @@ function Component(props) {
|
|
|
49
49
|
> [!TIP]
|
|
50
50
|
> this is a simple wrapper of `React.useMemo`, so arguments.length should not change in runtime
|
|
51
51
|
|
|
52
|
+
### `unoMergeMemoized`
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
import { unoMergeMemoized } from 'unocss-merge/memoize'
|
|
56
|
+
|
|
57
|
+
expect(unoMergeMemoized('hidden', 'block')).toBe('block')
|
|
58
|
+
expect(unoMergeMemoized('hidden', 'block', 'flex')).toBe('flex')
|
|
59
|
+
|
|
60
|
+
expect(unoMergeMemoized('mr-1', 'mr-2')).toBe('mr-2')
|
|
61
|
+
expect(unoMergeMemoized('mr-1', 'mr-4px')).toBe('mr-4px')
|
|
62
|
+
expect(unoMergeMemoized('mr-1', 'mr-[-4px]')).toBe('mr-[-4px]')
|
|
63
|
+
expect(unoMergeMemoized('mr-1', 'mr--4px')).toBe('mr--4px')
|
|
64
|
+
|
|
65
|
+
expect(unoMergeMemoized('cursor-pointer', 'cursor-not-allowed')).toBe('cursor-not-allowed')
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
> [!TIP]
|
|
69
|
+
> this is a simple wrapper of `unoMerge` with [memoize](https://github.com/sindresorhus/memoize#install)
|
|
70
|
+
|
|
52
71
|
## Why
|
|
53
72
|
|
|
54
73
|
- No Official One: https://github.com/unocss/unocss/issues/2748
|
|
@@ -74,10 +93,16 @@ function Component(props) {
|
|
|
74
93
|
### ✅ What is **KNOWN** Supported
|
|
75
94
|
|
|
76
95
|
- ✅ simple class name `mr-4px` `mr-4`
|
|
77
|
-
- ✅
|
|
96
|
+
- ✅ value in brackets `mr-[4px]` `mr-[4]`
|
|
78
97
|
- ✅ negative value `mr--4px`
|
|
79
98
|
- ✅ simple colon separated variants `hover:mr-4px` `dark:ml-4px` `hover:dark:ml-4px`
|
|
80
99
|
- ✅ simple shorthand: supports `margin` & `padding`, like `m-1` `mx-1` `ml-1` `mr-1`
|
|
100
|
+
- ✅ merge multiple important utilities
|
|
101
|
+
```ts
|
|
102
|
+
expect(unoMerge('mr-4px mr-2px!')).toBe('mr-4px mr-2px!')
|
|
103
|
+
expect(unoMerge('mr-4px mr-2px! !mr-1')).toBe('mr-4px !mr-1')
|
|
104
|
+
expect(unoMerge('mr-4px mr-2px! !mr-1 important:mr-2')).toBe('mr-4px important:mr-2')
|
|
105
|
+
```
|
|
81
106
|
|
|
82
107
|
### ❌ What is **NOT** Supported
|
|
83
108
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
declare function getClassList(className: string | null | undefined | boolean): string[];
|
|
3
|
+
/**
|
|
4
|
+
* Match steps
|
|
5
|
+
* 1. `getMergeMapKeyValue`: exact-string + regex match
|
|
6
|
+
* 2. `findInKnownPrefixHasDashValue`: prefix match; may replace alias via `PREFIX_ALIAS`
|
|
7
|
+
* 3. `lastIndexOf('-')` based split; may replace alias via `PREFIX_ALIAS`
|
|
8
|
+
*/
|
|
9
|
+
declare function unoMerge(...classNames: Array<string | undefined | null | boolean>): string;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { getClassList, unoMerge };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
declare function getClassList(className: string | null | undefined | boolean): string[];
|
|
3
|
-
/**
|
|
4
|
-
* Match steps
|
|
5
|
-
* 1. `getMergeMapKeyValue`: exact-string + regex match
|
|
6
|
-
* 2. `findInKnownPrefixHasDashValue`: prefix match; may replace alias via `PREFIX_ALIAS`
|
|
7
|
-
* 3. `lastIndexOf('-')` based split; may replace alias via `PREFIX_ALIAS`
|
|
8
|
-
*/
|
|
9
|
-
declare function unoMerge(...classNames: Array<string | undefined | null | boolean>): string;
|
|
10
|
-
//#endregion
|
|
1
|
+
import { getClassList, unoMerge } from "./index-DT_3AX6M.js";
|
|
11
2
|
export { getClassList, unoMerge };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getClassList as e,unoMerge as t}from"./src-
|
|
1
|
+
import{getClassList as e,unoMerge as t}from"./src-Diw-4Z6_.js";export{e as getClassList,t as unoMerge};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { unoMerge } from "./index-DT_3AX6M.js";
|
|
2
|
+
import { Options } from "memoize";
|
|
3
|
+
|
|
4
|
+
//#region src/memoize.d.ts
|
|
5
|
+
declare function createUnoMergeMemoized(moreOptions?: Omit<Options<typeof unoMerge, string>, 'cacheKey'>): typeof unoMerge & {
|
|
6
|
+
clear: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare const unoMergeMemoized: typeof unoMerge & {
|
|
9
|
+
clear: () => void;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { createUnoMergeMemoized, unoMergeMemoized };
|
package/dist/memoize.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unoMerge as e}from"./src-Diw-4Z6_.js";import t,{memoizeClear as n}from"memoize";function r(r){let i=t(e,{cacheKey:e=>e.join(),...r});return Object.defineProperty(i,`clear`,{value:()=>{n(i)}}),i}const i=r();export{r as createUnoMergeMemoized,i as unoMergeMemoized};
|
package/dist/react.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{unoMerge as e}from"./src-
|
|
1
|
+
import{unoMerge as e}from"./src-Diw-4Z6_.js";import{useMemo as t}from"react";function n(...n){return t(()=>e(...n),[...n])}export{n as useUnoMerge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){return Array.from(new Set(e))}function t(e,t){if(!e)throw typeof t==`string`?Error(t):t}const n=String.raw,r=(e,...t)=>new RegExp(n(e,...t)),i=n`(\d+(\.\d+)?)?(xs|sm|md|lg|xl)`,a=`(solid|dashed|dotted|double|none|hidden)`,o=[[[...[`block`,`flex`,`grid`,`table`].flatMap(e=>[e,`inline-${e}`]),`inline`,`flow-root`,`contents`,`list-item`,`hidden`,...m(`table-`,[`row`,`column`,`cell`,`caption`,`row-group`,`column-group`,`header-group`,`footer-group`])],`display`],[[`isolate`,`isolation-auto`],`isolation`],[[`static`,`fixed`,`absolute`,`relative`,`sticky`],`position`],[[`visible`,`invisible`,`collapse`],`visibility`],[m(`flex-`,[`row`,`row-reverse`,`col`,`col-reverse`]),`flex-direction`],[m(`flex-`,[`wrap`,`wrap-reverse`,`nowrap`]),`flex-wrap`],[m(`object-`,[`contain`,`cover`,`fill`,`none`,`scale-down`]),`object-fit`],[m(`object-`,[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`]),`object-position`],[[`antialiased`,`subpixel-antialiased`],`font-smoothing`],[[`italic`,`not-italic`,`oblique`,`not-oblique`],`font-style`],[m(`font-`,[`mono`,`sans`,`serif`]),`font-family`],[/^(?:font|fw)-?(thin|extralight|light|normal|medium|semibold|bold|extrabold|black|\d+)$/,`font-weight`],[[`normal-nums`,`ordinal`,`slashed-zero`,`lining-nums`,`oldstyle-nums`,`proportional-nums`,`tabular-nums`,`diagonal-fractions`,`stacked-fractions`],`font-variant-numeric`],[r`^(text|text-size|font-size)-(\d+|${i}$)`,`font-size`],[m(`list-`,[`inside`,`outside`]),`list-style-position`],[m(`list-`,[`none`,`disc`,`decimal`]),`list-style-type`],[m(`text-`,[`left`,`center`,`right`,`justify`,`start`,`end`]),`text-align`],[[`underline`,`overline`,`line-through`,`no-underline`],`text-decoration-line`],[m(`decoration-`,[`solid`,`double`,`dotted`,`dashed`,`wavy`]),`text-decoration-style`],[/^decoration-(\d+|(auto|from-font)$)/,`text-decoration-thickness`],[[`truncate`,`text-ellipsis`,`text-clip`],`text-overflow`],[m(`text-`,[`wrap`,`nowrap`,`balance`,`pretty`]),`text-wrap`],[m(`bg-`,[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`]),`background-position`],[/^bg(-no)?-repeat($|-)/,`background-repeat`],[m(`bg-`,[`auto`,`cover`,`contain`]),`background-size`],[[`bg-none`,/^bg-gradient-to-/],`background-image`],[/^(?:border-|b-)?(?:rounded|rd)(?:-(.+))?$/,`rounded`],[r`^b(?:order)?-${a}$`,`border-style`],[r`^b(?:order)?-([tblrxyse])-${a}$`,(e,t)=>`border-${t?.[1]}-style`],[/^b(?:order)?($|-\d+)/,`border-width`],[/^b(?:order)?-([tblrxyse])($|-\d+)/,(e,t)=>`border-${t?.[1]}-width`],[/^(?:border|b)-(?:color-)?(.+)$/,`border-color`],[/^(?:border|b)-([rltbse])-(?:color-)?(.+)$/,(e,t)=>`border-${t?.[1]}-color`],[/^outline-\d+/,`outline-width`],[[`outline`,r`^outline-${a}$`],`outline-style`],[r`^divide-${a}$`,`divide-style`],[/^divide-(x|y)($|-\d+)/,(e,t)=>`divide-${t?.[1]}-width`],[[`ring`,/^ring-\d+/],`ring-width`],[[/^ring-offset-\d+/],`ring-offset-width`],[[`shadow`,...m(`shadow-`,[`inner`,`none`]),r`^shadow-${i}$`],`box-shadow`],[m(`border-`,[`collapse`,`separate`]),`border-collapse`],[m(`table-`,[`auto`,`fixed`]),`table-layout`],[m(`caption-`,[`top`,`bottom`]),`caption-side`],[m(`scroll-`,[`auto`,`smooth`]),`scroll-behavior`],[m(`snap-`,[`start`,`end`,`center`,`align-none`]),`scroll-snap-align`],[m(`snap-`,[`normal`,`always`]),`scroll-snap-stop`],[m(`snap-`,[`none`,`x`,`y`,`both`,`mandatory`,`proximity`]),`scroll-snap-type`],[/^stroke-\d+/,`stroke-width`],[[`sr-only`,`not-sr-only`],`Screen-Readers`],[/^(flex-)?grow($|-\d+$)/,`flex-grow`],[/^(flex-)?shrink($|-\d+$)/,`flex-shrink`],...[`ring-inset`,`divide-x-reverse`,`divide-y-reverse`].map(e=>[e,e]),...[`resize`,`blur`,`drop-shadow`,`grayscale`,`invert`,`sepia`,`backdrop-blur`,`backdrop-grayscale`,`backdrop-invert`,`backdrop-sepia`].map(e=>[r`^${e}($|-)`,e])],s=new Map,c=new Map;for(let[e,t]of o){let n=[e].flat(),r=n.filter(e=>typeof e==`string`),i=n.filter(e=>typeof e==`object`&&e instanceof RegExp);r.forEach(e=>{let n=typeof t==`string`?t:t(e);s.set(e,n)}),i.forEach(e=>{c.set(e,t)})}function l(e){if(s.has(e))return s.get(e);for(let[t,n]of c.entries())if(t.test(e)){let r=t.exec(e),i=typeof n==`string`?n:n(e,r);return i}}function u(e){return d.map(e=>typeof e==`string`?[e,e]:e).find(([t,n])=>e.startsWith(`${t}-`))}const d=[`break-after`,`break-before`,`break-inside`,`grid-flow`,`align`,`whitespace`,`mix-blend`,`bg-blend`,`ease`,`origin`,`cursor`,`touch`,`color`,[`text`,`color`],[`c`,`color`],[`bg`,`background-color`],[`decoration`,`text-decoration-color`],[`from`,`gradient-color-stops`],[`divide`,`divide-color`],[`outline`,`outline-color`],[`ring`,`ring-color`],[`ring-offset`,`ring-offset-color`],[`shadow`,`box-shadow-color`],[`accent`,`accent-color`],[`caret`,`caret-color`],`fill`,`stroke`];function f(e){return p.has(e)?p.get(e):e}const p=new Map(Object.entries({leading:`line-height`,col:`grid-column`,"col-span":`grid-column`,"col-start":`grid-column-start`,"col-end":`grid-column-end`,row:`grid-row`,"row-span":`grid-row`,"row-start":`grid-row-start`,"row-end":`grid-row-end`,m:[`mt`,`mb`,`ml`,`mr`],mx:[`ml`,`mr`],my:[`mt`,`mb`],p:[`pt`,`pb`,`pl`,`pr`],px:[`pl`,`pr`],py:[`pt`,`pb`]}));function m(e,n){return t(e.endsWith(`-`),"prefix must end with `-`"),n.map(t=>e+t)}function h(t){return typeof t==`boolean`?[]:e((t||``).split(` `).map(e=>e.trim()).filter(Boolean))}function g(...t){let n=new Map,r=t.map(h).flat().filter(Boolean);return r.forEach(
|
|
1
|
+
function e(e){return Array.from(new Set(e))}function t(e,t){if(!e)throw typeof t==`string`?Error(t):t}const n=String.raw,r=(e,...t)=>new RegExp(n(e,...t)),i=n`(\d+(\.\d+)?)?(xs|sm|md|lg|xl)`,a=`(solid|dashed|dotted|double|none|hidden)`,o=[[[...[`block`,`flex`,`grid`,`table`].flatMap(e=>[e,`inline-${e}`]),`inline`,`flow-root`,`contents`,`list-item`,`hidden`,...m(`table-`,[`row`,`column`,`cell`,`caption`,`row-group`,`column-group`,`header-group`,`footer-group`])],`display`],[[`isolate`,`isolation-auto`],`isolation`],[[`static`,`fixed`,`absolute`,`relative`,`sticky`],`position`],[[`visible`,`invisible`,`collapse`],`visibility`],[m(`flex-`,[`row`,`row-reverse`,`col`,`col-reverse`]),`flex-direction`],[m(`flex-`,[`wrap`,`wrap-reverse`,`nowrap`]),`flex-wrap`],[m(`object-`,[`contain`,`cover`,`fill`,`none`,`scale-down`]),`object-fit`],[m(`object-`,[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`]),`object-position`],[[`antialiased`,`subpixel-antialiased`],`font-smoothing`],[[`italic`,`not-italic`,`oblique`,`not-oblique`],`font-style`],[m(`font-`,[`mono`,`sans`,`serif`]),`font-family`],[/^(?:font|fw)-?(thin|extralight|light|normal|medium|semibold|bold|extrabold|black|\d+)$/,`font-weight`],[[`normal-nums`,`ordinal`,`slashed-zero`,`lining-nums`,`oldstyle-nums`,`proportional-nums`,`tabular-nums`,`diagonal-fractions`,`stacked-fractions`],`font-variant-numeric`],[r`^(text|text-size|font-size)-(\d+|${i}$)`,`font-size`],[m(`list-`,[`inside`,`outside`]),`list-style-position`],[m(`list-`,[`none`,`disc`,`decimal`]),`list-style-type`],[m(`text-`,[`left`,`center`,`right`,`justify`,`start`,`end`]),`text-align`],[[`underline`,`overline`,`line-through`,`no-underline`],`text-decoration-line`],[m(`decoration-`,[`solid`,`double`,`dotted`,`dashed`,`wavy`]),`text-decoration-style`],[/^decoration-(\d+|(auto|from-font)$)/,`text-decoration-thickness`],[[`truncate`,`text-ellipsis`,`text-clip`],`text-overflow`],[m(`text-`,[`wrap`,`nowrap`,`balance`,`pretty`]),`text-wrap`],[m(`bg-`,[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`]),`background-position`],[/^bg(-no)?-repeat($|-)/,`background-repeat`],[m(`bg-`,[`auto`,`cover`,`contain`]),`background-size`],[[`bg-none`,/^bg-gradient-to-/],`background-image`],[/^(?:border-|b-)?(?:rounded|rd)(?:-(.+))?$/,`rounded`],[r`^b(?:order)?-${a}$`,`border-style`],[r`^b(?:order)?-([tblrxyse])-${a}$`,(e,t)=>`border-${t?.[1]}-style`],[/^b(?:order)?($|-\d+)/,`border-width`],[/^b(?:order)?-([tblrxyse])($|-\d+)/,(e,t)=>`border-${t?.[1]}-width`],[/^(?:border|b)-(?:color-)?(.+)$/,`border-color`],[/^(?:border|b)-([rltbse])-(?:color-)?(.+)$/,(e,t)=>`border-${t?.[1]}-color`],[/^outline-\d+/,`outline-width`],[[`outline`,r`^outline-${a}$`],`outline-style`],[r`^divide-${a}$`,`divide-style`],[/^divide-(x|y)($|-\d+)/,(e,t)=>`divide-${t?.[1]}-width`],[[`ring`,/^ring-\d+/],`ring-width`],[[/^ring-offset-\d+/],`ring-offset-width`],[[`shadow`,...m(`shadow-`,[`inner`,`none`]),r`^shadow-${i}$`],`box-shadow`],[m(`border-`,[`collapse`,`separate`]),`border-collapse`],[m(`table-`,[`auto`,`fixed`]),`table-layout`],[m(`caption-`,[`top`,`bottom`]),`caption-side`],[m(`scroll-`,[`auto`,`smooth`]),`scroll-behavior`],[m(`snap-`,[`start`,`end`,`center`,`align-none`]),`scroll-snap-align`],[m(`snap-`,[`normal`,`always`]),`scroll-snap-stop`],[m(`snap-`,[`none`,`x`,`y`,`both`,`mandatory`,`proximity`]),`scroll-snap-type`],[/^stroke-\d+/,`stroke-width`],[[`sr-only`,`not-sr-only`],`Screen-Readers`],[/^(flex-)?grow($|-\d+$)/,`flex-grow`],[/^(flex-)?shrink($|-\d+$)/,`flex-shrink`],...[`ring-inset`,`divide-x-reverse`,`divide-y-reverse`].map(e=>[e,e]),...[`resize`,`blur`,`drop-shadow`,`grayscale`,`invert`,`sepia`,`backdrop-blur`,`backdrop-grayscale`,`backdrop-invert`,`backdrop-sepia`].map(e=>[r`^${e}($|-)`,e])],s=new Map,c=new Map;for(let[e,t]of o){let n=[e].flat(),r=n.filter(e=>typeof e==`string`),i=n.filter(e=>typeof e==`object`&&e instanceof RegExp);r.forEach(e=>{let n=typeof t==`string`?t:t(e);s.set(e,n)}),i.forEach(e=>{c.set(e,t)})}function l(e){if(s.has(e))return s.get(e);for(let[t,n]of c.entries())if(t.test(e)){let r=t.exec(e),i=typeof n==`string`?n:n(e,r);return i}}function u(e){return d.map(e=>typeof e==`string`?[e,e]:e).find(([t,n])=>e.startsWith(`${t}-`))}const d=[`break-after`,`break-before`,`break-inside`,`grid-flow`,`align`,`whitespace`,`mix-blend`,`bg-blend`,`ease`,`origin`,`cursor`,`touch`,`color`,[`text`,`color`],[`c`,`color`],[`bg`,`background-color`],[`decoration`,`text-decoration-color`],[`from`,`gradient-color-stops`],[`divide`,`divide-color`],[`outline`,`outline-color`],[`ring`,`ring-color`],[`ring-offset`,`ring-offset-color`],[`shadow`,`box-shadow-color`],[`accent`,`accent-color`],[`caret`,`caret-color`],`fill`,`stroke`];function f(e){return p.has(e)?p.get(e):e}const p=new Map(Object.entries({leading:`line-height`,col:`grid-column`,"col-span":`grid-column`,"col-start":`grid-column-start`,"col-end":`grid-column-end`,row:`grid-row`,"row-span":`grid-row`,"row-start":`grid-row-start`,"row-end":`grid-row-end`,m:[`mt`,`mb`,`ml`,`mr`],mx:[`ml`,`mr`],my:[`mt`,`mb`],p:[`pt`,`pb`,`pl`,`pr`],px:[`pl`,`pr`],py:[`pt`,`pb`]}));function m(e,n){return t(e.endsWith(`-`),"prefix must end with `-`"),n.map(t=>e+t)}function h(t){return typeof t==`boolean`?[]:e((t||``).split(` `).map(e=>e.trim()).filter(Boolean))}function g(...t){let n=new Map,r=t.map(h).flat().filter(Boolean);return r.forEach(e=>_(e,n)),e(Array.from(n.values())).join(` `)}function _(e,t){let n=e,r;function i(e){[e].flat().forEach(e=>{t.set(r?r+e:e,n)})}function a(){let t=l(e);if(t)return i(t),!0}function o(){let t=u(e);if(!t)return;let[n,r]=t,a=f(r);return i(a),!0}function s(){let t=e,n=/(\[[\w,()/-]+\])$/;n.test(e)&&(t=e.replace(n,function(e,t){return`*`.repeat(t.length)})),t=t.replaceAll(/--(?=\d)/g,`-*`);let r=t.lastIndexOf(`-`);if(r===-1)return;let a=f(e.slice(0,r));return i(a),!0}function c(){return i(f(e))}function d(){let t=/^(?:(?:[\w-]+|\[[^\s[\]]+\]):)+/,n=t.exec(e);n&&(r=n[0].split(/(?<=:)(?:\b|$)/).filter(Boolean).sort().join(``),e=e.slice(r.length))}function p(){if(e.startsWith(`!`)){e=`important:`+e.slice(1);return}if(e.endsWith(`!`)){e=`important:`+e.slice(0,-1);return}}a()||o()||(p(),d(),a()||o()||s()||c())}export{h as getClassList,g as unoMerge};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unocss-merge",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"packageManager": "pnpm@10.
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"packageManager": "pnpm@10.14.0-0+sha512.2cd47a0cbf5f1d1de7693a88307a0ede5be94e0d3b34853d800ee775efbea0650cb562b77605ec80bc8d925f5cd27c4dfe8bb04d3a0b76090784c664450d32d6",
|
|
5
5
|
"description": "simple utility to merge unocss class names",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"keywords": [
|
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
"./react": {
|
|
34
34
|
"types": "./dist/react.d.ts",
|
|
35
35
|
"default": "./dist/react.js"
|
|
36
|
+
},
|
|
37
|
+
"./memoize": {
|
|
38
|
+
"types": "./dist/memoize.d.ts",
|
|
39
|
+
"default": "./dist/memoize.js"
|
|
36
40
|
}
|
|
37
41
|
},
|
|
38
42
|
"publishConfig": {
|
|
@@ -49,9 +53,13 @@
|
|
|
49
53
|
"prepublishOnly": "pnpm typecheck && pnpm test-cover && pnpm build"
|
|
50
54
|
},
|
|
51
55
|
"peerDependencies": {
|
|
56
|
+
"memoize": "^10.1.0",
|
|
52
57
|
"react": ">=18"
|
|
53
58
|
},
|
|
54
59
|
"peerDependenciesMeta": {
|
|
60
|
+
"memoize": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
55
63
|
"react": {
|
|
56
64
|
"optional": true
|
|
57
65
|
}
|
|
@@ -59,7 +67,7 @@
|
|
|
59
67
|
"devDependencies": {
|
|
60
68
|
"@magicdawn/eslint-config": "^1.5.7",
|
|
61
69
|
"@magicdawn/prettier-config": "^0.1.0",
|
|
62
|
-
"@types/node": "^24.0
|
|
70
|
+
"@types/node": "^24.1.0",
|
|
63
71
|
"@types/react": "^19.1.8",
|
|
64
72
|
"@vitest/coverage-v8": "^3.2.4",
|
|
65
73
|
"es-toolkit": "^1.39.7",
|
|
@@ -67,7 +75,7 @@
|
|
|
67
75
|
"husky": "^9.1.7",
|
|
68
76
|
"lint-staged": "^16.1.2",
|
|
69
77
|
"prettier": "^3.6.2",
|
|
70
|
-
"tsdown": "^0.
|
|
78
|
+
"tsdown": "^0.13.0",
|
|
71
79
|
"typescript": "^5.8.3",
|
|
72
80
|
"vitest": "^3.2.4"
|
|
73
81
|
},
|