@adara-cs/utils 1.1.1 → 1.1.2

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Adara Cloud
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Adara Cloud
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @adara-cs/utils
2
-
3
- Utilities for Adara UI Kit Web
1
+ # @adara-cs/utils
2
+
3
+ Utilities for Adara UI Kit Web
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csx.js","sources":["../src/csx.ts"],"sourcesContent":["export const csx = (...rest: (string | undefined)[]) => rest.filter(Boolean).join(' ')"],"names":["csx","rest"],"mappings":"AAAa,MAAAA,IAAM,IAAIC,MAAiCA,EAAK,OAAO,OAAO,EAAE,KAAK,GAAG;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inRange.js","sources":["../src/inRange.ts"],"sourcesContent":["export const inRange = (value: number, range: [number, number]) => value >= range[0] && value <= range[1] || value <= range[1] && value >= range[0]"],"names":["inRange","value","range"],"mappings":"AAAO,MAAMA,IAAU,CAACC,GAAeC,MAA4BD,KAASC,EAAM,CAAC,KAAKD,KAASC,EAAM,CAAC,KAAKD,KAASC,EAAM,CAAC,KAAKD,KAASC,EAAM,CAAC;"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './css';
2
- export * from './array';
3
- export * from './margeRefs';
1
+ export * from './csx';
2
+ export * from './mergeRefs';
3
+ export * from './inRange';
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { csx as o } from "./css/csx.js";
2
- import { inRange as m } from "./array/inRange/inRange.js";
3
- import { mergeRefs as p } from "./margeRefs/mergeRefs.js";
1
+ import { csx as o } from "./csx.js";
2
+ import { mergeRefs as m } from "./mergeRefs.js";
3
+ import { inRange as p } from "./inRange.js";
4
4
  export {
5
5
  o as csx,
6
- m as inRange,
7
- p as mergeRefs
6
+ p as inRange,
7
+ m as mergeRefs
8
8
  };
9
9
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeRefs.js","sources":["../src/mergeRefs.ts"],"sourcesContent":["import { LegacyRef, MutableRefObject, RefCallback } from 'react';\n\nexport const mergeRefs = <T = never>(\n refs: Array<MutableRefObject<T> | LegacyRef<T> | undefined | null>\n): RefCallback<T> => {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as MutableRefObject<T | null>).current = value;\n }\n });\n };\n}"],"names":["mergeRefs","refs","value","ref"],"mappings":"AAEa,MAAAA,IAAY,CACvBC,MAEO,CAACC,MAAU;AACX,EAAAD,EAAA,QAAQ,CAACE,MAAQ;AAChB,IAAA,OAAOA,KAAQ,aACjBA,EAAID,CAAK,IACAC,KAAO,SACfA,EAAmC,UAAUD;AAAA,EAChD,CACD;AACH;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adara-cs/utils",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Utilities for @adara-cs/ui-kit-web",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -16,13 +16,13 @@
16
16
  },
17
17
  "homepage": "https://github.com/adara-cs/ui-kit-web#readme",
18
18
  "type": "module",
19
- "main": "./src/index.ts",
19
+ "main": "./index.ts",
20
20
  "exports": {
21
21
  ".": {
22
22
  "source": "./src/index.ts",
23
23
  "import": {
24
- "types": "./dist/index.d.ts",
25
- "default": "./dist/index.js"
24
+ "types": "./index.d.ts",
25
+ "default": "./index.js"
26
26
  }
27
27
  }
28
28
  },
@@ -34,17 +34,16 @@
34
34
  "vite": "^6.0.1",
35
35
  "vite-plugin-dts": "^4.3.0",
36
36
  "vite-plugin-svgr": "^4.3.0",
37
- "fast-glob": "^3.3.3",
38
- "globals": "^15.12.0",
39
- "jsdom": "^25.0.1",
40
37
  "vitest": "^2.1.8"
41
38
  },
42
39
  "publishConfig": {
43
40
  "access": "public"
44
41
  },
45
42
  "scripts": {
43
+ "dev": "vite build --watch",
46
44
  "build": "vite build",
47
45
  "check-types": "tsc --noEmit",
48
- "test": "vitest run"
46
+ "test": "vitest run",
47
+ "test:watch": "vitest --watch"
49
48
  }
50
49
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"inRange.js","sources":["../../../src/array/inRange/inRange.ts"],"sourcesContent":["export const inRange = (value: number, range: [number, number]) => value >= range[0] && value <= range[1] || value <= range[1] && value >= range[0]"],"names":["inRange","value","range"],"mappings":"AAAO,MAAMA,IAAU,CAACC,GAAeC,MAA4BD,KAASC,EAAM,CAAC,KAAKD,KAASC,EAAM,CAAC,KAAKD,KAASC,EAAM,CAAC,KAAKD,KAASC,EAAM,CAAC;"}
@@ -1 +0,0 @@
1
- export * from './inRange';
@@ -1,5 +0,0 @@
1
- import { inRange as o } from "./inRange.js";
2
- export {
3
- o as inRange
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- export * from './inRange';
@@ -1,5 +0,0 @@
1
- import { inRange as o } from "./inRange/inRange.js";
2
- export {
3
- o as inRange
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"csx.js","sources":["../../src/css/csx.ts"],"sourcesContent":["export const csx = (...rest: (string | undefined)[]) => rest.filter(Boolean).join(' ')"],"names":["csx","rest"],"mappings":"AAAa,MAAAA,IAAM,IAAIC,MAAiCA,EAAK,OAAO,OAAO,EAAE,KAAK,GAAG;"}
@@ -1 +0,0 @@
1
- export * from './csx.ts';
package/dist/css/index.js DELETED
@@ -1,5 +0,0 @@
1
- import { csx as x } from "./csx.js";
2
- export {
3
- x as csx
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- export * from './mergeRefs';
@@ -1,5 +0,0 @@
1
- import { mergeRefs as f } from "./mergeRefs.js";
2
- export {
3
- f as mergeRefs
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mergeRefs.js","sources":["../../src/margeRefs/mergeRefs.ts"],"sourcesContent":["import { LegacyRef, MutableRefObject, RefCallback } from 'react';\r\n\r\nexport const mergeRefs = <T = never>(\r\n refs: Array<MutableRefObject<T> | LegacyRef<T> | undefined | null>\r\n): RefCallback<T> => {\r\n return (value) => {\r\n refs.forEach((ref) => {\r\n if (typeof ref === 'function') {\r\n ref(value);\r\n } else if (ref != null) {\r\n (ref as MutableRefObject<T | null>).current = value;\r\n }\r\n });\r\n };\r\n}"],"names":["mergeRefs","refs","value","ref"],"mappings":"AAEa,MAAAA,IAAY,CACvBC,MAEO,CAACC,MAAU;AACX,EAAAD,EAAA,QAAQ,CAACE,MAAQ;AAChB,IAAA,OAAOA,KAAQ,aACjBA,EAAID,CAAK,IACAC,KAAO,SACfA,EAAmC,UAAUD;AAAA,EAChD,CACD;AACH;"}
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './css'
2
- export * from './array'
3
- export * from './margeRefs'
File without changes
File without changes
File without changes
File without changes