@tarekeldeeb/quran-madina-react 2.0.0 → 2.1.0

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
@@ -61,6 +61,7 @@ export default function App() {
61
61
  | `words` | string | 1-based word range: `"1:2"`, `"3-10"`, or a single index. |
62
62
  | `highlight` | string | 1-based word range to mark soft yellow, e.g. `"5-8"`. |
63
63
  | `error` | string | 1-based word range to mark with built-in "error" highlight styling, e.g. `"10-13"`. |
64
+ | `letters` | string | Letters to emphasise inside words: `"1:3 crimson, 4:3-5 emerald"` (word:letters, optional colour — crimson by default — and optional `blink`). |
64
65
  | `headless` | boolean | Drop the header/copy chrome. |
65
66
  | `quotes` | string | `"no"` (or `"false"`) drops the quote marks shown around inline (single-line) renders. |
66
67
  | `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
@@ -75,6 +75,7 @@ function QuranMadinaHtml({
75
75
  words,
76
76
  highlight,
77
77
  error,
78
+ letters,
78
79
  headless,
79
80
  quotes,
80
81
  inline,
@@ -123,10 +124,11 @@ function QuranMadinaHtml({
123
124
  set("words", words);
124
125
  set("highlight", highlight);
125
126
  set("error", error);
127
+ set("letters", letters);
126
128
  set("headless", headless);
127
129
  set("quotes", quotes);
128
130
  set("inline", inline);
129
131
  set("notitle", notitle);
130
- }, [ready, page, sura, aya, words, highlight, error, headless, quotes, inline, notitle]);
132
+ }, [ready, page, sura, aya, words, highlight, error, letters, headless, quotes, inline, notitle]);
131
133
  return import_react.default.createElement(TAG, { ref, class: className, style, ...rest });
132
134
  }
package/dist/index.d.ts CHANGED
@@ -36,6 +36,14 @@ export interface QuranMadinaHtmlProps
36
36
  * render with the library's built-in "error" highlight styling.
37
37
  */
38
38
  error?: string;
39
+ /**
40
+ * Letters to emphasise inside words: comma-separated groups "word:letters [colour] [blink]",
41
+ * e.g. "1:3 crimson, 4:3-5 emerald blink, 6:2+4". Word numbers count like highlight/error;
42
+ * letters are n, n-m or n+m; the colour is optional (crimson by default): crimson, emerald,
43
+ * lapis, gold, violet or any CSS colour; "blink" makes the letter's halo pulse (no animation
44
+ * by default). Nothing moves.
45
+ */
46
+ letters?: string;
39
47
  /** Drop the header / copy chrome and render only the Quran text. */
40
48
  headless?: boolean;
41
49
  /**
package/dist/index.mjs CHANGED
@@ -39,6 +39,7 @@ function QuranMadinaHtml({
39
39
  words,
40
40
  highlight,
41
41
  error,
42
+ letters,
42
43
  headless,
43
44
  quotes,
44
45
  inline,
@@ -87,11 +88,12 @@ function QuranMadinaHtml({
87
88
  set("words", words);
88
89
  set("highlight", highlight);
89
90
  set("error", error);
91
+ set("letters", letters);
90
92
  set("headless", headless);
91
93
  set("quotes", quotes);
92
94
  set("inline", inline);
93
95
  set("notitle", notitle);
94
- }, [ready, page, sura, aya, words, highlight, error, headless, quotes, inline, notitle]);
96
+ }, [ready, page, sura, aya, words, highlight, error, letters, headless, quotes, inline, notitle]);
95
97
  return React.createElement(TAG, { ref, class: className, style, ...rest });
96
98
  }
97
99
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarekeldeeb/quran-madina-react",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
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",