@wazobiatech/wazui 0.0.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.
Files changed (109) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.dockerignore +9 -0
  4. package/.env.sample +22 -0
  5. package/.husky/pre-commit +7 -0
  6. package/.prettierignore +5 -0
  7. package/.prettierrc +9 -0
  8. package/.storybook/main.ts +41 -0
  9. package/.storybook/preview-head.html +3 -0
  10. package/.storybook/preview.ts +53 -0
  11. package/Dockerfile +58 -0
  12. package/Dockerfile.dev +11 -0
  13. package/README.md +130 -0
  14. package/__mocks__/fileMock.ts +1 -0
  15. package/__mocks__/svgMock.ts +1 -0
  16. package/babel.config.js +46 -0
  17. package/bitbucket-pipelines.yml +70 -0
  18. package/components.json +21 -0
  19. package/e2e/example.spec.ts +18 -0
  20. package/eslint.config.mjs +37 -0
  21. package/index.html +13 -0
  22. package/jest.config.ts +79 -0
  23. package/jest.setup.tsx +276 -0
  24. package/lint-staged.config.js +45 -0
  25. package/package.json +167 -0
  26. package/playwright.config.ts +79 -0
  27. package/plop-templates/Component.tsx.hbs +13 -0
  28. package/plop-templates/ComponentStories.tsx.hbs +24 -0
  29. package/plop-templates/ComponentTests.tsx.hbs +15 -0
  30. package/plop-templates/ComponentTypes.ts.hbs +1 -0
  31. package/plopfile.js +35 -0
  32. package/setupTests.ts +1 -0
  33. package/src/assets/dashboard/book.svg +6 -0
  34. package/src/assets/dashboard/edit.svg +5 -0
  35. package/src/assets/dashboard/emerald.svg +9 -0
  36. package/src/assets/dashboard/eye.svg +4 -0
  37. package/src/assets/dashboard/gold.svg +9 -0
  38. package/src/assets/dashboard/percentage-square.svg +6 -0
  39. package/src/assets/dashboard/sapphire.svg +9 -0
  40. package/src/assets/dashboard/send-2.svg +4 -0
  41. package/src/assets/desktop.svg +7 -0
  42. package/src/assets/fonts/UniversalFeature/FeatureJungle-Light.otf +0 -0
  43. package/src/assets/fonts/UniversalFeature/FeatureJungle-Light.woff +0 -0
  44. package/src/assets/fonts/UniversalFeature/FeatureJungle-Light.woff2 +0 -0
  45. package/src/assets/fonts/UniversalFeature/FeatureJungle-Regular.otf +0 -0
  46. package/src/assets/fonts/UniversalFeature/FeatureJungle-Regular.woff +0 -0
  47. package/src/assets/fonts/UniversalFeature/FeatureJungle-Regular.woff2 +0 -0
  48. package/src/assets/fonts/UniversalJungle/UniversalJungle-420.otf +0 -0
  49. package/src/assets/fonts/UniversalJungle/UniversalJungle-420.woff +0 -0
  50. package/src/assets/fonts/UniversalJungle/UniversalJungle-420.woff2 +0 -0
  51. package/src/assets/fonts/UniversalJungle/UniversalJungle-515.otf +0 -0
  52. package/src/assets/fonts/UniversalJungle/UniversalJungle-515.woff +0 -0
  53. package/src/assets/fonts/UniversalJungle/UniversalJungle-515.woff2 +0 -0
  54. package/src/assets/instagram.svg +9 -0
  55. package/src/assets/mobile.svg +4 -0
  56. package/src/assets/no-data-image.svg +41 -0
  57. package/src/assets/no-image-icon.svg +84 -0
  58. package/src/assets/pexels.svg +9 -0
  59. package/src/assets/react.svg +1 -0
  60. package/src/assets/sounds/draft.mp3 +0 -0
  61. package/src/assets/sounds/error.mp3 +0 -0
  62. package/src/assets/sounds/publish.mp3 +0 -0
  63. package/src/assets/tablet.svg +4 -0
  64. package/src/assets/unsplash.svg +3 -0
  65. package/src/assets/upload-image.svg +43 -0
  66. package/src/assets/user.svg +4 -0
  67. package/src/components/shadcn/index.ts +31 -0
  68. package/src/config/env.ts +15 -0
  69. package/src/contexts/ThemeContext.tsx +11 -0
  70. package/src/data/users.json +6014 -0
  71. package/src/decorators/ActionModalDecorator.tsx +10 -0
  72. package/src/decorators/ApolloDecorator.tsx +19 -0
  73. package/src/decorators/DolosApolloDecorator.tsx +31 -0
  74. package/src/decorators/JestDecorators.tsx +34 -0
  75. package/src/decorators/ReactQueryDecorator.tsx +13 -0
  76. package/src/decorators/RouterDecorator.tsx +5 -0
  77. package/src/decorators/UnsafePropsDecorator.tsx +0 -0
  78. package/src/env.ts +99 -0
  79. package/src/hooks/use-autogrow.ts +28 -0
  80. package/src/hooks/use-mobile.ts +19 -0
  81. package/src/hooks/useAuthors.ts +78 -0
  82. package/src/hooks/useDebounce.ts +18 -0
  83. package/src/hooks/useMercuryProjectToken.ts +112 -0
  84. package/src/hooks/useProjectToken.ts +21 -0
  85. package/src/hooks/useTheme.ts +12 -0
  86. package/src/index.css +397 -0
  87. package/src/index.ts +59 -0
  88. package/src/mocks/env.ts +12 -0
  89. package/src/providers/QueryProvider/index.tsx +10 -0
  90. package/src/providers/ThemeProvider/index.tsx +52 -0
  91. package/src/types/category.types.ts +13 -0
  92. package/src/types/image.types.ts +44 -0
  93. package/src/types/post.types.ts +121 -0
  94. package/src/types/theme.types.ts +10 -0
  95. package/src/types/users.types.ts +5 -0
  96. package/src/utils/apolloClient.ts +160 -0
  97. package/src/utils/articleMetadata.ts +92 -0
  98. package/src/utils/audio.ts +10 -0
  99. package/src/utils/imageProcessing.ts +399 -0
  100. package/src/utils/images.ts +279 -0
  101. package/src/utils/mercury.ts +0 -0
  102. package/src/utils/utils.ts +638 -0
  103. package/src/utils/videos.ts +29 -0
  104. package/src/vite-env.d.ts +1 -0
  105. package/tsconfig.app.json +30 -0
  106. package/tsconfig.json +32 -0
  107. package/tsconfig.node.json +24 -0
  108. package/tsconfig.tsbuildinfo +1 -0
  109. package/vite.config.ts +50 -0
package/tsconfig.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "rootDir": "./src",
3
+ "compilerOptions": {
4
+ "baseUrl": ".",
5
+ "paths": {
6
+ "@/*": ["./src/*"],
7
+ "@config/env": ["src/env.ts"],
8
+ "@repo/wazui/styles.css": ["../packages/wazui/src/index.css"]
9
+ },
10
+ "strict": true,
11
+ "declaration": true,
12
+ "declarationDir": "./dist",
13
+ "emitDeclarationOnly": true,
14
+ "moduleResolution": "bundler", // Change this from 'node16' or 'nodenext'
15
+ "allowImportingTsExtensions": true,
16
+ "module": "ESNext",
17
+ "declarationMap": true,
18
+ "esModuleInterop": true,
19
+ "incremental": false,
20
+ "isolatedModules": true,
21
+ "lib": ["es2022", "DOM", "DOM.Iterable"],
22
+ "moduleDetection": "force",
23
+ "noUncheckedIndexedAccess": true,
24
+ "resolveJsonModule": true,
25
+ "skipLibCheck": true,
26
+ "target": "ES2022",
27
+ "jsx": "react-jsx",
28
+ "allowSyntheticDefaultImports": true
29
+ },
30
+ "include": ["src", "__mocks__", "src/env.ts"],
31
+ "exclude": ["node_modules", "dist"]
32
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2022",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "isolatedModules": true,
13
+ "moduleDetection": "force",
14
+ "noEmit": true,
15
+
16
+ /* Linting */
17
+ "strict": true,
18
+ "noUnusedLocals": true,
19
+ "noUnusedParameters": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+ "noUncheckedSideEffectImports": true
22
+ },
23
+ "include": ["vite.config.ts"]
24
+ }
@@ -0,0 +1 @@
1
+ {"root":["./src/app.tsx","./src/main.ts","./src/vite-env.d.ts","./src/components/ui/button.tsx","./src/lib/utils.ts"],"version":"5.7.3"}
package/vite.config.ts ADDED
@@ -0,0 +1,50 @@
1
+ import { defineConfig } from 'vite';
2
+ import { resolve } from 'path';
3
+ import react from '@vitejs/plugin-react';
4
+ import dts from 'vite-plugin-dts';
5
+ import tailwindcss from '@tailwindcss/vite';
6
+
7
+ export default defineConfig({
8
+ server: {
9
+ port: 6006,
10
+ host: '0.0.0.0',
11
+ allowedHosts: ['localhost', 'wazui.wazobia.uk'],
12
+ },
13
+ resolve: {
14
+ alias: {
15
+ '@': resolve(__dirname, './src'), // Map "@" to the "src" directory
16
+ },
17
+ },
18
+ optimizeDeps: {
19
+ exclude: ['apollo-upload-client'],
20
+ },
21
+ ssr: {
22
+ noExternal: ['apollo-upload-client'],
23
+ },
24
+ build: {
25
+ lib: {
26
+ entry: resolve(__dirname, 'src/index.ts'),
27
+ name: 'ui',
28
+ fileName: format => `index.${format === 'es' ? 'mjs' : 'js'}`,
29
+ formats: ['es', 'cjs'],
30
+ },
31
+ rollupOptions: {
32
+ external: ['react', 'react-dom'],
33
+ output: {
34
+ globals: {
35
+ react: 'React',
36
+ 'react-dom': 'ReactDOM',
37
+ },
38
+ },
39
+ },
40
+ },
41
+ plugins: [
42
+ react(),
43
+ tailwindcss(),
44
+ dts({
45
+ include: ['src', '.storybook'], // Ensure the "src" directory is included
46
+ outDir: 'dist', // Output the declarations to the "dist" directory
47
+ insertTypesEntry: true, // Add a "types" entry to the package.json
48
+ }),
49
+ ],
50
+ });