@lssm/example.learning-journey-registry 0.0.0-canary-20251217060433 → 0.0.0-canary-20251217062139

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 (72) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +401 -56
  2. package/CHANGELOG.md +12 -12
  3. package/dist/examples/learning-journey-ambient-coach/src/track.js +1 -0
  4. package/dist/examples/learning-journey-crm-onboarding/dist/track.js +1 -0
  5. package/dist/examples/learning-journey-duo-drills/src/track.js +1 -0
  6. package/dist/examples/learning-journey-platform-tour/dist/track.js +1 -0
  7. package/dist/examples/learning-journey-quest-challenges/src/track.js +1 -0
  8. package/dist/examples/learning-journey-studio-onboarding/dist/track.js +1 -0
  9. package/dist/examples/learning-journey-ui-coaching/src/CoachingMiniApp.js +1 -0
  10. package/dist/examples/learning-journey-ui-coaching/src/components/EngagementMeter.js +1 -0
  11. package/dist/examples/learning-journey-ui-coaching/src/components/TipCard.js +1 -0
  12. package/dist/examples/learning-journey-ui-coaching/src/components/TipFeed.js +1 -0
  13. package/dist/examples/learning-journey-ui-coaching/src/components/index.js +1 -0
  14. package/dist/examples/learning-journey-ui-coaching/src/docs/index.js +1 -0
  15. package/dist/examples/learning-journey-ui-coaching/src/docs/learning-journey-ui-coaching.docblock.js +8 -0
  16. package/dist/examples/learning-journey-ui-coaching/src/index.js +1 -0
  17. package/dist/examples/learning-journey-ui-coaching/src/views/Overview.js +1 -0
  18. package/dist/examples/learning-journey-ui-coaching/src/views/Progress.js +1 -0
  19. package/dist/examples/learning-journey-ui-coaching/src/views/Steps.js +1 -0
  20. package/dist/examples/learning-journey-ui-coaching/src/views/Timeline.js +1 -0
  21. package/dist/examples/learning-journey-ui-coaching/src/views/index.js +1 -0
  22. package/dist/examples/learning-journey-ui-gamified/src/GamifiedMiniApp.js +1 -0
  23. package/dist/examples/learning-journey-ui-gamified/src/components/DayCalendar.js +1 -0
  24. package/dist/examples/learning-journey-ui-gamified/src/components/FlashCard.js +1 -0
  25. package/dist/examples/learning-journey-ui-gamified/src/components/MasteryRing.js +1 -0
  26. package/dist/examples/learning-journey-ui-gamified/src/components/index.js +1 -0
  27. package/dist/examples/learning-journey-ui-gamified/src/docs/index.js +1 -0
  28. package/dist/examples/learning-journey-ui-gamified/src/docs/learning-journey-ui-gamified.docblock.js +8 -0
  29. package/dist/examples/learning-journey-ui-gamified/src/index.js +1 -0
  30. package/dist/examples/learning-journey-ui-gamified/src/views/Overview.js +1 -0
  31. package/dist/examples/learning-journey-ui-gamified/src/views/Progress.js +1 -0
  32. package/dist/examples/learning-journey-ui-gamified/src/views/Steps.js +1 -0
  33. package/dist/examples/learning-journey-ui-gamified/src/views/Timeline.js +1 -0
  34. package/dist/examples/learning-journey-ui-gamified/src/views/index.js +1 -0
  35. package/dist/examples/learning-journey-ui-onboarding/src/OnboardingMiniApp.js +1 -0
  36. package/dist/examples/learning-journey-ui-onboarding/src/components/CodeSnippet.js +1 -0
  37. package/dist/examples/learning-journey-ui-onboarding/src/components/JourneyMap.js +1 -0
  38. package/dist/examples/learning-journey-ui-onboarding/src/components/StepChecklist.js +1 -0
  39. package/dist/examples/learning-journey-ui-onboarding/src/components/index.js +1 -0
  40. package/dist/examples/learning-journey-ui-onboarding/src/docs/index.js +1 -0
  41. package/dist/examples/learning-journey-ui-onboarding/src/docs/learning-journey-ui-onboarding.docblock.js +8 -0
  42. package/dist/examples/learning-journey-ui-onboarding/src/index.js +1 -0
  43. package/dist/examples/learning-journey-ui-onboarding/src/views/Overview.js +1 -0
  44. package/dist/examples/learning-journey-ui-onboarding/src/views/Progress.js +1 -0
  45. package/dist/examples/learning-journey-ui-onboarding/src/views/Steps.js +1 -0
  46. package/dist/examples/learning-journey-ui-onboarding/src/views/Timeline.js +1 -0
  47. package/dist/examples/learning-journey-ui-onboarding/src/views/index.js +1 -0
  48. package/dist/examples/learning-journey-ui-shared/src/components/BadgeDisplay.js +1 -0
  49. package/dist/examples/learning-journey-ui-shared/src/components/StreakCounter.js +1 -0
  50. package/dist/examples/learning-journey-ui-shared/src/components/ViewTabs.js +1 -0
  51. package/dist/examples/learning-journey-ui-shared/src/components/XpBar.js +1 -0
  52. package/dist/examples/learning-journey-ui-shared/src/components/index.js +1 -0
  53. package/dist/examples/learning-journey-ui-shared/src/docs/index.js +1 -0
  54. package/dist/examples/learning-journey-ui-shared/src/docs/learning-journey-ui-shared.docblock.js +7 -0
  55. package/dist/examples/learning-journey-ui-shared/src/hooks/index.js +1 -0
  56. package/dist/examples/learning-journey-ui-shared/src/hooks/useLearningProgress.js +1 -0
  57. package/dist/examples/learning-journey-ui-shared/src/index.js +1 -0
  58. package/dist/index.js +1 -1
  59. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +1 -0
  60. package/dist/libs/design-system/dist/components/atoms/Button.js +1 -0
  61. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +1 -0
  62. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +1 -0
  63. package/dist/libs/ui-kit-core/dist/utils.js +1 -0
  64. package/dist/libs/ui-kit-web/dist/ui/card.js +1 -0
  65. package/dist/libs/ui-kit-web/dist/ui/progress.js +1 -0
  66. package/dist/libs/ui-kit-web/dist/ui/utils.js +1 -0
  67. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +1 -0
  68. package/dist/tracks.d.ts +1 -1
  69. package/dist/tracks.js +1 -1
  70. package/dist/ui/LearningMiniApp.d.ts +0 -1
  71. package/dist/ui/LearningMiniApp.js +1 -1
  72. package/package.json +26 -26
@@ -0,0 +1 @@
1
+ const e=[{id:`platform_primitives_tour`,productId:`contractspec-platform`,name:`Platform Primitives Tour`,description:`Hands-on tour across identity, audit, notifications, jobs, flags, files, and metering.`,targetUserSegment:`platform_developer`,targetRole:`developer`,totalXp:140,completionRewards:{xpBonus:20,badgeKey:`platform_primitives`},steps:[{id:`identity_rbac`,title:`Create org and member`,description:`Create an org and add at least one member.`,order:1,completion:{eventName:`org.member.added`,sourceModule:`@lssm/lib.identity-rbac`},xpReward:20,metadata:{surface:`identity`}},{id:`event_bus_audit`,title:`Emit an auditable event`,description:`Emit an event that lands in the audit log.`,order:2,completion:{eventName:`audit_log.created`,sourceModule:`@lssm/module.audit-trail`},xpReward:20,metadata:{surface:`bus+audit`}},{id:`notifications`,title:`Send a notification`,description:`Send yourself a notification and verify delivery.`,order:3,completion:{eventName:`notification.sent`,sourceModule:`@lssm/module.notifications`},xpReward:20,metadata:{surface:`notifications`}},{id:`jobs_scheduler`,title:`Schedule and run a job`,description:`Schedule a background job and let it run once.`,order:4,completion:{eventName:`job.completed`,sourceModule:`@lssm/lib.jobs`},xpReward:20,metadata:{surface:`jobs`}},{id:`feature_flags`,title:`Create and toggle a feature flag`,description:`Create a feature flag and toggle it at least once.`,order:5,completion:{eventName:`flag.toggled`,sourceModule:`@lssm/lib.feature-flags`},xpReward:20,metadata:{surface:`feature-flags`}},{id:`files_attachments`,title:`Attach a file`,description:`Upload and attach a file to any entity.`,order:6,completion:{eventName:`attachment.attached`,sourceModule:`@lssm/lib.files`},xpReward:20,metadata:{surface:`files`}},{id:`usage_metering`,title:`Record usage`,description:`Emit a usage metric (regeneration, agent run, or similar).`,order:7,completion:{eventName:`usage.recorded`,sourceModule:`@lssm/lib.metering`},xpReward:20,metadata:{surface:`metering`}}],metadata:{surfacedIn:[`studio/learning`,`platform/dev-center`]}}];export{e as t};
@@ -0,0 +1 @@
1
+ const e=(e,t,n,r)=>({id:e,title:`Day ${t}`,description:r,availability:{unlockOnDay:t},completion:{kind:`time_window`,eventName:n,withinHoursOfStart:(t+1)*24},xpReward:15,metadata:{day:t}}),t=[{id:`money_reset_7day`,name:`7-day Money Reset`,description:`Time-bound quest to reset personal finances over a focused week.`,targetUserSegment:`money_user`,totalXp:105,completionRewards:{xpBonus:30},steps:[e(`day1_map_accounts`,1,`accounts.mapped`,`Map bank and card accounts.`),e(`day2_categorize_transactions`,2,`transactions.categorized`,`Categorize recent transactions.`),e(`day3_define_goals`,3,`goals.created`,`Define at least one savings goal.`),e(`day4_setup_recurring_savings`,4,`recurring_rule.created`,`Set a recurring savings rule.`),e(`day5_review_subscriptions`,5,`subscription.flagged_or_cancelled`,`Review subscriptions and flag or cancel wasteful ones.`),e(`day6_plan_emergency`,6,`emergency_plan.completed`,`Draft an emergency plan and target buffer.`),e(`day7_review_commit`,7,`quest.review.completed`,`Review week outcomes and commit to the next month.`)]}];export{t as questTracks};
@@ -0,0 +1 @@
1
+ const e=[{id:`studio_getting_started`,productId:`contractspec-studio`,name:`Studio Getting Started`,description:`First 30 minutes in Studio: create a project, edit the spec, deploy/regenerate, and try key modules.`,targetUserSegment:`new_studio_user`,targetRole:`developer`,totalXp:110,streakRule:{hoursWindow:48,bonusXp:25},completionRewards:{xpBonus:25,badgeKey:`studio_first_30m`},steps:[{id:`choose_template`,title:`Choose a template`,description:`Create your first Studio project (starter template).`,order:1,completion:{eventName:`studio.template.instantiated`,sourceModule:`@lssm/bundle.contractspec-studio`},xpReward:20,metadata:{surface:`projects`}},{id:`edit_spec`,title:`Edit the spec`,description:`Change the spec (not generated code) and save.`,instructions:`Open spec editor, tweak a contract or presentation, save.`,order:2,completion:{eventName:`spec.changed`,sourceModule:`@lssm/bundle.contractspec-studio`},xpReward:20,metadata:{surface:`spec-editor`}},{id:`regenerate_app`,title:`Regenerate the app`,description:`Regenerate artifacts from the updated spec.`,order:3,completion:{eventName:`regeneration.completed`,sourceModule:`@lssm/lib.contracts/regenerator`},xpReward:20,metadata:{surface:`regenerator`}},{id:`open_canvas`,title:`Open the canvas`,description:`Visit the canvas module for your project.`,order:4,completion:{eventName:`module.navigated`,sourceModule:`@lssm/bundle.contractspec-studio`,payloadFilter:{moduleId:`canvas`}},xpReward:20,metadata:{surface:`canvas`}},{id:`try_evolution_mode`,title:`Try evolution mode`,description:`Request a change via Evolution, then regenerate.`,order:5,completion:{eventName:`studio.evolution.applied`,sourceModule:`@lssm/lib.evolution`},xpReward:30,metadata:{surface:`evolution`}}],metadata:{persona:`first_run`,surfacedIn:[`studio/home`,`studio/sidebar/learning`]}}];export{e as t};
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t}from"../../../libs/ui-kit-web/dist/ui/card.js";import{useLearningProgress as n}from"../../learning-journey-ui-shared/src/hooks/useLearningProgress.js";import{ViewTabs as r}from"../../learning-journey-ui-shared/src/components/ViewTabs.js";import"../../learning-journey-ui-shared/src/index.js";import{Overview as i}from"./views/Overview.js";import{Steps as a}from"./views/Steps.js";import{ProgressView as o}from"./views/Progress.js";import{Timeline as s}from"./views/Timeline.js";import{useCallback as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";function f({track:f,progress:p,onStepComplete:m,onViewChange:h,initialView:g=`overview`}){let[_,v]=l(g),{progress:y,completeStep:b}=n(f),x=p??y,S=c(e=>{v(e),h?.(e)},[h]),C=c(e=>{m?m(e):b(e)},[m,b]),w=c(()=>{v(`steps`),h?.(`steps`)},[h]);return d(`div`,{className:`space-y-6`,children:[u(e,{children:u(t,{className:`p-4`,children:u(r,{currentView:_,onViewChange:S})})}),(()=>{let e={track:f,progress:x,onStepComplete:C};switch(_){case`overview`:return u(i,{...e,onStart:w});case`steps`:return u(a,{...e});case`progress`:return u(o,{...e});case`timeline`:return u(s,{...e});default:return u(i,{...e,onStart:w})}})()]})}export{f as CoachingMiniApp};
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";function n({acknowledged:n,actioned:r,pending:i,streak:a=0}){let o=n+r+i,s=o>0?r/o*100:0,c=o>0?n/o*100:0;return t(`div`,{className:`space-y-4`,children:[e(`div`,{className:`flex items-center justify-center`,children:t(`div`,{className:`relative h-32 w-32`,children:[t(`svg`,{className:`h-full w-full -rotate-90`,viewBox:`0 0 100 100`,children:[e(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`none`,strokeWidth:`12`,className:`stroke-muted`}),e(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`none`,strokeWidth:`12`,strokeLinecap:`round`,strokeDasharray:`${s*2.51} 251`,className:`stroke-green-500 transition-all duration-500`}),e(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`none`,strokeWidth:`12`,strokeLinecap:`round`,strokeDasharray:`${c*2.51} 251`,strokeDashoffset:`${-s*2.51}`,className:`stroke-amber-500 transition-all duration-500`})]}),t(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center`,children:[e(`span`,{className:`text-2xl font-bold`,children:o}),e(`span`,{className:`text-muted-foreground text-xs`,children:`tips`})]})]})}),t(`div`,{className:`flex justify-center gap-4 text-sm`,children:[t(`div`,{className:`flex items-center gap-1.5`,children:[e(`div`,{className:`h-3 w-3 rounded-full bg-green-500`}),t(`span`,{children:[`Actioned (`,r,`)`]})]}),t(`div`,{className:`flex items-center gap-1.5`,children:[e(`div`,{className:`h-3 w-3 rounded-full bg-amber-500`}),t(`span`,{children:[`Acknowledged (`,n,`)`]})]}),t(`div`,{className:`flex items-center gap-1.5`,children:[e(`div`,{className:`bg-muted h-3 w-3 rounded-full`}),t(`span`,{children:[`Pending (`,i,`)`]})]})]}),a>0&&t(`div`,{className:`flex items-center justify-center gap-2 rounded-lg bg-orange-500/10 px-4 py-2`,children:[e(`span`,{className:`text-xl`,children:`🔥`}),t(`span`,{className:`font-semibold text-orange-500`,children:[a,` day engagement streak!`]})]})]})}export{n as EngagementMeter};
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{cn as n}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{Button$1 as r}from"../../../../libs/design-system/dist/components/atoms/Button.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o={cash_buffer_too_high:`💰`,no_savings_goal:`🎯`,irregular_savings:`📅`,noise_late_evening:`🔇`,guest_frequency_high:`👥`,shared_space_conflicts:`🏠`,default:`💡`};function s({step:s,isCompleted:c,isCurrent:l,onComplete:u,onDismiss:d}){let f=o[s.metadata?.tipId??`default`]??o.default;return i(e,{className:n(`transition-all`,c&&`opacity-60`,l&&`ring-2 ring-amber-500`),children:i(t,{className:`p-4`,children:a(`div`,{className:`flex gap-4`,children:[i(`div`,{className:n(`flex h-12 w-12 shrink-0 items-center justify-center rounded-xl text-2xl`,c?`bg-green-500/10`:l?`bg-amber-500/10`:`bg-muted`),children:c?`✓`:f}),a(`div`,{className:`min-w-0 flex-1`,children:[a(`div`,{className:`flex items-start justify-between gap-2`,children:[i(`h4`,{className:`font-semibold`,children:s.title}),s.xpReward&&a(`span`,{className:n(`shrink-0 rounded-full px-2 py-0.5 text-xs font-semibold`,c?`bg-green-500/10 text-green-500`:`bg-amber-500/10 text-amber-500`),children:[`+`,s.xpReward,` XP`]})]}),i(`p`,{className:`text-muted-foreground mt-1 text-sm`,children:s.description}),!c&&a(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[i(r,{size:`sm`,onClick:u,children:`Take Action`}),i(r,{variant:`outline`,size:`sm`,onClick:d,children:`Dismiss`})]}),c&&i(`p`,{className:`mt-2 text-sm text-green-500`,children:`✓ Tip acknowledged`})]})]})})})}export{s as TipCard};
@@ -0,0 +1 @@
1
+ "use client";import{cn as e}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";const r={cash_buffer_too_high:`💰`,no_savings_goal:`🎯`,irregular_savings:`📅`,noise_late_evening:`🔇`,guest_frequency_high:`👥`,shared_space_conflicts:`🏠`,default:`💡`};function i({items:i}){return i.length===0?t(`div`,{className:`text-muted-foreground py-8 text-center`,children:`No tips yet. Start engaging with coaching tips!`}):n(`div`,{className:`relative`,children:[t(`div`,{className:`bg-border absolute top-0 left-4 h-full w-0.5`}),t(`div`,{className:`space-y-4`,children:i.map((i,a)=>{let o=r[i.step.metadata?.tipId??`default`]??r.default;return n(`div`,{className:`relative flex gap-4 pl-2`,children:[t(`div`,{className:e(`relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm`,i.isCompleted?`bg-green-500 text-white`:`bg-muted text-muted-foreground`),children:i.isCompleted?`✓`:o}),n(`div`,{className:`bg-card flex-1 rounded-lg border p-3`,children:[n(`div`,{className:`flex items-start justify-between gap-2`,children:[n(`div`,{children:[t(`p`,{className:`font-medium`,children:i.step.title}),t(`p`,{className:`text-muted-foreground mt-0.5 text-sm`,children:i.step.description})]}),i.step.xpReward&&n(`span`,{className:e(`shrink-0 text-xs font-medium`,i.isCompleted?`text-green-500`:`text-muted-foreground`),children:[`+`,i.step.xpReward,` XP`]})]}),t(`div`,{className:`text-muted-foreground mt-2 flex items-center gap-2 text-xs`,children:i.isCompleted?n(`span`,{className:`text-green-500`,children:[`✓ Completed`,i.completedAt&&` • ${i.completedAt}`]}):t(`span`,{children:`Pending action`})})]})]},i.step.id)})})]})}export{i as TipFeed};
@@ -0,0 +1 @@
1
+ import{TipCard as e}from"./TipCard.js";import{EngagementMeter as t}from"./EngagementMeter.js";import{TipFeed as n}from"./TipFeed.js";
@@ -0,0 +1 @@
1
+ import"./learning-journey-ui-coaching.docblock.js";
@@ -0,0 +1,8 @@
1
+ import{a as e}from"../../../../libs/contracts/dist/docs/registry.js";import"../../../../libs/contracts/dist/docs/index.js";e([{id:`docs.examples.learning-journey-ui-coaching`,title:`Learning Journey UI — Coaching`,summary:`UI mini-app components for coaching: tips, engagement, progress.`,kind:`reference`,visibility:`public`,route:`/docs/examples/learning-journey-ui-coaching`,tags:[`learning`,`ui`,`coaching`],body:`## Includes
2
+ - Coaching mini-app shell
3
+ - Views: overview, steps, progress, timeline
4
+ - Components: tip card, engagement meter, tip feed
5
+
6
+ ## Notes
7
+ - Compose using design system components.
8
+ - Keep accessibility and mobile-friendly tap targets.`}]);
@@ -0,0 +1 @@
1
+ import{TipCard as e}from"./components/TipCard.js";import{Overview as t}from"./views/Overview.js";import{Steps as n}from"./views/Steps.js";import{EngagementMeter as r}from"./components/EngagementMeter.js";import{ProgressView as i}from"./views/Progress.js";import{TipFeed as a}from"./components/TipFeed.js";import{Timeline as o}from"./views/Timeline.js";import{CoachingMiniApp as s}from"./CoachingMiniApp.js";import"./views/index.js";import"./components/index.js";import"./docs/index.js";
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{XpBar as i}from"../../../learning-journey-ui-shared/src/components/XpBar.js";import{StreakCounter as a}from"../../../learning-journey-ui-shared/src/components/StreakCounter.js";import{Button$1 as o}from"../../../../libs/design-system/dist/components/atoms/Button.js";import"../../../learning-journey-ui-shared/src/index.js";import{TipCard as s}from"../components/TipCard.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({track:u,progress:d,onStepComplete:f,onStart:p}){let m=u.totalXp??u.steps.reduce((e,t)=>e+(t.xpReward??0),0),h=d.completedStepIds.length,g=u.steps.length,_=g-h,v=u.steps.filter(e=>!d.completedStepIds.includes(e.id)).slice(0,3);return l(`div`,{className:`space-y-6`,children:[c(e,{className:`overflow-hidden bg-gradient-to-br from-amber-500/10 via-orange-500/10 to-red-500/10`,children:c(t,{className:`p-6`,children:l(`div`,{className:`flex flex-col items-center gap-4 text-center md:flex-row md:text-left`,children:[c(`div`,{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`,children:`💡`}),l(`div`,{className:`flex-1`,children:[c(`h1`,{className:`text-2xl font-bold`,children:u.name}),c(`p`,{className:`text-muted-foreground mt-1`,children:u.description})]}),c(`div`,{className:`flex items-center gap-4`,children:c(a,{days:d.streakDays,size:`lg`})})]})})}),l(`div`,{className:`grid gap-4 md:grid-cols-3`,children:[l(e,{children:[c(n,{className:`pb-2`,children:c(r,{className:`text-muted-foreground text-sm font-medium`,children:`Active Tips`})}),l(t,{children:[c(`div`,{className:`text-3xl font-bold text-amber-500`,children:_}),c(`p`,{className:`text-muted-foreground text-sm`,children:`tips for you today`})]})]}),l(e,{children:[c(n,{className:`pb-2`,children:c(r,{className:`text-muted-foreground text-sm font-medium`,children:`Tips Actioned`})}),l(t,{children:[c(`div`,{className:`text-3xl font-bold text-green-500`,children:h}),l(`p`,{className:`text-muted-foreground text-sm`,children:[`out of `,g,` total`]})]})]}),l(e,{children:[c(n,{className:`pb-2`,children:c(r,{className:`text-muted-foreground text-sm font-medium`,children:`XP Earned`})}),l(t,{children:[c(`div`,{className:`text-3xl font-bold text-orange-500`,children:d.xpEarned}),c(i,{current:d.xpEarned,max:m,showLabel:!1,size:`sm`})]})]})]}),v.length>0&&l(e,{children:[l(n,{className:`flex flex-row items-center justify-between`,children:[l(r,{className:`flex items-center gap-2`,children:[c(`span`,{children:`💡`}),c(`span`,{children:`Tips for You`})]}),v.length<_&&l(o,{variant:`outline`,size:`sm`,onClick:p,children:[`View All (`,_,`)`]})]}),c(t,{className:`space-y-3`,children:v.map(e=>c(s,{step:e,isCompleted:!1,isCurrent:e.id===v[0]?.id,onComplete:()=>f?.(e.id)},e.id))})]}),_===0&&c(e,{className:`border-green-500/50 bg-green-500/5`,children:l(t,{className:`flex items-center gap-4 p-6`,children:[c(`div`,{className:`text-4xl`,children:`🎉`}),l(`div`,{children:[c(`h3`,{className:`text-lg font-semibold text-green-500`,children:`All Tips Actioned!`}),l(`p`,{className:`text-muted-foreground`,children:[`Great job! You've addressed all `,g,` coaching tips.`]})]})]})})]})}export{u as Overview};
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{XpBar as i}from"../../../learning-journey-ui-shared/src/components/XpBar.js";import{StreakCounter as a}from"../../../learning-journey-ui-shared/src/components/StreakCounter.js";import{BadgeDisplay as o}from"../../../learning-journey-ui-shared/src/components/BadgeDisplay.js";import"../../../learning-journey-ui-shared/src/index.js";import{EngagementMeter as s}from"../components/EngagementMeter.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({track:u,progress:d}){let f=u.totalXp??u.steps.reduce((e,t)=>e+(t.xpReward??0),0),p=d.completedStepIds.length,m=u.steps.length-p,h=Math.floor(p*.7),g=p-h;return l(`div`,{className:`space-y-6`,children:[l(e,{children:[c(n,{children:l(r,{className:`flex items-center gap-2`,children:[c(`span`,{children:`📊`}),c(`span`,{children:`Engagement Overview`})]})}),c(t,{children:c(s,{actioned:h,acknowledged:g,pending:m,streak:d.streakDays})})]}),l(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[l(e,{children:[c(n,{className:`pb-2`,children:c(r,{className:`text-muted-foreground text-sm font-medium`,children:`XP Earned`})}),l(t,{className:`space-y-3`,children:[l(`div`,{className:`flex items-baseline gap-2`,children:[c(`span`,{className:`text-3xl font-bold text-orange-500`,children:d.xpEarned}),l(`span`,{className:`text-muted-foreground`,children:[`/ `,f,` XP`]})]}),c(i,{current:d.xpEarned,max:f,showLabel:!1,size:`lg`})]})]}),l(e,{children:[c(n,{className:`pb-2`,children:c(r,{className:`text-muted-foreground text-sm font-medium`,children:`Engagement Streak`})}),c(t,{children:l(`div`,{className:`flex items-center gap-4`,children:[c(a,{days:d.streakDays,size:`lg`}),c(`div`,{className:`text-muted-foreground text-sm`,children:d.streakDays>0?`Keep going!`:`Start your streak today!`})]})})]})]}),l(e,{children:[c(n,{children:l(r,{className:`flex items-center gap-2`,children:[c(`span`,{children:`🏅`}),c(`span`,{children:`Achievements`})]})}),l(t,{children:[c(o,{badges:d.badges,size:`lg`,maxVisible:10}),d.badges.length===0&&c(`p`,{className:`text-muted-foreground text-sm`,children:`Action tips to unlock achievements!`})]})]}),l(e,{children:[c(n,{children:l(r,{className:`flex items-center gap-2`,children:[c(`span`,{children:`💡`}),c(`span`,{children:`Tip Status`})]})}),c(t,{children:c(`div`,{className:`space-y-3`,children:u.steps.map(e=>{let t=d.completedStepIds.includes(e.id);return l(`div`,{className:`flex items-center justify-between rounded-lg border p-3`,children:[l(`div`,{className:`flex items-center gap-3`,children:[c(`span`,{className:t?`text-green-500`:`text-amber-500`,children:t?`✓`:`○`}),c(`span`,{className:t?`text-muted-foreground`:`text-foreground`,children:e.title})]}),c(`span`,{className:`text-sm ${t?`text-green-500`:`text-muted-foreground`}`,children:t?`Actioned`:`Pending`})]},e.id)})})})]})]})}export{u as ProgressView};
@@ -0,0 +1 @@
1
+ "use client";import{TipCard as e}from"../components/TipCard.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({track:r,progress:i,onStepComplete:a}){let o=i.completedStepIds.length,s=r.steps.length,c=[...r.steps].sort((e,t)=>{let n=i.completedStepIds.includes(e.id);return n===i.completedStepIds.includes(t.id)?0:n?1:-1}),l=r.steps.find(e=>!i.completedStepIds.includes(e.id))?.id;return n(`div`,{className:`space-y-6`,children:[n(`div`,{className:`text-center`,children:[t(`h2`,{className:`text-xl font-bold`,children:`Coaching Tips`}),t(`p`,{className:`text-muted-foreground`,children:`Review and take action on personalized tips`}),n(`p`,{className:`text-muted-foreground mt-2 text-sm`,children:[o,` of `,s,` tips actioned`]})]}),t(`div`,{className:`space-y-3`,children:c.map(n=>t(e,{step:n,isCompleted:i.completedStepIds.includes(n.id),isCurrent:n.id===l,onComplete:()=>a?.(n.id),onDismiss:()=>a?.(n.id)},n.id))}),o===s&&n(`div`,{className:`text-muted-foreground text-center`,children:[t(`span`,{className:`text-2xl`,children:`✨`}),t(`p`,{className:`mt-2`,children:`All tips have been addressed!`})]})]})}export{r as Steps};
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{TipFeed as i}from"../components/TipFeed.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({track:s,progress:c}){let l=s.steps.map(e=>({step:e,isCompleted:c.completedStepIds.includes(e.id),completedAt:c.completedStepIds.includes(e.id)?`Recently`:void 0})).sort((e,t)=>e.isCompleted&&!t.isCompleted?-1:!e.isCompleted&&t.isCompleted?1:0),u=l.filter(e=>e.isCompleted).length,d=l.length-u;return o(`div`,{className:`space-y-6`,children:[o(`div`,{className:`text-center`,children:[a(`h2`,{className:`text-xl font-bold`,children:`Activity Timeline`}),a(`p`,{className:`text-muted-foreground`,children:`Your coaching journey and tip history`})]}),o(`div`,{className:`grid grid-cols-2 gap-4`,children:[a(e,{children:o(t,{className:`p-4 text-center`,children:[a(`div`,{className:`text-2xl font-bold text-green-500`,children:u}),a(`div`,{className:`text-muted-foreground text-sm`,children:`Tips Actioned`})]})}),a(e,{children:o(t,{className:`p-4 text-center`,children:[a(`div`,{className:`text-2xl font-bold text-amber-500`,children:d}),a(`div`,{className:`text-muted-foreground text-sm`,children:`Tips Pending`})]})})]}),o(e,{children:[a(n,{children:o(r,{className:`flex items-center gap-2`,children:[a(`span`,{children:`📝`}),a(`span`,{children:`Coaching Feed`})]})}),a(t,{children:a(i,{items:l})})]}),o(e,{children:[a(n,{children:o(r,{className:`flex items-center gap-2`,children:[a(`span`,{children:`📈`}),a(`span`,{children:`Journey Stats`})]})}),a(t,{children:o(`div`,{className:`space-y-4`,children:[o(`div`,{className:`flex items-center justify-between`,children:[a(`span`,{className:`text-muted-foreground`,children:`Total Tips`}),a(`span`,{className:`font-semibold`,children:s.steps.length})]}),o(`div`,{className:`flex items-center justify-between`,children:[a(`span`,{className:`text-muted-foreground`,children:`Completed`}),a(`span`,{className:`font-semibold text-green-500`,children:u})]}),o(`div`,{className:`flex items-center justify-between`,children:[a(`span`,{className:`text-muted-foreground`,children:`XP Earned`}),a(`span`,{className:`font-semibold text-orange-500`,children:c.xpEarned})]}),o(`div`,{className:`flex items-center justify-between`,children:[a(`span`,{className:`text-muted-foreground`,children:`Current Streak`}),a(`span`,{className:`font-semibold`,children:c.streakDays>0?`🔥 ${c.streakDays} days`:`Start today!`})]})]})})]})]})}export{s as Timeline};
@@ -0,0 +1 @@
1
+ import{Overview as e}from"./Overview.js";import{Steps as t}from"./Steps.js";import{ProgressView as n}from"./Progress.js";import{Timeline as r}from"./Timeline.js";
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t}from"../../../libs/ui-kit-web/dist/ui/card.js";import{useLearningProgress as n}from"../../learning-journey-ui-shared/src/hooks/useLearningProgress.js";import{ViewTabs as r}from"../../learning-journey-ui-shared/src/components/ViewTabs.js";import"../../learning-journey-ui-shared/src/index.js";import{Overview as i}from"./views/Overview.js";import{Steps as a}from"./views/Steps.js";import{Progress as o}from"./views/Progress.js";import{Timeline as s}from"./views/Timeline.js";import{useCallback as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";function f({track:f,progress:p,onStepComplete:m,onViewChange:h,initialView:g=`overview`}){let[_,v]=l(g),{progress:y,completeStep:b}=n(f),x=p??y,S=c(e=>{v(e),h?.(e)},[h]),C=c(e=>{m?m(e):b(e)},[m,b]),w=c(()=>{v(`steps`),h?.(`steps`)},[h]);return d(`div`,{className:`space-y-6`,children:[u(e,{children:u(t,{className:`p-4`,children:u(r,{currentView:_,onViewChange:S})})}),(()=>{let e={track:f,progress:x,onStepComplete:C};switch(_){case`overview`:return u(i,{...e,onStart:w});case`steps`:return u(a,{...e});case`progress`:return u(o,{...e});case`timeline`:return u(s,{...e});default:return u(i,{...e,onStart:w})}})()]})}export{f as GamifiedMiniApp};
@@ -0,0 +1 @@
1
+ "use client";import{cn as e}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";function i({totalDays:i,currentDay:a,completedDays:o}){return n(`div`,{className:`grid grid-cols-7 gap-2`,children:Array.from({length:i},(e,t)=>t+1).map(i=>{let s=o.includes(i),c=i===a,l=i>a;return n(`div`,{className:e(`flex h-12 w-12 flex-col items-center justify-center rounded-lg border text-sm font-medium transition-all`,s&&`border-green-500 bg-green-500/10 text-green-500`,c&&!s&&`border-violet-500 bg-violet-500/10 text-violet-500 ring-2 ring-violet-500/50`,l&&`border-muted bg-muted/50 text-muted-foreground`,!s&&!c&&!l&&`border-border bg-card`),children:s?n(`span`,{className:`text-lg`,children:`✓`}):l?n(`span`,{className:`text-lg`,children:`🔒`}):r(t,{children:[n(`span`,{className:`text-muted-foreground text-xs`,children:`Day`}),n(`span`,{children:i})]})},i)})})}export{i as DayCalendar};
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{cn as n}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{Button$1 as r}from"../../../../libs/design-system/dist/components/atoms/Button.js";import{useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({step:s,isCompleted:c,isCurrent:l,onComplete:u}){let[d,f]=i(!1);return a(e,{className:n(`relative cursor-pointer overflow-hidden transition-all duration-300`,l&&`ring-primary ring-2`,c&&`opacity-60`),onClick:()=>!c&&f(!d),children:o(t,{className:`p-6`,children:[o(`div`,{className:n(`space-y-4 transition-opacity duration-200`,d?`opacity-0`:`opacity-100`),children:[o(`div`,{className:`flex items-start justify-between`,children:[o(`div`,{className:`flex-1`,children:[a(`h3`,{className:`text-lg font-semibold`,children:s.title}),s.description&&a(`p`,{className:`text-muted-foreground mt-1 text-sm`,children:s.description})]}),s.xpReward&&o(`span`,{className:`rounded-full bg-green-500/10 px-2 py-1 text-xs font-semibold text-green-500`,children:[`+`,s.xpReward,` XP`]})]}),c&&o(`div`,{className:`flex items-center gap-2 text-green-500`,children:[a(`span`,{children:`✓`}),a(`span`,{className:`text-sm font-medium`,children:`Completed`})]}),l&&!c&&a(`p`,{className:`text-muted-foreground text-xs`,children:`Tap to reveal action`})]}),d&&!c&&o(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-4 bg-gradient-to-br from-violet-500/10 to-violet-600/10 p-6`,children:[a(`p`,{className:`text-center text-sm`,children:s.instructions??`Complete this step to earn XP`}),o(`div`,{className:`flex gap-2`,children:[a(r,{variant:`outline`,size:`sm`,onClick:()=>f(!1),children:`Back`}),a(r,{size:`sm`,onClick:e=>{e.stopPropagation(),u?.()},children:`Mark Complete`})]})]})]})})}export{s as FlashCard};
@@ -0,0 +1 @@
1
+ "use client";import{cn as e}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";const r={sm:{container:`h-16 w-16`,text:`text-xs`,ring:48,stroke:4},md:{container:`h-24 w-24`,text:`text-sm`,ring:72,stroke:6},lg:{container:`h-32 w-32`,text:`text-base`,ring:96,stroke:8}},i={green:`stroke-green-500`,blue:`stroke-blue-500`,violet:`stroke-violet-500`,orange:`stroke-orange-500`};function a({label:a,percentage:o,size:s=`md`,color:c=`violet`}){let l=r[s],u=(l.ring-l.stroke)/2,d=2*Math.PI*u,f=d-o/100*d;return n(`div`,{className:e(`relative flex flex-col items-center gap-1`,l.container),children:[n(`svg`,{className:`absolute -rotate-90`,width:l.ring,height:l.ring,viewBox:`0 0 ${l.ring} ${l.ring}`,children:[t(`circle`,{cx:l.ring/2,cy:l.ring/2,r:u,fill:`none`,strokeWidth:l.stroke,className:`stroke-muted`}),t(`circle`,{cx:l.ring/2,cy:l.ring/2,r:u,fill:`none`,strokeWidth:l.stroke,strokeLinecap:`round`,strokeDasharray:d,strokeDashoffset:f,className:e(`transition-all duration-500`,i[c])})]}),t(`div`,{className:`flex h-full flex-col items-center justify-center`,children:n(`span`,{className:e(`font-bold`,l.text),children:[Math.round(o),`%`]})}),t(`span`,{className:e(`text-muted-foreground mt-1 truncate`,l.text),children:a})]})}export{a as MasteryRing};
@@ -0,0 +1 @@
1
+ import{FlashCard as e}from"./FlashCard.js";import{MasteryRing as t}from"./MasteryRing.js";import{DayCalendar as n}from"./DayCalendar.js";
@@ -0,0 +1 @@
1
+ import"./learning-journey-ui-gamified.docblock.js";
@@ -0,0 +1,8 @@
1
+ import{a as e}from"../../../../libs/contracts/dist/docs/registry.js";import"../../../../libs/contracts/dist/docs/index.js";e([{id:`docs.examples.learning-journey-ui-gamified`,title:`Learning Journey UI — Gamified`,summary:`UI mini-app components for gamified learning: flashcards, mastery, streak/calendar.`,kind:`reference`,visibility:`public`,route:`/docs/examples/learning-journey-ui-gamified`,tags:[`learning`,`ui`,`gamified`],body:`## Includes
2
+ - Gamified mini-app shell
3
+ - Views: overview, steps, progress, timeline
4
+ - Components: flash card, mastery ring, day calendar
5
+
6
+ ## Notes
7
+ - Compose with design system components.
8
+ - Respect prefers-reduced-motion; keep tap targets large.`}]);
@@ -0,0 +1 @@
1
+ import{Overview as e}from"./views/Overview.js";import{FlashCard as t}from"./components/FlashCard.js";import{Steps as n}from"./views/Steps.js";import{MasteryRing as r}from"./components/MasteryRing.js";import{Progress as i}from"./views/Progress.js";import{DayCalendar as a}from"./components/DayCalendar.js";import{Timeline as o}from"./views/Timeline.js";import{GamifiedMiniApp as s}from"./GamifiedMiniApp.js";import"./views/index.js";import"./components/index.js";import"./docs/index.js";
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{XpBar as i}from"../../../learning-journey-ui-shared/src/components/XpBar.js";import{StreakCounter as a}from"../../../learning-journey-ui-shared/src/components/StreakCounter.js";import{BadgeDisplay as o}from"../../../learning-journey-ui-shared/src/components/BadgeDisplay.js";import{Button$1 as s}from"../../../../libs/design-system/dist/components/atoms/Button.js";import"../../../learning-journey-ui-shared/src/index.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({track:u,progress:d,onStart:f}){let p=u.totalXp??u.steps.reduce((e,t)=>e+(t.xpReward??0),0)+(u.completionRewards?.xpBonus??0),m=d.completedStepIds.length,h=u.steps.length,g=m===h;return l(`div`,{className:`space-y-6`,children:[c(e,{className:`overflow-hidden bg-gradient-to-br from-violet-500/10 via-purple-500/10 to-fuchsia-500/10`,children:c(t,{className:`p-6`,children:l(`div`,{className:`flex flex-col items-center gap-4 text-center md:flex-row md:text-left`,children:[c(`div`,{className:`flex h-20 w-20 items-center justify-center rounded-2xl bg-gradient-to-br from-violet-500 to-purple-600 text-4xl shadow-lg`,children:g?`🏆`:`🎯`}),l(`div`,{className:`flex-1`,children:[c(`h1`,{className:`text-2xl font-bold`,children:u.name}),c(`p`,{className:`text-muted-foreground mt-1`,children:u.description})]}),c(`div`,{className:`flex items-center gap-3`,children:c(a,{days:d.streakDays,size:`lg`})})]})})}),l(`div`,{className:`grid gap-4 md:grid-cols-3`,children:[l(e,{children:[c(n,{className:`pb-2`,children:c(r,{className:`text-muted-foreground text-sm font-medium`,children:`XP Progress`})}),l(t,{children:[c(`div`,{className:`text-3xl font-bold text-violet-500`,children:d.xpEarned.toLocaleString()}),c(i,{current:d.xpEarned,max:p,showLabel:!1,size:`sm`})]})]}),l(e,{children:[c(n,{className:`pb-2`,children:c(r,{className:`text-muted-foreground text-sm font-medium`,children:`Steps Completed`})}),l(t,{children:[l(`div`,{className:`text-3xl font-bold`,children:[m,` `,l(`span`,{className:`text-muted-foreground text-lg`,children:[`/ `,h]})]}),c(`div`,{className:`bg-muted mt-2 h-2 w-full overflow-hidden rounded-full`,children:c(`div`,{className:`h-full bg-green-500 transition-all duration-500`,style:{width:`${m/h*100}%`}})})]})]}),l(e,{children:[c(n,{className:`pb-2`,children:c(r,{className:`text-muted-foreground text-sm font-medium`,children:`Badges Earned`})}),c(t,{children:c(o,{badges:d.badges,size:`lg`})})]})]}),!g&&l(e,{children:[c(n,{children:l(r,{className:`flex items-center gap-2`,children:[c(`span`,{children:`🎯`}),c(`span`,{children:`Next Challenge`})]})}),c(t,{children:(()=>{let e=u.steps.find(e=>!d.completedStepIds.includes(e.id));return e?l(`div`,{className:`flex items-center justify-between gap-4`,children:[l(`div`,{children:[c(`h3`,{className:`font-semibold`,children:e.title}),c(`p`,{className:`text-muted-foreground text-sm`,children:e.description})]}),l(`div`,{className:`flex items-center gap-3`,children:[e.xpReward&&l(`span`,{className:`rounded-full bg-green-500/10 px-3 py-1 text-sm font-semibold text-green-500`,children:[`+`,e.xpReward,` XP`]}),c(s,{onClick:f,children:`Start`})]})]}):null})()})]}),g&&c(e,{className:`border-green-500/50 bg-green-500/5`,children:l(t,{className:`flex items-center gap-4 p-6`,children:[c(`div`,{className:`text-4xl`,children:`🎉`}),l(`div`,{children:[c(`h3`,{className:`text-lg font-semibold text-green-500`,children:`Track Complete!`}),l(`p`,{className:`text-muted-foreground`,children:[`You've mastered all `,h,` challenges and earned`,` `,d.xpEarned,` XP.`]})]})]})})]})}export{u as Overview};
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{XpBar as i}from"../../../learning-journey-ui-shared/src/components/XpBar.js";import{BadgeDisplay as a}from"../../../learning-journey-ui-shared/src/components/BadgeDisplay.js";import"../../../learning-journey-ui-shared/src/index.js";import{MasteryRing as o}from"../components/MasteryRing.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({track:l,progress:u}){let d=l.totalXp??l.steps.reduce((e,t)=>e+(t.xpReward??0),0)+(l.completionRewards?.xpBonus??0),f=u.completedStepIds.length,p=l.steps.length,m=p>0?f/p*100:0,h=new Map;l.steps.forEach(e=>{let t=e.metadata?.surface??`general`,n=h.get(t)??{total:0,completed:0};h.set(t,{total:n.total+1,completed:n.completed+(u.completedStepIds.includes(e.id)?1:0)})});let g=[`green`,`blue`,`violet`,`orange`];return c(`div`,{className:`space-y-6`,children:[c(e,{children:[s(n,{children:c(r,{className:`flex items-center gap-2`,children:[s(`span`,{children:`⚡`}),s(`span`,{children:`Experience Points`})]})}),c(t,{className:`space-y-4`,children:[c(`div`,{className:`flex items-baseline gap-2`,children:[s(`span`,{className:`text-4xl font-bold text-violet-500`,children:u.xpEarned.toLocaleString()}),c(`span`,{className:`text-muted-foreground`,children:[`/ `,d.toLocaleString(),` XP`]})]}),s(i,{current:u.xpEarned,max:d,showLabel:!1,size:`lg`}),l.completionRewards?.xpBonus&&m<100&&c(`p`,{className:`text-muted-foreground text-sm`,children:[`🎁 Complete all steps for a`,` `,c(`span`,{className:`font-semibold text-green-500`,children:[`+`,l.completionRewards.xpBonus,` XP`]}),` `,`bonus!`]})]})]}),c(e,{children:[s(n,{children:c(r,{className:`flex items-center gap-2`,children:[s(`span`,{children:`🎯`}),s(`span`,{children:`Skill Mastery`})]})}),s(t,{children:c(`div`,{className:`flex flex-wrap justify-center gap-6`,children:[Array.from(h.entries()).map(([e,t],n)=>s(o,{label:e.charAt(0).toUpperCase()+e.slice(1),percentage:t.completed/t.total*100,color:g[n%g.length],size:`lg`},e)),s(o,{label:`Overall`,percentage:m,color:`violet`,size:`lg`})]})})]}),c(e,{children:[s(n,{children:c(r,{className:`flex items-center gap-2`,children:[s(`span`,{children:`🏅`}),s(`span`,{children:`Badges Earned`})]})}),c(t,{children:[s(a,{badges:u.badges,size:`lg`,maxVisible:10}),u.badges.length===0&&s(`p`,{className:`text-muted-foreground text-sm`,children:`Complete the track to earn your first badge!`})]})]}),c(e,{children:[s(n,{children:c(r,{className:`flex items-center gap-2`,children:[s(`span`,{children:`📊`}),s(`span`,{children:`Step Breakdown`})]})}),s(t,{children:s(`div`,{className:`space-y-2`,children:l.steps.map(e=>{let t=u.completedStepIds.includes(e.id);return c(`div`,{className:`flex items-center justify-between rounded-lg border p-3`,children:[c(`div`,{className:`flex items-center gap-3`,children:[s(`span`,{className:t?`text-green-500`:`text-muted-foreground`,children:t?`✓`:`○`}),s(`span`,{className:t?`text-foreground`:`text-muted-foreground`,children:e.title})]}),e.xpReward&&c(`span`,{className:`text-sm font-medium ${t?`text-green-500`:`text-muted-foreground`}`,children:[t?`+`:``,e.xpReward,` XP`]})]},e.id)})})})]})]})}export{l as Progress};
@@ -0,0 +1 @@
1
+ "use client";import{FlashCard as e}from"../components/FlashCard.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({track:r,progress:i,onStepComplete:a}){let o=r.steps.findIndex(e=>!i.completedStepIds.includes(e.id));return n(`div`,{className:`space-y-6`,children:[n(`div`,{className:`text-center`,children:[t(`h2`,{className:`text-xl font-bold`,children:`Complete Your Challenges`}),t(`p`,{className:`text-muted-foreground`,children:`Tap each card to reveal the action, then mark as complete`})]}),t(`div`,{className:`grid gap-4 md:grid-cols-2`,children:r.steps.map((n,r)=>t(e,{step:n,isCompleted:i.completedStepIds.includes(n.id),isCurrent:r===o,onComplete:()=>a?.(n.id)},n.id))}),n(`div`,{className:`text-muted-foreground text-center text-sm`,children:[i.completedStepIds.length,` of `,r.steps.length,` completed`,r.completionRewards?.xpBonus&&n(`span`,{className:`ml-2 text-green-500`,children:[`(+`,r.completionRewards.xpBonus,` XP bonus on completion)`]})]})]})}export{r as Steps};
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{DayCalendar as i}from"../components/DayCalendar.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({track:s,progress:c}){if(s.steps.some(e=>e.availability?.unlockOnDay!==void 0)){let l=Math.max(...s.steps.map(e=>e.availability?.unlockOnDay??1),7),u=s.steps.filter(e=>c.completedStepIds.includes(e.id)).map(e=>e.availability?.unlockOnDay??1),d=s.steps.find(e=>!c.completedStepIds.includes(e.id))?.availability?.unlockOnDay??1;return o(`div`,{className:`space-y-6`,children:[o(`div`,{className:`text-center`,children:[a(`h2`,{className:`text-xl font-bold`,children:s.name}),a(`p`,{className:`text-muted-foreground`,children:`Complete each day's challenge to progress`})]}),o(e,{children:[a(n,{children:o(r,{className:`flex items-center gap-2`,children:[a(`span`,{children:`📅`}),a(`span`,{children:`Your Journey`})]})}),a(t,{className:`flex justify-center`,children:a(i,{totalDays:l,currentDay:d,completedDays:u})})]}),o(e,{children:[a(n,{children:o(r,{className:`flex items-center gap-2`,children:[a(`span`,{children:`📝`}),a(`span`,{children:`Daily Challenges`})]})}),a(t,{children:a(`div`,{className:`space-y-3`,children:s.steps.map(e=>{let t=e.availability?.unlockOnDay??1,n=c.completedStepIds.includes(e.id),r=t>d;return o(`div`,{className:`flex items-start gap-4 rounded-lg border p-4 ${r?`opacity-50`:``}`,children:[a(`div`,{className:`bg-muted flex h-10 w-10 shrink-0 items-center justify-center rounded-lg font-semibold`,children:n?`✓`:r?`🔒`:t}),o(`div`,{className:`flex-1`,children:[a(`h4`,{className:`font-semibold`,children:e.title}),a(`p`,{className:`text-muted-foreground text-sm`,children:e.description})]}),e.xpReward&&o(`span`,{className:`text-sm font-medium ${n?`text-green-500`:`text-muted-foreground`}`,children:[`+`,e.xpReward,` XP`]})]},e.id)})})})]})]})}return o(`div`,{className:`space-y-6`,children:[o(`div`,{className:`text-center`,children:[a(`h2`,{className:`text-xl font-bold`,children:`Learning Path`}),a(`p`,{className:`text-muted-foreground`,children:`Follow the steps to master this skill`})]}),a(e,{children:a(t,{className:`p-6`,children:o(`div`,{className:`relative`,children:[a(`div`,{className:`bg-border absolute top-0 left-5 h-full w-0.5`}),a(`div`,{className:`space-y-6`,children:s.steps.map((e,t)=>{let n=c.completedStepIds.includes(e.id),r=!n&&s.steps.slice(0,t).every(e=>c.completedStepIds.includes(e.id));return o(`div`,{className:`relative flex gap-4 pl-2`,children:[a(`div`,{className:`relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 ${n?`border-green-500 bg-green-500 text-white`:r?`border-violet-500 bg-violet-500 text-white`:`border-border bg-background`}`,children:n?`✓`:t+1}),a(`div`,{className:`flex-1 pb-4`,children:o(`div`,{className:`flex items-start justify-between gap-2`,children:[o(`div`,{children:[a(`h4`,{className:`font-semibold ${n?`text-foreground`:r?`text-violet-500`:`text-muted-foreground`}`,children:e.title}),a(`p`,{className:`text-muted-foreground mt-1 text-sm`,children:e.description})]}),e.xpReward&&o(`span`,{className:`shrink-0 rounded-full px-2 py-1 text-xs font-semibold ${n?`bg-green-500/10 text-green-500`:`bg-muted text-muted-foreground`}`,children:[`+`,e.xpReward,` XP`]})]})})]},e.id)})})]})})})]})}export{s as Timeline};
@@ -0,0 +1 @@
1
+ import{Overview as e}from"./Overview.js";import{Steps as t}from"./Steps.js";import{Progress as n}from"./Progress.js";import{Timeline as r}from"./Timeline.js";
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t}from"../../../libs/ui-kit-web/dist/ui/card.js";import{useLearningProgress as n}from"../../learning-journey-ui-shared/src/hooks/useLearningProgress.js";import{ViewTabs as r}from"../../learning-journey-ui-shared/src/components/ViewTabs.js";import"../../learning-journey-ui-shared/src/index.js";import{Overview as i}from"./views/Overview.js";import{Steps as a}from"./views/Steps.js";import{ProgressView as o}from"./views/Progress.js";import{Timeline as s}from"./views/Timeline.js";import{useCallback as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";function f({track:f,progress:p,onStepComplete:m,onViewChange:h,initialView:g=`overview`}){let[_,v]=l(g),{progress:y,completeStep:b}=n(f),x=p??y,S=c(e=>{v(e),h?.(e)},[h]),C=c(e=>{m?m(e):b(e)},[m,b]),w=c(()=>{v(`steps`),h?.(`steps`)},[h]);return d(`div`,{className:`space-y-6`,children:[u(e,{children:u(t,{className:`p-4`,children:u(r,{currentView:_,onViewChange:S})})}),(()=>{let e={track:f,progress:x,onStepComplete:C};switch(_){case`overview`:return u(i,{...e,onStart:w});case`steps`:return u(a,{...e});case`progress`:return u(o,{...e});case`timeline`:return u(s,{...e});default:return u(i,{...e,onStart:w})}})()]})}export{f as OnboardingMiniApp};
@@ -0,0 +1 @@
1
+ "use client";import{useState as e}from"react";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";
@@ -0,0 +1 @@
1
+ "use client";import{cn as e}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";const r={templates:`📋`,"spec-editor":`✏️`,regenerator:`🔄`,playground:`🎮`,evolution:`🤖`,dashboard:`📊`,settings:`⚙️`,default:`📍`};function i({steps:i,completedStepIds:a,currentStepId:o}){return t(`div`,{className:`relative overflow-x-auto pb-4`,children:t(`div`,{className:`flex min-w-max items-center gap-2`,children:i.map((s,c)=>{let l=a.includes(s.id),u=s.id===o,d=r[s.metadata?.surface??`default`]??r.default;return n(`div`,{className:`flex items-center`,children:[n(`div`,{className:`flex flex-col items-center gap-2`,children:[t(`div`,{className:e(`flex h-14 w-14 items-center justify-center rounded-2xl border-2 text-2xl transition-all`,l&&`border-green-500 bg-green-500/10`,u&&!l&&`border-violet-500 bg-violet-500/10 ring-4 ring-violet-500/20`,!l&&!u&&`border-muted bg-muted/50`),children:l?`✓`:d}),t(`div`,{className:`text-center`,children:t(`p`,{className:e(`max-w-[100px] truncate text-xs font-medium`,l&&`text-green-500`,u&&!l&&`text-violet-500`,!l&&!u&&`text-muted-foreground`),children:s.title})})]}),c<i.length-1&&t(`div`,{className:e(`mx-2 h-1 w-8 rounded-full transition-colors`,a.includes(i[c+1]?.id??``)?`bg-green-500`:l?`bg-green-500/50`:`bg-muted`)})]},s.id)})})})}export{i as JourneyMap};
@@ -0,0 +1 @@
1
+ "use client";import{Button$1 as e}from"../../../../libs/design-system/dist/components/atoms/Button.js";import{cn as t}from"../../../../libs/ui-kit-core/dist/utils.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({step:i,stepNumber:a,isCompleted:o,isCurrent:s,isExpanded:c,onToggle:l,onComplete:u}){return r(`div`,{className:t(`rounded-xl border transition-all`,o&&`border-green-500/50 bg-green-500/5`,s&&!o&&`border-violet-500 bg-violet-500/5`,!o&&!s&&`border-border`),children:[r(`button`,{type:`button`,className:`flex w-full items-center gap-4 p-4 text-left`,onClick:l,children:[n(`div`,{className:t(`flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors`,o&&`border-green-500 bg-green-500 text-white`,s&&!o&&`border-violet-500 text-violet-500`,!o&&!s&&`border-muted-foreground text-muted-foreground`),children:o?`✓`:a}),r(`div`,{className:`min-w-0 flex-1`,children:[n(`h4`,{className:t(`font-semibold`,o&&`text-green-500`,s&&!o&&`text-foreground`,!o&&!s&&`text-muted-foreground`),children:i.title}),!c&&i.description&&n(`p`,{className:`text-muted-foreground truncate text-sm`,children:i.description})]}),i.xpReward&&r(`span`,{className:t(`shrink-0 rounded-full px-2 py-1 text-xs font-semibold`,o?`bg-green-500/10 text-green-500`:`bg-muted text-muted-foreground`),children:[`+`,i.xpReward,` XP`]}),n(`span`,{className:t(`shrink-0 transition-transform`,c&&`rotate-180`),children:`▼`})]}),c&&r(`div`,{className:`border-t px-4 py-4`,children:[i.description&&n(`p`,{className:`text-muted-foreground mb-4`,children:i.description}),i.instructions&&r(`div`,{className:`bg-muted mb-4 rounded-lg p-4`,children:[n(`p`,{className:`mb-2 text-sm font-medium`,children:`Instructions:`}),n(`p`,{className:`text-muted-foreground text-sm`,children:i.instructions})]}),r(`div`,{className:`flex flex-wrap gap-2`,children:[i.actionUrl&&n(e,{variant:`outline`,size:`sm`,onClick:()=>window.open(i.actionUrl,`_blank`),children:i.actionLabel??`Try it`}),!o&&n(e,{size:`sm`,onClick:u,children:`Mark as Complete`})]})]})]})}export{i as StepChecklist};
@@ -0,0 +1 @@
1
+ import{StepChecklist as e}from"./StepChecklist.js";import{JourneyMap as t}from"./JourneyMap.js";import"./CodeSnippet.js";
@@ -0,0 +1 @@
1
+ import"./learning-journey-ui-onboarding.docblock.js";
@@ -0,0 +1,8 @@
1
+ import{a as e}from"../../../../libs/contracts/dist/docs/registry.js";import"../../../../libs/contracts/dist/docs/index.js";e([{id:`docs.examples.learning-journey-ui-onboarding`,title:`Learning Journey UI — Onboarding`,summary:`UI mini-app components for onboarding: checklists, snippets, and journey mapping.`,kind:`reference`,visibility:`public`,route:`/docs/examples/learning-journey-ui-onboarding`,tags:[`learning`,`ui`,`onboarding`],body:`## Includes
2
+ - Onboarding mini-app shell
3
+ - Views: overview, steps, progress, timeline
4
+ - Components: step checklist, code snippet, journey map
5
+
6
+ ## Notes
7
+ - Compose with design system components.
8
+ - Ensure accessible labels and keyboard navigation.`}]);
@@ -0,0 +1 @@
1
+ import{Overview as e}from"./views/Overview.js";import{StepChecklist as t}from"./components/StepChecklist.js";import{Steps as n}from"./views/Steps.js";import{ProgressView as r}from"./views/Progress.js";import{JourneyMap as i}from"./components/JourneyMap.js";import{Timeline as a}from"./views/Timeline.js";import{OnboardingMiniApp as o}from"./OnboardingMiniApp.js";import"./views/index.js";import"./components/index.js";import"./docs/index.js";
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{Progress as i}from"../../../../libs/ui-kit-web/dist/ui/progress.js";import{XpBar as a}from"../../../learning-journey-ui-shared/src/components/XpBar.js";import{Button$1 as o}from"../../../../libs/design-system/dist/components/atoms/Button.js";import"../../../learning-journey-ui-shared/src/index.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({track:l,progress:u,onStart:d}){let f=l.steps.length,p=u.completedStepIds.length,m=f>0?p/f*100:0,h=p===f,g=f-p,_=g*5,v=l.totalXp??l.steps.reduce((e,t)=>e+(t.xpReward??0),0)+(l.completionRewards?.xpBonus??0);return c(`div`,{className:`space-y-6`,children:[s(e,{className:`overflow-hidden bg-gradient-to-r from-blue-500/10 via-violet-500/10 to-purple-500/10`,children:s(t,{className:`p-8`,children:c(`div`,{className:`flex flex-col items-center gap-6 text-center md:flex-row md:text-left`,children:[s(`div`,{className:`flex h-20 w-20 items-center justify-center rounded-2xl bg-gradient-to-br from-blue-500 to-violet-600 text-4xl shadow-lg`,children:h?`🎉`:`🚀`}),c(`div`,{className:`flex-1`,children:[s(`h1`,{className:`text-2xl font-bold`,children:l.name}),s(`p`,{className:`text-muted-foreground mt-1 max-w-2xl`,children:l.description}),!h&&c(`p`,{className:`text-muted-foreground mt-3 text-sm`,children:[`⏱️ Estimated time:`,` `,_>0?`~${_} minutes`:`Less than a minute`]})]}),!h&&s(o,{size:`lg`,onClick:d,children:p>0?`Continue`:`Get Started`})]})})}),c(`div`,{className:`grid gap-4 md:grid-cols-3`,children:[c(e,{children:[s(n,{className:`pb-2`,children:s(r,{className:`text-muted-foreground text-sm font-medium`,children:`Progress`})}),c(t,{children:[c(`div`,{className:`text-3xl font-bold`,children:[Math.round(m),`%`]}),s(i,{value:m,className:`mt-2 h-2`}),c(`p`,{className:`text-muted-foreground mt-2 text-sm`,children:[p,` of `,f,` steps completed`]})]})]}),c(e,{children:[s(n,{className:`pb-2`,children:s(r,{className:`text-muted-foreground text-sm font-medium`,children:`XP Earned`})}),c(t,{children:[s(`div`,{className:`text-3xl font-bold text-blue-500`,children:u.xpEarned}),s(a,{current:u.xpEarned,max:v,showLabel:!1,size:`sm`})]})]}),c(e,{children:[s(n,{className:`pb-2`,children:s(r,{className:`text-muted-foreground text-sm font-medium`,children:`Time Remaining`})}),c(t,{children:[s(`div`,{className:`text-3xl font-bold`,children:h?`✓`:`~${_}m`}),s(`p`,{className:`text-muted-foreground mt-2 text-sm`,children:h?`All done!`:`${g} steps to go`})]})]})]}),c(e,{children:[s(n,{children:c(r,{className:`flex items-center gap-2`,children:[s(`span`,{children:`📋`}),s(`span`,{children:`Your Journey`})]})}),s(t,{children:s(`div`,{className:`space-y-3`,children:l.steps.map((e,t)=>{let n=u.completedStepIds.includes(e.id),r=!n&&l.steps.slice(0,t).every(e=>u.completedStepIds.includes(e.id));return c(`div`,{className:`flex items-center gap-4 rounded-lg border p-3`,children:[s(`div`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm font-semibold ${n?`bg-green-500 text-white`:r?`bg-blue-500 text-white`:`bg-muted text-muted-foreground`}`,children:n?`✓`:t+1}),s(`div`,{className:`min-w-0 flex-1`,children:s(`p`,{className:`font-medium ${n?`text-green-500`:r?`text-foreground`:`text-muted-foreground`}`,children:e.title})}),e.xpReward&&c(`span`,{className:`text-muted-foreground text-sm`,children:[`+`,e.xpReward,` XP`]})]},e.id)})})})]}),h&&s(e,{className:`border-green-500/50 bg-green-500/5`,children:c(t,{className:`flex items-center gap-4 p-6`,children:[s(`div`,{className:`text-4xl`,children:`🎉`}),c(`div`,{children:[s(`h3`,{className:`text-lg font-semibold text-green-500`,children:`Onboarding Complete!`}),c(`p`,{className:`text-muted-foreground`,children:[`You've completed all `,f,` steps. Welcome aboard!`]})]})]})})]})}export{l as Overview};
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{Progress as i}from"../../../../libs/ui-kit-web/dist/ui/progress.js";import{XpBar as a}from"../../../learning-journey-ui-shared/src/components/XpBar.js";import{BadgeDisplay as o}from"../../../learning-journey-ui-shared/src/components/BadgeDisplay.js";import"../../../learning-journey-ui-shared/src/index.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({track:l,progress:u}){let d=l.steps.length,f=u.completedStepIds.length,p=d>0?f/d*100:0,m=l.totalXp??l.steps.reduce((e,t)=>e+(t.xpReward??0),0)+(l.completionRewards?.xpBonus??0),h=d-f,g=h*5;return c(`div`,{className:`space-y-6`,children:[c(e,{children:[s(n,{children:c(r,{className:`flex items-center gap-2`,children:[s(`span`,{children:`📈`}),s(`span`,{children:`Your Progress`})]})}),c(t,{className:`space-y-6`,children:[s(`div`,{className:`flex items-center justify-center`,children:c(`div`,{className:`relative flex h-40 w-40 items-center justify-center`,children:[c(`svg`,{className:`absolute h-full w-full -rotate-90`,viewBox:`0 0 100 100`,children:[s(`circle`,{cx:`50`,cy:`50`,r:`45`,fill:`none`,strokeWidth:`8`,className:`stroke-muted`}),s(`circle`,{cx:`50`,cy:`50`,r:`45`,fill:`none`,strokeWidth:`8`,strokeLinecap:`round`,strokeDasharray:`${p*2.83} 283`,className:`stroke-blue-500 transition-all duration-500`})]}),c(`div`,{className:`text-center`,children:[c(`div`,{className:`text-3xl font-bold`,children:[Math.round(p),`%`]}),s(`div`,{className:`text-muted-foreground text-sm`,children:`Complete`})]})]})}),c(`div`,{className:`grid grid-cols-3 gap-4 text-center`,children:[c(`div`,{children:[s(`div`,{className:`text-2xl font-bold text-green-500`,children:f}),s(`div`,{className:`text-muted-foreground text-sm`,children:`Completed`})]}),c(`div`,{children:[s(`div`,{className:`text-2xl font-bold text-orange-500`,children:h}),s(`div`,{className:`text-muted-foreground text-sm`,children:`Remaining`})]}),c(`div`,{children:[c(`div`,{className:`text-2xl font-bold`,children:[g,`m`]}),s(`div`,{className:`text-muted-foreground text-sm`,children:`Est. Time`})]})]})]})]}),c(e,{children:[s(n,{children:c(r,{className:`flex items-center gap-2`,children:[s(`span`,{children:`⚡`}),s(`span`,{children:`Experience Points`})]})}),c(t,{className:`space-y-4`,children:[c(`div`,{className:`flex items-baseline gap-2`,children:[s(`span`,{className:`text-3xl font-bold text-blue-500`,children:u.xpEarned}),c(`span`,{className:`text-muted-foreground`,children:[`/ `,m,` XP`]})]}),s(a,{current:u.xpEarned,max:m,showLabel:!1,size:`lg`})]})]}),c(e,{children:[s(n,{children:c(r,{className:`flex items-center gap-2`,children:[s(`span`,{children:`🏅`}),s(`span`,{children:`Achievements`})]})}),c(t,{children:[s(o,{badges:u.badges,size:`lg`}),u.badges.length===0&&l.completionRewards?.badgeKey&&c(`p`,{className:`text-muted-foreground text-sm`,children:[`Complete all steps to earn the "`,l.completionRewards.badgeKey,`" badge!`]})]})]}),c(e,{children:[s(n,{children:c(r,{className:`flex items-center gap-2`,children:[s(`span`,{children:`📋`}),s(`span`,{children:`Step Details`})]})}),s(t,{children:s(`div`,{className:`space-y-3`,children:l.steps.map((e,t)=>{let n=u.completedStepIds.includes(e.id),r=n?100:0;return c(`div`,{className:`space-y-1`,children:[c(`div`,{className:`flex items-center justify-between text-sm`,children:[c(`span`,{className:n?`text-green-500`:`text-foreground`,children:[t+1,`. `,e.title]}),s(`span`,{className:n?`text-green-500`:`text-muted-foreground`,children:n?`✓`:`Pending`})]}),s(i,{value:r,className:`h-1`})]},e.id)})})})]})]})}export{l as ProgressView};
@@ -0,0 +1 @@
1
+ "use client";import{Progress as e}from"../../../../libs/ui-kit-web/dist/ui/progress.js";import{StepChecklist as t}from"../components/StepChecklist.js";import{useState as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a({track:a,progress:o,onStepComplete:s}){let[c,l]=n(()=>a.steps.find(e=>!o.completedStepIds.includes(e.id))?.id??null),u=o.completedStepIds.length,d=a.steps.length,f=d>0?u/d*100:0,p=a.steps.findIndex(e=>!o.completedStepIds.includes(e.id));return i(`div`,{className:`space-y-6`,children:[i(`div`,{className:`space-y-2`,children:[i(`div`,{className:`flex items-center justify-between`,children:[r(`h2`,{className:`text-xl font-bold`,children:`Complete Each Step`}),i(`span`,{className:`text-muted-foreground text-sm`,children:[u,` / `,d,` completed`]})]}),r(e,{value:f,className:`h-2`})]}),r(`div`,{className:`space-y-3`,children:a.steps.map((e,n)=>{let i=o.completedStepIds.includes(e.id),u=n===p;return r(t,{step:e,stepNumber:n+1,isCompleted:i,isCurrent:u,isExpanded:c===e.id,onToggle:()=>l(c===e.id?null:e.id),onComplete:()=>{s?.(e.id);let t=a.steps[n+1];t&&!o.completedStepIds.includes(t.id)&&l(t.id)}},e.id)})}),a.completionRewards&&f<100&&r(`div`,{className:`rounded-lg border border-blue-500/30 bg-blue-500/5 p-4`,children:i(`p`,{className:`text-sm`,children:[`🎁 Complete all steps to unlock:`,a.completionRewards.xpBonus&&i(`span`,{className:`ml-2 font-semibold text-blue-500`,children:[`+`,a.completionRewards.xpBonus,` XP bonus`]}),a.completionRewards.badgeKey&&i(`span`,{className:`ml-2 font-semibold text-amber-500`,children:[`+ "`,a.completionRewards.badgeKey,`" badge`]})]})})]})}export{a as Steps};
@@ -0,0 +1 @@
1
+ "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{JourneyMap as i}from"../components/JourneyMap.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({track:s,progress:c}){let l=s.steps.find(e=>!c.completedStepIds.includes(e.id))?.id??null;return o(`div`,{className:`space-y-6`,children:[o(`div`,{className:`text-center`,children:[a(`h2`,{className:`text-xl font-bold`,children:`Your Learning Journey`}),a(`p`,{className:`text-muted-foreground`,children:`Follow the path through each surface and feature`})]}),o(e,{children:[a(n,{children:o(r,{className:`flex items-center gap-2`,children:[a(`span`,{children:`🗺️`}),a(`span`,{children:`Journey Map`})]})}),a(t,{children:a(i,{steps:s.steps,completedStepIds:c.completedStepIds,currentStepId:l})})]}),o(e,{children:[a(n,{children:o(r,{className:`flex items-center gap-2`,children:[a(`span`,{children:`📍`}),a(`span`,{children:`Step by Step`})]})}),a(t,{children:o(`div`,{className:`relative`,children:[a(`div`,{className:`bg-border absolute top-0 left-4 h-full w-0.5`}),a(`div`,{className:`space-y-6`,children:s.steps.map((e,t)=>{let n=c.completedStepIds.includes(e.id),r=e.id===l,i=e.metadata?.surface??`general`;return o(`div`,{className:`relative flex gap-4 pl-2`,children:[a(`div`,{className:`relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 transition-all ${n?`border-green-500 bg-green-500 text-white`:r?`border-blue-500 bg-blue-500 text-white ring-4 ring-blue-500/20`:`border-border bg-background text-muted-foreground`}`,children:n?`✓`:t+1}),a(`div`,{className:`flex-1 pb-2`,children:o(`div`,{className:`rounded-lg border p-4`,children:[o(`div`,{className:`flex items-start justify-between gap-2`,children:[o(`div`,{children:[o(`div`,{className:`flex items-center gap-2`,children:[a(`h4`,{className:`font-semibold ${n?`text-green-500`:r?`text-blue-500`:`text-foreground`}`,children:e.title}),a(`span`,{className:`bg-muted text-muted-foreground rounded px-2 py-0.5 text-xs`,children:i})]}),a(`p`,{className:`text-muted-foreground mt-1 text-sm`,children:e.description})]}),e.xpReward&&o(`span`,{className:`shrink-0 rounded-full px-2 py-1 text-xs font-semibold ${n?`bg-green-500/10 text-green-500`:`bg-muted text-muted-foreground`}`,children:[`+`,e.xpReward,` XP`]})]}),a(`div`,{className:`mt-3 text-xs`,children:n?a(`span`,{className:`text-green-500`,children:`✓ Completed`}):r?a(`span`,{className:`text-blue-500`,children:`→ In Progress`}):a(`span`,{className:`text-muted-foreground`,children:`○ Not Started`})})]})})]},e.id)})})]})})]})]})}export{s as Timeline};
@@ -0,0 +1 @@
1
+ import{Overview as e}from"./Overview.js";import{Steps as t}from"./Steps.js";import{ProgressView as n}from"./Progress.js";import{Timeline as r}from"./Timeline.js";
@@ -0,0 +1 @@
1
+ "use client";import{cn as e}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";const r={studio_first_30m:`🎯`,platform_tour:`🗺️`,crm_first_win:`🏆`,drill_master:`🧠`,coach_listener:`👂`,quest_complete:`⭐`,streak_7:`🔥`,streak_30:`💎`,default:`🏅`},i={sm:`h-6 w-6 text-sm`,md:`h-8 w-8 text-base`,lg:`h-10 w-10 text-lg`};function a({badges:a,maxVisible:o=5,size:s=`md`}){let c=a.slice(0,o),l=a.length-o;return a.length===0?t(`div`,{className:`text-muted-foreground text-sm`,children:`No badges earned yet`}):n(`div`,{className:`flex items-center gap-1`,children:[c.map(n=>t(`div`,{className:e(`flex items-center justify-center rounded-full bg-gradient-to-br from-amber-400/20 to-amber-600/20`,i[s]),title:n.replace(/_/g,` `),children:r[n]??r.default},n)),l>0&&n(`div`,{className:e(`text-muted-foreground bg-muted flex items-center justify-center rounded-full`,i[s],`text-xs font-medium`),children:[`+`,l]})]})}export{a as BadgeDisplay};
@@ -0,0 +1 @@
1
+ "use client";import{cn as e}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";const r={sm:{container:`gap-1 px-2 py-1`,icon:`text-base`,text:`text-xs`},md:{container:`gap-1.5 px-3 py-1.5`,icon:`text-lg`,text:`text-sm`},lg:{container:`gap-2 px-4 py-2`,icon:`text-xl`,text:`text-base`}};function i({days:i,isActive:a=!0,size:o=`md`}){let s=r[o];return n(`div`,{className:e(`inline-flex items-center rounded-full font-semibold`,s.container,a?`bg-orange-500/10 text-orange-500`:`bg-muted text-muted-foreground`),children:[t(`span`,{className:s.icon,role:`img`,"aria-label":`streak`,children:`🔥`}),n(`span`,{className:s.text,children:[i,` `,i===1?`day`:`days`]})]})}export{i as StreakCounter};
@@ -0,0 +1 @@
1
+ "use client";import{Button$1 as e}from"../../../../libs/design-system/dist/components/atoms/Button.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";const r={overview:{label:`Overview`,icon:`📊`},steps:{label:`Steps`,icon:`📝`},progress:{label:`Progress`,icon:`📈`},timeline:{label:`Timeline`,icon:`📅`}},i=[`overview`,`steps`,`progress`,`timeline`];function a({currentView:a,onViewChange:o,availableViews:s=i}){return t(`div`,{className:`flex flex-wrap gap-2`,children:s.map(i=>{let{label:s,icon:c}=r[i];return n(e,{variant:a===i?`default`:`outline`,size:`sm`,onClick:()=>o(i),className:`gap-1.5`,children:[t(`span`,{children:c}),t(`span`,{children:s})]},i)})})}export{a as ViewTabs};
@@ -0,0 +1 @@
1
+ "use client";import{Progress as e}from"../../../../libs/ui-kit-web/dist/ui/progress.js";import{cn as t}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";const i={sm:`h-2`,md:`h-3`,lg:`h-4`},a={sm:`text-xs`,md:`text-sm`,lg:`text-base`};function o({current:o,max:s,level:c,showLabel:l=!0,size:u=`md`}){let d=s>0?Math.min(o/s*100,100):0;return r(`div`,{className:`w-full space-y-1`,children:[l&&r(`div`,{className:t(`flex items-center justify-between`,a[u]),children:[r(`span`,{className:`text-muted-foreground font-medium`,children:[c!==void 0&&r(`span`,{className:`text-primary mr-1`,children:[`Lvl `,c]}),`XP`]}),r(`span`,{className:`font-semibold`,children:[o.toLocaleString(),` / `,s.toLocaleString()]})]}),n(e,{value:d,className:t(`bg-muted`,i[u])})]})}export{o as XpBar};
@@ -0,0 +1 @@
1
+ import{XpBar as e}from"./XpBar.js";import{StreakCounter as t}from"./StreakCounter.js";import{BadgeDisplay as n}from"./BadgeDisplay.js";import{ViewTabs as r}from"./ViewTabs.js";
@@ -0,0 +1 @@
1
+ import"./learning-journey-ui-shared.docblock.js";
@@ -0,0 +1,7 @@
1
+ import{a as e}from"../../../../libs/contracts/dist/docs/registry.js";import"../../../../libs/contracts/dist/docs/index.js";e([{id:`docs.examples.learning-journey-ui-shared`,title:`Learning Journey UI — Shared`,summary:`Shared UI components and hooks for learning journey mini-apps.`,kind:`reference`,visibility:`public`,route:`/docs/examples/learning-journey-ui-shared`,tags:[`learning`,`ui`,`shared`],body:`## Includes
2
+ - Hooks: useLearningProgress
3
+ - Components: XpBar, StreakCounter, BadgeDisplay, ViewTabs
4
+
5
+ ## Notes
6
+ - Keep components accessible (labels, focus, contrast).
7
+ - Prefer design-system tokens and components.`}]);
@@ -0,0 +1 @@
1
+ import{useLearningProgress as e}from"./useLearningProgress.js";
@@ -0,0 +1 @@
1
+ "use client";import{useCallback as e,useMemo as t,useState as n}from"react";function r(e){return{trackId:e,completedStepIds:[],currentStepId:null,xpEarned:0,streakDays:0,lastActivityDate:null,badges:[]}}function i(i){let[a,o]=n(()=>r(i.id)),s=e(e=>{let t=i.steps.find(t=>t.id===e);!t||a.completedStepIds.includes(e)||o(n=>{let r=[...n.completedStepIds,e],a=t.xpReward??0,o=i.steps.find(e=>!r.includes(e.id)),s=r.length===i.steps.length,c=s?i.completionRewards?.xpBonus??0:0;return{...n,completedStepIds:r,currentStepId:o?.id??null,xpEarned:n.xpEarned+a+c,lastActivityDate:new Date().toISOString(),badges:s&&i.completionRewards?.badgeKey?[...n.badges,i.completionRewards.badgeKey]:n.badges}})},[i,a.completedStepIds]),c=e(()=>{o(r(i.id))},[i.id]),l=e(()=>{o(e=>({...e,streakDays:e.streakDays+1,lastActivityDate:new Date().toISOString()}))},[]);return{progress:a,stats:t(()=>{let e=i.steps.length,t=a.completedStepIds.length,n=e>0?Math.round(t/e*100):0,r=i.totalXp??i.steps.reduce((e,t)=>e+(t.xpReward??0),0)+(i.completionRewards?.xpBonus??0);return{totalSteps:e,completedSteps:t,remainingSteps:e-t,percentComplete:n,totalXp:r,isComplete:t===e}},[i,a.completedStepIds]),completeStep:s,resetProgress:c,incrementStreak:l}}export{i as useLearningProgress};
@@ -0,0 +1 @@
1
+ import{useLearningProgress as e}from"./hooks/useLearningProgress.js";import"./hooks/index.js";import{XpBar as t}from"./components/XpBar.js";import{StreakCounter as n}from"./components/StreakCounter.js";import{BadgeDisplay as r}from"./components/BadgeDisplay.js";import{ViewTabs as i}from"./components/ViewTabs.js";import"./components/index.js";import"./docs/index.js";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{crmLearningTracks as e,learningJourneyTracks as t,mapStep as n,mapTrackSpecToDto as r,onboardingTrackCatalog as i,platformLearningTracks as a,studioLearningTracks as o}from"./tracks.js";import{getProgress as s,listTracks as c,recordEvent as l}from"./api.js";import u from"./example.js";import"./docs/index.js";import{LearningTrackDetailPresentation as d,LearningTrackListPresentation as f,LearningTrackProgressWidgetPresentation as p,learningJourneyPresentations as m}from"./presentations/index.js";import{LearningJourneyRegistryFeature as h}from"./learning-journey-registry.feature.js";import{LearningMiniApp as g,getLearningTemplateIds as _,isLearningTemplate as v}from"./ui/LearningMiniApp.js";import"./ui/index.js";export{h as LearningJourneyRegistryFeature,g as LearningMiniApp,d as LearningTrackDetailPresentation,f as LearningTrackListPresentation,p as LearningTrackProgressWidgetPresentation,e as crmLearningTracks,u as example,_ as getLearningTemplateIds,s as getProgress,v as isLearningTemplate,m as learningJourneyPresentations,t as learningJourneyTracks,c as listTracks,n as mapStep,r as mapTrackSpecToDto,i as onboardingTrackCatalog,a as platformLearningTracks,l as recordEvent,o as studioLearningTracks};
1
+ import{t as e}from"./examples/learning-journey-crm-onboarding/dist/track.js";import{t}from"./examples/learning-journey-platform-tour/dist/track.js";import{t as n}from"./examples/learning-journey-studio-onboarding/dist/track.js";import{learningJourneyTracks as r,mapStep as i,mapTrackSpecToDto as a,onboardingTrackCatalog as o}from"./tracks.js";import{getProgress as s,listTracks as c,recordEvent as l}from"./api.js";import u from"./example.js";import"./docs/index.js";import{LearningTrackDetailPresentation as d,LearningTrackListPresentation as f,LearningTrackProgressWidgetPresentation as p,learningJourneyPresentations as m}from"./presentations/index.js";import{LearningJourneyRegistryFeature as h}from"./learning-journey-registry.feature.js";import{LearningMiniApp as g,getLearningTemplateIds as _,isLearningTemplate as v}from"./ui/LearningMiniApp.js";import"./ui/index.js";export{h as LearningJourneyRegistryFeature,g as LearningMiniApp,d as LearningTrackDetailPresentation,f as LearningTrackListPresentation,p as LearningTrackProgressWidgetPresentation,e as crmLearningTracks,u as example,_ as getLearningTemplateIds,s as getProgress,v as isLearningTemplate,m as learningJourneyPresentations,r as learningJourneyTracks,c as listTracks,i as mapStep,a as mapTrackSpecToDto,o as onboardingTrackCatalog,t as platformLearningTracks,l as recordEvent,n as studioLearningTracks};
@@ -0,0 +1 @@
1
+ var e=(e,t)=>()=>(e&&(t=e(e=0)),t);export{e as __esmMin};
@@ -0,0 +1 @@
1
+ import{Button as e}from"../../ui-kit-web/dist/ui/button.js";import"react";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";import{Loader2 as i}from"lucide-react";function a({children:a,loading:o,spinnerPlacement:s=`start`,onPress:c,onPressIn:l,onPressOut:u,onLongPress:d,onTouchStart:f,onTouchEnd:p,onTouchCancel:m,onMouseDown:h,onMouseUp:g,onClick:_,className:v,disabled:y,...b}){let x=!!(y||o),S=b.asChild?a:r(t,{children:[o&&s===`start`?n(i,{className:`h-4 w-4 animate-spin`}):null,a,o&&s===`end`?n(i,{className:`h-4 w-4 animate-spin`}):null]});return n(e,{...b,className:v,disabled:x,"aria-busy":o?!0:void 0,"aria-disabled":x?!0:void 0,onPress:c||_,onClick:c||_,onMouseDown:h||l,onMouseUp:g||u,onTouchStart:f,onTouchEnd:p||u,onTouchCancel:m||u,type:b?.type??`button`,children:S})}export{a as Button$1};
@@ -0,0 +1 @@
1
+ import{cn as e,init_utils as t}from"../ui-kit-core/dist/utils.js";import*as n from"react";import{jsx as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";import{Slot as a}from"@radix-ui/react-slot";t();const o=i(`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`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,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`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}}),s=n.forwardRef(({className:t,variant:n,size:i,asChild:s=!1,...c},l)=>s?r(a,{"data-slot":`button`,className:e(o({variant:n,size:i,className:t})),...c}):r(`button`,{ref:l,"data-slot":`button`,className:e(o({variant:n,size:i,className:t})),...c}));s.displayName=`Button`;export{s as Button};
@@ -0,0 +1 @@
1
+ import{__esmMin as e}from"../../../../_virtual/rolldown_runtime.js";import{clsx as t}from"clsx";import{twMerge as n}from"tailwind-merge";function r(...e){return n(t(e))}var i=e((()=>{}));i();export{r as cn,i as init_utils};
@@ -0,0 +1 @@
1
+ import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";function n(...n){return t(e(n))}export{n as cn};
@@ -0,0 +1 @@
1
+ import{cn as e}from"../ui-kit-core/dist/utils.js";import"react";import{jsx as t}from"react/jsx-runtime";function n({className:n,...r}){return t(`div`,{"data-slot":`card`,className:e(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-2xs`,n),...r})}function r({className:n,...r}){return t(`div`,{"data-slot":`card-header`,className:e(`@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`,n),...r})}function i({className:n,...r}){return t(`div`,{"data-slot":`card-title`,className:e(`leading-none font-semibold`,n),...r})}function a({className:n,...r}){return t(`div`,{"data-slot":`card-content`,className:e(`px-6`,n),...r})}export{n as Card,a as CardContent,r as CardHeader,i as CardTitle};
@@ -0,0 +1 @@
1
+ "use client";import{cn as e}from"../ui-kit-core/dist/utils.js";import"react";import{jsx as t}from"react/jsx-runtime";import*as n from"@radix-ui/react-progress";function r({className:r,value:i,...a}){return t(n.Root,{"data-slot":`progress`,className:e(`bg-primary/20 relative h-2 w-full overflow-hidden rounded-full`,r),...a,children:t(n.Indicator,{"data-slot":`progress-indicator`,className:`bg-primary h-full w-full flex-1 transition-all`,style:{transform:`translateX(-${100-(i||0)}%)`}})})}export{r as Progress};
@@ -0,0 +1 @@
1
+ import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";function n(...n){return t(e(n))}export{n as cn};
@@ -0,0 +1 @@
1
+ import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";function n(...n){return t(e(n))}export{n as cn};
package/dist/tracks.d.ts CHANGED
@@ -1,7 +1,7 @@
1
+ import { LearningJourneyStepSpec, LearningJourneyTrackSpec, StepAvailabilitySpec, StepCompletionConditionSpec } from "@lssm/module.learning-journey/track-spec";
1
2
  import { crmLearningTracks } from "@lssm/example.learning-journey-crm-onboarding/track";
2
3
  import { platformLearningTracks } from "@lssm/example.learning-journey-platform-tour/track";
3
4
  import { studioLearningTracks } from "@lssm/example.learning-journey-studio-onboarding/track";
4
- import { LearningJourneyStepSpec, LearningJourneyTrackSpec, StepAvailabilitySpec, StepCompletionConditionSpec } from "@lssm/module.learning-journey/track-spec";
5
5
 
6
6
  //#region src/tracks.d.ts
7
7
  interface OnboardingStepDto {
package/dist/tracks.js CHANGED
@@ -1 +1 @@
1
- import{crmLearningTracks as e}from"@lssm/example.learning-journey-crm-onboarding/track";import{drillTracks as t}from"@lssm/example.learning-journey-duo-drills/track";import{ambientCoachTracks as n}from"@lssm/example.learning-journey-ambient-coach/track";import{questTracks as r}from"@lssm/example.learning-journey-quest-challenges/track";import{platformLearningTracks as i}from"@lssm/example.learning-journey-platform-tour/track";import{studioLearningTracks as a}from"@lssm/example.learning-journey-studio-onboarding/track";const o=e=>({id:e.id,title:e.title,description:e.description,completionEvent:e.completion.eventName,completionCondition:e.completion,xpReward:e.xpReward,isRequired:e.isRequired,canSkip:e.canSkip,actionUrl:e.actionUrl,actionLabel:e.actionLabel,availability:e.availability,metadata:e.metadata}),s=e=>({id:e.id,name:e.name,description:e.description,productId:e.productId,targetUserSegment:e.targetUserSegment,targetRole:e.targetRole,totalXp:e.totalXp,streakRule:e.streakRule,completionRewards:e.completionRewards,steps:e.steps.map(o),metadata:e.metadata}),c=[...a,...i,...e,...t,...n,...r],l=c.map(s);export{e as crmLearningTracks,c as learningJourneyTracks,o as mapStep,s as mapTrackSpecToDto,l as onboardingTrackCatalog,i as platformLearningTracks,a as studioLearningTracks};
1
+ import{t as e}from"./examples/learning-journey-crm-onboarding/dist/track.js";import{drillTracks as t}from"./examples/learning-journey-duo-drills/src/track.js";import{ambientCoachTracks as n}from"./examples/learning-journey-ambient-coach/src/track.js";import{questTracks as r}from"./examples/learning-journey-quest-challenges/src/track.js";import{t as i}from"./examples/learning-journey-platform-tour/dist/track.js";import{t as a}from"./examples/learning-journey-studio-onboarding/dist/track.js";const o=e=>({id:e.id,title:e.title,description:e.description,completionEvent:e.completion.eventName,completionCondition:e.completion,xpReward:e.xpReward,isRequired:e.isRequired,canSkip:e.canSkip,actionUrl:e.actionUrl,actionLabel:e.actionLabel,availability:e.availability,metadata:e.metadata}),s=e=>({id:e.id,name:e.name,description:e.description,productId:e.productId,targetUserSegment:e.targetUserSegment,targetRole:e.targetRole,totalXp:e.totalXp,streakRule:e.streakRule,completionRewards:e.completionRewards,steps:e.steps.map(o),metadata:e.metadata}),c=[...a,...i,...e,...t,...n,...r],l=c.map(s);export{e as crmLearningTracks,c as learningJourneyTracks,o as mapStep,s as mapTrackSpecToDto,l as onboardingTrackCatalog,i as platformLearningTracks,a as studioLearningTracks};
@@ -1,5 +1,4 @@
1
1
  import * as react_jsx_runtime0 from "react/jsx-runtime";
2
- import { LearningView } from "@lssm/example.learning-journey-ui-shared";
3
2
 
4
3
  //#region src/ui/LearningMiniApp.d.ts
5
4
  /** Template IDs that map to learning journey tracks */
@@ -1 +1 @@
1
- "use client";import{learningJourneyTracks as e}from"../tracks.js";import{useMemo as t}from"react";import{GamifiedMiniApp as n}from"@lssm/example.learning-journey-ui-gamified";import{OnboardingMiniApp as r}from"@lssm/example.learning-journey-ui-onboarding";import{CoachingMiniApp as i}from"@lssm/example.learning-journey-ui-coaching";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s={"learning-journey-duo-drills":`drills_language_basics`,"learning-journey-quest-challenges":`money_reset_7day`,"learning-journey-studio-onboarding":`studio_getting_started`,"learning-journey-platform-tour":`platform_tour`,"learning-journey-ambient-coach":`money_ambient_coach`,"learning-journey-crm-onboarding":`crm_first_win`},c={"learning-journey-duo-drills":`gamified`,"learning-journey-quest-challenges":`gamified`,"learning-journey-studio-onboarding":`onboarding`,"learning-journey-platform-tour":`onboarding`,"learning-journey-ambient-coach":`coaching`,"learning-journey-crm-onboarding":`coaching`};function l({templateId:l,initialView:u=`overview`,onViewChange:d}){let f=t(()=>{let t=s[l];return t?e.find(e=>e.id===t):null},[l]),p=c[l];if(!f)return a(`div`,{className:`rounded-lg border border-amber-500/50 bg-amber-500/10 p-6 text-center`,children:o(`p`,{className:`text-amber-500`,children:[`Unknown learning template: `,l]})});switch(p){case`gamified`:return a(n,{track:f,initialView:u,onViewChange:d});case`onboarding`:return a(r,{track:f,initialView:u,onViewChange:d});case`coaching`:return a(i,{track:f,initialView:u,onViewChange:d});default:return a(`div`,{className:`rounded-lg border border-red-500/50 bg-red-500/10 p-6 text-center`,children:o(`p`,{className:`text-red-500`,children:[`Unknown app type for template: `,l]})})}}function u(e){return e in s}function d(){return Object.keys(s)}export{l as LearningMiniApp,d as getLearningTemplateIds,u as isLearningTemplate};
1
+ "use client";import{learningJourneyTracks as e}from"../tracks.js";import{GamifiedMiniApp as t}from"../examples/learning-journey-ui-gamified/src/GamifiedMiniApp.js";import"../examples/learning-journey-ui-gamified/src/index.js";import{OnboardingMiniApp as n}from"../examples/learning-journey-ui-onboarding/src/OnboardingMiniApp.js";import"../examples/learning-journey-ui-onboarding/src/index.js";import{CoachingMiniApp as r}from"../examples/learning-journey-ui-coaching/src/CoachingMiniApp.js";import"../examples/learning-journey-ui-coaching/src/index.js";import{useMemo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s={"learning-journey-duo-drills":`drills_language_basics`,"learning-journey-quest-challenges":`money_reset_7day`,"learning-journey-studio-onboarding":`studio_getting_started`,"learning-journey-platform-tour":`platform_tour`,"learning-journey-ambient-coach":`money_ambient_coach`,"learning-journey-crm-onboarding":`crm_first_win`},c={"learning-journey-duo-drills":`gamified`,"learning-journey-quest-challenges":`gamified`,"learning-journey-studio-onboarding":`onboarding`,"learning-journey-platform-tour":`onboarding`,"learning-journey-ambient-coach":`coaching`,"learning-journey-crm-onboarding":`coaching`};function l({templateId:l,initialView:u=`overview`,onViewChange:d}){let f=i(()=>{let t=s[l];return t?e.find(e=>e.id===t):null},[l]),p=c[l];if(!f)return a(`div`,{className:`rounded-lg border border-amber-500/50 bg-amber-500/10 p-6 text-center`,children:o(`p`,{className:`text-amber-500`,children:[`Unknown learning template: `,l]})});switch(p){case`gamified`:return a(t,{track:f,initialView:u,onViewChange:d});case`onboarding`:return a(n,{track:f,initialView:u,onViewChange:d});case`coaching`:return a(r,{track:f,initialView:u,onViewChange:d});default:return a(`div`,{className:`rounded-lg border border-red-500/50 bg-red-500/10 p-6 text-center`,children:o(`p`,{className:`text-red-500`,children:[`Unknown app type for template: `,l]})})}}function u(e){return e in s}function d(){return Object.keys(s)}export{l as LearningMiniApp,d as getLearningTemplateIds,u as isLearningTemplate};
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@lssm/example.learning-journey-registry",
3
- "version": "0.0.0-canary-20251217060433",
3
+ "version": "0.0.0-canary-20251217062139",
4
4
  "description": "Registry that aggregates learning journey example tracks.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "exports": {
9
- ".": "./src/index.ts",
10
- "./api": "./src/api.ts",
11
- "./api-types": "./src/api-types.ts",
12
- "./docs": "./src/docs/index.ts",
13
- "./docs/learning-journey-registry.docblock": "./src/docs/learning-journey-registry.docblock.ts",
14
- "./example": "./src/example.ts",
15
- "./learning-journey-registry.feature": "./src/learning-journey-registry.feature.ts",
16
- "./presentations": "./src/presentations/index.ts",
17
- "./progress-store": "./src/progress-store.ts",
18
- "./tracks": "./src/tracks.ts",
19
- "./ui": "./src/ui/index.ts",
20
- "./ui/LearningMiniApp": "./src/ui/LearningMiniApp.tsx",
9
+ ".": "./dist/index.js",
10
+ "./api": "./dist/api.js",
11
+ "./api-types": "./dist/api-types.js",
12
+ "./docs": "./dist/docs/index.js",
13
+ "./docs/learning-journey-registry.docblock": "./dist/docs/learning-journey-registry.docblock.js",
14
+ "./example": "./dist/example.js",
15
+ "./learning-journey-registry.feature": "./dist/learning-journey-registry.feature.js",
16
+ "./presentations": "./dist/presentations/index.js",
17
+ "./progress-store": "./dist/progress-store.js",
18
+ "./tracks": "./dist/tracks.js",
19
+ "./ui": "./dist/ui/index.js",
20
+ "./ui/LearningMiniApp": "./dist/ui/LearningMiniApp.js",
21
21
  "./*": "./*"
22
22
  },
23
23
  "scripts": {
@@ -34,22 +34,22 @@
34
34
  "lint:check": "eslint src"
35
35
  },
36
36
  "dependencies": {
37
- "@lssm/example.learning-journey-ambient-coach": "0.0.0-canary-20251217060433",
38
- "@lssm/example.learning-journey-duo-drills": "0.0.0-canary-20251217060433",
39
- "@lssm/example.learning-journey-crm-onboarding": "0.0.0-canary-20251217060433",
40
- "@lssm/example.learning-journey-platform-tour": "0.0.0-canary-20251217060433",
41
- "@lssm/example.learning-journey-quest-challenges": "0.0.0-canary-20251217060433",
42
- "@lssm/example.learning-journey-studio-onboarding": "0.0.0-canary-20251217060433",
43
- "@lssm/example.learning-journey-ui-shared": "0.0.0-canary-20251217060433",
44
- "@lssm/example.learning-journey-ui-gamified": "0.0.0-canary-20251217060433",
45
- "@lssm/example.learning-journey-ui-onboarding": "0.0.0-canary-20251217060433",
46
- "@lssm/example.learning-journey-ui-coaching": "0.0.0-canary-20251217060433",
47
- "@lssm/module.learning-journey": "0.0.0-canary-20251217060433",
37
+ "@lssm/example.learning-journey-ambient-coach": "0.0.0-canary-20251217062139",
38
+ "@lssm/example.learning-journey-duo-drills": "0.0.0-canary-20251217062139",
39
+ "@lssm/example.learning-journey-crm-onboarding": "0.0.0-canary-20251217062139",
40
+ "@lssm/example.learning-journey-platform-tour": "0.0.0-canary-20251217062139",
41
+ "@lssm/example.learning-journey-quest-challenges": "0.0.0-canary-20251217062139",
42
+ "@lssm/example.learning-journey-studio-onboarding": "0.0.0-canary-20251217062139",
43
+ "@lssm/example.learning-journey-ui-shared": "0.0.0-canary-20251217062139",
44
+ "@lssm/example.learning-journey-ui-gamified": "0.0.0-canary-20251217062139",
45
+ "@lssm/example.learning-journey-ui-onboarding": "0.0.0-canary-20251217062139",
46
+ "@lssm/example.learning-journey-ui-coaching": "0.0.0-canary-20251217062139",
47
+ "@lssm/module.learning-journey": "0.0.0-canary-20251217062139",
48
48
  "react": "^19.2.3"
49
49
  },
50
50
  "devDependencies": {
51
- "@lssm/tool.tsdown": "0.0.0-canary-20251217060433",
52
- "@lssm/tool.typescript": "0.0.0-canary-20251217060433",
51
+ "@lssm/tool.tsdown": "0.0.0-canary-20251217062139",
52
+ "@lssm/tool.typescript": "0.0.0-canary-20251217062139",
53
53
  "@types/react": "^19.1.6",
54
54
  "tsdown": "^0.17.4",
55
55
  "typescript": "^5.9.3"