@altnovatrail/spec 0.0.0-stage → 0.4.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/LICENSE +201 -0
- package/README.md +48 -2
- package/formatv0/index.d.ts +1844 -0
- package/formatv0/open/index.d.ts +633 -0
- package/package.json +22 -4
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
// Code generated by tools/types from format/schemas; DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The open view of each part of a module (format/README.md, section 6): the type of each struct the
|
|
5
|
+
* open view of a part reaches, by the name it has in formatv0, with the fields marked x-open alone,
|
|
6
|
+
* of version 0.1. An open view has no check, no template and no solver; a task's has its givens and
|
|
7
|
+
* its unknown. Strings, integers and enumerations are formatv0's.
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type * as formatv0 from "../index.js";
|
|
13
|
+
|
|
14
|
+
// The open views of the types of manifest.schema.json.
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Manifest is the open view of formatv0.Manifest, the type of manifest.schema.json: its fields
|
|
18
|
+
* marked x-open.
|
|
19
|
+
*
|
|
20
|
+
* The manifest of a module, manifest.yaml at the root of its folder: the format version the module
|
|
21
|
+
* is written in, its ID and version, what it is called and teaches, whom it is for, the bands of
|
|
22
|
+
* its difficulty scale, its languages, the anchor skills it builds on, the settings of its canvas,
|
|
23
|
+
* its authors and its license, and the templates of the rungs of its hint ladder. Every field is
|
|
24
|
+
* open, since the learner's app shows them.
|
|
25
|
+
*/
|
|
26
|
+
export interface Manifest {
|
|
27
|
+
/**
|
|
28
|
+
* The version of the module format the module is written in, "0.1": the module is checked, built
|
|
29
|
+
* and run by it. It stands at the root of the manifest in every version of the format, so that a
|
|
30
|
+
* reader finds it before it knows which schemas to read the module by.
|
|
31
|
+
*/
|
|
32
|
+
readonly module_format_version: formatv0.ModuleFormatVersion;
|
|
33
|
+
/**
|
|
34
|
+
* The module's ID: novatrail/olympiad-math.
|
|
35
|
+
*/
|
|
36
|
+
readonly id: formatv0.ModuleID;
|
|
37
|
+
/**
|
|
38
|
+
* The module's version, X.Y.Z.
|
|
39
|
+
*/
|
|
40
|
+
readonly version: formatv0.ModuleVersion;
|
|
41
|
+
/**
|
|
42
|
+
* What the module is called, in its explanation language.
|
|
43
|
+
*/
|
|
44
|
+
readonly title: formatv0.Text;
|
|
45
|
+
/**
|
|
46
|
+
* What the module teaches.
|
|
47
|
+
*/
|
|
48
|
+
readonly subject: formatv0.Subject;
|
|
49
|
+
/**
|
|
50
|
+
* Whom the module is for: its age categories and, for a module written for school grades, those
|
|
51
|
+
* grades.
|
|
52
|
+
*/
|
|
53
|
+
readonly audience: Audience;
|
|
54
|
+
/**
|
|
55
|
+
* The bands of the module's difficulty scale, from the easiest: each task names its band and a
|
|
56
|
+
* difficulty from 1 to 5 within it. A module with tasks has them.
|
|
57
|
+
*/
|
|
58
|
+
readonly bands?: readonly Band[];
|
|
59
|
+
/**
|
|
60
|
+
* The languages of the module.
|
|
61
|
+
*/
|
|
62
|
+
readonly languages: Languages;
|
|
63
|
+
/**
|
|
64
|
+
* The anchor skills of the shared taxonomy that the module's skills need: exactly those that its
|
|
65
|
+
* skill graph names as prerequisites. A module whose skills need none leaves this field out.
|
|
66
|
+
*/
|
|
67
|
+
readonly dependencies?: readonly formatv0.SharedTaxonomy[];
|
|
68
|
+
/**
|
|
69
|
+
* The settings of the module's canvas, the same for each of its tasks.
|
|
70
|
+
*/
|
|
71
|
+
readonly canvas?: CanvasSettings;
|
|
72
|
+
/**
|
|
73
|
+
* Who wrote the module.
|
|
74
|
+
*/
|
|
75
|
+
readonly authors: readonly Author[];
|
|
76
|
+
/**
|
|
77
|
+
* The license of the module's content: Apache-2.0 for an official module.
|
|
78
|
+
*/
|
|
79
|
+
readonly license: formatv0.License;
|
|
80
|
+
/**
|
|
81
|
+
* The templates of rungs 1 and 2 of the hint ladder, in order, in the module's explanation
|
|
82
|
+
* language: what the learner reads after a wrong answer when the tutor's question did not come or
|
|
83
|
+
* did not pass its checks, and neither a trap text nor a trap's advice fits. A module with an
|
|
84
|
+
* item with a verdict has them.
|
|
85
|
+
*/
|
|
86
|
+
readonly rung_templates?: readonly formatv0.Text[];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Audience is the open view of formatv0.Audience, the type of
|
|
91
|
+
* manifest.schema.json#/properties/audience: its fields marked x-open.
|
|
92
|
+
*
|
|
93
|
+
* Whom the module is for: its age categories and, for a module written for school grades, those
|
|
94
|
+
* grades.
|
|
95
|
+
*/
|
|
96
|
+
export interface Audience {
|
|
97
|
+
/**
|
|
98
|
+
* The age categories that the module suits. The platform offers the module only to learners in
|
|
99
|
+
* one of them.
|
|
100
|
+
*/
|
|
101
|
+
readonly age_categories: readonly formatv0.AgeCategory[];
|
|
102
|
+
/**
|
|
103
|
+
* The school grades that the module is written for. A module that names them asks the learner's
|
|
104
|
+
* grade, and the answer may be one it does not name. Unlike the age categories, grades close
|
|
105
|
+
* nothing: the module and its skills stay open to a learner of any grade.
|
|
106
|
+
*/
|
|
107
|
+
readonly grades?: readonly formatv0.Grade[];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Band is the open view of formatv0.Band, the type of manifest.schema.json#/properties/bands/items:
|
|
112
|
+
* its fields marked x-open.
|
|
113
|
+
*/
|
|
114
|
+
export interface Band {
|
|
115
|
+
/**
|
|
116
|
+
* The band's ID, by which a task names it.
|
|
117
|
+
*/
|
|
118
|
+
readonly id: formatv0.BandID;
|
|
119
|
+
/**
|
|
120
|
+
* What the band is called, in the module's explanation language: Grades 1–2.
|
|
121
|
+
*/
|
|
122
|
+
readonly title: formatv0.Text;
|
|
123
|
+
/**
|
|
124
|
+
* The school grades the band's tasks are written for, in a module that names grades: a learner of
|
|
125
|
+
* one of them starts in this band.
|
|
126
|
+
*/
|
|
127
|
+
readonly grades?: readonly formatv0.Grade[];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Languages is the open view of formatv0.Languages, the type of
|
|
132
|
+
* manifest.schema.json#/properties/languages: its fields marked x-open.
|
|
133
|
+
*
|
|
134
|
+
* The languages of the module.
|
|
135
|
+
*/
|
|
136
|
+
export interface Languages {
|
|
137
|
+
/**
|
|
138
|
+
* The explanation language: the one language in which the module explains and the tutor speaks
|
|
139
|
+
* with the learner. Every text of the module is in it, except the material of a language module,
|
|
140
|
+
* which is in its target language.
|
|
141
|
+
*/
|
|
142
|
+
readonly explanation: formatv0.LanguageTag;
|
|
143
|
+
/**
|
|
144
|
+
* The target language: the one that a language module teaches. Other modules have none.
|
|
145
|
+
*/
|
|
146
|
+
readonly target?: formatv0.LanguageTag;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* CanvasSettings is the open view of formatv0.CanvasSettings, the type of
|
|
151
|
+
* manifest.schema.json#/properties/canvas: its fields marked x-open.
|
|
152
|
+
*
|
|
153
|
+
* The settings of the module's canvas, the same for each of its tasks.
|
|
154
|
+
*/
|
|
155
|
+
export interface CanvasSettings {
|
|
156
|
+
/**
|
|
157
|
+
* The height in px that a digit or a letter of the learner's writing has on the crop that goes to
|
|
158
|
+
* be read: 32 unless given.
|
|
159
|
+
*
|
|
160
|
+
* @defaultValue 32
|
|
161
|
+
*/
|
|
162
|
+
readonly digit_height?: number;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Author is the open view of formatv0.Author, the type of
|
|
167
|
+
* manifest.schema.json#/properties/authors/items: its fields marked x-open.
|
|
168
|
+
*/
|
|
169
|
+
export interface Author {
|
|
170
|
+
/**
|
|
171
|
+
* The name of an author: a person or an organization.
|
|
172
|
+
*/
|
|
173
|
+
readonly name: formatv0.Text;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// The open views of the types of skill-graph.schema.json.
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* SkillGraph is the open view of formatv0.SkillGraph, the type of skill-graph.schema.json: its
|
|
180
|
+
* fields marked x-open.
|
|
181
|
+
*
|
|
182
|
+
* The skill graph of a module, skill-graph.yaml at the root of its folder: the module's skills,
|
|
183
|
+
* what a learner needs before each one, how the platform can know a learner's command of each,
|
|
184
|
+
* which anchor skills of the shared taxonomy each one teaches, the names of the tiers, and the
|
|
185
|
+
* skills that the module had once and has no more. The tier of a skill is computed from the
|
|
186
|
+
* prerequisites, never written, and module-kit puts it into the module's package. Every field is
|
|
187
|
+
* open but retired_skills, since the skill map shows them.
|
|
188
|
+
*/
|
|
189
|
+
export interface SkillGraph {
|
|
190
|
+
/**
|
|
191
|
+
* The names of the tiers, in order from tier 1. The tiers past the last name are shown by their
|
|
192
|
+
* numbers, and a name past the last tier names none.
|
|
193
|
+
*/
|
|
194
|
+
readonly tiers?: readonly formatv0.Text[];
|
|
195
|
+
/**
|
|
196
|
+
* The module's skills, each under its local ID. Their order carries no meaning.
|
|
197
|
+
*/
|
|
198
|
+
readonly skills: Readonly<Record<formatv0.SkillID, Skill>>;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Skill is the open view of formatv0.Skill, the type of
|
|
203
|
+
* skill-graph.schema.json#/properties/skills/additionalProperties: its fields marked x-open.
|
|
204
|
+
*
|
|
205
|
+
* A skill of the module, under its local ID.
|
|
206
|
+
*/
|
|
207
|
+
export interface Skill {
|
|
208
|
+
/**
|
|
209
|
+
* What the skill is called, in the module's explanation language.
|
|
210
|
+
*/
|
|
211
|
+
readonly title: formatv0.Text;
|
|
212
|
+
/**
|
|
213
|
+
* What a learner who has the skill can do, in the module's explanation language.
|
|
214
|
+
*/
|
|
215
|
+
readonly description?: formatv0.Text;
|
|
216
|
+
/**
|
|
217
|
+
* The skills that a learner needs before this one, all of them: skills of the module by local ID,
|
|
218
|
+
* and anchor skills of the shared taxonomy by their IDs. A skill with none leaves this field out.
|
|
219
|
+
*/
|
|
220
|
+
readonly prerequisites?: readonly string[];
|
|
221
|
+
/**
|
|
222
|
+
* The anchor skills of the shared taxonomy that this skill teaches: a learner who has this skill
|
|
223
|
+
* can do what the description of each says. Other modules build on them, and the learner model
|
|
224
|
+
* decides by such skills whether a learner has them. A skill that teaches none leaves this field
|
|
225
|
+
* out.
|
|
226
|
+
*/
|
|
227
|
+
readonly teaches?: readonly formatv0.SharedTaxonomy[];
|
|
228
|
+
/**
|
|
229
|
+
* How the platform can know a learner's command of the skill: verdict, when its tasks are checked
|
|
230
|
+
* against a key or a predicate; rubric, when work on it gets feedback by the author's rubric and
|
|
231
|
+
* no verdict; none, when it is practised and not assessed.
|
|
232
|
+
*/
|
|
233
|
+
readonly assessability: formatv0.SkillAssessability;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// The open views of the types of traps.schema.json.
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Traps is the open view of formatv0.Traps, the type of traps.schema.json: its fields marked
|
|
240
|
+
* x-open.
|
|
241
|
+
*
|
|
242
|
+
* The trap catalog of a module, traps.yaml at the root of its folder: the typical mistakes that the
|
|
243
|
+
* module's tasks catch, each under its local ID, with what the mistake is, the skills it belongs to
|
|
244
|
+
* and what to advise on it. A task names only a trap of the catalog, so that a wrong answer becomes
|
|
245
|
+
* a diagnosis that can be counted. Every field is closed, since a trap tells what mistake a task
|
|
246
|
+
* expects.
|
|
247
|
+
*/
|
|
248
|
+
export type Traps = { readonly [field: string]: never };
|
|
249
|
+
|
|
250
|
+
// The open views of the types of techniques.schema.json.
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Techniques is the open view of formatv0.Techniques, the type of techniques.schema.json: its
|
|
254
|
+
* fields marked x-open.
|
|
255
|
+
*
|
|
256
|
+
* The technique catalog of a module, techniques.yaml at the root of its folder: the ways of solving
|
|
257
|
+
* that the module names and teaches, each under its local ID, with its title and what it is. A task
|
|
258
|
+
* names the techniques that help in it, and which those are is closed, in the task. Every field of
|
|
259
|
+
* the catalog is open, as the skills of the skill graph are.
|
|
260
|
+
*/
|
|
261
|
+
export interface Techniques {
|
|
262
|
+
/**
|
|
263
|
+
* The module's techniques, each under its local ID. Their order carries no meaning, and this
|
|
264
|
+
* version gives them no numbers.
|
|
265
|
+
*/
|
|
266
|
+
readonly techniques: Readonly<Record<formatv0.TechniqueID, Technique>>;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Technique is the open view of formatv0.Technique, the type of
|
|
271
|
+
* techniques.schema.json#/properties/techniques/additionalProperties: its fields marked x-open.
|
|
272
|
+
*
|
|
273
|
+
* A technique of the module, under its local ID.
|
|
274
|
+
*/
|
|
275
|
+
export interface Technique {
|
|
276
|
+
/**
|
|
277
|
+
* What the technique is called, in the module's explanation language.
|
|
278
|
+
*/
|
|
279
|
+
readonly title: formatv0.Text;
|
|
280
|
+
/**
|
|
281
|
+
* What the technique is and when it helps, in the module's explanation language.
|
|
282
|
+
*/
|
|
283
|
+
readonly description?: formatv0.Text;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// The open views of the types of solving-steps.schema.json.
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* SolvingSteps is the open view of formatv0.SolvingSteps, the type of solving-steps.schema.json:
|
|
290
|
+
* its fields marked x-open.
|
|
291
|
+
*
|
|
292
|
+
* The solving steps of a module, solving-steps.yaml at the root of its folder: the frame through
|
|
293
|
+
* which the tutor leads a learner within a task, step by step, each with its title, what of the
|
|
294
|
+
* task it gives and when it ends. Every task of the module goes through the same steps. Every field
|
|
295
|
+
* is open, since the learner's app leads the steps itself.
|
|
296
|
+
*/
|
|
297
|
+
export interface SolvingSteps {
|
|
298
|
+
/**
|
|
299
|
+
* The steps, in order, each named by its place, from 1.
|
|
300
|
+
*/
|
|
301
|
+
readonly steps: readonly Step[];
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Step is the open view of formatv0.Step, the type of solving-steps.schema.json#/$defs/step: its
|
|
306
|
+
* fields marked x-open.
|
|
307
|
+
*
|
|
308
|
+
* A solving step: what the learner does in it, what of the task it gives, and when it ends.
|
|
309
|
+
*/
|
|
310
|
+
export interface Step {
|
|
311
|
+
/**
|
|
312
|
+
* What the learner does in the step, in the module's explanation language.
|
|
313
|
+
*/
|
|
314
|
+
readonly title: formatv0.Text;
|
|
315
|
+
/**
|
|
316
|
+
* What of the task the step gives the learner: givens, the task's givens and unknown, which the
|
|
317
|
+
* learner ticks; techniques, the task's techniques, which the server gives when the step begins.
|
|
318
|
+
* A step that gives neither leaves this field out.
|
|
319
|
+
*/
|
|
320
|
+
readonly gives?: readonly formatv0.StepGives[];
|
|
321
|
+
/**
|
|
322
|
+
* When the step ends, by an event on the learner's device and with no key: givens_ticked, once
|
|
323
|
+
* the learner has ticked every given and the unknown; answer_slots_filled, once every answer slot
|
|
324
|
+
* of the task holds something of the learner's; none, when the learner moves on.
|
|
325
|
+
*/
|
|
326
|
+
readonly exit_condition: formatv0.StepExitCondition;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// The open views of the types of task.schema.json.
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Task is the open view of formatv0.Task, the type of task.schema.json: its fields marked x-open.
|
|
333
|
+
*
|
|
334
|
+
* A task of a module, tasks/<id>.yaml in its folder: its statement, its canvas, its items with
|
|
335
|
+
* their answer slots, each with the check that says what is right in it, the skills it trains, its
|
|
336
|
+
* band and difficulty, and, when they are fewer than the module's, the age categories it is for;
|
|
337
|
+
* and what helps the learner on the way: what the statement gives and asks, the techniques that
|
|
338
|
+
* help, the traps that AI may suggest, a simpler case for each item, the solution and the phrases
|
|
339
|
+
* that give the answer away. The ID, the statement, the canvas, the items, the givens and the
|
|
340
|
+
* unknown are open, since the learner's app shows them, but for the skills and the simpler case of
|
|
341
|
+
* an item and the check of each answer slot; those, the skills, the band, the difficulty, the age
|
|
342
|
+
* categories, the techniques, the traps, the solution, the leak phrases and the template are
|
|
343
|
+
* closed, since the server reads them. A task with a template is a template of tasks: each attempt
|
|
344
|
+
* gets one instance of it, with numbers in the place of its placeholders.
|
|
345
|
+
*/
|
|
346
|
+
export interface Task {
|
|
347
|
+
/**
|
|
348
|
+
* The task's local ID: the name of its file, without .yaml.
|
|
349
|
+
*/
|
|
350
|
+
readonly id: formatv0.TaskID;
|
|
351
|
+
/**
|
|
352
|
+
* The statement of the task, what the learner reads: paragraphs and pictures in order, in the
|
|
353
|
+
* module's explanation language. Whether it stands above the canvas or on it is the canvas kind's
|
|
354
|
+
* to decide.
|
|
355
|
+
*/
|
|
356
|
+
readonly statement: readonly StatementPart[];
|
|
357
|
+
/**
|
|
358
|
+
* The canvas of the task, one for all its items: its kind and the kind's settings.
|
|
359
|
+
*/
|
|
360
|
+
readonly canvas: Canvas;
|
|
361
|
+
/**
|
|
362
|
+
* The items of the task, each named by its place, from 1. On a handwriting sheet an item has
|
|
363
|
+
* answer slots; on a workbook it is a line of text and boxes.
|
|
364
|
+
*/
|
|
365
|
+
readonly items: readonly Item[];
|
|
366
|
+
/**
|
|
367
|
+
* What the statement gives, each a short text in the module's explanation language: the chips
|
|
368
|
+
* that the learner ticks at a solving step that gives them, and what a hint asked for gives
|
|
369
|
+
* before the first answer.
|
|
370
|
+
*/
|
|
371
|
+
readonly givens?: readonly formatv0.Text[];
|
|
372
|
+
/**
|
|
373
|
+
* What the task asks to find, in the module's explanation language: the chip that the learner
|
|
374
|
+
* ticks beside the givens.
|
|
375
|
+
*/
|
|
376
|
+
readonly unknown?: formatv0.Text;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Item is the open view of formatv0.Item, the type of task.schema.json#/$defs/item: its fields
|
|
381
|
+
* marked x-open.
|
|
382
|
+
*
|
|
383
|
+
* An item of the task: on a handwriting sheet, its answer slots and what it asks; on a workbook, a
|
|
384
|
+
* line of text and boxes.
|
|
385
|
+
*/
|
|
386
|
+
export interface Item {
|
|
387
|
+
/**
|
|
388
|
+
* What the item asks, on a handwriting sheet, beside its answer slots: a) or a question.
|
|
389
|
+
*/
|
|
390
|
+
readonly text?: formatv0.Text;
|
|
391
|
+
/**
|
|
392
|
+
* The answer slots of an item on a handwriting sheet, each named by its place in the item, from
|
|
393
|
+
* 1.
|
|
394
|
+
*/
|
|
395
|
+
readonly answer_slots?: readonly AnswerSlot[];
|
|
396
|
+
/**
|
|
397
|
+
* An item of a workbook: pieces of text and boxes in order, as 7 × [ ] = 56, and at least one
|
|
398
|
+
* box. Its boxes are its answer slots, each named by its place among them, from 1.
|
|
399
|
+
*/
|
|
400
|
+
readonly line?: readonly LinePart[];
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* AnswerSlot is the open view of formatv0.AnswerSlot, the type of
|
|
405
|
+
* task.schema.json#/$defs/answer_slot: its fields marked x-open.
|
|
406
|
+
*
|
|
407
|
+
* An answer slot of an item on a handwriting sheet: its binding, the zone or the options that the
|
|
408
|
+
* binding needs, and its check.
|
|
409
|
+
*/
|
|
410
|
+
export interface AnswerSlot {
|
|
411
|
+
/**
|
|
412
|
+
* Where and how the learner gives the answer on a handwriting sheet: anywhere on it, where AI
|
|
413
|
+
* finds the final answer; the whole sheet, a work as a whole, such as an essay; in a zone of it;
|
|
414
|
+
* or by choosing one of the options.
|
|
415
|
+
*/
|
|
416
|
+
readonly binding: formatv0.AnswerSlotBinding;
|
|
417
|
+
/**
|
|
418
|
+
* The zone of the sheet where the learner writes the answer.
|
|
419
|
+
*/
|
|
420
|
+
readonly zone?: SheetRectangle;
|
|
421
|
+
/**
|
|
422
|
+
* The options the learner chooses from, in the order they are shown.
|
|
423
|
+
*/
|
|
424
|
+
readonly options?: readonly formatv0.Text[];
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* LinePart is the open view of formatv0.LinePart, the type of task.schema.json#/$defs/line_part:
|
|
429
|
+
* its fields marked x-open.
|
|
430
|
+
*
|
|
431
|
+
* A piece of a line: a piece of text, or a box with its check.
|
|
432
|
+
*/
|
|
433
|
+
export interface LinePart {
|
|
434
|
+
/**
|
|
435
|
+
* A piece of the line's text.
|
|
436
|
+
*/
|
|
437
|
+
readonly text?: formatv0.Text;
|
|
438
|
+
/**
|
|
439
|
+
* A box of the line, an answer slot where the learner writes the answer.
|
|
440
|
+
*/
|
|
441
|
+
readonly binding?: formatv0.LinePartBinding;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// The open views of the types of common.schema.json.
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* StatementPart is the open view of formatv0.StatementPart, the type of
|
|
448
|
+
* common.schema.json#/$defs/statement_part: its fields marked x-open.
|
|
449
|
+
*
|
|
450
|
+
* A part of a text that the learner reads — a statement, a solution or an explanation: a paragraph,
|
|
451
|
+
* or a picture with what it shows and its size.
|
|
452
|
+
*/
|
|
453
|
+
export interface StatementPart {
|
|
454
|
+
/**
|
|
455
|
+
* A paragraph, as plain text.
|
|
456
|
+
*/
|
|
457
|
+
readonly text?: formatv0.Text;
|
|
458
|
+
/**
|
|
459
|
+
* A picture, by its path from media/.
|
|
460
|
+
*/
|
|
461
|
+
readonly picture?: formatv0.PicturePath;
|
|
462
|
+
/**
|
|
463
|
+
* What the picture shows, in words: a screen reader reads it, and it stands in the picture's
|
|
464
|
+
* place until the picture comes. Empty for a picture that only decorates.
|
|
465
|
+
*/
|
|
466
|
+
readonly alt?: string;
|
|
467
|
+
/**
|
|
468
|
+
* The width the picture is shown at, in CSS px; narrower when the text it stands in is.
|
|
469
|
+
*/
|
|
470
|
+
readonly width?: number;
|
|
471
|
+
/**
|
|
472
|
+
* The height the picture is shown at, in CSS px, in proportion to its width.
|
|
473
|
+
*/
|
|
474
|
+
readonly height?: number;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Canvas is the open view of formatv0.Canvas, the type of common.schema.json#/$defs/canvas: its
|
|
479
|
+
* fields marked x-open.
|
|
480
|
+
*
|
|
481
|
+
* A canvas: its kind, and the grid of a handwriting sheet.
|
|
482
|
+
*/
|
|
483
|
+
export interface Canvas {
|
|
484
|
+
/**
|
|
485
|
+
* The canvas kind: a handwriting sheet, a free sheet of 1000 × 1400 units; or a workbook, lines
|
|
486
|
+
* of items with boxes for the answers.
|
|
487
|
+
*/
|
|
488
|
+
readonly kind: formatv0.CanvasKind;
|
|
489
|
+
/**
|
|
490
|
+
* The grid of a handwriting sheet: squares, lines or dots; squares unless given.
|
|
491
|
+
*
|
|
492
|
+
* @defaultValue "squares"
|
|
493
|
+
*/
|
|
494
|
+
readonly grid?: formatv0.CanvasGrid;
|
|
495
|
+
/**
|
|
496
|
+
* The step of the grid of a handwriting sheet, in its units: 50 unless given.
|
|
497
|
+
*
|
|
498
|
+
* @defaultValue 50
|
|
499
|
+
*/
|
|
500
|
+
readonly grid_step?: number;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* SheetRectangle is the open view of formatv0.SheetRectangle, the type of
|
|
505
|
+
* common.schema.json#/$defs/sheet_rectangle: its fields marked x-open.
|
|
506
|
+
*
|
|
507
|
+
* A rectangle of the handwriting sheet, in its units of 1000 × 1400 from the top left corner.
|
|
508
|
+
*/
|
|
509
|
+
export interface SheetRectangle {
|
|
510
|
+
/**
|
|
511
|
+
* How far the rectangle begins from the left edge of the sheet, in its units.
|
|
512
|
+
*/
|
|
513
|
+
readonly left: number;
|
|
514
|
+
/**
|
|
515
|
+
* How far the rectangle begins from the top edge of the sheet, in its units.
|
|
516
|
+
*/
|
|
517
|
+
readonly top: number;
|
|
518
|
+
/**
|
|
519
|
+
* The width of the rectangle, in units of the sheet.
|
|
520
|
+
*/
|
|
521
|
+
readonly width: number;
|
|
522
|
+
/**
|
|
523
|
+
* The height of the rectangle, in units of the sheet.
|
|
524
|
+
*/
|
|
525
|
+
readonly height: number;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
// The open views of the types of lesson.schema.json.
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Lesson is the open view of formatv0.Lesson, the type of lesson.schema.json: its fields marked
|
|
532
|
+
* x-open.
|
|
533
|
+
*
|
|
534
|
+
* A lesson of a module: a sequence that its author made — explanations, worked examples and tasks,
|
|
535
|
+
* in order — and the skills of the module that it teaches. The skill graph orders the lessons.
|
|
536
|
+
*/
|
|
537
|
+
export interface Lesson {
|
|
538
|
+
/**
|
|
539
|
+
* The lesson's local ID: the name of its file, without .yaml.
|
|
540
|
+
*/
|
|
541
|
+
readonly id: formatv0.LessonID;
|
|
542
|
+
/**
|
|
543
|
+
* What the lesson is called, in the module's explanation language. The learner sees it before
|
|
544
|
+
* every task of the lesson, and the leak check searches it for their keys.
|
|
545
|
+
*/
|
|
546
|
+
readonly title: formatv0.Text;
|
|
547
|
+
/**
|
|
548
|
+
* The segments of the lesson, in the author's order: explanations, worked examples and tasks. No
|
|
549
|
+
* two are the same.
|
|
550
|
+
*/
|
|
551
|
+
readonly segments: readonly Segment[];
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Segment is the open view of formatv0.Segment, the type of lesson.schema.json#/$defs/segment: its
|
|
556
|
+
* fields marked x-open.
|
|
557
|
+
*
|
|
558
|
+
* A segment of a lesson: an explanation, a worked example or a task, by its one field.
|
|
559
|
+
*/
|
|
560
|
+
export interface Segment {
|
|
561
|
+
/**
|
|
562
|
+
* An explanation: paragraphs and pictures that the learner reads, in order, in the module's
|
|
563
|
+
* explanation language.
|
|
564
|
+
*/
|
|
565
|
+
readonly explanation?: readonly StatementPart[];
|
|
566
|
+
/**
|
|
567
|
+
* A worked example: an example solved before the learner's eyes, on a handwriting sheet.
|
|
568
|
+
*/
|
|
569
|
+
readonly worked_example?: WorkedExample;
|
|
570
|
+
/**
|
|
571
|
+
* A task of the module, by its local ID. The next segment begins when the task ends.
|
|
572
|
+
*/
|
|
573
|
+
readonly task?: formatv0.TaskID;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* WorkedExample is the open view of formatv0.WorkedExample, the type of
|
|
578
|
+
* lesson.schema.json#/$defs/worked_example: its fields marked x-open.
|
|
579
|
+
*
|
|
580
|
+
* A worked example of a lesson: no task, with no answer slots and no key.
|
|
581
|
+
*/
|
|
582
|
+
export interface WorkedExample {
|
|
583
|
+
/**
|
|
584
|
+
* What the example asks: paragraphs and pictures in order, as a task's statement.
|
|
585
|
+
*/
|
|
586
|
+
readonly statement: readonly StatementPart[];
|
|
587
|
+
/**
|
|
588
|
+
* The sheet that the author's demo is shown on: a handwriting sheet and its grid. The learner
|
|
589
|
+
* does not write on it.
|
|
590
|
+
*/
|
|
591
|
+
readonly canvas: Canvas;
|
|
592
|
+
/**
|
|
593
|
+
* The author's demo: the parts of how the example is solved, in order, which the learner opens
|
|
594
|
+
* one at a time and may hide.
|
|
595
|
+
*/
|
|
596
|
+
readonly demo: readonly DemoPart[];
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* DemoPart is the open view of formatv0.DemoPart, the type of lesson.schema.json#/$defs/demo_part:
|
|
601
|
+
* its fields marked x-open.
|
|
602
|
+
*
|
|
603
|
+
* A part of the author's demo: a paragraph; a picture beside the sheet, with what it shows and its
|
|
604
|
+
* size; or a picture on the sheet, with what it shows and its area.
|
|
605
|
+
*/
|
|
606
|
+
export interface DemoPart {
|
|
607
|
+
/**
|
|
608
|
+
* A paragraph of the demo, as plain text.
|
|
609
|
+
*/
|
|
610
|
+
readonly text?: formatv0.Text;
|
|
611
|
+
/**
|
|
612
|
+
* A picture of the demo, by its path from media/.
|
|
613
|
+
*/
|
|
614
|
+
readonly picture?: formatv0.PicturePath;
|
|
615
|
+
/**
|
|
616
|
+
* What the picture shows, in words: a screen reader reads it, and it stands in the picture's
|
|
617
|
+
* place until the picture comes. Empty for a picture that only decorates.
|
|
618
|
+
*/
|
|
619
|
+
readonly alt?: string;
|
|
620
|
+
/**
|
|
621
|
+
* The width that a picture beside the sheet is shown at, in CSS px.
|
|
622
|
+
*/
|
|
623
|
+
readonly width?: number;
|
|
624
|
+
/**
|
|
625
|
+
* The height that a picture beside the sheet is shown at, in CSS px, in proportion to its width.
|
|
626
|
+
*/
|
|
627
|
+
readonly height?: number;
|
|
628
|
+
/**
|
|
629
|
+
* The area of the sheet that a picture on the sheet is shown in, at its size, on the canvas layer
|
|
630
|
+
* of the author's demo.
|
|
631
|
+
*/
|
|
632
|
+
readonly area?: SheetRectangle;
|
|
633
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@altnovatrail/spec",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "The types of NovaTrail's module format for TypeScript, generated from its schemas: the parts of a module and their open views, the canonical view, the inventory, the module index and the test vectors.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/altnovatrail/spec.git"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"exports": {
|
|
12
|
+
"./formatv0": {
|
|
13
|
+
"types": "./formatv0/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./formatv0/open": {
|
|
16
|
+
"types": "./formatv0/open/index.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"formatv0"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": false
|
|
24
|
+
}
|