@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,106 @@
1
+ import { FirebaseError } from 'firebase/app';
2
+
3
+ export const ERROR_MESSAGES = {
4
+ // Auth Errors
5
+ INVALID_EMAIL: 'Invalid email address',
6
+ INVALID_PASSWORD: 'Invalid password',
7
+ INVALID_CREDENTIALS: 'Invalid credentials',
8
+ USER_NOT_FOUND: 'No account found with this email',
9
+ EMAIL_IN_USE: 'An account with this email already exists',
10
+ ACTION_RESTRICTED: 'Operation not allowed',
11
+ PASSWORDS_MISMATCH: 'Passwords do not match',
12
+ WEAK_PASSWORD: 'Password does not meet strength requirements',
13
+ REQUIRES_RECENT_LOGIN: 'Please sign in again to complete this action',
14
+ USER_DISABLED: 'This account has been disabled',
15
+
16
+ // Reset/Verify Errors
17
+ RESET_EMAIL_SENT: 'Password reset email sent! Check your inbox',
18
+ INVALID_ACTION_CODE: 'This email action link is invalid or has already been used.',
19
+ EXPIRED_ACTION_CODE: 'This email action link has expired. Please request a new one.',
20
+ INVALID_CONTINUE_URL: 'This email action link has an invalid redirect URL.',
21
+
22
+ // MFA Errors
23
+ MFA_REQUIRED: 'Multi-factor authentication required',
24
+ MFA_INVALID_CODE: 'Invalid verification code. Please check your code and try again.',
25
+ MFA_CODE_EXPIRED: 'Verification code has expired. Please request a new code.',
26
+ MFA_TOO_MANY_REQUESTS: 'Too many requests. Please try again later',
27
+ MFA_INVALID_PHONE: 'Please enter a valid phone number',
28
+ MFA_NO_VERIFICATION_ID: 'No verification ID found. Please request a new code.',
29
+ MFA_RECAPTCHA_EXPIRED: 'reCAPTCHA expired. Please send another code.',
30
+ MFA_RECAPTCHA_ERROR: 'reCAPTCHA needs to be reset. Please send another code.',
31
+ MFA_CODE_REQUIRED: 'Please enter the verification code',
32
+
33
+ // General
34
+ GENERAL_ERROR: 'Something went wrong. Please contact support.',
35
+ NO_USER: 'No user found',
36
+ PROFILE_UPDATED: 'Profile updated successfully'
37
+ };
38
+
39
+ interface AuthErrorData {
40
+ code: string;
41
+ message: string;
42
+ }
43
+
44
+ export const handleAuthError = (err: unknown): { message: string; data?: AuthErrorData } => {
45
+ if (err instanceof FirebaseError) {
46
+ const errorData: AuthErrorData = {
47
+ code: err.code,
48
+ message: err.message
49
+ };
50
+
51
+ switch (err.code) {
52
+ // Standard Auth Errors
53
+ case 'auth/invalid-credential':
54
+ return { message: ERROR_MESSAGES.INVALID_CREDENTIALS, data: errorData };
55
+ case 'auth/wrong-password':
56
+ return { message: ERROR_MESSAGES.INVALID_PASSWORD, data: errorData };
57
+ case 'auth/user-not-found':
58
+ return { message: ERROR_MESSAGES.USER_NOT_FOUND, data: errorData };
59
+ case 'auth/email-already-in-use':
60
+ return { message: ERROR_MESSAGES.EMAIL_IN_USE, data: errorData };
61
+ case 'auth/invalid-email':
62
+ return { message: ERROR_MESSAGES.INVALID_EMAIL, data: errorData };
63
+ case 'auth/weak-password':
64
+ return { message: ERROR_MESSAGES.WEAK_PASSWORD, data: errorData };
65
+ case 'auth/requires-recent-login':
66
+ return { message: ERROR_MESSAGES.REQUIRES_RECENT_LOGIN, data: errorData };
67
+ case 'auth/user-disabled':
68
+ return { message: ERROR_MESSAGES.USER_DISABLED, data: errorData };
69
+ case 'auth/invalid-action-code':
70
+ return { message: ERROR_MESSAGES.INVALID_ACTION_CODE, data: errorData };
71
+ case 'auth/expired-action-code':
72
+ return { message: ERROR_MESSAGES.EXPIRED_ACTION_CODE, data: errorData };
73
+ case 'auth/invalid-continue-uri':
74
+ case 'auth/missing-continue-uri':
75
+ case 'auth/unauthorized-continue-uri':
76
+ return { message: ERROR_MESSAGES.INVALID_CONTINUE_URL, data: errorData };
77
+
78
+ // MFA Errors
79
+ case 'auth/multi-factor-auth-required':
80
+ return { message: ERROR_MESSAGES.MFA_REQUIRED, data: errorData };
81
+ case 'auth/invalid-verification-code':
82
+ return { message: ERROR_MESSAGES.MFA_INVALID_CODE, data: errorData };
83
+ case 'auth/code-expired':
84
+ return { message: ERROR_MESSAGES.MFA_CODE_EXPIRED, data: errorData };
85
+ case 'auth/too-many-requests':
86
+ return { message: ERROR_MESSAGES.MFA_TOO_MANY_REQUESTS, data: errorData };
87
+
88
+ // Operation Errors
89
+ case 'auth/operation-not-allowed':
90
+ case 'auth/admin-restricted-operation':
91
+ return { message: ERROR_MESSAGES.ACTION_RESTRICTED, data: errorData };
92
+
93
+ default:
94
+ console.error('Firebase Auth Error:', errorData);
95
+ return { message: ERROR_MESSAGES.GENERAL_ERROR, data: errorData };
96
+ }
97
+ }
98
+
99
+ console.error('Unknown Error:', err);
100
+ return { message: ERROR_MESSAGES.GENERAL_ERROR };
101
+ };
102
+
103
+ // Helper function to get validation error messages
104
+ export const getValidationError = (type: keyof typeof ERROR_MESSAGES): string => {
105
+ return ERROR_MESSAGES[type];
106
+ };
@@ -0,0 +1,15 @@
1
+ import { initializeApp } from 'firebase/app';
2
+ import {
3
+ getAuth,
4
+ //connectAuthEmulator,
5
+ } from 'firebase/auth';
6
+ import firebaseConfig from '~/config/firebase';
7
+ import { getAppVersion } from '~/utils/version';
8
+
9
+ export const app = initializeApp(firebaseConfig, "Striae");
10
+ export const auth = getAuth(app);
11
+
12
+ console.log(`Welcome to ${app.name} v${getAppVersion()}`);
13
+
14
+ //Connect to the Firebase Auth emulator if running locally
15
+ //connectAuthEmulator(auth, 'http://127.0.0.1:9099');
@@ -0,0 +1,113 @@
1
+ .content {
2
+ background: color-mix(in lab, var(--backgroundLight) 95%, transparent);
3
+ border-radius: var(--spaceXS);
4
+ padding: var(--space2XL);
5
+ box-shadow: 0 var(--spaceXS) var(--spaceL) color-mix(in lab, var(--black) 10%, transparent);
6
+ line-height: var(--lineHeightBody);
7
+ }
8
+
9
+ .content h1 {
10
+ font-size: var(--fontSizeH4);
11
+ margin-bottom: var(--spaceM);
12
+ color: var(--textTitle);
13
+ }
14
+
15
+ .content p {
16
+ margin-bottom: var(--spaceM);
17
+ color: var(--textBody);
18
+ }
19
+
20
+ .content h2 {
21
+ font-size: var(--fontSizeH5);
22
+ }
23
+
24
+ .section {
25
+ margin-bottom: var(--space2XL);
26
+ }
27
+
28
+ .section h4 {
29
+ color: var(--textTitle);
30
+ margin-bottom: var(--spaceM);
31
+ }
32
+
33
+ .section h2 {
34
+ font-size: var(--fontSizeH5);
35
+ margin-top: var(--spaceXL);
36
+ }
37
+
38
+ .section h2:first-child {
39
+ margin-top: 0;
40
+ }
41
+
42
+ .section h3 {
43
+ font-size: var(--fontSizeBodyXL);
44
+ margin-top: var(--spaceXL);
45
+ }
46
+
47
+ .section h4 {
48
+ font-size: var(--fontSizeBodyL);
49
+ }
50
+
51
+ .section p,
52
+ .section ul {
53
+ margin-bottom: var(--spaceM);
54
+ color: var(--textBody);
55
+ }
56
+
57
+ .section ul {
58
+ padding-left: var(--spaceXL);
59
+ list-style-type: disc;
60
+ }
61
+
62
+ .section ol {
63
+ padding-left: var(--spaceXL);
64
+ list-style-type: decimal;
65
+ margin-bottom: var(--spaceM);
66
+ color: var(--textBody);
67
+ }
68
+
69
+ .section li {
70
+ margin-bottom: var(--spaceS);
71
+ color: var(--textBody);
72
+ }
73
+
74
+ .lastUpdated {
75
+ color: var(--textLight);
76
+ font-size: var(--fontSizeBodyXS);
77
+ margin-bottom: var(--space2XL);
78
+ }
79
+
80
+ .section p small {
81
+ font-size: var(--fontSizeBodyS);
82
+ color: var(--textLight);
83
+ opacity: 0.9;
84
+ }
85
+
86
+ .section a {
87
+ color: var(--primary);
88
+ text-decoration: underline;
89
+ }
90
+
91
+ .section a:hover {
92
+ color: var(--accent);
93
+ }
94
+
95
+ @media (max-width: 1296px) {
96
+ .logo {
97
+ display: none;
98
+ }
99
+
100
+ .returnLink {
101
+ display: block;
102
+ margin-left: auto;
103
+ margin-right: auto;
104
+ }
105
+
106
+ .container {
107
+ padding: var(--spaceM);
108
+ }
109
+
110
+ .content {
111
+ padding: var(--spaceXL);
112
+ }
113
+ }
@@ -0,0 +1,146 @@
1
+ @layer layout {
2
+
3
+ .container {
4
+ width: 100%;
5
+ position: relative;
6
+ transition: opacity 0.8s var(--bezierFastoutSlowin);
7
+
8
+ &[data-loading='true'] {
9
+ opacity: 0;
10
+ }
11
+ }
12
+
13
+ .skip {
14
+ isolation: isolate;
15
+ color: var(--background);
16
+ z-index: var(--zIndex4);
17
+
18
+ &:focus {
19
+ padding: var(--spaceS) var(--spaceM);
20
+ position: fixed;
21
+ top: var(--spaceM);
22
+ left: var(--spaceM);
23
+ text-decoration: none;
24
+ font-weight: var(--fontWeightMedium);
25
+ line-height: 1;
26
+ box-shadow: 0 0 0 4px var(--background), 0 0 0 8px var(--text);
27
+ }
28
+
29
+ &::before {
30
+ content: '';
31
+ position: absolute;
32
+ inset: 0;
33
+ background-color: var(--primary);
34
+ clip-path: polygon(
35
+ 0 0,
36
+ 100% 0,
37
+ 100% calc(100% - 8px),
38
+ calc(100% - 8px) 100%,
39
+ 0 100%
40
+ );
41
+ z-index: -1;
42
+ }
43
+ }
44
+
45
+ .errorContainer {
46
+ display: flex;
47
+ flex-direction: column;
48
+ align-items: center;
49
+ justify-content: center;
50
+ min-height: 100vh;
51
+ padding: var(--space2XL);
52
+ text-align: center;
53
+ background: var(--background);
54
+ }
55
+
56
+ .errorTitle {
57
+ font-size: var(--fontSizeH0);
58
+ font-weight: var(--fontWeightBold);
59
+ color: var(--textTitle);
60
+ margin-bottom: var(--spaceXL);
61
+ line-height: 1;
62
+ }
63
+
64
+ .errorMessage {
65
+ font-size: var(--fontSizeH4);
66
+ color: var(--textBody);
67
+ margin: var(--spaceL) 0 var(--spaceXL);
68
+ max-width: 600px;
69
+ }
70
+
71
+ .errorLink {
72
+ color: var(--primary);
73
+ text-decoration: none;
74
+ font-size: var(--fontSizeBodyL);
75
+ font-weight: var(--fontWeightMedium);
76
+ padding: var(--spaceM) var(--spaceL);
77
+ border-radius: var(--radiusS);
78
+ transition: all var(--durationS) var(--bezierFastoutSlowin);
79
+ }
80
+
81
+ .errorLink:hover {
82
+ background: color-mix(in lab, var(--primary) 10%, transparent);
83
+ color: color-mix(in lab, var(--primary) 85%, var(--black));
84
+ }
85
+
86
+ .returnToTop {
87
+ position: fixed;
88
+ right: var(--space2XL);
89
+ bottom: var(--spaceM);
90
+ width: 50px;
91
+ height: 50px;
92
+ border: none;
93
+ background: transparent;
94
+ color: color-mix(in lab, var(--white) 60%, var(--textLight));
95
+ display: inline-flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ z-index: var(--zIndex4);
99
+ cursor: pointer;
100
+ transition: all var(--durationS) var(--bezierFastoutSlowin);
101
+ }
102
+
103
+ .returnToTop:hover {
104
+ color: var(--primary);
105
+ }
106
+
107
+ .returnToTopIcon {
108
+ transform: rotate(-90deg);
109
+ color: color-mix(in lab, var(--white) 60%, var(--textLight));
110
+ filter: drop-shadow(0 0 1px color-mix(in lab, var(--black) 45%, transparent))
111
+ drop-shadow(0 0 1px color-mix(in lab, var(--white) 45%, transparent));
112
+ transition: color var(--durationS) var(--bezierFastoutSlowin);
113
+ }
114
+
115
+ .returnToTop:hover .returnToTopIcon {
116
+ color: var(--primary);
117
+ }
118
+
119
+ /* Global enhanced button hover effects */
120
+ :global(button:not([data-no-enhance]):hover:not(:disabled)) {
121
+ transform: translateY(-1px);
122
+ transition: all var(--durationS) var(--bezierFastoutSlowin);
123
+ }
124
+
125
+ :global(button[class*="Button"]:hover:not(:disabled)) {
126
+ transform: translateY(-1px);
127
+ box-shadow: 0 2px 6px color-mix(in lab, currentColor 20%, transparent);
128
+ transition: all var(--durationS) var(--bezierFastoutSlowin);
129
+ }
130
+
131
+ /* Ensure disabled buttons don't get transforms */
132
+ :global(button:disabled) {
133
+ transform: none !important;
134
+ }
135
+
136
+ @media (max-width: 768px) {
137
+ .errorTitle {
138
+ font-size: var(--fontSizeH1);
139
+ }
140
+
141
+ .errorMessage {
142
+ font-size: var(--fontSizeBodyL);
143
+ }
144
+ }
145
+
146
+ }
@@ -0,0 +1,225 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ :root {
7
+ font-synthesis: none;
8
+ text-rendering: optimizeLegibility;
9
+ -moz-osx-font-smoothing: grayscale;
10
+ -webkit-font-smoothing: antialiased;
11
+ --mobileNavOffset: calc(var(--spaceOuter) * 2 + var(--space2XL));
12
+ }
13
+
14
+ :where(html, body) {
15
+ min-height: 100%;
16
+ width: 100%;
17
+ }
18
+
19
+ :where(*, *::before, *::after) {
20
+ box-sizing: border-box;
21
+ margin: 0;
22
+ min-width: 0;
23
+ }
24
+
25
+ :where(input, textarea, select, button) {
26
+ font: inherit;
27
+ color: inherit;
28
+ border: 0;
29
+ padding: 0;
30
+ background-color: transparent;
31
+ border-radius: 0;
32
+ appearance: auto;
33
+ -moz-appearance: auto;
34
+ -webkit-appearance: auto;
35
+ color: var(--textBody, rgba(0, 0, 0, 0.8));
36
+ }
37
+
38
+ :where(button, a) {
39
+ touch-action: manipulation;
40
+ }
41
+
42
+ :where(svg, img, picture, video, iframe, canvas) {
43
+ display: block;
44
+ }
45
+
46
+ ul {
47
+ padding: 0;
48
+ }
49
+
50
+ html,
51
+ body {
52
+ margin: 0;
53
+ padding: 0;
54
+ height: 100vh;
55
+ width: 100vw;
56
+ min-height: screen;
57
+ overflow-x: hidden;
58
+ font-family: var(--fontStack);
59
+ font-weight: var(--fontWeightRegular);
60
+ color: var(--textBody);
61
+ background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.95)),
62
+ url("/assets/striae.jpg") center/cover no-repeat fixed;
63
+ background-blend-mode: normal;
64
+ transition: background var(--durationM) ease, opacity var(--durationM) ease;
65
+ opacity: 1;
66
+ }
67
+
68
+ a {
69
+ color: var(--primary);
70
+ text-decoration: none;
71
+ transition: color var(--durationS) ease;
72
+
73
+ &:hover,
74
+ &:focus,
75
+ &:active {
76
+ text-decoration: underline;
77
+ text-decoration-style: dotted;
78
+ text-underline-offset: 3px;
79
+ }
80
+ }
81
+
82
+ h2 {
83
+ color: var(--textTitle);
84
+ font-size: var(--fontSizeH4);
85
+ font-weight: var(--fontWeightBold);
86
+ line-height: var(--lineHeightHeading);
87
+ margin: var(--spaceM) 0 var(--spaceM);
88
+ }
89
+
90
+ h3 {
91
+ color: var(--textTitle);
92
+ font-size: var(--fontSizeH5);
93
+ font-weight: var(--fontWeightMedium);
94
+ line-height: var(--lineHeightHeading);
95
+ margin: var(--spaceL) 0 var(--spaceM);
96
+ }
97
+
98
+ code,
99
+ pre {
100
+ font-family: var(--monoFontStack);
101
+ }
102
+
103
+ ::selection {
104
+ background: var(--primary);
105
+ color: var(--white);
106
+ }
107
+
108
+ :focus {
109
+ outline: 4px solid var(--text);
110
+ outline-offset: 4px;
111
+
112
+ &:not(:focus-visible) {
113
+ outline: none;
114
+ }
115
+ }
116
+ }
117
+
118
+ @keyframes fade-in {
119
+ from {
120
+ opacity: 0;
121
+ }
122
+ to {
123
+ opacity: 1;
124
+ }
125
+ }
126
+
127
+ @keyframes reveal {
128
+ 0% {
129
+ transform: scale3d(0, 1, 1);
130
+ transform-origin: left;
131
+ }
132
+ 50% {
133
+ transform: scale3d(1, 1, 1);
134
+ transform-origin: left;
135
+ }
136
+ 51% {
137
+ transform: scale3d(1, 1, 1);
138
+ transform-origin: right;
139
+ }
140
+ 100% {
141
+ transform: scale3d(0, 1, 1);
142
+ transform-origin: right;
143
+ }
144
+ }
145
+
146
+ @layer components {
147
+ .route-legal-container {
148
+ max-width: var(--maxWidthL);
149
+ margin: 0 auto;
150
+ padding: var(--space2XL);
151
+ }
152
+
153
+ .route-centered-container {
154
+ position: relative;
155
+ display: flex;
156
+ justify-content: center;
157
+ align-items: center;
158
+ min-height: 100vh;
159
+ padding: var(--spaceL);
160
+ z-index: var(--zIndex0);
161
+ }
162
+
163
+ .route-brand-logo {
164
+ position: fixed;
165
+ top: var(--spaceL);
166
+ left: var(--spaceL);
167
+ width: 150px;
168
+ height: 150px;
169
+ background-image: url("/logo-dark.png");
170
+ background-size: contain;
171
+ background-repeat: no-repeat;
172
+ background-position: center;
173
+ z-index: var(--zIndex2);
174
+ transition: transform var(--durationM) var(--bezierFastoutSlowin);
175
+ }
176
+
177
+ .route-brand-logo-link {
178
+ position: absolute;
179
+ top: var(--spaceL);
180
+ left: var(--spaceL);
181
+ text-decoration: none;
182
+ }
183
+
184
+ .route-brand-return-link {
185
+ display: none;
186
+ width: 150px;
187
+ height: 150px;
188
+ background-image: url("/logo-dark.png");
189
+ background-size: contain;
190
+ background-repeat: no-repeat;
191
+ background-position: center;
192
+ margin-bottom: var(--spaceM);
193
+ transition: transform var(--durationM) var(--bezierFastoutSlowin);
194
+ }
195
+
196
+ .route-brand-logo:hover,
197
+ .route-brand-return-link:hover {
198
+ transform: scale(1.05);
199
+ }
200
+
201
+ .route-form-wrapper {
202
+ background: color-mix(in lab, var(--backgroundLight) 95%, transparent);
203
+ padding: var(--space2XL);
204
+ border-radius: var(--spaceXS);
205
+ box-shadow: 0 var(--spaceXS) var(--spaceM)
206
+ color-mix(in lab, var(--black) 10%, transparent);
207
+ width: 100%;
208
+ margin: var(--spaceL) auto;
209
+ }
210
+
211
+ .route-form-title {
212
+ text-align: center;
213
+ color: var(--textTitle);
214
+ margin-bottom: var(--spaceXL);
215
+ font-size: var(--fontSizeH4);
216
+ }
217
+
218
+ .route-form-subtitle {
219
+ text-align: center;
220
+ color: var(--textBody);
221
+ margin-bottom: var(--space2XL);
222
+ font-size: var(--fontSizeBodyM);
223
+ line-height: var(--lineHeightBody);
224
+ }
225
+ }
@@ -0,0 +1,45 @@
1
+ // Annotation-related types and interfaces
2
+
3
+ export interface BoxAnnotation {
4
+ id: string;
5
+ x: number;
6
+ y: number;
7
+ width: number;
8
+ height: number;
9
+ color: string;
10
+ label?: string;
11
+ timestamp: string;
12
+ }
13
+
14
+ export interface ConfirmationData {
15
+ fullName: string; // Confirming examiner's full name
16
+ badgeId: string; // Badge/ID number of confirming examiner
17
+ timestamp: string; // Human-readable confirmation timestamp
18
+ confirmationId: string; // Unique ID generated at confirmation time
19
+ confirmedBy: string; // User UID of the confirming examiner
20
+ confirmedByEmail: string; // Email of the confirming examiner
21
+ confirmedByCompany: string; // Company/Lab of the confirming examiner
22
+ confirmedAt: string; // ISO timestamp of confirmation
23
+ }
24
+
25
+ export interface AnnotationData {
26
+ leftCase: string;
27
+ rightCase: string;
28
+ leftItem: string;
29
+ rightItem: string;
30
+ caseFontColor?: string;
31
+ classType?: 'Bullet' | 'Cartridge Case' | 'Other';
32
+ customClass?: string;
33
+ classNote?: string;
34
+ indexType?: 'number' | 'color';
35
+ indexNumber?: string;
36
+ indexColor?: string;
37
+ supportLevel?: 'ID' | 'Exclusion' | 'Inconclusive';
38
+ hasSubclass?: boolean;
39
+ includeConfirmation: boolean;
40
+ confirmationData?: ConfirmationData;
41
+ additionalNotes?: string;
42
+ boxAnnotations?: BoxAnnotation[];
43
+ updatedAt: string;
44
+ earliestAnnotationTimestamp?: string; // ISO timestamp of first annotation created (notes or box)
45
+ }