@cyberskill/shared 1.30.0 → 1.32.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.
Files changed (113) hide show
  1. package/README.md +93 -32
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.d.cts +11 -15
  4. package/dist/index.d.ts +11 -15
  5. package/dist/index.js +1 -1
  6. package/dist/nodejs/index.cjs +1 -0
  7. package/dist/{controllers → nodejs}/index.d.cts +1 -1
  8. package/dist/{controllers → nodejs}/index.d.ts +1 -1
  9. package/dist/{controllers → nodejs}/index.js +1 -1
  10. package/dist/nodejs/mongo.cjs +1 -0
  11. package/dist/{controllers/mongo-migration.d.cts → nodejs/mongo.d.cts} +2 -2
  12. package/dist/{controllers/mongo-migration.d.ts → nodejs/mongo.d.ts} +2 -2
  13. package/dist/{controllers/mongo-migration.js → nodejs/mongo.js} +1 -1
  14. package/dist/{providers/react → react}/apollo-client.d.cts +2 -2
  15. package/dist/{providers/react → react}/apollo-client.d.ts +2 -2
  16. package/dist/react/index.cjs +1 -0
  17. package/dist/react/index.d.cts +15 -0
  18. package/dist/react/index.d.ts +15 -0
  19. package/dist/react/index.js +1 -0
  20. package/dist/react/loading.cjs +1 -0
  21. package/dist/react/loading.d.cts +13 -0
  22. package/dist/react/loading.d.ts +13 -0
  23. package/dist/react/loading.js +1 -0
  24. package/dist/react/next-intl.cjs +1 -0
  25. package/dist/react/next-intl.d.cts +28 -0
  26. package/dist/react/next-intl.d.ts +28 -0
  27. package/dist/react/next-intl.js +1 -0
  28. package/dist/{hooks/react/use-storage.d.ts → react/storage.d.cts} +1 -1
  29. package/dist/{hooks/react/use-storage.d.cts → react/storage.d.ts} +1 -1
  30. package/dist/typescript/index.cjs +1 -1
  31. package/dist/typescript/index.d.cts +1 -0
  32. package/dist/typescript/index.d.ts +1 -0
  33. package/dist/typescript/index.js +1 -1
  34. package/dist/typescript/loading.cjs +1 -0
  35. package/dist/typescript/loading.d.cts +8 -0
  36. package/dist/typescript/loading.d.ts +8 -0
  37. package/dist/typescript/loading.js +0 -0
  38. package/dist/typescript/mongoose.d.cts +2 -2
  39. package/dist/typescript/mongoose.d.ts +2 -2
  40. package/dist/utils/index-nodejs.cjs +1 -0
  41. package/dist/utils/index-nodejs.d.cts +11 -0
  42. package/dist/utils/index-nodejs.d.ts +11 -0
  43. package/dist/utils/index-nodejs.js +1 -0
  44. package/dist/utils/index.cjs +1 -1
  45. package/dist/utils/index.d.cts +0 -11
  46. package/dist/utils/index.d.ts +0 -11
  47. package/dist/utils/index.js +1 -1
  48. package/package.json +39 -34
  49. package/dist/components/react/index.cjs +0 -1
  50. package/dist/components/react/index.d.cts +0 -2
  51. package/dist/components/react/index.d.ts +0 -2
  52. package/dist/components/react/index.js +0 -1
  53. package/dist/components/react/loading/index.cjs +0 -1
  54. package/dist/components/react/loading/index.d.cts +0 -11
  55. package/dist/components/react/loading/index.d.ts +0 -11
  56. package/dist/components/react/loading/index.js +0 -1
  57. package/dist/contexts/react/index.cjs +0 -1
  58. package/dist/contexts/react/index.d.cts +0 -3
  59. package/dist/contexts/react/index.d.ts +0 -3
  60. package/dist/contexts/react/index.js +0 -1
  61. package/dist/contexts/react/loading.cjs +0 -1
  62. package/dist/contexts/react/loading.d.cts +0 -6
  63. package/dist/contexts/react/loading.d.ts +0 -6
  64. package/dist/contexts/react/loading.js +0 -1
  65. package/dist/contexts/react/next-intl.cjs +0 -1
  66. package/dist/contexts/react/next-intl.d.cts +0 -8
  67. package/dist/contexts/react/next-intl.d.ts +0 -8
  68. package/dist/contexts/react/next-intl.js +0 -1
  69. package/dist/controllers/index.cjs +0 -1
  70. package/dist/controllers/mongo-migration.cjs +0 -1
  71. package/dist/hocs/react/index.cjs +0 -1
  72. package/dist/hocs/react/index.d.cts +0 -7
  73. package/dist/hocs/react/index.d.ts +0 -7
  74. package/dist/hocs/react/index.js +0 -1
  75. package/dist/hocs/react/next-intl.cjs +0 -1
  76. package/dist/hocs/react/next-intl.d.cts +0 -18
  77. package/dist/hocs/react/next-intl.d.ts +0 -18
  78. package/dist/hocs/react/next-intl.js +0 -1
  79. package/dist/hooks/react/index.cjs +0 -1
  80. package/dist/hooks/react/index.d.cts +0 -10
  81. package/dist/hooks/react/index.d.ts +0 -10
  82. package/dist/hooks/react/index.js +0 -1
  83. package/dist/hooks/react/use-loading.cjs +0 -1
  84. package/dist/hooks/react/use-loading.d.cts +0 -6
  85. package/dist/hooks/react/use-loading.d.ts +0 -6
  86. package/dist/hooks/react/use-loading.js +0 -1
  87. package/dist/hooks/react/use-next-intl.cjs +0 -1
  88. package/dist/hooks/react/use-next-intl.d.cts +0 -9
  89. package/dist/hooks/react/use-next-intl.d.ts +0 -9
  90. package/dist/hooks/react/use-next-intl.js +0 -1
  91. package/dist/providers/react/index.cjs +0 -1
  92. package/dist/providers/react/index.d.cts +0 -11
  93. package/dist/providers/react/index.d.ts +0 -11
  94. package/dist/providers/react/index.js +0 -1
  95. package/dist/providers/react/loading.cjs +0 -1
  96. package/dist/providers/react/loading.d.cts +0 -9
  97. package/dist/providers/react/loading.d.ts +0 -9
  98. package/dist/providers/react/loading.js +0 -1
  99. package/dist/providers/react/next-intl.cjs +0 -1
  100. package/dist/providers/react/next-intl.d.cts +0 -14
  101. package/dist/providers/react/next-intl.d.ts +0 -14
  102. package/dist/providers/react/next-intl.js +0 -1
  103. /package/dist/{controllers → nodejs}/mongoose.cjs +0 -0
  104. /package/dist/{controllers → nodejs}/mongoose.d.cts +0 -0
  105. /package/dist/{controllers → nodejs}/mongoose.d.ts +0 -0
  106. /package/dist/{controllers → nodejs}/mongoose.js +0 -0
  107. /package/dist/{providers/react → react}/apollo-client.cjs +0 -0
  108. /package/dist/{providers/react → react}/apollo-client.js +0 -0
  109. /package/dist/{components/react/loading → react}/loading.module.d.cts +0 -0
  110. /package/dist/{components/react/loading → react}/loading.module.d.ts +0 -0
  111. /package/dist/{components/react/loading → react}/loading.module.scss +0 -0
  112. /package/dist/{hooks/react/use-storage.cjs → react/storage.cjs} +0 -0
  113. /package/dist/{hooks/react/use-storage.js → react/storage.js} +0 -0
package/README.md CHANGED
@@ -1,48 +1,109 @@
1
- ![](./src/public/favicon/favicon-96x96.png)
1
+ <p align="center">
2
+ <img src="./src/public/favicon/favicon-96x96.png" width="96" height="96" alt="CyberSkill Logo">
3
+ </p>
2
4
 
3
- # CyberSkill Shared
5
+ <h1 align="center">🚀 CyberSkill Shared</h1>
4
6
 
5
- [![npm version][npm-version-src]][npm-version-href]
6
- [![npm downloads][npm-downloads-src]][npm-downloads-href]
7
- [![JSDocs][jsdocs-src]][jsdocs-href]
8
- [![License][license-src]][license-href]
7
+ <p align="center">
8
+ <b>A shared utility library for consistent development across CyberSkill projects.</b>
9
+ </p>
9
10
 
10
- ## License
11
+ ---
11
12
 
12
- [MIT](./LICENSE) License © [Stephen Cheng](https://github.com/zintaen)
13
+ <p align="center">
14
+ <a href="https://npmjs.com/package/@cyberskill/shared">
15
+ <img src="https://img.shields.io/npm/v/@cyberskill/shared?style=for-the-badge&color=blue" alt="npm version">
16
+ </a>
17
+ <a href="https://npmjs.com/package/@cyberskill/shared">
18
+ <img src="https://img.shields.io/npm/dm/@cyberskill/shared?style=for-the-badge&color=brightgreen" alt="npm downloads">
19
+ </a>
20
+ <a href="https://www.jsdocs.io/package/@cyberskill/shared">
21
+ <img src="https://img.shields.io/badge/jsDocs.io-reference-blue?style=for-the-badge" alt="JSDocs">
22
+ </a>
23
+ <a href="https://github.com/cyberskill-world/shared/blob/main/LICENSE">
24
+ <img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="License">
25
+ </a>
26
+ </p>
13
27
 
14
- <!-- Badges -->
28
+ ---
15
29
 
16
- [npm-version-src]: https://img.shields.io/npm/v/@cyberskill/shared?style=flat&colorA=080f12&colorB=1fa669
17
- [npm-version-href]: https://npmjs.com/package/@cyberskill/shared
18
- [npm-downloads-src]: https://img.shields.io/npm/dm/@cyberskill/shared?style=flat&colorA=080f12&colorB=1fa669
19
- [npm-downloads-href]: https://npmjs.com/package/@cyberskill/shared
20
- [jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
21
- [jsdocs-href]: https://www.jsdocs.io/package/@cyberskill/shared
22
- [license-src]: https://img.shields.io/github/license/cyberskill-world/shared.svg?style=flat&colorA=080f12&colorB=1fa669
23
- [license-href]: https://github.com/cyberskill-world/shared/blob/main/LICENSE
30
+ ## 🎯 **About**
24
31
 
25
- ## Usage
32
+ CyberSkill Shared is a modular utility library designed to:
33
+
34
+ - 📦 **Provide reusable utility functions** across multiple projects.
35
+ - ⚙️ **Ensure consistent coding standards**.
36
+ - 🚀 **Boost developer productivity** by reducing repetitive code.
37
+
38
+ ---
39
+
40
+ ## 🚀 **Installation**
41
+
42
+ Install via **npm**:
26
43
 
27
44
  ```bash
28
- # development
29
- npm run dev
45
+ npm install @cyberskill/shared
46
+ ```
47
+
48
+ Install via **yarn**:
49
+
50
+ ```bash
51
+ yarn add @cyberskill/shared
52
+ ```
30
53
 
31
- # production
32
- npm run build
54
+ ---
33
55
 
34
- # lint check
35
- npm run lint
56
+ ## 🛠️ **Scripts**
36
57
 
37
- # lint fix
38
- npm run lint:fix
58
+ | Command | Description |
59
+ | ---------------------- | ----------------------------------- |
60
+ | `npm run dev` | Start development mode 🚧 |
61
+ | `npm run build` | Build for production 🚀 |
62
+ | `npm run lint` | Check for linting issues ✅ |
63
+ | `npm run lint:fix` | Fix linting issues 🔧 |
64
+ | `npm run lint:inspect` | Inspect linting config 🧐 |
65
+ | `npm run setup` | Project setup 🏗️ |
66
+ | `npm run reset` | Reset the project ♻️ |
67
+ | `npm run inspect` | Inspect the project dependencies 🔍 |
39
68
 
40
- # lint inspect
41
- npm run lint:inspect
69
+ ---
42
70
 
43
- # project setup
44
- npm run setup
71
+ ## 📂 **Project Structure**
45
72
 
46
- # project reset
47
- npm run reset
73
+ ```plaintext
74
+ src/
75
+ ├── components/ → Reusable UI components (buttons, modals, etc.)
76
+ ├── configs/ → App configuration files
77
+ ├── constants/ → Static values used across the app
78
+ ├── contexts/ → React context providers
79
+ ├── controllers/ → Business logic controllers
80
+ ├── hocs/ → Higher Order Components (HOCs)
81
+ ├── hooks/ → Custom hooks
82
+ ├── providers/ → State management and third-party providers
83
+ ├── public/ → Static assets (images, fonts, etc.)
84
+ ├── styles/ → Global and component-specific styles
85
+ ├── typescript/ → TypeScript types and interfaces
86
+ ├── utils/ → Utility functions and helpers
87
+ ├── commands.ts → CLI commands and setup logic
88
+ └── index.ts → Entry point for the app
48
89
  ```
90
+
91
+ ---
92
+
93
+ ## 🎯 **Goals**
94
+
95
+ - ✅ Consistent TypeScript support.
96
+ - ✅ Minimize code duplication.
97
+ - ✅ Easy to extend and maintain.
98
+
99
+ ---
100
+
101
+ ## 📄 **License**
102
+
103
+ **[MIT](./LICENSE)** License © [Stephen Cheng](https://github.com/zintaen)
104
+
105
+ ---
106
+
107
+ <p align="center">
108
+ Made with ❤️ by <a href="https://github.com/zintaen">@zintaen</a>
109
+ </p>