@ashtuka/react-lib 1.0.24 → 1.0.26

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.
@@ -0,0 +1,10 @@
1
+ function n(t = 8) {
2
+ const r = "abcdefghijklmnopqrstuvwxyz0123456789";
3
+ return Array.from(
4
+ { length: t },
5
+ () => r.charAt(Math.floor(Math.random() * r.length))
6
+ ).join("");
7
+ }
8
+ export {
9
+ n as generateId
10
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Генерує випадковий ID заданої довжини.
3
+ *
4
+ * @param length - Довжина рядка ID (за замовчуванням 8)
5
+ * @returns Рядок з випадковими символами [a-z0-9]
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const id = generateId(10);
10
+ * console.log(id); // "a3f9k2mz1x"
11
+ * ```
12
+ */
13
+ export default function generateId(length?: number): string;
@@ -0,0 +1 @@
1
+ export { default as generateId } from './generateId';
package/package.json CHANGED
@@ -1,20 +1,28 @@
1
1
  {
2
2
  "name": "@ashtuka/react-lib",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "main": "./dist/react-lib.index.es.js",
5
5
  "module": "./dist/react-lib.index.es.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
+ "types": "./dist/index.d.ts",
9
10
  "import": "./dist/react-lib.index.es.js",
10
- "types": "./dist/index.d.ts"
11
+ "default": "./dist/react-lib.index.es.js"
12
+ },
13
+ "./utils": {
14
+ "types": "./dist/utils/index.d.ts",
15
+ "import": "./dist/react-lib.utils.es.js",
16
+ "default": "./dist/react-lib.utils.es.js"
11
17
  },
12
18
  "./PageLoaderModule": {
19
+ "types": "./dist/modules/PageLoaderModule/index.d.ts",
13
20
  "import": "./dist/react-lib.PageLoaderModule.es.js",
14
- "types": "./dist/modules/PageLoaderModule/index.d.ts"
21
+ "default": "./dist/react-lib.PageLoaderModule.es.js"
15
22
  },
16
23
  "./PageLoaderModule/style.css": "./dist/PageLoaderModule.css"
17
24
  },
25
+ "sideEffects": false,
18
26
  "files": [
19
27
  "dist"
20
28
  ],
@@ -26,7 +34,8 @@
26
34
  "build": "vite build && tsc",
27
35
  "lint": "eslint . --ext .ts,.tsx --fix",
28
36
  "format": "prettier --write .",
29
- "release": "npm version patch && npm publish --access public"
37
+ "release": "npm version patch && npm publish --access public",
38
+ "updBuildConfig": "npx tsx scripts/updateBuildConfig.ts"
30
39
  },
31
40
  "peerDependencies": {
32
41
  "react": "^19.1.1",
@@ -54,7 +63,8 @@
54
63
  "react-dom": "^19.1.1",
55
64
  "react-localization": "^2.0.6",
56
65
  "sass": "^1.86.3",
57
- "typescript": "^5.0.0",
66
+ "ts-node": "^10.9.2",
67
+ "typescript": "^5.8.3",
58
68
  "vite": "^5.0.0",
59
69
  "vitest": "^1.0.0"
60
70
  }