@lssm/example.learning-journey-ui-coaching 0.0.0-canary-20251217073102 → 0.0.0-canary-20251217083314

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 (126) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +395 -14
  2. package/CHANGELOG.md +9 -9
  3. package/dist/CoachingMiniApp.d.ts +16 -0
  4. package/dist/CoachingMiniApp.js +64 -0
  5. package/dist/components/EngagementMeter.d.ts +17 -0
  6. package/dist/components/EngagementMeter.js +107 -0
  7. package/dist/components/TipCard.d.ts +20 -0
  8. package/dist/components/TipCard.js +75 -0
  9. package/dist/components/TipFeed.d.ts +17 -0
  10. package/dist/components/TipFeed.js +65 -0
  11. package/dist/components/index.d.ts +4 -0
  12. package/dist/components/index.js +5 -0
  13. package/dist/docs/index.d.ts +1 -0
  14. package/dist/docs/index.js +1 -0
  15. package/dist/docs/learning-journey-ui-coaching.docblock.d.ts +1 -0
  16. package/dist/docs/learning-journey-ui-coaching.docblock.js +20 -0
  17. package/dist/{index.d.mts → example.d.ts} +1 -18
  18. package/dist/example.js +34 -0
  19. package/dist/examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js +44 -0
  20. package/dist/examples/learning-journey-ui-shared/dist/components/StreakCounter.js +45 -0
  21. package/dist/examples/learning-journey-ui-shared/dist/components/ViewTabs.js +48 -0
  22. package/dist/examples/learning-journey-ui-shared/dist/components/XpBar.js +46 -0
  23. package/dist/examples/learning-journey-ui-shared/dist/components/index.js +4 -0
  24. package/dist/examples/learning-journey-ui-shared/dist/docs/index.js +1 -0
  25. package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js +20 -0
  26. package/dist/examples/learning-journey-ui-shared/dist/hooks/index.js +1 -0
  27. package/dist/examples/learning-journey-ui-shared/dist/hooks/useLearningProgress.js +73 -0
  28. package/dist/examples/learning-journey-ui-shared/dist/index.js +8 -0
  29. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +15 -0
  30. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +15 -0
  31. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/index.js +28 -0
  32. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/presentations.js +71 -0
  33. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/registry.js +44 -0
  34. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +15 -0
  35. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +15 -0
  36. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +15 -0
  37. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +15 -0
  38. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +15 -0
  39. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +79 -0
  40. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +56 -0
  41. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +15 -0
  42. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +356 -0
  43. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +36 -0
  44. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +15 -0
  45. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +19 -0
  46. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +47 -0
  47. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +78 -0
  48. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +83 -0
  49. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +44 -0
  50. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +66 -0
  51. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +39 -0
  52. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +68 -0
  53. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +46 -0
  54. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +61 -0
  55. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +154 -0
  56. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +19 -0
  57. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +100 -0
  58. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +19 -0
  59. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +5 -0
  60. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js +33 -0
  61. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +55 -0
  62. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +13 -0
  63. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js +23 -0
  64. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js +10 -0
  65. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +10 -0
  66. package/dist/index.d.ts +12 -0
  67. package/dist/index.js +14 -0
  68. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -0
  69. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -0
  70. package/dist/libs/contracts/dist/docs/index.js +29 -0
  71. package/dist/libs/contracts/dist/docs/presentations.js +71 -0
  72. package/dist/libs/contracts/dist/docs/registry.js +44 -0
  73. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -0
  74. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -0
  75. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -0
  76. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -0
  77. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -0
  78. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +80 -0
  79. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +57 -0
  80. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -0
  81. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +357 -0
  82. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -0
  83. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -0
  84. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -0
  85. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -0
  86. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +79 -0
  87. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +84 -0
  88. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +45 -0
  89. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -0
  90. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +40 -0
  91. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +69 -0
  92. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -0
  93. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +62 -0
  94. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +155 -0
  95. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -0
  96. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +101 -0
  97. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -0
  98. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +5 -0
  99. package/dist/libs/design-system/dist/components/atoms/Button.js +33 -0
  100. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +55 -0
  101. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +13 -0
  102. package/dist/libs/ui-kit-web/dist/ui/card.js +36 -0
  103. package/dist/libs/ui-kit-web/dist/ui/utils.js +10 -0
  104. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +10 -0
  105. package/dist/views/Overview.d.ts +15 -0
  106. package/dist/views/Overview.js +152 -0
  107. package/dist/views/Progress.d.ts +10 -0
  108. package/dist/views/Progress.js +117 -0
  109. package/dist/views/Steps.d.ts +11 -0
  110. package/dist/views/Steps.js +68 -0
  111. package/dist/views/Timeline.d.ts +10 -0
  112. package/dist/views/Timeline.js +112 -0
  113. package/dist/views/index.d.ts +5 -0
  114. package/dist/views/index.js +6 -0
  115. package/package.json +25 -16
  116. package/tsdown.config.js +14 -10
  117. package/dist/TipFeed-_1oKR35X.mjs +0 -234
  118. package/dist/components/index.d.mts +0 -2
  119. package/dist/components/index.mjs +0 -4
  120. package/dist/components-kh0CpIG2.mjs +0 -1
  121. package/dist/index-B6uj2reL.d.mts +0 -34
  122. package/dist/index-DJtCFWjr.d.mts +0 -47
  123. package/dist/index.mjs +0 -110
  124. package/dist/views/index.d.mts +0 -2
  125. package/dist/views/index.mjs +0 -4
  126. package/dist/views-BTGcWRSz.mjs +0 -421
@@ -0,0 +1,20 @@
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/templates/runtime.docblock.js
4
+ const tech_templates_runtime_DocBlocks = [{
5
+ id: "docs.tech.templates.runtime",
6
+ title: "ContractSpec Template Runtime (Phase 9)",
7
+ summary: "Phase 9 introduces a full local-first runtime for templates so anyone can preview apps directly in the browser without provisioning any infrastructure.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/templates/runtime",
11
+ tags: [
12
+ "tech",
13
+ "templates",
14
+ "runtime"
15
+ ],
16
+ body: "## ContractSpec Template Runtime (Phase 9)\n\nPhase 9 introduces a full local-first runtime for templates so anyone can preview apps directly in the browser without provisioning any infrastructure.\n\n### Building Blocks\n\n- **Local database** – `@lssm/lib.runtime-local` wraps `sql.js` (SQLite WASM) and `IndexedDB` so we can seed demo data, run migrations, and persist state between sessions. Tests point the runtime to `node_modules/sql.js/dist` so CI doesn’t need a browser.\n- **Local GraphQL** – `LocalGraphQLClient` wires Apollo Client + SchemaLink to resolvers for tasks, messaging, and i18n recipes. All `/templates`, `/studio`, and `/sandbox` previews use those resolvers so we never call remote APIs during demos.\n- **Template registry + installer** – `.../templates/registry.ts` stores the catalog (todos, messaging, recipes). `TemplateInstaller` can seed the runtime (`install`) or export a base64 snapshot via the new `saveTemplateToStudio` mutation.\n- **TemplateShell** – Shared UI wrapper that creates a `TemplateRuntimeProvider`, shows `LocalDataIndicator`, and (optionally) surfaces the new `SaveToStudioButton`.\n\n### Runtime Flows\n\n1. `/templates` now opens a modal that renders `TemplateShell` for each template. Users can explore without leaving the marketing site.\n2. `/studio` switches to a tabbed mini-app (Projects, Canvas, Specs, Deploy) to showcase Studio surfaces with mock data. Visitors see a **preview** shell, while authenticated users (Better Auth via Sigil) unlock full persistence, versioning, and deployment controls.\n3. `/sandbox` lets visitors pick a template and mode (Playground, Spec Editor, Visual Builder). The console at the bottom streams runtime events for transparency.\n\n### GraphQL Mutations\n\n- `saveTemplateToStudio(input: SaveTemplateInput!): SaveTemplateResult!` writes a placeholder project + spec so that templates installed from the sandbox appear in Studio. The mutation is intentionally simple right now: it records which template was imported, stores metadata, and returns `{ projectId, status: 'QUEUED' }` for the UI.\n- `saveCanvasDraft(input: SaveCanvasDraftInput!): CanvasVersion!` snapshots the current Visual Builder nodes to a draft version tied to a canvas overlay. Inputs include `canvasId`, arbitrary `nodes` JSON, and an optional `label`. The resolver enforces org/org access before calling `CanvasVersionManager`.\n- `deployCanvasVersion(input: DeployCanvasVersionInput!): CanvasVersion!` promotes a previously saved draft (`versionId`) to the deployed state. The returned object includes `status`, `nodes`, `createdAt`, and `createdBy` for UI timelines.\n- `undoCanvasVersion(input: UndoCanvasInput!): CanvasVersion` rewinds the visual builder to the prior snapshot (returns `null` when history is empty) so Studio’s toolbar can surface “Undo” without shelling out to local storage.\n\n### Studio GraphQL endpoint\n\n- The landing app exposes the Studio schema at `/api/studio/graphql` via Yoga so React Query hooks (`useStudioProjects`, `useCreateStudioProject`, `useDeployStudioProject`, etc.) can talk to the bundle without spinning up a separate server.\n\n### Spec Editor typing\n\n- Studio’s spec editor now preloads Monaco with ambient declarations for `@lssm/lib.contracts` and `zod`, so snippets receive autocomplete and inline errors even before the spec ships to the backend. The helper lives in `presentation/components/studio/organisms/monaco-spec-types.ts` and registers the extra libs once per browser session via `monaco.languages.typescript.typescriptDefaults.addExtraLib`.\n- Compiler options are aligned with our frontend toolchain (ES2020 + React JSX) which means drafts written in the editor behave like the compiled artifacts that flow through Studio pipelines.\n\n### Spec templates\n\n- Selecting a spec type now injects a ready-to-edit scaffold (capability, workflow, policy, dataview, component) so authors start from a canonical layout instead of a blank file. Templates live alongside `SpecEditor.tsx`, and we only overwrite the content when the previous value is empty or when the author explicitly switches types via the dropdown.\n\n### Spec preview\n\n- The validation side panel now embeds a `SpecPreview` widget that shows validation errors alongside transport artifacts (GraphQL schema, REST endpoints, component summaries) once a preview run completes. Tabs let authors toggle between “Validation” and “Artifacts,” mirroring the UX described in the Studio plan.\n\n### Testing\n\n- `src/templates/__tests__/runtime.test.ts` covers todos CRUD, messaging delivery, and recipe locale switching through the local GraphQL API.\n- Studio infrastructure tests live in `src/__tests__/e2e/project-lifecycle.test.ts` and continue to exercise project creation + deploy flows.\n\n### Next Steps\n\nFuture templates can register their React components via `registerTemplateComponents(templateId, components)` so TemplateShell can render them automatically. When new templates are added, remember to:\n\n1. Update the registry entry (schema + tags).\n2. Register components inside `presentation/components/templates`.\n3. Document the template under `docs/templates/`.\n\n\n\n\n\n"
17
+ }];
18
+ registerDocBlocks(tech_templates_runtime_DocBlocks);
19
+
20
+ //#endregion
@@ -0,0 +1,101 @@
1
+ import { registerDocBlocks } from "../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/vscode-extension.docblock.js
4
+ const tech_vscode_extension_DocBlocks = [{
5
+ id: "docs.tech.vscode.extension",
6
+ title: "ContractSpec VS Code Extension",
7
+ summary: "VS Code extension for spec-first development with validation, scaffolding, and MCP integration.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/vscode/extension",
11
+ tags: [
12
+ "vscode",
13
+ "extension",
14
+ "tooling",
15
+ "dx"
16
+ ],
17
+ body: `# ContractSpec VS Code Extension
18
+
19
+ The ContractSpec VS Code extension provides spec-first development tooling directly in your editor.
20
+
21
+ ## Features
22
+
23
+ - **Real-time Validation**: Get instant feedback on spec errors and warnings as you save files
24
+ - **Build/Scaffold**: Generate handler and component skeletons from specs (no AI required)
25
+ - **Spec Explorer**: List and navigate all specs in your workspace
26
+ - **Dependency Analysis**: Visualize spec dependencies and detect cycles
27
+ - **MCP Integration**: Search ContractSpec documentation via Model Context Protocol
28
+ - **Snippets**: Code snippets for common ContractSpec patterns
29
+
30
+ ## Commands
31
+
32
+ | Command | Description |
33
+ |---------|-------------|
34
+ | \`ContractSpec: Validate Current Spec\` | Validate the currently open spec file |
35
+ | \`ContractSpec: Validate All Specs\` | Validate all spec files in the workspace |
36
+ | \`ContractSpec: Build/Scaffold\` | Generate handler/component from the current spec |
37
+ | \`ContractSpec: List All Specs\` | Show all specs in the workspace |
38
+ | \`ContractSpec: Analyze Dependencies\` | Analyze and visualize spec dependencies |
39
+ | \`ContractSpec: Search Docs (MCP)\` | Search documentation via MCP |
40
+
41
+ ## Configuration
42
+
43
+ | Setting | Description | Default |
44
+ |---------|-------------|---------|
45
+ | \`contractspec.api.baseUrl\` | Base URL for ContractSpec API (enables MCP + remote telemetry) | \`""\` |
46
+ | \`contractspec.telemetry.posthogHost\` | PostHog host URL for direct telemetry | \`"https://eu.posthog.com"\` |
47
+ | \`contractspec.telemetry.posthogProjectKey\` | PostHog project key for direct telemetry | \`""\` |
48
+ | \`contractspec.validation.onSave\` | Run validation on save | \`true\` |
49
+ | \`contractspec.validation.onOpen\` | Run validation on open | \`true\` |
50
+
51
+ ## Architecture
52
+
53
+ The extension uses:
54
+ - \`@lssm/module.contractspec-workspace\` for pure analysis + templates
55
+ - \`@lssm/bundle.contractspec-workspace\` for workspace services + adapters
56
+
57
+ This allows the extension to work without requiring the CLI to be installed.
58
+
59
+ ## Telemetry
60
+
61
+ The extension uses a hybrid telemetry approach:
62
+ 1. If \`contractspec.api.baseUrl\` is configured → send to API \`/api/telemetry/ingest\`
63
+ 2. Otherwise → send directly to PostHog (if project key configured)
64
+
65
+ Telemetry respects VS Code's telemetry settings. No file paths, source code, or PII is collected.
66
+ `
67
+ }, {
68
+ id: "docs.tech.vscode.snippets",
69
+ title: "ContractSpec Snippets",
70
+ summary: "Code snippets for common ContractSpec patterns in VS Code.",
71
+ kind: "reference",
72
+ visibility: "public",
73
+ route: "/docs/tech/vscode/snippets",
74
+ tags: [
75
+ "vscode",
76
+ "snippets",
77
+ "dx"
78
+ ],
79
+ body: `# ContractSpec Snippets
80
+
81
+ The VS Code extension includes snippets for common ContractSpec patterns.
82
+
83
+ ## Available Snippets
84
+
85
+ | Prefix | Description |
86
+ |--------|-------------|
87
+ | \`contractspec-command\` | Create a new command (write operation) |
88
+ | \`contractspec-query\` | Create a new query (read-only operation) |
89
+ | \`contractspec-event\` | Create a new event |
90
+ | \`contractspec-docblock\` | Create a new DocBlock |
91
+ | \`contractspec-telemetry\` | Create a new TelemetrySpec |
92
+ | \`contractspec-presentation\` | Create a new Presentation |
93
+
94
+ ## Usage
95
+
96
+ Type the prefix in a TypeScript file and press Tab to expand the snippet. Tab through the placeholders to fill in your values.
97
+ `
98
+ }];
99
+ registerDocBlocks(tech_vscode_extension_DocBlocks);
100
+
101
+ //#endregion
@@ -0,0 +1,20 @@
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/workflows/overview.docblock.js
4
+ const tech_workflows_overview_DocBlocks = [{
5
+ id: "docs.tech.workflows.overview",
6
+ title: "WorkflowSpec Overview",
7
+ summary: "WorkflowSpec provides a declarative, versioned format for long-running flows that mix automation and human review. Specs stay inside `@lssm/lib.contracts` (`src/workflow/spec.ts`) so the same definition powers runtime execution, documentation, and future generation.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/workflows/overview",
11
+ tags: [
12
+ "tech",
13
+ "workflows",
14
+ "overview"
15
+ ],
16
+ body: "# WorkflowSpec Overview\n\n## Purpose\n\nWorkflowSpec provides a declarative, versioned format for long-running flows that mix automation and human review. Specs stay inside `@lssm/lib.contracts` (`src/workflow/spec.ts`) so the same definition powers runtime execution, documentation, and future generation.\n\n## Core Types\n\n- `WorkflowMeta`: ownership metadata (`title`, `domain`, `owners`, `tags`, `stability`) plus `name` and `version`.\n- `WorkflowDefinition`:\n - `entryStepId?`: optional explicit entry point (defaults to first step).\n - `steps[]`: ordered list of `Step` descriptors.\n - `transitions[]`: directed edges between steps with optional expressions.\n - `sla?`: aggregated timing hints for the overall flow or per-step budgets.\n - `compensation?`: fallback operations executed when a workflow is rolled back or fails.\n- `Step`:\n - `type`: `human`, `automation`, or `decision`.\n - `action`: references either a `ContractSpec` (`operation`) or `FormSpec` (`form`).\n - Optional `guard`, `timeoutMs`, and retry policy (`maxAttempts`, `backoff`, `delayMs`, `maxDelayMs?`).\n - `requiredIntegrations?`: integration slot ids that must be bound before the step may execute.\n - `requiredCapabilities?`: `CapabilityRef[]` that must be enabled in the resolved app config.\n- `Transition`: `from` → `to` with optional `condition` string (simple data expressions).\n\n## Registry & Validation\n\n- `WorkflowRegistry` (`src/workflow/spec.ts`) stores specs by key `<name>.v<version>` and exposes `register`, `list`, and `get`.\n- `validateWorkflowSpec()` (`src/workflow/validation.ts`) checks:\n - Duplicate step IDs.\n - Unknown `from`/`to` transitions.\n - Empty guards/conditions.\n - Reachability from the entry step.\n - Cycles in the graph.\n - Operation/Form references against provided registries.\n- `assertWorkflowSpecValid()` wraps validation and throws `WorkflowValidationError` when errors remain.\n\n## Runtime\n\n- `WorkflowRunner` (`src/workflow/runner.ts`) executes workflows and coordinates steps.\n - `start(name, version?, initialData?)` returns a `workflowId`.\n - `executeStep(workflowId, input?)` runs the current step (automation or human).\n - `getState(workflowId)` retrieves the latest state snapshot.\n - `cancel(workflowId)` marks the workflow as cancelled.\n - `preFlightCheck(name, version?, resolvedConfig?)` evaluates integration/capability requirements before the workflow starts.\n - Throws `WorkflowPreFlightError` if required integration slots are unbound or required capabilities are disabled.\n- `StateStore` (`src/workflow/state.ts`) abstracts persistence. V1 ships with:\n - `InMemoryStateStore` (`src/workflow/adapters/memory-store.ts`) for tests/dev.\n - Placeholder factories for file/database adapters (`adapters/file-adapter.ts`, `adapters/db-adapter.ts`).\n- Guard evaluation: expression guards run through `evaluateExpression()` (`src/workflow/expression.ts`); custom policy guards can be provided via `guardEvaluator`.\n- Events: the runner emits `workflow.started`, `workflow.step_completed`, `workflow.step_failed`, and `workflow.cancelled` through the optional `eventEmitter`.\n- React bindings (`@lssm/lib.presentation-runtime-react`):\n - `useWorkflow` hook (polls state, exposes `executeStep`, `cancel`, `refresh`).\n - `WorkflowStepper` progress indicator using design-system Stepper.\n - `WorkflowStepRenderer` helper to render human/automation/decision steps with sensible fallbacks.\n\n## Authoring Checklist\n\n1. Reuse existing operations/forms; create new specs when missing.\n2. Prefer explicit `entryStepId` for clarity (especially with decision branches).\n3. Give automation steps an `operation` and human steps a `form` (warnings surface otherwise).\n4. Use short, meaningful step IDs (`submit`, `review`, `finalize`) to simplify analytics.\n5. Keep guard expressions deterministic; complex policy logic should move to PolicySpec (Phase 2).\n\n## Testing\n\n- Add unit tests for new workflows via `assertWorkflowSpecValid`.\n- Use the new Vitest suites (`validation.test.ts`, `expression.test.ts`, `runner.test.ts`) as examples.\n- CLI support will arrive in Phase 1 PR 3 (`contractspec create --type workflow`).\n\n## Tooling\n\n- `contractspec create --type workflow` scaffolds a WorkflowSpec with interactive prompts.\n- `contractspec build <spec.workflow.ts>` generates a runner scaffold (`.runner.ts`) wired to `WorkflowRunner` and the in-memory store.\n- `contractspec validate` understands `.workflow.ts` files and checks core structure (meta, steps, transitions).\n\n## Next Steps (Non-MVP)\n\n- Persistence adapters (database/file) for workflow state (Phase 2).\n- React bindings (`useWorkflow`, `WorkflowStepper`) and presentation-runtime integration (PR 3).\n- Policy engine integration (`guard.type === 'policy'` validated against PolicySpec).\n- Telemetry hooks for step execution metrics.\n\n"
17
+ }];
18
+ registerDocBlocks(tech_workflows_overview_DocBlocks);
19
+
20
+ //#endregion
@@ -0,0 +1,5 @@
1
+ //#region ../../libs/design-system/dist/_virtual/rolldown_runtime.js
2
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
3
+
4
+ //#endregion
5
+ export { __esmMin };
@@ -0,0 +1,33 @@
1
+ import { Button } from "../../ui-kit-web/dist/ui/button.js";
2
+ import "react";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { Loader2 } from "lucide-react";
5
+
6
+ //#region ../../libs/design-system/dist/components/atoms/Button.js
7
+ function Button$1({ children, loading, spinnerPlacement = "start", onPress, onPressIn, onPressOut, onLongPress, onTouchStart, onTouchEnd, onTouchCancel, onMouseDown, onMouseUp, onClick, className, disabled, ...rest }) {
8
+ const isDisabled = Boolean(disabled || loading);
9
+ const content = !rest.asChild ? /* @__PURE__ */ jsxs(Fragment, { children: [
10
+ loading && spinnerPlacement === "start" ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : null,
11
+ children,
12
+ loading && spinnerPlacement === "end" ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : null
13
+ ] }) : children;
14
+ return /* @__PURE__ */ jsx(Button, {
15
+ ...rest,
16
+ className,
17
+ disabled: isDisabled,
18
+ "aria-busy": loading ? true : void 0,
19
+ "aria-disabled": isDisabled ? true : void 0,
20
+ onPress: onPress || onClick,
21
+ onClick: onPress || onClick,
22
+ onMouseDown: onMouseDown || onPressIn,
23
+ onMouseUp: onMouseUp || onPressOut,
24
+ onTouchStart,
25
+ onTouchEnd: onTouchEnd || onPressOut,
26
+ onTouchCancel: onTouchCancel || onPressOut,
27
+ type: rest?.type ?? "button",
28
+ children: content
29
+ });
30
+ }
31
+
32
+ //#endregion
33
+ export { Button$1 };
@@ -0,0 +1,55 @@
1
+ import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
2
+ import * as React$1 from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
+ import { Slot } from "@radix-ui/react-slot";
6
+
7
+ //#region ../../libs/design-system/dist/ui-kit-web/dist/ui/button.js
8
+ init_utils();
9
+ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-hidden focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
10
+ variants: {
11
+ variant: {
12
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
13
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
14
+ outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
15
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
16
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
17
+ link: "text-primary underline-offset-4 hover:underline"
18
+ },
19
+ size: {
20
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
21
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
22
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
23
+ icon: "size-9"
24
+ }
25
+ },
26
+ defaultVariants: {
27
+ variant: "default",
28
+ size: "default"
29
+ }
30
+ });
31
+ const Button = React$1.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
32
+ if (asChild) return /* @__PURE__ */ jsx(Slot, {
33
+ "data-slot": "button",
34
+ className: cn(buttonVariants({
35
+ variant,
36
+ size,
37
+ className
38
+ })),
39
+ ...props
40
+ });
41
+ return /* @__PURE__ */ jsx("button", {
42
+ ref,
43
+ "data-slot": "button",
44
+ className: cn(buttonVariants({
45
+ variant,
46
+ size,
47
+ className
48
+ })),
49
+ ...props
50
+ });
51
+ });
52
+ Button.displayName = "Button";
53
+
54
+ //#endregion
55
+ export { Button };
@@ -0,0 +1,13 @@
1
+ import { __esmMin } from "../../../../_virtual/rolldown_runtime.js";
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+
5
+ //#region ../../libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js
6
+ function cn(...inputs) {
7
+ return twMerge(clsx(inputs));
8
+ }
9
+ var init_utils = __esmMin((() => {}));
10
+ init_utils();
11
+
12
+ //#endregion
13
+ export { cn, init_utils };
@@ -0,0 +1,36 @@
1
+ import { cn } from "../ui-kit-core/dist/utils.js";
2
+ import "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region ../../libs/ui-kit-web/dist/ui/card.js
6
+ function Card({ className, ...props }) {
7
+ return /* @__PURE__ */ jsx("div", {
8
+ "data-slot": "card",
9
+ className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-2xs", className),
10
+ ...props
11
+ });
12
+ }
13
+ function CardHeader({ className, ...props }) {
14
+ return /* @__PURE__ */ jsx("div", {
15
+ "data-slot": "card-header",
16
+ className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
17
+ ...props
18
+ });
19
+ }
20
+ function CardTitle({ className, ...props }) {
21
+ return /* @__PURE__ */ jsx("div", {
22
+ "data-slot": "card-title",
23
+ className: cn("leading-none font-semibold", className),
24
+ ...props
25
+ });
26
+ }
27
+ function CardContent({ className, ...props }) {
28
+ return /* @__PURE__ */ jsx("div", {
29
+ "data-slot": "card-content",
30
+ className: cn("px-6", className),
31
+ ...props
32
+ });
33
+ }
34
+
35
+ //#endregion
36
+ export { Card, CardContent, CardHeader, CardTitle };
@@ -0,0 +1,10 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ //#region ../../libs/ui-kit-web/dist/ui/utils.js
5
+ function cn(...inputs) {
6
+ return twMerge(clsx(inputs));
7
+ }
8
+
9
+ //#endregion
10
+ export { cn };
@@ -0,0 +1,10 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ //#region ../../libs/ui-kit-web/dist/ui-kit-core/dist/utils.js
5
+ function cn(...inputs) {
6
+ return twMerge(clsx(inputs));
7
+ }
8
+
9
+ //#endregion
10
+ export { cn };
@@ -0,0 +1,15 @@
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
+ import { LearningViewProps } from "@lssm/example.learning-journey-ui-shared";
3
+
4
+ //#region src/views/Overview.d.ts
5
+ interface CoachingOverviewProps extends LearningViewProps {
6
+ onStart?: () => void;
7
+ }
8
+ declare function Overview({
9
+ track,
10
+ progress,
11
+ onStepComplete,
12
+ onStart
13
+ }: CoachingOverviewProps): react_jsx_runtime5.JSX.Element;
14
+ //#endregion
15
+ export { Overview };
@@ -0,0 +1,152 @@
1
+ 'use client';
2
+
3
+ import { Card, CardContent, CardHeader, CardTitle } from "../libs/ui-kit-web/dist/ui/card.js";
4
+ import { XpBar } from "../examples/learning-journey-ui-shared/dist/components/XpBar.js";
5
+ import { StreakCounter } from "../examples/learning-journey-ui-shared/dist/components/StreakCounter.js";
6
+ import "../examples/learning-journey-ui-shared/dist/index.js";
7
+ import { Button$1 } from "../libs/design-system/dist/components/atoms/Button.js";
8
+ import { TipCard } from "../components/TipCard.js";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+
11
+ //#region src/views/Overview.tsx
12
+ function Overview({ track, progress, onStepComplete, onStart }) {
13
+ const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0);
14
+ const completedSteps = progress.completedStepIds.length;
15
+ const totalSteps = track.steps.length;
16
+ const pendingSteps = totalSteps - completedSteps;
17
+ const activeTips = track.steps.filter((s) => !progress.completedStepIds.includes(s.id)).slice(0, 3);
18
+ return /* @__PURE__ */ jsxs("div", {
19
+ className: "space-y-6",
20
+ children: [
21
+ /* @__PURE__ */ jsx(Card, {
22
+ className: "overflow-hidden bg-gradient-to-br from-amber-500/10 via-orange-500/10 to-red-500/10",
23
+ children: /* @__PURE__ */ jsx(CardContent, {
24
+ className: "p-6",
25
+ children: /* @__PURE__ */ jsxs("div", {
26
+ className: "flex flex-col items-center gap-4 text-center md:flex-row md:text-left",
27
+ children: [
28
+ /* @__PURE__ */ jsx("div", {
29
+ className: "flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-amber-500 to-orange-600 text-3xl shadow-lg",
30
+ children: "💡"
31
+ }),
32
+ /* @__PURE__ */ jsxs("div", {
33
+ className: "flex-1",
34
+ children: [/* @__PURE__ */ jsx("h1", {
35
+ className: "text-2xl font-bold",
36
+ children: track.name
37
+ }), /* @__PURE__ */ jsx("p", {
38
+ className: "text-muted-foreground mt-1",
39
+ children: track.description
40
+ })]
41
+ }),
42
+ /* @__PURE__ */ jsx("div", {
43
+ className: "flex items-center gap-4",
44
+ children: /* @__PURE__ */ jsx(StreakCounter, {
45
+ days: progress.streakDays,
46
+ size: "lg"
47
+ })
48
+ })
49
+ ]
50
+ })
51
+ })
52
+ }),
53
+ /* @__PURE__ */ jsxs("div", {
54
+ className: "grid gap-4 md:grid-cols-3",
55
+ children: [
56
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
57
+ className: "pb-2",
58
+ children: /* @__PURE__ */ jsx(CardTitle, {
59
+ className: "text-muted-foreground text-sm font-medium",
60
+ children: "Active Tips"
61
+ })
62
+ }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
63
+ className: "text-3xl font-bold text-amber-500",
64
+ children: pendingSteps
65
+ }), /* @__PURE__ */ jsx("p", {
66
+ className: "text-muted-foreground text-sm",
67
+ children: "tips for you today"
68
+ })] })] }),
69
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
70
+ className: "pb-2",
71
+ children: /* @__PURE__ */ jsx(CardTitle, {
72
+ className: "text-muted-foreground text-sm font-medium",
73
+ children: "Tips Actioned"
74
+ })
75
+ }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
76
+ className: "text-3xl font-bold text-green-500",
77
+ children: completedSteps
78
+ }), /* @__PURE__ */ jsxs("p", {
79
+ className: "text-muted-foreground text-sm",
80
+ children: [
81
+ "out of ",
82
+ totalSteps,
83
+ " total"
84
+ ]
85
+ })] })] }),
86
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
87
+ className: "pb-2",
88
+ children: /* @__PURE__ */ jsx(CardTitle, {
89
+ className: "text-muted-foreground text-sm font-medium",
90
+ children: "XP Earned"
91
+ })
92
+ }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
93
+ className: "text-3xl font-bold text-orange-500",
94
+ children: progress.xpEarned
95
+ }), /* @__PURE__ */ jsx(XpBar, {
96
+ current: progress.xpEarned,
97
+ max: totalXp,
98
+ showLabel: false,
99
+ size: "sm"
100
+ })] })] })
101
+ ]
102
+ }),
103
+ activeTips.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, {
104
+ className: "flex flex-row items-center justify-between",
105
+ children: [/* @__PURE__ */ jsxs(CardTitle, {
106
+ className: "flex items-center gap-2",
107
+ children: [/* @__PURE__ */ jsx("span", { children: "💡" }), /* @__PURE__ */ jsx("span", { children: "Tips for You" })]
108
+ }), activeTips.length < pendingSteps && /* @__PURE__ */ jsxs(Button$1, {
109
+ variant: "outline",
110
+ size: "sm",
111
+ onClick: onStart,
112
+ children: [
113
+ "View All (",
114
+ pendingSteps,
115
+ ")"
116
+ ]
117
+ })]
118
+ }), /* @__PURE__ */ jsx(CardContent, {
119
+ className: "space-y-3",
120
+ children: activeTips.map((step) => /* @__PURE__ */ jsx(TipCard, {
121
+ step,
122
+ isCompleted: false,
123
+ isCurrent: step.id === activeTips[0]?.id,
124
+ onComplete: () => onStepComplete?.(step.id)
125
+ }, step.id))
126
+ })] }),
127
+ pendingSteps === 0 && /* @__PURE__ */ jsx(Card, {
128
+ className: "border-green-500/50 bg-green-500/5",
129
+ children: /* @__PURE__ */ jsxs(CardContent, {
130
+ className: "flex items-center gap-4 p-6",
131
+ children: [/* @__PURE__ */ jsx("div", {
132
+ className: "text-4xl",
133
+ children: "🎉"
134
+ }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
135
+ className: "text-lg font-semibold text-green-500",
136
+ children: "All Tips Actioned!"
137
+ }), /* @__PURE__ */ jsxs("p", {
138
+ className: "text-muted-foreground",
139
+ children: [
140
+ "Great job! You've addressed all ",
141
+ totalSteps,
142
+ " coaching tips."
143
+ ]
144
+ })] })]
145
+ })
146
+ })
147
+ ]
148
+ });
149
+ }
150
+
151
+ //#endregion
152
+ export { Overview };
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
2
+ import { LearningViewProps } from "@lssm/example.learning-journey-ui-shared";
3
+
4
+ //#region src/views/Progress.d.ts
5
+ declare function ProgressView({
6
+ track,
7
+ progress
8
+ }: LearningViewProps): react_jsx_runtime4.JSX.Element;
9
+ //#endregion
10
+ export { ProgressView as Progress, ProgressView };
@@ -0,0 +1,117 @@
1
+ 'use client';
2
+
3
+ import { Card, CardContent, CardHeader, CardTitle } from "../libs/ui-kit-web/dist/ui/card.js";
4
+ import { XpBar } from "../examples/learning-journey-ui-shared/dist/components/XpBar.js";
5
+ import { StreakCounter } from "../examples/learning-journey-ui-shared/dist/components/StreakCounter.js";
6
+ import { BadgeDisplay } from "../examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js";
7
+ import "../examples/learning-journey-ui-shared/dist/index.js";
8
+ import { EngagementMeter } from "../components/EngagementMeter.js";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+
11
+ //#region src/views/Progress.tsx
12
+ function ProgressView({ track, progress }) {
13
+ const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0);
14
+ const completedSteps = progress.completedStepIds.length;
15
+ const pendingSteps = track.steps.length - completedSteps;
16
+ const actioned = Math.floor(completedSteps * .7);
17
+ const acknowledged = completedSteps - actioned;
18
+ return /* @__PURE__ */ jsxs("div", {
19
+ className: "space-y-6",
20
+ children: [
21
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
22
+ className: "flex items-center gap-2",
23
+ children: [/* @__PURE__ */ jsx("span", { children: "📊" }), /* @__PURE__ */ jsx("span", { children: "Engagement Overview" })]
24
+ }) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(EngagementMeter, {
25
+ actioned,
26
+ acknowledged,
27
+ pending: pendingSteps,
28
+ streak: progress.streakDays
29
+ }) })] }),
30
+ /* @__PURE__ */ jsxs("div", {
31
+ className: "grid gap-4 md:grid-cols-2",
32
+ children: [/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
33
+ className: "pb-2",
34
+ children: /* @__PURE__ */ jsx(CardTitle, {
35
+ className: "text-muted-foreground text-sm font-medium",
36
+ children: "XP Earned"
37
+ })
38
+ }), /* @__PURE__ */ jsxs(CardContent, {
39
+ className: "space-y-3",
40
+ children: [/* @__PURE__ */ jsxs("div", {
41
+ className: "flex items-baseline gap-2",
42
+ children: [/* @__PURE__ */ jsx("span", {
43
+ className: "text-3xl font-bold text-orange-500",
44
+ children: progress.xpEarned
45
+ }), /* @__PURE__ */ jsxs("span", {
46
+ className: "text-muted-foreground",
47
+ children: [
48
+ "/ ",
49
+ totalXp,
50
+ " XP"
51
+ ]
52
+ })]
53
+ }), /* @__PURE__ */ jsx(XpBar, {
54
+ current: progress.xpEarned,
55
+ max: totalXp,
56
+ showLabel: false,
57
+ size: "lg"
58
+ })]
59
+ })] }), /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
60
+ className: "pb-2",
61
+ children: /* @__PURE__ */ jsx(CardTitle, {
62
+ className: "text-muted-foreground text-sm font-medium",
63
+ children: "Engagement Streak"
64
+ })
65
+ }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
66
+ className: "flex items-center gap-4",
67
+ children: [/* @__PURE__ */ jsx(StreakCounter, {
68
+ days: progress.streakDays,
69
+ size: "lg"
70
+ }), /* @__PURE__ */ jsx("div", {
71
+ className: "text-muted-foreground text-sm",
72
+ children: progress.streakDays > 0 ? "Keep going!" : "Start your streak today!"
73
+ })]
74
+ }) })] })]
75
+ }),
76
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
77
+ className: "flex items-center gap-2",
78
+ children: [/* @__PURE__ */ jsx("span", { children: "🏅" }), /* @__PURE__ */ jsx("span", { children: "Achievements" })]
79
+ }) }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx(BadgeDisplay, {
80
+ badges: progress.badges,
81
+ size: "lg",
82
+ maxVisible: 10
83
+ }), progress.badges.length === 0 && /* @__PURE__ */ jsx("p", {
84
+ className: "text-muted-foreground text-sm",
85
+ children: "Action tips to unlock achievements!"
86
+ })] })] }),
87
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
88
+ className: "flex items-center gap-2",
89
+ children: [/* @__PURE__ */ jsx("span", { children: "💡" }), /* @__PURE__ */ jsx("span", { children: "Tip Status" })]
90
+ }) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", {
91
+ className: "space-y-3",
92
+ children: track.steps.map((step) => {
93
+ const isCompleted = progress.completedStepIds.includes(step.id);
94
+ return /* @__PURE__ */ jsxs("div", {
95
+ className: "flex items-center justify-between rounded-lg border p-3",
96
+ children: [/* @__PURE__ */ jsxs("div", {
97
+ className: "flex items-center gap-3",
98
+ children: [/* @__PURE__ */ jsx("span", {
99
+ className: isCompleted ? "text-green-500" : "text-amber-500",
100
+ children: isCompleted ? "✓" : "○"
101
+ }), /* @__PURE__ */ jsx("span", {
102
+ className: isCompleted ? "text-muted-foreground" : "text-foreground",
103
+ children: step.title
104
+ })]
105
+ }), /* @__PURE__ */ jsx("span", {
106
+ className: `text-sm ${isCompleted ? "text-green-500" : "text-muted-foreground"}`,
107
+ children: isCompleted ? "Actioned" : "Pending"
108
+ })]
109
+ }, step.id);
110
+ })
111
+ }) })] })
112
+ ]
113
+ });
114
+ }
115
+
116
+ //#endregion
117
+ export { ProgressView as Progress, ProgressView };
@@ -0,0 +1,11 @@
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import { LearningViewProps } from "@lssm/example.learning-journey-ui-shared";
3
+
4
+ //#region src/views/Steps.d.ts
5
+ declare function Steps({
6
+ track,
7
+ progress,
8
+ onStepComplete
9
+ }: LearningViewProps): react_jsx_runtime3.JSX.Element;
10
+ //#endregion
11
+ export { Steps };