Package: topic-type-layout
Generated from api/packages/topic-type-layout
Source: api/packages/topic-type-layout. The sections after the README are extracted from the code on every docs build.
README
Section titled “README”The Layout topic type (ADR 0052): a lesson body made of approved learning components (timeline, flip cards, steps, callout, code listing, comparison table, practice activity, H5P and LiaScript frames), stored as a validated JSON document with a Markdown fallback.
- Model
Ulams\TopicTypeLayout\Models\LayoutTopic, tabletopic_layouts:document(JSON list of{component, props, id?}nodes),schema_version(1) andmarkdown_fallback. - Validation.
LayoutDocumentValidatorchecks the document againstresources/learner-layout-manifest.json: a non-empty list of at most 80 nodes, only the approved components, closed props schemas (opis/json-schema,defaultkeywords ignored so required props stay required), safehreflinks, no children. The manifest is a copy offront/ui/catalogue/learner-layout-manifest.json;yarn workspace @ulams/ui learner-manifestrewrites both, and the UI tests andLayoutDocumentValidatorTestfail when they differ. - No routes. Topics are created and changed through the topic API
(
POST /api/admin/topics,topicable_type=Ulams\TopicTypeLayout\Models\LayoutTopic,documentas a JSON list, or as a JSON string in multipart forms, andmarkdown_fallback). The document is validated on every create and update. Permissions and tenant isolation are those of the topic API. - Export and import. The document and the fallback are plain JSON in
content.json; the import creates the topic through the topic API and validates again. - Rendering is in
front/web(the lesson player); other clients showmarkdown_fallback.
Topic types
Section titled “Topic types”LayoutTopic
API endpoints
Section titled “API endpoints”None.
Permissions
Section titled “Permissions”None.
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
None.
Events
Section titled “Events”None.
Artisan commands
Section titled “Artisan commands”None.
Scheduled jobs
Section titled “Scheduled jobs”None.
Environment variables read
Section titled “Environment variables read”None.