taleem-browser 0.1.0 → 0.1.3

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
@@ -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,127 @@ 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
 
86
+ ---
87
+ “Canonical slide styles live at src/styles/taleem.css and are shipped as a release asset.”
63
88
  ---
64
89
 
65
90
  ## Relationship to other Taleem libraries
66
91
 
67
- `taleem-browser` sits above lower-level libraries:
92
+ `taleem-browser` is part of a small, layered ecosystem.
93
+
94
+ ### Lower-level libraries
68
95
 
69
- - **taleem-core**
70
- Defines schemas and core data rules.
96
+ * **taleem-core**
97
+ Defines deck schemas, validation rules, and core concepts.
98
+ 📄 API reference:
99
+ [https://github.com/bilza2023/taleem-core/blob/master/docs/api.md](https://github.com/bilza2023/taleem-core/blob/master/docs/api.md)
71
100
 
72
- - **taleem-slides**
101
+ * **taleem-slides**
73
102
  Converts slide JSON into HTML.
103
+ This is the renderer used internally by `taleem-browser`.
104
+ 🔗 Repository:
105
+ [https://github.com/bilza2023/taleem-slides](https://github.com/bilza2023/taleem-slides)
74
106
 
75
- `taleem-browser` uses `taleem-slides` internally so users don’t have to wire renderers manually.
107
+ `taleem-browser` sits **above** these libraries so users do not need to wire renderers or schemas manually.
76
108
 
77
- If you want full control over rendering, you can use `taleem-slides` directly.
109
+ If you want low-level control over rendering, use `taleem-slides` directly.
78
110
  If you want a **ready-to-use slide viewer**, use `taleem-browser`.
79
111
 
80
112
  ---
81
113
 
82
- ## Usage (minimal)
114
+ ## Example deck (gold standard)
115
+
116
+ A complete, production-quality example deck is available here:
117
+
118
+ 🔗 **Demo gold-standard deck**
119
+ [https://github.com/bilza2023/taleem/blob/master/decks/demo-gold.json](https://github.com/bilza2023/taleem/blob/master/decks/demo-gold.json)
120
+
121
+ This deck is used as a visual and structural reference for:
122
+
123
+ * slide layout
124
+ * spacing
125
+ * typography
126
+ * JSON structure
127
+
128
+ ---
129
+
130
+ ## Advanced playback (out of scope)
131
+
132
+ Timed playback, animations, narration, or video-like behavior are **explicitly out of scope** for this library.
133
+
134
+ Timing-related fields such as `start`, `end`, and `showAt` are treated as **metadata**, not requirements.
135
+
136
+ For deeper reading on timing concepts and EQ-style slides:
137
+
138
+ * 📄 EQ slide format (advanced, optional):
139
+ [https://github.com/bilza2023/taleem-core/blob/master/docs/eq.md](https://github.com/bilza2023/taleem-core/blob/master/docs/eq.md)
140
+
141
+ * 📄 Timing rules (for playback layers, not the browser):
142
+ [https://github.com/bilza2023/taleem-core/blob/master/docs/timings.md](https://github.com/bilza2023/taleem-core/blob/master/docs/timings.md)
143
+
144
+ A future playback layer (e.g. `taleem-player`) may interpret these fields, but `taleem-browser` never depends on them.
145
+
146
+ ---
147
+
148
+ ## Project discipline (important)
149
+
150
+ To keep the core strong, we follow strict rules:
151
+
152
+ ### ❌ Things we do NOT do
153
+
154
+ * Do **not** add new slide types (too early)
155
+ * Do **not** add new features casually
156
+ * Do **not** blur browser and player responsibilities
157
+ * Do **not** over-optimize
158
+ * Do **not** grow the API
159
+ * Do **not** chase frameworks or trends
160
+
161
+ ### ✅ Things we focus on
162
+
163
+ * More example decks
164
+ * CSS and rendering bug fixes
165
+ * Navigation correctness
166
+ * Documentation clarity
167
+ * Stability over novelty
168
+
169
+ Every “no” protects the core.
170
+
171
+ ---
172
+
173
+ ## Minimal usage
83
174
 
84
175
  ```js
85
176
  import { createTaleemBrowser } from "taleem-browser";
@@ -93,9 +184,7 @@ const browser = createTaleemBrowser({
93
184
  browser.next();
94
185
  browser.prev();
95
186
  browser.goTo(3);
96
- ````
97
-
98
- That’s it.
187
+ ```
99
188
 
100
189
  ---
101
190
 
@@ -103,7 +192,7 @@ That’s it.
103
192
 
104
193
  * Slides are **content-first**
105
194
  * Index is more fundamental than time
106
- * Rendering should never fail because of timing
195
+ * Rendering should never fail
107
196
  * Static viewing is the default
108
197
  * Playback is an optional interpretation
109
198
 
@@ -112,14 +201,17 @@ That’s it.
112
201
 
113
202
  ---
114
203
 
115
- ## Advanced playback
204
+ ### Related project (optional)
116
205
 
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`.
206
+ `taleem-browser` is actively used in the **Taleem demo project**, which showcases real decks, layouts, and usage patterns as they evolve.
118
207
 
119
- The browser itself remains simple, stable, and predictable.
208
+ The demo project is a work in progress and is provided as a reference, not a dependency:
209
+
210
+ https://github.com/bilza2023/taleem
120
211
 
121
212
  ---
122
213
 
123
214
  ## License
124
215
 
125
216
  MIT
217
+