misraj-mushaf-renderer 1.2.5 → 1.3.3
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.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +100 -90
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -44,7 +44,7 @@ function x4() {
|
|
|
44
44
|
})(i1)), i1.exports;
|
|
45
45
|
}
|
|
46
46
|
var I4 = x4();
|
|
47
|
-
const
|
|
47
|
+
const S = /* @__PURE__ */ n4(I4), O4 = "MushafReader-twoPagesRow", L4 = {
|
|
48
48
|
twoPagesRow: O4
|
|
49
49
|
}, B4 = "ReadingView-container", E4 = {
|
|
50
50
|
container: B4
|
|
@@ -84,14 +84,14 @@ const i4 = P0(void 0), s4 = P0(void 0), j4 = ({
|
|
|
84
84
|
_.current = A, v(null);
|
|
85
85
|
try {
|
|
86
86
|
const M = B0(t, r, A.signal), x = d ? B0(t + 1, r, A.signal) : Promise.resolve(void 0), m = await M;
|
|
87
|
-
let
|
|
87
|
+
let H;
|
|
88
88
|
if (d)
|
|
89
89
|
try {
|
|
90
|
-
|
|
90
|
+
H = await x;
|
|
91
91
|
} catch {
|
|
92
|
-
|
|
92
|
+
H = void 0;
|
|
93
93
|
}
|
|
94
|
-
h(m), q(
|
|
94
|
+
h(m), q(H);
|
|
95
95
|
} catch (M) {
|
|
96
96
|
if (M?.name === "AbortError") return;
|
|
97
97
|
v(M instanceof Error ? M : new Error("Unknown error")), h(null), q(null);
|
|
@@ -198,7 +198,7 @@ const i4 = P0(void 0), s4 = P0(void 0), j4 = ({
|
|
|
198
198
|
return /* @__PURE__ */ O(
|
|
199
199
|
"span",
|
|
200
200
|
{
|
|
201
|
-
className:
|
|
201
|
+
className: S(V.iconContainer, V.iconContainerLarge, {
|
|
202
202
|
[V.border]: t,
|
|
203
203
|
[V.blueBorder]: t && i === "blue",
|
|
204
204
|
[V.sepiaBorder]: t && i === "sepia"
|
|
@@ -374,7 +374,7 @@ const b6 = (e, r, t, n = !1) => e === f4.IndoPak ? `${e}_${t}-font-size-${r}` :
|
|
|
374
374
|
role: "button",
|
|
375
375
|
tabIndex: 0,
|
|
376
376
|
[q6]: s,
|
|
377
|
-
className:
|
|
377
|
+
className: S(z.container, z[C], {
|
|
378
378
|
[z.highlightOnHover]: !0,
|
|
379
379
|
[z.colored]: !o,
|
|
380
380
|
[z.highlighted]: o
|
|
@@ -409,7 +409,7 @@ const b6 = (e, r, t, n = !1) => e === f4.IndoPak ? `${e}_${t}-font-size-${r}` :
|
|
|
409
409
|
"data-verse-key": f,
|
|
410
410
|
"data-page": C,
|
|
411
411
|
"data-chapter-id": p,
|
|
412
|
-
className:
|
|
412
|
+
className: S(E.verseTextContainer, {
|
|
413
413
|
[E.largeMushafTextLayoutContainer]: q,
|
|
414
414
|
[E.highlighted]: r,
|
|
415
415
|
[E[_]]: !0
|
|
@@ -419,7 +419,7 @@ const b6 = (e, r, t, n = !1) => e === f4.IndoPak ? `${e}_${t}-font-size-${r}` :
|
|
|
419
419
|
"div",
|
|
420
420
|
{
|
|
421
421
|
translate: "no",
|
|
422
|
-
className:
|
|
422
|
+
className: S(E.verseText, {
|
|
423
423
|
[E.largeMushafTextLayout]: q,
|
|
424
424
|
[E.verseTextCenterAlign]: h,
|
|
425
425
|
[E.verseTextSpaceBetween]: !h
|
|
@@ -451,7 +451,7 @@ const b6 = (e, r, t, n = !1) => e === f4.IndoPak ? `${e}_${t}-font-size-${r}` :
|
|
|
451
451
|
"div",
|
|
452
452
|
{
|
|
453
453
|
id: e,
|
|
454
|
-
className:
|
|
454
|
+
className: S(F.container, {
|
|
455
455
|
[F.highlighted]: f,
|
|
456
456
|
[F.mobileInline]: t
|
|
457
457
|
}),
|
|
@@ -462,7 +462,7 @@ const b6 = (e, r, t, n = !1) => e === f4.IndoPak ? `${e}_${t}-font-size-${r}` :
|
|
|
462
462
|
/* @__PURE__ */ c(
|
|
463
463
|
"div",
|
|
464
464
|
{
|
|
465
|
-
className:
|
|
465
|
+
className: S(F.line, {
|
|
466
466
|
[F.mobileInline]: t
|
|
467
467
|
}),
|
|
468
468
|
children: /* @__PURE__ */ c(
|
|
@@ -809,10 +809,10 @@ function ie() {
|
|
|
809
809
|
f9 = 1;
|
|
810
810
|
var e = k(), r = R0(), t = U(), n = "[object Arguments]", a = "[object Array]", i = "[object Boolean]", s = "[object Date]", u = "[object Error]", o = "[object Function]", C = "[object Map]", l = "[object Number]", f = "[object Object]", h = "[object RegExp]", g = "[object Set]", q = "[object String]", p = "[object WeakMap]", v = "[object ArrayBuffer]", _ = "[object DataView]", d = "[object Float32Array]", w = "[object Float64Array]", y = "[object Int8Array]", P = "[object Int16Array]", T = "[object Int32Array]", b = "[object Uint8Array]", A = "[object Uint8ClampedArray]", M = "[object Uint16Array]", x = "[object Uint32Array]", m = {};
|
|
811
811
|
m[d] = m[w] = m[y] = m[P] = m[T] = m[b] = m[A] = m[M] = m[x] = !0, m[n] = m[a] = m[v] = m[i] = m[_] = m[s] = m[u] = m[o] = m[C] = m[l] = m[f] = m[h] = m[g] = m[q] = m[p] = !1;
|
|
812
|
-
function
|
|
812
|
+
function H(I) {
|
|
813
813
|
return t(I) && r(I.length) && !!m[e(I)];
|
|
814
814
|
}
|
|
815
|
-
return O1 =
|
|
815
|
+
return O1 = H, O1;
|
|
816
816
|
}
|
|
817
817
|
var L1, l9;
|
|
818
818
|
function se() {
|
|
@@ -1436,7 +1436,7 @@ function ke() {
|
|
|
1436
1436
|
if (f3) return I2;
|
|
1437
1437
|
f3 = 1;
|
|
1438
1438
|
var e = X(), r = Ze(), t = m4(), n = T4(), a = Ke(), i = $e(), s = 1, u = 2, o = "[object Boolean]", C = "[object Date]", l = "[object Error]", f = "[object Map]", h = "[object Number]", g = "[object RegExp]", q = "[object Set]", p = "[object String]", v = "[object Symbol]", _ = "[object ArrayBuffer]", d = "[object DataView]", w = e ? e.prototype : void 0, y = w ? w.valueOf : void 0;
|
|
1439
|
-
function P(T, b, A, M, x, m,
|
|
1439
|
+
function P(T, b, A, M, x, m, H) {
|
|
1440
1440
|
switch (A) {
|
|
1441
1441
|
case d:
|
|
1442
1442
|
if (T.byteLength != b.byteLength || T.byteOffset != b.byteOffset)
|
|
@@ -1459,12 +1459,12 @@ function ke() {
|
|
|
1459
1459
|
var n1 = M & s;
|
|
1460
1460
|
if (I || (I = i), T.size != b.size && !n1)
|
|
1461
1461
|
return !1;
|
|
1462
|
-
var W =
|
|
1462
|
+
var W = H.get(T);
|
|
1463
1463
|
if (W)
|
|
1464
1464
|
return W == b;
|
|
1465
|
-
M |= u,
|
|
1466
|
-
var S4 = n(I(T), I(b), M, x, m,
|
|
1467
|
-
return
|
|
1465
|
+
M |= u, H.set(T, b);
|
|
1466
|
+
var S4 = n(I(T), I(b), M, x, m, H);
|
|
1467
|
+
return H.delete(T), S4;
|
|
1468
1468
|
case v:
|
|
1469
1469
|
if (y)
|
|
1470
1470
|
return y.call(T) == y.call(b);
|
|
@@ -1644,9 +1644,9 @@ function s5() {
|
|
|
1644
1644
|
if (m && !M)
|
|
1645
1645
|
return y || (y = new e()), P || u(p) ? r(p, v, _, d, w, y) : t(p, v, b, _, d, w, y);
|
|
1646
1646
|
if (!(_ & o)) {
|
|
1647
|
-
var
|
|
1648
|
-
if (
|
|
1649
|
-
var n1 =
|
|
1647
|
+
var H = M && g.call(p, "__wrapped__"), I = x && g.call(v, "__wrapped__");
|
|
1648
|
+
if (H || I) {
|
|
1649
|
+
var n1 = H ? p.value() : p, W = I ? v.value() : v;
|
|
1650
1650
|
return y || (y = new e()), w(n1, W, _, d, y);
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
@@ -2436,84 +2436,94 @@ const S5 = /* @__PURE__ */ n4(R5), H5 = (e) => {
|
|
|
2436
2436
|
() => e && e.length ? H5(e) : {},
|
|
2437
2437
|
[e]
|
|
2438
2438
|
), h = s > 3, g = e && e.length ? e[0] : void 0, q = r === 1 || r === 2;
|
|
2439
|
-
return /* @__PURE__ */
|
|
2439
|
+
return /* @__PURE__ */ c(
|
|
2440
2440
|
"div",
|
|
2441
2441
|
{
|
|
2442
2442
|
id: `page-${r}`,
|
|
2443
|
-
className:
|
|
2444
|
-
[R.mobileCenterText]: h
|
|
2445
|
-
[R.border]: u,
|
|
2446
|
-
[R.blueBorder]: u && l === "blue",
|
|
2447
|
-
[R.sepiaBorder]: u && l === "sepia"
|
|
2443
|
+
className: S(R.container, {
|
|
2444
|
+
[R.mobileCenterText]: h
|
|
2448
2445
|
}),
|
|
2449
2446
|
style: {
|
|
2450
|
-
position: "relative",
|
|
2451
2447
|
...C?.Page?.container,
|
|
2452
2448
|
...i?.container
|
|
2453
2449
|
},
|
|
2454
|
-
children:
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
{
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
style: C?.Page?.juz,
|
|
2471
|
-
children: z5(g?.juz || 1)
|
|
2472
|
-
}
|
|
2473
|
-
)
|
|
2474
|
-
] }),
|
|
2475
|
-
/* @__PURE__ */ O(
|
|
2476
|
-
"div",
|
|
2477
|
-
{
|
|
2478
|
-
className: H(C?.Page?.bottomBorder, {
|
|
2479
|
-
[R.bottomBorder]: u && q,
|
|
2480
|
-
[R.blueBottomBorder]: u && q && l === "blue",
|
|
2481
|
-
[R.sepiaBottomBorder]: u && q && l === "sepia"
|
|
2482
|
-
}),
|
|
2483
|
-
style: { width: "100%" },
|
|
2484
|
-
children: [
|
|
2485
|
-
q && /* @__PURE__ */ c(c4, { chapterId: `${r}`, pageNumber: r }),
|
|
2486
|
-
/* @__PURE__ */ O(
|
|
2487
|
-
"div",
|
|
2450
|
+
children: /* @__PURE__ */ O(
|
|
2451
|
+
"div",
|
|
2452
|
+
{
|
|
2453
|
+
className: S({
|
|
2454
|
+
[R.border]: u,
|
|
2455
|
+
[R.blueBorder]: u && l === "blue",
|
|
2456
|
+
[R.sepiaBorder]: u && l === "sepia"
|
|
2457
|
+
}),
|
|
2458
|
+
style: {
|
|
2459
|
+
position: "relative",
|
|
2460
|
+
...i?.border
|
|
2461
|
+
},
|
|
2462
|
+
children: [
|
|
2463
|
+
u && /* @__PURE__ */ O(r4, { children: [
|
|
2464
|
+
/* @__PURE__ */ c(
|
|
2465
|
+
e4,
|
|
2488
2466
|
{
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
words: f[p],
|
|
2503
|
-
isBigTextLayout: h,
|
|
2504
|
-
onWordClick: n,
|
|
2505
|
-
onWordHover: a
|
|
2506
|
-
},
|
|
2507
|
-
p
|
|
2508
|
-
))
|
|
2509
|
-
]
|
|
2467
|
+
borderColor: l,
|
|
2468
|
+
className: S(R.surah),
|
|
2469
|
+
style: C?.Page?.surah,
|
|
2470
|
+
children: g?.surah?.name
|
|
2471
|
+
}
|
|
2472
|
+
),
|
|
2473
|
+
/* @__PURE__ */ c(
|
|
2474
|
+
e4,
|
|
2475
|
+
{
|
|
2476
|
+
borderColor: l,
|
|
2477
|
+
className: S(R.juz),
|
|
2478
|
+
style: C?.Page?.juz,
|
|
2479
|
+
children: z5(g?.juz || 1)
|
|
2510
2480
|
}
|
|
2511
2481
|
)
|
|
2512
|
-
]
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2482
|
+
] }),
|
|
2483
|
+
/* @__PURE__ */ O(
|
|
2484
|
+
"div",
|
|
2485
|
+
{
|
|
2486
|
+
className: S(C?.Page?.bottomBorder, {
|
|
2487
|
+
[R.bottomBorder]: u && q,
|
|
2488
|
+
[R.blueBottomBorder]: u && q && l === "blue",
|
|
2489
|
+
[R.sepiaBottomBorder]: u && q && l === "sepia"
|
|
2490
|
+
}),
|
|
2491
|
+
style: { width: "100%" },
|
|
2492
|
+
children: [
|
|
2493
|
+
q && /* @__PURE__ */ c(c4, { chapterId: `${r}`, pageNumber: r }),
|
|
2494
|
+
/* @__PURE__ */ O(
|
|
2495
|
+
"div",
|
|
2496
|
+
{
|
|
2497
|
+
className: S(C?.Page?.firstTwoPagesBorder, {
|
|
2498
|
+
[R.firstTwoPagesBorder]: u && q,
|
|
2499
|
+
[R.blueFirstTwoPagesBorder]: u && q && l === "blue",
|
|
2500
|
+
[R.sepiaFirstTwoPagesBorder]: u && q && l === "sepia"
|
|
2501
|
+
}),
|
|
2502
|
+
children: [
|
|
2503
|
+
r === 2 && /* @__PURE__ */ c("div", { className: T0.bismillahContainer, children: /* @__PURE__ */ c(o4, {}) }),
|
|
2504
|
+
Object.keys(f).map((p, v) => /* @__PURE__ */ c(
|
|
2505
|
+
S6,
|
|
2506
|
+
{
|
|
2507
|
+
pageIndex: t,
|
|
2508
|
+
lineIndex: v,
|
|
2509
|
+
lineKey: p,
|
|
2510
|
+
words: f[p],
|
|
2511
|
+
isBigTextLayout: h,
|
|
2512
|
+
onWordClick: n,
|
|
2513
|
+
onWordHover: a
|
|
2514
|
+
},
|
|
2515
|
+
p
|
|
2516
|
+
))
|
|
2517
|
+
]
|
|
2518
|
+
}
|
|
2519
|
+
)
|
|
2520
|
+
]
|
|
2521
|
+
}
|
|
2522
|
+
),
|
|
2523
|
+
u && /* @__PURE__ */ c(B5, { borderColor: l, value: r })
|
|
2524
|
+
]
|
|
2525
|
+
}
|
|
2526
|
+
)
|
|
2517
2527
|
}
|
|
2518
2528
|
);
|
|
2519
2529
|
}, K5 = ({ onWordClick: e, onWordHover: r }) => {
|
|
@@ -2521,12 +2531,12 @@ const S5 = /* @__PURE__ */ n4(R5), H5 = (e) => {
|
|
|
2521
2531
|
return /* @__PURE__ */ c(
|
|
2522
2532
|
"div",
|
|
2523
2533
|
{
|
|
2524
|
-
className:
|
|
2534
|
+
className: S(E4.container),
|
|
2525
2535
|
style: i?.ReadingView?.container,
|
|
2526
2536
|
children: s && n ? /* @__PURE__ */ O(
|
|
2527
2537
|
"div",
|
|
2528
2538
|
{
|
|
2529
|
-
className:
|
|
2539
|
+
className: S(L4.twoPagesRow),
|
|
2530
2540
|
style: i?.MushafReader?.twoPagesRow,
|
|
2531
2541
|
children: [
|
|
2532
2542
|
/* @__PURE__ */ c(
|