@css-hooks/qwik 4.0.0-next.42 → 4.0.0-next.45

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.42/.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.45/.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.42/.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.45/.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.42"><img src="https://img.shields.io/badge/tag-v4.0.0--next.42-ffd700" alt="tag v4.0.0-next.42"></a>
12
- <a href="https://www.npmjs.com/package/@css-hooks/qwik/v/4.0.0-next.42"><img src="https://img.shields.io/badge/npm-v4.0.0--next.42-ffd700" alt="npm version"></a>
13
- <a href="https://github.com/css-hooks/css-hooks/blob/v4.0.0-next.42/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.45"><img src="https://img.shields.io/badge/tag-v4.0.0--next.45-ffd700" alt="tag v4.0.0-next.45"></a>
12
+ <a href="https://www.npmjs.com/package/@css-hooks/qwik/v/4.0.0-next.45"><img src="https://img.shields.io/badge/npm-v4.0.0--next.45-ffd700" alt="npm version"></a>
13
+ <a href="https://github.com/css-hooks/css-hooks/blob/v4.0.0-next.45/LICENSE"><img src="https://img.shields.io/badge/license-MIT-ffd700" alt="license"></a>
14
14
  </div>
15
15
 
16
16
  ---
@@ -101,9 +101,9 @@ experience without runtime style injection or build steps.
101
101
 
102
102
  ### Browser support
103
103
 
104
- | <img src="https://dl.svgcdn.com/svg/logos/chrome.svg" alt="Chrome" width="24" height="24" /><br/>Chrome | <img src="https://dl.svgcdn.com/svg/logos/microsoft-edge.svg" alt="Edge" width="24" height="24" /><br/>Edge | <img src="https://dl.svgcdn.com/svg/logos/safari.svg" alt="Safari" width="24" height="24" /><br/>Safari | <img src="https://dl.svgcdn.com/svg/logos/firefox.svg" alt="Firefox" width="24" height="24" /><br/>Firefox | <img src="https://dl.svgcdn.com/svg/logos/opera.svg" alt="Opera" width="24" height="24" /><br/>Opera |
105
- | :-----------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------: |
106
- | 99+ | 99+ | 15.4+ | 97+ | 85+ |
104
+ | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/chrome/chrome_24x24.png" alt="Chrome" /><br/>Chrome | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/edge/edge_24x24.png" alt="Edge" /><br/>Edge | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/safari/safari_24x24.png" alt="Safari" /><br/>Safari | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/firefox/firefox_24x24.png" alt="Firefox" /><br/>Firefox | <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/opera/opera_24x24.png" alt="Opera" /><br/>Opera |
105
+ | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
106
+ | <div align="center">111+</div> | <div align="center">111+</div> | <div align="center">18+</div> | <div align="center">151+</div> | <div align="center">98+</div> |
107
107
 
108
108
  ## Documentation
109
109
 
package/cjs/index.js CHANGED
@@ -5,11 +5,9 @@
5
5
  * @packageDocumentation
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports._unitlessNumbers = exports.createHooks = exports.mergeStyles = void 0;
8
+ exports._unitlessNumbers = exports.mergeStyles = exports.createHooks = void 0;
9
9
  exports._stringifyValue = _stringifyValue;
10
10
  const core_1 = require("@css-hooks/core");
11
- var core_2 = require("@css-hooks/core");
12
- Object.defineProperty(exports, "mergeStyles", { enumerable: true, get: function () { return core_2.mergeStyles; } });
13
11
  /** @internal */
14
12
  function _stringifyValue(value, propertyName) {
15
13
  switch (typeof value) {
@@ -21,13 +19,16 @@ function _stringifyValue(value, propertyName) {
21
19
  return null;
22
20
  }
23
21
  }
22
+ const hooksSystem = (0, core_1.createHooksSystem)(_stringifyValue);
24
23
  /**
25
- * A {@link @css-hooks/core#CreateHooksFn} configured to use Qwik's
26
- * `CSSProperties` type and logic for converting CSS values into strings
24
+ * A hook factory configured to use Qwik's `CSSProperties` type and logic for
25
+ * converting CSS values into strings
27
26
  *
28
27
  * @public
29
28
  */
30
- exports.createHooks = (0, core_1.buildHooksSystem)(_stringifyValue);
29
+ exports.createHooks = hooksSystem.createHooks;
30
+ /** A style merger configured to use Qwik's `CSSProperties` type. @public */
31
+ exports.mergeStyles = hooksSystem.mergeStyles;
31
32
  /**
32
33
  * Following code (c) Builder.io. Source modified to account for custom
33
34
  * properties.
package/esm/index.js CHANGED
@@ -3,8 +3,7 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- import { buildHooksSystem } from "@css-hooks/core";
7
- export { mergeStyles } from "@css-hooks/core";
6
+ import { createHooksSystem } from "@css-hooks/core";
8
7
  /** @internal */
9
8
  export function _stringifyValue(value, propertyName) {
10
9
  switch (typeof value) {
@@ -16,13 +15,16 @@ export function _stringifyValue(value, propertyName) {
16
15
  return null;
17
16
  }
18
17
  }
18
+ const hooksSystem = createHooksSystem(_stringifyValue);
19
19
  /**
20
- * A {@link @css-hooks/core#CreateHooksFn} configured to use Qwik's
21
- * `CSSProperties` type and logic for converting CSS values into strings
20
+ * A hook factory configured to use Qwik's `CSSProperties` type and logic for
21
+ * converting CSS values into strings
22
22
  *
23
23
  * @public
24
24
  */
25
- export const createHooks = buildHooksSystem(_stringifyValue);
25
+ export const createHooks = hooksSystem.createHooks;
26
+ /** A style merger configured to use Qwik's `CSSProperties` type. @public */
27
+ export const mergeStyles = hooksSystem.mergeStyles;
26
28
  /**
27
29
  * Following code (c) Builder.io. Source modified to account for custom
28
30
  * properties.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@css-hooks/qwik",
3
3
  "description": "CSS Hooks for Qwik",
4
- "version": "4.0.0-next.42",
4
+ "version": "4.0.0-next.45",
5
5
  "author": "Nick Saunders",
6
6
  "dependencies": {
7
- "@css-hooks/core": "4.0.0-next.42"
7
+ "@css-hooks/core": "4.0.0-next.45"
8
8
  },
9
9
  "devDependencies": {
10
10
  "@qwik.dev/core": "^2.0.0-beta.30",
package/types/index.d.ts CHANGED
@@ -3,21 +3,24 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- import type { CreateHooksFn } from "@css-hooks/core";
7
6
  import type { CSSProperties } from "@qwik.dev/core";
8
7
  import type { CSSPropertyConflicts } from "./css-property-conflicts.ts";
9
8
  export type * from "@css-hooks/core";
10
- export { mergeStyles } from "@css-hooks/core";
11
9
  export type { CSSPropertyConflicts } from "./css-property-conflicts.ts";
12
10
  /** @internal */
13
11
  export declare function _stringifyValue(value: unknown, propertyName: string): string | null;
14
12
  /**
15
- * A {@link @css-hooks/core#CreateHooksFn} configured to use Qwik's
16
- * `CSSProperties` type and logic for converting CSS values into strings
13
+ * A hook factory configured to use Qwik's `CSSProperties` type and logic for
14
+ * converting CSS values into strings
17
15
  *
18
16
  * @public
19
17
  */
20
- export declare const createHooks: CreateHooksFn<CSSProperties, CSSPropertyConflicts>;
18
+ export declare const createHooks: import("@css-hooks/core").CreateHooksFn<CSSProperties, CSSPropertyConflicts>;
19
+ /** A style merger configured to use Qwik's `CSSProperties` type. @public */
20
+ export declare const mergeStyles: <const OverrideStyle extends CSSProperties, Style extends CSSProperties>(overrideStyle: OverrideStyle | null | undefined) => {
21
+ <ActualStyle extends CSSProperties>(style: ActualStyle): Omit<ActualStyle, keyof OverrideStyle> & OverrideStyle;
22
+ (style: CSSProperties & Style): Omit<Style, keyof OverrideStyle> & OverrideStyle;
23
+ };
21
24
  /**
22
25
  * Following code (c) Builder.io. Source modified to account for custom
23
26
  * properties.