@jjlmoya/utils-forensic-science 1.5.0 → 1.6.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.
Files changed (32) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +3 -1
  3. package/src/entries.ts +5 -1
  4. package/src/index.ts +1 -0
  5. package/src/tests/locale_completeness.test.ts +2 -2
  6. package/src/tests/tool_validation.test.ts +2 -2
  7. package/src/tool/forensic-toolmark-striation-matcher/bibliography.astro +6 -0
  8. package/src/tool/forensic-toolmark-striation-matcher/bibliography.ts +16 -0
  9. package/src/tool/forensic-toolmark-striation-matcher/component.astro +121 -0
  10. package/src/tool/forensic-toolmark-striation-matcher/entry.ts +32 -0
  11. package/src/tool/forensic-toolmark-striation-matcher/forensic-toolmark-striation-matcher.css +580 -0
  12. package/src/tool/forensic-toolmark-striation-matcher/i18n/de.ts +301 -0
  13. package/src/tool/forensic-toolmark-striation-matcher/i18n/en.ts +301 -0
  14. package/src/tool/forensic-toolmark-striation-matcher/i18n/es.ts +301 -0
  15. package/src/tool/forensic-toolmark-striation-matcher/i18n/fr.ts +301 -0
  16. package/src/tool/forensic-toolmark-striation-matcher/i18n/id.ts +301 -0
  17. package/src/tool/forensic-toolmark-striation-matcher/i18n/it.ts +301 -0
  18. package/src/tool/forensic-toolmark-striation-matcher/i18n/ja.ts +301 -0
  19. package/src/tool/forensic-toolmark-striation-matcher/i18n/ko.ts +301 -0
  20. package/src/tool/forensic-toolmark-striation-matcher/i18n/nl.ts +301 -0
  21. package/src/tool/forensic-toolmark-striation-matcher/i18n/pl.ts +301 -0
  22. package/src/tool/forensic-toolmark-striation-matcher/i18n/pt.ts +301 -0
  23. package/src/tool/forensic-toolmark-striation-matcher/i18n/ru.ts +301 -0
  24. package/src/tool/forensic-toolmark-striation-matcher/i18n/sv.ts +301 -0
  25. package/src/tool/forensic-toolmark-striation-matcher/i18n/tr.ts +301 -0
  26. package/src/tool/forensic-toolmark-striation-matcher/i18n/zh.ts +301 -0
  27. package/src/tool/forensic-toolmark-striation-matcher/index.ts +11 -0
  28. package/src/tool/forensic-toolmark-striation-matcher/logic.ts +71 -0
  29. package/src/tool/forensic-toolmark-striation-matcher/renderer.ts +237 -0
  30. package/src/tool/forensic-toolmark-striation-matcher/seo.astro +15 -0
  31. package/src/tool/forensic-toolmark-striation-matcher/view.ts +291 -0
  32. package/src/tools.ts +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-forensic-science",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -13,6 +13,7 @@ import { forensicFiberComparisonMicroscope } from '../tool/forensic-fiber-compar
13
13
  import { bloodstainPatternOriginAnalyzer } from '../tool/bloodstain-pattern-origin-analyzer/index';
14
14
  import { forensicFingerprintMinutiaeIdentifier } from '../tool/forensic-fingerprint-minutiae-identifier/index';
15
15
  import { firePatternOriginAnalyzer } from '../tool/fire-pattern-origin-analyzer/index';
16
+ import { forensicToolmarkStriationMatcher } from '../tool/forensic-toolmark-striation-matcher/index';
16
17
 
17
18
  export const forensicCategory: ScienceCategoryEntry = {
18
19
  icon: 'mdi:fingerprint',
@@ -30,7 +31,8 @@ export const forensicCategory: ScienceCategoryEntry = {
30
31
  forensicFiberComparisonMicroscope,
31
32
  bloodstainPatternOriginAnalyzer,
32
33
  forensicFingerprintMinutiaeIdentifier,
33
- firePatternOriginAnalyzer
34
+ firePatternOriginAnalyzer,
35
+ forensicToolmarkStriationMatcher
34
36
  ],
35
37
  i18n: {
36
38
  de: () => import('./i18n/de').then((m) => m.content),
package/src/entries.ts CHANGED
@@ -26,6 +26,8 @@ export { forensicFingerprintMinutiaeIdentifier } from './tool/forensic-fingerpri
26
26
  export type { FingerprintMinutiaeUI, FingerprintMinutiaeLocaleContent } from './tool/forensic-fingerprint-minutiae-identifier/entry';
27
27
  export { firePatternOriginAnalyzer } from './tool/fire-pattern-origin-analyzer/entry';
28
28
  export type { FirePatternOriginAnalyzerUI, FirePatternOriginAnalyzerLocaleContent } from './tool/fire-pattern-origin-analyzer/entry';
29
+ export { forensicToolmarkStriationMatcher } from './tool/forensic-toolmark-striation-matcher/entry';
30
+ export type { ToolmarkStriationMatcherUI, ToolmarkStriationMatcherLocaleContent } from './tool/forensic-toolmark-striation-matcher/entry';
29
31
 
30
32
  import { forensicAgeEstimator } from './tool/forensic-age-estimator/entry';
31
33
  import { widmarkAlcoholSimulator } from './tool/widmark-alcohol-simulator/entry';
@@ -41,6 +43,7 @@ import { forensicFiberComparisonMicroscope } from './tool/forensic-fiber-compari
41
43
  import { bloodstainPatternOriginAnalyzer } from './tool/bloodstain-pattern-origin-analyzer/entry';
42
44
  import { forensicFingerprintMinutiaeIdentifier } from './tool/forensic-fingerprint-minutiae-identifier/entry';
43
45
  import { firePatternOriginAnalyzer } from './tool/fire-pattern-origin-analyzer/entry';
46
+ import { forensicToolmarkStriationMatcher } from './tool/forensic-toolmark-striation-matcher/entry';
44
47
 
45
48
  export const ALL_ENTRIES = [
46
49
  forensicAgeEstimator,
@@ -56,5 +59,6 @@ export const ALL_ENTRIES = [
56
59
  forensicFiberComparisonMicroscope,
57
60
  bloodstainPatternOriginAnalyzer,
58
61
  forensicFingerprintMinutiaeIdentifier,
59
- firePatternOriginAnalyzer
62
+ firePatternOriginAnalyzer,
63
+ forensicToolmarkStriationMatcher
60
64
  ];
package/src/index.ts CHANGED
@@ -14,6 +14,7 @@ export { FORENSIC_FIBER_COMPARISON_MICROSCOPE_TOOL } from './tool/forensic-fiber
14
14
  export { BLOODSTAIN_PATTERN_ORIGIN_ANALYZER_TOOL } from './tool/bloodstain-pattern-origin-analyzer/index';
15
15
  export { FORENSIC_FINGERPRINT_MINUTIAE_IDENTIFIER_TOOL } from './tool/forensic-fingerprint-minutiae-identifier/index';
16
16
  export { FIRE_PATTERN_ORIGIN_ANALYZER_TOOL } from './tool/fire-pattern-origin-analyzer/index';
17
+ export { FORENSIC_TOOLMARK_STRIATION_MATCHER_TOOL } from './tool/forensic-toolmark-striation-matcher/index';
17
18
 
18
19
  export type {
19
20
  KnownLocale,
@@ -18,7 +18,7 @@ describe('Locale Completeness Validation', () => {
18
18
  });
19
19
  });
20
20
 
21
- it('all 14 tools registered', () => {
22
- expect(ALL_TOOLS.length).toBe(14);
21
+ it('all 15 tools registered', () => {
22
+ expect(ALL_TOOLS.length).toBe(15);
23
23
  });
24
24
  });
@@ -4,8 +4,8 @@ import { scienceCategory } from '../data';
4
4
 
5
5
  describe('Tool Validation Suite', () => {
6
6
  describe('Library Registration', () => {
7
- it('should have 14 tools in ALL_TOOLS', () => {
8
- expect(ALL_TOOLS.length).toBe(14);
7
+ it('should have 15 tools in ALL_TOOLS', () => {
8
+ expect(ALL_TOOLS.length).toBe(15);
9
9
  });
10
10
 
11
11
  it('scienceCategory should be defined', () => {
@@ -0,0 +1,6 @@
1
+ ---
2
+ import { Bibliography as BibliographyRenderer } from '@jjlmoya/utils-shared';
3
+ import { bibliography } from './bibliography';
4
+ ---
5
+
6
+ <BibliographyRenderer links={bibliography} />
@@ -0,0 +1,16 @@
1
+ import type { BibliographyEntry } from '../../types';
2
+
3
+ export const bibliography: BibliographyEntry[] = [
4
+ {
5
+ name: 'AFTE Theory of Identification as it Relates to Toolmarks.',
6
+ url: 'https://temp.afte.org/about-us/what-is-afte/afte-theory-of-identification',
7
+ },
8
+ {
9
+ name: 'OSAC Registry: Firearms and Toolmarks Subcommittee standards and guidelines.',
10
+ url: 'https://www.nist.gov/organization-scientific-area-committees-forensic-science/firearms-toolmarks-subcommittee',
11
+ },
12
+ {
13
+ name: 'National Research Council. Strengthening Forensic Science in the United States: A Path Forward.',
14
+ url: 'https://nap.nationalacademies.org/catalog/12589/strengthening-forensic-science-in-the-united-states-a-path-forward',
15
+ },
16
+ ];
@@ -0,0 +1,121 @@
1
+ ---
2
+ import './forensic-toolmark-striation-matcher.css';
3
+
4
+ interface Props {
5
+ ui: Record<string, string>;
6
+ }
7
+
8
+ const { ui } = Astro.props;
9
+ ---
10
+
11
+ <section class="toolmark-shell" data-toolmark-tool>
12
+ <div class="toolmark-stage">
13
+ <div class="toolmark-view-wrap">
14
+ <div class="toolmark-view" aria-label={ui.viewerAria}>
15
+ <canvas id="toolmark-canvas" width="980" height="640"></canvas>
16
+ <input id="toolmark-split" class="toolmark-split" type="range" min="22" max="78" value="50" aria-label={ui.splitLabel} />
17
+ <div class="toolmark-handle" aria-hidden="true">
18
+ <span></span>
19
+ </div>
20
+ <div class="toolmark-score" id="toolmark-score-card">
21
+ <span>{ui.correlation}</span>
22
+ <strong id="toolmark-correlation">{ui.emptyValue}</strong>
23
+ <small id="toolmark-verdict">{ui.emptyValue}</small>
24
+ </div>
25
+ </div>
26
+ <div class="toolmark-strip" aria-hidden="true">
27
+ <span></span>
28
+ <span></span>
29
+ <span></span>
30
+ </div>
31
+ </div>
32
+
33
+ <aside class="toolmark-controls">
34
+ <div class="toolmark-panel">
35
+ <span class="toolmark-panel-label">{ui.loadImages}</span>
36
+ <label class="toolmark-upload">
37
+ <span>{ui.uploadKnown}</span>
38
+ <strong id="toolmark-known-name">{ui.noFile}</strong>
39
+ <input id="toolmark-known-file" type="file" accept="image/*" />
40
+ </label>
41
+ <label class="toolmark-upload">
42
+ <span>{ui.uploadQuestioned}</span>
43
+ <strong id="toolmark-questioned-name">{ui.noFile}</strong>
44
+ <input id="toolmark-questioned-file" type="file" accept="image/*" />
45
+ </label>
46
+ </div>
47
+
48
+ <div class="toolmark-panel">
49
+ <div class="toolmark-panel-head">
50
+ <span class="toolmark-panel-label">{ui.alignImage}</span>
51
+ <div class="toolmark-unit-toggle" role="group" aria-label={ui.units}>
52
+ <button type="button" data-toolmark-unit="metric" data-active="true">{ui.metric}</button>
53
+ <button type="button" data-toolmark-unit="imperial" data-active="false">{ui.imperial}</button>
54
+ </div>
55
+ </div>
56
+ <label class="toolmark-slider">
57
+ <span><b>{ui.offset}</b><strong id="toolmark-offset-label">-</strong></span>
58
+ <input id="toolmark-offset" type="range" min="-180" max="180" value="34" step="1" />
59
+ </label>
60
+
61
+ <label class="toolmark-slider">
62
+ <span><b>{ui.rotation}</b><strong id="toolmark-rotation-label">-</strong></span>
63
+ <input id="toolmark-rotation" type="range" min="-12" max="12" value="2.5" step="0.1" />
64
+ </label>
65
+
66
+ <label class="toolmark-slider">
67
+ <span><b>{ui.zoom}</b><strong id="toolmark-zoom-label">-</strong></span>
68
+ <input id="toolmark-zoom" type="range" min="50" max="260" value="100" step="2" />
69
+ </label>
70
+ </div>
71
+
72
+ <div class="toolmark-panel">
73
+ <span class="toolmark-panel-label">{ui.adjustImage}</span>
74
+ <div class="toolmark-tune">
75
+ <label>
76
+ <span>{ui.contrast}</span>
77
+ <input id="toolmark-contrast" type="range" min="50" max="180" value="108" step="1" />
78
+ </label>
79
+ <label>
80
+ <span>{ui.brightness}</span>
81
+ <input id="toolmark-brightness" type="range" min="55" max="150" value="100" step="1" />
82
+ </label>
83
+ </div>
84
+ </div>
85
+
86
+ <div class="toolmark-actions" aria-label={ui.outputControls}>
87
+ <button type="button" id="toolmark-reset">{ui.center}</button>
88
+ <button type="button" id="toolmark-grid" data-active="true">{ui.grid}</button>
89
+ <button type="button" id="toolmark-export">{ui.exportImage}</button>
90
+ </div>
91
+
92
+ <details class="toolmark-demo">
93
+ <summary>{ui.demoOptions}</summary>
94
+ <div class="toolmark-profile" role="group" aria-label={ui.toolProfile}>
95
+ <button type="button" data-toolmark-profile="screwdriver" data-active="true"><span>{ui.screwdriver}</span></button>
96
+ <button type="button" data-toolmark-profile="prybar" data-active="false"><span>{ui.prybar}</span></button>
97
+ <button type="button" data-toolmark-profile="boltCutter" data-active="false"><span>{ui.boltCutter}</span></button>
98
+ </div>
99
+ <div class="toolmark-bars">
100
+ <div>
101
+ <span>{ui.phaseFit}<strong id="toolmark-phase-label">{ui.zeroPercent}</strong></span>
102
+ <meter id="toolmark-phase" min="0" max="100" value="0"></meter>
103
+ </div>
104
+ <div>
105
+ <span>{ui.rotationFit}<strong id="toolmark-rotation-fit-label">{ui.zeroPercent}</strong></span>
106
+ <meter id="toolmark-rotation-fit" min="0" max="100" value="0"></meter>
107
+ </div>
108
+ </div>
109
+ </details>
110
+
111
+ <p class="toolmark-interpretation" id="toolmark-interpretation" aria-live="polite">{ui.emptyValue}</p>
112
+ </aside>
113
+ </div>
114
+ </section>
115
+
116
+ <script id="toolmark-ui" type="application/json" set:html={JSON.stringify(ui)}></script>
117
+ <script>
118
+ import { initToolmarkStriationMatcher } from './view';
119
+
120
+ initToolmarkStriationMatcher(JSON.parse(document.getElementById('toolmark-ui')?.textContent || '{}'));
121
+ </script>
@@ -0,0 +1,32 @@
1
+ import type { ScienceToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface ToolmarkStriationMatcherUI {
4
+ [key: string]: string;
5
+ }
6
+
7
+ export type ToolmarkStriationMatcherLocaleContent = ToolLocaleContent<ToolmarkStriationMatcherUI>;
8
+
9
+ export const forensicToolmarkStriationMatcher: ScienceToolEntry<ToolmarkStriationMatcherUI> = {
10
+ id: 'forensic-toolmark-striation-matcher',
11
+ icons: {
12
+ bg: 'mdi:tools',
13
+ fg: 'mdi:vector-polyline',
14
+ },
15
+ i18n: {
16
+ de: () => import('./i18n/de').then((m) => m.content),
17
+ en: () => import('./i18n/en').then((m) => m.content),
18
+ es: () => import('./i18n/es').then((m) => m.content),
19
+ fr: () => import('./i18n/fr').then((m) => m.content),
20
+ id: () => import('./i18n/id').then((m) => m.content),
21
+ it: () => import('./i18n/it').then((m) => m.content),
22
+ ja: () => import('./i18n/ja').then((m) => m.content),
23
+ ko: () => import('./i18n/ko').then((m) => m.content),
24
+ nl: () => import('./i18n/nl').then((m) => m.content),
25
+ pl: () => import('./i18n/pl').then((m) => m.content),
26
+ pt: () => import('./i18n/pt').then((m) => m.content),
27
+ ru: () => import('./i18n/ru').then((m) => m.content),
28
+ sv: () => import('./i18n/sv').then((m) => m.content),
29
+ tr: () => import('./i18n/tr').then((m) => m.content),
30
+ zh: () => import('./i18n/zh').then((m) => m.content),
31
+ },
32
+ };