solid-tiny-utils 0.6.0 → 0.7.1

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.
@@ -38,9 +38,13 @@ function combineStyle(a, b) {
38
38
  const bb = typeof b === "string" ? stringStyleToObject(b) : b;
39
39
  return { ...a, ...bb };
40
40
  }
41
+ function combineClass(defaultClass, ...otherClass) {
42
+ return [defaultClass, ...otherClass].filter(Boolean).join(" ");
43
+ }
41
44
 
42
45
  export {
43
46
  mountStyle,
44
47
  stringStyleToObject,
45
- combineStyle
48
+ combineStyle,
49
+ combineClass
46
50
  };
package/dist/dom/css.d.ts CHANGED
@@ -13,5 +13,6 @@ import { JSX } from 'solid-js/jsx-runtime';
13
13
  declare function mountStyle(style: string, id: string, refresh?: boolean): void;
14
14
  declare function stringStyleToObject(style: string): JSX.CSSProperties;
15
15
  declare function combineStyle(a: JSX.CSSProperties, b: JSX.CSSProperties | string | undefined): JSX.CSSProperties | string;
16
+ declare function combineClass(defaultClass: string, ...otherClass: (string | undefined | null)[]): string;
16
17
 
17
- export { combineStyle, mountStyle, stringStyleToObject };
18
+ export { combineClass, combineStyle, mountStyle, stringStyleToObject };
package/dist/dom/css.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
+ combineClass,
2
3
  combineStyle,
3
4
  mountStyle,
4
5
  stringStyleToObject
5
- } from "../chunk-DKZ3RJJI.js";
6
+ } from "../chunk-KM4Q6THD.js";
6
7
  import "../chunk-U5LQ2AS5.js";
7
8
  import "../chunk-QQVSG76Z.js";
8
9
  import "../chunk-Y4GYGFIT.js";
@@ -11,6 +12,7 @@ import "../chunk-KKFGUHFR.js";
11
12
  import "../chunk-6G7GFZV2.js";
12
13
  import "../chunk-PD6VHMH6.js";
13
14
  export {
15
+ combineClass,
14
16
  combineStyle,
15
17
  mountStyle,
16
18
  stringStyleToObject
@@ -1,2 +1,2 @@
1
- export { combineStyle, mountStyle, stringStyleToObject } from './css.js';
1
+ export { combineClass, combineStyle, mountStyle, stringStyleToObject } from './css.js';
2
2
  import 'solid-js/jsx-runtime';
package/dist/dom/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import "../chunk-FFBJP5FE.js";
2
2
  import {
3
+ combineClass,
3
4
  combineStyle,
4
5
  mountStyle,
5
6
  stringStyleToObject
6
- } from "../chunk-DKZ3RJJI.js";
7
+ } from "../chunk-KM4Q6THD.js";
7
8
  import "../chunk-U5LQ2AS5.js";
8
9
  import "../chunk-QQVSG76Z.js";
9
10
  import "../chunk-Y4GYGFIT.js";
@@ -12,6 +13,7 @@ import "../chunk-KKFGUHFR.js";
12
13
  import "../chunk-6G7GFZV2.js";
13
14
  import "../chunk-PD6VHMH6.js";
14
15
  export {
16
+ combineClass,
15
17
  combineStyle,
16
18
  mountStyle,
17
19
  stringStyleToObject
@@ -1,19 +1,19 @@
1
1
  import "../chunk-LUFOWTRW.js";
2
- import {
3
- createClickOutside
4
- } from "../chunk-WJHRONQU.js";
5
2
  import {
6
3
  createEventListener
7
4
  } from "../chunk-6OVLJ45M.js";
8
- import {
9
- makeEventListener
10
- } from "../chunk-TGWWPUWD.js";
11
5
  import {
12
6
  createIntersectionObserver
13
7
  } from "../chunk-LEWF7QAQ.js";
14
8
  import {
15
9
  createVisibilityObserver
16
10
  } from "../chunk-TDJLPDJF.js";
11
+ import {
12
+ createClickOutside
13
+ } from "../chunk-WJHRONQU.js";
14
+ import {
15
+ makeEventListener
16
+ } from "../chunk-TGWWPUWD.js";
17
17
  import "../chunk-QPEF6LHH.js";
18
18
  import "../chunk-YK5QQQ43.js";
19
19
  import "../chunk-4L6FK7MF.js";
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { hexToRgb, rgbToHex } from './color/hex-rgb.js';
2
2
  export { OKLCH, RGB, oklchToRgb, rgbToOklch } from './color/oklch-rgb.js';
3
3
  export { isValidHex, isValidOKLCH, isValidRGB } from './color/validation.js';
4
- export { combineStyle, mountStyle, stringStyleToObject } from './dom/css.js';
4
+ export { combineClass, combineStyle, mountStyle, stringStyleToObject } from './dom/css.js';
5
5
  export { createClickOutside } from './event/create-click-outside.js';
6
6
  export { createEventListener } from './event/create-event-listener.js';
7
7
  export { createIntersectionObserver } from './event/create-intersection-observer.js';
package/dist/index.js CHANGED
@@ -6,15 +6,9 @@ import {
6
6
  } from "./chunk-II6INKPZ.js";
7
7
  import "./chunk-AZAXMGEB.js";
8
8
  import "./chunk-LUFOWTRW.js";
9
- import {
10
- createClickOutside
11
- } from "./chunk-WJHRONQU.js";
12
9
  import {
13
10
  createEventListener
14
11
  } from "./chunk-6OVLJ45M.js";
15
- import {
16
- makeEventListener
17
- } from "./chunk-TGWWPUWD.js";
18
12
  import {
19
13
  createIntersectionObserver
20
14
  } from "./chunk-LEWF7QAQ.js";
@@ -37,10 +31,17 @@ import {
37
31
  } from "./chunk-KFLH3AZ6.js";
38
32
  import "./chunk-FFBJP5FE.js";
39
33
  import {
34
+ combineClass,
40
35
  combineStyle,
41
36
  mountStyle,
42
37
  stringStyleToObject
43
- } from "./chunk-DKZ3RJJI.js";
38
+ } from "./chunk-KM4Q6THD.js";
39
+ import {
40
+ createClickOutside
41
+ } from "./chunk-WJHRONQU.js";
42
+ import {
43
+ makeEventListener
44
+ } from "./chunk-TGWWPUWD.js";
44
45
  import {
45
46
  createDebounce,
46
47
  createDebouncedWatch,
@@ -108,6 +109,7 @@ export {
108
109
  capitalize,
109
110
  clamp,
110
111
  clearArray,
112
+ combineClass,
111
113
  combineStyle,
112
114
  createClickOutside,
113
115
  createDebounce,
@@ -94,7 +94,7 @@ declare function clamp(x: number, minimum?: number, maximum?: number): number;
94
94
  * inRange(20, 10, 20, '[)') // => false (upper exclusive)
95
95
  * ```
96
96
  */
97
- declare function inRange(x: number, minimum?: number, maximum?: number, inclusivity?: '()' | '[]' | '[)' | '(]'): boolean;
97
+ declare function inRange(x: number, minimum?: number, maximum?: number, inclusivity?: "()" | "[]" | "[)" | "(]"): boolean;
98
98
  /**
99
99
  * Converts a number to a hexadecimal string.
100
100
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-tiny-utils",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "A collection of tiny utilities for SolidJS applications",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -12,7 +12,7 @@
12
12
  "solid-js": "^1.9.7"
13
13
  },
14
14
  "devDependencies": {
15
- "@biomejs/biome": "2.2.0",
15
+ "@biomejs/biome": "2.2.2",
16
16
  "@solidjs/router": "^0.15.3",
17
17
  "@solidjs/testing-library": "^0.8.10",
18
18
  "@testing-library/jest-dom": "^6.6.4",
@@ -20,13 +20,13 @@
20
20
  "@types/culori": "^4.0.0",
21
21
  "@types/node": "^24.2.1",
22
22
  "@vitest/ui": "^3.2.4",
23
- "commit-and-tag-version": "^12.5.1",
23
+ "bumpp": "^10.2.3",
24
24
  "culori": "^4.0.2",
25
25
  "husky": "^9.1.7",
26
26
  "jsdom": "^26.1.0",
27
27
  "tsup": "^8.5.0",
28
28
  "typescript": "^5.8.3",
29
- "ultracite": "5.2.2",
29
+ "ultracite": "5.3.3",
30
30
  "unocss": "^66.3.3",
31
31
  "vite": "^6.2.1",
32
32
  "vite-plugin-solid": "^2.11.0",
@@ -44,7 +44,7 @@
44
44
  "author": "",
45
45
  "license": "MIT",
46
46
  "dependencies": {
47
- "solid-tiny-context": "0.1.2"
47
+ "solid-tiny-context": "0.2.3"
48
48
  },
49
49
  "scripts": {
50
50
  "build": "tsup",
@@ -52,10 +52,10 @@
52
52
  "test": "vitest --run",
53
53
  "clean": "rimraf dist node_modules pnpm-lock.yaml",
54
54
  "test:ui": "vitest --ui",
55
- "lint": "npx ultracite lint",
56
- "lint:fix": "npx ultracite format",
55
+ "lint": "pnpm dlx ultracite check",
56
+ "lint:fix": "pnpm dlx ultracite fix",
57
57
  "type-check": "tsc --noEmit --skipLibCheck",
58
- "release": "pnpm type-check && pnpm lint:fix && pnpm test && commit-and-tag-version -i CHANGELOG.md --same-file",
59
- "pub": "pnpm build && pnpm publish"
58
+ "bump": "pnpm type-check && pnpm lint:fix && pnpm test && pnpm bumpp --no-push",
59
+ "prepublish": "pnpm build"
60
60
  }
61
61
  }