@tarekeldeeb/quran-madina-react 0.8.5 → 0.8.7

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
@@ -37,6 +37,12 @@ export default function App() {
37
37
 
38
38
  {/* no header / copy chrome */}
39
39
  <QuranMadinaHtml sura={2} aya="13-14" headless />
40
+
41
+ {/* inline (single-line) render without the quote marks around it */}
42
+ <QuranMadinaHtml sura={1} aya={3} quotes="no" />
43
+
44
+ {/* force the multiline/header layout even though this would normally fit one line */}
45
+ <QuranMadinaHtml sura={1} aya={3} inline="no" />
40
46
  </div>
41
47
  );
42
48
  }
@@ -51,6 +57,8 @@ export default function App() {
51
57
  | `aya` | number \| string | Aya or range, e.g. `"8-10"`. |
52
58
  | `words` | string | 1-based word range: `"1:2"`, `"3-10"`, or a single index. |
53
59
  | `headless` | boolean | Drop the header/copy chrome. |
60
+ | `quotes` | string | `"no"` (or `"false"`) drops the quote marks shown around inline (single-line) renders. |
61
+ | `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. |
54
62
  | `font` | string | `Hafs`, `Uthman`, `Amiri Quran`, `Amiri Quran Colored`, `me_quran`. |
55
63
  | `name` | string | DB name, default `Madina05`. |
56
64
  | `fontSize` | number \| string | px, default 16. |
package/dist/index.cjs CHANGED
@@ -73,6 +73,8 @@ function QuranMadinaHtml({
73
73
  aya,
74
74
  words,
75
75
  headless,
76
+ quotes,
77
+ inline,
76
78
  // loader config (only honored on first mount, see loadQuranMadinaHtml)
77
79
  src,
78
80
  cdn,
@@ -115,6 +117,8 @@ function QuranMadinaHtml({
115
117
  }
116
118
  set("words", words);
117
119
  set("headless", headless);
118
- }, [ready, page, sura, aya, words, headless]);
120
+ set("quotes", quotes);
121
+ set("inline", inline);
122
+ }, [ready, page, sura, aya, words, headless, quotes, inline]);
119
123
  return import_react.default.createElement(TAG, { ref, class: className, style, ...rest });
120
124
  }
package/dist/index.d.ts CHANGED
@@ -26,6 +26,15 @@ export interface QuranMadinaHtmlProps
26
26
  words?: string;
27
27
  /** Drop the header / copy chrome and render only the Quran text. */
28
28
  headless?: boolean;
29
+ /** Set to "no" (or "false") to drop the quote marks shown around inline (single-line) renders. */
30
+ quotes?: "no" | "auto" | "yes" | boolean | string;
31
+ /**
32
+ * "no": force the multiline/header layout even if the selection would fit one line.
33
+ * "auto" (default): fit-based layout, same as omitting the prop.
34
+ * "yes": force a single inline line even if the selection overflows it - not implemented yet,
35
+ * falls back to "auto" with a console warning from the underlying library.
36
+ */
37
+ inline?: "no" | "auto" | "yes" | string;
29
38
  }
30
39
 
31
40
  /** Inject the loader script once; resolves when the custom element is registered. */
package/dist/index.mjs CHANGED
@@ -37,6 +37,8 @@ function QuranMadinaHtml({
37
37
  aya,
38
38
  words,
39
39
  headless,
40
+ quotes,
41
+ inline,
40
42
  // loader config (only honored on first mount, see loadQuranMadinaHtml)
41
43
  src,
42
44
  cdn,
@@ -79,7 +81,9 @@ function QuranMadinaHtml({
79
81
  }
80
82
  set("words", words);
81
83
  set("headless", headless);
82
- }, [ready, page, sura, aya, words, headless]);
84
+ set("quotes", quotes);
85
+ set("inline", inline);
86
+ }, [ready, page, sura, aya, words, headless, quotes, inline]);
83
87
  return React.createElement(TAG, { ref, class: className, style, ...rest });
84
88
  }
85
89
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarekeldeeb/quran-madina-react",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
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",