taleem-browser 0.1.0 → 0.1.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 +128 -38
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,30 +1,41 @@
1
-
2
1
  # taleem-browser
3
2
 
4
- **taleem-browser** is a minimal, index-based slide document browser.
3
+ **taleem-browser** provides a simple and reliable way to create **JSON-based slide presentations** and display them in the browser.
4
+
5
+ It is designed for:
6
+ - students
7
+ - teachers
8
+ - academics
9
+ - anyone who wants structured, content-driven slides without complex tools
10
+
11
+ At its core, `taleem-browser` does one thing well:
5
12
 
6
- At its core, it is a **JSON Slides engine**:
13
+ > **Take a slide deck written in JSON and display it as slides.**
7
14
 
8
- > **JSON in slides out**
15
+ You give it a valid deck, and it renders the slides — one at a time — into the page.
9
16
 
10
- It takes a structured slide deck (JSON) and renders one slide at a time into the DOM, allowing simple, reliable navigation by index.
17
+ That’s it.
11
18
 
12
- There is **no timeline**, **no autoplay**, and **no animation logic** by design.
19
+ There is no autoplay, no animation system, and no timing dependency.
20
+ Slides always render, regardless of how simple or complex the deck is.
13
21
 
14
22
  ---
15
23
 
16
24
  ## Core idea
17
25
 
18
- Slides are **documents**, not animations.
26
+ A slide deck is treated as a **document**, not a video or animation.
27
+
28
+ Slides are shown in a fixed order, and the browser moves between them by position (previous, next, or jump to a slide).
19
29
 
20
- A deck is an **ordered list of slides**.
21
- `taleem-browser` lets you **view and navigate** that list safely and deterministically.
30
+ This makes slide creation:
31
+ - predictable
32
+ - easy to debug
33
+ - safe to modify
34
+ - suitable for learning and teaching material
22
35
 
23
- - No matter how simple or complex the deck is
24
- - Whether timing metadata exists or not
25
- - Even if timing metadata is incomplete or wrong
36
+ You focus on **content and structure**.
37
+ `taleem-browser` handles display and navigation.
26
38
 
27
- Slides always render.
28
39
 
29
40
  ---
30
41
 
@@ -39,47 +50,125 @@ Slides always render.
39
50
  - Navigates slides by **index**
40
51
  - Always succeeds at rendering content
41
52
 
42
- Navigation is explicit and controlled via a small API:
53
+ The public API is intentionally small:
43
54
 
44
- - `next()`
45
- - `prev()`
46
- - `goTo(index)`
55
+ ```js
56
+ browser.next()
57
+ browser.prev()
58
+ browser.goTo(index)
59
+
60
+ browser.getIndex()
61
+ browser.getTotal()
62
+
63
+ browser.render()
64
+ browser.destroy()
65
+ ````
66
+
67
+ That’s the entire contract.
47
68
 
48
69
  ---
49
70
 
50
71
  ## What this library intentionally does NOT do
51
72
 
73
+ This is not an omission — it is a design choice.
74
+
52
75
  `taleem-browser` does **not**:
53
76
 
54
- - interpret `start`, `end`, or `showAt`
55
- - manage time or intervals
56
- - autoplay slides
57
- - sync audio or narration
58
- - perform animations
59
- - depend on any framework (React, Svelte, etc.)
77
+ * interpret `start`, `end`, or `showAt`
78
+ * manage time, intervals, or autoplay
79
+ * perform animations or transitions
80
+ * sync audio or narration
81
+ * depend on any framework (React, Svelte, Vue, etc.)
82
+ * grow configuration options endlessly
60
83
 
61
- These concerns belong to a **separate playback layer**, not a document browser.
84
+ These concerns belong to **different layers or different libraries**.
62
85
 
63
86
  ---
64
87
 
65
88
  ## Relationship to other Taleem libraries
66
89
 
67
- `taleem-browser` sits above lower-level libraries:
90
+ `taleem-browser` is part of a small, layered ecosystem.
68
91
 
69
- - **taleem-core**
70
- Defines schemas and core data rules.
92
+ ### Lower-level libraries
71
93
 
72
- - **taleem-slides**
94
+ * **taleem-core**
95
+ Defines deck schemas, validation rules, and core concepts.
96
+ 📄 API reference:
97
+ [https://github.com/bilza2023/taleem-core/blob/master/docs/api.md](https://github.com/bilza2023/taleem-core/blob/master/docs/api.md)
98
+
99
+ * **taleem-slides**
73
100
  Converts slide JSON into HTML.
101
+ This is the renderer used internally by `taleem-browser`.
102
+ 🔗 Repository:
103
+ [https://github.com/bilza2023/taleem-slides](https://github.com/bilza2023/taleem-slides)
74
104
 
75
- `taleem-browser` uses `taleem-slides` internally so users don’t have to wire renderers manually.
105
+ `taleem-browser` sits **above** these libraries so users do not need to wire renderers or schemas manually.
76
106
 
77
- If you want full control over rendering, you can use `taleem-slides` directly.
107
+ If you want low-level control over rendering, use `taleem-slides` directly.
78
108
  If you want a **ready-to-use slide viewer**, use `taleem-browser`.
79
109
 
80
110
  ---
81
111
 
82
- ## Usage (minimal)
112
+ ## Example deck (gold standard)
113
+
114
+ A complete, production-quality example deck is available here:
115
+
116
+ 🔗 **Demo gold-standard deck**
117
+ [https://github.com/bilza2023/taleem/blob/master/decks/demo-gold.json](https://github.com/bilza2023/taleem/blob/master/decks/demo-gold.json)
118
+
119
+ This deck is used as a visual and structural reference for:
120
+
121
+ * slide layout
122
+ * spacing
123
+ * typography
124
+ * JSON structure
125
+
126
+ ---
127
+
128
+ ## Advanced playback (out of scope)
129
+
130
+ Timed playback, animations, narration, or video-like behavior are **explicitly out of scope** for this library.
131
+
132
+ Timing-related fields such as `start`, `end`, and `showAt` are treated as **metadata**, not requirements.
133
+
134
+ For deeper reading on timing concepts and EQ-style slides:
135
+
136
+ * 📄 EQ slide format (advanced, optional):
137
+ [https://github.com/bilza2023/taleem-core/blob/master/docs/eq.md](https://github.com/bilza2023/taleem-core/blob/master/docs/eq.md)
138
+
139
+ * 📄 Timing rules (for playback layers, not the browser):
140
+ [https://github.com/bilza2023/taleem-core/blob/master/docs/timings.md](https://github.com/bilza2023/taleem-core/blob/master/docs/timings.md)
141
+
142
+ A future playback layer (e.g. `taleem-player`) may interpret these fields, but `taleem-browser` never depends on them.
143
+
144
+ ---
145
+
146
+ ## Project discipline (important)
147
+
148
+ To keep the core strong, we follow strict rules:
149
+
150
+ ### ❌ Things we do NOT do
151
+
152
+ * Do **not** add new slide types (too early)
153
+ * Do **not** add new features casually
154
+ * Do **not** blur browser and player responsibilities
155
+ * Do **not** over-optimize
156
+ * Do **not** grow the API
157
+ * Do **not** chase frameworks or trends
158
+
159
+ ### ✅ Things we focus on
160
+
161
+ * More example decks
162
+ * CSS and rendering bug fixes
163
+ * Navigation correctness
164
+ * Documentation clarity
165
+ * Stability over novelty
166
+
167
+ Every “no” protects the core.
168
+
169
+ ---
170
+
171
+ ## Minimal usage
83
172
 
84
173
  ```js
85
174
  import { createTaleemBrowser } from "taleem-browser";
@@ -93,9 +182,7 @@ const browser = createTaleemBrowser({
93
182
  browser.next();
94
183
  browser.prev();
95
184
  browser.goTo(3);
96
- ````
97
-
98
- That’s it.
185
+ ```
99
186
 
100
187
  ---
101
188
 
@@ -103,7 +190,7 @@ That’s it.
103
190
 
104
191
  * Slides are **content-first**
105
192
  * Index is more fundamental than time
106
- * Rendering should never fail because of timing
193
+ * Rendering should never fail
107
194
  * Static viewing is the default
108
195
  * Playback is an optional interpretation
109
196
 
@@ -112,14 +199,17 @@ That’s it.
112
199
 
113
200
  ---
114
201
 
115
- ## Advanced playback
202
+ ### Related project (optional)
116
203
 
117
- If you need timed playback (e.g. animations, narration, or video-like behavior), use a higher-level utility (such as a future `taleem-player`) that **drives** `taleem-browser`.
204
+ `taleem-browser` is actively used in the **Taleem demo project**, which showcases real decks, layouts, and usage patterns as they evolve.
118
205
 
119
- The browser itself remains simple, stable, and predictable.
206
+ The demo project is a work in progress and is provided as a reference, not a dependency:
207
+
208
+ https://github.com/bilza2023/taleem
120
209
 
121
210
  ---
122
211
 
123
212
  ## License
124
213
 
125
214
  MIT
215
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taleem-browser",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Pure index-based slide document browser for Taleem decks",
5
5
  "type": "module",
6
6