@mgonza02/goal-image-gallery 1.0.0 → 1.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/MIGRATION.md +7 -5
- package/QUICK_REFERENCE.md +7 -1
- package/README.md +15 -11
- package/package.json +4 -4
package/MIGRATION.md
CHANGED
|
@@ -22,7 +22,7 @@ import { CommonImageGallery } from './components/common/common-image-gallery';
|
|
|
22
22
|
|
|
23
23
|
#### After
|
|
24
24
|
```javascript
|
|
25
|
-
import GoalImageGallery from '
|
|
25
|
+
import { GoalImageGallery } from '@mgonza02/goal-image-gallery';
|
|
26
26
|
|
|
27
27
|
<GoalImageGallery
|
|
28
28
|
imageCodes={photos.map(p => p.image_code)}
|
|
@@ -237,9 +237,11 @@ const handleImageUpload = async (imageData) => {
|
|
|
237
237
|
|
|
238
238
|
### Step 1: Install Dependencies
|
|
239
239
|
```bash
|
|
240
|
-
#
|
|
241
|
-
npm install @
|
|
242
|
-
|
|
240
|
+
# Install the new package
|
|
241
|
+
npm install @mgonza02/goal-image-gallery
|
|
242
|
+
|
|
243
|
+
# Ensure you have required peer dependencies
|
|
244
|
+
npm install @mui/material @mui/icons-material @emotion/react @emotion/styled
|
|
243
245
|
```
|
|
244
246
|
|
|
245
247
|
### Step 2: Update Imports
|
|
@@ -249,7 +251,7 @@ npm install react-dropzone
|
|
|
249
251
|
// import Gallery from 'react-photo-gallery';
|
|
250
252
|
|
|
251
253
|
// Add new import
|
|
252
|
-
import GoalImageGallery from '
|
|
254
|
+
import { GoalImageGallery } from '@mgonza02/goal-image-gallery';
|
|
253
255
|
```
|
|
254
256
|
|
|
255
257
|
### Step 3: Convert Data Format
|
package/QUICK_REFERENCE.md
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
# GoalImageGallery - Quick Reference
|
|
2
2
|
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @mgonza02/goal-image-gallery
|
|
7
|
+
```
|
|
8
|
+
|
|
3
9
|
## Basic Usage
|
|
4
10
|
|
|
5
11
|
```javascript
|
|
6
|
-
import GoalImageGallery from '
|
|
12
|
+
import { GoalImageGallery } from '@mgonza02/goal-image-gallery';
|
|
7
13
|
|
|
8
14
|
// Read-only gallery
|
|
9
15
|
<GoalImageGallery imageCodes={['img1', 'img2']} canEdit={false} />
|
package/README.md
CHANGED
|
@@ -40,8 +40,12 @@ The `GoalImageGallery` is a modern, feature-rich image gallery component for the
|
|
|
40
40
|
|
|
41
41
|
## Installation
|
|
42
42
|
|
|
43
|
+
```bash
|
|
44
|
+
npm install @mgonza02/goal-image-gallery
|
|
45
|
+
```
|
|
46
|
+
|
|
43
47
|
```javascript
|
|
44
|
-
import GoalImageGallery from '
|
|
48
|
+
import { GoalImageGallery } from '@mgonza02/goal-image-gallery';
|
|
45
49
|
```
|
|
46
50
|
|
|
47
51
|
## Basic Usage
|
|
@@ -367,7 +371,7 @@ goal-image-gallery/
|
|
|
367
371
|
|
|
368
372
|
#### Main Component
|
|
369
373
|
```javascript
|
|
370
|
-
import { GoalImageGallery } from '@
|
|
374
|
+
import { GoalImageGallery } from '@mgonza02/goal-image-gallery';
|
|
371
375
|
```
|
|
372
376
|
|
|
373
377
|
#### Sub-components
|
|
@@ -377,7 +381,7 @@ import {
|
|
|
377
381
|
ImageGalleryModal,
|
|
378
382
|
ImageGalleryItem,
|
|
379
383
|
ImageGalleryEmptyState
|
|
380
|
-
} from '@
|
|
384
|
+
} from '@mgonza02/goal-image-gallery';
|
|
381
385
|
```
|
|
382
386
|
|
|
383
387
|
#### Custom Hooks
|
|
@@ -387,7 +391,7 @@ import {
|
|
|
387
391
|
useImageZoom,
|
|
388
392
|
useClipboard,
|
|
389
393
|
useKeyboardNavigation
|
|
390
|
-
} from '@
|
|
394
|
+
} from '@mgonza02/goal-image-gallery';
|
|
391
395
|
```
|
|
392
396
|
|
|
393
397
|
#### Styled Components
|
|
@@ -396,7 +400,7 @@ import {
|
|
|
396
400
|
StyledImageContainer,
|
|
397
401
|
ImageOverlay,
|
|
398
402
|
StyledModalContainer
|
|
399
|
-
} from '@
|
|
403
|
+
} from '@mgonza02/goal-image-gallery';
|
|
400
404
|
```
|
|
401
405
|
|
|
402
406
|
#### Utility Functions
|
|
@@ -408,7 +412,7 @@ import {
|
|
|
408
412
|
getGridColumns,
|
|
409
413
|
isValidImageFile,
|
|
410
414
|
formatFileSize
|
|
411
|
-
} from '@
|
|
415
|
+
} from '@mgonza02/goal-image-gallery';
|
|
412
416
|
```
|
|
413
417
|
|
|
414
418
|
### Using Individual Components
|
|
@@ -418,7 +422,7 @@ import {
|
|
|
418
422
|
ImageGalleryGrid,
|
|
419
423
|
ImageGalleryModal,
|
|
420
424
|
useImageGallery
|
|
421
|
-
} from '@
|
|
425
|
+
} from '@mgonza02/goal-image-gallery';
|
|
422
426
|
|
|
423
427
|
function CustomGallery() {
|
|
424
428
|
const { imageList, openImage, handleOpenImage } = useImageGallery({
|
|
@@ -450,12 +454,12 @@ The component is now ready for export as an independent package:
|
|
|
450
454
|
|
|
451
455
|
```json
|
|
452
456
|
{
|
|
453
|
-
"name": "@goal
|
|
457
|
+
"name": "@mgonza02/goal-image-gallery",
|
|
454
458
|
"version": "1.0.0",
|
|
455
459
|
"description": "Enhanced, modular image gallery component for React applications",
|
|
456
|
-
"main": "index.js",
|
|
457
|
-
"module": "index.js",
|
|
458
|
-
"types": "index.d.ts"
|
|
460
|
+
"main": "lib/index.js",
|
|
461
|
+
"module": "lib/index.js",
|
|
462
|
+
"types": "lib/index.d.ts"
|
|
459
463
|
}
|
|
460
464
|
```
|
|
461
465
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgonza02/goal-image-gallery",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Enhanced, modular image gallery component for React applications",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "git+https://github.com/mgonza02/goal-image-gallery.git"
|
|
25
25
|
},
|
|
26
|
-
"homepage": "https://github.com/
|
|
26
|
+
"homepage": "https://github.com/mgonza02/goal-image-gallery#readme",
|
|
27
27
|
"bugs": {
|
|
28
|
-
"url": "https://github.com/
|
|
28
|
+
"url": "https://github.com/mgonza02/goal-image-gallery/issues"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|