@plasius/learning 0.6.0 → 0.8.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 (48) hide show
  1. package/README.md +41 -0
  2. package/dist/chunk-UNPCTBNK.js +43 -0
  3. package/dist/chunk-UNPCTBNK.js.map +1 -0
  4. package/dist/course-suggestions-CBs5swU6.d.ts +17 -0
  5. package/dist/course-suggestions-mK2MPB7e.d.cts +17 -0
  6. package/dist/courses/adventure-mission-planner.cjs +436 -0
  7. package/dist/courses/adventure-mission-planner.cjs.map +1 -0
  8. package/dist/courses/adventure-mission-planner.d.cts +6 -0
  9. package/dist/courses/adventure-mission-planner.d.ts +6 -0
  10. package/dist/courses/adventure-mission-planner.js +210 -0
  11. package/dist/courses/adventure-mission-planner.js.map +1 -0
  12. package/dist/courses/creature-care-dashboard.cjs +425 -0
  13. package/dist/courses/creature-care-dashboard.cjs.map +1 -0
  14. package/dist/courses/creature-care-dashboard.d.cts +6 -0
  15. package/dist/courses/creature-care-dashboard.d.ts +6 -0
  16. package/dist/courses/creature-care-dashboard.js +199 -0
  17. package/dist/courses/creature-care-dashboard.js.map +1 -0
  18. package/dist/courses/robot-mission-control.cjs +428 -0
  19. package/dist/courses/robot-mission-control.cjs.map +1 -0
  20. package/dist/courses/robot-mission-control.d.cts +6 -0
  21. package/dist/courses/robot-mission-control.d.ts +6 -0
  22. package/dist/courses/robot-mission-control.js +202 -0
  23. package/dist/courses/robot-mission-control.js.map +1 -0
  24. package/dist/courses/vibe-bug-detective.cjs +416 -0
  25. package/dist/courses/vibe-bug-detective.cjs.map +1 -0
  26. package/dist/courses/vibe-bug-detective.d.cts +8 -0
  27. package/dist/courses/vibe-bug-detective.d.ts +8 -0
  28. package/dist/courses/vibe-bug-detective.js +221 -0
  29. package/dist/courses/vibe-bug-detective.js.map +1 -0
  30. package/dist/courses/vibe-game-remix-lab.cjs +424 -0
  31. package/dist/courses/vibe-game-remix-lab.cjs.map +1 -0
  32. package/dist/courses/vibe-game-remix-lab.d.cts +8 -0
  33. package/dist/courses/vibe-game-remix-lab.d.ts +8 -0
  34. package/dist/courses/vibe-game-remix-lab.js +229 -0
  35. package/dist/courses/vibe-game-remix-lab.js.map +1 -0
  36. package/dist/courses/vibe-idea-studio.cjs +386 -0
  37. package/dist/courses/vibe-idea-studio.cjs.map +1 -0
  38. package/dist/courses/vibe-idea-studio.d.cts +8 -0
  39. package/dist/courses/vibe-idea-studio.d.ts +8 -0
  40. package/dist/courses/vibe-idea-studio.js +191 -0
  41. package/dist/courses/vibe-idea-studio.js.map +1 -0
  42. package/dist/index.cjs +41 -1
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.cts +1 -0
  45. package/dist/index.d.ts +1 -0
  46. package/dist/index.js +38 -0
  47. package/dist/index.js.map +1 -1
  48. package/package.json +32 -2
package/README.md CHANGED
@@ -81,6 +81,47 @@ recognition confidence, steering, command identities, heartbeat expiry and
81
81
  repeat-safe rescue evidence. Each has 54 activities and 18 formative checks.
82
82
  Existing guardian and hardware protections remain separate from course completion.
83
83
 
84
+ The three lazy Vibe curricula (`courses/vibe-game-remix-lab`,
85
+ `courses/vibe-bug-detective` and `courses/vibe-idea-studio`) each provide six missions,
86
+ 54 activities and 18 concept checks around editable JavaScript projects, bounded
87
+ brief/evidence files and learner-authored replay cases. Their projects respectively
88
+ teach a rescue-game remix with intermediate dash checks, evidence-led repairs of
89
+ an intentionally broken game, and a budgeted mission-board prototype with undo
90
+ and filtering. Idea Studio explicitly distinguishes test-first contract predictions
91
+ from the final requirement that those cases pass against the learner's source.
92
+
93
+ These entries also export `suggestions` using `LearningCourseSuggestionV1`, which
94
+ reuses `MissionBoundedSuggestionV1`. Authored proposals include incorrect changes
95
+ for learners to reject with evidence; publication is not an endorsement of every
96
+ proposed replacement. No live AI is required. `parseLearningCourseSuggestion`
97
+ validates stage and file references plus bounded proposal fields.
98
+ `applyLearningCourseSuggestion` builds a new validated project using one exact,
99
+ unambiguous literal snippet match. It rejects stale/ambiguous context and rechecks
100
+ project limits after replacement. Hosts must show the actual diff and obtain an
101
+ explicit learner choice before using it. Neither helper executes code, approves
102
+ a change, writes storage or awards evidence; independently assess the saved result.
103
+
104
+ The web entries `courses/adventure-mission-planner`,
105
+ `courses/creature-care-dashboard` and `courses/robot-mission-control` complete the
106
+ set of seventeen learner curricula. Each exports `course` and `practice`, with
107
+ six authored missions, 54 activities, 18 formative checks and editable
108
+ `index.html`, `app.css` and `app.js` starter files. The planner teaches semantic
109
+ forms, validated records, stable identities, revision and corrupt-snapshot
110
+ recovery. Creature Care teaches resource accounting, deterministic time, rest
111
+ versus pause and bounded history. Mission Control teaches connection, explicit
112
+ arming, bounded motor commands, independent STOP, telemetry expiry and deliberate
113
+ recovery. All include responsive styling, native labels, focus, readable feedback
114
+ and accessibility verification in the authored journey.
115
+
116
+ Web starters deliberately leave later behaviour for the learner to implement.
117
+ They are HTML fragments with explicit data/action bindings and pure JavaScript
118
+ state functions, not unrestricted browser scripts. The separately released
119
+ runtime's lazy `/web` compiler and isolated JavaScript worker are host facilities;
120
+ this package imports neither. Preview plan storage is simulated state, distinct
121
+ from account source saves. Robot control is virtual and grants no hardware access.
122
+ See [web course design](docs/tdrs/tdr-0014-complete-web-course-journeys.md) for the
123
+ runtime boundary, progressive assessment scope and host acceptance obligations.
124
+
84
125
  The runtime is supplied separately by `@plasius/learning-runtime`; this package
85
126
  does not execute the project or declare host readiness. The seventeen-course
86
127
  programme remains in development. This additive content does not alter immutable
@@ -0,0 +1,43 @@
1
+ // src/courses/web-course-authoring.ts
2
+ var webProjectFiles = [
3
+ { path: "index.html", language: "html", maximumCharacters: 24e3 },
4
+ { path: "app.css", language: "css", maximumCharacters: 16e3 },
5
+ { path: "app.js", language: "javascript", maximumCharacters: 32e3 }
6
+ ];
7
+ var webStarterCss = `:root { color: #172a29; background-color: #f5f4ec; font-family: system-ui, sans-serif; line-height: 1.6; }
8
+ * { box-sizing: border-box; }
9
+ main { max-width: 60rem; margin-inline: auto; padding: 1rem; overflow-wrap: anywhere; }
10
+ h1, h2, p { margin-top: 0; }
11
+ section, article, fieldset { border: 1px solid #647874; border-radius: 0.5rem; padding: 1rem; margin-block: 1rem; min-width: 0; }
12
+ label { display: block; font-weight: 700; }
13
+ button, input, select, textarea { font-family: inherit; font-size: 1rem; line-height: 1.6; min-height: 2.75rem; max-width: 100%; border: 2px solid #465e59; border-radius: 0.25rem; padding: 0.5rem; color: inherit; background-color: #ffffff; }
14
+ button { cursor: pointer; }
15
+ button:disabled { cursor: default; border-style: dashed; }
16
+ :focus-visible { outline: 3px solid #075bab; outline-offset: 3px; }
17
+ [aria-invalid="true"] { border-color: #a11c25; }
18
+ .error { color: #a11c25; }
19
+ .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
20
+ .cards { display: grid; gap: 1rem; padding: 0; list-style-type: none; }
21
+ progress, meter { width: 100%; }
22
+ @media (min-width: 48rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
23
+ @media (prefers-reduced-motion: reduce) { * { transition-duration: 0s; } }
24
+ @media (prefers-color-scheme: dark) {
25
+ :root { color: #edf4ef; background-color: #142623; }
26
+ button, input, select, textarea { color: #edf4ef; background-color: #203a34; border-color: #b8cec5; }
27
+ :focus-visible { outline-color: #a8d6ff; }
28
+ .error { color: #ffb8bf; }
29
+ [aria-invalid="true"] { border-color: #ffb8bf; }
30
+ }
31
+ `;
32
+ var webReferences = [
33
+ { name: "editable web files", signature: "index.html + app.css + app.js", description: "Write a semantic HTML fragment beginning with main, scoped responsive CSS and pure JavaScript initialState/update/view functions. The host compiles HTML/CSS and runs JavaScript separately. No document, DOM, imports, network, localStorage, timers, images or external resources are available. Fictional project data stays inside the preview; course source is saved through the bound account.", example: '<main><h1>My project</h1><p role="status" data-text="message"></p></main>' },
34
+ { name: "bindings", signature: "view(state) \u2192 plain JSON display data", description: "data-text displays scalar text; data-value controls a native field; data-checked, data-disabled, data-pressed, data-invalid and data-if require booleans. data-label supplies a nonempty accessible label. data-repeat repeats its element for records with unique string id, resolving nested bindings within each record. Do not put static HTML IDs in repeated content. Paths use named fields up to four segments, without expressions.", example: '<li data-repeat="missions"><span data-text="title"></span><button type="button" data-action="toggle" data-id="id" data-pressed="done" data-label="toggleLabel">Toggle</button></li>' },
35
+ { name: "native events", signature: '{ type: "field", name, value } or { type, id? }', description: "A named input, textarea or select emits field with its string value (checkboxes use booleans). A type=button with data-action emits that action and optional bound data-id. A form with data-action owns submission; its submit button has no separate action. Prevent network submission. Preserve native labels, focus and keyboard operation; input text is never executable markup.", example: '<form data-action="add" novalidate><label for="title">Mission</label><input id="title" name="title" data-value="draft.title"><button type="submit">Add mission</button></form>' }
36
+ ];
37
+
38
+ export {
39
+ webProjectFiles,
40
+ webStarterCss,
41
+ webReferences
42
+ };
43
+ //# sourceMappingURL=chunk-UNPCTBNK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/courses/web-course-authoring.ts"],"sourcesContent":["import type { LearningCourseV1 } from \"../course-contracts.js\";\n\n/** The web courses share file limits and a readable starting theme, not lesson content. */\nexport const webProjectFiles: LearningCourseV1[\"projectFiles\"] = [\n { path: \"index.html\", language: \"html\", maximumCharacters: 24000 },\n { path: \"app.css\", language: \"css\", maximumCharacters: 16000 },\n { path: \"app.js\", language: \"javascript\", maximumCharacters: 32000 },\n];\n\nexport const webStarterCss = `:root { color: #172a29; background-color: #f5f4ec; font-family: system-ui, sans-serif; line-height: 1.6; }\n* { box-sizing: border-box; }\nmain { max-width: 60rem; margin-inline: auto; padding: 1rem; overflow-wrap: anywhere; }\nh1, h2, p { margin-top: 0; }\nsection, article, fieldset { border: 1px solid #647874; border-radius: 0.5rem; padding: 1rem; margin-block: 1rem; min-width: 0; }\nlabel { display: block; font-weight: 700; }\nbutton, input, select, textarea { font-family: inherit; font-size: 1rem; line-height: 1.6; min-height: 2.75rem; max-width: 100%; border: 2px solid #465e59; border-radius: 0.25rem; padding: 0.5rem; color: inherit; background-color: #ffffff; }\nbutton { cursor: pointer; }\nbutton:disabled { cursor: default; border-style: dashed; }\n:focus-visible { outline: 3px solid #075bab; outline-offset: 3px; }\n[aria-invalid=\"true\"] { border-color: #a11c25; }\n.error { color: #a11c25; }\n.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }\n.cards { display: grid; gap: 1rem; padding: 0; list-style-type: none; }\nprogress, meter { width: 100%; }\n@media (min-width: 48rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s; } }\n@media (prefers-color-scheme: dark) {\n :root { color: #edf4ef; background-color: #142623; }\n button, input, select, textarea { color: #edf4ef; background-color: #203a34; border-color: #b8cec5; }\n :focus-visible { outline-color: #a8d6ff; }\n .error { color: #ffb8bf; }\n [aria-invalid=\"true\"] { border-color: #ffb8bf; }\n}\n`;\n\nexport const webReferences: LearningCourseV1[\"reference\"] = [\n { name: \"editable web files\", signature: \"index.html + app.css + app.js\", description: \"Write a semantic HTML fragment beginning with main, scoped responsive CSS and pure JavaScript initialState/update/view functions. The host compiles HTML/CSS and runs JavaScript separately. No document, DOM, imports, network, localStorage, timers, images or external resources are available. Fictional project data stays inside the preview; course source is saved through the bound account.\", example: '<main><h1>My project</h1><p role=\"status\" data-text=\"message\"></p></main>' },\n { name: \"bindings\", signature: \"view(state) → plain JSON display data\", description: \"data-text displays scalar text; data-value controls a native field; data-checked, data-disabled, data-pressed, data-invalid and data-if require booleans. data-label supplies a nonempty accessible label. data-repeat repeats its element for records with unique string id, resolving nested bindings within each record. Do not put static HTML IDs in repeated content. Paths use named fields up to four segments, without expressions.\", example: '<li data-repeat=\"missions\"><span data-text=\"title\"></span><button type=\"button\" data-action=\"toggle\" data-id=\"id\" data-pressed=\"done\" data-label=\"toggleLabel\">Toggle</button></li>' },\n { name: \"native events\", signature: '{ type: \"field\", name, value } or { type, id? }', description: \"A named input, textarea or select emits field with its string value (checkboxes use booleans). A type=button with data-action emits that action and optional bound data-id. A form with data-action owns submission; its submit button has no separate action. Prevent network submission. Preserve native labels, focus and keyboard operation; input text is never executable markup.\", example: '<form data-action=\"add\" novalidate><label for=\"title\">Mission</label><input id=\"title\" name=\"title\" data-value=\"draft.title\"><button type=\"submit\">Add mission</button></form>' },\n];\n"],"mappings":";AAGO,IAAM,kBAAoD;AAAA,EAC/D,EAAE,MAAM,cAAc,UAAU,QAAQ,mBAAmB,KAAM;AAAA,EACjE,EAAE,MAAM,WAAW,UAAU,OAAO,mBAAmB,KAAM;AAAA,EAC7D,EAAE,MAAM,UAAU,UAAU,cAAc,mBAAmB,KAAM;AACrE;AAEO,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BtB,IAAM,gBAA+C;AAAA,EAC1D,EAAE,MAAM,sBAAsB,WAAW,iCAAiC,aAAa,yYAAyY,SAAS,4EAA4E;AAAA,EACrjB,EAAE,MAAM,YAAY,WAAW,8CAAyC,aAAa,gbAAgb,SAAS,sLAAsL;AAAA,EACpsB,EAAE,MAAM,iBAAiB,WAAW,mDAAmD,aAAa,2XAA2X,SAAS,iLAAiL;AAC3pB;","names":[]}
@@ -0,0 +1,17 @@
1
+ import { T as MissionBoundedSuggestionV1, L as LearningCourseV1, K as LearningProjectV1 } from './course-authoring-DImvrK5r.js';
2
+
3
+ /** Learner-safe authored diff; the artifact ID is a declared course project path. */
4
+ interface LearningCourseSuggestionV1 {
5
+ stageId: string;
6
+ proposal: MissionBoundedSuggestionV1;
7
+ }
8
+ /** Validate a reviewed proposal without executing, applying or approving it. */
9
+ declare function parseLearningCourseSuggestion(course: LearningCourseV1, value: unknown): LearningCourseSuggestionV1;
10
+ /**
11
+ * Build the proposed project after an explicit learner choice in the host.
12
+ * This pure function grants no approval, writes no storage and awards no evidence.
13
+ * Stale or ambiguous snippets must be reviewed again rather than applied fuzzily.
14
+ */
15
+ declare function applyLearningCourseSuggestion(course: LearningCourseV1, project: unknown, suggestion: unknown): LearningProjectV1;
16
+
17
+ export { type LearningCourseSuggestionV1 as L, applyLearningCourseSuggestion as a, parseLearningCourseSuggestion as p };
@@ -0,0 +1,17 @@
1
+ import { T as MissionBoundedSuggestionV1, L as LearningCourseV1, K as LearningProjectV1 } from './course-authoring-DImvrK5r.cjs';
2
+
3
+ /** Learner-safe authored diff; the artifact ID is a declared course project path. */
4
+ interface LearningCourseSuggestionV1 {
5
+ stageId: string;
6
+ proposal: MissionBoundedSuggestionV1;
7
+ }
8
+ /** Validate a reviewed proposal without executing, applying or approving it. */
9
+ declare function parseLearningCourseSuggestion(course: LearningCourseV1, value: unknown): LearningCourseSuggestionV1;
10
+ /**
11
+ * Build the proposed project after an explicit learner choice in the host.
12
+ * This pure function grants no approval, writes no storage and awards no evidence.
13
+ * Stale or ambiguous snippets must be reviewed again rather than applied fuzzily.
14
+ */
15
+ declare function applyLearningCourseSuggestion(course: LearningCourseV1, project: unknown, suggestion: unknown): LearningProjectV1;
16
+
17
+ export { type LearningCourseSuggestionV1 as L, applyLearningCourseSuggestion as a, parseLearningCourseSuggestion as p };