widetorah-embed 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +231 -71
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -7,8 +7,31 @@
7
7
 
8
8
  Embed WideTorah scripture widgets on any website. **Zero dependencies**, Shadow DOM style isolation, 3 built-in themes (light, dark, sepia), and automatic daily verse updates. Each widget includes a "Powered by WideTorah" backlink.
9
9
 
10
+ WideTorah covers the **Hebrew Bible (Tanakh)** — **24 books** (Torah: 5, Nevi'im: 21, Ketuvim: 13 by Jewish canon), **23,145 verses**, Hebrew Masoretic text, English translations (JPS, KJV), **54 parashot** (weekly Torah portions), **2,121 Talmud daf** (pages), and **3,901 Rashi commentaries** — all accessible via free public API.
11
+
10
12
  > **Try the interactive widget builder at [widget.widetorah.com](https://widget.widetorah.com)**
11
13
 
14
+ <p align="center">
15
+ <img src="demo.gif" alt="widetorah-embed demo — Torah verse widget with Hebrew Masoretic text and English translation, light/dark/sepia themes" width="800">
16
+ </p>
17
+
18
+ ## Table of Contents
19
+
20
+ - [Quick Start](#quick-start)
21
+ - [What You Can Do](#what-you-can-do)
22
+ - [Verse Card — Single Torah Verse Display](#verse-card--single-torah-verse-display)
23
+ - [Chapter Card — Full Chapter with Navigation](#chapter-card--full-chapter-with-navigation)
24
+ - [Comparison Card — Side-by-Side Verse Comparison](#comparison-card--side-by-side-verse-comparison)
25
+ - [Verse of the Day — Auto-Updating Daily Widget](#verse-of-the-day--auto-updating-daily-widget)
26
+ - [Search Box — Full-Text Torah Search](#search-box--full-text-torah-search)
27
+ - [Widget Options](#widget-options)
28
+ - [Themes](#themes)
29
+ - [CDN Options](#cdn-options)
30
+ - [Technical Details](#technical-details)
31
+ - [Learn More About the Torah](#learn-more-about-the-torah)
32
+ - [WideHoly Scripture Family](#wideholy-scripture-family)
33
+ - [License](#license)
34
+
12
35
  ## Quick Start
13
36
 
14
37
  ```html
@@ -19,121 +42,258 @@ Embed WideTorah scripture widgets on any website. **Zero dependencies**, Shadow
19
42
  <script src="https://cdn.jsdelivr.net/npm/widetorah-embed@1/dist/embed.min.js"></script>
20
43
  ```
21
44
 
22
- That's it. The widget will load, fetch the verse from the WideTorah API, and render it with full style isolation.
45
+ That's it. The widget loads, fetches the verse from the WideTorah API, and renders it with full style isolation. References use English book names (`Genesis 1:1`) or Hebrew names (`Bereshit 1:1`) — both are supported.
23
46
 
24
- ## Widget Types
47
+ ## What You Can Do
25
48
 
26
- | Type | Usage |
27
- |------|-------|
28
- | Verse Card | `<div data-widetorah="verse" data-ref="..." data-theme="light"></div>` |
29
- | Chapter Card | `<div data-widetorah="chapter" data-ref="..."></div>` |
30
- | Comparison Card | `<div data-widetorah="compare" data-a="..." data-b="..."></div>` |
31
- | Verse of the Day | `<div data-widetorah="votd" data-theme="light"></div>` |
32
- | Search Box | `<div data-widetorah="search" data-placeholder="..."></div>` |
49
+ The Tanakh (Hebrew Bible) is the foundational text of Judaism, compiled and canonized over centuries of Israelite history. Its 24 books are divided into three sections: Torah (the Five Books of Moses — Bereshit/Genesis through Devarim/Deuteronomy), Nevi'im (Prophets — Joshua through Malachi), and Ketuvim (Writings — Psalms, Proverbs, Job, and more). WideTorah presents the complete Masoretic text with vowel points (nikud) alongside English translations, organized by the traditional weekly reading cycle of 54 parashot.
33
50
 
34
- ## Widget Options
51
+ ### Verse Card — Single Torah Verse Display
35
52
 
36
- | Attribute | Values | Default | Description |
37
- |-----------|--------|---------|-------------|
38
- | `data-widetorah` | verse, chapter, person, compare, votd, search | required | Widget type |
39
- | `data-ref` | "2:255" | — | Verse/chapter reference |
40
- | `data-slug` | "moses", "paul" | — | Person slug (person widget only) |
41
- | `data-a` | verse ref | — | First verse for comparison |
42
- | `data-b` | verse ref | — | Second verse for comparison |
43
- | `data-theme` | light, dark, sepia | light | Visual theme |
44
- | `data-size` | default, compact | default | Widget size |
45
- | `data-translation` | jps, etc. | jps | Translation code |
46
- | `data-show-original` | true, false | false | Show original language text |
47
- | `data-placeholder` | any string | "Search Torah…" | Search box placeholder |
53
+ A Verse Card renders a single verse in Hebrew with English translation. Hebrew text renders right-to-left with full Masoretic nikud (vowel points) and cantillation marks (trop). The default translation is JPS (Jewish Publication Society, 1917), the standard scholarly translation used in synagogues and Jewish educational institutions.
48
54
 
49
- ## Themes
55
+ | Translation | Code | Style |
56
+ |-------------|------|-------|
57
+ | JPS 1917 | `jps` | Traditional Jewish scholarly translation |
58
+ | King James Version | `kjv` | Widely recognized Christian translation |
50
59
 
51
60
  ```html
52
- <!-- Light (default) -->
53
- <div data-widetorah="votd" data-theme="light"></div>
61
+ <!-- Genesis 1:1 — B'reshit bara Elohim (In the beginning God created) -->
62
+ <div data-widetorah="verse"
63
+ data-ref="Genesis 1:1"
64
+ data-theme="light">
65
+ </div>
54
66
 
55
- <!-- Dark -->
56
- <div data-widetorah="votd" data-theme="dark"></div>
67
+ <!-- Deuteronomy 6:4 — The Shema (Hear O Israel) with Hebrew text -->
68
+ <div data-widetorah="verse"
69
+ data-ref="Deuteronomy 6:4"
70
+ data-translation="jps"
71
+ data-show-original="true"
72
+ data-theme="sepia">
73
+ </div>
57
74
 
58
- <!-- Sepia (warm, book-like) -->
59
- <div data-widetorah="votd" data-theme="sepia"></div>
75
+ <!-- Leviticus 19:18 — Love your neighbor as yourself, compact -->
76
+ <div data-widetorah="verse"
77
+ data-ref="Leviticus 19:18"
78
+ data-size="compact"
79
+ data-theme="dark">
80
+ </div>
81
+
82
+ <script src="https://cdn.jsdelivr.net/npm/widetorah-embed@1/dist/embed.min.js"></script>
60
83
  ```
61
84
 
62
- ## CDN Options
85
+ **Available options for Verse Card:**
63
86
 
64
- ### jsDelivr (recommended global CDN, auto-updates with npm)
87
+ | Attribute | Values | Default |
88
+ |-----------|--------|---------|
89
+ | `data-ref` | `"Book Chapter:Verse"` e.g. `Genesis 1:1` | required |
90
+ | `data-translation` | `jps`, `kjv` | `jps` |
91
+ | `data-show-original` | `true`, `false` | `false` (shows Hebrew with nikud) |
92
+ | `data-theme` | `light`, `dark`, `sepia` | `light` |
93
+ | `data-size` | `default`, `compact` | `default` |
94
+
95
+ Learn more: [Torah Verse Lookup — widetorah.com](https://widetorah.com) · [The Shema — Deuteronomy 6:4](https://widetorah.com) · [Aseret HaDibrot — Ten Commandments](https://widetorah.com)
96
+
97
+ ### Chapter Card — Full Chapter with Navigation
98
+
99
+ A Chapter Card renders all verses in a chapter with previous/next navigation. The Torah's 929 chapters range from 9 verses (Genesis 25) to 91 verses (Psalms 119 in the Ketuvim). Chapter Cards display the parashah name when the chapter falls within the standard weekly reading cycle.
100
+
101
+ Each chapter header displays the Hebrew book name alongside the English name, the chapter number, and the parashah it belongs to (for Torah books). This context helps readers orient within the traditional Jewish reading cycle.
65
102
 
66
103
  ```html
104
+ <!-- Genesis Chapter 1 — Bereishit parashah, creation account -->
105
+ <div data-widetorah="chapter"
106
+ data-ref="Genesis 1"
107
+ data-theme="light">
108
+ </div>
109
+
110
+ <!-- Exodus Chapter 20 — Yitro parashah, Ten Commandments -->
111
+ <div data-widetorah="chapter"
112
+ data-ref="Exodus 20"
113
+ data-translation="jps"
114
+ data-theme="sepia">
115
+ </div>
116
+
117
+ <!-- Psalms Chapter 119 — Longest chapter in Tanakh, 176 verses -->
118
+ <div data-widetorah="chapter"
119
+ data-ref="Psalms 119"
120
+ data-show-original="true"
121
+ data-theme="dark">
122
+ </div>
123
+
67
124
  <script src="https://cdn.jsdelivr.net/npm/widetorah-embed@1/dist/embed.min.js"></script>
68
125
  ```
69
126
 
70
- ### R2 CDN (widetorah.com hosted)
127
+ Learn more: [Browse Tanakh Chapters — widetorah.com](https://widetorah.com) · [54 Parashot — Weekly Portions](https://widetorah.com/parashot/) · [Psalms — 150 Chapters](https://widetorah.com)
128
+
129
+ ### Comparison Card — Side-by-Side Verse Comparison
130
+
131
+ Compare any two verses from across the Tanakh — useful for showing how the same theme appears in Torah law, prophetic books, and Ketuvim wisdom literature, or for displaying how different translations render a Hebrew hapax legomenon (a word appearing only once in the entire text).
132
+
133
+ The Tanakh has extensive internal cross-references — for example, 2 Kings 19 and Isaiah 37 are nearly identical chapters, and Chronicles often parallels Samuel and Kings. The Comparison Card makes these parallels visible.
71
134
 
72
135
  ```html
73
- <script src="https://cdn.widetorah.com/embed.min.js"></script>
74
- ```
136
+ <!-- Compare two accounts of the Ten Commandments: Exodus 20:2 vs Deuteronomy 5:6 -->
137
+ <div data-widetorah="compare"
138
+ data-a="Exodus 20:2"
139
+ data-b="Deuteronomy 5:6"
140
+ data-theme="light">
141
+ </div>
75
142
 
76
- ### npm (for bundlers)
143
+ <!-- Compare two messianic prophecies: Isaiah 9:6 vs Isaiah 53:3 -->
144
+ <div data-widetorah="compare"
145
+ data-a="Isaiah 9:6"
146
+ data-b="Isaiah 53:3"
147
+ data-show-original="true"
148
+ data-theme="sepia">
149
+ </div>
77
150
 
78
- ```bash
79
- npm install widetorah-embed
80
- ```
151
+ <!-- Compare two wisdom sayings: Proverbs 3:5 vs Ecclesiastes 12:13 -->
152
+ <div data-widetorah="compare"
153
+ data-a="Proverbs 3:5"
154
+ data-b="Ecclesiastes 12:13"
155
+ data-translation="jps"
156
+ data-theme="dark">
157
+ </div>
81
158
 
82
- ```javascript
83
- import 'widetorah-embed';
159
+ <script src="https://cdn.jsdelivr.net/npm/widetorah-embed@1/dist/embed.min.js"></script>
84
160
  ```
85
161
 
86
- ## Examples
162
+ Learn more: [Parallel Torah Passages — widetorah.com](https://widetorah.com) · [Rashi Commentaries — 3,901 entries](https://widetorah.com) · [Talmud Cross-References](https://widetorah.com)
87
163
 
88
- ### Verse of the Day
164
+ ### Verse of the Day — Auto-Updating Daily Widget
165
+
166
+ The Verse of the Day widget displays a curated verse that changes automatically each day. Results are cached in localStorage and refresh at midnight UTC. The daily selection follows a 365-verse cycle aligned loosely with the Torah reading cycle, covering all five books of Moses plus highlights from Psalms and Proverbs.
89
167
 
90
168
  ```html
169
+ <!-- Verse of the Day — full size, light theme -->
91
170
  <div data-widetorah="votd" data-theme="light"></div>
171
+
172
+ <!-- Verse of the Day — dark theme -->
173
+ <div data-widetorah="votd" data-theme="dark"></div>
174
+
175
+ <!-- Verse of the Day — sepia, evokes the feel of a parchment scroll -->
176
+ <div data-widetorah="votd" data-theme="sepia"></div>
177
+
178
+ <!-- Compact for narrow sidebars (verse + reference only) -->
179
+ <div data-widetorah="votd" data-theme="light" data-size="compact"></div>
180
+
92
181
  <script src="https://cdn.jsdelivr.net/npm/widetorah-embed@1/dist/embed.min.js"></script>
93
182
  ```
94
183
 
95
- ### Verse with Original Language
184
+ Learn more: [Daily Torah Verse widetorah.com](https://widetorah.com) · [Torah Reading Schedule — Parashah Calendar](https://widetorah.com/parashot/) · [Daf Yomi — Daily Talmud Study](https://widetorah.com)
185
+
186
+ ### Search Box — Full-Text Torah Search
187
+
188
+ Embed a full-text search box that queries all 23,145 verses in both JPS and KJV translations, plus 3,901 Rashi commentaries. Results appear as the user types with book, chapter, and verse reference. Hebrew transliteration search is also supported — searching "shema" returns Deuteronomy 6:4 even without a Hebrew keyboard.
96
189
 
97
190
  ```html
98
- <div data-widetorah="verse"
99
- data-ref="1:1"
100
- data-show-original="true"
191
+ <!-- Default Torah search box -->
192
+ <div data-widetorah="search"
193
+ data-placeholder="Search Torah verses…"
194
+ data-theme="light">
195
+ </div>
196
+
197
+ <!-- Hebrew-aware search placeholder -->
198
+ <div data-widetorah="search"
199
+ data-placeholder="Search in Hebrew or English…"
101
200
  data-theme="sepia">
102
201
  </div>
202
+
203
+ <!-- Dark theme search -->
204
+ <div data-widetorah="search"
205
+ data-placeholder="Find a verse or commentary…"
206
+ data-theme="dark">
207
+ </div>
208
+
103
209
  <script src="https://cdn.jsdelivr.net/npm/widetorah-embed@1/dist/embed.min.js"></script>
104
210
  ```
105
211
 
106
- ### Compact Verse of the Day (sidebar use)
212
+ Learn more: [Tanakh Search widetorah.com](https://widetorah.com) · [Rashi Commentary Search](https://widetorah.com) · [API Search Endpoint](https://widetorah.com/developers/)
213
+
214
+ ## Widget Options
215
+
216
+ All widget types share these common attributes:
217
+
218
+ | Attribute | Values | Default | Description |
219
+ |-----------|--------|---------|-------------|
220
+ | `data-widetorah` | `verse`, `chapter`, `compare`, `votd`, `search` | required | Widget type |
221
+ | `data-ref` | `"Book Chapter:Verse"` e.g. `Genesis 1:1` | — | Verse or chapter reference |
222
+ | `data-a` | verse reference | — | First verse for comparison |
223
+ | `data-b` | verse reference | — | Second verse for comparison |
224
+ | `data-theme` | `light`, `dark`, `sepia` | `light` | Visual theme |
225
+ | `data-size` | `default`, `compact` | `default` | Compact suits sidebars under 300px |
226
+ | `data-translation` | `jps`, `kjv` | `jps` | English translation |
227
+ | `data-show-original` | `true`, `false` | `false` | Show Hebrew Masoretic text with nikud |
228
+ | `data-placeholder` | any string | `"Search Torah…"` | Placeholder for search widget |
229
+
230
+ ## Themes
231
+
232
+ WideTorah widgets support 3 themes:
107
233
 
108
234
  ```html
109
- <div data-widetorah="votd" data-theme="light" data-size="compact"></div>
110
- <script src="https://cdn.jsdelivr.net/npm/widetorah-embed@1/dist/embed.min.js"></script>
235
+ <!-- Light white background, dark text, indigo/purple accent -->
236
+ <div data-widetorah="votd" data-theme="light"></div>
237
+
238
+ <!-- Dark — dark background, light text, indigo accent -->
239
+ <div data-widetorah="votd" data-theme="dark"></div>
240
+
241
+ <!-- Sepia — warm parchment background, brown text — evokes a Torah scroll -->
242
+ <div data-widetorah="votd" data-theme="sepia"></div>
111
243
  ```
112
244
 
113
- ### Search Box
245
+ All themes are self-contained inside Shadow DOM — they never affect or inherit from your site's CSS.
246
+
247
+ ## CDN Options
248
+
249
+ ### jsDelivr (recommended — global CDN, auto-updates with npm)
114
250
 
115
251
  ```html
116
- <div data-widetorah="search" data-placeholder="Search Torah…"></div>
117
252
  <script src="https://cdn.jsdelivr.net/npm/widetorah-embed@1/dist/embed.min.js"></script>
118
253
  ```
119
254
 
120
- ## Technical Details
255
+ Pin to a specific version for production stability:
256
+
257
+ ```html
258
+ <script src="https://cdn.jsdelivr.net/npm/widetorah-embed@1.0.1/dist/embed.min.js"></script>
259
+ ```
260
+
261
+ ### R2 CDN (widetorah.com hosted)
121
262
 
122
- - **Shadow DOM**: Complete style isolation — no CSS conflicts with your site
123
- - **Zero dependencies**: No jQuery, React, or any external library
124
- - **System fonts**: No Google Fonts request — loads instantly
125
- - **CORS**: WideTorah API has CORS enabled for all origins
126
- - **Caching**: Verse of the Day cached in localStorage (refreshes daily)
127
- - **MutationObserver**: Works with dynamically added elements (SPAs)
128
- - **Bundle size**: ~5KB gzipped
263
+ ```html
264
+ <script src="https://cdn.widetorah.com/embed.min.js"></script>
265
+ ```
129
266
 
130
- ## Learn More About Torah
267
+ ### npm (for bundlers — Webpack, Vite, Rollup)
131
268
 
132
- Visit [widetorah.com](https://widetorah.com) — WideTorah is a comprehensive Torah reference with full text, translations, and study tools.
269
+ ```bash
270
+ npm install widetorah-embed
271
+ ```
272
+
273
+ ```javascript
274
+ import 'widetorah-embed';
275
+ ```
276
+
277
+ ## Technical Details
133
278
 
134
- - **API docs**: [widetorah.com/developers/](https://widetorah.com/developers/)
135
- - **Widget builder**: [widget.widetorah.com](https://widget.widetorah.com)
136
- - **npm package**: [npmjs.com/package/widetorah-embed](https://www.npmjs.com/package/widetorah-embed)
279
+ - **Shadow DOM**: Complete style isolation — no CSS conflicts with your site. Widgets are fully encapsulated.
280
+ - **Zero dependencies**: No jQuery, React, Vue, or any external library. Pure browser APIs only.
281
+ - **RTL support**: Hebrew text renders correctly right-to-left with Masoretic nikud and trop marks.
282
+ - **System fonts**: No Google Fonts request — widgets use the system font stack and load instantly.
283
+ - **CORS**: WideTorah API has CORS enabled for all origins — no proxy needed.
284
+ - **Caching**: Verse of the Day cached in localStorage, refreshes daily at midnight UTC.
285
+ - **MutationObserver**: Works with dynamically added elements (React, Vue, Angular SPAs).
286
+ - **Bundle size**: ~5KB gzipped.
287
+ - **Accent color**: Indigo (`#6366F1`) — matches the WideTorah brand.
288
+ - **API base**: `https://widetorah.com/api/v1/` — free, no authentication required.
289
+
290
+ ## Learn More About the Torah
291
+
292
+ - **Browse**: [All 24 Tanakh Books — widetorah.com](https://widetorah.com) · [Five Books of Moses](https://widetorah.com) · [Nevi'im — Prophets](https://widetorah.com) · [Ketuvim — Writings](https://widetorah.com)
293
+ - **Study**: [54 Parashot — Weekly Torah Portions](https://widetorah.com/parashot/) · [Rashi Commentaries — 3,901 entries](https://widetorah.com) · [Talmud Daf Yomi — 2,121 pages](https://widetorah.com)
294
+ - **Reference**: [Hebrew-English Tanakh](https://widetorah.com) · [JPS Translation Guide](https://widetorah.com/translations/) · [Masoretic Text Explained](https://widetorah.com)
295
+ - **Tools**: [Torah Verse Lookup](https://widetorah.com) · [Parashah Calendar](https://widetorah.com/parashot/) · [Widget Builder](https://widget.widetorah.com)
296
+ - **API**: [REST API Docs](https://widetorah.com/developers/) · [OpenAPI Spec](https://widetorah.com/api/openapi.json)
137
297
 
138
298
  ## WideHoly Scripture Family
139
299
 
@@ -141,15 +301,15 @@ Part of [WideHoly](https://wideholy.com) — Scripture for everyone.
141
301
 
142
302
  | Site | Domain | Scripture |
143
303
  |------|--------|-----------|
144
- | **WideBible** | [widebible.com](https://widebible.com) | Bible verses, chapters, people |
145
- | **WideQuran** | [widequran.com](https://widequran.com) | Quran verses, surahs |
146
- | **WideTorah** | [widetorah.com](https://widetorah.com) | Torah verses, portions |
147
- | **WideGita** | [widegita.com](https://widegita.com) | Bhagavad Gita verses |
148
- | **WideSutra** | [widesutra.com](https://widesutra.com) | Buddhist sutras, teachings |
149
- | **WideHoly** | [wideholy.com](https://wideholy.com) | Multi-religion scripture hub |
304
+ | WideBible | [widebible.com](https://widebible.com) | 66 books, 31,102 verses, KJV/ASV/BBE/YLT, 1,833 people |
305
+ | WideQuran | [widequran.com](https://widequran.com) | 114 surahs, 6,236 ayahs, Arabic Uthmani + 5 translations |
306
+ | **WideTorah** | [widetorah.com](https://widetorah.com) | **24 books, 23,145 verses, Hebrew Masoretic + English, 54 parashot, 3,901 Rashi commentaries** |
307
+ | WideGita | [widegita.com](https://widegita.com) | 18 chapters, 700 verses, Sanskrit Devanagari + 9 commentators |
308
+ | WideSutra | [widesutra.com](https://widesutra.com) | 5 collections, 5,326 texts, Pali + English |
309
+ | WideHoly | [wideholy.com](https://wideholy.com) | 5 religions, 236,000+ scripture records, cross-religion comparison |
150
310
 
151
311
  ## License
152
312
 
153
313
  MIT — see [LICENSE](./LICENSE).
154
314
 
155
- Built with ❤️ by [WideHoly](https://wideholy.com).
315
+ Built with care by [WideHoly](https://wideholy.com).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "widetorah-embed",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Embed WideTorah scripture widgets on any website. Lightweight (~5KB gzipped), zero dependencies, Shadow DOM isolation, 3 themes (light/dark/sepia).",
5
5
  "main": "dist/embed.min.js",
6
6
  "module": "dist/embed.esm.js",
@@ -35,4 +35,4 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  }
38
- }
38
+ }