From 4cb869f4d4a4c5cde3b971331e0ce7897c2e7cee Mon Sep 17 00:00:00 2001 From: Bissbert <43237892+Bissbert@users.noreply.github.com> Date: Tue, 12 May 2026 09:42:00 +0700 Subject: [PATCH] style(copy): scrub BrE, em-dashes, AI tells in lib hooks and README Remove auth copy from README project structure. Replace em-dashes in user-facing strings (error messages, labels, notes) with colons or semicolons. Correct defense->defence in sanitize-svg JSDoc. --- README.md | 1 - src/lib/calculator/cut-grades.ts | 4 ++-- src/lib/calculator/hanneman.ts | 2 +- src/lib/pleochroism/match-pleochroism.ts | 8 ++++---- src/lib/sanitize-svg.ts | 2 +- src/lib/spectroscope/reference-bands.ts | 8 ++++---- src/lib/treatments/wizard.ts | 2 +- 7 files changed, 13 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index a42f0b1..c8e26bc 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,6 @@ src/ │ ├── playground/ # CDL Playground components │ ├── quiz/ # Quiz and exam components │ ├── calculator/ # Gemmological calculator components -│ ├── auth/ # Authentication and protected routes │ └── layout/ # Layout components (Header, Footer) ├── hooks/ # React hooks (useCrystalDB, useQuiz, useExam, etc.) ├── layouts/ # Astro layouts diff --git a/src/lib/calculator/cut-grades.ts b/src/lib/calculator/cut-grades.ts index 86e5e89..a4f8c62 100644 --- a/src/lib/calculator/cut-grades.ts +++ b/src/lib/calculator/cut-grades.ts @@ -133,8 +133,8 @@ function describe(parameter: string, value: string, grade: CutGradeBand): Parame Excellent: 'within ideal range', 'Very Good': 'slightly outside ideal', Good: 'noticeably outside ideal', - Fair: 'well outside ideal — visible light leakage likely', - Poor: 'severe deviation — significant performance impact', + Fair: 'well outside ideal; visible light leakage likely', + Poor: 'severe deviation; significant performance impact', }; return { parameter, diff --git a/src/lib/calculator/hanneman.ts b/src/lib/calculator/hanneman.ts index 126d581..aadb485 100644 --- a/src/lib/calculator/hanneman.ts +++ b/src/lib/calculator/hanneman.ts @@ -114,7 +114,7 @@ export function combineBands(observations: HannemanCriteria[]): RIBand | null { return { min: lo, max: hi, - rationale: `Conflicting observations — please re-test. ${reasons.join(' ')}`, + rationale: `Conflicting observations. Please re-test. ${reasons.join(' ')}`, }; } return { diff --git a/src/lib/pleochroism/match-pleochroism.ts b/src/lib/pleochroism/match-pleochroism.ts index d6ae4e0..fcf536e 100644 --- a/src/lib/pleochroism/match-pleochroism.ts +++ b/src/lib/pleochroism/match-pleochroism.ts @@ -193,10 +193,10 @@ export function matchPleochroism( const reasonParts: string[] = []; reasonParts.push( storedCount === 3 - ? 'Trichroic — biaxial (orthorhombic, monoclinic, or triclinic).' + ? 'Trichroic: biaxial (orthorhombic, monoclinic, or triclinic).' : storedCount === 2 - ? 'Dichroic — uniaxial (trigonal, tetragonal, or hexagonal).' - : 'Single observed colour — pleochroism not detectable.', + ? 'Dichroic: uniaxial (trigonal, tetragonal, or hexagonal).' + : 'Single observed colour: pleochroism not detectable.', ); if (mineral.pleochroism_strength) { reasonParts.push( @@ -232,7 +232,7 @@ export function interpretColourCount(count: ObservedColourCount): { return { title: 'One colour observed', body: - 'The gem may be isotropic (cubic or amorphous — diamond, garnet, spinel, glass, opal), or anisotropic but viewed along its optic axis. Rotate the dichroscope and the stone; if no second colour appears at any orientation, isotropic is most likely.', + 'The gem may be isotropic (cubic or amorphous: diamond, garnet, spinel, glass, opal), or anisotropic but viewed along its optic axis. Rotate the dichroscope and the stone; if no second colour appears at any orientation, isotropic is most likely.', }; case 2: return { diff --git a/src/lib/sanitize-svg.ts b/src/lib/sanitize-svg.ts index f89b7fe..34e1e09 100644 --- a/src/lib/sanitize-svg.ts +++ b/src/lib/sanitize-svg.ts @@ -1,6 +1,6 @@ /** * SVG Sanitization utility using DOMPurify - * Provides defense-in-depth against XSS in SVG content + * Provides defence-in-depth against XSS in SVG content */ import DOMPurify from 'dompurify'; diff --git a/src/lib/spectroscope/reference-bands.ts b/src/lib/spectroscope/reference-bands.ts index 02b4676..5794cd9 100644 --- a/src/lib/spectroscope/reference-bands.ts +++ b/src/lib/spectroscope/reference-bands.ts @@ -45,7 +45,7 @@ export const SPECTROSCOPE_REFERENCE: SpectroscopeReference[] = [ familyId: 'corundum', name: 'Ruby (Cr-corundum)', bands: [ - { wavelength: 692, also: [694], intensity: 'strong', cause: 'Cr³⁺ doublet (R-lines)', selective: true, note: 'Sharp red doublet at 692/694 nm — the textbook ruby fingerprint.' }, + { wavelength: 692, also: [694], intensity: 'strong', cause: 'Cr³⁺ doublet (R-lines)', selective: true, note: 'Sharp red doublet at 692/694 nm: the textbook ruby fingerprint.' }, { wavelength: 660, intensity: 'weak', cause: 'Cr³⁺' }, { wavelength: 555, intensity: 'moderate', cause: 'Cr³⁺ broad absorption', note: 'Wide green absorption band.' }, { wavelength: 476, intensity: 'moderate', cause: 'Cr³⁺' }, @@ -93,7 +93,7 @@ export const SPECTROSCOPE_REFERENCE: SpectroscopeReference[] = [ { wavelength: 460, intensity: 'moderate', cause: 'Fe³⁺' }, { wavelength: 470, intensity: 'weak', cause: 'Fe³⁺' }, ], - observationNotes: 'Synthetic flame-fusion sapphire often lacks the 450 nm line — useful diagnostic.', + observationNotes: 'Synthetic flame-fusion sapphire often lacks the 450 nm line; useful diagnostic.', }, // Almandine garnet — Fe²⁺. { @@ -132,7 +132,7 @@ export const SPECTROSCOPE_REFERENCE: SpectroscopeReference[] = [ familyId: 'zircon', name: 'Zircon (high type)', bands: [ - { wavelength: 653, intensity: 'strong', cause: 'U⁴⁺', selective: true, note: 'Classic uranium-line at 653.5 nm — strongest in heat-treated blue zircon.' }, + { wavelength: 653, intensity: 'strong', cause: 'U⁴⁺', selective: true, note: 'Classic uranium-line at 653.5 nm; strongest in heat-treated blue zircon.' }, { wavelength: 659, intensity: 'moderate', cause: 'U⁴⁺' }, { wavelength: 691, intensity: 'weak', cause: 'U⁴⁺' }, { wavelength: 588, intensity: 'weak', cause: 'U⁴⁺' }, @@ -157,7 +157,7 @@ export const SPECTROSCOPE_REFERENCE: SpectroscopeReference[] = [ familyId: 'diamond', name: 'Cape-series diamond (N3)', bands: [ - { wavelength: 415, intensity: 'strong', cause: 'N3 centre', selective: true, note: 'Cape line at 415.5 nm — diagnostic of natural type-Ia diamond.' }, + { wavelength: 415, intensity: 'strong', cause: 'N3 centre', selective: true, note: 'Cape line at 415.5 nm: diagnostic of natural type-Ia diamond.' }, { wavelength: 478, intensity: 'weak', cause: 'N3 / H3' }, { wavelength: 504, intensity: 'weak', cause: 'H3 (irradiated)' }, ], diff --git a/src/lib/treatments/wizard.ts b/src/lib/treatments/wizard.ts index 1f6378f..de217b3 100644 --- a/src/lib/treatments/wizard.ts +++ b/src/lib/treatments/wizard.ts @@ -172,7 +172,7 @@ export const CLUES: ClueDef[] = [ }, { id: 'jadeite-acid-etch', - label: 'Jadeite — acid-etched / honeycomb surface texture', + label: 'Jadeite: acid-etched / honeycomb surface texture', effects: { bleaching: 4, 'oil-resin': 3 }, applicableTo: ['jadeite'], },