misraj-mushaf-renderer 1.0.6 → 1.0.8
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.
|
@@ -2,22 +2,8 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { Ayah, Surah } from '../../../../types/verses';
|
|
3
3
|
import { DataId } from './MushafPage.types';
|
|
4
4
|
import { MushafPageDataType } from './types';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
dataId: DataId;
|
|
8
|
-
pageNumber: number;
|
|
9
|
-
initialFontScale?: number;
|
|
10
|
-
hasBorder?: boolean;
|
|
11
|
-
initialIsTwoPagesView?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export declare const MushafPageProvider: ({ children, dataId, pageNumber, initialFontScale, hasBorder, initialIsTwoPagesView, }: MushafPageProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
/** Convenience: keep a compat hook name if you prefer */
|
|
15
|
-
export declare const useMushafContext: () => {
|
|
16
|
-
increaseFontScale: () => void;
|
|
17
|
-
decreaseFontScale: () => void;
|
|
18
|
-
setSelectedVerse: React.Dispatch<React.SetStateAction<Ayah | null>>;
|
|
19
|
-
setCurrentSurah: React.Dispatch<React.SetStateAction<Surah | null>>;
|
|
20
|
-
refresh: () => void;
|
|
5
|
+
/** ---------- Types ---------- */
|
|
6
|
+
type MushafPageState = {
|
|
21
7
|
fontScale: number;
|
|
22
8
|
selectedVerse: Ayah | null;
|
|
23
9
|
currentSurah: Surah | null;
|
|
@@ -30,4 +16,23 @@ export declare const useMushafContext: () => {
|
|
|
30
16
|
hasBorder: boolean;
|
|
31
17
|
isTwoPagesView: boolean;
|
|
32
18
|
};
|
|
19
|
+
type MushafPageActions = {
|
|
20
|
+
increaseFontScale: () => void;
|
|
21
|
+
decreaseFontScale: () => void;
|
|
22
|
+
setSelectedVerse: React.Dispatch<React.SetStateAction<Ayah | null>>;
|
|
23
|
+
setCurrentSurah: React.Dispatch<React.SetStateAction<Surah | null>>;
|
|
24
|
+
refresh: () => void;
|
|
25
|
+
};
|
|
26
|
+
type MushafPageProviderProps = {
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
dataId: DataId;
|
|
29
|
+
pageNumber: number;
|
|
30
|
+
initialFontScale?: number;
|
|
31
|
+
hasBorder?: boolean;
|
|
32
|
+
initialIsTwoPagesView?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export declare const MushafPageProvider: ({ children, dataId, pageNumber, initialFontScale, hasBorder, initialIsTwoPagesView, }: MushafPageProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export type MushafContextStateTypes = MushafPageState & MushafPageActions;
|
|
36
|
+
/** Convenience: keep a compat hook name if you prefer */
|
|
37
|
+
export declare const useMushafContext: () => MushafContextStateTypes;
|
|
33
38
|
export {};
|