Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"import": "./dist/esm/ImageGallery.js",
"types": "./dist/esm/ImageGallery.d.ts"
},
"./style.css": "./dist/style.css"
"./style.css": "./dist/style.css",
"./dist/style.css": "./dist/style.css"
},
"homepage": "https://codesweetly.com/react-image-grid-gallery",
"author": "Oluwatobi Sofela <contact@codesweetly.com> (https://www.codesweetly.com)",
Expand All @@ -21,8 +22,9 @@
"build:esm": "tsc -p tsconfig.esm.json && node scripts/create-package-json.js --esm",
"build:cjs": "tsc -p tsconfig.cjs.json && node scripts/create-package-json.js --cjs",
"copy-files": "node scripts/copy-css.js",
"dev:test-app": "npm --prefix test-app run dev",
"test": "jest --config jest.config.cjs",
"test-publish": "npm publish --dry-run --tag next",
"test:publish": "npm publish --dry-run --tag next",
"watch": "tsc -p tsconfig.esm.json --watch",
"prepare": "husky"
},
Expand Down Expand Up @@ -53,7 +55,7 @@
"devDependencies": {
"@commitlint/cli": "^21.2.2",
"@commitlint/config-conventional": "^21.2.2",
"@testing-library/react": "^16.3.2",
"@testing-library/react": "^16.3.3",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.5",
"husky": "^9.1.7",
Expand Down
11 changes: 7 additions & 4 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
background: none;
margin: 0;
padding: 0;
display: block;
width: 100%;
}

.cs-rigg-image-container {
Expand Down Expand Up @@ -47,8 +49,8 @@
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
width: 100%;
height: 100%;
background-color: rgba(18, 18, 18, 0.85);
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
Expand Down Expand Up @@ -123,6 +125,7 @@
justify-content: center;
width: 100%;
flex: 1;
min-width: 0;
min-height: 0;
overflow: hidden;
}
Expand Down Expand Up @@ -222,8 +225,8 @@

.cs-rigg-modal-image {
margin: auto;
max-width: 100vw;
max-height: 100vh;
max-width: 100%;
max-height: 100%;
object-fit: contain;
transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
user-select: none;
Expand Down
24 changes: 24 additions & 0 deletions test-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
8 changes: 8 additions & 0 deletions test-app/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "oxc"],
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
32 changes: 32 additions & 0 deletions test-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)

## React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).

## Expanding the Oxlint configuration

If you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`:

```json
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "oxc"],
"options": {
"typeAware": true
},
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
```

See the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories.
13 changes: 13 additions & 0 deletions test-app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>test-app</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading