limbo-component 3.1.1 → 3.3.0

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 (32) hide show
  1. package/dist/limbo.cjs.js +1 -1
  2. package/dist/limbo.cjs.map +1 -1
  3. package/dist/limbo.css +1 -1
  4. package/dist/limbo.es.js +187 -139
  5. package/dist/limbo.es.map +1 -1
  6. package/dist/limbo.min.js +1 -1
  7. package/dist/limbo.min.js.map +1 -1
  8. package/dist/limbo.umd.js +1 -1
  9. package/dist/limbo.umd.js.map +1 -1
  10. package/dist/types/App.d.ts.map +1 -1
  11. package/dist/types/components/FolderSelector.d.ts.map +1 -1
  12. package/dist/types/components/Gallery.d.ts.map +1 -1
  13. package/dist/types/components/ImageCard.d.ts +2 -1
  14. package/dist/types/components/ImageCard.d.ts.map +1 -1
  15. package/dist/types/components/ImageViewer.d.ts.map +1 -1
  16. package/dist/types/components/previews/GenericFilePreview.d.ts.map +1 -1
  17. package/dist/types/components/viewers/AudioViewer.d.ts +18 -0
  18. package/dist/types/components/viewers/AudioViewer.d.ts.map +1 -0
  19. package/dist/types/components/viewers/DocumentViewer.d.ts +24 -0
  20. package/dist/types/components/viewers/DocumentViewer.d.ts.map +1 -0
  21. package/dist/types/components/viewers/PdfViewer.d.ts +18 -0
  22. package/dist/types/components/viewers/PdfViewer.d.ts.map +1 -0
  23. package/dist/types/components/viewers/VideoViewer.d.ts +18 -0
  24. package/dist/types/components/viewers/VideoViewer.d.ts.map +1 -0
  25. package/dist/types/components/viewers/ViewerShell.d.ts +33 -0
  26. package/dist/types/components/viewers/ViewerShell.d.ts.map +1 -0
  27. package/dist/types/components/viewers/index.d.ts +6 -0
  28. package/dist/types/components/viewers/index.d.ts.map +1 -0
  29. package/dist/types/hooks/useFolders.d.ts +8 -0
  30. package/dist/types/hooks/useFolders.d.ts.map +1 -1
  31. package/dist/types/services/responseAdapters.d.ts.map +1 -1
  32. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.jsx"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CA07BC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.jsx"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CA08BC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FolderSelector.d.ts","sourceRoot":"","sources":["../../../src/components/FolderSelector.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,sLAbG;IAA2B,KAAK,EAAxB,MAAM,GAAC,IAAI;IACK,QAAQ;IACT,WAAW,EAA1B,OAAO;IACO,WAAW,EAAzB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACS,QAAQ,EAAvB,OAAO;IACO,SAAS,EAAvB,MAAM;IACS,cAAc,EAA7B,OAAO;IACQ,eAAe,EAA9B,OAAO;IACS,YAAY,EAA5B,MAAM,EAAE;IACQ,YAAY,EAA5B,MAAM,EAAE;IACM,IAAI,EAAlB,MAAM;CAChB,2CAsMA"}
1
+ {"version":3,"file":"FolderSelector.d.ts","sourceRoot":"","sources":["../../../src/components/FolderSelector.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,sLAbG;IAA2B,KAAK,EAAxB,MAAM,GAAC,IAAI;IACK,QAAQ;IACT,WAAW,EAA1B,OAAO;IACO,WAAW,EAAzB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACS,QAAQ,EAAvB,OAAO;IACO,SAAS,EAAvB,MAAM;IACS,cAAc,EAA7B,OAAO;IACQ,eAAe,EAA9B,OAAO;IACS,YAAY,EAA5B,MAAM,EAAE;IACQ,YAAY,EAA5B,MAAM,EAAE;IACM,IAAI,EAAlB,MAAM;CAChB,2CA2MA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Gallery.d.ts","sourceRoot":"","sources":["../../../src/components/Gallery.jsx"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAoaC"}
1
+ {"version":3,"file":"Gallery.d.ts","sourceRoot":"","sources":["../../../src/components/Gallery.jsx"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAwaC"}
@@ -1,4 +1,4 @@
1
- export default function ImageCard({ image, onDelete, onCrop, onSelect, onFolderChange, thumbnailSize, isDeleting, showFolderInfo, allowMoveFolder, allowedFolderSlugs, excludedFolderSlugs, allowedActions, }: {
1
+ export default function ImageCard({ image, onDelete, onCrop, onSelect, onFolderChange, thumbnailSize, isDeleting, showFolderInfo, allowMoveFolder, allowedFolderSlugs, excludedFolderSlugs, allowCreateFolder, allowedActions, }: {
2
2
  image: any;
3
3
  onDelete: any;
4
4
  onCrop: any;
@@ -10,6 +10,7 @@ export default function ImageCard({ image, onDelete, onCrop, onSelect, onFolderC
10
10
  allowMoveFolder?: boolean;
11
11
  allowedFolderSlugs?: any;
12
12
  excludedFolderSlugs?: any;
13
+ allowCreateFolder?: boolean;
13
14
  allowedActions?: {
14
15
  select: boolean;
15
16
  download: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ImageCard.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCard.jsx"],"names":[],"mappings":"AAsEA;;;;;;;;;;;;;;;;;;;;4CA0wBC"}
1
+ {"version":3,"file":"ImageCard.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCard.jsx"],"names":[],"mappings":"AAwEA;;;;;;;;;;;;;;;;;;;;;4CAq3BC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ImageViewer.d.ts","sourceRoot":"","sources":["../../../src/components/ImageViewer.jsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qFAPG;IAAsB,GAAG,EAAjB,MAAM;IACQ,GAAG,EAAjB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,QAAQ,EAAtB,MAAM;IACU,OAAO;IACR,MAAM,EAArB,OAAO;CACjB,2CAidA"}
1
+ {"version":3,"file":"ImageViewer.d.ts","sourceRoot":"","sources":["../../../src/components/ImageViewer.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qFAPG;IAAsB,GAAG,EAAjB,MAAM;IACQ,GAAG,EAAjB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,QAAQ,EAAtB,MAAM;IACU,OAAO;IACR,MAAM,EAArB,OAAO;CACjB,2CAkZA"}
@@ -1 +1 @@
1
- {"version":3,"file":"GenericFilePreview.d.ts","sourceRoot":"","sources":["../../../../src/components/previews/GenericFilePreview.jsx"],"names":[],"mappings":"AAuDA,mEAuBC;AAGD,mDAMC;AAED;;;;4CA+BC"}
1
+ {"version":3,"file":"GenericFilePreview.d.ts","sourceRoot":"","sources":["../../../../src/components/previews/GenericFilePreview.jsx"],"names":[],"mappings":"AAuDA,mEAuBC;AAGD,mDAMC;AAED;;;;4CAgCC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * AudioViewer - Fullscreen audio player in dark overlay
3
+ *
4
+ * @param {Object} props
5
+ * @param {boolean} props.isOpen - Whether the viewer is visible
6
+ * @param {string} props.src - Audio URL
7
+ * @param {string} props.title - Audio filename
8
+ * @param {string} props.subtitle - File info (size, type)
9
+ * @param {Function} props.onClose - Close callback
10
+ */
11
+ export default function AudioViewer({ isOpen, src, title, subtitle, onClose, }: {
12
+ isOpen: boolean;
13
+ src: string;
14
+ title: string;
15
+ subtitle: string;
16
+ onClose: Function;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=AudioViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioViewer.d.ts","sourceRoot":"","sources":["../../../../src/components/viewers/AudioViewer.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,gFANG;IAAuB,MAAM,EAArB,OAAO;IACO,GAAG,EAAjB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,QAAQ,EAAtB,MAAM;IACU,OAAO;CACjC,2CA+LA"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * DocumentViewer - Info card for non-renderable files (DOC, XLSX, PPT, TXT, CSV, etc.)
3
+ *
4
+ * Shows file info + download button since these files can't be previewed inline.
5
+ *
6
+ * @param {Object} props
7
+ * @param {boolean} props.isOpen - Whether the viewer is visible
8
+ * @param {string} props.src - Download URL
9
+ * @param {string} props.title - Filename
10
+ * @param {string} props.subtitle - File info
11
+ * @param {string} props.mimeType - MIME type
12
+ * @param {number} props.fileSize - File size in bytes
13
+ * @param {Function} props.onClose - Close callback
14
+ */
15
+ export default function DocumentViewer({ isOpen, src, title, subtitle, mimeType, fileSize, onClose, }: {
16
+ isOpen: boolean;
17
+ src: string;
18
+ title: string;
19
+ subtitle: string;
20
+ mimeType: string;
21
+ fileSize: number;
22
+ onClose: Function;
23
+ }): import("react/jsx-runtime").JSX.Element;
24
+ //# sourceMappingURL=DocumentViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentViewer.d.ts","sourceRoot":"","sources":["../../../../src/components/viewers/DocumentViewer.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,uGARG;IAAuB,MAAM,EAArB,OAAO;IACO,GAAG,EAAjB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,QAAQ,EAAtB,MAAM;IACQ,QAAQ,EAAtB,MAAM;IACQ,QAAQ,EAAtB,MAAM;IACU,OAAO;CACjC,2CAoGA"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * PdfViewer - PDF viewer using native browser iframe
3
+ *
4
+ * @param {Object} props
5
+ * @param {boolean} props.isOpen - Whether the viewer is visible
6
+ * @param {string} props.src - PDF URL
7
+ * @param {string} props.title - PDF filename
8
+ * @param {string} props.subtitle - File info (size, type)
9
+ * @param {Function} props.onClose - Close callback
10
+ */
11
+ export default function PdfViewer({ isOpen, src, title, subtitle, onClose, }: {
12
+ isOpen: boolean;
13
+ src: string;
14
+ title: string;
15
+ subtitle: string;
16
+ onClose: Function;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=PdfViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PdfViewer.d.ts","sourceRoot":"","sources":["../../../../src/components/viewers/PdfViewer.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,8EANG;IAAuB,MAAM,EAArB,OAAO;IACO,GAAG,EAAjB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,QAAQ,EAAtB,MAAM;IACU,OAAO;CACjC,2CAoHA"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * VideoViewer - Fullscreen video player in dark overlay
3
+ *
4
+ * @param {Object} props
5
+ * @param {boolean} props.isOpen - Whether the viewer is visible
6
+ * @param {string} props.src - Video URL
7
+ * @param {string} props.title - Video filename
8
+ * @param {string} props.subtitle - File info (size, type)
9
+ * @param {Function} props.onClose - Close callback
10
+ */
11
+ export default function VideoViewer({ isOpen, src, title, subtitle, onClose, }: {
12
+ isOpen: boolean;
13
+ src: string;
14
+ title: string;
15
+ subtitle: string;
16
+ onClose: Function;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=VideoViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoViewer.d.ts","sourceRoot":"","sources":["../../../../src/components/viewers/VideoViewer.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,gFANG;IAAuB,MAAM,EAArB,OAAO;IACO,GAAG,EAAjB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACQ,QAAQ,EAAtB,MAAM;IACU,OAAO;CACjC,2CA8GA"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * ViewerShell - Shared dark overlay shell for all file type viewers
3
+ *
4
+ * Provides:
5
+ * - Fixed dark overlay (bg-black/95, z-10000)
6
+ * - Header: title/subtitle + optional headerActions slot + close button
7
+ * - Content area: children centered in flex-1
8
+ * - Footer: keyboard hints
9
+ * - ESC key + click-backdrop to close
10
+ * - Body scroll lock
11
+ * - role="dialog", aria-modal="true"
12
+ *
13
+ * @param {Object} props
14
+ * @param {boolean} props.isOpen - Whether the viewer is visible
15
+ * @param {Function} props.onClose - Callback to close the viewer
16
+ * @param {string} props.title - Title text (optional)
17
+ * @param {string} props.subtitle - Subtitle text (optional)
18
+ * @param {React.ReactNode} props.headerActions - Controls to render in header (optional)
19
+ * @param {string} props.footerHints - Footer instruction text (optional)
20
+ * @param {string} props.ariaLabel - Dialog aria-label (optional)
21
+ * @param {React.ReactNode} props.children - Main content
22
+ */
23
+ export default function ViewerShell({ isOpen, onClose, title, subtitle, headerActions, footerHints, ariaLabel, children, }: {
24
+ isOpen: boolean;
25
+ onClose: Function;
26
+ title: string;
27
+ subtitle: string;
28
+ headerActions: React.ReactNode;
29
+ footerHints: string;
30
+ ariaLabel: string;
31
+ children: React.ReactNode;
32
+ }): import("react/jsx-runtime").JSX.Element;
33
+ //# sourceMappingURL=ViewerShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewerShell.d.ts","sourceRoot":"","sources":["../../../../src/components/viewers/ViewerShell.jsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,4HATG;IAAuB,MAAM,EAArB,OAAO;IACS,OAAO;IACT,KAAK,EAAnB,MAAM;IACQ,QAAQ,EAAtB,MAAM;IACiB,aAAa,EAApC,KAAK,CAAC,SAAS;IACD,WAAW,EAAzB,MAAM;IACQ,SAAS,EAAvB,MAAM;IACiB,QAAQ,EAA/B,KAAK,CAAC,SAAS;CACzB,2CAyHA"}
@@ -0,0 +1,6 @@
1
+ export { default as ViewerShell } from "./ViewerShell";
2
+ export { default as VideoViewer } from "./VideoViewer";
3
+ export { default as AudioViewer } from "./AudioViewer";
4
+ export { default as PdfViewer } from "./PdfViewer";
5
+ export { default as DocumentViewer } from "./DocumentViewer";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/viewers/index.js"],"names":[],"mappings":""}
@@ -1,6 +1,14 @@
1
+ /**
2
+ * Invalidate the folders cache and notify all active hooks to refetch.
3
+ * Call this after any operation that changes folders (create, move, delete).
4
+ */
5
+ export function invalidateFoldersCache(): void;
1
6
  /**
2
7
  * Hook para gestionar carpetas del portal
3
8
  *
9
+ * Uses a shared module-level cache so multiple FolderSelector instances
10
+ * don't each trigger their own API call.
11
+ *
4
12
  * @param {Object} options - Opciones de configuración
5
13
  * @param {boolean} options.autoFetch - Cargar carpetas automáticamente al montar (default: true)
6
14
  * @param {string} options.visibility - Filtrar por visibilidad (public, internal, private)
@@ -1 +1 @@
1
- {"version":3,"file":"useFolders.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFolders.js"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,6CANG;IAAyB,SAAS,EAA1B,OAAO;IACS,UAAU,EAA1B,MAAM;IACY,YAAY,EAA9B,MAAM,EAAE;IACU,YAAY,EAA9B,MAAM,EAAE;CAChB,OA0IF"}
1
+ {"version":3,"file":"useFolders.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFolders.js"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,+CAMC;AAgCD;;;;;;;;;;;;GAYG;AACH,6CANG;IAAyB,SAAS,EAA1B,OAAO;IACS,UAAU,EAA1B,MAAM;IACY,YAAY,EAA9B,MAAM,EAAE;IACU,YAAY,EAA9B,MAAM,EAAE;CAChB,OAiKF"}
@@ -1 +1 @@
1
- {"version":3,"file":"responseAdapters.d.ts","sourceRoot":"","sources":["../../../src/services/responseAdapters.js"],"names":[],"mappings":"AA8DA;;;;GAIG;AACH,uDAsCC;AAED;;;;GAIG;AACH,4DAgDC;AAED;;;;GAIG;AACH,8DAiCC;AAED;;;;GAIG;AACH,8DAkBC;AAED;;;;GAIG;AACH,wDAyCC;AAED;;;;GAIG;AACH,mEAuEC;AAED;;;;GAIG;AACH,6DAqBC;AAED;;;;GAIG;AACH,wDAoBC;AAED;;;;GAIG;AACH,wCAHW,KAAK,GACH,KAAK,CAkBjB"}
1
+ {"version":3,"file":"responseAdapters.d.ts","sourceRoot":"","sources":["../../../src/services/responseAdapters.js"],"names":[],"mappings":"AA8DA;;;;GAIG;AACH,uDA2CC;AAED;;;;GAIG;AACH,4DAqDC;AAED;;;;GAIG;AACH,8DAiCC;AAED;;;;GAIG;AACH,8DAkBC;AAED;;;;GAIG;AACH,wDA8CC;AAED;;;;GAIG;AACH,mEAuEC;AAED;;;;GAIG;AACH,6DAqBC;AAED;;;;GAIG;AACH,wDAoBC;AAED;;;;GAIG;AACH,wCAHW,KAAK,GACH,KAAK,CAkBjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "limbo-component",
3
- "version": "3.1.1",
3
+ "version": "3.3.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Limbo - Highly configurable React image manager component for web portals",