widebible-embed 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 WideHoly
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,156 @@
1
+ # widebible-embed
2
+
3
+ [![npm](https://img.shields.io/npm/v/widebible-embed)](https://www.npmjs.com/package/widebible-embed)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+ [![Zero Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)](https://www.npmjs.com/package/widebible-embed)
6
+ [![Size](https://img.shields.io/badge/size-~5KB-green)](https://bundlephobia.com/package/widebible-embed)
7
+
8
+ Embed WideBible 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 WideBible" backlink.
9
+
10
+ > **Try the interactive widget builder at [widget.widebible.com](https://widget.widebible.com)**
11
+
12
+ ## Quick Start
13
+
14
+ ```html
15
+ <!-- Place widget div where you want it to appear -->
16
+ <div data-widebible="verse" data-ref="John 3:16" data-theme="light"></div>
17
+
18
+ <!-- Load the embed script once, anywhere on the page -->
19
+ <script src="https://cdn.jsdelivr.net/npm/widebible-embed@1/dist/embed.min.js"></script>
20
+ ```
21
+
22
+ That's it. The widget will load, fetch the verse from the WideBible API, and render it with full style isolation.
23
+
24
+ ## Widget Types
25
+
26
+ | Type | Usage |
27
+ |------|-------|
28
+ | Verse Card | `<div data-widebible="verse" data-ref="..." data-theme="light"></div>` |
29
+ | Chapter Card | `<div data-widebible="chapter" data-ref="..."></div>` |
30
+ | Person Card | `<div data-widebible="person" data-slug="moses"></div>` |
31
+ | Comparison Card | `<div data-widebible="compare" data-a="..." data-b="..."></div>` |
32
+ | Verse of the Day | `<div data-widebible="votd" data-theme="light"></div>` |
33
+ | Search Box | `<div data-widebible="search" data-placeholder="..."></div>` |
34
+
35
+ ## Widget Options
36
+
37
+ | Attribute | Values | Default | Description |
38
+ |-----------|--------|---------|-------------|
39
+ | `data-widebible` | verse, chapter, person, compare, votd, search | required | Widget type |
40
+ | `data-ref` | "John 3:16" | — | Verse/chapter reference |
41
+ | `data-slug` | "moses", "paul" | — | Person slug (person widget only) |
42
+ | `data-a` | verse ref | — | First verse for comparison |
43
+ | `data-b` | verse ref | — | Second verse for comparison |
44
+ | `data-theme` | light, dark, sepia | light | Visual theme |
45
+ | `data-size` | default, compact | default | Widget size |
46
+ | `data-translation` | kjv, etc. | kjv | Translation code |
47
+ | `data-show-original` | true, false | false | Show original language text |
48
+ | `data-placeholder` | any string | "Search Bible…" | Search box placeholder |
49
+
50
+ ## Themes
51
+
52
+ ```html
53
+ <!-- Light (default) -->
54
+ <div data-widebible="votd" data-theme="light"></div>
55
+
56
+ <!-- Dark -->
57
+ <div data-widebible="votd" data-theme="dark"></div>
58
+
59
+ <!-- Sepia (warm, book-like) -->
60
+ <div data-widebible="votd" data-theme="sepia"></div>
61
+ ```
62
+
63
+ ## CDN Options
64
+
65
+ ### jsDelivr (recommended — global CDN, auto-updates with npm)
66
+
67
+ ```html
68
+ <script src="https://cdn.jsdelivr.net/npm/widebible-embed@1/dist/embed.min.js"></script>
69
+ ```
70
+
71
+ ### R2 CDN (widebible.com hosted)
72
+
73
+ ```html
74
+ <script src="https://cdn.widebible.com/embed.min.js"></script>
75
+ ```
76
+
77
+ ### npm (for bundlers)
78
+
79
+ ```bash
80
+ npm install widebible-embed
81
+ ```
82
+
83
+ ```javascript
84
+ import 'widebible-embed';
85
+ ```
86
+
87
+ ## Examples
88
+
89
+ ### Verse of the Day
90
+
91
+ ```html
92
+ <div data-widebible="votd" data-theme="light"></div>
93
+ <script src="https://cdn.jsdelivr.net/npm/widebible-embed@1/dist/embed.min.js"></script>
94
+ ```
95
+
96
+ ### Verse with Original Language
97
+
98
+ ```html
99
+ <div data-widebible="verse"
100
+ data-ref="John 3:16"
101
+ data-show-original="true"
102
+ data-theme="sepia">
103
+ </div>
104
+ <script src="https://cdn.jsdelivr.net/npm/widebible-embed@1/dist/embed.min.js"></script>
105
+ ```
106
+
107
+ ### Compact Verse of the Day (sidebar use)
108
+
109
+ ```html
110
+ <div data-widebible="votd" data-theme="light" data-size="compact"></div>
111
+ <script src="https://cdn.jsdelivr.net/npm/widebible-embed@1/dist/embed.min.js"></script>
112
+ ```
113
+
114
+ ### Search Box
115
+
116
+ ```html
117
+ <div data-widebible="search" data-placeholder="Search Bible…"></div>
118
+ <script src="https://cdn.jsdelivr.net/npm/widebible-embed@1/dist/embed.min.js"></script>
119
+ ```
120
+
121
+ ## Technical Details
122
+
123
+ - **Shadow DOM**: Complete style isolation — no CSS conflicts with your site
124
+ - **Zero dependencies**: No jQuery, React, or any external library
125
+ - **System fonts**: No Google Fonts request — loads instantly
126
+ - **CORS**: WideBible API has CORS enabled for all origins
127
+ - **Caching**: Verse of the Day cached in localStorage (refreshes daily)
128
+ - **MutationObserver**: Works with dynamically added elements (SPAs)
129
+ - **Bundle size**: ~5KB gzipped
130
+
131
+ ## Learn More About Bible
132
+
133
+ Visit [widebible.com](https://widebible.com) — WideBible is a comprehensive Bible reference with full text, translations, and study tools.
134
+
135
+ - **API docs**: [widebible.com/developers/](https://widebible.com/developers/)
136
+ - **Widget builder**: [widget.widebible.com](https://widget.widebible.com)
137
+ - **npm package**: [npmjs.com/package/widebible-embed](https://www.npmjs.com/package/widebible-embed)
138
+
139
+ ## WideHoly Scripture Family
140
+
141
+ Part of [WideHoly](https://wideholy.com) — Scripture for everyone.
142
+
143
+ | Site | Domain | Scripture |
144
+ |------|--------|-----------|
145
+ | **WideBible** | [widebible.com](https://widebible.com) | Bible verses, chapters, people |
146
+ | **WideQuran** | [widequran.com](https://widequran.com) | Quran verses, surahs |
147
+ | **WideTorah** | [widetorah.com](https://widetorah.com) | Torah verses, portions |
148
+ | **WideGita** | [widegita.com](https://widegita.com) | Bhagavad Gita verses |
149
+ | **WideSutra** | [widesutra.com](https://widesutra.com) | Buddhist sutras, teachings |
150
+ | **WideHoly** | [wideholy.com](https://wideholy.com) | Multi-religion scripture hub |
151
+
152
+ ## License
153
+
154
+ MIT — see [LICENSE](./LICENSE).
155
+
156
+ Built with ❤️ by [WideHoly](https://wideholy.com).