@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.
- package/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.dockerignore +9 -0
- package/.env.sample +22 -0
- package/.husky/pre-commit +7 -0
- package/.prettierignore +5 -0
- package/.prettierrc +9 -0
- package/.storybook/main.ts +41 -0
- package/.storybook/preview-head.html +3 -0
- package/.storybook/preview.ts +53 -0
- package/Dockerfile +58 -0
- package/Dockerfile.dev +11 -0
- package/README.md +130 -0
- package/__mocks__/fileMock.ts +1 -0
- package/__mocks__/svgMock.ts +1 -0
- package/babel.config.js +46 -0
- package/bitbucket-pipelines.yml +70 -0
- package/components.json +21 -0
- package/e2e/example.spec.ts +18 -0
- package/eslint.config.mjs +37 -0
- package/index.html +13 -0
- package/jest.config.ts +79 -0
- package/jest.setup.tsx +276 -0
- package/lint-staged.config.js +45 -0
- package/package.json +167 -0
- package/playwright.config.ts +79 -0
- package/plop-templates/Component.tsx.hbs +13 -0
- package/plop-templates/ComponentStories.tsx.hbs +24 -0
- package/plop-templates/ComponentTests.tsx.hbs +15 -0
- package/plop-templates/ComponentTypes.ts.hbs +1 -0
- package/plopfile.js +35 -0
- package/setupTests.ts +1 -0
- package/src/assets/dashboard/book.svg +6 -0
- package/src/assets/dashboard/edit.svg +5 -0
- package/src/assets/dashboard/emerald.svg +9 -0
- package/src/assets/dashboard/eye.svg +4 -0
- package/src/assets/dashboard/gold.svg +9 -0
- package/src/assets/dashboard/percentage-square.svg +6 -0
- package/src/assets/dashboard/sapphire.svg +9 -0
- package/src/assets/dashboard/send-2.svg +4 -0
- package/src/assets/desktop.svg +7 -0
- package/src/assets/fonts/UniversalFeature/FeatureJungle-Light.otf +0 -0
- package/src/assets/fonts/UniversalFeature/FeatureJungle-Light.woff +0 -0
- package/src/assets/fonts/UniversalFeature/FeatureJungle-Light.woff2 +0 -0
- package/src/assets/fonts/UniversalFeature/FeatureJungle-Regular.otf +0 -0
- package/src/assets/fonts/UniversalFeature/FeatureJungle-Regular.woff +0 -0
- package/src/assets/fonts/UniversalFeature/FeatureJungle-Regular.woff2 +0 -0
- package/src/assets/fonts/UniversalJungle/UniversalJungle-420.otf +0 -0
- package/src/assets/fonts/UniversalJungle/UniversalJungle-420.woff +0 -0
- package/src/assets/fonts/UniversalJungle/UniversalJungle-420.woff2 +0 -0
- package/src/assets/fonts/UniversalJungle/UniversalJungle-515.otf +0 -0
- package/src/assets/fonts/UniversalJungle/UniversalJungle-515.woff +0 -0
- package/src/assets/fonts/UniversalJungle/UniversalJungle-515.woff2 +0 -0
- package/src/assets/instagram.svg +9 -0
- package/src/assets/mobile.svg +4 -0
- package/src/assets/no-data-image.svg +41 -0
- package/src/assets/no-image-icon.svg +84 -0
- package/src/assets/pexels.svg +9 -0
- package/src/assets/react.svg +1 -0
- package/src/assets/sounds/draft.mp3 +0 -0
- package/src/assets/sounds/error.mp3 +0 -0
- package/src/assets/sounds/publish.mp3 +0 -0
- package/src/assets/tablet.svg +4 -0
- package/src/assets/unsplash.svg +3 -0
- package/src/assets/upload-image.svg +43 -0
- package/src/assets/user.svg +4 -0
- package/src/components/shadcn/index.ts +31 -0
- package/src/config/env.ts +15 -0
- package/src/contexts/ThemeContext.tsx +11 -0
- package/src/data/users.json +6014 -0
- package/src/decorators/ActionModalDecorator.tsx +10 -0
- package/src/decorators/ApolloDecorator.tsx +19 -0
- package/src/decorators/DolosApolloDecorator.tsx +31 -0
- package/src/decorators/JestDecorators.tsx +34 -0
- package/src/decorators/ReactQueryDecorator.tsx +13 -0
- package/src/decorators/RouterDecorator.tsx +5 -0
- package/src/decorators/UnsafePropsDecorator.tsx +0 -0
- package/src/env.ts +99 -0
- package/src/hooks/use-autogrow.ts +28 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/useAuthors.ts +78 -0
- package/src/hooks/useDebounce.ts +18 -0
- package/src/hooks/useMercuryProjectToken.ts +112 -0
- package/src/hooks/useProjectToken.ts +21 -0
- package/src/hooks/useTheme.ts +12 -0
- package/src/index.css +397 -0
- package/src/index.ts +59 -0
- package/src/mocks/env.ts +12 -0
- package/src/providers/QueryProvider/index.tsx +10 -0
- package/src/providers/ThemeProvider/index.tsx +52 -0
- package/src/types/category.types.ts +13 -0
- package/src/types/image.types.ts +44 -0
- package/src/types/post.types.ts +121 -0
- package/src/types/theme.types.ts +10 -0
- package/src/types/users.types.ts +5 -0
- package/src/utils/apolloClient.ts +160 -0
- package/src/utils/articleMetadata.ts +92 -0
- package/src/utils/audio.ts +10 -0
- package/src/utils/imageProcessing.ts +399 -0
- package/src/utils/images.ts +279 -0
- package/src/utils/mercury.ts +0 -0
- package/src/utils/utils.ts +638 -0
- package/src/utils/videos.ts +29 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.app.json +30 -0
- package/tsconfig.json +32 -0
- package/tsconfig.node.json +24 -0
- package/tsconfig.tsbuildinfo +1 -0
- 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
|
+
});
|