From e8347fa5a590216bbb9dd8bd77c9d1255e549a67 Mon Sep 17 00:00:00 2001
From: 0x1eef <0x1eef@protonmail.com>
Date: Tue, 30 Apr 2024 05:51:59 -0300
Subject: [PATCH] Add packages/typescript/Quran/
---
.gitignore | 2 +
nanoc/lib/mixin/inline.rb | 3 +-
package-lock.json | 33 +
packages/typescript/Quran/package.json | 21 +
packages/typescript/Quran/src/index.ts | 72 +
packages/typescript/Quran/tsconfig.json | 15 +
src/html/stream.html.erb | 2 +-
src/js/components/AudioControl.tsx | 19 +-
src/js/components/Head.tsx | 4 +-
src/js/components/Stream.tsx | 15 +-
src/js/components/SurahIndex/Filter.tsx | 10 +-
src/js/components/SurahIndex/index.tsx | 14 +-
src/js/components/SurahStream.tsx | 28 +-
src/js/components/Timer.tsx | 14 +-
src/js/lib/Quran.ts | 20 -
src/js/lib/Quran/Ayah.ts | 19 -
src/js/lib/Quran/JSON.ts | 12 -
src/js/lib/Quran/Surah.ts | 72 -
src/js/lib/i18n.ts | 8 +-
src/js/loaders/SurahStreamLoader.ts | 15 -
src/js/main/surah-index.tsx | 12 +-
src/js/main/surah-stream.tsx | 38 +-
src/json/ar/1/surah.json | 2 +-
src/json/ar/10/surah.json | 2 +-
src/json/ar/100/surah.json | 2 +-
src/json/ar/101/surah.json | 2 +-
src/json/ar/102/surah.json | 2 +-
src/json/ar/103/surah.json | 2 +-
src/json/ar/104/surah.json | 2 +-
src/json/ar/105/surah.json | 2 +-
src/json/ar/106/surah.json | 2 +-
src/json/ar/107/surah.json | 2 +-
src/json/ar/108/surah.json | 2 +-
src/json/ar/109/surah.json | 2 +-
src/json/ar/11/surah.json | 2 +-
src/json/ar/110/surah.json | 2 +-
src/json/ar/111/surah.json | 2 +-
src/json/ar/112/surah.json | 2 +-
src/json/ar/113/surah.json | 2 +-
src/json/ar/114/surah.json | 2 +-
src/json/ar/12/surah.json | 2 +-
src/json/ar/13/surah.json | 2 +-
src/json/ar/14/surah.json | 2 +-
src/json/ar/15/surah.json | 2 +-
src/json/ar/16/surah.json | 2 +-
src/json/ar/17/surah.json | 2 +-
src/json/ar/18/surah.json | 2 +-
src/json/ar/19/surah.json | 2 +-
src/json/ar/2/surah.json | 2 +-
src/json/ar/20/surah.json | 2 +-
src/json/ar/21/surah.json | 2 +-
src/json/ar/22/surah.json | 2 +-
src/json/ar/23/surah.json | 2 +-
src/json/ar/24/surah.json | 2 +-
src/json/ar/25/surah.json | 2 +-
src/json/ar/26/surah.json | 2 +-
src/json/ar/27/surah.json | 2 +-
src/json/ar/28/surah.json | 2 +-
src/json/ar/29/surah.json | 2 +-
src/json/ar/3/surah.json | 2 +-
src/json/ar/30/surah.json | 2 +-
src/json/ar/31/surah.json | 2 +-
src/json/ar/32/surah.json | 2 +-
src/json/ar/33/surah.json | 2 +-
src/json/ar/34/surah.json | 2 +-
src/json/ar/35/surah.json | 2 +-
src/json/ar/36/surah.json | 2 +-
src/json/ar/37/surah.json | 2 +-
src/json/ar/38/surah.json | 2 +-
src/json/ar/39/surah.json | 2 +-
src/json/ar/4/surah.json | 2 +-
src/json/ar/40/surah.json | 2 +-
src/json/ar/41/surah.json | 2 +-
src/json/ar/42/surah.json | 2 +-
src/json/ar/43/surah.json | 2 +-
src/json/ar/44/surah.json | 2 +-
src/json/ar/45/surah.json | 2 +-
src/json/ar/46/surah.json | 2 +-
src/json/ar/47/surah.json | 2 +-
src/json/ar/48/surah.json | 2 +-
src/json/ar/49/surah.json | 2 +-
src/json/ar/5/surah.json | 2 +-
src/json/ar/50/surah.json | 2 +-
src/json/ar/51/surah.json | 2 +-
src/json/ar/52/surah.json | 2 +-
src/json/ar/53/surah.json | 2 +-
src/json/ar/54/surah.json | 2 +-
src/json/ar/55/surah.json | 2 +-
src/json/ar/56/surah.json | 2 +-
src/json/ar/57/surah.json | 2 +-
src/json/ar/58/surah.json | 2 +-
src/json/ar/59/surah.json | 2 +-
src/json/ar/6/surah.json | 2 +-
src/json/ar/60/surah.json | 2 +-
src/json/ar/61/surah.json | 2 +-
src/json/ar/62/surah.json | 2 +-
src/json/ar/63/surah.json | 2 +-
src/json/ar/64/surah.json | 2 +-
src/json/ar/65/surah.json | 2 +-
src/json/ar/66/surah.json | 2 +-
src/json/ar/67/surah.json | 2 +-
src/json/ar/68/surah.json | 2 +-
src/json/ar/69/surah.json | 2 +-
src/json/ar/7/surah.json | 2 +-
src/json/ar/70/surah.json | 2 +-
src/json/ar/71/surah.json | 2 +-
src/json/ar/72/surah.json | 2 +-
src/json/ar/73/surah.json | 2 +-
src/json/ar/74/surah.json | 2 +-
src/json/ar/75/surah.json | 2 +-
src/json/ar/76/surah.json | 2 +-
src/json/ar/77/surah.json | 2 +-
src/json/ar/78/surah.json | 2 +-
src/json/ar/79/surah.json | 2 +-
src/json/ar/8/surah.json | 2 +-
src/json/ar/80/surah.json | 2 +-
src/json/ar/81/surah.json | 2 +-
src/json/ar/82/surah.json | 2 +-
src/json/ar/83/surah.json | 2 +-
src/json/ar/84/surah.json | 2 +-
src/json/ar/85/surah.json | 2 +-
src/json/ar/86/surah.json | 2 +-
src/json/ar/87/surah.json | 2 +-
src/json/ar/88/surah.json | 2 +-
src/json/ar/89/surah.json | 2 +-
src/json/ar/9/surah.json | 2 +-
src/json/ar/90/surah.json | 2 +-
src/json/ar/91/surah.json | 2 +-
src/json/ar/92/surah.json | 2 +-
src/json/ar/93/surah.json | 2 +-
src/json/ar/94/surah.json | 2 +-
src/json/ar/95/surah.json | 2 +-
src/json/ar/96/surah.json | 2 +-
src/json/ar/97/surah.json | 2 +-
src/json/ar/98/surah.json | 2 +-
src/json/ar/99/surah.json | 2 +-
.../{mishari_alafasy => alafasy}/1.json | 0
.../{mishari_alafasy => alafasy}/10.json | 0
.../{mishari_alafasy => alafasy}/100.json | 0
.../{mishari_alafasy => alafasy}/101.json | 0
.../{mishari_alafasy => alafasy}/102.json | 0
.../{mishari_alafasy => alafasy}/103.json | 0
.../{mishari_alafasy => alafasy}/104.json | 0
.../{mishari_alafasy => alafasy}/105.json | 0
.../{mishari_alafasy => alafasy}/106.json | 0
.../{mishari_alafasy => alafasy}/107.json | 0
.../{mishari_alafasy => alafasy}/108.json | 0
.../{mishari_alafasy => alafasy}/109.json | 0
.../{mishari_alafasy => alafasy}/11.json | 0
.../{mishari_alafasy => alafasy}/110.json | 0
.../{mishari_alafasy => alafasy}/111.json | 0
.../{mishari_alafasy => alafasy}/112.json | 0
.../{mishari_alafasy => alafasy}/113.json | 0
.../{mishari_alafasy => alafasy}/114.json | 0
.../{mishari_alafasy => alafasy}/12.json | 0
.../{mishari_alafasy => alafasy}/13.json | 0
.../{mishari_alafasy => alafasy}/14.json | 0
.../{mishari_alafasy => alafasy}/15.json | 0
.../{mishari_alafasy => alafasy}/16.json | 0
.../{mishari_alafasy => alafasy}/17.json | 0
.../{mishari_alafasy => alafasy}/18.json | 0
.../{mishari_alafasy => alafasy}/19.json | 0
.../{mishari_alafasy => alafasy}/2.json | 0
.../{mishari_alafasy => alafasy}/20.json | 0
.../{mishari_alafasy => alafasy}/21.json | 0
.../{mishari_alafasy => alafasy}/22.json | 0
.../{mishari_alafasy => alafasy}/23.json | 0
.../{mishari_alafasy => alafasy}/24.json | 0
.../{mishari_alafasy => alafasy}/25.json | 0
.../{mishari_alafasy => alafasy}/26.json | 0
.../{mishari_alafasy => alafasy}/27.json | 0
.../{mishari_alafasy => alafasy}/28.json | 0
.../{mishari_alafasy => alafasy}/29.json | 0
.../{mishari_alafasy => alafasy}/3.json | 0
.../{mishari_alafasy => alafasy}/30.json | 0
.../{mishari_alafasy => alafasy}/31.json | 0
.../{mishari_alafasy => alafasy}/32.json | 0
.../{mishari_alafasy => alafasy}/33.json | 0
.../{mishari_alafasy => alafasy}/34.json | 0
.../{mishari_alafasy => alafasy}/35.json | 0
.../{mishari_alafasy => alafasy}/36.json | 0
.../{mishari_alafasy => alafasy}/37.json | 0
.../{mishari_alafasy => alafasy}/38.json | 0
.../{mishari_alafasy => alafasy}/39.json | 0
.../{mishari_alafasy => alafasy}/4.json | 0
.../{mishari_alafasy => alafasy}/40.json | 0
.../{mishari_alafasy => alafasy}/41.json | 0
.../{mishari_alafasy => alafasy}/42.json | 0
.../{mishari_alafasy => alafasy}/43.json | 0
.../{mishari_alafasy => alafasy}/44.json | 0
.../{mishari_alafasy => alafasy}/45.json | 0
.../{mishari_alafasy => alafasy}/46.json | 0
.../{mishari_alafasy => alafasy}/47.json | 0
.../{mishari_alafasy => alafasy}/48.json | 0
.../{mishari_alafasy => alafasy}/49.json | 0
.../{mishari_alafasy => alafasy}/5.json | 0
.../{mishari_alafasy => alafasy}/50.json | 0
.../{mishari_alafasy => alafasy}/51.json | 0
.../{mishari_alafasy => alafasy}/52.json | 0
.../{mishari_alafasy => alafasy}/53.json | 0
.../{mishari_alafasy => alafasy}/54.json | 0
.../{mishari_alafasy => alafasy}/55.json | 0
.../{mishari_alafasy => alafasy}/56.json | 0
.../{mishari_alafasy => alafasy}/57.json | 0
.../{mishari_alafasy => alafasy}/58.json | 0
.../{mishari_alafasy => alafasy}/59.json | 0
.../{mishari_alafasy => alafasy}/6.json | 0
.../{mishari_alafasy => alafasy}/60.json | 0
.../{mishari_alafasy => alafasy}/61.json | 0
.../{mishari_alafasy => alafasy}/62.json | 0
.../{mishari_alafasy => alafasy}/63.json | 0
.../{mishari_alafasy => alafasy}/64.json | 0
.../{mishari_alafasy => alafasy}/65.json | 0
.../{mishari_alafasy => alafasy}/66.json | 0
.../{mishari_alafasy => alafasy}/67.json | 0
.../{mishari_alafasy => alafasy}/68.json | 0
.../{mishari_alafasy => alafasy}/69.json | 0
.../{mishari_alafasy => alafasy}/7.json | 0
.../{mishari_alafasy => alafasy}/70.json | 0
.../{mishari_alafasy => alafasy}/71.json | 0
.../{mishari_alafasy => alafasy}/72.json | 0
.../{mishari_alafasy => alafasy}/73.json | 0
.../{mishari_alafasy => alafasy}/74.json | 0
.../{mishari_alafasy => alafasy}/75.json | 0
.../{mishari_alafasy => alafasy}/76.json | 0
.../{mishari_alafasy => alafasy}/77.json | 0
.../{mishari_alafasy => alafasy}/78.json | 0
.../{mishari_alafasy => alafasy}/79.json | 0
.../{mishari_alafasy => alafasy}/8.json | 0
.../{mishari_alafasy => alafasy}/80.json | 0
.../{mishari_alafasy => alafasy}/81.json | 0
.../{mishari_alafasy => alafasy}/82.json | 0
.../{mishari_alafasy => alafasy}/83.json | 0
.../{mishari_alafasy => alafasy}/84.json | 0
.../{mishari_alafasy => alafasy}/85.json | 0
.../{mishari_alafasy => alafasy}/86.json | 0
.../{mishari_alafasy => alafasy}/87.json | 0
.../{mishari_alafasy => alafasy}/88.json | 0
.../{mishari_alafasy => alafasy}/89.json | 0
.../{mishari_alafasy => alafasy}/9.json | 0
.../{mishari_alafasy => alafasy}/90.json | 0
.../{mishari_alafasy => alafasy}/91.json | 0
.../{mishari_alafasy => alafasy}/92.json | 0
.../{mishari_alafasy => alafasy}/93.json | 0
.../{mishari_alafasy => alafasy}/94.json | 0
.../{mishari_alafasy => alafasy}/95.json | 0
.../{mishari_alafasy => alafasy}/96.json | 0
.../{mishari_alafasy => alafasy}/97.json | 0
.../{mishari_alafasy => alafasy}/98.json | 0
.../{mishari_alafasy => alafasy}/99.json | 0
src/json/en/1/surah.json | 2 +-
src/json/en/10/surah.json | 2 +-
src/json/en/100/surah.json | 2 +-
src/json/en/101/surah.json | 2 +-
src/json/en/102/surah.json | 2 +-
src/json/en/103/surah.json | 2 +-
src/json/en/104/surah.json | 2 +-
src/json/en/105/surah.json | 2 +-
src/json/en/106/surah.json | 2 +-
src/json/en/107/surah.json | 2 +-
src/json/en/108/surah.json | 2 +-
src/json/en/109/surah.json | 2 +-
src/json/en/11/surah.json | 2 +-
src/json/en/110/surah.json | 2 +-
src/json/en/111/surah.json | 2 +-
src/json/en/112/surah.json | 2 +-
src/json/en/113/surah.json | 2 +-
src/json/en/114/surah.json | 2 +-
src/json/en/12/surah.json | 2 +-
src/json/en/13/surah.json | 2 +-
src/json/en/14/surah.json | 2 +-
src/json/en/15/surah.json | 2 +-
src/json/en/16/surah.json | 2 +-
src/json/en/17/surah.json | 2 +-
src/json/en/18/surah.json | 2 +-
src/json/en/19/surah.json | 2 +-
src/json/en/2/surah.json | 2 +-
src/json/en/20/surah.json | 2 +-
src/json/en/21/surah.json | 2 +-
src/json/en/22/surah.json | 2 +-
src/json/en/23/surah.json | 2 +-
src/json/en/24/surah.json | 2 +-
src/json/en/25/surah.json | 2 +-
src/json/en/26/surah.json | 2 +-
src/json/en/27/surah.json | 2 +-
src/json/en/28/surah.json | 2 +-
src/json/en/29/surah.json | 2 +-
src/json/en/3/surah.json | 2 +-
src/json/en/30/surah.json | 2 +-
src/json/en/31/surah.json | 2 +-
src/json/en/32/surah.json | 2 +-
src/json/en/33/surah.json | 2 +-
src/json/en/34/surah.json | 2 +-
src/json/en/35/surah.json | 2 +-
src/json/en/36/surah.json | 2 +-
src/json/en/37/surah.json | 2 +-
src/json/en/38/surah.json | 2 +-
src/json/en/39/surah.json | 2 +-
src/json/en/4/surah.json | 2 +-
src/json/en/40/surah.json | 2 +-
src/json/en/41/surah.json | 2 +-
src/json/en/42/surah.json | 2 +-
src/json/en/43/surah.json | 2 +-
src/json/en/44/surah.json | 2 +-
src/json/en/45/surah.json | 2 +-
src/json/en/46/surah.json | 2 +-
src/json/en/47/surah.json | 2 +-
src/json/en/48/surah.json | 2 +-
src/json/en/49/surah.json | 2 +-
src/json/en/5/surah.json | 2 +-
src/json/en/50/surah.json | 2 +-
src/json/en/51/surah.json | 2 +-
src/json/en/52/surah.json | 2 +-
src/json/en/53/surah.json | 2 +-
src/json/en/54/surah.json | 2 +-
src/json/en/55/surah.json | 2 +-
src/json/en/56/surah.json | 2 +-
src/json/en/57/surah.json | 2 +-
src/json/en/58/surah.json | 2 +-
src/json/en/59/surah.json | 2 +-
src/json/en/6/surah.json | 2 +-
src/json/en/60/surah.json | 2 +-
src/json/en/61/surah.json | 2 +-
src/json/en/62/surah.json | 2 +-
src/json/en/63/surah.json | 2 +-
src/json/en/64/surah.json | 2 +-
src/json/en/65/surah.json | 2 +-
src/json/en/66/surah.json | 2 +-
src/json/en/67/surah.json | 2 +-
src/json/en/68/surah.json | 2 +-
src/json/en/69/surah.json | 2 +-
src/json/en/7/surah.json | 2 +-
src/json/en/70/surah.json | 2 +-
src/json/en/71/surah.json | 2 +-
src/json/en/72/surah.json | 2 +-
src/json/en/73/surah.json | 2 +-
src/json/en/74/surah.json | 2 +-
src/json/en/75/surah.json | 2 +-
src/json/en/76/surah.json | 2 +-
src/json/en/77/surah.json | 2 +-
src/json/en/78/surah.json | 2 +-
src/json/en/79/surah.json | 2 +-
src/json/en/8/surah.json | 2 +-
src/json/en/80/surah.json | 2 +-
src/json/en/81/surah.json | 2 +-
src/json/en/82/surah.json | 2 +-
src/json/en/83/surah.json | 2 +-
src/json/en/84/surah.json | 2 +-
src/json/en/85/surah.json | 2 +-
src/json/en/86/surah.json | 2 +-
src/json/en/87/surah.json | 2 +-
src/json/en/88/surah.json | 2 +-
src/json/en/89/surah.json | 2 +-
src/json/en/9/surah.json | 2 +-
src/json/en/90/surah.json | 2 +-
src/json/en/91/surah.json | 2 +-
src/json/en/92/surah.json | 2 +-
src/json/en/93/surah.json | 2 +-
src/json/en/94/surah.json | 2 +-
src/json/en/95/surah.json | 2 +-
src/json/en/96/surah.json | 2 +-
src/json/en/97/surah.json | 2 +-
src/json/en/98/surah.json | 2 +-
src/json/en/99/surah.json | 2 +-
src/json/recitations.json | 62 -
src/json/surahs.json | 3932 +++++++++--------
366 files changed, 2584 insertions(+), 2314 deletions(-)
create mode 100644 packages/typescript/Quran/package.json
create mode 100644 packages/typescript/Quran/src/index.ts
create mode 100644 packages/typescript/Quran/tsconfig.json
delete mode 100644 src/js/lib/Quran.ts
delete mode 100644 src/js/lib/Quran/Ayah.ts
delete mode 100644 src/js/lib/Quran/JSON.ts
delete mode 100644 src/js/lib/Quran/Surah.ts
rename src/json/durations/{mishari_alafasy => alafasy}/1.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/10.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/100.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/101.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/102.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/103.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/104.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/105.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/106.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/107.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/108.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/109.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/11.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/110.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/111.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/112.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/113.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/114.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/12.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/13.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/14.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/15.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/16.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/17.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/18.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/19.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/2.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/20.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/21.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/22.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/23.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/24.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/25.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/26.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/27.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/28.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/29.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/3.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/30.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/31.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/32.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/33.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/34.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/35.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/36.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/37.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/38.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/39.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/4.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/40.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/41.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/42.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/43.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/44.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/45.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/46.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/47.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/48.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/49.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/5.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/50.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/51.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/52.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/53.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/54.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/55.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/56.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/57.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/58.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/59.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/6.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/60.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/61.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/62.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/63.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/64.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/65.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/66.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/67.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/68.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/69.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/7.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/70.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/71.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/72.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/73.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/74.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/75.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/76.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/77.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/78.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/79.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/8.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/80.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/81.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/82.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/83.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/84.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/85.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/86.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/87.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/88.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/89.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/9.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/90.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/91.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/92.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/93.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/94.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/95.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/96.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/97.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/98.json (100%)
rename src/json/durations/{mishari_alafasy => alafasy}/99.json (100%)
delete mode 100644 src/json/recitations.json
diff --git a/.gitignore b/.gitignore
index 966f29e..a9a0d7d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
/build/
/tmp/
+/packages/typescript/**/*.js
+/packages/typescript/**/dist/
/rake/tasks/deploy.rake
/.gems/
/crash.log
diff --git a/nanoc/lib/mixin/inline.rb b/nanoc/lib/mixin/inline.rb
index f9f9361..3c3fe51 100644
--- a/nanoc/lib/mixin/inline.rb
+++ b/nanoc/lib/mixin/inline.rb
@@ -1,8 +1,7 @@
# frozen_string_literal: true
module Mixin::Inline
- def inline_json(path)
- class_name = File.basename(path, File.extname(path))
+ def inline_json(path, class_name: File.basename(path, File.extname(path)))
""
diff --git a/package-lock.json b/package-lock.json
index 143bf03..d5498ed 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3828,6 +3828,10 @@
}
]
},
+ "node_modules/Quran": {
+ "resolved": "packages/typescript/Quran",
+ "link": true
+ },
"node_modules/randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@@ -4888,6 +4892,20 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.36.tgz",
"integrity": "sha512-8egDX8dE50XyXWH6C6PRCNkTP106DuUrvdrednFouDSmCi7IOvrqr0frznfZaHifHH/3aq/7a7v9N4wdXMqhBQ==",
"dev": true
+ },
+ "packages/typescript/Quran": {
+ "version": "0.1.0",
+ "license": "0BSDL",
+ "devDependencies": {
+ "@types/node": "^16.18",
+ "typescript": "^4.5"
+ }
+ },
+ "packages/typescript/Quran/node_modules/@types/node": {
+ "version": "16.18.96",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.96.tgz",
+ "integrity": "sha512-84iSqGXoO+Ha16j8pRZ/L90vDMKX04QTYMTfYeE1WrjWaZXuchBehGUZEpNgx7JnmlrIHdnABmpjrQjhCnNldQ==",
+ "dev": true
}
},
"dependencies": {
@@ -7508,6 +7526,21 @@
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
"dev": true
},
+ "Quran": {
+ "version": "file:packages/typescript/Quran",
+ "requires": {
+ "@types/node": "^16.18",
+ "typescript": "^4.5"
+ },
+ "dependencies": {
+ "@types/node": {
+ "version": "16.18.96",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.96.tgz",
+ "integrity": "sha512-84iSqGXoO+Ha16j8pRZ/L90vDMKX04QTYMTfYeE1WrjWaZXuchBehGUZEpNgx7JnmlrIHdnABmpjrQjhCnNldQ==",
+ "dev": true
+ }
+ }
+ },
"randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
diff --git a/packages/typescript/Quran/package.json b/packages/typescript/Quran/package.json
new file mode 100644
index 0000000..351090e
--- /dev/null
+++ b/packages/typescript/Quran/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "Quran",
+ "version": "0.1.0",
+ "description": "The Noble Quran: a programmer's interface",
+ "main": "dist/index.js",
+ "types": ["dist/index.d.ts"],
+ "scripts": {
+ "build": "npm exec tsc",
+ "prepare": "npm run build"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ReflectsLight/al-quran.reflectslight.io.git"
+ },
+ "author": "0x1eef",
+ "license": "0BSDL",
+ "devDependencies": {
+ "@types/node": "^16.18",
+ "typescript": "^4.5"
+ }
+}
diff --git a/packages/typescript/Quran/src/index.ts b/packages/typescript/Quran/src/index.ts
new file mode 100644
index 0000000..652e89c
--- /dev/null
+++ b/packages/typescript/Quran/src/index.ts
@@ -0,0 +1,72 @@
+type TLocale = "ar" | "en";
+type TAyat = Ayah[];
+type TQuran = {
+ locale: TLocale;
+ surahs: Surah[];
+}
+type TSurah = {
+ readonly id: number;
+ readonly name: string;
+ readonly numberOfAyah: number;
+ readonly romanized: { name: string; slug: string };
+ readonly utf8: { codepoints: number[] };
+};
+type TAyah = {
+ id: number;
+ body: string;
+}
+
+class Quran {
+ locale: TLocale;
+ surahs: Surah[];
+
+ constructor(self: T) {
+ this.locale = self.locale;
+ this.surahs = self.surahs;
+ }
+}
+
+class Surah {
+ readonly id: number;
+ readonly name: string;
+ readonly numberOfAyah: number;
+ readonly romanized: { name: string; slug: string };
+ readonly utf8: { codepoints: number[] };
+ readonly ayat: TAyat
+
+ constructor(self: T) {
+ this.id = self.id;
+ this.name = self.name;
+ this.numberOfAyah = self.numberOfAyah;
+ this.romanized = self.romanized;
+ this.utf8 = self.utf8;
+ this.ayat = [];
+ return this;
+ }
+
+ getName(locale: TLocale): string {
+ if (locale === "ar") {
+ return String.fromCodePoint(...this.utf8.codepoints);
+ } else {
+ return this.name;
+ }
+ }
+}
+
+class Ayah {
+ readonly id: number;
+ readonly body: string;
+ ms: number;
+
+ constructor(self: T) {
+ this.id = self.id;
+ this.body = self.body;
+ this.ms = 0;
+ }
+}
+
+export {
+ Quran, Surah, Ayah,
+ TQuran, TSurah, TAyah,
+ TAyat, TLocale
+};
diff --git a/packages/typescript/Quran/tsconfig.json b/packages/typescript/Quran/tsconfig.json
new file mode 100644
index 0000000..a6e6cb2
--- /dev/null
+++ b/packages/typescript/Quran/tsconfig.json
@@ -0,0 +1,15 @@
+{
+ "compilerOptions": {
+ "strict": true,
+ "module": "ESNEXT",
+ "target": "ES2020",
+ "esModuleInterop": true,
+ "moduleResolution": "node",
+
+ "baseUrl": "src/",
+ "paths": { "*": ["*"] },
+
+ "outDir": "dist",
+ "declaration": true,
+ }
+}
diff --git a/src/html/stream.html.erb b/src/html/stream.html.erb
index 246190c..99a60b8 100644
--- a/src/html/stream.html.erb
+++ b/src/html/stream.html.erb
@@ -34,7 +34,7 @@
data-surah-id="<%= context.surah.id %>">
<%= inline_json("/json/i18n.json") %>
- <%= inline_json("/json/recitations.json") %>
+ <%= inline_json("/json/durations/alafasy/#{context.surah.id}.json", class_name: 'durations') %>