@striae-org/striae 3.0.4

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 (223) hide show
  1. package/.env.example +100 -0
  2. package/LICENSE +190 -0
  3. package/NOTICE +18 -0
  4. package/README.md +133 -0
  5. package/app/components/actions/case-export/core-export.ts +328 -0
  6. package/app/components/actions/case-export/data-processing.ts +167 -0
  7. package/app/components/actions/case-export/download-handlers.ts +900 -0
  8. package/app/components/actions/case-export/index.ts +41 -0
  9. package/app/components/actions/case-export/metadata-helpers.ts +107 -0
  10. package/app/components/actions/case-export/types-constants.ts +56 -0
  11. package/app/components/actions/case-export/validation-utils.ts +25 -0
  12. package/app/components/actions/case-export.ts +4 -0
  13. package/app/components/actions/case-import/annotation-import.ts +35 -0
  14. package/app/components/actions/case-import/confirmation-import.ts +363 -0
  15. package/app/components/actions/case-import/image-operations.ts +61 -0
  16. package/app/components/actions/case-import/index.ts +39 -0
  17. package/app/components/actions/case-import/orchestrator.ts +420 -0
  18. package/app/components/actions/case-import/storage-operations.ts +270 -0
  19. package/app/components/actions/case-import/validation.ts +189 -0
  20. package/app/components/actions/case-import/zip-processing.ts +413 -0
  21. package/app/components/actions/case-manage.ts +524 -0
  22. package/app/components/actions/case-review.ts +4 -0
  23. package/app/components/actions/confirm-export.ts +351 -0
  24. package/app/components/actions/generate-pdf.ts +210 -0
  25. package/app/components/actions/image-manage.ts +385 -0
  26. package/app/components/actions/notes-manage.ts +33 -0
  27. package/app/components/actions/signout.module.css +15 -0
  28. package/app/components/actions/signout.tsx +50 -0
  29. package/app/components/audit/user-audit-viewer.tsx +975 -0
  30. package/app/components/audit/user-audit.module.css +568 -0
  31. package/app/components/auth/auth-provider.tsx +78 -0
  32. package/app/components/auth/mfa-enrollment.module.css +268 -0
  33. package/app/components/auth/mfa-enrollment.tsx +398 -0
  34. package/app/components/auth/mfa-verification.module.css +251 -0
  35. package/app/components/auth/mfa-verification.tsx +295 -0
  36. package/app/components/button/button.module.css +63 -0
  37. package/app/components/button/button.tsx +46 -0
  38. package/app/components/canvas/box-annotations/box-annotations.module.css +170 -0
  39. package/app/components/canvas/box-annotations/box-annotations.tsx +634 -0
  40. package/app/components/canvas/canvas.module.css +314 -0
  41. package/app/components/canvas/canvas.tsx +449 -0
  42. package/app/components/canvas/confirmation/confirmation.module.css +187 -0
  43. package/app/components/canvas/confirmation/confirmation.tsx +214 -0
  44. package/app/components/colors/colors.module.css +59 -0
  45. package/app/components/colors/colors.tsx +68 -0
  46. package/app/components/form/base-form.tsx +21 -0
  47. package/app/components/form/form-button.tsx +28 -0
  48. package/app/components/form/form-field.tsx +53 -0
  49. package/app/components/form/form-message.tsx +17 -0
  50. package/app/components/form/form-toggle.tsx +23 -0
  51. package/app/components/form/form.module.css +427 -0
  52. package/app/components/form/index.ts +6 -0
  53. package/app/components/icon/icon.module.css +3 -0
  54. package/app/components/icon/icon.tsx +27 -0
  55. package/app/components/icon/icons.svg +102 -0
  56. package/app/components/icon/manifest.json +110 -0
  57. package/app/components/sidebar/case-export/case-export.module.css +386 -0
  58. package/app/components/sidebar/case-export/case-export.tsx +317 -0
  59. package/app/components/sidebar/case-import/case-import.module.css +626 -0
  60. package/app/components/sidebar/case-import/case-import.tsx +404 -0
  61. package/app/components/sidebar/case-import/components/CasePreviewSection.tsx +72 -0
  62. package/app/components/sidebar/case-import/components/ConfirmationDialog.tsx +72 -0
  63. package/app/components/sidebar/case-import/components/ConfirmationPreviewSection.tsx +71 -0
  64. package/app/components/sidebar/case-import/components/ExistingCaseSection.tsx +40 -0
  65. package/app/components/sidebar/case-import/components/FileSelector.tsx +161 -0
  66. package/app/components/sidebar/case-import/components/ProgressSection.tsx +46 -0
  67. package/app/components/sidebar/case-import/hooks/useFilePreview.ts +101 -0
  68. package/app/components/sidebar/case-import/hooks/useImportExecution.ts +152 -0
  69. package/app/components/sidebar/case-import/hooks/useImportState.ts +88 -0
  70. package/app/components/sidebar/case-import/index.ts +18 -0
  71. package/app/components/sidebar/case-import/utils/file-validation.ts +43 -0
  72. package/app/components/sidebar/cases/case-sidebar.tsx +827 -0
  73. package/app/components/sidebar/cases/cases-modal.module.css +166 -0
  74. package/app/components/sidebar/cases/cases-modal.tsx +201 -0
  75. package/app/components/sidebar/cases/cases.module.css +713 -0
  76. package/app/components/sidebar/files/files-modal.module.css +209 -0
  77. package/app/components/sidebar/files/files-modal.tsx +239 -0
  78. package/app/components/sidebar/hash/hash-utility.module.css +366 -0
  79. package/app/components/sidebar/hash/hash-utility.tsx +982 -0
  80. package/app/components/sidebar/notes/notes-modal.tsx +51 -0
  81. package/app/components/sidebar/notes/notes-sidebar.tsx +491 -0
  82. package/app/components/sidebar/notes/notes.module.css +360 -0
  83. package/app/components/sidebar/sidebar-container.tsx +149 -0
  84. package/app/components/sidebar/sidebar.module.css +321 -0
  85. package/app/components/sidebar/sidebar.tsx +215 -0
  86. package/app/components/sidebar/upload/image-upload-zone.module.css +123 -0
  87. package/app/components/sidebar/upload/image-upload-zone.tsx +330 -0
  88. package/app/components/theme-provider/theme-provider.tsx +131 -0
  89. package/app/components/theme-provider/theme.ts +155 -0
  90. package/app/components/toast/toast.module.css +137 -0
  91. package/app/components/toast/toast.tsx +56 -0
  92. package/app/components/toolbar/toolbar-color-selector.module.css +171 -0
  93. package/app/components/toolbar/toolbar-color-selector.tsx +129 -0
  94. package/app/components/toolbar/toolbar.module.css +42 -0
  95. package/app/components/toolbar/toolbar.tsx +167 -0
  96. package/app/components/user/delete-account.module.css +274 -0
  97. package/app/components/user/delete-account.tsx +471 -0
  98. package/app/components/user/inactivity-warning.module.css +145 -0
  99. package/app/components/user/inactivity-warning.tsx +84 -0
  100. package/app/components/user/manage-profile.module.css +190 -0
  101. package/app/components/user/manage-profile.tsx +253 -0
  102. package/app/components/user/mfa-phone-update.tsx +739 -0
  103. package/app/config-example/admin-service.json +13 -0
  104. package/app/config-example/config.json +17 -0
  105. package/app/config-example/firebase.ts +21 -0
  106. package/app/config-example/inactivity.ts +13 -0
  107. package/app/config-example/meta-config.json +6 -0
  108. package/app/contexts/auth.context.ts +12 -0
  109. package/app/entry.client.tsx +12 -0
  110. package/app/entry.server.tsx +44 -0
  111. package/app/hooks/useInactivityTimeout.ts +110 -0
  112. package/app/root.tsx +170 -0
  113. package/app/routes/_index.tsx +16 -0
  114. package/app/routes/auth/emailActionHandler.module.css +232 -0
  115. package/app/routes/auth/emailActionHandler.tsx +405 -0
  116. package/app/routes/auth/emailVerification.tsx +120 -0
  117. package/app/routes/auth/login.module.css +523 -0
  118. package/app/routes/auth/login.tsx +654 -0
  119. package/app/routes/auth/passwordReset.module.css +274 -0
  120. package/app/routes/auth/passwordReset.tsx +154 -0
  121. package/app/routes/auth/route.ts +16 -0
  122. package/app/routes/mobile-prevented/mobilePrevented.module.css +47 -0
  123. package/app/routes/mobile-prevented/mobilePrevented.tsx +26 -0
  124. package/app/routes/mobile-prevented/route.ts +14 -0
  125. package/app/routes/striae/striae.module.css +30 -0
  126. package/app/routes/striae/striae.tsx +417 -0
  127. package/app/services/audit-export.service.ts +755 -0
  128. package/app/services/audit.service.ts +1454 -0
  129. package/app/services/firebase-errors.ts +106 -0
  130. package/app/services/firebase.ts +15 -0
  131. package/app/styles/legal-pages.module.css +113 -0
  132. package/app/styles/root.module.css +146 -0
  133. package/app/tailwind.css +225 -0
  134. package/app/types/annotations.ts +45 -0
  135. package/app/types/audit.ts +301 -0
  136. package/app/types/case.ts +90 -0
  137. package/app/types/export.ts +8 -0
  138. package/app/types/file.ts +30 -0
  139. package/app/types/import.ts +107 -0
  140. package/app/types/index.ts +24 -0
  141. package/app/types/user.ts +38 -0
  142. package/app/utils/SHA256.ts +461 -0
  143. package/app/utils/annotation-timestamp.ts +25 -0
  144. package/app/utils/audit-export-signature.ts +117 -0
  145. package/app/utils/auth-action-settings.ts +48 -0
  146. package/app/utils/auth.ts +34 -0
  147. package/app/utils/batch-operations.ts +135 -0
  148. package/app/utils/confirmation-signature.ts +193 -0
  149. package/app/utils/data-operations.ts +871 -0
  150. package/app/utils/device-detection.ts +5 -0
  151. package/app/utils/html-sanitizer.ts +80 -0
  152. package/app/utils/id-generator.ts +36 -0
  153. package/app/utils/meta.ts +48 -0
  154. package/app/utils/mfa-phone.ts +97 -0
  155. package/app/utils/mfa.ts +79 -0
  156. package/app/utils/password-policy.ts +28 -0
  157. package/app/utils/permissions.ts +562 -0
  158. package/app/utils/signature-utils.ts +160 -0
  159. package/app/utils/style.ts +83 -0
  160. package/app/utils/version.ts +5 -0
  161. package/firebase.json +11 -0
  162. package/functions/[[path]].ts +10 -0
  163. package/package.json +138 -0
  164. package/postcss.config.js +6 -0
  165. package/public/.well-known/publickey.info@striae.org.asc +17 -0
  166. package/public/.well-known/security.txt +7 -0
  167. package/public/_headers +28 -0
  168. package/public/_routes.json +13 -0
  169. package/public/assets/striae.jpg +0 -0
  170. package/public/clear.jpg +0 -0
  171. package/public/favicon.ico +0 -0
  172. package/public/favicon.svg +9 -0
  173. package/public/icon-256.png +0 -0
  174. package/public/icon-512.png +0 -0
  175. package/public/logo-dark.png +0 -0
  176. package/public/manifest.json +25 -0
  177. package/public/oin-badge.png +0 -0
  178. package/public/shortcut.png +0 -0
  179. package/public/social-image.png +0 -0
  180. package/public/striae-ascii.txt +10 -0
  181. package/scripts/deploy-all.sh +100 -0
  182. package/scripts/deploy-config.sh +940 -0
  183. package/scripts/deploy-pages.sh +34 -0
  184. package/scripts/deploy-worker-secrets.sh +215 -0
  185. package/scripts/dev.cjs +23 -0
  186. package/scripts/install-workers.sh +88 -0
  187. package/scripts/run-eslint.cjs +35 -0
  188. package/scripts/update-compatibility-dates.cjs +124 -0
  189. package/scripts/update-markdown-versions.cjs +43 -0
  190. package/tailwind.config.ts +22 -0
  191. package/tsconfig.json +33 -0
  192. package/vite.config.ts +35 -0
  193. package/worker-configuration.d.ts +7490 -0
  194. package/workers/audit-worker/package.json +17 -0
  195. package/workers/audit-worker/src/audit-worker.example.ts +195 -0
  196. package/workers/audit-worker/worker-configuration.d.ts +7448 -0
  197. package/workers/audit-worker/wrangler.jsonc.example +29 -0
  198. package/workers/data-worker/package.json +17 -0
  199. package/workers/data-worker/src/data-worker.example.ts +267 -0
  200. package/workers/data-worker/src/signature-utils.ts +79 -0
  201. package/workers/data-worker/src/signing-payload-utils.ts +290 -0
  202. package/workers/data-worker/worker-configuration.d.ts +7448 -0
  203. package/workers/data-worker/wrangler.jsonc.example +30 -0
  204. package/workers/image-worker/package.json +17 -0
  205. package/workers/image-worker/src/image-worker.example.ts +180 -0
  206. package/workers/image-worker/worker-configuration.d.ts +7447 -0
  207. package/workers/image-worker/wrangler.jsonc.example +22 -0
  208. package/workers/keys-worker/package.json +17 -0
  209. package/workers/keys-worker/src/keys.example.ts +66 -0
  210. package/workers/keys-worker/src/keys.ts +66 -0
  211. package/workers/keys-worker/worker-configuration.d.ts +7447 -0
  212. package/workers/keys-worker/wrangler.jsonc.example +22 -0
  213. package/workers/pdf-worker/package.json +17 -0
  214. package/workers/pdf-worker/src/format-striae.ts +534 -0
  215. package/workers/pdf-worker/src/pdf-worker.example.ts +119 -0
  216. package/workers/pdf-worker/src/report-types.ts +69 -0
  217. package/workers/pdf-worker/worker-configuration.d.ts +7448 -0
  218. package/workers/pdf-worker/wrangler.jsonc.example +26 -0
  219. package/workers/user-worker/package.json +17 -0
  220. package/workers/user-worker/src/user-worker.example.ts +636 -0
  221. package/workers/user-worker/worker-configuration.d.ts +7448 -0
  222. package/workers/user-worker/wrangler.jsonc.example +29 -0
  223. package/wrangler.toml.example +8 -0
@@ -0,0 +1,360 @@
1
+ .notesSidebar {
2
+ padding: 0.3rem;
3
+ }
4
+
5
+ hr {
6
+ padding-bottom: 0.5rem;
7
+ margin: 0.5rem 0;
8
+ border: none;
9
+ border-top: 1px solid #ced4da;
10
+ }
11
+
12
+ .section {
13
+ margin-bottom: 2rem;
14
+ }
15
+
16
+ .sectionTitle {
17
+ font-size: 1.3rem;
18
+ font-weight: 600;
19
+ color: #495057;
20
+ margin-bottom: 1rem;
21
+ }
22
+
23
+ .inputGroup {
24
+ margin-bottom: 1.5rem;
25
+ }
26
+
27
+ label {
28
+ color: #000000 !important;
29
+ font-weight: 500;
30
+ }
31
+
32
+ input:disabled {
33
+ background-color: #e9ecef;
34
+ cursor: not-allowed;
35
+ }
36
+
37
+ .select {
38
+ width: 100%;
39
+ padding: 0.75rem;
40
+ border: 1.5px solid #ced4da;
41
+ border-radius: 6px;
42
+ font-size: 0.9rem;
43
+ background-color: white;
44
+ margin-bottom: 1rem;
45
+ }
46
+
47
+ .select:focus,
48
+ input[type="text"]:focus,
49
+ input[type="color"]:focus,
50
+ textarea:focus {
51
+ outline: none;
52
+ border-color: #0d6efd;
53
+ box-shadow: 0 0 0 2px rgba(13,110,253,.25);
54
+ }
55
+
56
+ .caseNumbers {
57
+ margin-bottom: 2rem;
58
+ }
59
+
60
+ .caseInput {
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: 0.75rem;
64
+ margin-bottom: 1rem;
65
+ }
66
+
67
+ .caseInput input {
68
+ width: 100%;
69
+ padding: 0.75rem;
70
+ border: 1.5px solid #ced4da;
71
+ border-radius: 6px;
72
+ font-size: 0.9rem;
73
+ transition: border-color 0.2s;
74
+ box-sizing: border-box;
75
+ }
76
+
77
+ .caseInput input:focus {
78
+ outline: none;
79
+ border-color: #0d6efd;
80
+ box-shadow: 0 0 0 2px rgba(13,110,253,.25);
81
+ }
82
+
83
+ .checkboxLabel {
84
+ display: flex;
85
+ align-items: center;
86
+ gap: 0.5rem;
87
+ font-size: 0.9rem;
88
+ color: #495057;
89
+ cursor: pointer;
90
+ user-select: none;
91
+ margin-bottom: 1.5rem;
92
+ }
93
+
94
+ .checkboxLabel:hover {
95
+ color: #0d6efd;
96
+ }
97
+
98
+ .classCharacteristics {
99
+ margin-bottom: 2rem;
100
+ }
101
+
102
+ .classCharacteristics input {
103
+ width: 100%;
104
+ padding: 0.75rem;
105
+ border: 1.5px solid #ced4da;
106
+ border-radius: 6px;
107
+ font-size: 0.9rem;
108
+ transition: border-color 0.2s;
109
+ }
110
+
111
+ .classCharacteristics select,
112
+ .support select {
113
+ width: 100%;
114
+ padding: 0.75rem;
115
+ border: 1.5px solid #ced4da;
116
+ border-radius: 6px;
117
+ font-size: 0.9rem;
118
+ margin-bottom: 1rem;
119
+ background-color: white;
120
+ box-sizing: border-box;
121
+ }
122
+
123
+ .classCharacteristics select:focus,
124
+ .support select:focus {
125
+ outline: none;
126
+ border-color: #0d6efd;
127
+ box-shadow: 0 0 0 2px rgba(13,110,253,.25);
128
+ }
129
+
130
+ .classCharacteristics textarea {
131
+ width: 100%;
132
+ padding: 0.75rem;
133
+ border: 1.5px solid #ced4da;
134
+ border-radius: 6px;
135
+ font-size: 0.9rem;
136
+ min-height: 100px;
137
+ resize: vertical;
138
+ box-sizing: border-box;
139
+ }
140
+
141
+ .classCharacteristics textarea:focus {
142
+ outline: none;
143
+ border-color: #0d6efd;
144
+ box-shadow: 0 0 0 2px rgba(13,110,253,.25);
145
+ margin-top: 1rem;
146
+ resize: vertical;
147
+ }
148
+
149
+ .indexing {
150
+ margin-bottom: 2rem;
151
+ }
152
+
153
+ .radioGroup {
154
+ display: flex;
155
+ gap: 1.5rem;
156
+ margin: 0.75rem 0;
157
+ padding: 0.5rem 0;
158
+ }
159
+
160
+ .radioGroup label,
161
+ .confirmation label {
162
+ display: flex;
163
+ align-items: center;
164
+ gap: 0.5rem;
165
+ color: #495057;
166
+ font-size: 0.9rem;
167
+ cursor: pointer;
168
+ user-select: none;
169
+ }
170
+
171
+ .radioGroup input[type="radio"],
172
+ .confirmation input[type="checkbox"],
173
+ .checkbox input[type="checkbox"] {
174
+ width: 1rem;
175
+ height: 1rem;
176
+ margin: 0;
177
+ cursor: pointer;
178
+ }
179
+
180
+ .indexing input[type="text"] {
181
+ width: 100%;
182
+ padding: 0.75rem;
183
+ border: 1.5px solid #ced4da;
184
+ border-radius: 6px;
185
+ font-size: 0.9rem;
186
+ margin-top: 0.5rem;
187
+ transition: border-color 0.2s;
188
+ box-sizing: border-box;
189
+ }
190
+
191
+ .indexing input[type="text"]:focus {
192
+ outline: none;
193
+ border-color: #0d6efd;
194
+ box-shadow: 0 0 0 2px rgba(13,110,253,.25);
195
+ }
196
+
197
+ .confirmation {
198
+ padding: 0.75rem;
199
+ background-color: #f8f9fa;
200
+ border-radius: 6px;
201
+ }
202
+
203
+ .returnButton {
204
+ width: 100%;
205
+ padding: 0.75rem;
206
+ background-color: #6c757d;
207
+ color: white;
208
+ border: none;
209
+ border-radius: 6px;
210
+ font-weight: 500;
211
+ cursor: pointer;
212
+ transition: all 0.2s;
213
+ margin-top: 1rem;
214
+ }
215
+
216
+ .returnButton:hover {
217
+ background-color: #5c636a;
218
+ }
219
+
220
+ .notesButton {
221
+ width: 100%;
222
+ padding: 0.75rem;
223
+ background-color: var(--primary);
224
+ color: white;
225
+ border: none;
226
+ border-radius: 6px;
227
+ font-weight: 500;
228
+ cursor: pointer;
229
+ transition: all 0.2s;
230
+ margin-bottom: 1rem;
231
+ margin-top: 1rem;
232
+ }
233
+
234
+ .notesButton:hover {
235
+ background-color: color-mix(in lab, var(--primary) 95%, transparent);
236
+ }
237
+
238
+ .modalOverlay {
239
+ position: fixed;
240
+ top: 0;
241
+ left: 0;
242
+ right: 0;
243
+ bottom: 0;
244
+ background-color: rgba(0, 0, 0, 0.5);
245
+ display: flex;
246
+ justify-content: center;
247
+ align-items: center;
248
+ z-index: 1000;
249
+ }
250
+
251
+ .modal {
252
+ background: white;
253
+ padding: 2rem;
254
+ border-radius: 8px;
255
+ width: 90%;
256
+ max-width: 500px;
257
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
258
+ }
259
+
260
+ .modalTitle {
261
+ margin-bottom: 1rem;
262
+ font-size: 1.2rem;
263
+ font-weight: 600;
264
+ color: #000000;
265
+ }
266
+
267
+ .modalTextarea {
268
+ width: 100%;
269
+ min-height: 200px;
270
+ padding: 0.75rem;
271
+ border: 1.5px solid #ced4da;
272
+ border-radius: 6px;
273
+ font-size: 0.9rem;
274
+ margin-bottom: 1rem;
275
+ resize: vertical;
276
+ box-sizing: border-box;
277
+ }
278
+
279
+ .modalButtons {
280
+ display: flex;
281
+ gap: 1rem;
282
+ justify-content: flex-end;
283
+ }
284
+
285
+ .cancelButton {
286
+ width: 30%;
287
+ padding: 0.75rem;
288
+ background-color: #dc3545;
289
+ color: white;
290
+ border: none;
291
+ border-radius: 6px;
292
+ font-weight: 500;
293
+ cursor: pointer;
294
+ transition: all 0.2s;
295
+ margin-bottom: 1rem;
296
+ }
297
+
298
+ .cancelButton:hover {
299
+ background-color: #bd2130;
300
+ }
301
+
302
+ .saveButton {
303
+ width: 100%;
304
+ padding: 0.75rem;
305
+ background-color: var(--accent);
306
+ color: white;
307
+ border: none;
308
+ border-radius: 6px;
309
+ font-weight: 500;
310
+ cursor: pointer;
311
+ transition: all 0.2s;
312
+ margin-top: 1rem;
313
+ margin-bottom: 1rem;
314
+ box-sizing: border-box;
315
+ }
316
+
317
+ .saveButton:hover {
318
+ background-color: color-mix(in lab, var(--accent) 95%, transparent);
319
+ }
320
+
321
+ .saveButton:hover,
322
+ .cancelButton:hover {
323
+ /* Transform handled by global styles */
324
+ }
325
+
326
+ .immutableNotice {
327
+ color: #0f5132;
328
+ background-color: #d1e7dd;
329
+ border: 1px solid #badbcc;
330
+ border-radius: 4px;
331
+ padding: 0.75rem;
332
+ margin: 0 0 1rem;
333
+ text-align: center;
334
+ }
335
+
336
+ .errorMessage {
337
+ color: var(--error);
338
+ background-color: var(--errorLight);
339
+ border: 1px solid color-mix(in lab, var(--error) 25%, var(--errorLight));
340
+ border-radius: 4px;
341
+ padding: 0.75rem;
342
+ margin: 0 0 1rem;
343
+ text-align: center;
344
+ }
345
+
346
+ .successMessage {
347
+ color: var(--success);
348
+ background-color: #d1e7dd;
349
+ border: 1px solid #badbcc;
350
+ border-radius: 4px;
351
+ padding: 0.75rem;
352
+ margin: 1rem 0;
353
+ text-align: center;
354
+ animation: fadeIn 0.3s ease-in;
355
+ }
356
+
357
+ @keyframes fadeIn {
358
+ from { opacity: 0; }
359
+ to { opacity: 1; }
360
+ }
@@ -0,0 +1,149 @@
1
+ /* eslint-disable jsx-a11y/no-static-element-interactions */
2
+ /* eslint-disable jsx-a11y/click-events-have-key-events */
3
+ import React, { useState, useEffect } from 'react';
4
+ import { Link } from '@remix-run/react';
5
+ import { Sidebar } from './sidebar';
6
+ import { User } from 'firebase/auth';
7
+ import { FileData } from '~/types';
8
+ import styles from './sidebar.module.css';
9
+ import { getAppVersion } from '../../utils/version';
10
+
11
+ interface SidebarContainerProps {
12
+ user: User;
13
+ onImageSelect: (file: FileData) => void;
14
+ imageId?: string;
15
+ onCaseChange: (caseNumber: string) => void;
16
+ currentCase: string;
17
+ setCurrentCase: (caseNumber: string) => void;
18
+ files: FileData[];
19
+ setFiles: React.Dispatch<React.SetStateAction<FileData[]>>;
20
+ imageLoaded: boolean;
21
+ setImageLoaded: (loaded: boolean) => void;
22
+ caseNumber: string;
23
+ setCaseNumber: (caseNumber: string) => void;
24
+ error: string;
25
+ setError: (error: string) => void;
26
+ successAction: 'loaded' | 'created' | 'deleted' | null;
27
+ setSuccessAction: (action: 'loaded' | 'created' | 'deleted' | null) => void;
28
+ showNotes: boolean;
29
+ setShowNotes: (show: boolean) => void;
30
+ onAnnotationRefresh?: () => void;
31
+ isReadOnly?: boolean;
32
+ isConfirmed?: boolean;
33
+ confirmationSaveVersion?: number;
34
+ }
35
+
36
+ export const SidebarContainer: React.FC<SidebarContainerProps> = (props) => {
37
+ const [isFooterModalOpen, setIsFooterModalOpen] = useState(false);
38
+ const year = new Date().getFullYear();
39
+ const appVersion = getAppVersion();
40
+
41
+ useEffect(() => {
42
+ const handleEscape = (e: KeyboardEvent) => {
43
+ if (e.key === 'Escape' && isFooterModalOpen) {
44
+ setIsFooterModalOpen(false);
45
+ }
46
+ };
47
+
48
+ if (isFooterModalOpen) {
49
+ document.addEventListener('keydown', handleEscape);
50
+ }
51
+
52
+ return () => {
53
+ document.removeEventListener('keydown', handleEscape);
54
+ };
55
+ }, [isFooterModalOpen]);
56
+
57
+ return (
58
+ <div style={{ display: 'flex', flexDirection: 'column', height: '100vh' }}>
59
+ {/* Main Sidebar */}
60
+ <Sidebar {...props} />
61
+
62
+ {/* Footer Section */}
63
+ <div className={styles.footerSection}>
64
+ <button
65
+ onClick={() => setIsFooterModalOpen(true)}
66
+ className={styles.footerSectionButton}
67
+ >
68
+ About & Support
69
+ </button>
70
+ </div>
71
+
72
+ {/* Footer Modal */}
73
+ {isFooterModalOpen && (
74
+ <div className={styles.footerModalOverlay} onClick={() => setIsFooterModalOpen(false)}>
75
+ <div className={styles.footerModal} onClick={(e) => e.stopPropagation()}>
76
+ <div className={styles.footerModalHeader}>
77
+ <h2 className={styles.footerModalTitle}>About Striae</h2>
78
+ <button
79
+ onClick={() => setIsFooterModalOpen(false)}
80
+ className={styles.footerModalClose}
81
+ >
82
+ ×
83
+ </button>
84
+ </div>
85
+ <div className={styles.footerModalContent}>
86
+ <div className={styles.footerModalLinks}>
87
+ <Link
88
+ to="https://striae.org/support"
89
+ target="_blank"
90
+ rel="noopener noreferrer"
91
+ className={styles.footerModalLink}>
92
+ Need Help?
93
+ </Link>
94
+ <Link
95
+ to="https://striae.org/bugs"
96
+ target="_blank"
97
+ rel="noopener noreferrer"
98
+ className={styles.footerModalLink}>
99
+ Report a Bug
100
+ </Link>
101
+ <Link
102
+ to="https://striae.org/privacy"
103
+ target="_blank"
104
+ rel="noopener noreferrer"
105
+ className={styles.footerModalLink}>
106
+ Privacy Policy
107
+ </Link>
108
+ <Link
109
+ to="https://striae.org/terms"
110
+ target="_blank"
111
+ rel="noopener noreferrer"
112
+ className={styles.footerModalLink}>
113
+ Terms of Service
114
+ </Link>
115
+ <Link
116
+ to="https://striae.org/security"
117
+ target="_blank"
118
+ rel="noopener noreferrer"
119
+ className={styles.footerModalLink}>
120
+ Security Policy
121
+ </Link>
122
+ </div>
123
+ <div className={styles.badgeContainer}>
124
+ <div className={styles.oinBadge}>
125
+ <a
126
+ href="https://openinventionnetwork.com/"
127
+ target="_blank"
128
+ rel="noopener noreferrer"
129
+ className={styles.oinBadgeLink}
130
+ >
131
+ <img
132
+ src="/oin-badge.png"
133
+ alt="Open Invention Network Community Member"
134
+ className={styles.oinBadgeImage}
135
+ />
136
+ </a>
137
+ </div>
138
+ </div>
139
+ <div className={styles.footerModalCopyright}>
140
+ <a href={`https://github.com/striae-org/striae/releases/tag/v${appVersion}`} className={styles.link} target="_blank" rel="noopener noreferrer">Striae v{appVersion}</a> © {year}.{' '}
141
+ Licensed under Apache 2.0.
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ )}
147
+ </div>
148
+ );
149
+ };