@tarekeldeeb/quran-madina-react 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -35,6 +35,9 @@ export default function App() {
35
35
  {/* a word subsequence (1-based, inclusive) */}
36
36
  <QuranMadinaHtml sura={1} aya={1} words="1:2" />
37
37
 
38
+ {/* highlight an error range */}
39
+ <QuranMadinaHtml sura={1} aya={1} words="1-14" error="10-13" />
40
+
38
41
  {/* no header / copy chrome */}
39
42
  <QuranMadinaHtml sura={2} aya="13-14" headless />
40
43
 
@@ -56,6 +59,7 @@ export default function App() {
56
59
  | `sura` | number \| string | Sura 1–114, with `aya`. |
57
60
  | `aya` | number \| string | Aya or range, e.g. `"8-10"`. |
58
61
  | `words` | string | 1-based word range: `"1:2"`, `"3-10"`, or a single index. |
62
+ | `error` | string | 1-based word range to mark with built-in "error" highlight styling, e.g. `"10-13"`. |
59
63
  | `headless` | boolean | Drop the header/copy chrome. |
60
64
  | `quotes` | string | `"no"` (or `"false"`) drops the quote marks shown around inline (single-line) renders. |
61
65
  | `inline` | string | `"no"` forces the multiline/header layout even for a selection that fits one line. `"auto"` (default) is fit-based. `"yes"` (force a single line for an overflowing selection) is not implemented yet. |
package/dist/index.cjs CHANGED
@@ -72,6 +72,7 @@ function QuranMadinaHtml({
72
72
  sura,
73
73
  aya,
74
74
  words,
75
+ error,
75
76
  headless,
76
77
  quotes,
77
78
  inline,
@@ -117,10 +118,11 @@ function QuranMadinaHtml({
117
118
  set("aya", aya);
118
119
  }
119
120
  set("words", words);
121
+ set("error", error);
120
122
  set("headless", headless);
121
123
  set("quotes", quotes);
122
124
  set("inline", inline);
123
125
  set("notitle", notitle);
124
- }, [ready, page, sura, aya, words, headless, quotes, inline, notitle]);
126
+ }, [ready, page, sura, aya, words, error, headless, quotes, inline, notitle]);
125
127
  return import_react.default.createElement(TAG, { ref, class: className, style, ...rest });
126
128
  }
package/dist/index.d.ts CHANGED
@@ -27,6 +27,11 @@ export interface QuranMadinaHtmlProps
27
27
  aya?: number | string;
28
28
  /** Restrict to a 1-based word range, e.g. "1:2", "3-10", or a single index. */
29
29
  words?: string;
30
+ /**
31
+ * 1-based inclusive word range (same syntax as `words`) marking a sub-range that should
32
+ * render with the library's built-in "error" highlight styling.
33
+ */
34
+ error?: string;
30
35
  /** Drop the header / copy chrome and render only the Quran text. */
31
36
  headless?: boolean;
32
37
  /**
package/dist/index.mjs CHANGED
@@ -36,6 +36,7 @@ function QuranMadinaHtml({
36
36
  sura,
37
37
  aya,
38
38
  words,
39
+ error,
39
40
  headless,
40
41
  quotes,
41
42
  inline,
@@ -81,11 +82,12 @@ function QuranMadinaHtml({
81
82
  set("aya", aya);
82
83
  }
83
84
  set("words", words);
85
+ set("error", error);
84
86
  set("headless", headless);
85
87
  set("quotes", quotes);
86
88
  set("inline", inline);
87
89
  set("notitle", notitle);
88
- }, [ready, page, sura, aya, words, headless, quotes, inline, notitle]);
90
+ }, [ready, page, sura, aya, words, error, headless, quotes, inline, notitle]);
89
91
  return React.createElement(TAG, { ref, class: className, style, ...rest });
90
92
  }
91
93
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarekeldeeb/quran-madina-react",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "React wrapper for the quran-madina-html custom element — render Madina-style Quran pages (no images) in React on web and mobile (via a Capacitor WebView).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",