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.
- package/CHANGELOG.md +1257 -1
- package/README.md +60 -15
- package/dist/compiler/astro.d.ts +6 -1
- package/dist/compiler/cli.d.ts +46 -2
- package/dist/compiler/cli.js +70 -4
- package/dist/compiler/collections.d.ts +35 -2
- package/dist/compiler/collections.js +68 -5
- package/dist/compiler/course-config.d.ts +3 -194
- package/dist/compiler/course-config.js +78 -5
- package/dist/compiler/exports/standalone-html.d.ts +6 -1
- package/dist/compiler/knowledge-version.js +1 -1
- package/dist/compiler/lesson-derivation.d.ts +27 -10
- package/dist/compiler/lesson-derivation.js +23 -8
- package/dist/compiler/logging.d.ts +4 -1
- package/dist/compiler/logging.js +4 -1
- package/dist/compiler/manifest.d.ts +204 -31
- package/dist/compiler/manifest.js +270 -55
- package/dist/compiler/resolution-report.d.ts +6 -1
- package/dist/course-config-Dsnri9Tk.d.ts +464 -0
- package/dist/reference/base-accents.d.mts +26 -0
- package/dist/reference/base-accents.mjs +31 -0
- package/dist/reference/base-roman-labels.d.mts +2 -2
- package/dist/reference/base-roman-labels.mjs +2 -2
- package/dist/reference/consistency.d.ts +14 -2
- package/dist/reference/consistency.js +108 -4
- package/dist/reference/delimiter-size.d.ts +3 -2
- package/dist/reference/diagrams-validate.d.ts +7 -2
- package/dist/reference/diagrams-validate.js +9 -1
- package/dist/reference/equations-validate.d.ts +8 -5
- package/dist/reference/equations-validate.js +1 -0
- package/dist/reference/equations.d.mts +60 -31
- package/dist/reference/equations.mjs +83 -43
- package/dist/reference/examples-validate.d.ts +31 -0
- package/dist/reference/examples-validate.js +48 -0
- package/dist/reference/figures-validate.d.ts +1 -1
- package/dist/reference/figures-validate.js +4 -1
- package/dist/reference/folds-validate.d.ts +33 -0
- package/dist/reference/folds-validate.js +32 -0
- package/dist/reference/gate-abbreviations.d.ts +3 -1
- package/dist/reference/gate-abbreviations.js +1 -0
- package/dist/reference/gate-course-rules.d.ts +32 -0
- package/dist/reference/gate-course-rules.js +85 -0
- package/dist/reference/gate-heading-length.d.ts +5 -2
- package/dist/reference/gate-heading-length.js +45 -21
- package/dist/reference/gate-heading-structure.d.ts +41 -0
- package/dist/reference/gate-heading-structure.js +113 -0
- package/dist/reference/gate-math-punctuation.d.ts +71 -0
- package/dist/reference/gate-math-punctuation.js +251 -0
- package/dist/reference/gate-math.d.ts +22 -6
- package/dist/reference/gate-math.js +42 -8
- package/dist/reference/gate-part-pages.d.ts +50 -0
- package/dist/reference/gate-part-pages.js +118 -0
- package/dist/reference/gate-prose-notation.d.ts +21 -11
- package/dist/reference/gate-prose-notation.js +25 -7
- package/dist/reference/katex-delimiters.mjs +20 -7
- package/dist/reference/keyed-float-validate.d.ts +27 -10
- package/dist/reference/keyed-float-validate.js +15 -1
- package/dist/reference/keyed-jsx-floats.d.mts +11 -5
- package/dist/reference/keyed-jsx-floats.mjs +73 -20
- package/dist/reference/knowledge-checks-validate.d.ts +1 -1
- package/dist/reference/knowledge-checks.d.mts +3 -1
- package/dist/reference/knowledge-checks.mjs +9 -4
- package/dist/reference/lab-math-scope.d.ts +1 -0
- package/dist/reference/lab-math-slot.d.ts +34 -0
- package/dist/reference/lab-math-slot.js +6 -0
- package/dist/reference/math-glyphs.d.mts +80 -4
- package/dist/reference/math-glyphs.mjs +572 -37
- package/dist/reference/page-notation.d.ts +6 -1
- package/dist/reference/raw-floats-validate.js +1 -1
- package/dist/reference/raw-floats.mjs +1 -1
- package/dist/reference/rehype-heading-anchors.d.mts +14 -0
- package/dist/reference/rehype-heading-anchors.mjs +116 -17
- package/dist/reference/rehype-table-header-labels.d.mts +6 -1
- package/dist/reference/rehype-table-header-labels.mjs +21 -3
- package/dist/reference/remark-asides.d.mts +3 -0
- package/dist/reference/remark-asides.mjs +180 -0
- package/dist/reference/remark-memo.d.mts +3 -1
- package/dist/reference/remark-memo.mjs +42 -11
- package/dist/reference/remark-notation.d.mts +60 -10
- package/dist/reference/remark-notation.mjs +387 -36
- package/dist/reference/render-lab-math.d.ts +4 -26
- package/dist/reference/render-lab-math.js +4 -4
- package/dist/reference/sections-validate.d.ts +27 -0
- package/dist/reference/sections-validate.js +41 -0
- package/dist/reference/sections.d.mts +97 -0
- package/dist/reference/sections.mjs +306 -0
- package/dist/reference/tables-validate.d.ts +1 -1
- package/dist/reference/types.d.ts +17 -1
- package/dist/reference/unit-words.d.ts +37 -0
- package/dist/reference/unit-words.js +170 -0
- package/dist/rules/catalog.d.ts +176 -0
- package/dist/rules/catalog.js +983 -0
- package/dist/rules/course-rules.d.ts +115 -0
- package/dist/rules/course-rules.js +292 -0
- package/dist/rules/course-rules.schema.json +138 -0
- package/dist/rules/in-effect.d.ts +53 -0
- package/dist/rules/in-effect.js +142 -0
- package/dist/rules/rules.schema.json +1072 -0
- package/dist/rules/settings.d.ts +3 -0
- package/dist/rules/settings.js +290 -0
- package/dist/rules/waivers.d.ts +53 -0
- package/dist/rules/waivers.js +132 -0
- package/dist/session/PreferenceStore.d.ts +5 -0
- package/dist/session/PreferenceStore.js +9 -0
- package/docs/VERSIONING.md +5 -3
- package/docs/authoring/README.md +232 -40
- package/docs/authoring/agents.md +55 -9
- package/docs/authoring/components.md +178 -22
- package/docs/authoring/migrating.md +1152 -2
- package/docs/authoring/notation.md +576 -322
- package/docs/authoring/prose.md +551 -0
- package/docs/authoring/retired.md +35 -0
- package/docs/authoring/structure-rules.md +422 -40
- package/docs/authoring/structure.md +445 -62
- package/docs/authoring/versioning.md +20 -28
- package/docs/authoring/visualizations.md +142 -20
- package/package.json +2 -2
- package/src/compiler/cli.ts +116 -6
- package/src/compiler/collections.ts +111 -7
- package/src/compiler/course-config.ts +273 -34
- package/src/compiler/knowledge-version.ts +1 -1
- package/src/compiler/lesson-derivation.ts +54 -15
- package/src/compiler/logging.ts +8 -2
- package/src/compiler/manifest.ts +573 -104
- package/src/components/BlockHeading.astro +113 -0
- package/src/components/CourseContents.astro +221 -0
- package/src/components/CurriculumMap.astro +5 -6
- package/src/components/FloatIndex.astro +200 -0
- package/src/components/HoverPanel.astro +431 -79
- package/src/components/PartBridge.astro +27 -0
- package/src/components/PartOverview.astro +401 -0
- package/src/components/PartScope.astro +27 -0
- package/src/components/abbreviation/AbbreviationLayer.astro +49 -51
- package/src/components/assessments/AssessmentRunner.tsx +8 -5
- package/src/components/assessments/AssessmentSet.astro +23 -26
- package/src/components/block-heading.ts +146 -0
- package/src/components/card-arrow.ts +243 -0
- package/src/components/card-drag.ts +631 -0
- package/src/components/card-jump.ts +45 -0
- package/src/components/card-manager.ts +1589 -0
- package/src/components/card-memory.ts +177 -0
- package/src/components/card-placement.ts +504 -0
- package/src/components/card-side.ts +336 -0
- package/src/components/card-travel.ts +197 -0
- package/src/components/citation/CitationLayer.astro +77 -76
- package/src/components/diagram/Diagram.astro +161 -316
- package/src/components/disclosure/course-disclosure.ts +24 -0
- package/src/components/disclosure/hover-preview.ts +122 -42
- package/src/components/disclosure/persisted-disclosure.ts +3 -3
- package/src/components/disclosure/print-as-shown.ts +252 -0
- package/src/components/examples/CompactExample.astro +3 -1
- package/src/components/examples/CompactExamples.astro +101 -94
- package/src/components/figure/Figure.astro +174 -274
- package/src/components/figure/FloatCaption.astro +87 -0
- package/src/components/figure/figure-state.ts +58 -0
- package/src/components/figure/figure-tools.ts +87 -0
- package/src/components/float-name.ts +101 -0
- package/src/components/fold/Fold.astro +125 -0
- package/src/components/fold/fold-id.ts +40 -0
- package/src/components/memo/Memo.astro +162 -231
- package/src/components/memo/ShortNote.astro +6 -6
- package/src/components/notation/NotationFormula.astro +5 -1
- package/src/components/notation/NotationGlossary.astro +3 -4
- package/src/components/notation/NotationLayer.astro +169 -162
- package/src/components/notation/NotationMath.astro +10 -1
- package/src/components/reference/FloatRefLayer.astro +485 -423
- package/src/components/starlight/AboutPanel.astro +5 -4
- package/src/components/starlight/CollapsibleSections.astro +207 -93
- package/src/components/starlight/DiagramEnhancer.astro +15 -138
- package/src/components/starlight/HeadingAnchorEnhancer.astro +193 -1
- package/src/components/starlight/KeyedFloatEnhancer.astro +100 -9
- package/src/components/starlight/LayoutHeader.astro +298 -19
- package/src/components/starlight/LayoutPageSidebar.astro +99 -12
- package/src/components/starlight/LayoutPageTitle.astro +120 -0
- package/src/components/starlight/LayoutSidebar.astro +229 -11
- package/src/components/starlight/LessonExportActions.astro +53 -72
- package/src/components/starlight/LessonFooter.astro +26 -4
- package/src/components/starlight/section-parts.ts +15 -2
- package/src/components/starlight/section-summary.ts +181 -0
- package/src/components/table/Table.astro +95 -76
- package/src/components/table/TableOverflowExpander.astro +65 -28
- package/src/content-config.ts +40 -4
- package/src/reference/base-accents.mjs +31 -0
- package/src/reference/base-roman-labels.mjs +2 -2
- package/src/reference/consistency.ts +176 -5
- package/src/reference/delimiter-size.ts +3 -2
- package/src/reference/diagrams-validate.ts +17 -1
- package/src/reference/equations-validate.ts +10 -5
- package/src/reference/equations.mjs +83 -43
- package/src/reference/examples-validate.ts +97 -0
- package/src/reference/figures-validate.ts +6 -1
- package/src/reference/folds-validate.ts +65 -0
- package/src/reference/gate-abbreviations.ts +1 -0
- package/src/reference/gate-course-rules.ts +134 -0
- package/src/reference/gate-heading-length.ts +66 -35
- package/src/reference/gate-heading-structure.ts +193 -0
- package/src/reference/gate-math-punctuation.ts +381 -0
- package/src/reference/gate-math.ts +69 -10
- package/src/reference/gate-part-pages.ts +217 -0
- package/src/reference/gate-prose-notation.ts +59 -12
- package/src/reference/katex-delimiters.mjs +20 -7
- package/src/reference/keyed-float-validate.ts +45 -11
- package/src/reference/keyed-jsx-floats.mjs +73 -20
- package/src/reference/knowledge-checks-validate.ts +1 -1
- package/src/reference/knowledge-checks.mjs +9 -4
- package/src/reference/lab-math-slot.ts +36 -0
- package/src/reference/math-glyphs.mjs +572 -37
- package/src/reference/raw-floats-validate.ts +1 -1
- package/src/reference/raw-floats.mjs +1 -1
- package/src/reference/rehype-heading-anchors.mjs +116 -17
- package/src/reference/rehype-table-header-labels.mjs +21 -3
- package/src/reference/remark-asides.mjs +180 -0
- package/src/reference/remark-memo.mjs +42 -11
- package/src/reference/remark-notation.mjs +387 -36
- package/src/reference/render-lab-math.ts +16 -31
- package/src/reference/sections-validate.ts +81 -0
- package/src/reference/sections.mjs +306 -0
- package/src/reference/tables-validate.ts +2 -1
- package/src/reference/types.ts +17 -0
- package/src/reference/unit-words.ts +233 -0
- package/src/rules/catalog.ts +1298 -0
- package/src/rules/course-rules.ts +456 -0
- package/src/rules/in-effect.ts +235 -0
- package/src/rules/settings.ts +448 -0
- package/src/rules/waivers.ts +249 -0
- package/src/session/PreferenceStore.ts +15 -0
- package/src/styles/global.css +1467 -163
- package/src/styles/surfaces.css +182 -0
- package/src/components/hover-panel.ts +0 -339
- package/src/components/popup-stack.ts +0 -345
|
@@ -4,18 +4,23 @@ import { EquationLabelRecord, EquationDiagnostic } from '../reference/equations-
|
|
|
4
4
|
import { TableLabelRecord, TableDiagnostic } from '../reference/tables-validate.js';
|
|
5
5
|
import { FigureLabelRecord, FigureDiagnostic } from '../reference/figures-validate.js';
|
|
6
6
|
import { DiagramLabelRecord, DiagramDiagnostic } from '../reference/diagrams-validate.js';
|
|
7
|
+
import { ExampleLabelRecord, ExampleDiagnostic } from '../reference/examples-validate.js';
|
|
8
|
+
import { FoldDiagnostic } from '../reference/folds-validate.js';
|
|
7
9
|
import { KnowledgeCheckLabelRecord, KnowledgeCheckDiagnostic } from '../reference/knowledge-checks-validate.js';
|
|
8
10
|
import { RawFloatDiagnostic } from '../reference/raw-floats-validate.js';
|
|
9
11
|
import { MathGateDiagnostic } from '../reference/gate-math.js';
|
|
10
12
|
import { ContentSegment } from '../reference/mixed-content.js';
|
|
11
13
|
import { GlyphScopeEntry } from '../reference/gloss.js';
|
|
12
14
|
import { NotationDefinitionRecord, NotationPageBundle, NotationBacklink, NotationDiagnostic, EditorialStatus, NotationGlossEntry } from '../reference/types.js';
|
|
13
|
-
import { NormalizedLessonExports,
|
|
15
|
+
import { b as NormalizedLessonExports, c as NormalizedDisclosure, d as NormalizedNumbering, B as BlockLabels, M as ManifestRules, e as ConfigDiagnostic, C as CourseConfig } from '../course-config-Dsnri9Tk.js';
|
|
16
|
+
import { WaiverDiagnostic } from '../rules/waivers.js';
|
|
14
17
|
import { KnowledgeVersionDiagnostic } from './knowledge-version.js';
|
|
15
18
|
import { SidebarGroup } from './lesson-derivation.js';
|
|
16
19
|
import './collections.js';
|
|
17
20
|
import '../reference/lint-ignore.js';
|
|
18
21
|
import '../reference/keyed-float-validate.js';
|
|
22
|
+
import '../rules/catalog.js';
|
|
23
|
+
import '../rules/course-rules.js';
|
|
19
24
|
|
|
20
25
|
/**
|
|
21
26
|
* The one compiler manifest (Phase D5).
|
|
@@ -100,8 +105,70 @@ import '../reference/keyed-float-validate.js';
|
|
|
100
105
|
* optional advice. Unused keys/definitions and restructuring candidates move
|
|
101
106
|
* from `warning` to `info`; their diagnostic codes and container fields stay
|
|
102
107
|
* unchanged.
|
|
108
|
+
* v17 (part pages, additive): `parts` — every part with its chapters in
|
|
109
|
+
* reading order and, where the course authored one, its overview page. A part
|
|
110
|
+
* with an overview page also gains a leading `Overview` item in its
|
|
111
|
+
* `sidebar` group, so `sidebar[].items` is now a mixed list of lesson slugs
|
|
112
|
+
* and `{ label, link, attrs? }` entries rather than one kind per group.
|
|
113
|
+
* Also `lessons[].studyMinutes` from the optional frontmatter field, and
|
|
114
|
+
* `parts[].studyMinutes` totalling it across a part whose chapters all
|
|
115
|
+
* state one.
|
|
116
|
+
*
|
|
117
|
+
* v18 (rule settings, additive): `rules` — the course's rule switches
|
|
118
|
+
* (`disabled`) and every rule's effective settings; `diagnostics.config` —
|
|
119
|
+
* findings about the course settings themselves (a deprecated top-level
|
|
120
|
+
* `operators` / `romanLabels` / `abbreviations` block, a block for a retired
|
|
121
|
+
* rule), from `resolveRules`. A diagnostic owned by a disabled rule is not
|
|
122
|
+
* published at all; one covered by a per-place waiver
|
|
123
|
+
* (`{/* explico-allow N9: reason *\/}`) is dropped too, and
|
|
124
|
+
* `diagnostics.waivers` reports the waivers themselves (malformed, invalid,
|
|
125
|
+
* unused). Every math-gate finding now carries a `code`
|
|
126
|
+
* (`prose-notation`, `abbreviation-unexplained`, `title-length`,
|
|
127
|
+
* `unresolved-glyph`, `math-compile-error`, or the resolver's own).
|
|
128
|
+
*
|
|
129
|
+
* v19 (course rules, additive): `rules.course` — the course's own `X` rules
|
|
130
|
+
* from `courseRules` in the settings, validated, in file order, so
|
|
131
|
+
* `build/rules-in-effect.md` and `content rules` list them beside the engine's.
|
|
132
|
+
* A finding from one is in `diagnostics.math` with the rule's ID as its `code`.
|
|
133
|
+
*
|
|
134
|
+
* v20 (outline numbering): `numbering` — the course's resolved
|
|
135
|
+
* `numbering` settings; `lessons[].headings` — every top-level heading with
|
|
136
|
+
* its anchor, text, level and, down to `numbering.sections.depth`, its
|
|
137
|
+
* `‹part›.‹chapter›.‹section›…` number; `lessons[].numbering.prefix` — the
|
|
138
|
+
* float-number prefix. Under the default `numbering.floats: "chapter"` that
|
|
139
|
+
* prefix is `‹part›.‹chapter›` and every per-kind offset is 0, so a float
|
|
140
|
+
* number is `2.2.1` where it used to be `2.1`. A `[[sec-…]]` that names no
|
|
141
|
+
* heading is a `sec-ref-resolves` error in `diagnostics.math`.
|
|
142
|
+
*
|
|
143
|
+
* v21 (one caption pair): `lessons[].equations` / `.tables` / `.figures` /
|
|
144
|
+
* `.diagrams` entries, and the `labels` of `equations` / `tables` / `figures`
|
|
145
|
+
* / `diagrams`, carry the float's `short` caption (an equation's
|
|
146
|
+
* `\caption{…}`, or the `short` prop) and, for a JSX float, its long
|
|
147
|
+
* `caption`, each when stated as a literal. `diagnostics.figures` /
|
|
148
|
+
* `diagnostics.diagrams` gain `fig-removed-prop` / `dia-removed-prop`.
|
|
149
|
+
*
|
|
150
|
+
* v22 (one collapse model): `disclosure` replaces `disclosureDefaults` — the
|
|
151
|
+
* course's whole `disclosure` settings block with the engine defaults applied
|
|
152
|
+
* (`NormalizedDisclosure`): `sections` / `subsections` / `knowledgeChecks`
|
|
153
|
+
* as `{ collapsible, defaultOpen }`, `notation` / `references` / `memos` /
|
|
154
|
+
* `figures` / `diagrams` / `workedExamples` as `{ defaultOpen }`, and
|
|
155
|
+
* `tables.truncateAfter`.
|
|
156
|
+
*
|
|
157
|
+
* v23 (kind badges): a worked-example set is a numbered kind of its own —
|
|
158
|
+
* `examples` (same shape as `figures`), `lessons[].examples`,
|
|
159
|
+
* `lessons[].numbering.examples` and `diagnostics.examples` (`ex-…` codes,
|
|
160
|
+
* `ex-missing-prop` among them). `lessons[].knowledgeChecks` entries carry
|
|
161
|
+
* the check's `title`; `lessons[].titledBlocks` lists every check and example
|
|
162
|
+
* set with the anchor and title of the `<h2>` it draws and the heading it
|
|
163
|
+
* follows; `blockLabels` is the course's resolved badge form.
|
|
164
|
+
*
|
|
165
|
+
* v24 (figures stop compacting; `<Fold>`): `disclosure` loses `diagrams` —
|
|
166
|
+
* a diagram no longer folds by itself — and gains `folds`, the first-visit
|
|
167
|
+
* state of a `<Fold>`; `disclosure.figures` now says whether a lab's tools
|
|
168
|
+
* start open; `diagnostics.folds` holds `fold-unnamed`
|
|
169
|
+
* (docs/plans/figures-and-short-captions.md, Parts 1–2).
|
|
103
170
|
*/
|
|
104
|
-
declare const MANIFEST_SCHEMA_VERSION =
|
|
171
|
+
declare const MANIFEST_SCHEMA_VERSION = 24;
|
|
105
172
|
declare const MANIFEST_PATH: string;
|
|
106
173
|
interface ManifestCitation {
|
|
107
174
|
readonly id: string;
|
|
@@ -146,74 +213,122 @@ interface ManifestLessonNotation {
|
|
|
146
213
|
*/
|
|
147
214
|
readonly formulaScope: readonly GlyphScopeEntry[];
|
|
148
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* One keyed float of a lesson (v21): its key and number, and its caption pair
|
|
218
|
+
* — `short` (an equation's `\caption{…}`, or the `short` prop) and, for a
|
|
219
|
+
* `<Table>` / `<Figure>` / `<Diagram>`, the long `caption`. Each is present
|
|
220
|
+
* only when the source states it as a literal.
|
|
221
|
+
*/
|
|
222
|
+
interface ManifestLessonFloat {
|
|
223
|
+
readonly key: string;
|
|
224
|
+
readonly number: string;
|
|
225
|
+
readonly short?: string;
|
|
226
|
+
readonly caption?: string;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* A block that draws a heading of its own where its tag stands (v23): a
|
|
230
|
+
* knowledge check (`<AssessmentSet />`) or a worked-example set
|
|
231
|
+
* (`<CompactExamples>`). `anchor` is the heading's id, `title` the author's
|
|
232
|
+
* topical title, `after` the slug of the top-level heading it follows.
|
|
233
|
+
*/
|
|
234
|
+
interface ManifestTitledBlock {
|
|
235
|
+
readonly kind: 'check' | 'example';
|
|
236
|
+
readonly key: string;
|
|
237
|
+
readonly anchor: string;
|
|
238
|
+
readonly title: string;
|
|
239
|
+
readonly after?: string;
|
|
240
|
+
}
|
|
149
241
|
interface ManifestLesson {
|
|
150
242
|
readonly id: string;
|
|
151
243
|
/** Docs-loader slug, e.g. `bonds/price-yield-relationship`. */
|
|
152
244
|
readonly slug: string;
|
|
153
245
|
/**
|
|
154
246
|
* The 1-based ordinal of the **part** this lesson sits in — its sidebar
|
|
155
|
-
* group's position in `courseConfig.parts`. It is the number
|
|
156
|
-
*
|
|
157
|
-
* the page
|
|
158
|
-
* `docs/authoring/structure.md`.
|
|
247
|
+
* group's position in `courseConfig.parts`. It is the first number of every
|
|
248
|
+
* section, equation, table, figure, diagram, and knowledge-check number on
|
|
249
|
+
* the page. See `docs/authoring/structure.md`.
|
|
159
250
|
*/
|
|
160
251
|
readonly part: number;
|
|
161
252
|
/**
|
|
162
253
|
* The lesson's 1-based ordinal **within its part** (merged track order, then
|
|
163
|
-
* any unranked lessons by slug) — its chapter number
|
|
164
|
-
*
|
|
254
|
+
* any unranked lessons by slug) — its chapter number, the second number of
|
|
255
|
+
* every section number (`1.2.3`) and, under the default
|
|
256
|
+
* `numbering.floats: "chapter"`, of every float number (`(1.2.1)`).
|
|
165
257
|
*/
|
|
166
258
|
readonly chapter: number;
|
|
167
259
|
/**
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
260
|
+
* The float numbers' `prefix` — `‹part›.‹chapter›` under
|
|
261
|
+
* `numbering.floats: "chapter"`, `‹part›` under `"part"` — and, per kind,
|
|
262
|
+
* how many floats of that kind precede this lesson in that scope: always 0
|
|
263
|
+
* for `chapter`, the earlier chapters' count for `part`, whose sequence
|
|
264
|
+
* runs unbroken across the part. A float is `‹prefix›.‹offset + n›`.
|
|
171
265
|
*/
|
|
172
266
|
readonly numbering: {
|
|
267
|
+
readonly prefix: string;
|
|
173
268
|
readonly equations: number;
|
|
174
269
|
readonly tables: number;
|
|
175
270
|
readonly figures: number;
|
|
176
271
|
readonly diagrams: number;
|
|
177
272
|
readonly checks: number;
|
|
273
|
+
readonly examples: number;
|
|
178
274
|
};
|
|
275
|
+
/**
|
|
276
|
+
* Every top-level heading in document order (`sections.mjs`): its anchor
|
|
277
|
+
* (`slug`, which the page's heading is given, and which `[[sec-slug]]`
|
|
278
|
+
* names), its text and level, and — for a `##` to the course's
|
|
279
|
+
* `numbering.sections.depth` — its outline number, `‹part›.‹chapter›.‹s›…`.
|
|
280
|
+
*/
|
|
281
|
+
readonly headings: readonly {
|
|
282
|
+
readonly slug: string;
|
|
283
|
+
readonly text: string;
|
|
284
|
+
readonly level: number;
|
|
285
|
+
readonly number?: string;
|
|
286
|
+
}[];
|
|
179
287
|
readonly file: string;
|
|
180
288
|
readonly title: string;
|
|
181
289
|
readonly description: string;
|
|
290
|
+
/** Authored reader-facing estimate; `40` and `[30, 40]` both land here. */
|
|
291
|
+
readonly studyMinutes?: {
|
|
292
|
+
readonly min: number;
|
|
293
|
+
readonly max: number;
|
|
294
|
+
};
|
|
182
295
|
readonly status: EditorialStatus;
|
|
183
296
|
/** Ordered — the curriculum contract. */
|
|
184
297
|
readonly teaches: readonly string[];
|
|
185
298
|
readonly requires: readonly string[];
|
|
186
299
|
readonly assumptions: readonly string[];
|
|
187
300
|
readonly assessments: readonly string[];
|
|
188
|
-
/**
|
|
301
|
+
/**
|
|
302
|
+
* Numbered knowledge checks from `assessments`, in `.checks.yml` order,
|
|
303
|
+
* each with the `title` its assessment file gives it (v23) — the topic its
|
|
304
|
+
* heading shows after the engine's badge.
|
|
305
|
+
*/
|
|
189
306
|
readonly knowledgeChecks: readonly {
|
|
190
307
|
readonly key: string;
|
|
191
308
|
readonly number: string;
|
|
309
|
+
readonly title?: string;
|
|
192
310
|
}[];
|
|
311
|
+
/**
|
|
312
|
+
* The blocks that draw an `<h2>` of their own (v23): each knowledge check
|
|
313
|
+
* and worked-example set, in document order, with that heading's `anchor`
|
|
314
|
+
* and `title` and `after`, the slug of the top-level heading it follows
|
|
315
|
+
* (absent before the first) — where "On this page" lists it.
|
|
316
|
+
*/
|
|
317
|
+
readonly titledBlocks: readonly ManifestTitledBlock[];
|
|
193
318
|
readonly sources: readonly string[];
|
|
194
319
|
readonly citations: readonly ManifestCitation[];
|
|
195
320
|
/** Competency prerequisite edges this lesson introduces. */
|
|
196
321
|
readonly prereqEdges: readonly PrereqEdge[];
|
|
197
322
|
/** Labelled display equations in appearance order (D7). */
|
|
198
|
-
readonly equations: readonly
|
|
199
|
-
readonly key: string;
|
|
200
|
-
readonly number: string;
|
|
201
|
-
}[];
|
|
323
|
+
readonly equations: readonly ManifestLessonFloat[];
|
|
202
324
|
/** Keyed `<Table>` elements in appearance order. */
|
|
203
|
-
readonly tables: readonly
|
|
204
|
-
readonly key: string;
|
|
205
|
-
readonly number: string;
|
|
206
|
-
}[];
|
|
325
|
+
readonly tables: readonly ManifestLessonFloat[];
|
|
207
326
|
/** Keyed `<Figure>` elements in appearance order. */
|
|
208
|
-
readonly figures: readonly
|
|
209
|
-
readonly key: string;
|
|
210
|
-
readonly number: string;
|
|
211
|
-
}[];
|
|
327
|
+
readonly figures: readonly ManifestLessonFloat[];
|
|
212
328
|
/** Keyed `<Diagram>` elements in appearance order. */
|
|
213
|
-
readonly diagrams: readonly
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}[];
|
|
329
|
+
readonly diagrams: readonly ManifestLessonFloat[];
|
|
330
|
+
/** Keyed `<CompactExamples>` sets in appearance order; `short` is the set's title (v23). */
|
|
331
|
+
readonly examples: readonly ManifestLessonFloat[];
|
|
217
332
|
readonly notation: {
|
|
218
333
|
readonly bindings: readonly {
|
|
219
334
|
readonly key: string;
|
|
@@ -262,12 +377,48 @@ interface ManifestAssessmentItemContent {
|
|
|
262
377
|
readonly promptSegments: readonly ContentSegment[];
|
|
263
378
|
readonly explanationSegments: readonly ContentSegment[];
|
|
264
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* One **part** (v17) — a sidebar group and the directory its chapters live in,
|
|
382
|
+
* with its chapters in reading order and its overview page when the course
|
|
383
|
+
* authored one at `content/docs/<dir>/index.mdx`.
|
|
384
|
+
*
|
|
385
|
+
* `link` is where the directory URL resolves; without an `overview` that URL
|
|
386
|
+
* has no page behind it, which is exactly the 404 a part-level page removes.
|
|
387
|
+
*/
|
|
388
|
+
interface ManifestPart {
|
|
389
|
+
readonly dir: string;
|
|
390
|
+
readonly label: string;
|
|
391
|
+
/** 1-based position in `courseConfig.parts` — the float-number prefix. */
|
|
392
|
+
readonly ordinal: number;
|
|
393
|
+
/** Base-relative href of the part's own page, `/<dir>/`. */
|
|
394
|
+
readonly link: string;
|
|
395
|
+
/** Lesson ids in chapter order. */
|
|
396
|
+
readonly lessons: readonly string[];
|
|
397
|
+
/**
|
|
398
|
+
* The part's total study time — present only when **every** chapter in it
|
|
399
|
+
* states one, so a half-annotated part reports the chapters it knows and no
|
|
400
|
+
* misleading sum.
|
|
401
|
+
*/
|
|
402
|
+
readonly studyMinutes?: {
|
|
403
|
+
readonly min: number;
|
|
404
|
+
readonly max: number;
|
|
405
|
+
};
|
|
406
|
+
readonly overview?: {
|
|
407
|
+
readonly title: string;
|
|
408
|
+
readonly file: string;
|
|
409
|
+
readonly description?: string;
|
|
410
|
+
};
|
|
411
|
+
}
|
|
265
412
|
interface Manifest {
|
|
266
413
|
readonly schemaVersion: number;
|
|
267
414
|
/** Normalized build/UI settings for opt-in per-lesson exports. */
|
|
268
415
|
readonly lessonExports: NormalizedLessonExports;
|
|
269
|
-
/**
|
|
270
|
-
readonly
|
|
416
|
+
/** Every collapse default, engine defaults applied (`CourseConfig.disclosure`). */
|
|
417
|
+
readonly disclosure: NormalizedDisclosure;
|
|
418
|
+
/** Outline and float numbering, defaults applied (`CourseConfig.numbering`). */
|
|
419
|
+
readonly numbering: NormalizedNumbering;
|
|
420
|
+
/** How a check's and an example set's heading names its kind (`CourseConfig.blockLabels`). */
|
|
421
|
+
readonly blockLabels: BlockLabels;
|
|
271
422
|
/** Reader-facing identity + versions (the `[?]` About panel). */
|
|
272
423
|
readonly about: ManifestAbout;
|
|
273
424
|
readonly notation: {
|
|
@@ -284,6 +435,8 @@ interface Manifest {
|
|
|
284
435
|
/** Abbreviations table (N14), for `remarkAbbreviations`. Ordered by key. */
|
|
285
436
|
readonly abbreviations: readonly Record<string, unknown>[];
|
|
286
437
|
readonly sidebar: readonly SidebarGroup[];
|
|
438
|
+
/** The course's parts in config order, with their chapters and overview pages. */
|
|
439
|
+
readonly parts: readonly ManifestPart[];
|
|
287
440
|
readonly lessons: readonly ManifestLesson[];
|
|
288
441
|
/** Full competency prerequisite graph. */
|
|
289
442
|
readonly prereqEdges: readonly PrereqEdge[];
|
|
@@ -313,6 +466,11 @@ interface Manifest {
|
|
|
313
466
|
readonly labels: readonly KnowledgeCheckLabelRecord[];
|
|
314
467
|
readonly numbersBySlug: Record<string, Record<string, string>>;
|
|
315
468
|
};
|
|
469
|
+
/** Keyed-float identity for `<CompactExamples>` — same shape as `figures` (v23). */
|
|
470
|
+
readonly examples: {
|
|
471
|
+
readonly labels: readonly ExampleLabelRecord[];
|
|
472
|
+
readonly numbersBySlug: Record<string, Record<string, string>>;
|
|
473
|
+
};
|
|
316
474
|
/**
|
|
317
475
|
* Every assessment item's `prompt` / `explanation`, pre-split into
|
|
318
476
|
* text/math segments (v8). `AssessmentSet.astro` filters this by
|
|
@@ -323,6 +481,13 @@ interface Manifest {
|
|
|
323
481
|
* lesson's scope can resolve its glyphs differently.
|
|
324
482
|
*/
|
|
325
483
|
readonly assessmentContent: readonly ManifestAssessmentItemContent[];
|
|
484
|
+
/**
|
|
485
|
+
* The course's rule switches and settings (`CourseConfig.rules`, resolved
|
|
486
|
+
* against `src/rules/catalog.ts`). `disabled` names the rules whose
|
|
487
|
+
* diagnostics are withheld below; `settings` is every rule's effective
|
|
488
|
+
* values, defaults applied.
|
|
489
|
+
*/
|
|
490
|
+
readonly rules: ManifestRules;
|
|
326
491
|
readonly diagnostics: {
|
|
327
492
|
readonly curriculum: readonly CurriculumIssue[];
|
|
328
493
|
readonly notation: readonly NotationDiagnostic[];
|
|
@@ -342,12 +507,20 @@ interface Manifest {
|
|
|
342
507
|
readonly diagrams: readonly DiagramDiagnostic[];
|
|
343
508
|
/** Knowledge-check identity and `[[check-…]]` reference checks. */
|
|
344
509
|
readonly checks: readonly KnowledgeCheckDiagnostic[];
|
|
510
|
+
/** `<CompactExamples>` identity checks — the keyed-float codes, `ex-` prefixed, plus `ex-missing-prop`. */
|
|
511
|
+
readonly examples: readonly ExampleDiagnostic[];
|
|
512
|
+
/** `<Fold>` checks: `fold-unnamed`, a fold with no `label` and no numbered float to name its bar by. */
|
|
513
|
+
readonly folds: readonly FoldDiagnostic[];
|
|
345
514
|
/**
|
|
346
515
|
* A raw Markdown table, a raw HTML `<table>`, or an Explico `<Diagram>`
|
|
347
516
|
* that is unkeyed or nested outside `<Table>`/`<Figure>` — invisible to
|
|
348
517
|
* keyed-float validation above. Warnings only.
|
|
349
518
|
*/
|
|
350
519
|
readonly rawFloats: readonly RawFloatDiagnostic[];
|
|
520
|
+
/** Findings about `CourseConfig.rules` and the deprecated blocks it replaces. Warnings only. */
|
|
521
|
+
readonly config: readonly ConfigDiagnostic[];
|
|
522
|
+
/** Per-place waivers that are malformed, name an unwaivable rule, or silenced nothing. */
|
|
523
|
+
readonly waivers: readonly WaiverDiagnostic[];
|
|
351
524
|
};
|
|
352
525
|
readonly hashes: {
|
|
353
526
|
/** `sha256` of every content source file, keyed by repo-relative path. */
|
|
@@ -376,4 +549,4 @@ declare function readManifestSync(): Manifest;
|
|
|
376
549
|
*/
|
|
377
550
|
declare function loadManifest(courseConfig?: CourseConfig): Promise<Manifest>;
|
|
378
551
|
|
|
379
|
-
export { MANIFEST_PATH, MANIFEST_SCHEMA_VERSION, type Manifest, type ManifestAbout, type ManifestAssessmentItemContent, type ManifestCitation, type ManifestLesson, type ManifestLessonNotation, type ManifestNotationResolution, type PrereqEdge, compileManifest, loadManifest, readManifestSync, serializeManifest, writeManifest };
|
|
552
|
+
export { MANIFEST_PATH, MANIFEST_SCHEMA_VERSION, type Manifest, type ManifestAbout, type ManifestAssessmentItemContent, type ManifestCitation, type ManifestLesson, type ManifestLessonFloat, type ManifestLessonNotation, type ManifestNotationResolution, type ManifestPart, type ManifestTitledBlock, type PrereqEdge, compileManifest, loadManifest, readManifestSync, serializeManifest, writeManifest };
|