-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
15,637 additions
and
6,738 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,7 @@ testem.log | |
Thumbs.db | ||
|
||
.nx/cache | ||
|
||
# Next.js | ||
.next | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"extends": [ | ||
"plugin:@nx/react-typescript", | ||
"next", | ||
"next/core-web-vitals", | ||
"../.eslintrc.base.json" | ||
], | ||
"ignorePatterns": ["!**/*", ".next/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@next/next/no-html-link-for-pages": ["error", "docs/pages"] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
declare module '*.svg' { | ||
const content: any; | ||
export const ReactComponent: any; | ||
export default content; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//@ts-check | ||
|
||
/** | ||
* we need this to fix the issue with integrating the nx with nextra | ||
*/ | ||
if (process.cwd() !== __dirname) { | ||
process.chdir(__dirname); | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const { composePlugins, withNx } = require('@nx/next'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const nextra = require('nextra'); | ||
|
||
/** | ||
* @type {import('@nx/next/plugins/with-nx').WithNxOptions} | ||
**/ | ||
const nextConfig = { | ||
nx: { | ||
// Set this to true if you would like to use SVGR | ||
// See: https://github.com/gregberge/svgr | ||
svgr: false, | ||
}, | ||
}; | ||
|
||
// @ts-ignore | ||
const withNextra = nextra({ | ||
theme: 'nextra-theme-docs', | ||
themeConfig: './theme.config.tsx', | ||
}); | ||
|
||
const plugins = [ | ||
// Add more Next.js plugins to this list if needed. | ||
withNx, | ||
withNextra, | ||
]; | ||
|
||
const composed = composePlugins(...plugins)(nextConfig); | ||
|
||
module.exports = composed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const { join } = require('path'); | ||
|
||
// Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build | ||
// option from your application's configuration (i.e. project.json). | ||
// | ||
// See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libraries | ||
|
||
module.exports = { | ||
plugins: { | ||
tailwindcss: { | ||
config: join(__dirname, 'tailwind.config.js'), | ||
}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "docs", | ||
"$schema": "../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "docs", | ||
"projectType": "application", | ||
"tags": [], | ||
"// targets": "to see all targets run: nx show project docs --web", | ||
"targets": {} | ||
} |
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
# Swiperia | ||
|
||
Swiperia is a powerful and flexible library for creating smooth and responsive swiping experiences in web applications. Whether you're building a carousel, a touch-enabled slider, or any other interactive UI component that requires swiping gestures, Swiperia has got you covered. | ||
|
||
## Features | ||
|
||
- **Cross-Platform Support**: Swiperia works seamlessly across different platforms and devices, including desktops, tablets, and mobile phones. | ||
- **Customizable Swiping Behavior**: Customize the swiping behavior to fit your specific needs, such as setting thresholds, defining swipe directions, and handling different swipe events. | ||
- **Extensible and Modular**: Swiperia is designed with extensibility in mind, allowing you to create and integrate custom swiping behaviors or plugins. | ||
- **Performant and Lightweight**: Swiperia is built with performance as a top priority, ensuring smooth and efficient swiping experiences even on resource-constrained devices. | ||
- **Accessible and Inclusive**: Swiperia follows best practices for accessibility, ensuring that your swiping components are usable by everyone, including users with disabilities. | ||
|
||
## Getting Started | ||
|
||
To get started with Swiperia, you can install it via npm or yarn: | ||
|
||
```bash | ||
npm install swiperia | ||
# or | ||
yarn add swiperia | ||
``` | ||
|
||
|
||
Once installed, you can import and use the Swiperia components in your application: | ||
|
||
```bash | ||
import { Swiper, MouseSwiper, TouchSwiper } from 'swiperia'; | ||
|
||
const mySwiper = new Swiper(targetElement, [MouseSwiper, TouchSwiper]); | ||
|
||
mySwiper.listen((event) => { | ||
// Handle swipe events | ||
}); | ||
``` | ||
## Documentation | ||
For detailed documentation, including guides, API references, and examples, please visit the Swiperia Documentation. | ||
## Contributing | ||
We welcome contributions from the community! If you'd like to contribute to Swiperia, please read our Contributing Guide for more information. | ||
## License | ||
Swiperia is released under the MIT License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { createGlobPatternsForDependencies } = require('@nx/react/tailwind'); | ||
const { join } = require('path'); | ||
|
||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: [ | ||
join( | ||
__dirname, | ||
'{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}' | ||
), | ||
...createGlobPatternsForDependencies(__dirname), | ||
], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { type ThemeConfig } from 'nextra'; | ||
|
||
const config: ThemeConfig = { | ||
logo: <span>Swiperia</span>, | ||
project: { | ||
link: 'https://github.com/samavati/swiperia', | ||
|
||
}, | ||
}; | ||
|
||
export default config; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"extends": "../tsconfig.base.json", | ||
"compilerOptions": { | ||
"jsx": "preserve", | ||
"allowJs": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"incremental": true, | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
] | ||
}, | ||
"include": [ | ||
"**/*.ts", | ||
"**/*.tsx", | ||
"**/*.js", | ||
"**/*.jsx", | ||
"../docs/.next/types/**/*.ts", | ||
"../dist/docs/.next/types/**/*.ts", | ||
"next-env.d.ts", | ||
"next.config.js", | ||
".next/types/**/*.ts" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"jest.config.ts", | ||
"**/*.spec.ts", | ||
"**/*.test.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.