@allons-y/course-kit 0.0.0-stage → 0.1.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.
Files changed (137) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +90 -2
  3. package/assets/fonts/instrument-sans-italic-var.woff2 +0 -0
  4. package/assets/fonts/instrument-sans-var.woff2 +0 -0
  5. package/assets/fonts/pt-mono.woff2 +0 -0
  6. package/assets/scripts/copy.js +99 -0
  7. package/assets/scripts/deck.js +161 -0
  8. package/assets/scripts/email.js +17 -0
  9. package/assets/scripts/practice.js +545 -0
  10. package/assets/scripts/theme-panel.js +647 -0
  11. package/assets/scripts/theme-restore.js +17 -0
  12. package/assets/styles/base.css +2090 -0
  13. package/assets/styles/deck.css +968 -0
  14. package/assets/styles/font.css +36 -0
  15. package/assets/styles/notes.css +137 -0
  16. package/assets/styles/print.css +428 -0
  17. package/assets/styles/semantics.css +101 -0
  18. package/components/practice/check-controls.webc +50 -0
  19. package/components/practice/choice-list.webc +86 -0
  20. package/components/practice/cite-panel.webc +108 -0
  21. package/components/practice/practice-figure.webc +47 -0
  22. package/components/practice/practice-fill.webc +154 -0
  23. package/components/practice/practice-grid.webc +82 -0
  24. package/components/practice/practice-judge.webc +165 -0
  25. package/components/practice/practice-match.webc +178 -0
  26. package/components/practice/practice-question.webc +141 -0
  27. package/components/practice/practice-selfcheck.webc +40 -0
  28. package/components/practice/practice-terms.webc +95 -0
  29. package/components/practice/practice-tree.webc +91 -0
  30. package/components/practice/practice-worksheet.webc +369 -0
  31. package/components/site/copyright.webc +13 -0
  32. package/components/site/course-documents.webc +27 -0
  33. package/components/site/course-now.webc +393 -0
  34. package/components/site/course-summary.webc +136 -0
  35. package/components/site/demo-weeks.webc +91 -0
  36. package/components/site/glossary-entry.webc +31 -0
  37. package/components/site/glossary-panel.webc +1482 -0
  38. package/components/site/glossary.webc +45 -0
  39. package/components/site/grading.webc +50 -0
  40. package/components/site/instructor.webc +269 -0
  41. package/components/site/masthead.webc +147 -0
  42. package/components/site/nav-links.webc +174 -0
  43. package/components/site/policies.webc +17 -0
  44. package/components/site/practice-index.webc +31 -0
  45. package/components/site/schedule-overview.webc +145 -0
  46. package/components/site/schedule-weeks.webc +589 -0
  47. package/components/site/site-footer.webc +119 -0
  48. package/components/site/slide-timetable.webc +152 -0
  49. package/components/site/syllabus.webc +217 -0
  50. package/components/ui/arrow-link.webc +19 -0
  51. package/components/ui/assigned-list.webc +101 -0
  52. package/components/ui/callout.webc +11 -0
  53. package/components/ui/card-list.webc +124 -0
  54. package/components/ui/codepen-embed.webc +123 -0
  55. package/components/ui/download-button.webc +49 -0
  56. package/components/ui/eyebrow.webc +18 -0
  57. package/components/ui/icons/github.webc +6 -0
  58. package/components/ui/icons/google.webc +9 -0
  59. package/components/ui/link-list.webc +130 -0
  60. package/components/ui/link-section.webc +40 -0
  61. package/components/ui/meeting-card.webc +73 -0
  62. package/components/ui/meeting-decks.webc +38 -0
  63. package/components/ui/table-rubric.webc +251 -0
  64. package/components/ui/today-link.webc +43 -0
  65. package/components/ui/today-marker.webc +149 -0
  66. package/components/ui/week-block.webc +53 -0
  67. package/examples/starter/_data/course.json +20 -0
  68. package/examples/starter/_data/dates.json +16 -0
  69. package/examples/starter/_data/grading.json +6 -0
  70. package/examples/starter/_data/instructor.json +7 -0
  71. package/examples/starter/_data/policies.json +9 -0
  72. package/examples/starter/_data/scale.json +8 -0
  73. package/examples/starter/_data/schedule.json +22 -0
  74. package/examples/starter/_data/theme.json +17 -0
  75. package/examples/starter/content/index.webc +12 -0
  76. package/examples/starter/content/schedule.webc +12 -0
  77. package/examples/starter/content/slides/index.11tydata.js +5 -0
  78. package/examples/starter/content/slides/index.webc +12 -0
  79. package/examples/starter/content/slides/week-1-day-1.md +40 -0
  80. package/examples/starter/eleventy.config.js +8 -0
  81. package/glue/deck-notes.data.js +41 -0
  82. package/glue/deck-notes.webc +32 -0
  83. package/glue/lesson-day.data.js +17 -0
  84. package/glue/lesson-day.webc +0 -0
  85. package/glue/lesson-plans.data.js +13 -0
  86. package/glue/lesson-plans.webc +2 -0
  87. package/index.js +6 -0
  88. package/layouts/base.webc +79 -0
  89. package/layouts/deck.webc +46 -0
  90. package/layouts/demo.webc +16 -0
  91. package/layouts/document.webc +10 -0
  92. package/layouts/lesson-detail.webc +109 -0
  93. package/layouts/lesson.webc +71 -0
  94. package/layouts/notes.webc +23 -0
  95. package/layouts/worksheet.webc +52 -0
  96. package/lib/assets.js +42 -0
  97. package/lib/bundles.js +79 -0
  98. package/lib/check.js +110 -0
  99. package/lib/components.js +19 -0
  100. package/lib/copy.js +653 -0
  101. package/lib/data/build.js +22 -0
  102. package/lib/data/fonts.js +16 -0
  103. package/lib/data/glossary.js +304 -0
  104. package/lib/data/index.js +8 -0
  105. package/lib/data/lessons.js +173 -0
  106. package/lib/data/project.js +22 -0
  107. package/lib/data/read.js +46 -0
  108. package/lib/data/site.js +70 -0
  109. package/lib/data/term.js +80 -0
  110. package/lib/extensions.js +70 -0
  111. package/lib/files.js +14 -0
  112. package/lib/filters.js +584 -0
  113. package/lib/fit.js +106 -0
  114. package/lib/glue.js +26 -0
  115. package/lib/lesson-materials.js +66 -0
  116. package/lib/markdown.js +568 -0
  117. package/lib/minify.js +53 -0
  118. package/lib/paths.js +5 -0
  119. package/lib/pdf.js +134 -0
  120. package/lib/plugin.js +228 -0
  121. package/lib/plugins.js +34 -0
  122. package/lib/postcss.js +93 -0
  123. package/lib/theme-server.js +88 -0
  124. package/lib/theme.js +185 -0
  125. package/lib/worksheet-dialect.js +415 -0
  126. package/lib/worksheets.js +276 -0
  127. package/package.json +118 -4
  128. package/schemas/course.schema.json +156 -0
  129. package/schemas/dates.schema.json +165 -0
  130. package/schemas/grading.schema.json +59 -0
  131. package/schemas/instructor.schema.json +68 -0
  132. package/schemas/policies.schema.json +90 -0
  133. package/schemas/project.schema.json +209 -0
  134. package/schemas/scale.schema.json +68 -0
  135. package/schemas/schedule.schema.json +260 -0
  136. package/schemas/theme.schema.json +704 -0
  137. package/schemas/worksheet.schema.json +449 -0
@@ -0,0 +1,449 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Practice worksheet",
4
+ "description": "A self-marking practice worksheet. One file is one worksheet, rendered by <practice-worksheet> and graded by /js/practice.js. Answers ship in the served markup, so a worksheet may only ever be built from material whose answers are already published to students — a practice paper that prints its own key, never a live test.",
5
+ "type": "object",
6
+ "required": [
7
+ "title",
8
+ "heading",
9
+ "sections"
10
+ ],
11
+ "properties": {
12
+ "$schema": {
13
+ "type": "string",
14
+ "description": "Relative path to this schema, so the editor validates and documents fields inline."
15
+ },
16
+ "title": {
17
+ "type": "string",
18
+ "description": "The page title, used in the browser tab and navigation. Not shown in the body."
19
+ },
20
+ "description": {
21
+ "type": "string",
22
+ "description": "One sentence for the page's meta description."
23
+ },
24
+ "indexed": {
25
+ "type": "boolean",
26
+ "default": true,
27
+ "description": "Set false to keep the page out of the sitemap and search results. Does NOT gate publishing — the page is still served to anyone with the URL."
28
+ },
29
+ "eyebrow": {
30
+ "type": "string",
31
+ "description": "Small-caps label above the heading, after the term and course code."
32
+ },
33
+ "heading": {
34
+ "type": "string",
35
+ "description": "The page's <h1>."
36
+ },
37
+ "lede": {
38
+ "type": "string",
39
+ "description": "One line under the heading: what this is for, and whether it is graded."
40
+ },
41
+ "intro": {
42
+ "type": "array",
43
+ "description": "Introductory paragraphs: how to use the worksheet, and what it covers.",
44
+ "items": {
45
+ "type": "string"
46
+ }
47
+ },
48
+ "terms": {
49
+ "type": "array",
50
+ "description": "The vocabulary bank. Each term renders as a button whose definition opens in a popover anchored to it.",
51
+ "items": {
52
+ "$ref": "#/$defs/term"
53
+ }
54
+ },
55
+ "sections": {
56
+ "type": "array",
57
+ "description": "The worksheet's sections, in the order students meet them. Mirror the real paper's sections and order so practice transfers.",
58
+ "items": {
59
+ "$ref": "#/$defs/section"
60
+ }
61
+ },
62
+ "footer": {
63
+ "type": "array",
64
+ "description": "Closing paragraphs: where to go back to when something did not land. Omit for no footer.",
65
+ "items": {
66
+ "type": "string"
67
+ }
68
+ },
69
+ "links": {
70
+ "type": "array",
71
+ "description": "Links listed under the footer paragraphs, resolved the same way a citation is.",
72
+ "items": {
73
+ "$ref": "#/$defs/source"
74
+ }
75
+ },
76
+ "checkMode": {
77
+ "enum": ["question", "end"],
78
+ "description": "How a student checks answers. \"end\" (the default, or the site's `worksheets.checkMode`): only See results at the end. \"question\": also a Check answer button on each gradable question."
79
+ },
80
+ "copy": {
81
+ "type": "object",
82
+ "description": "Overrides for the components' own wording — button labels, the privacy notice, the \"Answer:\" prefix. Every key has a course-neutral default in prepareWorksheet; set only what this worksheet says differently.",
83
+ "additionalProperties": {
84
+ "type": "string"
85
+ }
86
+ }
87
+ },
88
+ "$defs": {
89
+ "source": {
90
+ "type": "object",
91
+ "description": "Where an answer comes from. Name a slide by week/day/slide and the URL is built for you; use href for anything else. Cite only what a student can see — a fact that lives in a ::: notes block is not a citation they can follow.",
92
+ "properties": {
93
+ "label": {
94
+ "type": "string",
95
+ "description": "How the citation reads, e.g. \"Week 3 · Tuesday — Naming the regions: landmarks\"."
96
+ },
97
+ "week": {
98
+ "type": "integer",
99
+ "description": "Deck week number."
100
+ },
101
+ "day": {
102
+ "type": "integer",
103
+ "description": "Deck day number, 1 for the week's first meeting."
104
+ },
105
+ "slide": {
106
+ "type": "integer",
107
+ "description": "Slide number within the deck; becomes the #sN anchor."
108
+ },
109
+ "href": {
110
+ "type": "string",
111
+ "description": "An explicit URL, for a reading or guide rather than a slide. Wins over week/day/slide. A site path (\"/local-setup-guide/\") is made absolute against site.hostname, because a worksheet is a single file students download; an external URL is used as written."
112
+ },
113
+ "quote": {
114
+ "type": "string",
115
+ "description": "The line from that source that settles the answer. Shown under the link."
116
+ }
117
+ },
118
+ "required": [
119
+ "label"
120
+ ]
121
+ },
122
+ "term": {
123
+ "type": "object",
124
+ "required": [
125
+ "term",
126
+ "definition"
127
+ ],
128
+ "properties": {
129
+ "term": {
130
+ "type": "string",
131
+ "description": "The term as students will look for it."
132
+ },
133
+ "definition": {
134
+ "type": "string",
135
+ "description": "One or two sentences, in the course's own words."
136
+ },
137
+ "source": {
138
+ "$ref": "#/$defs/source"
139
+ }
140
+ }
141
+ },
142
+ "legendEntry": {
143
+ "type": "object",
144
+ "description": "One verdict a judge question may be given. Order is the order of the radio buttons.",
145
+ "required": [
146
+ "letter",
147
+ "text"
148
+ ],
149
+ "properties": {
150
+ "letter": {
151
+ "type": "string",
152
+ "description": "The letter students write on paper."
153
+ },
154
+ "text": {
155
+ "type": "string",
156
+ "description": "What that verdict means."
157
+ }
158
+ }
159
+ },
160
+ "bankEntry": {
161
+ "type": "object",
162
+ "required": [
163
+ "letter",
164
+ "text"
165
+ ],
166
+ "properties": {
167
+ "letter": {
168
+ "type": "string",
169
+ "description": "The letter students write in the box."
170
+ },
171
+ "text": {
172
+ "type": "string",
173
+ "description": "The option itself."
174
+ }
175
+ }
176
+ },
177
+ "blank": {
178
+ "type": "object",
179
+ "description": "One box a student fills in.",
180
+ "required": [
181
+ "label",
182
+ "accept",
183
+ "display"
184
+ ],
185
+ "properties": {
186
+ "label": {
187
+ "type": "string",
188
+ "description": "What the box is asking for. Self-numbering, as the list is unnumbered."
189
+ },
190
+ "hint": {
191
+ "type": "string",
192
+ "description": "Optional placeholder, e.g. \"three languages\"."
193
+ },
194
+ "accept": {
195
+ "type": "array",
196
+ "description": "Every wording that counts as right. Both sides are normalized before comparison — case, angle brackets, slashes and separators are ignored — so list only genuinely different answers, not punctuation variants.",
197
+ "items": {
198
+ "type": "string"
199
+ },
200
+ "minItems": 1
201
+ },
202
+ "display": {
203
+ "type": "string",
204
+ "description": "The answer as it is shown when the student got it wrong."
205
+ }
206
+ }
207
+ },
208
+ "section": {
209
+ "type": "object",
210
+ "required": [
211
+ "n",
212
+ "title",
213
+ "questions"
214
+ ],
215
+ "properties": {
216
+ "n": {
217
+ "type": "integer",
218
+ "description": "Section number, matching the real paper."
219
+ },
220
+ "title": {
221
+ "type": "string",
222
+ "description": "Section heading."
223
+ },
224
+ "blurb": {
225
+ "type": "string",
226
+ "description": "One line on what the section tests."
227
+ },
228
+ "legend": {
229
+ "type": "array",
230
+ "description": "Required by `judge` questions: the verdicts on offer, shared by every snippet in the section.",
231
+ "items": {
232
+ "$ref": "#/$defs/legendEntry"
233
+ }
234
+ },
235
+ "questions": {
236
+ "type": "array",
237
+ "items": {
238
+ "$ref": "#/$defs/question"
239
+ }
240
+ }
241
+ }
242
+ },
243
+ "question": {
244
+ "type": "object",
245
+ "description": "One item. `kind` decides which other fields apply; every kind takes id, prompt, why and sources.",
246
+ "required": [
247
+ "id",
248
+ "kind",
249
+ "why",
250
+ "sources"
251
+ ],
252
+ "properties": {
253
+ "id": {
254
+ "type": "string",
255
+ "description": "Section and number, e.g. \"3.4\". Shown to the student and used to build every input name on the question, so it must be unique across the worksheet."
256
+ },
257
+ "kind": {
258
+ "enum": [
259
+ "choice",
260
+ "match",
261
+ "fill",
262
+ "tree",
263
+ "grid",
264
+ "judge",
265
+ "selfcheck"
266
+ ],
267
+ "description": "choice: one right option. match: items against a lettered bank. fill: text blanks with an optional word bank. tree: a DOM tree with blanks to name. grid: a row/column table of judgements. judge: a code snippet given a verdict plus the offending line. selfcheck: marked by the student against a revealed answer."
268
+ },
269
+ "prompt": {
270
+ "type": "string",
271
+ "description": "The question itself."
272
+ },
273
+ "code": {
274
+ "type": "string",
275
+ "description": "A snippet shown above the controls. Rendered verbatim, so say \"below\" in the prompt, not \"above\"."
276
+ },
277
+ "lang": {
278
+ "type": "string",
279
+ "description": "The snippet fence's language, e.g. python. Picks the Prism grammar the snippet is highlighted with; an unknown or missing one renders plain."
280
+ },
281
+ "figure": {
282
+ "type": "string",
283
+ "description": "An inline SVG diagram, written in the authored file as an ```svg fence. Styled by <practice-figure>'s class vocabulary — region, dashed, label, small, pin — never by hex values, so it follows the theme. Never a raster: an <img> is a broken image in an uploaded copy of the page."
284
+ },
285
+ "dragDrop": {
286
+ "type": "boolean",
287
+ "description": "match and fill only: make the bank draggable onto the answers. A pointer affordance layered over the select or input, never a replacement — the control stays the keyboard, touch and screen-reader path."
288
+ },
289
+ "dragHint": {
290
+ "type": "string",
291
+ "description": "The line telling students they may drag or use the control. Say both."
292
+ },
293
+ "why": {
294
+ "type": "string",
295
+ "description": "The reasoning, revealed once the question is checked. Explain why the right answer is right, not just what it is."
296
+ },
297
+ "sources": {
298
+ "type": "array",
299
+ "description": "Where the answer is taught. Rendered as the \"?\" beside the question.",
300
+ "items": {
301
+ "$ref": "#/$defs/source"
302
+ },
303
+ "minItems": 1
304
+ },
305
+ "options": {
306
+ "type": "array",
307
+ "description": "choice: the options, in display order.",
308
+ "items": {
309
+ "type": "string"
310
+ }
311
+ },
312
+ "answer": {
313
+ "type": "integer",
314
+ "description": "choice: the index into options. judge: the index into the section's legend."
315
+ },
316
+ "bank": {
317
+ "description": "match: the lettered options. fill: the word bank, as plain strings.",
318
+ "oneOf": [
319
+ {
320
+ "type": "array",
321
+ "items": {
322
+ "$ref": "#/$defs/bankEntry"
323
+ }
324
+ },
325
+ {
326
+ "type": "array",
327
+ "items": {
328
+ "type": "string"
329
+ }
330
+ }
331
+ ]
332
+ },
333
+ "items": {
334
+ "type": "array",
335
+ "description": "match: the things to be matched, each with the bank letter that answers it.",
336
+ "items": {
337
+ "type": "object",
338
+ "required": [
339
+ "text",
340
+ "answer"
341
+ ],
342
+ "properties": {
343
+ "text": {
344
+ "type": "string"
345
+ },
346
+ "answer": {
347
+ "type": "string",
348
+ "description": "The correct bank letter."
349
+ },
350
+ "source": {
351
+ "$ref": "#/$defs/source"
352
+ }
353
+ }
354
+ }
355
+ },
356
+ "blanks": {
357
+ "type": "array",
358
+ "description": "fill and tree: the boxes to fill.",
359
+ "items": {
360
+ "$ref": "#/$defs/blank"
361
+ }
362
+ },
363
+ "nodes": {
364
+ "type": "array",
365
+ "description": "tree: the tree, in reading order. A node is either a given label or a blank referring to blanks[] by index.",
366
+ "items": {
367
+ "type": "object",
368
+ "required": [
369
+ "depth"
370
+ ],
371
+ "properties": {
372
+ "depth": {
373
+ "type": "integer",
374
+ "description": "Indent level; 0 is the root."
375
+ },
376
+ "label": {
377
+ "type": "string",
378
+ "description": "A node already filled in. Omit for a blank."
379
+ },
380
+ "blank": {
381
+ "type": "integer",
382
+ "description": "Index into blanks[]. Omit for a filled node."
383
+ }
384
+ }
385
+ }
386
+ },
387
+ "rowHeader": {
388
+ "type": "string",
389
+ "description": "grid: the heading over the rows, e.g. Behavior. The table's first header cell."
390
+ },
391
+ "columns": {
392
+ "type": "array",
393
+ "description": "grid: the column headings, e.g. Works / Doesn't work.",
394
+ "items": {
395
+ "type": "string"
396
+ }
397
+ },
398
+ "rows": {
399
+ "type": "array",
400
+ "description": "grid: one behavior per row.",
401
+ "items": {
402
+ "type": "object",
403
+ "required": [
404
+ "text",
405
+ "answer"
406
+ ],
407
+ "properties": {
408
+ "text": {
409
+ "type": "string"
410
+ },
411
+ "answer": {
412
+ "type": "integer",
413
+ "description": "Index of the correct column."
414
+ }
415
+ }
416
+ }
417
+ },
418
+ "lines": {
419
+ "type": "array",
420
+ "description": "judge: the snippet, one array entry per line. Each becomes a selectable line.",
421
+ "items": {
422
+ "type": "string"
423
+ }
424
+ },
425
+ "lineAnswers": {
426
+ "type": "array",
427
+ "description": "judge: indexes of the lines that cause the problem. An empty array means the snippet is fine, and \"no line\" becomes the right pick.",
428
+ "items": {
429
+ "type": "integer"
430
+ }
431
+ },
432
+ "reveal": {
433
+ "type": "array",
434
+ "description": "selfcheck: the model answer, shown when the student asks for it.",
435
+ "items": {
436
+ "type": "string"
437
+ }
438
+ },
439
+ "checkYourself": {
440
+ "type": "array",
441
+ "description": "selfcheck: the specific things to compare against, as a checklist. Marking by eye needs criteria, not just the answer.",
442
+ "items": {
443
+ "type": "string"
444
+ }
445
+ }
446
+ }
447
+ }
448
+ }
449
+ }