taleem-browser 0.1.3 → 0.2.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/README.md +48 -37
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
|
|
1
2
|
# taleem-browser
|
|
2
3
|
|
|
3
|
-
**taleem-browser** provides a simple and reliable way to
|
|
4
|
+
**taleem-browser** provides a simple and reliable way to display **JSON-based slide decks** in the browser.
|
|
4
5
|
|
|
5
6
|
It is designed for:
|
|
6
|
-
- students
|
|
7
|
-
- teachers
|
|
8
|
-
- academics
|
|
9
|
-
- anyone who wants structured, content-driven slides without complex tools
|
|
7
|
+
- students
|
|
8
|
+
- teachers
|
|
9
|
+
- academics
|
|
10
|
+
- anyone who wants structured, content-driven slides without complex tools
|
|
10
11
|
|
|
11
12
|
At its core, `taleem-browser` does one thing well:
|
|
12
13
|
|
|
@@ -28,15 +29,14 @@ A slide deck is treated as a **document**, not a video or animation.
|
|
|
28
29
|
Slides are shown in a fixed order, and the browser moves between them by position (previous, next, or jump to a slide).
|
|
29
30
|
|
|
30
31
|
This makes slide creation:
|
|
31
|
-
- predictable
|
|
32
|
-
- easy to debug
|
|
33
|
-
- safe to modify
|
|
34
|
-
- suitable for learning and teaching material
|
|
32
|
+
- predictable
|
|
33
|
+
- easy to debug
|
|
34
|
+
- safe to modify
|
|
35
|
+
- suitable for learning and teaching material
|
|
35
36
|
|
|
36
37
|
You focus on **content and structure**.
|
|
37
38
|
`taleem-browser` handles display and navigation.
|
|
38
39
|
|
|
39
|
-
|
|
40
40
|
---
|
|
41
41
|
|
|
42
42
|
## What this library does
|
|
@@ -44,11 +44,11 @@ You focus on **content and structure**.
|
|
|
44
44
|
`taleem-browser`:
|
|
45
45
|
|
|
46
46
|
- Accepts a **deck JSON object**
|
|
47
|
-
-
|
|
47
|
+
- Uses `taleem-slides` to render slides into HTML
|
|
48
48
|
- Owns a single DOM mount point
|
|
49
49
|
- Displays **exactly one slide at a time**
|
|
50
50
|
- Navigates slides by **index**
|
|
51
|
-
- Always succeeds at rendering content
|
|
51
|
+
- Always succeeds at rendering valid content
|
|
52
52
|
|
|
53
53
|
The public API is intentionally small:
|
|
54
54
|
|
|
@@ -56,16 +56,14 @@ The public API is intentionally small:
|
|
|
56
56
|
browser.next()
|
|
57
57
|
browser.prev()
|
|
58
58
|
browser.goTo(index)
|
|
59
|
-
|
|
60
|
-
browser.getIndex()
|
|
61
|
-
browser.getTotal()
|
|
62
|
-
|
|
63
59
|
browser.render()
|
|
64
|
-
browser.destroy()
|
|
65
60
|
````
|
|
66
61
|
|
|
67
62
|
That’s the entire contract.
|
|
68
63
|
|
|
64
|
+
There are **no state getters** and **no lifecycle hooks** exposed.
|
|
65
|
+
The browser is controlled purely by commands, and verified by what appears in the DOM.
|
|
66
|
+
|
|
69
67
|
---
|
|
70
68
|
|
|
71
69
|
## What this library intentionally does NOT do
|
|
@@ -78,13 +76,27 @@ This is not an omission — it is a design choice.
|
|
|
78
76
|
* manage time, intervals, or autoplay
|
|
79
77
|
* perform animations or transitions
|
|
80
78
|
* sync audio or narration
|
|
79
|
+
* expose internal state (index, total, slides)
|
|
81
80
|
* depend on any framework (React, Svelte, Vue, etc.)
|
|
82
81
|
* grow configuration options endlessly
|
|
83
82
|
|
|
84
83
|
These concerns belong to **different layers or different libraries**.
|
|
85
84
|
|
|
86
85
|
---
|
|
87
|
-
|
|
86
|
+
|
|
87
|
+
## Styling
|
|
88
|
+
|
|
89
|
+
Canonical slide styles live in:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
src/styles/taleem.css
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
They are bundled and shipped as part of the release assets.
|
|
96
|
+
|
|
97
|
+
The browser does not generate styles dynamically.
|
|
98
|
+
Styling is deterministic, inspectable, and override-friendly.
|
|
99
|
+
|
|
88
100
|
---
|
|
89
101
|
|
|
90
102
|
## Relationship to other Taleem libraries
|
|
@@ -93,16 +105,16 @@ These concerns belong to **different layers or different libraries**.
|
|
|
93
105
|
|
|
94
106
|
### Lower-level libraries
|
|
95
107
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
108
|
+
**taleem-core**
|
|
109
|
+
Defines deck schemas, validation rules, and core concepts.
|
|
110
|
+
📄 API reference:
|
|
111
|
+
[https://github.com/bilza2023/taleem-core/blob/master/docs/api.md](https://github.com/bilza2023/taleem-core/blob/master/docs/api.md)
|
|
100
112
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
113
|
+
**taleem-slides**
|
|
114
|
+
Converts slide JSON into HTML.
|
|
115
|
+
This is the renderer used internally by `taleem-browser`.
|
|
116
|
+
🔗 Repository:
|
|
117
|
+
[https://github.com/bilza2023/taleem-slides](https://github.com/bilza2023/taleem-slides)
|
|
106
118
|
|
|
107
119
|
`taleem-browser` sits **above** these libraries so users do not need to wire renderers or schemas manually.
|
|
108
120
|
|
|
@@ -118,7 +130,7 @@ A complete, production-quality example deck is available here:
|
|
|
118
130
|
🔗 **Demo gold-standard deck**
|
|
119
131
|
[https://github.com/bilza2023/taleem/blob/master/decks/demo-gold.json](https://github.com/bilza2023/taleem/blob/master/decks/demo-gold.json)
|
|
120
132
|
|
|
121
|
-
This deck is used as a
|
|
133
|
+
This deck is used as a reference for:
|
|
122
134
|
|
|
123
135
|
* slide layout
|
|
124
136
|
* spacing
|
|
@@ -147,14 +159,14 @@ A future playback layer (e.g. `taleem-player`) may interpret these fields, but `
|
|
|
147
159
|
|
|
148
160
|
## Project discipline (important)
|
|
149
161
|
|
|
150
|
-
To keep the core strong, we follow strict rules
|
|
162
|
+
To keep the core strong, we follow strict rules.
|
|
151
163
|
|
|
152
164
|
### ❌ Things we do NOT do
|
|
153
165
|
|
|
154
|
-
* Do **not** add new slide types
|
|
155
|
-
* Do **not** add
|
|
166
|
+
* Do **not** add new slide types casually
|
|
167
|
+
* Do **not** add timing or playback logic
|
|
156
168
|
* Do **not** blur browser and player responsibilities
|
|
157
|
-
* Do **not**
|
|
169
|
+
* Do **not** expose internal state
|
|
158
170
|
* Do **not** grow the API
|
|
159
171
|
* Do **not** chase frameworks or trends
|
|
160
172
|
|
|
@@ -201,17 +213,16 @@ browser.goTo(3);
|
|
|
201
213
|
|
|
202
214
|
---
|
|
203
215
|
|
|
204
|
-
|
|
216
|
+
## Related project (optional)
|
|
205
217
|
|
|
206
218
|
`taleem-browser` is actively used in the **Taleem demo project**, which showcases real decks, layouts, and usage patterns as they evolve.
|
|
207
219
|
|
|
208
|
-
The demo project is
|
|
220
|
+
The demo project is provided as a reference, not a dependency:
|
|
209
221
|
|
|
210
|
-
https://github.com/bilza2023/taleem
|
|
222
|
+
[https://github.com/bilza2023/taleem](https://github.com/bilza2023/taleem)
|
|
211
223
|
|
|
212
224
|
---
|
|
213
225
|
|
|
214
226
|
## License
|
|
215
227
|
|
|
216
|
-
MIT
|
|
217
|
-
|
|
228
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taleem-browser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Pure JSON slide browser for taleem-slides (index-based, no timing).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/taleem-browser.umd.js",
|
|
@@ -16,13 +16,16 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "node ./scripts/build.js"
|
|
19
|
+
"build": "node ./scripts/build.js",
|
|
20
|
+
"test": "vitest"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
23
|
"taleem-slides": "^0.3.0"
|
|
23
24
|
},
|
|
24
|
-
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"esbuild": "^0.27.2"
|
|
27
|
-
|
|
26
|
+
"esbuild": "^0.27.2",
|
|
27
|
+
"vitest": "^1.6.0",
|
|
28
|
+
"jsdom": "^24.0.0"
|
|
29
|
+
},
|
|
30
|
+
"license": "MIT"
|
|
28
31
|
}
|