@css-hooks/solid 1.0.2 → 1.1.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 +1 -1
- package/cjs/index.js +2 -11
- package/esm/index.js +2 -10
- package/package.json +2 -2
- package/types/index.d.ts +2 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ Please visit [css-hooks.com](https://css-hooks.com) to get started.
|
|
|
50
50
|
- [@css-hooks/react](packages/react): React framework integration
|
|
51
51
|
- [@css-hooks/solid](packages/solid): Solid framework integration
|
|
52
52
|
- [@css-hooks/preact](packages/preact): Preact framework integration
|
|
53
|
-
- [@css-hooks/core](packages/core): Core package (internal use
|
|
53
|
+
- [@css-hooks/core](packages/core): Core package (internal / advanced use cases)
|
|
54
54
|
|
|
55
55
|
## Contributing
|
|
56
56
|
|
package/cjs/index.js
CHANGED
|
@@ -3,16 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.recommended = exports.createHooks = exports.stringifyValue = void 0;
|
|
4
4
|
const core_1 = require("@css-hooks/core");
|
|
5
5
|
/** @internal */
|
|
6
|
-
|
|
7
|
-
if (typeof value === "string") {
|
|
8
|
-
return value;
|
|
9
|
-
}
|
|
10
|
-
if (typeof value === "number") {
|
|
11
|
-
return `${value}`;
|
|
12
|
-
}
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
exports.stringifyValue = stringifyValue;
|
|
6
|
+
exports.stringifyValue = core_1.genericStringify;
|
|
16
7
|
/**
|
|
17
8
|
* Creates the hooks specified in the configuration.
|
|
18
9
|
*
|
|
@@ -20,7 +11,7 @@ exports.stringifyValue = stringifyValue;
|
|
|
20
11
|
*
|
|
21
12
|
* @returns The CSS required to enable the configured hooks, along with the corresponding `hooks` function for use in components.
|
|
22
13
|
*/
|
|
23
|
-
exports.createHooks = (0, core_1.buildHooksSystem)(stringifyValue);
|
|
14
|
+
exports.createHooks = (0, core_1.buildHooksSystem)(exports.stringifyValue);
|
|
24
15
|
function keybab(r) {
|
|
25
16
|
/* eslint-disable @typescript-eslint/no-unsafe-return,@typescript-eslint/no-explicit-any */
|
|
26
17
|
return Object.fromEntries(Object.entries(r).map(([key, value]) => [
|
package/esm/index.js
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import { buildHooksSystem, recommended as coreRecommended, } from "@css-hooks/core";
|
|
1
|
+
import { buildHooksSystem, recommended as coreRecommended, genericStringify, } from "@css-hooks/core";
|
|
2
2
|
/** @internal */
|
|
3
|
-
export
|
|
4
|
-
if (typeof value === "string") {
|
|
5
|
-
return value;
|
|
6
|
-
}
|
|
7
|
-
if (typeof value === "number") {
|
|
8
|
-
return `${value}`;
|
|
9
|
-
}
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
3
|
+
export const stringifyValue = genericStringify;
|
|
12
4
|
/**
|
|
13
5
|
* Creates the hooks specified in the configuration.
|
|
14
6
|
*
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@css-hooks/solid",
|
|
3
3
|
"description": "CSS Hooks for Solid",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"author": "Nick Saunders",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@css-hooks/core": "^1.0
|
|
7
|
+
"@css-hooks/core": "^1.1.0",
|
|
8
8
|
"ts-toolbelt": "^9.6.0"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { JSX } from "solid-js";
|
|
2
|
+
import { genericStringify } from "@css-hooks/core";
|
|
2
3
|
/** @internal */
|
|
3
|
-
export declare
|
|
4
|
+
export declare const stringifyValue: typeof genericStringify;
|
|
4
5
|
/**
|
|
5
6
|
* Creates the hooks specified in the configuration.
|
|
6
7
|
*
|