taleem-player 1.0.4 → 1.0.6
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/dist/css/taleem.css +79 -1
- package/dist/spec/index.js +291 -0
- package/dist/taleem-player.esm.js +49 -63
- package/dist/taleem-player.umd.js +49 -63
- package/dist/validation/index.js +14047 -0
- package/package.json +8 -8
package/dist/css/taleem.css
CHANGED
|
@@ -407,4 +407,82 @@
|
|
|
407
407
|
bottom: 0;
|
|
408
408
|
right: 0;
|
|
409
409
|
}
|
|
410
|
-
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
/* =====================================================
|
|
414
|
+
EQ — TWO COLUMN (FIXED EXPLANATION PANEL)
|
|
415
|
+
===================================================== */
|
|
416
|
+
|
|
417
|
+
.slide.eq.eq-two-column {
|
|
418
|
+
display: flex;
|
|
419
|
+
flex-direction: row;
|
|
420
|
+
align-items: center;
|
|
421
|
+
justify-content: center;
|
|
422
|
+
|
|
423
|
+
gap: 64px;
|
|
424
|
+
text-align: left;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/* LEFT PANEL — explanation (replaces image area) */
|
|
428
|
+
.eq-explain-panel {
|
|
429
|
+
flex: 1;
|
|
430
|
+
max-width: 520px;
|
|
431
|
+
|
|
432
|
+
background: rgba(0, 0, 0, 0.35);
|
|
433
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
434
|
+
border-radius: 14px;
|
|
435
|
+
|
|
436
|
+
padding: 28px 32px;
|
|
437
|
+
|
|
438
|
+
display: flex;
|
|
439
|
+
flex-direction: column;
|
|
440
|
+
gap: 18px;
|
|
441
|
+
|
|
442
|
+
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* explanation item */
|
|
446
|
+
.eq-explain-item {
|
|
447
|
+
font-size: 2.4rem;
|
|
448
|
+
line-height: 1.45;
|
|
449
|
+
opacity: 0.95;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* placeholder when nothing active */
|
|
453
|
+
.eq-explain-placeholder {
|
|
454
|
+
opacity: 0.5;
|
|
455
|
+
font-style: italic;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/* RIGHT PANEL — equation lines */
|
|
459
|
+
.eq-lines-panel {
|
|
460
|
+
flex: 1;
|
|
461
|
+
max-width: 520px;
|
|
462
|
+
|
|
463
|
+
display: flex;
|
|
464
|
+
flex-direction: column;
|
|
465
|
+
gap: 16px;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/* equation line */
|
|
469
|
+
.eq-line {
|
|
470
|
+
background: rgba(255, 255, 255, 0.04);
|
|
471
|
+
border: 1px solid rgba(255, 255, 255, 0.18);
|
|
472
|
+
border-radius: 10px;
|
|
473
|
+
|
|
474
|
+
padding: 14px 18px;
|
|
475
|
+
|
|
476
|
+
font-size: 2.6rem;
|
|
477
|
+
line-height: 1.5;
|
|
478
|
+
|
|
479
|
+
transition:
|
|
480
|
+
background 0.25s ease,
|
|
481
|
+
border-color 0.25s ease;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/* active line */
|
|
485
|
+
.eq-line.active {
|
|
486
|
+
background: rgba(255, 255, 255, 0.08);
|
|
487
|
+
border-color: rgba(120, 160, 255, 0.65);
|
|
488
|
+
}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
// src/spec/goldenDeckV1.js
|
|
2
|
+
var goldenDeckV1 = {
|
|
3
|
+
version: "deck-v1",
|
|
4
|
+
name: "Golden Deck V1 \u2013 Full Schema Coverage",
|
|
5
|
+
background: {
|
|
6
|
+
backgroundColor: "#111111",
|
|
7
|
+
backgroundImage: null,
|
|
8
|
+
backgroundImageOpacity: 0.3
|
|
9
|
+
},
|
|
10
|
+
deck: [
|
|
11
|
+
// 1 titleSlide
|
|
12
|
+
{
|
|
13
|
+
type: "titleSlide",
|
|
14
|
+
start: 0,
|
|
15
|
+
end: 5,
|
|
16
|
+
data: [
|
|
17
|
+
{ name: "title", content: "Taleem Project - Golden Deck", showAt: 0 }
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
// 2 titleAndSubtitle
|
|
21
|
+
{
|
|
22
|
+
type: "titleAndSubtitle",
|
|
23
|
+
start: 5,
|
|
24
|
+
end: 10,
|
|
25
|
+
data: [
|
|
26
|
+
{ name: "title", content: "How Taleem Slides Work", showAt: 5 },
|
|
27
|
+
{ name: "subtitle", content: "A simple, calm way to present ideas", showAt: 6 }
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
// 3 bulletList
|
|
31
|
+
{
|
|
32
|
+
type: "bulletList",
|
|
33
|
+
start: 10,
|
|
34
|
+
end: 15,
|
|
35
|
+
data: [
|
|
36
|
+
{ name: "bullet", content: "Each slide is carefully prepared information", showAt: 10 },
|
|
37
|
+
{ name: "bullet", content: "The system only shows what is written", showAt: 11 },
|
|
38
|
+
{ name: "bullet", content: "Nothing changes behind the scenes", showAt: 12 },
|
|
39
|
+
{ name: "bullet", content: "The author controls when ideas appear", showAt: 13 },
|
|
40
|
+
{ name: "bullet", content: "The same lesson looks the same everywhere", showAt: 14 }
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: "twoColumnText",
|
|
45
|
+
start: 15,
|
|
46
|
+
end: 20,
|
|
47
|
+
data: [
|
|
48
|
+
{
|
|
49
|
+
name: "left",
|
|
50
|
+
content: `
|
|
51
|
+
taleem-browser shows one complete slide at a time. Each slide appears fully, clear, and ready to read.
|
|
52
|
+
`,
|
|
53
|
+
showAt: 15
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "right",
|
|
57
|
+
content: `
|
|
58
|
+
taleem-player shows content gradually, like a video. Ideas appear step by step as the lesson moves forward.
|
|
59
|
+
`,
|
|
60
|
+
showAt: 17
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
// 5 imageSlide
|
|
65
|
+
{
|
|
66
|
+
type: "imageSlide",
|
|
67
|
+
start: 20,
|
|
68
|
+
end: 25,
|
|
69
|
+
data: [
|
|
70
|
+
{ name: "image", content: "image.png", showAt: 20 }
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
// 6 imageWithTitle
|
|
74
|
+
{
|
|
75
|
+
type: "imageWithTitle",
|
|
76
|
+
start: 25,
|
|
77
|
+
end: 30,
|
|
78
|
+
data: [
|
|
79
|
+
{ name: "title", content: "Learning with Visual Support", showAt: 25 },
|
|
80
|
+
{ name: "image", content: "image.png", showAt: 26 }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
// 7 imageWithCaption
|
|
84
|
+
{
|
|
85
|
+
type: "imageWithCaption",
|
|
86
|
+
start: 30,
|
|
87
|
+
end: 35,
|
|
88
|
+
data: [
|
|
89
|
+
{ name: "image", content: "image.png", showAt: 30 },
|
|
90
|
+
{ name: "caption", content: "Caption as data", showAt: 31 }
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
// 8 imageLeftBulletsRight
|
|
94
|
+
{
|
|
95
|
+
type: "imageLeftBulletsRight",
|
|
96
|
+
start: 35,
|
|
97
|
+
end: 40,
|
|
98
|
+
data: [
|
|
99
|
+
{ name: "image", content: "image.png", showAt: 35 },
|
|
100
|
+
{ name: "bullet", content: "Each slide has a clear visual focus", showAt: 36 },
|
|
101
|
+
{ name: "bullet", content: "Points are shown in a planned order", showAt: 37 },
|
|
102
|
+
{ name: "bullet", content: "Nothing appears randomly", showAt: 38 },
|
|
103
|
+
{ name: "bullet", content: "This helps students follow step by step", showAt: 39 }
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
// 9 imageRightBulletsLeft
|
|
107
|
+
{
|
|
108
|
+
type: "imageRightBulletsLeft",
|
|
109
|
+
start: 40,
|
|
110
|
+
end: 45,
|
|
111
|
+
data: [
|
|
112
|
+
{ name: "image", content: "image.png", showAt: 40 },
|
|
113
|
+
{ name: "bullet", content: "Slides do not change on their own", showAt: 41 },
|
|
114
|
+
{ name: "bullet", content: "The teacher decides when to move forward", showAt: 42 },
|
|
115
|
+
{ name: "bullet", content: "Students are never rushed", showAt: 43 },
|
|
116
|
+
{ name: "bullet", content: "This keeps learning calm and focused", showAt: 44 }
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
// 10 table
|
|
120
|
+
{
|
|
121
|
+
type: "table",
|
|
122
|
+
start: 45,
|
|
123
|
+
end: 50,
|
|
124
|
+
data: [
|
|
125
|
+
["Layer", "Role"],
|
|
126
|
+
["taleem-core", "Schema for JSON"],
|
|
127
|
+
["taleem-slides", "Render \u2013 JSON to HTML"],
|
|
128
|
+
["taleem-browser", "Index-based presentations"],
|
|
129
|
+
["taleem-player", "Time-based presentations"]
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
// 11 statistic
|
|
133
|
+
{
|
|
134
|
+
type: "statistic",
|
|
135
|
+
start: 50,
|
|
136
|
+
end: 55,
|
|
137
|
+
data: [
|
|
138
|
+
{ name: "number", content: "21", showAt: 50 },
|
|
139
|
+
{ name: "label", content: "Slide Types", showAt: 51 }
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
// 12 donutChart
|
|
143
|
+
{
|
|
144
|
+
type: "donutChart",
|
|
145
|
+
start: 55,
|
|
146
|
+
end: 60,
|
|
147
|
+
data: [
|
|
148
|
+
{ name: "percent", content: "60", showAt: 55 },
|
|
149
|
+
{ name: "label", content: "Lesson Covered", showAt: 56 },
|
|
150
|
+
{ name: "color", content: "#ff9900", showAt: 57 }
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
// 13 bigNumber
|
|
154
|
+
{
|
|
155
|
+
type: "bigNumber",
|
|
156
|
+
start: 60,
|
|
157
|
+
end: 65,
|
|
158
|
+
data: [
|
|
159
|
+
{ name: "number", content: "100%", showAt: 60 },
|
|
160
|
+
{ name: "label", content: "Always the Same Output", showAt: 61 }
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
// 14 barChart
|
|
164
|
+
{
|
|
165
|
+
type: "barChart",
|
|
166
|
+
start: 65,
|
|
167
|
+
end: 70,
|
|
168
|
+
data: [
|
|
169
|
+
{ name: "bar", label: "Excellent", value: 4, showAt: 65 },
|
|
170
|
+
{ name: "bar", label: "Good", value: 6, showAt: 66 },
|
|
171
|
+
{ name: "bar", label: "Average", value: 5, showAt: 67 },
|
|
172
|
+
{ name: "bar", label: "Needs improvement", value: 2, showAt: 68 }
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
// 15 quoteSlide
|
|
176
|
+
{
|
|
177
|
+
type: "quoteSlide",
|
|
178
|
+
start: 70,
|
|
179
|
+
end: 75,
|
|
180
|
+
data: [
|
|
181
|
+
{ name: "quote", content: "Clarity makes learning easier for everyone.", showAt: 70 },
|
|
182
|
+
{ name: "author", content: "\u2014 Taleem", showAt: 72 }
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
// 16 quoteWithImage
|
|
186
|
+
{
|
|
187
|
+
type: "quoteWithImage",
|
|
188
|
+
start: 75,
|
|
189
|
+
end: 80,
|
|
190
|
+
data: [
|
|
191
|
+
{ name: "quote", content: "Understanding ideas matters more than using complex tools.", showAt: 75 },
|
|
192
|
+
{ name: "author", content: "\u2014 Taleem", showAt: 77 },
|
|
193
|
+
{ name: "image", content: "image.png", showAt: 78 }
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
// 17 cornerWordsSlide
|
|
197
|
+
{
|
|
198
|
+
type: "cornerWordsSlide",
|
|
199
|
+
start: 80,
|
|
200
|
+
end: 85,
|
|
201
|
+
data: [
|
|
202
|
+
{ name: "card", icon: "\u{1F9E0}", label: "Focus", showAt: 80 },
|
|
203
|
+
{ name: "card", icon: "\u{1F4D8}", label: "Clarity", showAt: 81 },
|
|
204
|
+
{ name: "card", icon: "\u23F1\uFE0F", label: "Pace", showAt: 82 },
|
|
205
|
+
{ name: "card", icon: "\u{1F3AF}", label: "Understanding", showAt: 83 }
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
// 18 contactSlide
|
|
209
|
+
{
|
|
210
|
+
type: "contactSlide",
|
|
211
|
+
start: 85,
|
|
212
|
+
end: 90,
|
|
213
|
+
data: [
|
|
214
|
+
{ name: "headline", content: "Taleem Project", showAt: 85 },
|
|
215
|
+
{ name: "email", content: "github.com/taleem", showAt: 86 },
|
|
216
|
+
{ name: "phone", content: "Open-source educational tools", showAt: 87 }
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
// 19 eq
|
|
220
|
+
{
|
|
221
|
+
type: "eq",
|
|
222
|
+
start: 90,
|
|
223
|
+
end: 95,
|
|
224
|
+
data: [
|
|
225
|
+
{
|
|
226
|
+
name: "line",
|
|
227
|
+
type: "heading",
|
|
228
|
+
content: "Eq Slide - under contruction",
|
|
229
|
+
showAt: 90
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "line",
|
|
233
|
+
type: "math",
|
|
234
|
+
content: "render(data) \u21D2 same output",
|
|
235
|
+
showAt: 91,
|
|
236
|
+
spItems: [
|
|
237
|
+
{ type: "spText", content: "No hidden state" }
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
// 20 fillImage
|
|
243
|
+
{
|
|
244
|
+
type: "fillImage",
|
|
245
|
+
start: 95,
|
|
246
|
+
end: 100,
|
|
247
|
+
data: [
|
|
248
|
+
{ name: "image", content: "image.png", showAt: 95 }
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
// 21 titleAndPara
|
|
252
|
+
{
|
|
253
|
+
type: "titleAndPara",
|
|
254
|
+
start: 100,
|
|
255
|
+
end: 105,
|
|
256
|
+
data: [
|
|
257
|
+
{ name: "title", content: "End", showAt: 100 },
|
|
258
|
+
{ name: "para", content: "All slide types rendered.", showAt: 101 }
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
// src/spec/slideTypesV1.js
|
|
265
|
+
var SLIDE_TYPES_V1 = [
|
|
266
|
+
"titleSlide",
|
|
267
|
+
"titleAndSubtitle",
|
|
268
|
+
"titleAndPara",
|
|
269
|
+
"bulletList",
|
|
270
|
+
"twoColumnText",
|
|
271
|
+
"imageSlide",
|
|
272
|
+
"imageWithTitle",
|
|
273
|
+
"imageWithCaption",
|
|
274
|
+
"imageLeftBulletsRight",
|
|
275
|
+
"imageRightBulletsLeft",
|
|
276
|
+
"table",
|
|
277
|
+
"statistic",
|
|
278
|
+
"donutChart",
|
|
279
|
+
"bigNumber",
|
|
280
|
+
"barChart",
|
|
281
|
+
"quoteSlide",
|
|
282
|
+
"quoteWithImage",
|
|
283
|
+
"cornerWordsSlide",
|
|
284
|
+
"contactSlide",
|
|
285
|
+
"fillImage",
|
|
286
|
+
"eq"
|
|
287
|
+
];
|
|
288
|
+
export {
|
|
289
|
+
SLIDE_TYPES_V1,
|
|
290
|
+
goldenDeckV1
|
|
291
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// src/slides/templates/TitleSlide.js
|
|
2
2
|
var TitleSlide = {
|
|
3
3
|
type: "titleSlide",
|
|
4
4
|
fromJSON(raw) {
|
|
@@ -19,7 +19,7 @@ var TitleSlide = {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
//
|
|
22
|
+
// src/slides/templates/TitleAndSubtitleSlide.js
|
|
23
23
|
var TitleAndSubtitleSlide = {
|
|
24
24
|
type: "titleAndSubtitle",
|
|
25
25
|
fromJSON(raw) {
|
|
@@ -42,7 +42,7 @@ var TitleAndSubtitleSlide = {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
//
|
|
45
|
+
// src/slides/templates/TitleAndParaSlide.js
|
|
46
46
|
var TitleAndParaSlide = {
|
|
47
47
|
type: "titleAndPara",
|
|
48
48
|
fromJSON(raw) {
|
|
@@ -65,7 +65,7 @@ var TitleAndParaSlide = {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
//
|
|
68
|
+
// src/slides/templates/BulletListSlide.js
|
|
69
69
|
var BulletListSlide = {
|
|
70
70
|
type: "bulletList",
|
|
71
71
|
fromJSON(raw) {
|
|
@@ -93,7 +93,7 @@ var BulletListSlide = {
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
//
|
|
96
|
+
// src/slides/templates/TwoColumnTextSlide.js
|
|
97
97
|
var TwoColumnTextSlide = {
|
|
98
98
|
type: "twoColumnText",
|
|
99
99
|
fromJSON(raw) {
|
|
@@ -120,7 +120,7 @@ var TwoColumnTextSlide = {
|
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
//
|
|
123
|
+
// src/slides/templates/ImageSlide.js
|
|
124
124
|
var ImageSlide = {
|
|
125
125
|
type: "imageSlide",
|
|
126
126
|
fromJSON(raw) {
|
|
@@ -140,7 +140,7 @@ var ImageSlide = {
|
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
//
|
|
143
|
+
// src/slides/templates/FillImageSlide.js
|
|
144
144
|
var FillImageSlide = {
|
|
145
145
|
type: "fillImage",
|
|
146
146
|
fromJSON(raw) {
|
|
@@ -162,7 +162,7 @@ var FillImageSlide = {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
|
|
165
|
-
//
|
|
165
|
+
// src/slides/templates/ImageWithTitleSlide.js
|
|
166
166
|
var ImageWithTitleSlide = {
|
|
167
167
|
type: "imageWithTitle",
|
|
168
168
|
fromJSON(raw) {
|
|
@@ -187,7 +187,7 @@ var ImageWithTitleSlide = {
|
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
-
//
|
|
190
|
+
// src/slides/templates/ImageWithCaptionSlide.js
|
|
191
191
|
var ImageWithCaptionSlide = {
|
|
192
192
|
type: "imageWithCaption",
|
|
193
193
|
fromJSON(raw) {
|
|
@@ -212,7 +212,7 @@ var ImageWithCaptionSlide = {
|
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
|
|
215
|
-
//
|
|
215
|
+
// src/slides/templates/ImageLeftBulletsRightSlide.js
|
|
216
216
|
var ImageLeftBulletsRightSlide = {
|
|
217
217
|
type: "imageLeftBulletsRight",
|
|
218
218
|
fromJSON(raw) {
|
|
@@ -241,7 +241,7 @@ var ImageLeftBulletsRightSlide = {
|
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
243
|
|
|
244
|
-
//
|
|
244
|
+
// src/slides/templates/ImageRightBulletsLeftSlide.js
|
|
245
245
|
var ImageRightBulletsLeftSlide = {
|
|
246
246
|
type: "imageRightBulletsLeft",
|
|
247
247
|
fromJSON(raw) {
|
|
@@ -270,7 +270,7 @@ var ImageRightBulletsLeftSlide = {
|
|
|
270
270
|
}
|
|
271
271
|
};
|
|
272
272
|
|
|
273
|
-
//
|
|
273
|
+
// src/slides/templates/TableSlide.js
|
|
274
274
|
var TableSlide = {
|
|
275
275
|
type: "table",
|
|
276
276
|
fromJSON(raw) {
|
|
@@ -296,7 +296,7 @@ var TableSlide = {
|
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
|
|
299
|
-
//
|
|
299
|
+
// src/slides/templates/StatisticSlide.js
|
|
300
300
|
var StatisticSlide = {
|
|
301
301
|
type: "statistic",
|
|
302
302
|
fromJSON(raw) {
|
|
@@ -321,7 +321,7 @@ var StatisticSlide = {
|
|
|
321
321
|
}
|
|
322
322
|
};
|
|
323
323
|
|
|
324
|
-
//
|
|
324
|
+
// src/slides/templates/BigNumberSlide.js
|
|
325
325
|
var BigNumberSlide = {
|
|
326
326
|
type: "bigNumber",
|
|
327
327
|
fromJSON(raw) {
|
|
@@ -346,7 +346,7 @@ var BigNumberSlide = {
|
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
348
|
|
|
349
|
-
//
|
|
349
|
+
// src/slides/templates/BarChartSlide.js
|
|
350
350
|
var BarChartSlide = {
|
|
351
351
|
type: "barChart",
|
|
352
352
|
fromJSON(raw) {
|
|
@@ -382,7 +382,7 @@ var BarChartSlide = {
|
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
|
|
385
|
-
//
|
|
385
|
+
// src/slides/templates/DonutChartSlide.js
|
|
386
386
|
var DonutChartSlide = {
|
|
387
387
|
type: "donutChart",
|
|
388
388
|
fromJSON(raw) {
|
|
@@ -420,7 +420,7 @@ var DonutChartSlide = {
|
|
|
420
420
|
}
|
|
421
421
|
};
|
|
422
422
|
|
|
423
|
-
//
|
|
423
|
+
// src/slides/templates/QuoteSlide.js
|
|
424
424
|
var QuoteSlide = {
|
|
425
425
|
type: "quoteSlide",
|
|
426
426
|
fromJSON(raw) {
|
|
@@ -445,7 +445,7 @@ var QuoteSlide = {
|
|
|
445
445
|
}
|
|
446
446
|
};
|
|
447
447
|
|
|
448
|
-
//
|
|
448
|
+
// src/slides/templates/QuoteWithImageSlide.js
|
|
449
449
|
var QuoteWithImageSlide = {
|
|
450
450
|
type: "quoteWithImage",
|
|
451
451
|
fromJSON(raw) {
|
|
@@ -475,7 +475,7 @@ var QuoteWithImageSlide = {
|
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
477
|
|
|
478
|
-
//
|
|
478
|
+
// src/slides/templates/CornerWordsSlide.js
|
|
479
479
|
var CornerWordsSlide = {
|
|
480
480
|
type: "cornerWordsSlide",
|
|
481
481
|
fromJSON(raw) {
|
|
@@ -505,7 +505,7 @@ var CornerWordsSlide = {
|
|
|
505
505
|
}
|
|
506
506
|
};
|
|
507
507
|
|
|
508
|
-
//
|
|
508
|
+
// src/slides/templates/ContactSlide.js
|
|
509
509
|
var ContactSlide = {
|
|
510
510
|
type: "contactSlide",
|
|
511
511
|
fromJSON(raw) {
|
|
@@ -527,8 +527,7 @@ var ContactSlide = {
|
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
529
|
|
|
530
|
-
//
|
|
531
|
-
var WINDOW_SIZE = 3;
|
|
530
|
+
// src/slides/templates/EqSlide.js
|
|
532
531
|
var EqSlide = {
|
|
533
532
|
type: "eq",
|
|
534
533
|
fromJSON(raw) {
|
|
@@ -536,42 +535,20 @@ var EqSlide = {
|
|
|
536
535
|
return Object.freeze({
|
|
537
536
|
type: "eq",
|
|
538
537
|
lines,
|
|
539
|
-
render(
|
|
540
|
-
let activeIndex = -1;
|
|
541
|
-
if (typeof time === "number") {
|
|
542
|
-
for (let i = 0; i < lines.length; i++) {
|
|
543
|
-
if (lines[i].showAt <= time) {
|
|
544
|
-
activeIndex = i;
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
const isTimed = activeIndex !== -1;
|
|
549
|
-
let start = 0;
|
|
550
|
-
let end = lines.length;
|
|
551
|
-
if (isTimed && activeIndex >= WINDOW_SIZE) {
|
|
552
|
-
start = activeIndex - (WINDOW_SIZE - 1);
|
|
553
|
-
end = activeIndex + 1;
|
|
554
|
-
}
|
|
555
|
-
const visible = lines.slice(start, end);
|
|
538
|
+
render({ visibleCount = lines.length } = {}) {
|
|
556
539
|
return `
|
|
557
|
-
<section class="slide eq">
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
).join("")}
|
|
570
|
-
</div>` : ""}
|
|
571
|
-
</div>
|
|
572
|
-
`;
|
|
573
|
-
}).join("")}
|
|
574
|
-
</div>
|
|
540
|
+
<section class="slide eq imageRightBulletsLeft">
|
|
541
|
+
|
|
542
|
+
<!-- LEFT: lines (bullet behavior) -->
|
|
543
|
+
<ul class="eq-lines">
|
|
544
|
+
${lines.map(
|
|
545
|
+
(line, i) => i < visibleCount ? `<li class="eq-line">${line.content}</li>` : ""
|
|
546
|
+
).join("")}
|
|
547
|
+
</ul>
|
|
548
|
+
|
|
549
|
+
<!-- RIGHT: placeholder (image slot replacement) -->
|
|
550
|
+
<div class="eq-side-panel"></div>
|
|
551
|
+
|
|
575
552
|
</section>
|
|
576
553
|
`;
|
|
577
554
|
}
|
|
@@ -579,8 +556,8 @@ var EqSlide = {
|
|
|
579
556
|
}
|
|
580
557
|
};
|
|
581
558
|
|
|
582
|
-
//
|
|
583
|
-
var
|
|
559
|
+
// src/slides/registry.js
|
|
560
|
+
var SlideRegistry = {
|
|
584
561
|
titleSlide: TitleSlide,
|
|
585
562
|
titleAndSubtitle: TitleAndSubtitleSlide,
|
|
586
563
|
titleAndPara: TitleAndParaSlide,
|
|
@@ -604,15 +581,23 @@ var SlideTemplates = {
|
|
|
604
581
|
eq: EqSlide
|
|
605
582
|
};
|
|
606
583
|
|
|
607
|
-
//
|
|
584
|
+
// src/slides/getSlideTemplate.js
|
|
608
585
|
function getSlideTemplate(type) {
|
|
609
|
-
const template =
|
|
586
|
+
const template = SlideRegistry[type];
|
|
610
587
|
if (!template) {
|
|
611
588
|
throw new Error(`Unknown slide template type "${type}"`);
|
|
612
589
|
}
|
|
613
590
|
return template;
|
|
614
591
|
}
|
|
615
592
|
|
|
593
|
+
// src/slides/registerSlide.js
|
|
594
|
+
function registerSlide(type, renderer) {
|
|
595
|
+
if (SlideRegistry[type]) {
|
|
596
|
+
throw new Error(`Slide type "${type}" is already registered`);
|
|
597
|
+
}
|
|
598
|
+
SlideRegistry[type] = renderer;
|
|
599
|
+
}
|
|
600
|
+
|
|
616
601
|
// src/engines/player/stage.js
|
|
617
602
|
function createStage(mount, background = {}) {
|
|
618
603
|
if (!mount) throw new Error("taleem-player: mount is required");
|
|
@@ -823,7 +808,7 @@ function resolveAssetPaths(deck, IMG_BASE) {
|
|
|
823
808
|
}
|
|
824
809
|
|
|
825
810
|
// src/utils/resolveBackground.js
|
|
826
|
-
function
|
|
811
|
+
function resolveBackground(deck, ASSET_BASE) {
|
|
827
812
|
if (!deck || !deck.background) return deck;
|
|
828
813
|
const bg = deck.background;
|
|
829
814
|
if (typeof bg.backgroundImage === "string" && bg.backgroundImage.length > 0) {
|
|
@@ -847,6 +832,7 @@ export {
|
|
|
847
832
|
createTaleemBrowser,
|
|
848
833
|
createTaleemPlayer,
|
|
849
834
|
getDeckEndTime,
|
|
835
|
+
registerSlide,
|
|
850
836
|
resolveAssetPaths,
|
|
851
|
-
|
|
837
|
+
resolveBackground
|
|
852
838
|
};
|