@css-hooks/core 4.0.0-next.7 → 4.0.0-next.9

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 CHANGED
@@ -1,16 +1,16 @@
1
1
  <div align="center">
2
- <a id="logomark" href="https://next.css-hooks.com"><img alt="CSS Hooks" src="https://github.com/css-hooks/css-hooks/raw/v4.0.0-next.7/.github/logomark.svg" height="128" /></a><br/><br/>
2
+ <a id="logomark" href="https://next.css-hooks.com"><img alt="CSS Hooks" src="https://github.com/css-hooks/css-hooks/raw/v4.0.0-next.9/.github/logomark.svg" height="128" /></a><br/><br/>
3
3
  <div id="wordmark">
4
- <a href="https://next.css-hooks.com"><img alt="CSS Hooks" src="https://github.com/css-hooks/css-hooks/raw/v4.0.0-next.7/.github/wordmark-dark.svg" width="256"></a>
4
+ <a href="https://next.css-hooks.com"><img alt="CSS Hooks" src="https://github.com/css-hooks/css-hooks/raw/v4.0.0-next.9/.github/wordmark-dark.svg" width="256"></a>
5
5
  </div>
6
6
  </div>
7
7
 
8
8
  <br/>
9
9
 
10
10
  <div align="center" id="badges">
11
- <a href="https://github.com/css-hooks/css-hooks/tree/v4.0.0-next.7"><img src="https://img.shields.io/badge/tag-v4.0.0--next.7-ffd700" alt="tag v4.0.0-next.7"></a>
12
- <a href="https://www.npmjs.com/package/@css-hooks/core/v/4.0.0-next.7"><img src="https://img.shields.io/badge/npm-v4.0.0--next.7-ffd700" alt="npm version"></a>
13
- <a href="https://github.com/css-hooks/css-hooks/blob/v4.0.0-next.7/LICENSE"><img src="https://img.shields.io/badge/license-MIT-ffd700" alt="license"></a>
11
+ <a href="https://github.com/css-hooks/css-hooks/tree/v4.0.0-next.9"><img src="https://img.shields.io/badge/tag-v4.0.0--next.9-ffd700" alt="tag v4.0.0-next.9"></a>
12
+ <a href="https://www.npmjs.com/package/@css-hooks/core/v/4.0.0-next.9"><img src="https://img.shields.io/badge/npm-v4.0.0--next.9-ffd700" alt="npm version"></a>
13
+ <a href="https://github.com/css-hooks/css-hooks/blob/v4.0.0-next.9/LICENSE"><img src="https://img.shields.io/badge/license-MIT-ffd700" alt="license"></a>
14
14
  </div>
15
15
 
16
16
  ---
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@css-hooks/core",
3
3
  "description": "CSS Hooks core library",
4
- "version": "4.0.0-next.7",
4
+ "version": "4.0.0-next.9",
5
5
  "author": "Nick Saunders",
6
6
  "devDependencies": {
7
7
  "color": "^5.0.3",
package/types/index.d.ts CHANGED
@@ -56,22 +56,10 @@ export type Selector = `${string}&${string}` | `@${"media" | "container" | "supp
56
56
  * conflicting properties are resolved
57
57
  */
58
58
  type CSSPropertyConflictKeys<CSSPropertyConflicts extends object, OverrideCSSProperties> = CSSPropertyConflicts[keyof OverrideCSSProperties & keyof CSSPropertyConflicts] & PropertyKey;
59
- /**
60
- * Prevents conflicting CSS properties from being assigned values in a base
61
- * style.
62
- *
63
- * @typeParam CSSPropertyConflicts - A map from CSS properties to the properties
64
- * with which they conflict
65
- * @typeParam OverrideCSSProperties - The conditional declarations for which
66
- * conflicting properties are forbidden
67
- */
68
- type ForbidCSSPropertyConflicts<CSSPropertyConflicts extends object, OverrideCSSProperties> = {
69
- [P in CSSPropertyConflictKeys<CSSPropertyConflicts, OverrideCSSProperties>]?: never;
70
- };
71
- /** Preserves a style's shape while replacing conflicting property values. */
59
+ /** Preserves a style's shape while rejecting known-present conflicts. */
72
60
  type CSSPropertiesWithoutConflicts<CSSProperties, CSSPropertyConflicts extends object, OverrideCSSProperties> = {
73
- [P in keyof CSSProperties]: P extends CSSPropertyConflictKeys<CSSPropertyConflicts, OverrideCSSProperties> ? never : CSSProperties[P];
74
- } & ForbidCSSPropertyConflicts<CSSPropertyConflicts, OverrideCSSProperties>;
61
+ [P in keyof CSSProperties]: P extends CSSPropertyConflictKeys<CSSPropertyConflicts, OverrideCSSProperties> ? Pick<CSSProperties, P> extends Required<Pick<CSSProperties, P>> ? never : CSSProperties[P] : CSSProperties[P];
62
+ };
75
63
  /**
76
64
  * An object containing the functions needed to support and use the configured
77
65
  * hooks