@putkoff/abstract-securefiles 0.0.32 → 0.0.34

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 (181) hide show
  1. package/css.d.ts +0 -0
  2. package/dist/App/SecureFiles.d.ts +4 -0
  3. package/dist/App/index.d.ts +1 -0
  4. package/dist/FileHandlers/FileRow/imports.d.ts +2 -0
  5. package/dist/FileHandlers/FileRow/index.d.ts +1 -0
  6. package/dist/FileHandlers/FileRow/src/index.d.ts +1 -0
  7. package/dist/FileHandlers/FileRow/src/row_utils.d.ts +2 -0
  8. package/dist/FileHandlers/FileTable/imports.d.ts +4 -0
  9. package/dist/FileHandlers/FileTable/index.d.ts +1 -0
  10. package/dist/FileHandlers/FileTable/src/index.d.ts +1 -0
  11. package/dist/FileHandlers/FileTable/src/table_utils.d.ts +2 -0
  12. package/dist/FileHandlers/ShareModal/imports.d.ts +2 -0
  13. package/dist/FileHandlers/ShareModal/index.d.ts +1 -0
  14. package/dist/FileHandlers/ShareModal/src/index.d.ts +1 -0
  15. package/dist/FileHandlers/ShareModal/src/share_utils.d.ts +2 -0
  16. package/dist/FileHandlers/Upload/imports.d.ts +2 -0
  17. package/dist/FileHandlers/Upload/index.d.ts +1 -0
  18. package/dist/FileHandlers/Upload/src/index.d.ts +2 -0
  19. package/dist/FileHandlers/Upload/src/upload_utils.d.ts +2 -0
  20. package/dist/FileHandlers/imports.d.ts +4 -0
  21. package/dist/FileHandlers/index.d.ts +4 -0
  22. package/dist/UI/index.d.ts +28 -0
  23. package/dist/file_utils/imports.d.ts +2 -0
  24. package/dist/file_utils/index.d.ts +1 -0
  25. package/dist/file_utils/src/cookieFetch.d.ts +22 -0
  26. package/dist/file_utils/src/delete_utils/imports.d.ts +1 -0
  27. package/dist/file_utils/src/delete_utils/index.d.ts +1 -0
  28. package/dist/file_utils/src/delete_utils/src/delete_row.d.ts +2 -0
  29. package/dist/file_utils/src/delete_utils/src/delete_select.d.ts +4 -0
  30. package/dist/file_utils/src/delete_utils/src/delete_selected.d.ts +2 -0
  31. package/dist/file_utils/src/delete_utils/src/index.d.ts +3 -0
  32. package/dist/file_utils/src/download_utils/imports.d.ts +2 -0
  33. package/dist/file_utils/src/download_utils/index.d.ts +1 -0
  34. package/dist/file_utils/src/download_utils/src/direct_download.d.ts +3 -0
  35. package/dist/file_utils/src/download_utils/src/download_file.d.ts +6 -0
  36. package/dist/file_utils/src/download_utils/src/download_select.d.ts +2 -0
  37. package/dist/file_utils/src/download_utils/src/index.d.ts +5 -0
  38. package/dist/file_utils/src/download_utils/src/target_downloads.d.ts +4 -0
  39. package/dist/file_utils/src/download_utils/src/trigger_download.d.ts +2 -0
  40. package/dist/file_utils/src/imports.d.ts +2 -0
  41. package/dist/file_utils/src/index.d.ts +6 -0
  42. package/dist/file_utils/src/list_utils/imports.d.ts +2 -0
  43. package/dist/file_utils/src/list_utils/index.d.ts +1 -0
  44. package/dist/file_utils/src/list_utils/src/index.d.ts +1 -0
  45. package/dist/file_utils/src/list_utils/src/list_utils.d.ts +2 -0
  46. package/dist/file_utils/src/select_utils/index.d.ts +1 -0
  47. package/dist/file_utils/src/select_utils/src/index.d.ts +3 -0
  48. package/dist/file_utils/src/select_utils/src/init_select_all.d.ts +2 -0
  49. package/dist/file_utils/src/select_utils/src/sync_header_checkbox.d.ts +5 -0
  50. package/dist/file_utils/src/select_utils/src/toggle_checkboxes.d.ts +2 -0
  51. package/dist/file_utils/src/share_utils/imports.d.ts +2 -0
  52. package/dist/file_utils/src/share_utils/index.d.ts +1 -0
  53. package/dist/file_utils/src/share_utils/src/index.d.ts +1 -0
  54. package/dist/file_utils/src/share_utils/src/share_utils.d.ts +7 -0
  55. package/{package.tmp.json → dist/file_utils/src/upload_utils/imports.d.ts} +0 -0
  56. package/dist/file_utils/src/upload_utils/index.d.ts +1 -0
  57. package/dist/file_utils/src/upload_utils/src/index.d.ts +3 -0
  58. package/dist/file_utils/src/upload_utils/src/patch_file_settings.d.ts +2 -0
  59. package/dist/file_utils/src/upload_utils/src/upload_file.d.ts +2 -0
  60. package/dist/file_utils/src/upload_utils/src/upload_files.d.ts +5 -0
  61. package/dist/hooks/imports.d.ts +3 -0
  62. package/dist/hooks/index.d.ts +1 -0
  63. package/dist/hooks/useFiles/imports.d.ts +2 -0
  64. package/dist/hooks/useFiles/index.d.ts +1 -0
  65. package/dist/hooks/useFiles/src/deleteFile.d.ts +3 -0
  66. package/dist/hooks/useFiles/src/index.d.ts +6 -0
  67. package/dist/hooks/useFiles/src/load.d.ts +3 -0
  68. package/dist/hooks/useFiles/src/patchShareSettings.d.ts +3 -0
  69. package/dist/hooks/useFiles/src/toggleShare.d.ts +3 -0
  70. package/dist/hooks/useFiles/src/useFiles.d.ts +13 -0
  71. package/dist/hooks/useFiles/src/useSaveShareSettings.d.ts +7 -0
  72. package/dist/imports.d.ts +7 -0
  73. package/dist/index.cjs +992 -8
  74. package/dist/index.cjs.map +1 -1
  75. package/dist/index.css +1 -1
  76. package/dist/index.d.ts +8 -1
  77. package/dist/index.js +945 -10
  78. package/dist/index.js.map +1 -1
  79. package/dist/styles/index.d.ts +1 -0
  80. package/dist/types/index.d.ts +1 -0
  81. package/dist/types/src/index.d.ts +1 -0
  82. package/dist/types/src/types.d.ts +75 -0
  83. package/index.ts +0 -0
  84. package/package.json +4 -4
  85. package/postcss.config.cjs +0 -0
  86. package/rollup.config.js +0 -0
  87. package/rollup.config.mjs +0 -0
  88. package/src/App/SecureFiles.tsx +45 -0
  89. package/src/App/index.ts +1 -0
  90. package/src/FileHandlers/FileRow/imports.ts +2 -0
  91. package/src/FileHandlers/FileRow/index.ts +1 -0
  92. package/src/FileHandlers/FileRow/src/index.ts +1 -0
  93. package/src/FileHandlers/FileRow/src/row_utils.tsx +143 -0
  94. package/src/FileHandlers/FileTable/imports.ts +16 -0
  95. package/src/FileHandlers/FileTable/index.ts +1 -0
  96. package/src/FileHandlers/FileTable/src/index.ts +1 -0
  97. package/src/FileHandlers/FileTable/src/table_utils.tsx +251 -0
  98. package/src/FileHandlers/ShareModal/imports.ts +2 -0
  99. package/src/FileHandlers/ShareModal/index.ts +1 -0
  100. package/src/FileHandlers/ShareModal/src/index.ts +1 -0
  101. package/src/FileHandlers/ShareModal/src/share_utils.tsx +155 -0
  102. package/src/FileHandlers/Upload/imports.ts +3 -0
  103. package/src/FileHandlers/Upload/index.ts +1 -0
  104. package/src/FileHandlers/Upload/src/index.ts +2 -0
  105. package/src/FileHandlers/Upload/src/upload_utils.tsx +267 -0
  106. package/src/FileHandlers/imports.ts +18 -0
  107. package/src/FileHandlers/index.ts +4 -0
  108. package/src/UI/index.tsx +122 -0
  109. package/src/custom.d.ts +7 -0
  110. package/src/file_utils/imports.ts +2 -0
  111. package/src/file_utils/index.ts +1 -0
  112. package/src/file_utils/src/cookieFetch.ts +78 -0
  113. package/src/file_utils/src/delete_utils/imports.ts +1 -0
  114. package/src/file_utils/src/delete_utils/index.ts +1 -0
  115. package/src/file_utils/src/delete_utils/src/delete_row.ts +11 -0
  116. package/src/file_utils/src/delete_utils/src/delete_select.ts +10 -0
  117. package/src/file_utils/src/delete_utils/src/delete_selected.ts +15 -0
  118. package/src/file_utils/src/delete_utils/src/index.ts +3 -0
  119. package/src/file_utils/src/download_utils/imports.ts +3 -0
  120. package/src/file_utils/src/download_utils/index.ts +1 -0
  121. package/src/file_utils/src/download_utils/src/direct_download.ts +22 -0
  122. package/src/file_utils/src/download_utils/src/download_file.ts +25 -0
  123. package/src/file_utils/src/download_utils/src/download_select.ts +20 -0
  124. package/src/file_utils/src/download_utils/src/index.ts +5 -0
  125. package/src/file_utils/src/download_utils/src/target_downloads.ts +21 -0
  126. package/src/file_utils/src/download_utils/src/trigger_download.ts +14 -0
  127. package/src/file_utils/src/imports.ts +3 -0
  128. package/src/file_utils/src/index.ts +6 -0
  129. package/src/file_utils/src/list_utils/imports.ts +2 -0
  130. package/src/file_utils/src/list_utils/index.ts +1 -0
  131. package/src/file_utils/src/list_utils/src/index.ts +1 -0
  132. package/src/file_utils/src/list_utils/src/list_utils.ts +28 -0
  133. package/src/file_utils/src/select_utils/index.ts +1 -0
  134. package/src/file_utils/src/select_utils/src/index.ts +3 -0
  135. package/src/file_utils/src/select_utils/src/init_select_all.ts +37 -0
  136. package/src/file_utils/src/select_utils/src/sync_header_checkbox.ts +18 -0
  137. package/src/file_utils/src/select_utils/src/toggle_checkboxes.ts +11 -0
  138. package/src/file_utils/src/share_utils/imports.ts +2 -0
  139. package/src/file_utils/src/share_utils/index.ts +1 -0
  140. package/src/file_utils/src/share_utils/src/index.ts +1 -0
  141. package/src/file_utils/src/share_utils/src/share_utils.ts +20 -0
  142. package/src/file_utils/src/upload_utils/imports.ts +1 -0
  143. package/src/file_utils/src/upload_utils/index.ts +1 -0
  144. package/src/file_utils/src/upload_utils/src/index.ts +3 -0
  145. package/src/file_utils/src/upload_utils/src/patch_file_settings.ts +20 -0
  146. package/src/file_utils/src/upload_utils/src/upload_file.ts +27 -0
  147. package/src/file_utils/src/upload_utils/src/upload_files.ts +19 -0
  148. package/src/global.d.ts +1 -0
  149. package/src/hooks/imports.ts +3 -0
  150. package/src/hooks/index.ts +1 -0
  151. package/src/hooks/useFiles/imports.ts +3 -0
  152. package/src/hooks/useFiles/index.ts +1 -0
  153. package/src/hooks/useFiles/src/deleteFile.ts +23 -0
  154. package/src/hooks/useFiles/src/index.ts +6 -0
  155. package/src/hooks/useFiles/src/load.ts +39 -0
  156. package/src/hooks/useFiles/src/logs/clipit_logs.log +0 -0
  157. package/src/hooks/useFiles/src/logs/routes_bp.log +0 -0
  158. package/src/hooks/useFiles/src/patchShareSettings.ts +27 -0
  159. package/src/hooks/useFiles/src/toggleShare.ts +28 -0
  160. package/src/hooks/useFiles/src/useFiles.ts +35 -0
  161. package/src/hooks/useFiles/src/useSaveShareSettings.ts +31 -0
  162. package/src/imports.ts +19 -0
  163. package/src/index.ts +8 -1
  164. package/src/styles/{App.css → SecureFiles/App.css} +0 -0
  165. package/src/styles/{index.css → SecureFiles/index.css} +0 -0
  166. package/src/styles/SecureFiles/logs/clipit_logs.log +0 -0
  167. package/src/styles/SecureFiles/logs/routes_bp.log +0 -0
  168. package/src/styles/{tailwind.css → SecureFiles/tailwind.css} +0 -0
  169. package/src/styles/{window-manager.css → SecureFiles/window-manager.css} +0 -0
  170. package/src/styles/SecureFilesStyles.module.css +287 -0
  171. package/src/styles/index.ts +1 -0
  172. package/src/types/index.ts +1 -0
  173. package/src/types/src/index.ts +1 -0
  174. package/src/types/src/types.ts +88 -0
  175. package/tailwind.config.cjs +0 -0
  176. package/testit.mjs +0 -0
  177. package/testit.ts +0 -0
  178. package/tsconfig.json +0 -0
  179. package/.github/workflows/release.yml +0 -17
  180. package/dist/secure_files.d.ts +0 -4
  181. package/src/secure_files.tsx +0 -41
package/css.d.ts CHANGED
File without changes
@@ -0,0 +1,4 @@
1
+ import './../styles/SecureFiles/index.css';
2
+ import React from 'react';
3
+ declare const SecureFiles: React.FC;
4
+ export default SecureFiles;
@@ -0,0 +1 @@
1
+ export { default as SecureFiles } from './SecureFiles';
@@ -0,0 +1,2 @@
1
+ export type { FileRowProps } from './../imports';
2
+ export { useState, Button, currentUsername } from './../imports';
@@ -0,0 +1 @@
1
+ export { FileRow } from './src';
@@ -0,0 +1 @@
1
+ export { default as FileRow } from './row_utils';
@@ -0,0 +1,2 @@
1
+ import type { FileRowProps } from './../imports';
2
+ export default function FileRow({ file, onDownload, onSettings, onToggleShare, onDelete, }: FileRowProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { FileRow } from './../FileRow';
2
+ export { ShareModal } from './../ShareModal';
3
+ export type { FileItem, FileTableProps } from './../imports';
4
+ export { useState, useFiles, downloadFile, Spinner, fetchSharePatch, Input, currentUsername, Button } from './../imports';
@@ -0,0 +1 @@
1
+ export { FileTable } from './src';
@@ -0,0 +1 @@
1
+ export { default as FileTable } from './table_utils';
@@ -0,0 +1,2 @@
1
+ import type { FileTableProps } from './../imports';
2
+ export default function FileTable({ files, loading, error, onToggleShare, onPatchShare, onDelete }: FileTableProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Button, Checkbox, Input, ClipboardIcon, createPortal, useEffect, useRef, useState } from './../imports';
2
+ export type { ShareModalProps } from './../imports';
@@ -0,0 +1 @@
1
+ export { ShareModal } from './src';
@@ -0,0 +1 @@
1
+ export { default as ShareModal } from './share_utils';
@@ -0,0 +1,2 @@
1
+ import type { ShareModalProps } from './../../imports';
2
+ export default function ShareModal({ file, onClose, onSave }: ShareModalProps): import("react").ReactPortal | null;
@@ -0,0 +1,2 @@
1
+ export { Input, useFiles, Button, uploadFiles, useState, useRef, useCallback, CloudArrowUpIcon, currentUsername } from './../imports';
2
+ export type { UploadProps, FileItem, QueuedFile } from './../imports';
@@ -0,0 +1 @@
1
+ export { Upload } from './src';
@@ -0,0 +1,2 @@
1
+ export { default as Upload } from './upload_utils';
2
+ export type { QueuedFile, UploadProps } from './../../../types';
@@ -0,0 +1,2 @@
1
+ import type { UploadProps } from './../imports';
2
+ export default function Upload({ onUploaded }: UploadProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type { QueuedFile, FileItem, FileTableProps, UploadProps, ShareModalProps, FileRowProps } from './../imports';
2
+ export { CloudArrowUpIcon, currentUsername, Button, Checkbox, Input, Spinner, useEffect, useRef, useState, useCallback, ClipboardIcon, createPortal, fetchSharePatch, } from './../imports';
3
+ export { useFiles } from './../hooks';
4
+ export { downloadFile, uploadFiles } from './../file_utils';
@@ -0,0 +1,4 @@
1
+ export { FileRow } from './FileRow';
2
+ export { FileTable } from './FileTable';
3
+ export { ShareModal } from './ShareModal';
4
+ export { Upload } from './Upload';
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ export type String = string | undefined | null;
3
+ export type Astring = any[] | string | undefined | null;
4
+ export type Trailing = React.ReactNode;
5
+ export type ImportElem = {
6
+ reaxlEle?: React.InputHTMLAttributes<HTMLInputElement>;
7
+ label?: String;
8
+ checked?: boolean;
9
+ type?: string;
10
+ onChange?: any;
11
+ value?: any;
12
+ trailing?: Trailing;
13
+ className?: String;
14
+ classNames?: Astring;
15
+ disabled?: any;
16
+ placeholder?: any;
17
+ error?: string;
18
+ min?: any;
19
+ readOnly?: boolean;
20
+ };
21
+ export declare function Button({ children, color, variant, className, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
22
+ color?: 'gray' | 'green' | 'blue';
23
+ variant?: 'default' | 'icon' | 'primary' | 'secondary';
24
+ className?: string;
25
+ }): import("react/jsx-runtime").JSX.Element;
26
+ export declare function Checkbox({ label, className, classNames, ...rest }: ImportElem): import("react/jsx-runtime").JSX.Element;
27
+ export declare function Input({ label, trailing, className, classNames, ...rest }: ImportElem): import("react/jsx-runtime").JSX.Element;
28
+ export declare function Spinner(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { fetchSharePatch, requireToken, alertit, fetchIt, stripPrefixes, make_path, secureFetchIt } from "./../imports";
2
+ export type { FileItem, ApiRow } from "./../types";
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Cookie-authenticated API helpers.
3
+ * All requests include credentials: 'include' so the browser sends the
4
+ * session cookie (auth_session) automatically. No JWT tokens are used.
5
+ */
6
+ /**
7
+ * Generic JSON fetch with session-cookie auth.
8
+ * Throws Error("UNAUTHENTICATED") on 401 so callers can redirect to login.
9
+ */
10
+ export declare function cookieFetch<T = unknown>(path: string, body?: unknown, method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"): Promise<T>;
11
+ /**
12
+ * Check whether the current session is valid.
13
+ * Calls /userInfo which requires authentication; returns true if the user is
14
+ * logged in, false otherwise (no exception thrown).
15
+ */
16
+ export declare function checkAuth(): Promise<boolean>;
17
+ /**
18
+ * Upload a single file using multipart/form-data with session-cookie auth.
19
+ * @param file The File object to upload.
20
+ * @param relPath Optional relative path within the user's directory.
21
+ */
22
+ export declare function cookieUpload(file: File, relPath?: string): Promise<unknown>;
@@ -0,0 +1 @@
1
+ export { secureFetchIt, requireToken, alertit } from "./../imports";
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,2 @@
1
+ /** Given a checkbox inside a table-row → download that row’s file. */
2
+ export declare function removeRow(cb: HTMLInputElement): Promise<void>;
@@ -0,0 +1,4 @@
1
+ export declare function removeFile(item: {
2
+ id?: number | string;
3
+ filename?: string;
4
+ }): Promise<void>;
@@ -0,0 +1,2 @@
1
+ /** Bulk download: pass a NodeList or array of checkboxes. */
2
+ export declare function removeSelected(checkboxes: Iterable<HTMLInputElement>): Promise<void>;
@@ -0,0 +1,3 @@
1
+ export * from './delete_select';
2
+ export * from './delete_selected';
3
+ export * from './delete_row';
@@ -0,0 +1,2 @@
1
+ export { secureFetchIt, requireToken } from './../imports';
2
+ export type { FileItem } from './../imports';
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,3 @@
1
+ import { FileItem } from './../imports';
2
+ /** Non-React “direct download” used by some old links (kept for parity) */
3
+ export declare function directDownload(item: FileItem): Promise<void>;
@@ -0,0 +1,6 @@
1
+ import type { FileItem } from './../imports';
2
+ /**
3
+ * Download a file using the current session cookie.
4
+ * No JWT / localStorage token required.
5
+ */
6
+ export declare function downloadFile(item: FileItem): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import { FileItem } from './../imports';
2
+ export declare function downloadSelect(item: FileItem): Promise<void>;
@@ -0,0 +1,5 @@
1
+ export * from './direct_download';
2
+ export * from './download_file';
3
+ export * from './download_select';
4
+ export * from './target_downloads';
5
+ export * from './trigger_download';
@@ -0,0 +1,4 @@
1
+ /** Given a checkbox inside a table-row → download that row’s file. */
2
+ export declare function downloadRow(cb: HTMLInputElement): Promise<void>;
3
+ /** Bulk download: pass a NodeList or array of checkboxes. */
4
+ export declare function downloadSelected(checkboxes: Iterable<HTMLInputElement>): Promise<void>;
@@ -0,0 +1,2 @@
1
+ /** Helper function to trigger file download */
2
+ export declare function triggerDownload(blob: Blob, filename: string): void;
@@ -0,0 +1,2 @@
1
+ export type { FileItem, ApiRow } from './../../types/src/types';
2
+ export { alertit, requireToken, secureFetchIt, fetchSharePatch } from './../imports';
@@ -0,0 +1,6 @@
1
+ export * from './download_utils';
2
+ export * from './select_utils';
3
+ export * from './upload_utils';
4
+ export * from './delete_utils';
5
+ export * from './list_utils';
6
+ export * from './share_utils';
@@ -0,0 +1,2 @@
1
+ export { secureFetchIt, fetchSharePatch } from './../imports';
2
+ export type { FileItem, ApiRow } from './../imports';
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1 @@
1
+ export * from './list_utils';
@@ -0,0 +1,2 @@
1
+ import type { FileItem } from './../imports';
2
+ export declare function listFiles(setFiles?: ((rows: FileItem[]) => void) | null): Promise<FileItem[]>;
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,3 @@
1
+ export * from './init_select_all';
2
+ export * from './sync_header_checkbox';
3
+ export * from './toggle_checkboxes';
@@ -0,0 +1,2 @@
1
+ /** Wire up header + row checkboxes once the table is in the DOM. */
2
+ export declare function initSelectAll(): void;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Classic “select all rows” logic (still handy in non-React views
3
+ * such as the admin dashboard).
4
+ */
5
+ export declare function syncHeaderCheckbox(): void;
@@ -0,0 +1,2 @@
1
+ /** Utility for other screens: toggle a list of checkboxes on/off. */
2
+ export declare function toggleCheckboxes(cbs: HTMLInputElement[]): void;
@@ -0,0 +1,2 @@
1
+ export type { FileItem } from './../../../types/src/types';
2
+ export { fetchSharePatch } from './../imports';
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1 @@
1
+ export * from './share_utils';
@@ -0,0 +1,7 @@
1
+ import type { FileItem } from './../imports';
2
+ /**
3
+ * Toggle sharing on a file.
4
+ * Sends the updated settings to /api/secure-files/files/share.
5
+ * Does NOT update local state – the caller is responsible for that.
6
+ */
7
+ export declare function toggleShare(file: FileItem): Promise<void>;
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,3 @@
1
+ export * from './patch_file_settings';
2
+ export * from './upload_file';
3
+ export * from './upload_files';
@@ -0,0 +1,2 @@
1
+ /** Generic PATCH helper for file-level admin settings. */
2
+ export declare function patchFileSetting(fileId: string, field: string, value: unknown): Promise<Record<string, unknown>>;
@@ -0,0 +1,2 @@
1
+ /** File-upload helper (used by non-React fallback pages). */
2
+ export declare function uploadFile(file: any, subdir: any): Promise<any>;
@@ -0,0 +1,5 @@
1
+ interface UploadResponse {
2
+ filepath: string;
3
+ }
4
+ export declare function uploadFiles(file: File, subdir?: string): Promise<UploadResponse>;
5
+ export {};
@@ -0,0 +1,3 @@
1
+ export type { FileItem, ApiRow } from './../imports';
2
+ export { secureFetchIt, fetchSharePatch, alertit, useCallback, isLoggedIn } from './../imports';
3
+ export { toggleShare, removeFile, listFiles, downloadFile } from './../file_utils';
@@ -0,0 +1 @@
1
+ export * from './useFiles';
@@ -0,0 +1,2 @@
1
+ export type { FileItem, ApiRow } from './../imports';
2
+ export { secureFetchIt, fetchSharePatch, alertit, toggleShare, removeFile, listFiles, useCallback, downloadFile, isLoggedIn } from './../imports';
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { FileItem } from './../imports';
3
+ export declare const useDeleteFile: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: FileItem | FileItem[]) => Promise<void>;
@@ -0,0 +1,6 @@
1
+ export * from './load';
2
+ export * from './toggleShare';
3
+ export * from './patchShareSettings';
4
+ export * from './useFiles';
5
+ export * from './deleteFile';
6
+ export * from './useSaveShareSettings';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { FileItem } from './../imports';
3
+ export declare const useLoadFiles: (setLoading: React.Dispatch<React.SetStateAction<boolean>>, setError: React.Dispatch<React.SetStateAction<Error | null>>, setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => () => Promise<void>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const usePatchShareSettings: (setFiles: React.Dispatch<React.SetStateAction<any[]>>) => (file: any) => Promise<void>;
3
+ export default usePatchShareSettings;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { FileItem } from './../imports';
3
+ export declare const useToggleShare: (setFiles: React.Dispatch<React.SetStateAction<FileItem[]>>) => (file: FileItem) => Promise<void>;
@@ -0,0 +1,13 @@
1
+ import type { FileItem } from './../imports';
2
+ export declare function useFiles(): {
3
+ files: FileItem[];
4
+ loading: boolean;
5
+ error: Error | null;
6
+ load: () => Promise<void>;
7
+ toggleShare: (file: FileItem) => Promise<void>;
8
+ patchShareSettings: (file: any) => Promise<void>;
9
+ deleteFile: (file: FileItem | FileItem[]) => Promise<void>;
10
+ setFiles: import("react").Dispatch<import("react").SetStateAction<FileItem[]>>;
11
+ setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
12
+ setError: import("react").Dispatch<import("react").SetStateAction<Error | null>>;
13
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ /**
3
+ * Hook alias used by useFiles.ts. Patches share settings via the session-cookie
4
+ * authenticated /files/share endpoint.
5
+ */
6
+ export declare const useSaveShareSettings: (setFiles: React.Dispatch<React.SetStateAction<any[]>>) => (file: any) => Promise<void>;
7
+ export default useSaveShareSettings;
@@ -0,0 +1,7 @@
1
+ export { createPortal } from "react-dom";
2
+ export { ClipboardIcon, CloudArrowUpIcon } from "@heroicons/react/24/outline";
3
+ export { useEffect, useRef, useState, useCallback } from 'react';
4
+ export type { QueuedFile, FileItem, FileTableProps, UploadProps, ShareModalProps, FileRowProps, ApiRow, EnhancedInputProps } from './types';
5
+ export { currentUsername, alertit, requireToken, isLoggedIn, fetchIt, stripPrefixes, make_path } from "@putkoff/abstract-utilities";
6
+ export { Button, Checkbox, Input, Spinner } from './UI';
7
+ export { secureFetchIt, fetchSharePatch } from "@putkoff/abstract-apis";