-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathliascript.schema.json
More file actions
987 lines (934 loc) · 36.5 KB
/
Copy pathliascript.schema.json
File metadata and controls
987 lines (934 loc) · 36.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/LiaScript/Markdownify/refs/heads/main/liascript.schema.json",
"title": "LiaScript Document",
"$comment": "This is the **original** LiaScript JSON‑Schema enriched only with additional `description`, `examples`, and `$comment` annotations so that generative AI systems can more easily understand the intent and capabilities of LiaScript. **No structural validation rules were changed** – every extra field added here is purely documentary.",
"type": "object",
"properties": {
"meta": {
"type": "object",
"description": "Document‑level metadata injected via the `<!-- meta: ... -->` macro at the very top of a LiaScript file. Unknown keys are permitted and simply forwarded to the runtime, which allows custom macros and future extensions.",
"$comment": "Typical extra keys include `scripts`, `css`, `imports`, and `macros`. These are not validated explicitly here because LiaScript intentionally keeps the meta block open‑ended, but AIs SHOULD know they exist and feel free to emit them.",
"properties": {
"author": {
"type": "string",
"description": "Primary author or authors. Multiple names can be separated by comma or semicolon."
},
"email": {
"type": "string",
"description": "Contact e‑mail address shown in the about dialog and exported into ePub metadata."
},
"language": {
"type": "string",
"description": "ISO‑639‑1 language code (e.g. `en`, `de`, `es`)."
},
"mode": {
"type": "string",
"enum": ["Presentation", "Textbook", "Slides"],
"description": "Preferred presentation mode, otherwise the default user mode is used."
},
"dark": {
"type": "boolean",
"description": "Force dark theme regardless of viewer preference or auto‑detection."
},
"narrator": {
"@ref": "#/definitions/Voice",
"description": "Default TTS voice (see the `Voice` enum)."
}
},
"examples": [
{
"author": "Ada Lovelace; Alan Turing",
"email": "course@example.org",
"language": "en",
"mode": "slides",
"scripts": ["https://example.org/3d-panorama.js"],
"css": ["https://example.org/theme-dark.css"],
"imports": [
"https://raw.githubusercontent.com/LiaTemplates/CodeRunner/master/README.md"
]
}
],
"additionalProperties": true
},
"sections": {
"type": "array",
"items": { "$ref": "#/definitions/section" }
}
},
"required": ["sections"],
"$comment": "------------------------------------------------------------\nATTR FIELD\n------------------------------------------------------------\nEvery Block or inline element MAY contain an `attr` object. It is passed straight through to the resulting HTML tag, so any valid attribute name is accepted. Common examples include: \n { \"id\": \"hero\", \"class\": [\"center\", \"fade-in\"], \"style\": \"color:#e91e63;\", \"data-step\": 3 }.\nLLMs should treat `attr` as a free‑form bag of key/value pairs for styling, ARIA roles, data‑attributes, etc.",
"definitions": {
"section": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Section heading (Markdown line starting with one or more `#`)."
},
"indent": {
"type": "integer",
"minimum": 1,
"maximum": 6,
"description": "Heading level depth. Courses usually start at 1."
},
"body": { "$ref": "#/definitions/Blocks" },
"meta": {
"type": "object",
"description": "Local overrides for narrator, author, etc. Same structure as the top‑level meta block."
}
},
"required": ["title", "indent", "body"]
},
"StringOrList": {
"oneOf": [
{ "type": "string" },
{
"type": "array",
"items": {
"type": "string"
},
"description": "Each string represents a line. When rendered, all lines are concatenated with a newline separator so authors can keep long code or formulas readable."
}
]
},
"Blocks": {
"type": "array",
"items": {
"oneOf": [
{ "$ref": "#/definitions/Block" },
{ "$ref": "#/definitions/inlines" }
]
},
"description": "An ordered list of block‑level elements. For convenience, a single inline (or an array of inlines) can also stand in as a block so authors don't have to wrap e.g. a lone image inside a `Paragraph`."
},
"Block": {
"oneOf": [
{ "$ref": "#/definitions/Paragraph" },
{ "$ref": "#/definitions/Line" },
{ "$ref": "#/definitions/Comment" },
{ "$ref": "#/definitions/Effect" },
{ "$ref": "#/definitions/Gallery" },
{ "$ref": "#/definitions/Formula" },
{ "$ref": "#/definitions/Quote" },
{ "$ref": "#/definitions/List" },
{ "$ref": "#/definitions/Html" },
{ "$ref": "#/definitions/Code" },
{ "$ref": "#/definitions/Table" },
{ "$ref": "#/definitions/Tasks" },
{ "$ref": "#/definitions/Quiz" },
{ "$ref": "#/definitions/Ascii" },
{ "$ref": "#/definitions/Chart" }
]
},
"Paragraph": {
"type": "object",
"properties": {
"type": { "const": "Paragraph" },
"body": { "$ref": "#/definitions/inlines" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "A block element that displays its content as a paragraph. The 'body' can be a string, a single inline element, or an array of strings and inlines. Additional HTML attributes can be set via 'attr' for custom styling."
},
"Line": {
"type": "object",
"properties": {
"type": { "const": "Line" },
"attr": { "type": "object" }
},
"required": ["type"],
"description": "A horizontal line, corresponds to hr tag in html, can be styled via attr and has no body"
},
"Comment": {
"type": "object",
"properties": {
"type": { "const": "Comment" },
"body": {
"$ref": "#/definitions/inlines",
"description": "The content of the comment, which can be a string, a single inline element, or an array of strings and inlines. This text will be read aloud by the TTS engine at the specified animation step."
},
"start": {
"type": "integer",
"minimum": 0,
"description": "The animation step at which this comment will be read aloud in Presentation or Slides mode."
},
"voice": {
"$ref": "#/definitions/Voice",
"description": "Overrides the default TTS voice for this comment. Optional."
},
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "A comment is a paragraph that will be read aloud by the TTS engine at a specific animation step in Presentation or Slides mode. In Textbook mode, it is rendered as visible text. Comments are typically used to narrate or explain animation steps. If multiple comments share the same 'start' value, they are read together in order of appearance."
},
"Effect": {
"type": "object",
"properties": {
"type": { "const": "Effect" },
"body": {
"oneOf": [
{ "$ref": "#/definitions/Block" },
{ "$ref": "#/definitions/Blocks" }
],
"description": "The content to animate. Can be a single block or an array of blocks."
},
"start": {
"type": "integer",
"minimum": 0,
"description": "Step when the effect appears (optional)."
},
"stop": {
"type": "integer",
"description": "Step when the effect disappears, should only be defined in combination with start (optional)."
},
"playback": {
"type": "boolean",
"description": "If true, adds a TTS playback button (optional)."
},
"voice": {
"$ref": "#/definitions/Voice",
"description": "Specifies the TTS voice to use for playback. Only relevant if 'playback' is true. Overrides the default voice set at the document or section level (optional)."
},
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "A block element that animates its content to appear and/or disappear at specific steps in a slide. Optionally, a TTS playback button can be added, and a custom voice can be set for spoken output."
},
"Gallery": {
"type": "object",
"properties": {
"type": { "const": "Gallery" },
"body": {
"type": "array",
"items": { "$ref": "#/definitions/multimedia" },
"description": "An array of multimedia links (image, audio, video, or embed) to display in the gallery."
},
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Displays a gallery of media elements. The body must be an array of multimedia links."
},
"Formula": {
"type": "object",
"properties": {
"type": { "const": "Formula" },
"body": {
"$ref": "#/definitions/StringOrList",
"description": "The formula content in KaTeX syntax. Can be a single string or an array of strings (for readability); if an array, lines are joined with newlines before rendering."
},
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Displays a mathematical formula using KaTeX. The body can be a single string or an array of strings for multi-line formulas."
},
"Quote": {
"type": "object",
"properties": {
"type": { "const": "Quote" },
"body": {
"oneOf": [
{ "$ref": "#/definitions/Block" },
{ "$ref": "#/definitions/Blocks" }
],
"description": "The quoted content. Can be a single block or an array of blocks."
},
"by": {
"$ref": "#/definitions/inlines",
"description": "Optional. If provided, displays the quote as a citation with the given author or source."
},
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Displays a blockquote. The 'body' contains the quoted content (single block or array of blocks). If 'by' is set, the quote is rendered as a citation."
},
"List": {
"type": "object",
"properties": {
"type": { "const": "List" },
"body": {
"oneOf": [
{ "$ref": "#/definitions/Block" },
{ "$ref": "#/definitions/Blocks" }
],
"description": "The quoted content. Can be a single block or an array of blocks."
},
"ordered": {
"type": "boolean",
"description": "Defines if it is an ordered or an unordered list, by default it is false."
},
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Displays an ordered or unordered list of block elements. The 'body' contains list entries as blocks or nested blocks."
},
"Html": {
"type": "object",
"properties": {
"type": { "const": "Html" },
"htmlTag": {
"type": "string",
"description": "Define an inline html tag name like div, span, etc."
},
"body": {
"oneOf": [
{ "$ref": "#/definitions/Block" },
{ "$ref": "#/definitions/Blocks" }
]
},
"attr": { "type": "object" }
},
"required": ["type", "htmlTag", "body"],
"description": "In contrast to an html inline element, this body can contain entire Block elements."
},
"Code": {
"type": "object",
"properties": {
"type": { "const": "Code" },
"title": { "type": "string", "description": "A filename" },
"language": {
"type": "string",
"description": "This is a short code for the used syntax highlighting, such java, markdown, cpp, lua, prolog, etc."
},
"closed": {
"type": "boolean",
"description": "Defines if the content of the file shall be hidden at first, the user can decide to open it afterwards."
},
"body": { "$ref": "#/definitions/StringOrList" },
"execute": {
"$ref": "#/definitions/StringOrList",
"description": "This optional property that makes the code block editable and executable. It contains JavaScript with an @input marker. This marker is replaced before the execution with the current content of the code-block."
},
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "This will show an entire code block with syntax highlighting and an optional title. The execute field will turn the code-block into an editor with a run button that will execute the code."
},
"Table": {
"type": "object",
"properties": {
"type": { "const": "Table" },
"head": {
"type": "array",
"items": { "$ref": "#/definitions/inlines" },
"description": "Defines the table header. Each entry represents the content of a column header and can be a string, a single inline element, or an array of inlines."
},
"alignment": {
"type": "array",
"items": {
"type": "string",
"enum": ["left", "right", "center"]
},
"description": "Specifies the alignment of each column: 'left', 'right', or 'center'. The number of entries must match the number of columns in the header. If omitted, all columns default to left alignment."
},
"body": {
"type": "array",
"items": {
"type": "array",
"items": { "$ref": "#/definitions/inlines" }
},
"description": "Defines the table rows. Each row is an array of cells, and each cell can contain a string, a single inline element, or an array of inlines."
},
"attr": { "type": "object" }
},
"required": ["type", "head", "body"],
"description": "Displays a table with a header, optional column alignment, and a body of rows. Each cell can contain rich inline content. Additional HTML attributes can be set via 'attr' for custom styling."
},
"Tasks": {
"type": "object",
"properties": {
"type": { "const": "Tasks" },
"body": {
"type": "array",
"items": { "$ref": "#/definitions/inlines" },
"description": "An array of task descriptions. Each entry represents a single task and can contain text or rich inline content."
},
"done": {
"$ref": "#/definitions/Solution",
"description": "Defines which tasks are marked as completed. Can be a single integer (one checked), an array of integers (multiple checked), an empty array (none checked), or a boolean array (true for checked tasks)."
},
"attr": {
"type": "object",
"description": "Optional HTML attributes for custom styling or additional properties."
}
},
"required": ["type", "body", "done"],
"description": "Displays a GitHub-flavored task list. Each task can contain rich inline content. The 'done' property specifies which tasks are checked."
},
"Quiz": {
"type": "object",
"properties": {
"type": { "const": "Quiz" },
"quizType": {
"type": "string",
"enum": [
"input",
"selection",
"single-choice",
"multiple-choice",
"gap-text"
],
"description": "Specifies the type of quiz. Determines the interaction style and which properties are required. \n\n- 'input': A single-line text input where the user's answer is matched against a solution string.\n- 'selection': A dropdown menu where the user selects one or more options from a list.\n- 'single-choice': A list of radio buttons where only one option can be selected.\n- 'multiple-choice': A list of checkboxes where multiple options can be selected.\n- 'gap-text': A fill-in-the-blank quiz where input/select elements are placed directly in the content."
},
"hints": {
"type": "array",
"items": { "$ref": "#/definitions/inlines" },
"description": "Optional hints to assist the user in solving the quiz."
},
"answer": {
"oneOf": [
{ "$ref": "#/definitions/Block" },
{ "$ref": "#/definitions/Blocks" }
],
"description": "The answer or solution block(s) for the quiz. Revealed only after the user solves the quiz or requests the solution."
},
"execute": {
"$ref": "#/definitions/StringOrList",
"description": "Optional code to execute for code-based quizzes. The @input marker within the code block will be replaced with the user's input or the selected option index, allowing for custom processing."
}
},
"required": ["type", "quizType"],
"allOf": [
{
"if": { "properties": { "quizType": { "const": "input" } } },
"then": {
"required": ["type", "quizType", "solution"],
"properties": {
"solution": {
"type": "string",
"description": "The user input will be matched against this string. Trailing whitespace is ignored."
}
},
"description": "A quiz block presenting a single-line text input. The user's input is checked against the 'solution' string."
}
},
{
"if": { "properties": { "quizType": { "const": "selection" } } },
"then": {
"required": ["type", "quizType", "solution", "body"],
"properties": {
"body": {
"type": "array",
"items": { "$ref": "#/definitions/inlines" },
"description": "An array of selectable options presented in a dropdown menu. Each option can contain rich inline content."
},
"solution": {
"$ref": "#/definitions/Solution",
"description": "Defines the correct answer(s) for the dropdown. Can be a single integer, an array of integers, an empty array, or a boolean array."
}
},
"description": "A quiz block presenting a dropdown field with multiple options. The user's selection is checked against the 'solution'."
}
},
{
"if": { "properties": { "quizType": { "const": "single-choice" } } },
"then": {
"required": ["type", "quizType", "solution", "body"],
"properties": {
"body": {
"type": "array",
"items": { "$ref": "#/definitions/inlines" },
"description": "An array of options presented as radio buttons. Each option can contain rich inline content."
},
"solution": {
"$ref": "#/definitions/Solution",
"description": "Defines the correct answer for the radio buttons. Should be a single integer."
}
},
"description": "A quiz block presenting a list of radio buttons. The user's selection is checked against the 'solution'."
}
},
{
"if": {
"properties": { "quizType": { "const": "multiple-choice" } }
},
"then": {
"required": ["type", "quizType", "solution", "body"],
"properties": {
"body": {
"type": "array",
"items": { "$ref": "#/definitions/inlines" },
"description": "An array of options presented as checkboxes. Each option can contain rich inline content."
},
"solution": {
"$ref": "#/definitions/Solution",
"description": "Defines the correct answers for the checkboxes. Can be an array of integers or booleans."
}
},
"description": "A quiz block presenting a list of checkboxes, where multiple options can be selected. The user's selection is checked against the 'solution'."
}
},
{
"if": { "properties": { "quizType": { "const": "gap-text" } } },
"then": {
"required": ["type", "quizType", "body"],
"properties": {
"body": {
"oneOf": [
{ "$ref": "#/definitions/Paragraph" },
{ "$ref": "#/definitions/Table" },
{ "$ref": "#/definitions/Gallery" },
{ "$ref": "#/definitions/Quote" }
],
"description": "The block containing the gap(s) for fill-in-the-blank quizzes. Inline input/select elements define the gaps."
}
},
"description": "A quiz block presenting a gap text. No 'solution' is required, as the correct answers are defined by inline input and select elements within the body."
}
}
],
"description": "A flexible quiz block supporting various quiz types:\n- 'input': Single-line text input matched against a solution string.\n- 'select': Dropdown menu with selectable options.\n- 'single-choice': Radio buttons for single selection.\n- 'multiple-choice': Checkboxes for multiple selections.\n- 'gap-text': Fill-in-the-blank with inline input/select elements.\n\nThe structure and required properties depend on the selected 'quizType'. The actual quiz question should be defined in a separate block or paragraph above the quiz-block."
},
"Ascii": {
"type": "object",
"properties": {
"type": { "const": "Ascii" },
"title": {
"$ref": "#/definitions/inlines",
"description": "Image title"
},
"body": { "$ref": "#/definitions/StringOrList" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "This is an ASCII-art image, with support for boxes, lines, arrows, text and Unicode and emojis."
},
"Chart": {
"type": "object",
"properties": {
"type": { "const": "Chart" },
"body": { "$ref": "#/definitions/StringOrList" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "This is a special type of diagram drawn as an ASCII art with points x an y axes and values in form of +,*,#,a,b,c, ...."
},
"inlines": {
"oneOf": [
{
"type": "array",
"items": { "$ref": "#/definitions/inline" }
},
{ "$ref": "#/definitions/inline" }
]
},
"inline": {
"oneOf": [
{ "$ref": "#/definitions/bold" },
{ "$ref": "#/definitions/italic" },
{ "$ref": "#/definitions/strike" },
{ "$ref": "#/definitions/sup" },
{ "$ref": "#/definitions/underline" },
{ "$ref": "#/definitions/effect" },
{ "$ref": "#/definitions/html" },
{ "$ref": "#/definitions/script" },
{ "$ref": "#/definitions/code" },
{ "$ref": "#/definitions/footnote" },
{ "$ref": "#/definitions/formula" },
{ "$ref": "#/definitions/symbol" },
{ "$ref": "#/definitions/link" },
{ "$ref": "#/definitions/multimedia" },
{ "$ref": "#/definitions/input" },
{ "$ref": "#/definitions/select" },
{ "type": "string" }
]
},
"bold": {
"type": "object",
"properties": {
"type": { "const": "bold" },
"body": { "$ref": "#/definitions/inlines" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "An inline element that displays its content in bold. --> __bold text__"
},
"italic": {
"type": "object",
"properties": {
"type": { "const": "italic" },
"body": { "$ref": "#/definitions/inlines" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Displays the contained elements in italic text. --> _italic text_"
},
"strike": {
"type": "object",
"properties": {
"type": { "const": "strike" },
"body": { "$ref": "#/definitions/inlines" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Displays the contained elements with a strikethrough (crossed out). --> ~striked text~"
},
"sup": {
"type": "object",
"properties": {
"type": { "const": "sup" },
"body": { "$ref": "#/definitions/inlines" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Displays the contained elements as superscript (raised text). --> ^bold text^"
},
"underline": {
"type": "object",
"properties": {
"type": { "const": "underline" },
"body": { "$ref": "#/definitions/inlines" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Displays the contained elements with an underline. --> ~~underlined text~~"
},
"html": {
"type": "object",
"properties": {
"type": { "const": "html" },
"htmlTag": {
"type": "string",
"description": "Define an inline html tag name like div, span, etc."
},
"body": { "$ref": "#/definitions/inlines" },
"attr": { "type": "object" }
},
"required": ["type", "htmlTag"],
"description": "Displays an inline HTML element that might contain further inline elements, parameters are defined in attr."
},
"script": {
"type": "object",
"properties": {
"type": { "const": "script" },
"body": {
"oneOf": [
{ "type": "string" },
{
"type": "array",
"items": { "type": "string" },
"description": "Each string represents a line; all lines will be joined with a newline separator."
}
]
},
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Create a script tag with code from the body. The body can be a single string or an array of strings (joined with newlines for readability)."
},
"code": {
"type": "object",
"properties": {
"type": { "const": "code" },
"body": { "type": "string" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Display a verbatim element, the body will be displayed as it is."
},
"footnote": {
"type": "object",
"properties": {
"type": { "const": "footnote" },
"body": { "type": "string" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Add a reference to a footnote block element."
},
"formula": {
"type": "object",
"properties": {
"type": { "const": "formula" },
"body": { "type": "string" },
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Use KaTeX formatted formulas in the string."
},
"effect": {
"type": "object",
"properties": {
"type": { "const": "effect" },
"body": { "$ref": "#/definitions/inlines" },
"start": {
"type": "integer",
"minimum": 0,
"description": "Step when the effect appears (optional)."
},
"stop": {
"type": "integer",
"description": "Step when the effect disappears, should only be defined in combination with start (optional)."
},
"playback": {
"type": "boolean",
"description": "If true, adds a TTS playback button (optional)."
},
"voice": {
"$ref": "#/definitions/Voice",
"description": "Specifies the TTS voice to use for playback. Only relevant if 'playback' is true. Overrides the default voice set at the document or section level (optional)."
},
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "An inline element that animates its content to appear and/or disappear at specific steps in a slide. Optionally, a TTS playback button can be added, and a custom voice can be set for spoken output."
},
"link": {
"type": "object",
"properties": {
"type": { "const": "link" },
"url": {
"type": "string",
"description": "The target URL for the hyperlink."
},
"body": {
"$ref": "#/definitions/inlines",
"description": "The link text. If omitted, the URL is shown."
},
"title": {
"$ref": "#/definitions/inlines",
"description": "A title or tooltip for the link. Optional."
},
"attr": { "type": "object" }
},
"required": ["type", "url"],
"description": "Specifies a hyperlink"
},
"multimedia": {
"type": "object",
"properties": {
"type": { "const": "multimedia" },
"embedType": {
"type": "string",
"enum": ["image", "audio", "video", "embed"]
},
"alt": { "$ref": "#/definitions/inlines" },
"url": { "type": "string" },
"title": { "$ref": "#/definitions/inlines" }
},
"required": ["type", "embedType", "url"],
"description": "Embed a multimedia resource (image, audio, video, or embeddable content via oEmbed)."
},
"symbol": {
"type": "object",
"properties": {
"type": { "const": "symbol" },
"body": {
"oneOf": [
{ "$ref": "#/definitions/symbols" },
{
"type": "string",
"description": "Any Unicode character, such as an emoji or special symbol."
}
]
},
"attr": { "type": "object" }
},
"required": ["type", "body"],
"description": "Displays a single symbol, such as an arrow, emoji, or any Unicode character. Use a predefined symbol from the list or provide any string for custom symbols or emojis."
},
"input": {
"type": "object",
"properties": {
"type": { "const": "input" },
"solution": {
"type": "string",
"description": "The correct answer that user input will be checked against. Trailing whitespaces in the user's input will be ignored during comparison."
},
"length": {
"type": "integer",
"description": "Specifies the visible width of the input field in characters. Should be greater than or equal to the length of the solution. Optional."
},
"attr": { "type": "object" }
},
"required": ["type", "solution"],
"description": "An inline text input field, typically used for fill-in-the-blank (GapText) quizzes. The 'solution' property defines the correct answer."
},
"select": {
"type": "object",
"properties": {
"type": { "const": "select" },
"solution": {
"$ref": "#/definitions/Solution",
"description": "Defines the correct answer(s) for the dropdown. Can be a single integer (for one correct option), an array of integers (for multiple correct options), an empty array (if no selection is correct), or an array of booleans (where 'true' marks the correct options)."
},
"body": {
"type": "array",
"items": { "$ref": "#/definitions/inlines" },
"description": "The selectable options displayed in the dropdown. Each option can be any inline element, including text, images, formulas, HTML, etc."
},
"attr": { "type": "object" }
},
"required": ["type", "body", "solution"],
"description": "Displays a dropdown menu with selectable options, typically used for fill-in-the-blank (GapText) quizzes. The 'body' property defines the list of options, and the 'solution' property specifies which option(s) are correct."
},
"Solution": {
"description": "Defines the correct answer(s) for selection-based quizzes. Can be a single integer (for one correct option), an array of integers (for multiple correct options), an empty array (if no selection is correct), or an array of booleans (where 'true' marks the correct options).",
"oneOf": [
{
"type": "integer",
"description": "A single integer indicating the index of the correct option."
},
{
"type": "array",
"items": { "type": "integer" },
"description": "An array of integers indicating the indices of all correct options. Use an empty array if no selection is correct."
},
{
"type": "array",
"items": { "type": "boolean" },
"description": "An array of booleans, where each 'true' value marks the corresponding option as correct."
}
]
},
"symbols": {
"type": "string",
"enum": [
"<-->",
"<--",
"-->",
"<<-",
"->>",
"<->",
">->",
"<-<",
"->",
"<-",
"<~",
"~>",
"<==>",
"==>",
"<==",
"<=>",
"=>",
"<=",
":-)",
";-)",
":-D",
":-O",
":-(",
":-|",
":-/",
":-\\",
":-P",
":-p",
";-P",
";-p",
":-*",
";-*",
":')",
":'(",
":'[",
":-[",
":-#",
":-X",
":-§"
],
"description": "A predefined symbol, such as an arrow, emoticon, or other special character. Use one of these for common symbols, or provide any Unicode string in the 'body' property for custom symbols or emojis."
},
"Voice": {
"type": "string",
"enum": [
"UK English Female",
"UK English Male",
"US English Female",
"US English Male",
"Afrikaans Male",
"Albanian Male",
"Arabic Female",
"Arabic Male",
"Armenian Male",
"Australian Female",
"Australian Male",
"Bangla Bangladesh Female",
"Bangla Bangladesh Male",
"Bangla India Female",
"Bangla India Male",
"Bosnian Male",
"Brazilian Portuguese Female",
"Brazilian Portuguese Male",
"Catalan Male",
"Chinese Female",
"Chinese Male",
"Chinese (Hong Kong) Female",
"Chinese (Hong Kong) Male",
"Chinese Taiwan Female",
"Chinese Taiwan Male",
"Croatian Male",
"Czech Female",
"Czech Male",
"Danish Female",
"Danish Male",
"Deutsch Female",
"Deutsch Male",
"Dutch Female",
"Dutch Male",
"Esperanto Male",
"Estonian Male",
"Filipino Female",
"Finnish Female",
"Finnish Male",
"French Canadian Female",
"French Canadian Male",
"French Female",
"French Male",
"Greek Female",
"Greek Male",
"Hindi Female",
"Hindi Male",
"Hungarian Female",
"Hungarian Male",
"Icelandic Male",
"Indonesian Female",
"Indonesian Male",
"Italian Female",
"Italian Male",
"Japanese Female",
"Japanese Male",
"Korean Female",
"Korean Male",
"Latin Female",
"Latin Male",
"Latvian Male",
"Macedonian Male",
"Moldavian Female",
"Moldavian Male",
"Montenegrin Male",
"Nepali",
"Norwegian Female",
"Norwegian Male",
"Polish Female",
"Polish Male",
"Portuguese Female",
"Portuguese Male",
"Romanian Female",
"Romanian Male",
"Russian Female",
"Russian Male",
"Serbian Male",
"Serbo-Croatian Male",
"Sinhala",
"Slovak Female",
"Slovak Male",
"Spanish Female",
"Spanish Male",
"Spanish Latin American Female",
"Spanish Latin American Male",
"Swahili Male",
"Swedish Female",
"Swedish Male",
"Tamil Female",
"Tamil Male",
"Thai Female",
"Thai Male",
"Turkish Female",
"Turkish Male",
"Ukrainian Female",
"Vietnamese Female",
"Vietnamese Male",
"Welsh Male"
],
"description": "TTS voice to use (optional)."
}
}
}