@putkoff/abstract-securefiles 0.0.48 → 0.0.49

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 (197) hide show
  1. package/dist/ConfirmButton.d.ts +5 -0
  2. package/dist/CopyButton.d.ts +4 -0
  3. package/dist/FolderSelect.d.ts +6 -0
  4. package/dist/SecureFiles.d.ts +3 -0
  5. package/dist/ServerFiles.d.ts +6 -0
  6. package/dist/ShareDialog.d.ts +6 -0
  7. package/dist/UploadPanel.d.ts +6 -0
  8. package/dist/api.d.ts +46 -0
  9. package/dist/index.cjs +537 -1004
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.ts +4 -8
  12. package/dist/index.js +530 -951
  13. package/dist/index.js.map +1 -1
  14. package/dist/types.d.ts +54 -0
  15. package/package.json +15 -11
  16. package/src/ConfirmButton.tsx +35 -0
  17. package/src/CopyButton.tsx +24 -0
  18. package/src/FolderSelect.tsx +68 -0
  19. package/src/SecureFiles.tsx +344 -0
  20. package/src/ServerFiles.tsx +324 -0
  21. package/src/ShareDialog.tsx +148 -0
  22. package/src/UploadPanel.tsx +217 -0
  23. package/src/api.ts +119 -0
  24. package/src/index.ts +4 -8
  25. package/src/styles.css +432 -0
  26. package/src/types.ts +54 -0
  27. package/css.d.ts +0 -2
  28. package/dist/App/SecureFiles.d.ts +0 -4
  29. package/dist/App/index.d.ts +0 -1
  30. package/dist/FileHandlers/FileRow/imports.d.ts +0 -2
  31. package/dist/FileHandlers/FileRow/index.d.ts +0 -1
  32. package/dist/FileHandlers/FileRow/src/index.d.ts +0 -1
  33. package/dist/FileHandlers/FileRow/src/row_utils.d.ts +0 -2
  34. package/dist/FileHandlers/FileTable/imports.d.ts +0 -4
  35. package/dist/FileHandlers/FileTable/index.d.ts +0 -1
  36. package/dist/FileHandlers/FileTable/src/index.d.ts +0 -1
  37. package/dist/FileHandlers/FileTable/src/table_utils.d.ts +0 -2
  38. package/dist/FileHandlers/ShareModal/imports.d.ts +0 -2
  39. package/dist/FileHandlers/ShareModal/index.d.ts +0 -1
  40. package/dist/FileHandlers/ShareModal/src/index.d.ts +0 -1
  41. package/dist/FileHandlers/ShareModal/src/share_utils.d.ts +0 -2
  42. package/dist/FileHandlers/Upload/imports.d.ts +0 -2
  43. package/dist/FileHandlers/Upload/index.d.ts +0 -1
  44. package/dist/FileHandlers/Upload/src/index.d.ts +0 -2
  45. package/dist/FileHandlers/Upload/src/upload_utils.d.ts +0 -2
  46. package/dist/FileHandlers/imports.d.ts +0 -4
  47. package/dist/FileHandlers/index.d.ts +0 -4
  48. package/dist/UI/index.d.ts +0 -28
  49. package/dist/file_utils/imports.d.ts +0 -2
  50. package/dist/file_utils/index.d.ts +0 -1
  51. package/dist/file_utils/src/cookieFetch.d.ts +0 -33
  52. package/dist/file_utils/src/delete_utils/imports.d.ts +0 -1
  53. package/dist/file_utils/src/delete_utils/index.d.ts +0 -1
  54. package/dist/file_utils/src/delete_utils/src/delete_row.d.ts +0 -2
  55. package/dist/file_utils/src/delete_utils/src/delete_select.d.ts +0 -4
  56. package/dist/file_utils/src/delete_utils/src/delete_selected.d.ts +0 -2
  57. package/dist/file_utils/src/delete_utils/src/index.d.ts +0 -3
  58. package/dist/file_utils/src/download_utils/imports.d.ts +0 -2
  59. package/dist/file_utils/src/download_utils/index.d.ts +0 -1
  60. package/dist/file_utils/src/download_utils/src/direct_download.d.ts +0 -3
  61. package/dist/file_utils/src/download_utils/src/download_file.d.ts +0 -6
  62. package/dist/file_utils/src/download_utils/src/download_select.d.ts +0 -2
  63. package/dist/file_utils/src/download_utils/src/index.d.ts +0 -5
  64. package/dist/file_utils/src/download_utils/src/target_downloads.d.ts +0 -4
  65. package/dist/file_utils/src/download_utils/src/trigger_download.d.ts +0 -2
  66. package/dist/file_utils/src/imports.d.ts +0 -2
  67. package/dist/file_utils/src/index.d.ts +0 -6
  68. package/dist/file_utils/src/list_utils/imports.d.ts +0 -1
  69. package/dist/file_utils/src/list_utils/index.d.ts +0 -1
  70. package/dist/file_utils/src/list_utils/src/index.d.ts +0 -1
  71. package/dist/file_utils/src/list_utils/src/list_utils.d.ts +0 -2
  72. package/dist/file_utils/src/select_utils/index.d.ts +0 -1
  73. package/dist/file_utils/src/select_utils/src/index.d.ts +0 -3
  74. package/dist/file_utils/src/select_utils/src/init_select_all.d.ts +0 -2
  75. package/dist/file_utils/src/select_utils/src/sync_header_checkbox.d.ts +0 -5
  76. package/dist/file_utils/src/select_utils/src/toggle_checkboxes.d.ts +0 -2
  77. package/dist/file_utils/src/share_utils/imports.d.ts +0 -1
  78. package/dist/file_utils/src/share_utils/index.d.ts +0 -1
  79. package/dist/file_utils/src/share_utils/src/index.d.ts +0 -1
  80. package/dist/file_utils/src/share_utils/src/share_utils.d.ts +0 -7
  81. package/dist/file_utils/src/upload_utils/imports.d.ts +0 -0
  82. package/dist/file_utils/src/upload_utils/index.d.ts +0 -1
  83. package/dist/file_utils/src/upload_utils/src/index.d.ts +0 -3
  84. package/dist/file_utils/src/upload_utils/src/patch_file_settings.d.ts +0 -2
  85. package/dist/file_utils/src/upload_utils/src/upload_file.d.ts +0 -2
  86. package/dist/file_utils/src/upload_utils/src/upload_files.d.ts +0 -5
  87. package/dist/hooks/imports.d.ts +0 -3
  88. package/dist/hooks/index.d.ts +0 -1
  89. package/dist/hooks/useFiles/imports.d.ts +0 -2
  90. package/dist/hooks/useFiles/index.d.ts +0 -1
  91. package/dist/hooks/useFiles/src/deleteFile.d.ts +0 -3
  92. package/dist/hooks/useFiles/src/index.d.ts +0 -6
  93. package/dist/hooks/useFiles/src/load.d.ts +0 -3
  94. package/dist/hooks/useFiles/src/patchShareSettings.d.ts +0 -3
  95. package/dist/hooks/useFiles/src/toggleShare.d.ts +0 -3
  96. package/dist/hooks/useFiles/src/useFiles.d.ts +0 -13
  97. package/dist/hooks/useFiles/src/useSaveShareSettings.d.ts +0 -7
  98. package/dist/imports.d.ts +0 -6
  99. package/dist/index.css +0 -1
  100. package/dist/styles/index.d.ts +0 -1
  101. package/dist/types/index.d.ts +0 -1
  102. package/dist/types/src/index.d.ts +0 -1
  103. package/dist/types/src/types.d.ts +0 -75
  104. package/index.ts +0 -1
  105. package/postcss.config.cjs +0 -8
  106. package/rollup.config.js +0 -38
  107. package/rollup.config.mjs +0 -35
  108. package/src/App/SecureFiles.tsx +0 -45
  109. package/src/App/index.ts +0 -1
  110. package/src/FileHandlers/FileRow/imports.ts +0 -2
  111. package/src/FileHandlers/FileRow/index.ts +0 -1
  112. package/src/FileHandlers/FileRow/src/index.ts +0 -1
  113. package/src/FileHandlers/FileRow/src/row_utils.tsx +0 -143
  114. package/src/FileHandlers/FileTable/imports.ts +0 -15
  115. package/src/FileHandlers/FileTable/index.ts +0 -1
  116. package/src/FileHandlers/FileTable/src/index.ts +0 -1
  117. package/src/FileHandlers/FileTable/src/table_utils.tsx +0 -251
  118. package/src/FileHandlers/ShareModal/imports.ts +0 -2
  119. package/src/FileHandlers/ShareModal/index.ts +0 -1
  120. package/src/FileHandlers/ShareModal/src/index.ts +0 -1
  121. package/src/FileHandlers/ShareModal/src/share_utils.tsx +0 -155
  122. package/src/FileHandlers/Upload/imports.ts +0 -3
  123. package/src/FileHandlers/Upload/index.ts +0 -1
  124. package/src/FileHandlers/Upload/src/index.ts +0 -2
  125. package/src/FileHandlers/Upload/src/upload_utils.tsx +0 -369
  126. package/src/FileHandlers/imports.ts +0 -17
  127. package/src/FileHandlers/index.ts +0 -4
  128. package/src/UI/index.tsx +0 -122
  129. package/src/custom.d.ts +0 -7
  130. package/src/file_utils/imports.ts +0 -2
  131. package/src/file_utils/index.ts +0 -1
  132. package/src/file_utils/src/cookieFetch.ts +0 -109
  133. package/src/file_utils/src/delete_utils/imports.ts +0 -1
  134. package/src/file_utils/src/delete_utils/index.ts +0 -1
  135. package/src/file_utils/src/delete_utils/src/delete_row.ts +0 -11
  136. package/src/file_utils/src/delete_utils/src/delete_select.ts +0 -10
  137. package/src/file_utils/src/delete_utils/src/delete_selected.ts +0 -15
  138. package/src/file_utils/src/delete_utils/src/index.ts +0 -3
  139. package/src/file_utils/src/download_utils/imports.ts +0 -3
  140. package/src/file_utils/src/download_utils/index.ts +0 -1
  141. package/src/file_utils/src/download_utils/src/direct_download.ts +0 -22
  142. package/src/file_utils/src/download_utils/src/download_file.ts +0 -25
  143. package/src/file_utils/src/download_utils/src/download_select.ts +0 -25
  144. package/src/file_utils/src/download_utils/src/index.ts +0 -5
  145. package/src/file_utils/src/download_utils/src/target_downloads.ts +0 -21
  146. package/src/file_utils/src/download_utils/src/trigger_download.ts +0 -14
  147. package/src/file_utils/src/imports.ts +0 -3
  148. package/src/file_utils/src/index.ts +0 -6
  149. package/src/file_utils/src/list_utils/imports.ts +0 -2
  150. package/src/file_utils/src/list_utils/index.ts +0 -1
  151. package/src/file_utils/src/list_utils/src/index.ts +0 -1
  152. package/src/file_utils/src/list_utils/src/list_utils.ts +0 -28
  153. package/src/file_utils/src/select_utils/index.ts +0 -1
  154. package/src/file_utils/src/select_utils/src/index.ts +0 -3
  155. package/src/file_utils/src/select_utils/src/init_select_all.ts +0 -37
  156. package/src/file_utils/src/select_utils/src/sync_header_checkbox.ts +0 -18
  157. package/src/file_utils/src/select_utils/src/toggle_checkboxes.ts +0 -11
  158. package/src/file_utils/src/share_utils/imports.ts +0 -1
  159. package/src/file_utils/src/share_utils/index.ts +0 -1
  160. package/src/file_utils/src/share_utils/src/index.ts +0 -1
  161. package/src/file_utils/src/share_utils/src/share_utils.ts +0 -20
  162. package/src/file_utils/src/upload_utils/imports.ts +0 -1
  163. package/src/file_utils/src/upload_utils/index.ts +0 -1
  164. package/src/file_utils/src/upload_utils/src/index.ts +0 -3
  165. package/src/file_utils/src/upload_utils/src/patch_file_settings.ts +0 -20
  166. package/src/file_utils/src/upload_utils/src/upload_file.ts +0 -27
  167. package/src/file_utils/src/upload_utils/src/upload_files.ts +0 -19
  168. package/src/hooks/imports.ts +0 -3
  169. package/src/hooks/index.ts +0 -1
  170. package/src/hooks/useFiles/imports.ts +0 -3
  171. package/src/hooks/useFiles/index.ts +0 -1
  172. package/src/hooks/useFiles/src/deleteFile.ts +0 -23
  173. package/src/hooks/useFiles/src/index.ts +0 -6
  174. package/src/hooks/useFiles/src/load.ts +0 -39
  175. package/src/hooks/useFiles/src/logs/clipit_logs.log +0 -0
  176. package/src/hooks/useFiles/src/logs/routes_bp.log +0 -0
  177. package/src/hooks/useFiles/src/patchShareSettings.ts +0 -27
  178. package/src/hooks/useFiles/src/toggleShare.ts +0 -28
  179. package/src/hooks/useFiles/src/useFiles.ts +0 -35
  180. package/src/hooks/useFiles/src/useSaveShareSettings.ts +0 -31
  181. package/src/imports.ts +0 -18
  182. package/src/styles/SecureFiles/App.css +0 -42
  183. package/src/styles/SecureFiles/index.css +0 -10
  184. package/src/styles/SecureFiles/logs/clipit_logs.log +0 -0
  185. package/src/styles/SecureFiles/logs/routes_bp.log +0 -0
  186. package/src/styles/SecureFiles/tailwind.css +0 -3
  187. package/src/styles/SecureFiles/window-manager.css +0 -283
  188. package/src/styles/SecureFilesStyles.module.css +0 -287
  189. package/src/styles/index.ts +0 -1
  190. package/src/types/index.ts +0 -1
  191. package/src/types/src/index.ts +0 -1
  192. package/src/types/src/types.ts +0 -88
  193. package/tailwind.config.cjs +0 -7
  194. package/testit.mjs +0 -11
  195. package/testit.ts +0 -3
  196. package/tsconfig.json +0 -27
  197. /package/src/{global.d.ts → css.d.ts} +0 -0
@@ -1,10 +0,0 @@
1
- /* src/styles/index.css */
2
-
3
- /* 1) pull in Tailwind’s directives */
4
- @import "./tailwind.css";
5
-
6
- /* 2) pull in your custom @layer components */
7
- @import "./window-manager.css";
8
-
9
- /* 3) pull in all your overrides & global resets */
10
- @import "./App.css";
File without changes
File without changes
@@ -1,3 +0,0 @@
1
- /* src/styles/tailwind.css */
2
- @tailwind base;
3
- @tailwind utilities;
@@ -1,283 +0,0 @@
1
- /* ------- window-manager table look ------- */
2
- .wm-table {
3
- width: 100%;
4
- font-size: 13px;
5
- table-layout: fixed;
6
- }
7
-
8
- .wm-thead th {
9
- background-color: #e5e7eb;
10
- border-bottom: 1px solid #9ca3af;
11
- padding: 5px 8px;
12
- text-align: left;
13
- font-weight: 600;
14
- }
15
-
16
- .wm-row {
17
- border-bottom: 1px solid #d1d5db;
18
- background-color: #f9fafb;
19
- }
20
-
21
- .wm-row:hover {
22
- background-color: #eff6ff;
23
- }
24
-
25
- .wm-cell {
26
- padding: 5px 8px;
27
- white-space: nowrap;
28
- overflow: hidden;
29
- text-overflow: ellipsis;
30
- }
31
-
32
- .wm-checkbox {
33
- height: 14px;
34
- width: 14px;
35
- color: #2563eb;
36
- border: 1px solid #9ca3af;
37
- border-radius: 4px;
38
- cursor: pointer;
39
- }
40
-
41
- .wm-btn-link {
42
- color: #2563eb;
43
- text-decoration: underline;
44
- }
45
-
46
- .wm-btn-link:hover {
47
- color: #1e40af;
48
- }
49
-
50
- .wm-btn-link:disabled {
51
- color: #9ca3af;
52
- cursor: not-allowed;
53
- }
54
-
55
- .wm-btn-icon {
56
- color: #4b5563;
57
- padding: 2px;
58
- border-radius: 4px;
59
- }
60
-
61
- .wm-btn-icon:hover {
62
- color: #111827;
63
- background-color: #e5e7eb;
64
- }
65
-
66
- .wm-btn-icon:disabled {
67
- color: #9ca3af;
68
- }
69
-
70
- /* whole table */
71
- .file-table {
72
- width: 100%;
73
- border: 1px solid #9ca3af;
74
- font-size: 13px;
75
- line-height: 1.15rem;
76
- border-collapse: collapse;
77
- }
78
-
79
- /* header cells */
80
- .file-table thead th {
81
- background-color: #e5e7eb;
82
- color: #1f2937;
83
- font-weight: 600;
84
- padding: 6px 12px;
85
- user-select: none;
86
- border-bottom: 1px solid #9ca3af;
87
- border-right: 1px solid #d1d5db;
88
- }
89
-
90
- .file-table thead th:last-child {
91
- border-right: none;
92
- }
93
-
94
- /* body rows */
95
- .file-table tbody tr {
96
- border-bottom: 1px solid #d1d5db;
97
- transition: background-color 0.2s;
98
- }
99
-
100
- .file-table tbody tr:hover {
101
- background-color: #f3f4f6;
102
- }
103
-
104
- .file-table tbody tr:nth-child(even) {
105
- background-color: #f9fafb;
106
- }
107
-
108
- /* body cells */
109
- .file-table td {
110
- padding: 6px 12px;
111
- vertical-align: middle;
112
- white-space: nowrap;
113
- border-right: 1px solid #d1d5db;
114
- }
115
-
116
- .file-table td:last-child {
117
- border-right: none;
118
- }
119
-
120
- /* unsaved filename cue */
121
- .file-table .unsaved {
122
- color: #dc2626;
123
- }
124
-
125
- /* ---------- MODALS ---------- */
126
- .modal-backdrop {
127
- position: fixed;
128
- top: 0;
129
- right: 0;
130
- bottom: 0;
131
- left: 0;
132
- background-color: rgba(0, 0, 0, 0.6);
133
- }
134
-
135
- .modal-wrapper {
136
- position: fixed;
137
- top: 0;
138
- right: 0;
139
- bottom: 0;
140
- left: 0;
141
- display: flex;
142
- align-items: center;
143
- justify-content: center;
144
- }
145
-
146
- .modal-panel {
147
- background-color: #ffffff;
148
- border-radius: 12px;
149
- padding: 24px;
150
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
151
- outline: none;
152
- max-width: 28rem;
153
- max-height: 90vh;
154
- overflow-y: auto;
155
- }
156
-
157
- /* ---------- FORMS & INPUTS ---------- */
158
- .form-container {
159
- background-color: #ffffff;
160
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
161
- border-radius: 8px;
162
- padding: 24px;
163
- display: flex;
164
- flex-direction: column;
165
- gap: 16px;
166
- max-width: 28rem;
167
- }
168
-
169
- .form-title {
170
- font-size: 20px;
171
- font-weight: 600;
172
- text-align: center;
173
- }
174
-
175
- .form-input {
176
- display: block;
177
- width: 100%;
178
- border-radius: 4px;
179
- border: 1px solid #d1d5db;
180
- padding: 4px 8px;
181
- }
182
-
183
- .form-input:disabled {
184
- background-color: #f3f4f6;
185
- }
186
-
187
- .form-group {
188
- margin-bottom: 16px;
189
- }
190
-
191
- .form-label {
192
- display: block;
193
- font-size: 14px;
194
- font-weight: 500;
195
- margin-bottom: 4px;
196
- }
197
-
198
- .form-error {
199
- font-size: 14px;
200
- color: #dc2626;
201
- }
202
-
203
- /* ---------- BUTTONS ---------- */
204
- .btn {
205
- border-radius: 8px;
206
- padding: 4px 12px;
207
- font-size: 14px;
208
- font-weight: 500;
209
- transition: background-color 0.15s, color 0.15s;
210
- }
211
-
212
- .btn:focus {
213
- outline: none;
214
- box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.1);
215
- }
216
-
217
- .btn-primary {
218
- background-color: #2563eb;
219
- color: #ffffff;
220
- }
221
-
222
- .btn-primary:hover {
223
- background-color: #1d4ed8;
224
- }
225
-
226
- .btn-primary:focus {
227
- box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(59, 130, 246, 0.5);
228
- }
229
-
230
- .btn-secondary {
231
- background-color: #e5e7eb;
232
- }
233
-
234
- .btn-secondary:hover {
235
- background-color: #d1d5db;
236
- }
237
-
238
- .btn-secondary:focus {
239
- box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(156, 163, 175, 0.5);
240
- }
241
-
242
- .btn-success {
243
- background-color: #16a34a;
244
- color: #ffffff;
245
- }
246
-
247
- .btn-success:hover {
248
- background-color: #15803d;
249
- }
250
-
251
- .btn-success:focus {
252
- box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(34, 197, 94, 0.5);
253
- }
254
-
255
- .btn-danger {
256
- background-color: #dc2626;
257
- color: #ffffff;
258
- }
259
-
260
- .btn-danger:hover {
261
- background-color: #b91c1c;
262
- }
263
-
264
- .btn-danger:focus {
265
- box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(239, 68, 68, 0.5);
266
- }
267
-
268
- .btn-icon {
269
- padding: 4px;
270
- background-color: transparent;
271
- }
272
-
273
- .btn-icon:hover {
274
- background-color: #f3f4f6;
275
- }
276
-
277
- /* ---------- CHECKBOX ---------- */
278
- .checkbox {
279
- display: flex;
280
- align-items: center;
281
- gap: 8px;
282
- margin-bottom: 16px;
283
- }
@@ -1,287 +0,0 @@
1
- /* SecureFilesStyles.module.css */
2
-
3
- /* Scope all styles under .secure-files */
4
- .secure-files {
5
- /* Pull in Tailwind utilities if needed (but skip @base to avoid global resets) */
6
- @tailwind utilities;
7
-
8
- /* window-manager.css styles (prefixed where needed) */
9
- .wm-table {
10
- width: 100%;
11
- font-size: 13px;
12
- table-layout: fixed;
13
- }
14
-
15
- .wm-thead th {
16
- background-color: #e5e7eb;
17
- border-bottom: 1px solid #9ca3af;
18
- padding: 5px 8px;
19
- text-align: left;
20
- font-weight: 600;
21
- }
22
-
23
- .wm-row {
24
- border-bottom: 1px solid #d1d5db;
25
- background-color: #f9fafb;
26
- }
27
-
28
- .wm-row:hover {
29
- background-color: #eff6ff;
30
- }
31
-
32
- .wm-cell {
33
- padding: 5px 8px;
34
- white-space: nowrap;
35
- overflow: hidden;
36
- text-overflow: ellipsis;
37
- }
38
-
39
- .wm-checkbox {
40
- height: 14px;
41
- width: 14px;
42
- color: #2563eb;
43
- border: 1px solid #9ca3af;
44
- border-radius: 4px;
45
- cursor: pointer;
46
- }
47
-
48
- .wm-btn-link {
49
- color: #2563eb;
50
- text-decoration: underline;
51
- }
52
-
53
- .wm-btn-link:hover {
54
- color: #1e40af;
55
- }
56
-
57
- .wm-btn-link:disabled {
58
- color: #9ca3af;
59
- cursor: not-allowed;
60
- }
61
-
62
- .wm-btn-icon {
63
- color: #4b5563;
64
- padding: 2px;
65
- border-radius: 4px;
66
- }
67
-
68
- .wm-btn-icon:hover {
69
- color: #111827;
70
- background-color: #e5e7eb;
71
- }
72
-
73
- .wm-btn-icon:disabled {
74
- color: #9ca3af;
75
- }
76
-
77
- /* file-table styles */
78
- .file-table {
79
- width: 100%;
80
- border: 1px solid #9ca3af;
81
- font-size: 13px;
82
- line-height: 1.15rem;
83
- border-collapse: collapse;
84
- }
85
-
86
- .file-table thead th {
87
- background-color: #e5e7eb;
88
- color: #1f2937;
89
- font-weight: 600;
90
- padding: 6px 12px;
91
- user-select: none;
92
- border-bottom: 1px solid #9ca3af;
93
- border-right: 1px solid #d1d5db;
94
- }
95
-
96
- .file-table thead th:last-child {
97
- border-right: none;
98
- }
99
-
100
- .file-table tbody tr {
101
- border-bottom: 1px solid #d1d5db;
102
- transition: background-color 0.2s;
103
- }
104
-
105
- .file-table tbody tr:hover {
106
- background-color: #f3f4f6;
107
- }
108
-
109
- .file-table tbody tr:nth-child(even) {
110
- background-color: #f9fafb;
111
- }
112
-
113
- .file-table td {
114
- padding: 6px 12px;
115
- vertical-align: middle;
116
- white-space: nowrap;
117
- border-right: 1px solid #d1d5db;
118
- }
119
-
120
- .file-table td:last-child {
121
- border-right: none;
122
- }
123
-
124
- .file-table .unsaved {
125
- color: #dc2626;
126
- }
127
-
128
- /* Modals */
129
- .modal-backdrop {
130
- position: fixed;
131
- top: 0;
132
- right: 0;
133
- bottom: 0;
134
- left: 0;
135
- background-color: rgba(0, 0, 0, 0.6);
136
- }
137
-
138
- .modal-wrapper {
139
- position: fixed;
140
- top: 0;
141
- right: 0;
142
- bottom: 0;
143
- left: 0;
144
- display: flex;
145
- align-items: center;
146
- justify-content: center;
147
- }
148
-
149
- .modal-panel {
150
- background-color: #ffffff;
151
- border-radius: 12px;
152
- padding: 24px;
153
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
154
- outline: none;
155
- max-width: 28rem;
156
- max-height: 90vh;
157
- overflow-y: auto;
158
- }
159
-
160
- /* Forms & Inputs */
161
- .form-container {
162
- background-color: #ffffff;
163
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
164
- border-radius: 8px;
165
- padding: 24px;
166
- display: flex;
167
- flex-direction: column;
168
- gap: 16px;
169
- max-width: 28rem;
170
- }
171
-
172
- .form-title {
173
- font-size: 20px;
174
- font-weight: 600;
175
- text-align: center;
176
- }
177
-
178
- .form-input {
179
- display: block;
180
- width: 100%;
181
- border-radius: 4px;
182
- border: 1px solid #d1d5db;
183
- padding: 4px 8px;
184
- }
185
-
186
- .form-input:disabled {
187
- background-color: #f3f4f6;
188
- }
189
-
190
- .form-group {
191
- margin-bottom: 16px;
192
- }
193
-
194
- .form-label {
195
- display: block;
196
- font-size: 14px;
197
- font-weight: 500;
198
- margin-bottom: 4px;
199
- }
200
-
201
- .form-error {
202
- font-size: 14px;
203
- color: #dc2626;
204
- }
205
-
206
- /* Buttons */
207
- .btn {
208
- border-radius: 8px;
209
- padding: 4px 12px;
210
- font-size: 14px;
211
- font-weight: 500;
212
- transition: background-color 0.15s, color 0.15s;
213
- }
214
-
215
- .btn:focus {
216
- outline: none;
217
- box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.1);
218
- }
219
-
220
- .btn-primary {
221
- background-color: #2563eb;
222
- color: #ffffff;
223
- }
224
-
225
- .btn-primary:hover {
226
- background-color: #1d4ed8;
227
- }
228
-
229
- .btn-primary:focus {
230
- box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(59, 130, 246, 0.5);
231
- }
232
-
233
- .btn-secondary {
234
- background-color: #e5e7eb;
235
- }
236
-
237
- .btn-secondary:hover {
238
- background-color: #d1d5db;
239
- }
240
-
241
- .btn-secondary:focus {
242
- box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(156, 163, 175, 0.5);
243
- }
244
-
245
- .btn-success {
246
- background-color: #16a34a;
247
- color: #ffffff;
248
- }
249
-
250
- .btn-success:hover {
251
- background-color: #15803d;
252
- }
253
-
254
- .btn-success:focus {
255
- box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(34, 197, 94, 0.5);
256
- }
257
-
258
- .btn-danger {
259
- background-color: #dc2626;
260
- color: #ffffff;
261
- }
262
-
263
- .btn-danger:hover {
264
- background-color: #b91c1c;
265
- }
266
-
267
- .btn-danger:focus {
268
- box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(239, 68, 68, 0.5);
269
- }
270
-
271
- .btn-icon {
272
- padding: 4px;
273
- background-color: transparent;
274
- }
275
-
276
- .btn-icon:hover {
277
- background-color: #f3f4f6;
278
- }
279
-
280
- /* Checkbox */
281
- .checkbox {
282
- display: flex;
283
- align-items: center;
284
- gap: 8px;
285
- margin-bottom: 16px;
286
- }
287
- }
@@ -1 +0,0 @@
1
- export * from './SecureFiles/index.css';
@@ -1 +0,0 @@
1
- export type { QueuedFile, FileItem, FileTableProps, UploadProps, ShareModalProps, FileRowProps, ApiRow, EnhancedInputProps } from './src/types';
@@ -1 +0,0 @@
1
- export type { QueuedFile, FileItem, FileTableProps, UploadProps, ShareModalProps, FileRowProps, ApiRow, EnhancedInputProps } from './types';
@@ -1,88 +0,0 @@
1
-
2
- export interface FileItem {
3
- id: number | string;
4
- filename: string;
5
- uploader_id: string;
6
- filepath: string;
7
- created_at: string;
8
- download_count: number;
9
- download_limit: number | null;
10
- shareable: boolean;
11
- needsPassword: boolean;
12
- share_password: string | null;
13
- password_str: string | null;
14
- }
15
-
16
- export interface ApiRow {
17
- id: number | string;
18
- filename: string;
19
- uploader_id: string;
20
- filepath: string;
21
- created_at: string;
22
- download_count: number;
23
- download_limit: number | null;
24
- shareable: boolean;
25
- needsPassword: boolean;
26
- share_password: string;
27
- password_str: string | null;
28
- }
29
-
30
- export interface FileListResponse {
31
- files?: ApiRow[];
32
- }
33
-
34
- export interface FileTableProps {
35
- files: FileItem[];
36
- loading: boolean;
37
- error: Error | null;
38
- onDownload(id: any): Promise<void>;
39
- onToggleShare(id: any): Promise<void>;
40
- onPatchShare(id: any): Promise<void>;
41
- onDelete(id: any): Promise<void>;
42
- }
43
-
44
-
45
- export interface ShareModalProps {
46
- file: FileItem | null;
47
- onClose(): void;
48
- onSave(patch: Partial<FileItem>): Promise<void>;
49
- }
50
- export interface UploadProps {
51
- /** Called *after* a successful upload */
52
- onUploaded: () => Promise<void>;
53
- }
54
-
55
-
56
-
57
- export interface FileRowProps {
58
- file: FileItem;
59
- onDownload: () => Promise<void>;
60
- onSettings: () => void;
61
- onToggleShare: () => Promise<void>;
62
- onDelete: () => any;
63
- }
64
-
65
- export interface QueuedFile {
66
- file: File;
67
- relPath: string;
68
- progress: number;
69
- }
70
-
71
- export interface InputProps {
72
- label?: any;
73
- type?: any;
74
- value?: any;
75
- onChange?: any;
76
- disabled?: any;
77
- placeholder?: any;
78
- error?: string;
79
-
80
- }
81
-
82
- export interface FileInputExtra {
83
- directory?: boolean; // true → allow folder selection
84
- multiple?: boolean; // true → allow multiple files
85
- accept?: string; // optional MIME filter
86
- }
87
- /** keep other InputProps fields … */
88
- export type EnhancedInputProps = InputProps & FileInputExtra;
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- content: [
3
- './src/**/*.{ts,tsx,js,jsx}',
4
- ],
5
- theme: { extend: {} },
6
- plugins: [],
7
- };
package/testit.mjs DELETED
@@ -1,11 +0,0 @@
1
- // testit.mjs
2
- import { secureFetchIt } from './dist/index.js';
3
-
4
- (async () => {
5
-
6
-
7
-
8
- const result = await secureFetchIt('list');
9
- console.log('Result:', result);
10
-
11
- })();
package/testit.ts DELETED
@@ -1,3 +0,0 @@
1
- import {secureFetchIt} from './src/functions';
2
- const data = await secureFetchIt('links');
3
- console.log(data);