@chayns-components/gallery 5.5.27 → 5.5.28

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 (2) hide show
  1. package/AGENTS.md +38 -3
  2. package/package.json +3 -3
package/AGENTS.md CHANGED
@@ -111,11 +111,33 @@ import { Gallery } from '@chayns-components/gallery';
111
111
 
112
112
  ### Props
113
113
 
114
- No prop documentation available.
114
+ | name | type | required | description |
115
+ | --- | --- | --- | --- |
116
+ | `addFileIcon` | `string \| undefined` | no | Defines the icon that is shown in the add-file tile in edit mode. |
117
+ | `allowDragAndDrop` | `boolean \| undefined` | no | Enables drag and drop while the component is used in edit mode. |
118
+ | `doubleFileDialogMessage` | `string \| undefined` | no | Defines the dialog message that is shown when a duplicate upload is detected. |
119
+ | `fileMinWidth` | `number \| undefined` | no | Defines the minimum width of one tile in edit mode. |
120
+ | `files` | `FileItem[] \| undefined` | no | Provides already known media items that should be rendered by the gallery. |
121
+ | `isEditMode` | `boolean \| undefined` | no | Enables the editable upload mode instead of the read-only viewer mode. |
122
+ | `maxFiles` | `number \| undefined` | no | Limits how many files can be managed in edit mode. |
123
+ | `onAdd` | `((file: FileItem) => void) \| undefined` | no | Is called after a file has been uploaded successfully in edit mode. |
124
+ | `onFileCountChange` | `((fileCount: number) => void) \| undefined` | no | Is called whenever the internal item count changes in edit mode. |
125
+ | `onRemove` | `((file: FileItem) => void) \| undefined` | no | Is called after an uploaded file has been removed in edit mode. |
126
+ | `shouldLoadImages` | `boolean \| undefined` | no | Controls when the gallery is allowed to load the final media assets. |
127
+ | `viewMode` | `GalleryViewMode \| undefined` | no | Defines how known media items are arranged in read-only mode. |
115
128
 
116
129
  ### Types
117
130
 
118
- No additional exported types documented.
131
+ - `GalleryViewMode` -> `enum GalleryViewMode {
132
+ /**
133
+ * Arranges visible items in a square-first layout.
134
+ */
135
+ SQUARE,
136
+ /**
137
+ * Arranges visible items in the gallery grid layout.
138
+ */
139
+ GRID,
140
+ }`
119
141
 
120
142
  ### Usage Notes
121
143
 
@@ -125,6 +147,7 @@ No additional exported types documented.
125
147
  ### Anti Patterns
126
148
 
127
149
  - Avoid imports from internal paths such as `@chayns-components/gallery/src/...`; always use the public package export.
150
+ - Avoid incomplete prop objects; follow the documented prop types and required fields.
128
151
  ## GalleryEditor
129
152
 
130
153
  Der Editor verwaltet lokale und externe Medien, unterstützt Drag-and-Drop und kann die endgültige Medienladung über `shouldLoadImages` verzögern.
@@ -224,7 +247,18 @@ import { GalleryEditor } from '@chayns-components/gallery';
224
247
 
225
248
  ### Props
226
249
 
227
- No prop documentation available.
250
+ | name | type | required | description |
251
+ | --- | --- | --- | --- |
252
+ | `addFileIcon` | `string \| undefined` | no | Defines the icon that is shown in the add-file tile. |
253
+ | `allowDragAndDrop` | `boolean \| undefined` | no | Enables drag and drop file selection inside the editor grid. |
254
+ | `doubleFileDialogMessage` | `string \| undefined` | no | Defines the dialog message that is shown when a duplicate upload is detected. |
255
+ | `fileMinWidth` | `number \| undefined` | no | Defines the minimum width of one tile in the editor grid. |
256
+ | `files` | `FileItem[] \| undefined` | no | Provides already uploaded media items that should be merged into the editor state. |
257
+ | `maxFiles` | `number \| undefined` | no | Limits how many files can be managed by the editor. |
258
+ | `onAdd` | `((file: FileItem) => void) \| undefined` | no | Is called after a file has been uploaded successfully. |
259
+ | `onFileCountChange` | `((fileCount: number) => void) \| undefined` | no | Is called whenever the internal item count changes, including local pending uploads. |
260
+ | `onRemove` | `((file: FileItem) => void) \| undefined` | no | Is called after an uploaded file has been removed. |
261
+ | `shouldLoadImages` | `boolean \| undefined` | no | Controls whether the editor may load the final media assets immediately. |
228
262
 
229
263
  ### Types
230
264
 
@@ -238,6 +272,7 @@ No additional exported types documented.
238
272
  ### Anti Patterns
239
273
 
240
274
  - Avoid imports from internal paths such as `@chayns-components/gallery/src/...`; always use the public package export.
275
+ - Avoid incomplete prop objects; follow the documented prop types and required fields.
241
276
  ## GalleryViewer
242
277
 
243
278
  Der read-only Viewer rendert bekannte Medien im Grid- oder Square-Layout und unterstützt das verzögerte Laden finaler Medien über `shouldLoadImages`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/gallery",
3
- "version": "5.5.27",
3
+ "version": "5.5.28",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -69,7 +69,7 @@
69
69
  "typescript": "^5.9.3"
70
70
  },
71
71
  "dependencies": {
72
- "@chayns-components/core": "^5.5.27",
72
+ "@chayns-components/core": "^5.5.28",
73
73
  "react-compiler-runtime": "^1.0.0",
74
74
  "uuid": "^10.0.0"
75
75
  },
@@ -83,5 +83,5 @@
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  },
86
- "gitHead": "dce2980a995808daf6760274c70d36610c3d3a50"
86
+ "gitHead": "20b5354c0ee43c56e9919589f6b3bad7cf6b14bb"
87
87
  }