explico 0.8.0 → 0.11.1

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 (230) hide show
  1. package/CHANGELOG.md +1257 -1
  2. package/README.md +60 -15
  3. package/dist/compiler/astro.d.ts +6 -1
  4. package/dist/compiler/cli.d.ts +46 -2
  5. package/dist/compiler/cli.js +70 -4
  6. package/dist/compiler/collections.d.ts +35 -2
  7. package/dist/compiler/collections.js +68 -5
  8. package/dist/compiler/course-config.d.ts +3 -194
  9. package/dist/compiler/course-config.js +78 -5
  10. package/dist/compiler/exports/standalone-html.d.ts +6 -1
  11. package/dist/compiler/knowledge-version.js +1 -1
  12. package/dist/compiler/lesson-derivation.d.ts +27 -10
  13. package/dist/compiler/lesson-derivation.js +23 -8
  14. package/dist/compiler/logging.d.ts +4 -1
  15. package/dist/compiler/logging.js +4 -1
  16. package/dist/compiler/manifest.d.ts +204 -31
  17. package/dist/compiler/manifest.js +270 -55
  18. package/dist/compiler/resolution-report.d.ts +6 -1
  19. package/dist/course-config-Dsnri9Tk.d.ts +464 -0
  20. package/dist/reference/base-accents.d.mts +26 -0
  21. package/dist/reference/base-accents.mjs +31 -0
  22. package/dist/reference/base-roman-labels.d.mts +2 -2
  23. package/dist/reference/base-roman-labels.mjs +2 -2
  24. package/dist/reference/consistency.d.ts +14 -2
  25. package/dist/reference/consistency.js +108 -4
  26. package/dist/reference/delimiter-size.d.ts +3 -2
  27. package/dist/reference/diagrams-validate.d.ts +7 -2
  28. package/dist/reference/diagrams-validate.js +9 -1
  29. package/dist/reference/equations-validate.d.ts +8 -5
  30. package/dist/reference/equations-validate.js +1 -0
  31. package/dist/reference/equations.d.mts +60 -31
  32. package/dist/reference/equations.mjs +83 -43
  33. package/dist/reference/examples-validate.d.ts +31 -0
  34. package/dist/reference/examples-validate.js +48 -0
  35. package/dist/reference/figures-validate.d.ts +1 -1
  36. package/dist/reference/figures-validate.js +4 -1
  37. package/dist/reference/folds-validate.d.ts +33 -0
  38. package/dist/reference/folds-validate.js +32 -0
  39. package/dist/reference/gate-abbreviations.d.ts +3 -1
  40. package/dist/reference/gate-abbreviations.js +1 -0
  41. package/dist/reference/gate-course-rules.d.ts +32 -0
  42. package/dist/reference/gate-course-rules.js +85 -0
  43. package/dist/reference/gate-heading-length.d.ts +5 -2
  44. package/dist/reference/gate-heading-length.js +45 -21
  45. package/dist/reference/gate-heading-structure.d.ts +41 -0
  46. package/dist/reference/gate-heading-structure.js +113 -0
  47. package/dist/reference/gate-math-punctuation.d.ts +71 -0
  48. package/dist/reference/gate-math-punctuation.js +251 -0
  49. package/dist/reference/gate-math.d.ts +22 -6
  50. package/dist/reference/gate-math.js +42 -8
  51. package/dist/reference/gate-part-pages.d.ts +50 -0
  52. package/dist/reference/gate-part-pages.js +118 -0
  53. package/dist/reference/gate-prose-notation.d.ts +21 -11
  54. package/dist/reference/gate-prose-notation.js +25 -7
  55. package/dist/reference/katex-delimiters.mjs +20 -7
  56. package/dist/reference/keyed-float-validate.d.ts +27 -10
  57. package/dist/reference/keyed-float-validate.js +15 -1
  58. package/dist/reference/keyed-jsx-floats.d.mts +11 -5
  59. package/dist/reference/keyed-jsx-floats.mjs +73 -20
  60. package/dist/reference/knowledge-checks-validate.d.ts +1 -1
  61. package/dist/reference/knowledge-checks.d.mts +3 -1
  62. package/dist/reference/knowledge-checks.mjs +9 -4
  63. package/dist/reference/lab-math-scope.d.ts +1 -0
  64. package/dist/reference/lab-math-slot.d.ts +34 -0
  65. package/dist/reference/lab-math-slot.js +6 -0
  66. package/dist/reference/math-glyphs.d.mts +80 -4
  67. package/dist/reference/math-glyphs.mjs +572 -37
  68. package/dist/reference/page-notation.d.ts +6 -1
  69. package/dist/reference/raw-floats-validate.js +1 -1
  70. package/dist/reference/raw-floats.mjs +1 -1
  71. package/dist/reference/rehype-heading-anchors.d.mts +14 -0
  72. package/dist/reference/rehype-heading-anchors.mjs +116 -17
  73. package/dist/reference/rehype-table-header-labels.d.mts +6 -1
  74. package/dist/reference/rehype-table-header-labels.mjs +21 -3
  75. package/dist/reference/remark-asides.d.mts +3 -0
  76. package/dist/reference/remark-asides.mjs +180 -0
  77. package/dist/reference/remark-memo.d.mts +3 -1
  78. package/dist/reference/remark-memo.mjs +42 -11
  79. package/dist/reference/remark-notation.d.mts +60 -10
  80. package/dist/reference/remark-notation.mjs +387 -36
  81. package/dist/reference/render-lab-math.d.ts +4 -26
  82. package/dist/reference/render-lab-math.js +4 -4
  83. package/dist/reference/sections-validate.d.ts +27 -0
  84. package/dist/reference/sections-validate.js +41 -0
  85. package/dist/reference/sections.d.mts +97 -0
  86. package/dist/reference/sections.mjs +306 -0
  87. package/dist/reference/tables-validate.d.ts +1 -1
  88. package/dist/reference/types.d.ts +17 -1
  89. package/dist/reference/unit-words.d.ts +37 -0
  90. package/dist/reference/unit-words.js +170 -0
  91. package/dist/rules/catalog.d.ts +176 -0
  92. package/dist/rules/catalog.js +983 -0
  93. package/dist/rules/course-rules.d.ts +115 -0
  94. package/dist/rules/course-rules.js +292 -0
  95. package/dist/rules/course-rules.schema.json +138 -0
  96. package/dist/rules/in-effect.d.ts +53 -0
  97. package/dist/rules/in-effect.js +142 -0
  98. package/dist/rules/rules.schema.json +1072 -0
  99. package/dist/rules/settings.d.ts +3 -0
  100. package/dist/rules/settings.js +290 -0
  101. package/dist/rules/waivers.d.ts +53 -0
  102. package/dist/rules/waivers.js +132 -0
  103. package/dist/session/PreferenceStore.d.ts +5 -0
  104. package/dist/session/PreferenceStore.js +9 -0
  105. package/docs/VERSIONING.md +5 -3
  106. package/docs/authoring/README.md +232 -40
  107. package/docs/authoring/agents.md +55 -9
  108. package/docs/authoring/components.md +178 -22
  109. package/docs/authoring/migrating.md +1152 -2
  110. package/docs/authoring/notation.md +576 -322
  111. package/docs/authoring/prose.md +551 -0
  112. package/docs/authoring/retired.md +35 -0
  113. package/docs/authoring/structure-rules.md +422 -40
  114. package/docs/authoring/structure.md +445 -62
  115. package/docs/authoring/versioning.md +20 -28
  116. package/docs/authoring/visualizations.md +142 -20
  117. package/package.json +2 -2
  118. package/src/compiler/cli.ts +116 -6
  119. package/src/compiler/collections.ts +111 -7
  120. package/src/compiler/course-config.ts +273 -34
  121. package/src/compiler/knowledge-version.ts +1 -1
  122. package/src/compiler/lesson-derivation.ts +54 -15
  123. package/src/compiler/logging.ts +8 -2
  124. package/src/compiler/manifest.ts +573 -104
  125. package/src/components/BlockHeading.astro +113 -0
  126. package/src/components/CourseContents.astro +221 -0
  127. package/src/components/CurriculumMap.astro +5 -6
  128. package/src/components/FloatIndex.astro +200 -0
  129. package/src/components/HoverPanel.astro +431 -79
  130. package/src/components/PartBridge.astro +27 -0
  131. package/src/components/PartOverview.astro +401 -0
  132. package/src/components/PartScope.astro +27 -0
  133. package/src/components/abbreviation/AbbreviationLayer.astro +49 -51
  134. package/src/components/assessments/AssessmentRunner.tsx +8 -5
  135. package/src/components/assessments/AssessmentSet.astro +23 -26
  136. package/src/components/block-heading.ts +146 -0
  137. package/src/components/card-arrow.ts +243 -0
  138. package/src/components/card-drag.ts +631 -0
  139. package/src/components/card-jump.ts +45 -0
  140. package/src/components/card-manager.ts +1589 -0
  141. package/src/components/card-memory.ts +177 -0
  142. package/src/components/card-placement.ts +504 -0
  143. package/src/components/card-side.ts +336 -0
  144. package/src/components/card-travel.ts +197 -0
  145. package/src/components/citation/CitationLayer.astro +77 -76
  146. package/src/components/diagram/Diagram.astro +161 -316
  147. package/src/components/disclosure/course-disclosure.ts +24 -0
  148. package/src/components/disclosure/hover-preview.ts +122 -42
  149. package/src/components/disclosure/persisted-disclosure.ts +3 -3
  150. package/src/components/disclosure/print-as-shown.ts +252 -0
  151. package/src/components/examples/CompactExample.astro +3 -1
  152. package/src/components/examples/CompactExamples.astro +101 -94
  153. package/src/components/figure/Figure.astro +174 -274
  154. package/src/components/figure/FloatCaption.astro +87 -0
  155. package/src/components/figure/figure-state.ts +58 -0
  156. package/src/components/figure/figure-tools.ts +87 -0
  157. package/src/components/float-name.ts +101 -0
  158. package/src/components/fold/Fold.astro +125 -0
  159. package/src/components/fold/fold-id.ts +40 -0
  160. package/src/components/memo/Memo.astro +162 -231
  161. package/src/components/memo/ShortNote.astro +6 -6
  162. package/src/components/notation/NotationFormula.astro +5 -1
  163. package/src/components/notation/NotationGlossary.astro +3 -4
  164. package/src/components/notation/NotationLayer.astro +169 -162
  165. package/src/components/notation/NotationMath.astro +10 -1
  166. package/src/components/reference/FloatRefLayer.astro +485 -423
  167. package/src/components/starlight/AboutPanel.astro +5 -4
  168. package/src/components/starlight/CollapsibleSections.astro +207 -93
  169. package/src/components/starlight/DiagramEnhancer.astro +15 -138
  170. package/src/components/starlight/HeadingAnchorEnhancer.astro +193 -1
  171. package/src/components/starlight/KeyedFloatEnhancer.astro +100 -9
  172. package/src/components/starlight/LayoutHeader.astro +298 -19
  173. package/src/components/starlight/LayoutPageSidebar.astro +99 -12
  174. package/src/components/starlight/LayoutPageTitle.astro +120 -0
  175. package/src/components/starlight/LayoutSidebar.astro +229 -11
  176. package/src/components/starlight/LessonExportActions.astro +53 -72
  177. package/src/components/starlight/LessonFooter.astro +26 -4
  178. package/src/components/starlight/section-parts.ts +15 -2
  179. package/src/components/starlight/section-summary.ts +181 -0
  180. package/src/components/table/Table.astro +95 -76
  181. package/src/components/table/TableOverflowExpander.astro +65 -28
  182. package/src/content-config.ts +40 -4
  183. package/src/reference/base-accents.mjs +31 -0
  184. package/src/reference/base-roman-labels.mjs +2 -2
  185. package/src/reference/consistency.ts +176 -5
  186. package/src/reference/delimiter-size.ts +3 -2
  187. package/src/reference/diagrams-validate.ts +17 -1
  188. package/src/reference/equations-validate.ts +10 -5
  189. package/src/reference/equations.mjs +83 -43
  190. package/src/reference/examples-validate.ts +97 -0
  191. package/src/reference/figures-validate.ts +6 -1
  192. package/src/reference/folds-validate.ts +65 -0
  193. package/src/reference/gate-abbreviations.ts +1 -0
  194. package/src/reference/gate-course-rules.ts +134 -0
  195. package/src/reference/gate-heading-length.ts +66 -35
  196. package/src/reference/gate-heading-structure.ts +193 -0
  197. package/src/reference/gate-math-punctuation.ts +381 -0
  198. package/src/reference/gate-math.ts +69 -10
  199. package/src/reference/gate-part-pages.ts +217 -0
  200. package/src/reference/gate-prose-notation.ts +59 -12
  201. package/src/reference/katex-delimiters.mjs +20 -7
  202. package/src/reference/keyed-float-validate.ts +45 -11
  203. package/src/reference/keyed-jsx-floats.mjs +73 -20
  204. package/src/reference/knowledge-checks-validate.ts +1 -1
  205. package/src/reference/knowledge-checks.mjs +9 -4
  206. package/src/reference/lab-math-slot.ts +36 -0
  207. package/src/reference/math-glyphs.mjs +572 -37
  208. package/src/reference/raw-floats-validate.ts +1 -1
  209. package/src/reference/raw-floats.mjs +1 -1
  210. package/src/reference/rehype-heading-anchors.mjs +116 -17
  211. package/src/reference/rehype-table-header-labels.mjs +21 -3
  212. package/src/reference/remark-asides.mjs +180 -0
  213. package/src/reference/remark-memo.mjs +42 -11
  214. package/src/reference/remark-notation.mjs +387 -36
  215. package/src/reference/render-lab-math.ts +16 -31
  216. package/src/reference/sections-validate.ts +81 -0
  217. package/src/reference/sections.mjs +306 -0
  218. package/src/reference/tables-validate.ts +2 -1
  219. package/src/reference/types.ts +17 -0
  220. package/src/reference/unit-words.ts +233 -0
  221. package/src/rules/catalog.ts +1298 -0
  222. package/src/rules/course-rules.ts +456 -0
  223. package/src/rules/in-effect.ts +235 -0
  224. package/src/rules/settings.ts +448 -0
  225. package/src/rules/waivers.ts +249 -0
  226. package/src/session/PreferenceStore.ts +15 -0
  227. package/src/styles/global.css +1467 -163
  228. package/src/styles/surfaces.css +182 -0
  229. package/src/components/hover-panel.ts +0 -339
  230. package/src/components/popup-stack.ts +0 -345
@@ -65,7 +65,7 @@ still applies is N9/N14 against the *visible* text, as above.
65
65
  | Component | Import | What it's for | Doc |
66
66
  | --- | --- | --- | --- |
67
67
  | `<ShortNote id="…" title="…" description="…">` | `explico/components/memo/ShortNote.astro` | An inline, click-to-expand aside that replaces its own trigger text in place — "the smaller, genuinely inline interaction." No number, no cross-page reference. | [structure.md](structure.md#detailed-memos-and-inline-short-notes) |
68
- | `<Memo id="…" title="…" description="…">` | `explico/components/memo/Memo.astro` | A collapsible, independently-numbered card for optional depth (derivation, proof, edge case) that would otherwise bloat the main argument. Cited with `[[memo-id]]`. | [structure.md](structure.md#detailed-memos-and-inline-short-notes) |
68
+ | `<Memo id="…" caption="…" short="…">` | `explico/components/memo/Memo.astro` | A collapsible, lettered side-note for optional depth (derivation, proof, edge case) that would otherwise bloat the main argument. Cited with `[[memo-id]]`, which prints its superscript letter. | [structure.md](structure.md#detailed-memos-and-inline-short-notes) |
69
69
 
70
70
  Both differ from a bare `title` tooltip in the same way: they hold real,
71
71
  possibly multi-paragraph Markdown content (including equations, tables,
@@ -73,35 +73,141 @@ figures), are addressable (`id`, a permalink), and are meant to be found
73
73
  again — a `title` tooltip is disposable and invisible outside a hover/focus
74
74
  event.
75
75
 
76
+ ### Folding content away: `<Fold>`
77
+
78
+ | Component | Import | What it's for | Doc |
79
+ | --- | --- | --- | --- |
80
+ | `<Fold label="…" defaultOpen rememberState>` | `explico/components/fold/Fold.astro` | Lets a reader fold away a stretch of the lesson — most often one figure, diagram or table — where it stands. No heading, number or marker. | [structure.md](structure.md#collapsing-two-mechanisms) |
81
+
82
+ ```mdx
83
+ <Fold>
84
+ <Diagram id="launch-angle-dependency" … />
85
+ </Fold>
86
+ ```
87
+
88
+ A fold has a bar with the section chevron and, while folded, the "Hidden
89
+ here: 1 diagram" line; the reader's choice is remembered per page, a deep
90
+ link or find-in-page opens it, and it prints as shown. The bar, set at the
91
+ size of the text it folds, is the `label`; without one it names the numbered
92
+ floats inside by number and short caption — "Diagram 2.2.1 Inputs to the
93
+ launch-angle search" — and is then their name: their caption lines drop the
94
+ bold short-caption title that would repeat it. A fold with neither fails the
95
+ build (`fold-unnamed`). It starts folded unless
96
+ `defaultOpen`, or the course's `disclosure.folds`, says otherwise.
97
+
98
+ A float never folds by itself — a figure or a diagram is always its picture
99
+ and its caption line — so a fold is how one becomes collapsible outside a
100
+ collapsible section. Choose it over a `<Memo>` when the content belongs where
101
+ it stands and needs no other name: a fold is not an aside (no frame, no
102
+ tint: the plain tier, like the float it holds), puts no letter in the text,
103
+ has no `[[…]]` key, is not in "On this page" and takes no outline number.
104
+ The floats inside keep their numbers and their `[[…]]` references; a
105
+ reference to one previews it in a card and marks the fold's bar.
106
+
76
107
  ## Numbered floats
77
108
 
78
- Each of these gets a `‹part›.‹n›` number (its own counter, independent of the
79
- others — see [structure.md § Numbering](structure.md#numbering)), a stable
80
- `#anchor`, and same-page/cross-page reference syntax `[[prefix-id]]` /
81
- `[[lesson/slug#prefix-id]]`.
109
+ Each of these gets a `‹part›.‹chapter›.‹n›` number (its own counter,
110
+ independent of the others — see [structure.md § Numbering](structure.md#numbering)),
111
+ a stable `#anchor` named after its `id`, and same-page/cross-page reference
112
+ syntax `[[prefix-id]]` / `[[lesson/slug#prefix-id]]`. A section is citable the
113
+ same way, by its heading's anchor: `[[sec-two-ways-to-name-the-same-point]]`
114
+ prints `§ 1.1.2` ([structure.md § Section numbers](structure.md#section-numbers)).
82
115
 
83
116
  | Component | Import | Prefix | Doc |
84
117
  | --- | --- | --- | --- |
85
- | `<Table id="…" caption="…">` | `explico/components/table/Table.astro` | `tab-` | [structure.md](structure.md#numbering), [V rules](visualizations.md) |
86
- | `<Figure id="…" title="…" caption="…" previewable>` | `explico/components/figure/Figure.astro` | `fig-` | [structure.md](structure.md#numbering), [V2](visualizations.md#v2)/[V3](visualizations.md#v3) |
87
- | `<Diagram id="…" label="…" nodes={…} edges={…}>` | `explico/components/diagram/Diagram.astro` | `dia-` | [V1](visualizations.md#v1) |
88
- | A display equation with `\label{eq:key}` | `remark-math` (built in) | `eq-` | [N5](notation.md#n5), [structure.md](structure.md#numbering) |
89
-
90
- Two naming traps worth flagging for an AI author:
91
-
92
- - **`<Figure title="…">` is a visible short label in the collapsible title
93
- bar, not the HTML `title` attribute's hover tooltip.** It always renders on
94
- the page; it is a different feature from the [native tooltip](#inline-zero-registration)
95
- above even though it reuses the same prop name. Keep it short — the whole
96
- caption sentence does not belong here; see [S1](structure-rules.md#s1). An
97
- omitted `title` silently falls back to `caption` in full, which is exactly
98
- the failure S1 exists to catch.
118
+ | `<Table id="…" caption="…" short="…">` | `explico/components/table/Table.astro` | `tab-` | [structure.md](structure.md#numbering), [V rules](visualizations.md) |
119
+ | `<Figure id="…" caption="…" short="…" previewable defaultOpen rememberState>`, with an optional `slot="tools"` | `explico/components/figure/Figure.astro` | `fig-` | [structure.md](structure.md#numbering), [V2](visualizations.md#v2)/[V3](visualizations.md#v3) |
120
+ | `<Diagram id="…" caption="…" short="…" nodes={…} edges={…}>` | `explico/components/diagram/Diagram.astro` | `dia-` | [V1](visualizations.md#v1) |
121
+ | A display equation with `\label{eq:key}` and `\caption{…}` | `remark-math` (built in) | `eq-` | [N5](notation.md#n5), [structure.md](structure.md#numbering) |
122
+
123
+ ### The caption pair
124
+
125
+ Every float is named the same way, LaTeX's `\caption[short]{long}`: a long
126
+ **`caption`** and an optional **`short`** caption. Nothing else names a float
127
+ — no `title`, no `label`, no `summary` — and a figure or a diagram has no
128
+ title bar: its number sits in its caption line.
129
+
130
+ | Float | Long caption — where it shows | Short caption — where it shows |
131
+ | --- | --- | --- |
132
+ | `<Figure>` | `caption`: below the figure, after `Figure 2.2.1` and its chain icon | `short`: opens the caption line as its bold title, and heads the `[[fig-…]]` preview card |
133
+ | `<Diagram>` | `caption`: below the graph, the same caption line as a figure; its right end holds a widen button ↔ while the graph is wider than the column | `short`: opens the caption line as its bold title, and heads the `[[dia-…]]` preview card |
134
+ | `<Table>` | `caption`: above the table (the LaTeX table convention), after `Table 2.2.1`; its right end holds the fold button (and a widen button ↔ when the table is wider than the column); stays with the header row when the table is folded | `short`: opens the caption line as its bold title, and heads the `[[tab-…]]` preview card |
135
+ | Display equation | none — an equation takes a short caption only | `\caption{…}` inside the `$$…$$`, stripped before KaTeX like `\label{}`: heads the `[[eq-…]]` preview card and names the copy action ("Copy LaTeX — Range formula") |
136
+ | `<Memo>` | `caption` (required): the memo's bar, and the head of its marker's preview | `short`: the marker's tooltip |
137
+ | `<CompactExamples>` | none | `short` (required, with `id`): the set's topic — its heading, after the engine's "Example" badge and number |
138
+
139
+ `caption` is required wherever it exists; `short` is optional everywhere but
140
+ on a `<CompactExamples>`, whose heading it is, and is what
141
+ [rule S1](structure-rules.md#s1) measures — the long caption is never capped.
142
+
143
+ A figure's, a table's or a diagram's `short` is its name wherever the page
144
+ names it (docs/plans/figures-and-short-captions.md, decision 9): the bold
145
+ title that opens its caption line — "**Sampled flight data.** Position, …",
146
+ with a period added unless it ends in punctuation of its own — a folded
147
+ section's "Hidden here: **Figure 2.1.1** Projectile trajectory explorer, 2
148
+ paragraphs", a `<Fold>`'s bar, and a copied link, which says "Link copied ·
149
+ Figure 2.1.1 · Projectile trajectory explorer" and pastes into a document as
150
+ a link reading "Figure 2.1.1, Projectile trajectory explorer". A float
151
+ without one is named by its number alone, and counted, not named, in a
152
+ folded section's line. So give each figure, table and diagram a `short`
153
+ that names it, and write the long caption to go on from that name instead
154
+ of restating it ([rule S9](structure-rules.md#s9)). A memo's or an
155
+ equation's `short` stays optional: its caption already names it where it
156
+ is shown.
157
+
158
+ - **A figure or a diagram never hides by itself.** It is laid out as LaTeX
159
+ lays a figure out, in every state: its picture, then its caption line —
160
+ number, chain icon, caption. To let a reader fold one away, wrap it in a
161
+ [`<Fold>`](#folding-content-away-fold) or put it in a collapsible (or
162
+ `[card]`) section ([structure.md § Collapsing](structure.md#collapsing-two-mechanisms)).
163
+ - **A lab's tools follow the caption, and only they fold.** A `<Figure>`'s
164
+ default slot is its picture; a `tools` slot (`<Fragment slot="tools">…`,
165
+ or an island with `slot="tools"`) renders after the caption line in a tray
166
+ of its own. The fold button ⌃ / ⌄ ends the caption line; folded, the tools
167
+ leave a "Hidden here: 2 sliders, 1 equation" line that unfolds them. On a
168
+ `<Figure>`, `defaultOpen` (default: the course's `disclosure.figures`) and
169
+ `rememberState` (default `true`) are about the tools; a figure without
170
+ them has no button and no tray, and a `<Diagram>` has neither prop. The
171
+ caption line ends with a live clause a lab writes with `setFigureState`
172
+ ([visualizations.md § V3](visualizations.md#v3)).
173
+ - **A lab has no title or caption of its own.** The `<Figure>` around it
174
+ names the whole ([visualizations.md § Labs](visualizations.md#v3)).
99
175
  - **A raw Markdown pipe table or a raw `<table>`, or a `<Diagram>` with no
100
176
  `id`,** renders fine but never enters keyed-float validation — no number,
101
177
  no `[[…]]` target. Wrap it (`<Table>`/`<Figure>`) or give the diagram an
102
178
  `id` if it needs to be referenced. See [structure.md § Raw and unwrapped
103
179
  floats](structure.md#raw-and-unwrapped-floats).
104
180
 
181
+ _Enforcement._ A `<Figure title>`, a `<Diagram label>` (or `title`,
182
+ `defaultOpen`, `rememberState`), a `<Memo title>` / `description` and a
183
+ `<CompactExamples summary>` fail the build with the edit to make: `fig-removed-prop` / `dia-removed-prop` /
184
+ `ex-removed-prop` in `pnpm validate:content` (the keyed-floats invariant),
185
+ and the component itself when it renders. A `<CompactExamples>` with no `id`
186
+ or no `short` fails the same way (`ex-missing-prop`). An equation's `\caption{}` that is inline, repeated
187
+ or empty fails the page build.
188
+
189
+ ### The "Figures and tables" page
190
+
191
+ `explico/components/FloatIndex.astro` lists every numbered figure, table and
192
+ diagram that has an `id` — LaTeX's `\listoffigures` and `\listoftables` in
193
+ one — by part and chapter, each entry its number linked to the float and its
194
+ short caption; a float without one is listed by its long caption, muted, or
195
+ by its number alone when its captions live in a wrapper component. Put it on
196
+ a top-level page named `figures-and-tables.mdx`, and the sidebar's Reference
197
+ group lists the page beside the curriculum map and the glossary:
198
+
199
+ ```mdx
200
+ ---
201
+ title: Figures and tables
202
+ description: Every numbered figure, table and diagram of the course.
203
+ editorialStatus: draft
204
+ ---
205
+
206
+ import FloatIndex from 'explico/components/FloatIndex.astro';
207
+
208
+ <FloatIndex />
209
+ ```
210
+
105
211
  ## Reference systems
106
212
 
107
213
  These bind a term to a definition that a reader can hover *and* look up
@@ -111,15 +217,59 @@ elsewhere — the machinery a bare `title` tooltip deliberately skips.
111
217
  | --- | --- | --- | --- |
112
218
  | `[[key]]` in prose, before first math use | `content/notation/*.md` entry | One-meaning-per-glyph hover card everywhere `$key$`-bound math appears on the page | [N4](notation.md#n4) |
113
219
  | `\explain{key}{latex}` inside `$…$` | Same notation entry | Escape hatch for a compound/colliding symbol only, not the default bind | [N4](notation.md#n4) |
114
- | A bare all-caps/dotted term (`OLS`, `w.r.t.`) in prose | `content/abbreviations/*.md`, or `course.config.ts` `abbreviations.allow` | Hover/click card on first occurrence, linked to the glossary page | [N14](notation.md#n14) |
220
+ | A bare all-caps/dotted term (`OLS`, `w.r.t.`) in prose | `content/abbreviations/*.md`, or `course.settings.json` `rules.N14.allow` | Hover/click card on first occurrence, linked to the glossary page | [N14](notation.md#n14) |
115
221
  | `[@source-id]` or `[@source-id; §1.2]` | `content/sources/*.json` | Numbered `[n]` superscript linking to a References section, with a hover/pin panel | `src/reference/remark-citation.mjs` |
222
+ | `[[sec-slug]]` or `[[lesson/slug#sec-slug]]` | A top-level heading; its anchor is the slug | `§ 1.1.2` linking to the section, with a hover card of its title and first paragraph | [structure.md § Section numbers](structure.md#section-numbers) |
223
+ | `[[ex-id]]` or `[[lesson/slug#ex-id]]` | A `<CompactExamples id>` | `Example 1.1.1` linking to the set, with a hover card of its title and its examples' names | [§ Knowledge checks and worked examples](#knowledge-checks-and-worked-examples) |
224
+ | `[[check-id]]` or `[[lesson/slug#check-id]]` | An assessment id in the lesson's `.checks.yml` | `Knowledge check 1.1.1` linking to the check, with a hover card of its title and its number of questions | [structure.md § Knowledge checks](structure.md#knowledge-checks) |
116
225
 
117
226
  ## Knowledge checks and worked examples
118
227
 
119
228
  | Component | Import | Notes | Doc |
120
229
  | --- | --- | --- | --- |
121
- | `<AssessmentSet />` | `explico/components/assessments/AssessmentSet.astro` | Renders every check listed in the lesson's colocated `.checks.yml`; do not add a separate heading for it | [structure.md § Knowledge checks](structure.md#knowledge-checks) |
122
- | `<CompactExample>` / `<CompactExamples>` | `explico/components/examples/CompactExample.astro` | Worked-example cards; a `<Diagram>` nested inside one is invisible to diagram numbering (see the raw/unwrapped note above) | [structure.md](structure.md#raw-and-unwrapped-floats) |
230
+ | `<AssessmentSet />` | `explico/components/assessments/AssessmentSet.astro` | Renders every check listed in the lesson's colocated `.checks.yml`, each under its own heading; do not add a heading for it | [structure.md § Knowledge checks](structure.md#knowledge-checks) |
231
+ | `<CompactExamples id short>` + `<CompactExample label>` | `explico/components/examples/CompactExamples.astro`, `…/CompactExample.astro` | A numbered set of worked examples, one tab each; do not add a heading for it. A `<Diagram>` nested inside one is invisible to diagram numbering (see the raw/unwrapped note above) | [structure.md § Worked examples](structure.md#worked-examples) |
232
+
233
+ **You write the topic; the engine writes the kind.** A knowledge check and a
234
+ worked-example set each draw their own `<h2>`: the kind's icon, then your
235
+ title, with a small label naming the kind and its number — "KNOWLEDGE CHECK
236
+ 1.1.1", "EXAMPLE 1.1.1" — in the card's top-right corner. The check's title
237
+ is the `title` of its assessment file, the set's is its `short`. Write the
238
+ topic alone ("Position and coordinates"), never "Knowledge check: …" or
239
+ "Worked examples".
240
+
241
+ ```mdx
242
+ <CompactExamples id="coordinate-conversions" short="Calculation examples between coordinate systems">
243
+ <CompactExample label="Cartesian to polar">
244
+ …
245
+ </CompactExample>
246
+ <CompactExample label="Polar to Cartesian">
247
+ …
248
+ </CompactExample>
249
+ </CompactExamples>
250
+ ```
251
+
252
+ renders as **⊞ Calculation examples between coordinate systems** under an
253
+ "EXAMPLE 1.1.1" corner label, with the examples as tabs below it. The label
254
+ sits outside the text flow, so the title keeps the whole line.
255
+
256
+ - **Numbered like a float, shown like a section.** A set is `Example
257
+ ‹part›.‹chapter›.‹n›` and a check `Knowledge check ‹part›.‹chapter›.‹n›`, each
258
+ counting on its own (`numbering.floats`). The numbers follow the section
259
+ numbers' rules, since both blocks are sections of the page: shown on a wide
260
+ screen, in print and on a folded bar, hidden on a narrow screen, and never
261
+ when `numbering.sections.show` is off — then `[[ex-…]]` and `[[check-…]]`
262
+ print the title instead of the number.
263
+ - **Sections of the outline.** Each heading is a `##`: "On this page" lists
264
+ it by its title with the badge's icon, it ends the section before it, it
265
+ folds with the section chevron (`disclosure.knowledgeChecks`,
266
+ `disclosure.workedExamples`), its chain icon copies its link, and rules
267
+ [S6](structure-rules.md#s6) and [S7](structure-rules.md#s7) read it as a
268
+ `##` — place a set where a `##` section could start, and write no heading
269
+ directly above it.
270
+ - **The label's form is a course setting**, `blockLabels`: `icon-word` (the
271
+ default) or `icon`, which leaves the corner label to the number and keeps
272
+ the word for a screen reader.
123
273
 
124
274
  ## Choosing between the "explain a term" options
125
275
 
@@ -136,3 +286,9 @@ From lightest to heaviest — pick the first one that's actually enough:
136
286
  4. **`<Memo>`** — numbered, permalinked, holds real sub-content (proofs,
137
287
  figures, tables). Use when the aside is long enough to be its own small
138
288
  section.
289
+
290
+ Industry jargon — an informal expression with no standard definition — is
291
+ not explained by a tooltip or an abbreviation card alone. It gets a
292
+ `<ShortNote>` or `<Memo>` labelled "Industry jargon" that states its
293
+ approximate meaning, context of use, and standardization; see
294
+ [P6](prose.md#p6).