@putkoff/abstract-securefiles 0.0.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.
@@ -0,0 +1,17 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+
7
+ jobs:
8
+ release:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ - uses: actions/setup-node@v4
13
+ with:
14
+ node-version: '18'
15
+ registry-url: 'https://registry.npmjs.org/'
16
+ - name: Shared Release
17
+ uses: your-org/your-repo/.github/actions/release
@@ -0,0 +1,287 @@
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
+ }
@@ -0,0 +1 @@
1
+ export { default as SecureFiles } from './secure_files';
@@ -0,0 +1,4 @@
1
+ import './styles/index.css';
2
+ import React from "react";
3
+ declare const SecureFiles: React.FC;
4
+ export default SecureFiles;
@@ -0,0 +1 @@
1
+ export { SecureFiles } from './App';
package/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './src';
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@putkoff/abstract-securefiles",
3
+ "version": "0.0.000",
4
+ "description": "A reusable Secure file system",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "peerDependencies": {
16
+ "react": "^17.0.0 || ^18.0.0",
17
+ "react-dom": "^17.0.0 || ^18.0.0"
18
+ },
19
+ "devDependencies": {
20
+ "@putkoff/shared-scripts": "file:../../shared-scripts",
21
+ "@types/node": "^24.0.13",
22
+ "@types/react": "^18.3.23",
23
+ "@types/react-dom": "^18.3.7",
24
+ "csstype": "^3.1.3",
25
+ "tsup": "^8.5.0",
26
+ "typescript": "^5.8.3",
27
+ "undici-types": "^7.11.0"
28
+ },
29
+ "dependencies": {
30
+ "@heroicons/react": "^2.2.0",
31
+ "@putkoff/abstract-apis": "^0.0.417",
32
+ "@putkoff/abstract-files": "^0.0.289",
33
+ "@putkoff/abstract-utilities": "^0.1.229",
34
+ "@rollup/plugin-commonjs": "^28.0.6",
35
+ "@rollup/plugin-node-resolve": "^16.0.1",
36
+ "@rollup/plugin-typescript": "^12.1.4",
37
+ "rollup-plugin-dts": "^6.2.1",
38
+ "tslib": "^2.8.1"
39
+ },
40
+ "scripts": {
41
+ "build": "tsc --emitDeclarationOnly && rollup -c",
42
+ "test": "jest",
43
+ "release": "release"
44
+ },
45
+ "type": "module",
46
+ "author": "putkoff",
47
+ "license": "MIT"
48
+ }
File without changes
@@ -0,0 +1,38 @@
1
+ import resolve from '@rollup/plugin-node-resolve';
2
+ import commonjs from '@rollup/plugin-commonjs';
3
+ import typescript from '@rollup/plugin-typescript';
4
+ import dts from 'rollup-plugin-dts';
5
+ import { readFileSync } from 'fs';
6
+ import { fileURLToPath } from 'url';
7
+
8
+ // load package.json
9
+ const pkg = JSON.parse(
10
+ readFileSync(new URL('./package.json', import.meta.url), 'utf-8')
11
+ );
12
+
13
+ const deps = [
14
+ ...Object.keys(pkg.peerDependencies || {}),
15
+ ...Object.keys(pkg.dependencies || {}),
16
+ ];
17
+
18
+ export default [
19
+ {
20
+ input: 'src/index.ts',
21
+ external: deps,
22
+ output: [
23
+ { file: pkg.module, format: 'esm', sourcemap: true },
24
+ { file: pkg.main, format: 'cjs', sourcemap: true, exports: 'named' }
25
+ ],
26
+ plugins: [
27
+ resolve(),
28
+ commonjs(),
29
+ typescript({ tsconfig: './tsconfig.json', declaration: false })
30
+ ]
31
+ },
32
+ {
33
+ input: 'src/index.ts',
34
+ external: deps,
35
+ output: { file: pkg.types, format: 'esm' },
36
+ plugins: [ dts() ]
37
+ }
38
+ ];
@@ -0,0 +1 @@
1
+ export {default as SecureFiles} from './secure_files';
@@ -0,0 +1,41 @@
1
+ // src/App.tsx
2
+ // src/index.tsx
3
+ import './styles/index.css';
4
+ import React from "react";
5
+ import {
6
+ useFiles,
7
+ FileTable,
8
+ Upload
9
+ } from "@putkoff/abstract-files";
10
+
11
+ import {
12
+ getToken, // ⬅️ use the *non-throwing* helper
13
+ isTokenExpired,
14
+ useState
15
+ } from "@putkoff/abstract-utilities";
16
+ function checkTokenValid() {
17
+ const tok = getToken();
18
+ return !!tok && !isTokenExpired(tok);
19
+ }
20
+ const SecureFiles: React.FC = () => {
21
+ const [loggedIn, setLoggedIn] = useState(checkTokenValid());
22
+ const filesHook = useFiles(); // ← one single hook instance
23
+ return (
24
+ <>
25
+ {/* pass the same load & file‐list into both children */}
26
+ <Upload onUploaded={filesHook.load} />
27
+ <FileTable
28
+ files={filesHook.files}
29
+ loading={filesHook.loading}
30
+ error={filesHook.error}
31
+ onDownload={filesHook.toggleShare} // or downloadFile
32
+ onToggleShare={filesHook.toggleShare}
33
+ onPatchShare={filesHook.patchShareSettings}
34
+ onDelete={filesHook.deleteFile}
35
+ />
36
+
37
+ </>
38
+ )
39
+ }
40
+
41
+ export default SecureFiles;
@@ -0,0 +1,42 @@
1
+
2
+ body {
3
+ margin: 0;
4
+ font-family:
5
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
6
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
7
+ sans-serif;
8
+ -webkit-font-smoothing: antialiased;
9
+ -moz-osx-font-smoothing: grayscale;
10
+ }
11
+
12
+ code {
13
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
14
+ }
15
+
16
+
17
+ .logo {
18
+ height: 6em;
19
+ padding: 1.5em;
20
+ will-change: filter;
21
+ transition: filter 300ms;
22
+ }
23
+ .logo:hover {
24
+ filter: drop-shadow(0 0 2em #646cffaa);
25
+ }
26
+ .logo.react:hover {
27
+ filter: drop-shadow(0 0 2em #61dafbaa);
28
+ }
29
+
30
+ @keyframes logo-spin {
31
+ from { transform: rotate(0deg); }
32
+ to { transform: rotate(360deg); }
33
+ }
34
+
35
+ @media (prefers-reduced-motion: no-preference) {
36
+ a:nth-of-type(2) .logo {
37
+ animation: logo-spin infinite 20s linear;
38
+ }
39
+ }
40
+
41
+ .card { padding: 2em; }
42
+ .read-the-docs { color: #888; }
@@ -0,0 +1,10 @@
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
@@ -0,0 +1,3 @@
1
+ /* src/styles/tailwind.css */
2
+ @tailwind base;
3
+ @tailwind utilities;
@@ -0,0 +1,283 @@
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
+ }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export {SecureFiles} from './App';
package/testit.mjs ADDED
@@ -0,0 +1,11 @@
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 ADDED
@@ -0,0 +1,3 @@
1
+ import {secureFetchIt} from './src/functions';
2
+ const data = await secureFetchIt('links');
3
+ console.log(data);
package/tsconfig.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2017",
4
+ "module": "esnext",
5
+ "lib": [
6
+ "es2017",
7
+ "dom"
8
+ ],
9
+ "declaration": true,
10
+ "declarationDir": "dist/types",
11
+ "outDir": "dist",
12
+ "importHelpers": true,
13
+ "moduleResolution": "node",
14
+ "esModuleInterop": true,
15
+ "allowSyntheticDefaultImports": true,
16
+ "strict": true,
17
+ "jsx": "react-jsx",
18
+ "skipLibCheck": true,
19
+ "sourceMap": true
20
+ },
21
+ "include": [
22
+ "src/**/*"
23
+ ],
24
+ "exclude": [
25
+ "node_modules",
26
+ "dist"
27
+ ],
28
+
29
+ }
File without changes