@lssm/example.learning-journey-registry 0.0.0-canary-20251217080011 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/.turbo/turbo-build.log +53 -55
  2. package/dist/api.js +1 -170
  3. package/dist/docs/index.js +1 -1
  4. package/dist/docs/learning-journey-registry.docblock.js +1 -38
  5. package/dist/example.js +1 -34
  6. package/dist/index.js +1 -13
  7. package/dist/learning-journey-registry.feature.js +1 -66
  8. package/dist/libs/contracts/src/docs/PUBLISHING.docblock.js +76 -0
  9. package/dist/libs/contracts/src/docs/accessibility_wcag_compliance_specs.docblock.js +350 -0
  10. package/dist/libs/contracts/src/docs/index.js +1 -0
  11. package/dist/libs/contracts/src/docs/presentations.js +1 -0
  12. package/dist/libs/contracts/src/docs/registry.js +1 -0
  13. package/dist/libs/contracts/src/docs/tech/PHASE_1_QUICKSTART.docblock.js +383 -0
  14. package/dist/libs/contracts/src/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +68 -0
  15. package/dist/libs/contracts/src/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +140 -0
  16. package/dist/libs/contracts/src/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +86 -0
  17. package/dist/libs/contracts/src/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +1 -0
  18. package/dist/libs/contracts/{dist → src}/docs/tech/auth/better-auth-nextjs.docblock.js +2 -24
  19. package/dist/libs/contracts/{dist → src}/docs/tech/contracts/openapi-export.docblock.js +2 -21
  20. package/dist/libs/contracts/src/docs/tech/lifecycle-stage-system.docblock.js +213 -0
  21. package/dist/libs/contracts/{dist → src}/docs/tech/llm/llm-integration.docblock.js +5 -73
  22. package/dist/libs/contracts/src/docs/tech/mcp-endpoints.docblock.js +1 -0
  23. package/dist/libs/contracts/src/docs/tech/presentation-runtime.docblock.js +1 -0
  24. package/dist/libs/contracts/src/docs/tech/schema/README.docblock.js +262 -0
  25. package/dist/libs/contracts/src/docs/tech/studio/learning-events.docblock.js +1 -0
  26. package/dist/libs/contracts/{dist → src}/docs/tech/studio/learning-journeys.docblock.js +2 -24
  27. package/dist/libs/contracts/{dist → src}/docs/tech/studio/platform-admin-panel.docblock.js +2 -23
  28. package/dist/libs/contracts/src/docs/tech/studio/project-access-teams.docblock.js +36 -0
  29. package/dist/libs/contracts/src/docs/tech/studio/project-routing.docblock.js +1 -0
  30. package/dist/libs/contracts/src/docs/tech/studio/sandbox-unlogged.docblock.js +20 -0
  31. package/dist/libs/contracts/{dist → src}/docs/tech/studio/team-invitations.docblock.js +36 -40
  32. package/dist/libs/contracts/src/docs/tech/studio/workspace-ops.docblock.js +1 -0
  33. package/dist/libs/contracts/{dist → src}/docs/tech/studio/workspaces.docblock.js +2 -23
  34. package/dist/libs/contracts/{dist → src}/docs/tech/telemetry-ingest.docblock.js +3 -36
  35. package/dist/libs/contracts/src/docs/tech/templates/runtime.docblock.js +1 -0
  36. package/dist/libs/contracts/{dist → src}/docs/tech/vscode-extension.docblock.js +3 -36
  37. package/dist/libs/contracts/src/docs/tech/workflows/overview.docblock.js +1 -0
  38. package/dist/presentations/index.js +1 -64
  39. package/dist/progress-store.js +1 -30
  40. package/dist/tracks.js +1 -47
  41. package/dist/ui/LearningMiniApp.js +1 -82
  42. package/dist/ui/index.js +1 -3
  43. package/package.json +26 -30
  44. package/tsconfig.tsbuildinfo +1 -1
  45. package/.turbo/turbo-build$colon$bundle.log +0 -410
  46. package/CHANGELOG.md +0 -24
  47. package/dist/api-types.d.ts +0 -40
  48. package/dist/api.d.ts +0 -12
  49. package/dist/docs/index.d.ts +0 -1
  50. package/dist/docs/learning-journey-registry.docblock.d.ts +0 -1
  51. package/dist/example.d.ts +0 -32
  52. package/dist/examples/learning-journey-ambient-coach/src/track.js +0 -41
  53. package/dist/examples/learning-journey-crm-onboarding/dist/track.js +0 -98
  54. package/dist/examples/learning-journey-duo-drills/src/track.js +0 -65
  55. package/dist/examples/learning-journey-platform-tour/dist/track.js +0 -105
  56. package/dist/examples/learning-journey-quest-challenges/src/track.js +0 -35
  57. package/dist/examples/learning-journey-studio-onboarding/dist/track.js +0 -90
  58. package/dist/examples/learning-journey-ui-coaching/src/CoachingMiniApp.js +0 -64
  59. package/dist/examples/learning-journey-ui-coaching/src/components/EngagementMeter.js +0 -107
  60. package/dist/examples/learning-journey-ui-coaching/src/components/TipCard.js +0 -75
  61. package/dist/examples/learning-journey-ui-coaching/src/components/TipFeed.js +0 -65
  62. package/dist/examples/learning-journey-ui-coaching/src/components/index.js +0 -3
  63. package/dist/examples/learning-journey-ui-coaching/src/docs/index.js +0 -1
  64. package/dist/examples/learning-journey-ui-coaching/src/docs/learning-journey-ui-coaching.docblock.js +0 -20
  65. package/dist/examples/learning-journey-ui-coaching/src/index.js +0 -11
  66. package/dist/examples/learning-journey-ui-coaching/src/views/Overview.js +0 -152
  67. package/dist/examples/learning-journey-ui-coaching/src/views/Progress.js +0 -117
  68. package/dist/examples/learning-journey-ui-coaching/src/views/Steps.js +0 -68
  69. package/dist/examples/learning-journey-ui-coaching/src/views/Timeline.js +0 -112
  70. package/dist/examples/learning-journey-ui-coaching/src/views/index.js +0 -4
  71. package/dist/examples/learning-journey-ui-gamified/src/GamifiedMiniApp.js +0 -64
  72. package/dist/examples/learning-journey-ui-gamified/src/components/DayCalendar.js +0 -32
  73. package/dist/examples/learning-journey-ui-gamified/src/components/FlashCard.js +0 -79
  74. package/dist/examples/learning-journey-ui-gamified/src/components/MasteryRing.js +0 -81
  75. package/dist/examples/learning-journey-ui-gamified/src/components/index.js +0 -3
  76. package/dist/examples/learning-journey-ui-gamified/src/docs/index.js +0 -1
  77. package/dist/examples/learning-journey-ui-gamified/src/docs/learning-journey-ui-gamified.docblock.js +0 -20
  78. package/dist/examples/learning-journey-ui-gamified/src/index.js +0 -11
  79. package/dist/examples/learning-journey-ui-gamified/src/views/Overview.js +0 -163
  80. package/dist/examples/learning-journey-ui-gamified/src/views/Progress.js +0 -144
  81. package/dist/examples/learning-journey-ui-gamified/src/views/Steps.js +0 -55
  82. package/dist/examples/learning-journey-ui-gamified/src/views/Timeline.js +0 -132
  83. package/dist/examples/learning-journey-ui-gamified/src/views/index.js +0 -4
  84. package/dist/examples/learning-journey-ui-onboarding/src/OnboardingMiniApp.js +0 -64
  85. package/dist/examples/learning-journey-ui-onboarding/src/components/CodeSnippet.js +0 -4
  86. package/dist/examples/learning-journey-ui-onboarding/src/components/JourneyMap.js +0 -48
  87. package/dist/examples/learning-journey-ui-onboarding/src/components/StepChecklist.js +0 -79
  88. package/dist/examples/learning-journey-ui-onboarding/src/components/index.js +0 -3
  89. package/dist/examples/learning-journey-ui-onboarding/src/docs/index.js +0 -1
  90. package/dist/examples/learning-journey-ui-onboarding/src/docs/learning-journey-ui-onboarding.docblock.js +0 -20
  91. package/dist/examples/learning-journey-ui-onboarding/src/index.js +0 -10
  92. package/dist/examples/learning-journey-ui-onboarding/src/views/Overview.js +0 -180
  93. package/dist/examples/learning-journey-ui-onboarding/src/views/Progress.js +0 -162
  94. package/dist/examples/learning-journey-ui-onboarding/src/views/Steps.js +0 -91
  95. package/dist/examples/learning-journey-ui-onboarding/src/views/Timeline.js +0 -97
  96. package/dist/examples/learning-journey-ui-onboarding/src/views/index.js +0 -4
  97. package/dist/examples/learning-journey-ui-shared/src/components/BadgeDisplay.js +0 -44
  98. package/dist/examples/learning-journey-ui-shared/src/components/StreakCounter.js +0 -45
  99. package/dist/examples/learning-journey-ui-shared/src/components/ViewTabs.js +0 -48
  100. package/dist/examples/learning-journey-ui-shared/src/components/XpBar.js +0 -46
  101. package/dist/examples/learning-journey-ui-shared/src/components/index.js +0 -4
  102. package/dist/examples/learning-journey-ui-shared/src/docs/index.js +0 -1
  103. package/dist/examples/learning-journey-ui-shared/src/docs/learning-journey-ui-shared.docblock.js +0 -20
  104. package/dist/examples/learning-journey-ui-shared/src/hooks/index.js +0 -1
  105. package/dist/examples/learning-journey-ui-shared/src/hooks/useLearningProgress.js +0 -73
  106. package/dist/examples/learning-journey-ui-shared/src/index.js +0 -8
  107. package/dist/index.d.ts +0 -8
  108. package/dist/learning-journey-registry.feature.d.ts +0 -11
  109. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  110. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
  111. package/dist/libs/contracts/dist/docs/index.js +0 -29
  112. package/dist/libs/contracts/dist/docs/presentations.js +0 -71
  113. package/dist/libs/contracts/dist/docs/registry.js +0 -44
  114. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  115. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  116. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  117. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  118. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  119. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
  120. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
  121. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
  122. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
  123. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
  124. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
  125. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
  126. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
  127. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
  128. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
  129. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
  130. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +0 -5
  131. package/dist/libs/design-system/dist/components/atoms/Button.js +0 -33
  132. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +0 -55
  133. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -13
  134. package/dist/libs/ui-kit-core/dist/utils.js +0 -10
  135. package/dist/libs/ui-kit-web/dist/ui/card.js +0 -36
  136. package/dist/libs/ui-kit-web/dist/ui/progress.js +0 -23
  137. package/dist/libs/ui-kit-web/dist/ui/utils.js +0 -10
  138. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -10
  139. package/dist/presentations/index.d.ts +0 -9
  140. package/dist/progress-store.d.ts +0 -10
  141. package/dist/tracks.d.ts +0 -39
  142. package/dist/ui/LearningMiniApp.d.ts +0 -22
  143. package/dist/ui/index.d.ts +0 -2
@@ -1,55 +1,53 @@
1
-
2
- $ bun build:bundle && bun build:types
3
- $ tsdown
4
- ℹ tsdown v0.17.4 powered by rolldown v1.0.0-beta.53
5
- ℹ config file: /Users/tboutron/Documents/clients/lssm/monorepo-lssm/packages/contractspec/packages/examples/learning-journey-registry/tsdown.config.js (unrun)
6
- ℹ entry: src/api-types.ts, src/api.ts, src/example.ts, src/index.ts, src/learning-journey-registry.feature.ts, src/progress-store.ts, src/tracks.ts, src/docs/index.ts, src/docs/learning-journey-registry.docblock.ts, src/presentations/index.ts, src/ui/LearningMiniApp.tsx, src/ui/index.ts
7
- ℹ target: esnext
8
- ℹ tsconfig: tsconfig.json
9
- ℹ Build start
10
- ℹ Cleaning 57 files
11
- ℹ dist/api.js  3.28 kB │ gzip: 1.37 kB
12
- ℹ dist/ui/LearningMiniApp.js  1.88 kB │ gzip: 0.70 kB
13
- ℹ dist/tracks.js  1.30 kB │ gzip: 0.50 kB
14
- ℹ dist/index.js  1.23 kB │ gzip: 0.42 kB
15
- ℹ dist/docs/learning-journey-registry.docblock.js  1.21 kB │ gzip: 0.63 kB
16
- ℹ dist/presentations/index.js  0.99 kB │ gzip: 0.39 kB
17
- ℹ dist/learning-journey-registry.feature.js  0.86 kB │ gzip: 0.36 kB
18
- ℹ dist/example.js  0.52 kB │ gzip: 0.32 kB
19
- ℹ dist/progress-store.js  0.43 kB │ gzip: 0.29 kB
20
- ℹ dist/ui/index.js  0.19 kB │ gzip: 0.11 kB
21
- ℹ dist/docs/index.js  0.05 kB │ gzip: 0.07 kB
22
- ℹ dist/api-types.js  0.00 kB │ gzip: 0.02 kB
23
- ℹ dist/libs/contracts/src/docs/accessibility_wcag_compliance_specs.docblock.js 16.53 kB │ gzip: 7.16 kB
24
- ℹ dist/libs/contracts/src/docs/tech/schema/README.docblock.js 10.99 kB │ gzip: 4.29 kB
25
- ℹ dist/libs/contracts/src/docs/tech/lifecycle-stage-system.docblock.js  9.67 kB │ gzip: 3.78 kB
26
- ℹ dist/libs/contracts/src/docs/tech/llm/llm-integration.docblock.js  9.12 kB │ gzip: 3.42 kB
27
- ℹ dist/libs/contracts/src/docs/tech/PHASE_1_QUICKSTART.docblock.js  8.76 kB │ gzip: 2.68 kB
28
- ℹ dist/libs/contracts/src/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js  5.93 kB │ gzip: 2.61 kB
29
- ℹ dist/libs/contracts/src/docs/tech/templates/runtime.docblock.js  5.63 kB │ gzip: 2.58 kB
30
- ℹ dist/libs/contracts/src/docs/tech/workflows/overview.docblock.js  5.44 kB │ gzip: 2.26 kB
31
- ℹ dist/libs/contracts/src/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js  4.37 kB │ gzip: 2.06 kB
32
- ℹ dist/libs/contracts/src/docs/tech/telemetry-ingest.docblock.js  3.90 kB │ gzip: 1.70 kB
33
- ℹ dist/libs/contracts/src/docs/tech/vscode-extension.docblock.js  3.60 kB │ gzip: 1.39 kB
34
- ℹ dist/libs/contracts/src/docs/PUBLISHING.docblock.js  3.43 kB │ gzip: 1.59 kB
35
- ℹ dist/libs/contracts/src/docs/tech/auth/better-auth-nextjs.docblock.js  3.35 kB │ gzip: 1.45 kB
36
- ℹ dist/libs/contracts/src/docs/tech/studio/learning-journeys.docblock.js  3.08 kB │ gzip: 1.39 kB
37
- ℹ dist/libs/contracts/src/docs/tech/studio/platform-admin-panel.docblock.js  3.04 kB │ gzip: 1.33 kB
38
- ℹ dist/libs/contracts/src/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js  3.00 kB │ gzip: 1.53 kB
39
- ℹ dist/libs/contracts/src/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js  2.83 kB │ gzip: 1.41 kB
40
- ℹ dist/libs/contracts/src/docs/tech/presentation-runtime.docblock.js  2.75 kB │ gzip: 1.30 kB
41
- ℹ dist/libs/contracts/src/docs/tech/studio/project-routing.docblock.js  2.50 kB │ gzip: 1.12 kB
42
- ℹ dist/libs/contracts/src/docs/tech/studio/team-invitations.docblock.js  2.14 kB │ gzip: 1.04 kB
43
- ℹ dist/libs/contracts/src/docs/tech/studio/workspaces.docblock.js  1.90 kB │ gzip: 0.94 kB
44
- ℹ dist/libs/contracts/src/docs/tech/studio/learning-events.docblock.js  1.79 kB │ gzip: 0.88 kB
45
- ℹ dist/libs/contracts/src/docs/tech/contracts/openapi-export.docblock.js  1.72 kB │ gzip: 0.90 kB
46
- ℹ dist/libs/contracts/src/docs/tech/studio/project-access-teams.docblock.js  1.58 kB │ gzip: 0.78 kB
47
- ℹ dist/libs/contracts/src/docs/index.js  1.54 kB │ gzip: 0.52 kB
48
- ℹ dist/libs/contracts/src/docs/tech/studio/workspace-ops.docblock.js  1.49 kB │ gzip: 0.73 kB
49
- ℹ dist/libs/contracts/src/docs/tech/mcp-endpoints.docblock.js  1.24 kB │ gzip: 0.68 kB
50
- ℹ dist/libs/contracts/src/docs/presentations.js  1.23 kB │ gzip: 0.59 kB
51
- ℹ dist/libs/contracts/src/docs/tech/studio/sandbox-unlogged.docblock.js  0.90 kB │ gzip: 0.56 kB
52
- ℹ dist/libs/contracts/src/docs/registry.js  0.74 kB │ gzip: 0.42 kB
53
- ℹ 42 files, total: 136.15 kB
54
- ✔ Build complete in 29ms
55
- $ tsc --noEmit
1
+ $ bun build:bundle && bun build:types
2
+ $ tsdown
3
+ ℹ tsdown v0.17.4 powered by rolldown v1.0.0-beta.53
4
+ ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/learning-journey-registry/tsdown.config.js
5
+ ℹ entry: src/api-types.ts, src/api.ts, src/example.ts, src/index.ts, src/learning-journey-registry.feature.ts, src/progress-store.ts, src/tracks.ts, src/docs/index.ts, src/docs/learning-journey-registry.docblock.ts, src/presentations/index.ts, src/ui/LearningMiniApp.tsx, src/ui/index.ts
6
+ ℹ target: esnext
7
+ ℹ tsconfig: tsconfig.json
8
+ ℹ Build start
9
+ ℹ dist/api.js  3.28 kB │ gzip: 1.37 kB
10
+ ℹ dist/ui/LearningMiniApp.js  1.88 kB │ gzip: 0.70 kB
11
+ ℹ dist/tracks.js  1.30 kB │ gzip: 0.50 kB
12
+ ℹ dist/index.js  1.23 kB │ gzip: 0.42 kB
13
+ ℹ dist/docs/learning-journey-registry.docblock.js  1.21 kB │ gzip: 0.63 kB
14
+ ℹ dist/presentations/index.js  0.99 kB │ gzip: 0.39 kB
15
+ ℹ dist/learning-journey-registry.feature.js  0.86 kB │ gzip: 0.36 kB
16
+ ℹ dist/example.js  0.52 kB │ gzip: 0.32 kB
17
+ ℹ dist/progress-store.js  0.43 kB │ gzip: 0.29 kB
18
+ ℹ dist/ui/index.js  0.19 kB │ gzip: 0.11 kB
19
+ ℹ dist/docs/index.js  0.05 kB │ gzip: 0.07 kB
20
+ ℹ dist/api-types.js  0.00 kB │ gzip: 0.02 kB
21
+ ℹ dist/libs/contracts/src/docs/accessibility_wcag_compliance_specs.docblock.js 16.53 kB │ gzip: 7.16 kB
22
+ ℹ dist/libs/contracts/src/docs/tech/schema/README.docblock.js 10.99 kB │ gzip: 4.29 kB
23
+ ℹ dist/libs/contracts/src/docs/tech/lifecycle-stage-system.docblock.js  9.67 kB │ gzip: 3.78 kB
24
+ ℹ dist/libs/contracts/src/docs/tech/llm/llm-integration.docblock.js  9.12 kB │ gzip: 3.42 kB
25
+ ℹ dist/libs/contracts/src/docs/tech/PHASE_1_QUICKSTART.docblock.js  8.76 kB │ gzip: 2.68 kB
26
+ ℹ dist/libs/contracts/src/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js  5.93 kB │ gzip: 2.61 kB
27
+ ℹ dist/libs/contracts/src/docs/tech/templates/runtime.docblock.js  5.63 kB │ gzip: 2.58 kB
28
+ ℹ dist/libs/contracts/src/docs/tech/workflows/overview.docblock.js  5.44 kB │ gzip: 2.26 kB
29
+ ℹ dist/libs/contracts/src/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js  4.37 kB │ gzip: 2.06 kB
30
+ ℹ dist/libs/contracts/src/docs/tech/telemetry-ingest.docblock.js  3.90 kB │ gzip: 1.70 kB
31
+ ℹ dist/libs/contracts/src/docs/tech/vscode-extension.docblock.js  3.60 kB │ gzip: 1.39 kB
32
+ ℹ dist/libs/contracts/src/docs/PUBLISHING.docblock.js  3.43 kB │ gzip: 1.59 kB
33
+ ℹ dist/libs/contracts/src/docs/tech/auth/better-auth-nextjs.docblock.js  3.35 kB │ gzip: 1.45 kB
34
+ ℹ dist/libs/contracts/src/docs/tech/studio/learning-journeys.docblock.js  3.08 kB │ gzip: 1.39 kB
35
+ ℹ dist/libs/contracts/src/docs/tech/studio/platform-admin-panel.docblock.js  3.04 kB │ gzip: 1.33 kB
36
+ ℹ dist/libs/contracts/src/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js  3.00 kB │ gzip: 1.53 kB
37
+ ℹ dist/libs/contracts/src/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js  2.83 kB │ gzip: 1.41 kB
38
+ ℹ dist/libs/contracts/src/docs/tech/presentation-runtime.docblock.js  2.75 kB │ gzip: 1.30 kB
39
+ ℹ dist/libs/contracts/src/docs/tech/studio/project-routing.docblock.js  2.50 kB │ gzip: 1.12 kB
40
+ ℹ dist/libs/contracts/src/docs/tech/studio/team-invitations.docblock.js  2.14 kB │ gzip: 1.04 kB
41
+ ℹ dist/libs/contracts/src/docs/tech/studio/workspaces.docblock.js  1.90 kB │ gzip: 0.94 kB
42
+ ℹ dist/libs/contracts/src/docs/tech/studio/learning-events.docblock.js  1.79 kB │ gzip: 0.88 kB
43
+ ℹ dist/libs/contracts/src/docs/tech/contracts/openapi-export.docblock.js  1.72 kB │ gzip: 0.90 kB
44
+ ℹ dist/libs/contracts/src/docs/tech/studio/project-access-teams.docblock.js  1.58 kB │ gzip: 0.78 kB
45
+ ℹ dist/libs/contracts/src/docs/index.js  1.54 kB │ gzip: 0.52 kB
46
+ ℹ dist/libs/contracts/src/docs/tech/studio/workspace-ops.docblock.js  1.49 kB │ gzip: 0.73 kB
47
+ ℹ dist/libs/contracts/src/docs/tech/mcp-endpoints.docblock.js  1.24 kB │ gzip: 0.68 kB
48
+ ℹ dist/libs/contracts/src/docs/presentations.js  1.23 kB │ gzip: 0.59 kB
49
+ ℹ dist/libs/contracts/src/docs/tech/studio/sandbox-unlogged.docblock.js  0.90 kB │ gzip: 0.56 kB
50
+ ℹ dist/libs/contracts/src/docs/registry.js  0.74 kB │ gzip: 0.42 kB
51
+ ℹ 42 files, total: 136.15 kB
52
+ ✔ Build complete in 57ms
53
+ $ tsc --noEmit
package/dist/api.js CHANGED
@@ -1,170 +1 @@
1
- import { learningJourneyTracks } from "./tracks.js";
2
- import { getLearnerTracks, getTrackResolver, initProgress } from "./progress-store.js";
3
-
4
- //#region src/api.ts
5
- const getTrack = getTrackResolver(learningJourneyTracks);
6
- const matchesFilter = (filter, payload) => {
7
- if (!filter) return true;
8
- if (!payload) return false;
9
- return Object.entries(filter).every(([key, value]) => payload[key] === value);
10
- };
11
- const matchesBaseEvent = (condition, event) => {
12
- if (condition.eventName !== event.name) return false;
13
- if (condition.eventVersion !== void 0 && event.version !== void 0) {
14
- if (condition.eventVersion !== event.version) return false;
15
- }
16
- if (condition.sourceModule && event.sourceModule && condition.sourceModule !== event.sourceModule) return false;
17
- return matchesFilter(condition.payloadFilter, event.payload);
18
- };
19
- const matchesCondition = (condition, event, step, trackStartedAt) => {
20
- if (condition.kind === "count") {
21
- if (!matchesBaseEvent(condition, event)) return { matched: false };
22
- const occurrences = (step.occurrences ?? 0) + 1;
23
- return {
24
- matched: (condition.withinHours === void 0 || Boolean(trackStartedAt && event.occurredAt && (event.occurredAt.getTime() - trackStartedAt.getTime()) / (1e3 * 60 * 60) <= condition.withinHours)) && occurrences >= condition.atLeast,
25
- occurrences
26
- };
27
- }
28
- if (condition.kind === "time_window") {
29
- if (!matchesBaseEvent(condition, event)) return { matched: false };
30
- if (condition.withinHoursOfStart !== void 0 && trackStartedAt && event.occurredAt) {
31
- if ((event.occurredAt.getTime() - trackStartedAt.getTime()) / (1e3 * 60 * 60) > condition.withinHoursOfStart) return { matched: false };
32
- }
33
- return { matched: true };
34
- }
35
- if (condition.kind === "srs_mastery") {
36
- if (event.name !== condition.eventName) return { matched: false };
37
- const payload = event.payload;
38
- if (!matchesFilter(condition.payloadFilter, payload)) return { matched: false };
39
- const skillKey = condition.skillIdField ?? "skillId";
40
- const masteryKey = condition.masteryField ?? "mastery";
41
- const skillId = payload?.[skillKey];
42
- const masteryValue = payload?.[masteryKey];
43
- if (skillId === void 0 || masteryValue === void 0) return { matched: false };
44
- if (typeof masteryValue !== "number") return { matched: false };
45
- if (masteryValue < condition.minimumMastery) return { matched: false };
46
- const masteryCount = (step.masteryCount ?? 0) + 1;
47
- return {
48
- matched: masteryCount >= (condition.requiredCount ?? 1),
49
- masteryCount
50
- };
51
- }
52
- return { matched: matchesBaseEvent(condition, event) };
53
- };
54
- const getAvailability = (availability, startedAt) => {
55
- if (!availability || !startedAt) return {};
56
- const baseTime = startedAt.getTime();
57
- let unlockTime = baseTime;
58
- if (availability.unlockOnDay !== void 0) unlockTime = baseTime + (availability.unlockOnDay - 1) * 24 * 60 * 60 * 1e3;
59
- if (availability.unlockAfterHours !== void 0) unlockTime = baseTime + availability.unlockAfterHours * 60 * 60 * 1e3;
60
- const availableAt = new Date(unlockTime);
61
- return {
62
- availableAt,
63
- dueAt: availability.dueWithinHours !== void 0 ? new Date(availableAt.getTime() + availability.dueWithinHours * 60 * 60 * 1e3) : void 0
64
- };
65
- };
66
- const computeProgressPercent = (steps) => {
67
- const total = steps.length || 1;
68
- const done = steps.filter((s) => s.status === "COMPLETED").length;
69
- return Math.round(done / total * 100);
70
- };
71
- const applyTrackCompletionBonuses = (track, progress) => {
72
- if (progress.isCompleted) return progress;
73
- const completedAt = /* @__PURE__ */ new Date();
74
- const startedAt = progress.startedAt ?? completedAt;
75
- const hoursElapsed = (completedAt.getTime() - startedAt.getTime()) / (1e3 * 60 * 60);
76
- let xpEarned = progress.xpEarned;
77
- const { completionRewards, streakRule } = track;
78
- if (completionRewards?.xpBonus) xpEarned += completionRewards.xpBonus;
79
- if (streakRule?.hoursWindow !== void 0 && hoursElapsed <= streakRule.hoursWindow && streakRule.bonusXp) xpEarned += streakRule.bonusXp;
80
- return {
81
- ...progress,
82
- xpEarned,
83
- isCompleted: true,
84
- completedAt,
85
- lastActivityAt: completedAt
86
- };
87
- };
88
- const listTracks = (learnerId) => {
89
- const progressMap = learnerId ? getLearnerTracks(learnerId) : void 0;
90
- return {
91
- tracks: learningJourneyTracks,
92
- progress: learnerId && progressMap ? Array.from(progressMap.values()) : []
93
- };
94
- };
95
- const getProgress = (trackId, learnerId) => {
96
- const track = getTrack(trackId);
97
- if (!track) return void 0;
98
- const map = getLearnerTracks(learnerId);
99
- const existing = map.get(trackId) ?? initProgress(learnerId, track);
100
- map.set(trackId, existing);
101
- return existing;
102
- };
103
- const recordEvent = (event) => {
104
- const targets = event.trackId !== void 0 ? learningJourneyTracks.filter((t) => t.id === event.trackId) : learningJourneyTracks;
105
- const updated = [];
106
- const eventTime = event.occurredAt ?? /* @__PURE__ */ new Date();
107
- for (const track of targets) {
108
- const map = getLearnerTracks(event.learnerId);
109
- const current = map.get(track.id) ?? initProgress(event.learnerId, track);
110
- const startedAt = current.startedAt ?? eventTime;
111
- let changed = current.startedAt === void 0;
112
- const steps = current.steps.map((step) => {
113
- if (step.status === "COMPLETED") return step;
114
- const spec = track.steps.find((s) => s.id === step.id);
115
- if (!spec) return step;
116
- const { availableAt, dueAt } = getAvailability(spec.availability, startedAt);
117
- if (availableAt && eventTime < availableAt) return {
118
- ...step,
119
- availableAt,
120
- dueAt
121
- };
122
- if (dueAt && eventTime > dueAt) return {
123
- ...step,
124
- availableAt,
125
- dueAt
126
- };
127
- const result = matchesCondition(spec.completion, event, step, startedAt);
128
- if (result.matched) {
129
- changed = true;
130
- return {
131
- ...step,
132
- status: "COMPLETED",
133
- xpEarned: spec.xpReward ?? 0,
134
- completedAt: eventTime,
135
- triggeringEvent: event.name,
136
- eventPayload: event.payload,
137
- occurrences: result.occurrences ?? step.occurrences,
138
- masteryCount: result.masteryCount ?? step.masteryCount,
139
- availableAt,
140
- dueAt
141
- };
142
- }
143
- if (result.occurrences !== void 0 || result.masteryCount !== void 0) changed = true;
144
- return {
145
- ...step,
146
- occurrences: result.occurrences ?? step.occurrences,
147
- masteryCount: result.masteryCount ?? step.masteryCount,
148
- availableAt,
149
- dueAt
150
- };
151
- });
152
- if (!changed) continue;
153
- const xpEarned = steps.reduce((sum, s) => sum + s.xpEarned, 0) + (track.totalXp ?? 0);
154
- let progress = {
155
- ...current,
156
- steps,
157
- xpEarned,
158
- startedAt,
159
- lastActivityAt: eventTime,
160
- progress: computeProgressPercent(steps)
161
- };
162
- if (steps.every((s) => s.status === "COMPLETED")) progress = applyTrackCompletionBonuses(track, progress);
163
- map.set(track.id, progress);
164
- updated.push(progress);
165
- }
166
- return updated;
167
- };
168
-
169
- //#endregion
170
- export { getProgress, listTracks, recordEvent };
1
+ import{learningJourneyTracks as e}from"./tracks.js";import{getLearnerTracks as t,getTrackResolver as n,initProgress as r}from"./progress-store.js";const i=n(e),a=(e,t)=>e?t?Object.entries(e).every(([e,n])=>t[e]===n):!1:!0,o=(e,t)=>e.eventName!==t.name||e.eventVersion!==void 0&&t.version!==void 0&&e.eventVersion!==t.version||e.sourceModule&&t.sourceModule&&e.sourceModule!==t.sourceModule?!1:a(e.payloadFilter,t.payload),s=(e,t,n,r)=>{if(e.kind===`count`){if(!o(e,t))return{matched:!1};let i=(n.occurrences??0)+1;return{matched:(e.withinHours===void 0||!!(r&&t.occurredAt&&(t.occurredAt.getTime()-r.getTime())/(1e3*60*60)<=e.withinHours))&&i>=e.atLeast,occurrences:i}}if(e.kind===`time_window`)return!o(e,t)||e.withinHoursOfStart!==void 0&&r&&t.occurredAt&&(t.occurredAt.getTime()-r.getTime())/(1e3*60*60)>e.withinHoursOfStart?{matched:!1}:{matched:!0};if(e.kind===`srs_mastery`){if(t.name!==e.eventName)return{matched:!1};let r=t.payload;if(!a(e.payloadFilter,r))return{matched:!1};let i=e.skillIdField??`skillId`,o=e.masteryField??`mastery`,s=r?.[i],c=r?.[o];if(s===void 0||c===void 0||typeof c!=`number`||c<e.minimumMastery)return{matched:!1};let l=(n.masteryCount??0)+1;return{matched:l>=(e.requiredCount??1),masteryCount:l}}return{matched:o(e,t)}},c=(e,t)=>{if(!e||!t)return{};let n=t.getTime(),r=n;e.unlockOnDay!==void 0&&(r=n+(e.unlockOnDay-1)*24*60*60*1e3),e.unlockAfterHours!==void 0&&(r=n+e.unlockAfterHours*60*60*1e3);let i=new Date(r);return{availableAt:i,dueAt:e.dueWithinHours===void 0?void 0:new Date(i.getTime()+e.dueWithinHours*60*60*1e3)}},l=e=>{let t=e.length||1,n=e.filter(e=>e.status===`COMPLETED`).length;return Math.round(n/t*100)},u=(e,t)=>{if(t.isCompleted)return t;let n=new Date,r=t.startedAt??n,i=(n.getTime()-r.getTime())/(1e3*60*60),a=t.xpEarned,{completionRewards:o,streakRule:s}=e;return o?.xpBonus&&(a+=o.xpBonus),s?.hoursWindow!==void 0&&i<=s.hoursWindow&&s.bonusXp&&(a+=s.bonusXp),{...t,xpEarned:a,isCompleted:!0,completedAt:n,lastActivityAt:n}},d=n=>{let r=n?t(n):void 0;return{tracks:e,progress:n&&r?Array.from(r.values()):[]}},f=(e,n)=>{let a=i(e);if(!a)return;let o=t(n),s=o.get(e)??r(n,a);return o.set(e,s),s},p=n=>{let i=n.trackId===void 0?e:e.filter(e=>e.id===n.trackId),a=[],o=n.occurredAt??new Date;for(let e of i){let i=t(n.learnerId),d=i.get(e.id)??r(n.learnerId,e),f=d.startedAt??o,p=d.startedAt===void 0,m=d.steps.map(t=>{if(t.status===`COMPLETED`)return t;let r=e.steps.find(e=>e.id===t.id);if(!r)return t;let{availableAt:i,dueAt:a}=c(r.availability,f);if(i&&o<i||a&&o>a)return{...t,availableAt:i,dueAt:a};let l=s(r.completion,n,t,f);return l.matched?(p=!0,{...t,status:`COMPLETED`,xpEarned:r.xpReward??0,completedAt:o,triggeringEvent:n.name,eventPayload:n.payload,occurrences:l.occurrences??t.occurrences,masteryCount:l.masteryCount??t.masteryCount,availableAt:i,dueAt:a}):((l.occurrences!==void 0||l.masteryCount!==void 0)&&(p=!0),{...t,occurrences:l.occurrences??t.occurrences,masteryCount:l.masteryCount??t.masteryCount,availableAt:i,dueAt:a})});if(!p)continue;let h=m.reduce((e,t)=>e+t.xpEarned,0)+(e.totalXp??0),g={...d,steps:m,xpEarned:h,startedAt:f,lastActivityAt:o,progress:l(m)};m.every(e=>e.status===`COMPLETED`)&&(g=u(e,g)),i.set(e.id,g),a.push(g)}return a};export{f as getProgress,d as listTracks,p as recordEvent};
@@ -1 +1 @@
1
- import "./learning-journey-registry.docblock.js";
1
+ import"./learning-journey-registry.docblock.js";
@@ -1,38 +1 @@
1
- import { registerDocBlocks } from "../libs/contracts/dist/docs/registry.js";
2
- import "../libs/contracts/dist/docs/index.js";
3
-
4
- //#region src/docs/learning-journey-registry.docblock.ts
5
- registerDocBlocks([{
6
- id: "docs.learning-journey.registry",
7
- title: "Learning Journey — Example Track Registry",
8
- summary: "Aggregates learning journey example tracks (Studio onboarding, Platform tour, CRM first win, Drills, Ambient Coach, Quest challenges).",
9
- kind: "usage",
10
- visibility: "public",
11
- route: "/docs/learning-journey/registry",
12
- tags: [
13
- "learning",
14
- "registry",
15
- "onboarding"
16
- ],
17
- body: `## Tracks
18
- - \`studio_getting_started\` (Studio onboarding)
19
- - \`platform_primitives_tour\` (Platform primitives)
20
- - \`crm_first_win\` (CRM pipeline onboarding)
21
- - \`drills_language_basics\` (Drills & SRS)
22
- - \`money_ambient_coach\`, \`coliving_ambient_coach\` (Ambient tips)
23
- - \`money_reset_7day\` (Quest/challenge)
24
-
25
- ## Exports
26
- - \`learningJourneyTracks\` — raw specs
27
- - \`onboardingTrackCatalog\` — DTOs aligned with onboarding API
28
- - \`mapTrackSpecToDto\` — helper to map individual tracks
29
-
30
- ## Wiring
31
- - Use with onboarding API contracts:
32
- - \`learning.onboarding.listTracks\`
33
- - \`learning.onboarding.getProgress\`
34
- - \`learning.onboarding.recordEvent\`
35
- - Intended for registry/adapters in Studio UI or services that surface tracks.`
36
- }]);
37
-
38
- //#endregion
1
+ import{registerDocBlocks as e}from"../libs/contracts/src/docs/registry.js";import"../libs/contracts/src/docs/index.js";e([{id:`docs.learning-journey.registry`,title:`Learning Journey — Example Track Registry`,summary:`Aggregates learning journey example tracks (Studio onboarding, Platform tour, CRM first win, Drills, Ambient Coach, Quest challenges).`,kind:`usage`,visibility:`public`,route:`/docs/learning-journey/registry`,tags:[`learning`,`registry`,`onboarding`],body:"## Tracks\n- `studio_getting_started` (Studio onboarding)\n- `platform_primitives_tour` (Platform primitives)\n- `crm_first_win` (CRM pipeline onboarding)\n- `drills_language_basics` (Drills & SRS)\n- `money_ambient_coach`, `coliving_ambient_coach` (Ambient tips)\n- `money_reset_7day` (Quest/challenge)\n\n## Exports\n- `learningJourneyTracks` — raw specs\n- `onboardingTrackCatalog` — DTOs aligned with onboarding API\n- `mapTrackSpecToDto` — helper to map individual tracks\n\n## Wiring\n- Use with onboarding API contracts:\n - `learning.onboarding.listTracks`\n - `learning.onboarding.getProgress`\n - `learning.onboarding.recordEvent`\n- Intended for registry/adapters in Studio UI or services that surface tracks."}]);
package/dist/example.js CHANGED
@@ -1,34 +1 @@
1
- //#region src/example.ts
2
- const example = {
3
- id: "learning-journey-registry",
4
- title: "Learning Journey Registry",
5
- summary: "Registry of learning journey tracks + presentations + UI mini-app bindings.",
6
- tags: [
7
- "learning",
8
- "journey",
9
- "registry"
10
- ],
11
- kind: "library",
12
- visibility: "public",
13
- docs: { rootDocId: "docs.examples.learning-journey-registry" },
14
- entrypoints: {
15
- packageName: "@lssm/example.learning-journey-registry",
16
- docs: "./docs"
17
- },
18
- surfaces: {
19
- templates: true,
20
- sandbox: {
21
- enabled: true,
22
- modes: ["markdown", "specs"]
23
- },
24
- studio: {
25
- enabled: true,
26
- installable: true
27
- },
28
- mcp: { enabled: true }
29
- }
30
- };
31
- var example_default = example;
32
-
33
- //#endregion
34
- export { example_default as default };
1
+ var e={id:`learning-journey-registry`,title:`Learning Journey Registry`,summary:`Registry of learning journey tracks + presentations + UI mini-app bindings.`,tags:[`learning`,`journey`,`registry`],kind:`library`,visibility:`public`,docs:{rootDocId:`docs.examples.learning-journey-registry`},entrypoints:{packageName:`@lssm/example.learning-journey-registry`,docs:`./docs`},surfaces:{templates:!0,sandbox:{enabled:!0,modes:[`markdown`,`specs`]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}};export{e as default};
package/dist/index.js CHANGED
@@ -1,13 +1 @@
1
- import { crmLearningTracks } from "./examples/learning-journey-crm-onboarding/dist/track.js";
2
- import { platformLearningTracks } from "./examples/learning-journey-platform-tour/dist/track.js";
3
- import { studioLearningTracks } from "./examples/learning-journey-studio-onboarding/dist/track.js";
4
- import { learningJourneyTracks, mapStep, mapTrackSpecToDto, onboardingTrackCatalog } from "./tracks.js";
5
- import { getProgress, listTracks, recordEvent } from "./api.js";
6
- import example_default from "./example.js";
7
- import "./docs/index.js";
8
- import { LearningTrackDetailPresentation, LearningTrackListPresentation, LearningTrackProgressWidgetPresentation, learningJourneyPresentations } from "./presentations/index.js";
9
- import { LearningJourneyRegistryFeature } from "./learning-journey-registry.feature.js";
10
- import { LearningMiniApp, getLearningTemplateIds, isLearningTemplate } from "./ui/LearningMiniApp.js";
11
- import "./ui/index.js";
12
-
13
- export { LearningJourneyRegistryFeature, LearningMiniApp, LearningTrackDetailPresentation, LearningTrackListPresentation, LearningTrackProgressWidgetPresentation, crmLearningTracks, example_default as example, getLearningTemplateIds, getProgress, isLearningTemplate, learningJourneyPresentations, learningJourneyTracks, listTracks, mapStep, mapTrackSpecToDto, onboardingTrackCatalog, platformLearningTracks, recordEvent, studioLearningTracks };
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,66 +1 @@
1
- //#region src/learning-journey-registry.feature.ts
2
- /**
3
- * Learning Journey Registry feature module that bundles
4
- * the shared presentations for learning journey tracks.
5
- */
6
- const LearningJourneyRegistryFeature = {
7
- meta: {
8
- key: "learning-journey-registry",
9
- title: "Learning Journey Registry",
10
- description: "Shared registry and presentations for learning journey tracks",
11
- domain: "learning-journey",
12
- owners: ["@learning-team"],
13
- tags: [
14
- "learning",
15
- "journey",
16
- "onboarding",
17
- "registry"
18
- ],
19
- stability: "experimental"
20
- },
21
- operations: [],
22
- events: [],
23
- presentations: [
24
- {
25
- name: "learning.journey.track_list",
26
- version: 1
27
- },
28
- {
29
- name: "learning.journey.track_detail",
30
- version: 1
31
- },
32
- {
33
- name: "learning.journey.progress_widget",
34
- version: 1
35
- }
36
- ],
37
- opToPresentation: [],
38
- presentationsTargets: [
39
- {
40
- name: "learning.journey.track_list",
41
- version: 1,
42
- targets: ["react", "markdown"]
43
- },
44
- {
45
- name: "learning.journey.track_detail",
46
- version: 1,
47
- targets: [
48
- "react",
49
- "markdown",
50
- "application/json"
51
- ]
52
- },
53
- {
54
- name: "learning.journey.progress_widget",
55
- version: 1,
56
- targets: ["react"]
57
- }
58
- ],
59
- capabilities: { requires: [{
60
- key: "identity",
61
- version: 1
62
- }] }
63
- };
64
-
65
- //#endregion
66
- export { LearningJourneyRegistryFeature };
1
+ const e={meta:{key:`learning-journey-registry`,title:`Learning Journey Registry`,description:`Shared registry and presentations for learning journey tracks`,domain:`learning-journey`,owners:[`@learning-team`],tags:[`learning`,`journey`,`onboarding`,`registry`],stability:`experimental`},operations:[],events:[],presentations:[{name:`learning.journey.track_list`,version:1},{name:`learning.journey.track_detail`,version:1},{name:`learning.journey.progress_widget`,version:1}],opToPresentation:[],presentationsTargets:[{name:`learning.journey.track_list`,version:1,targets:[`react`,`markdown`]},{name:`learning.journey.track_detail`,version:1,targets:[`react`,`markdown`,`application/json`]},{name:`learning.journey.progress_widget`,version:1,targets:[`react`]}],capabilities:{requires:[{key:`identity`,version:1}]}};export{e as LearningJourneyRegistryFeature};
@@ -0,0 +1,76 @@
1
+ import{registerDocBlocks as e}from"./registry.js";e([{id:`docs.PUBLISHING`,title:`Publishing ContractSpec Libraries`,summary:`This guide describes how we release the ContractSpec libraries to npm. We use a dual-track release system: **Stable** (manual) and **Canary** (automatic).`,kind:`reference`,visibility:`public`,route:`/docs/PUBLISHING`,tags:[`PUBLISHING`],body:`# Publishing ContractSpec Libraries
2
+
3
+ This guide describes how we release the ContractSpec libraries to npm. We use a dual-track release system: **Stable** (manual) and **Canary** (automatic).
4
+
5
+ ## Release Tracks
6
+
7
+ | Track | Branch | npm Tag | Frequency | Versioning | Use Case |
8
+ |-------|--------|---------|-----------|------------|----------|
9
+ | **Stable** | \`release\` | \`latest\` | Manual | SemVer (e.g., \`1.7.4\`) | Production, external users |
10
+ | **Canary** | \`main\` | \`canary\` | Every Push | Snapshot (e.g., \`1.7.4-canary...\`) | Dev, internal testing |
11
+
12
+ ## Prerequisites
13
+
14
+ - ✅ \`NPM_TOKEN\` secret is configured in GitHub (owner or automation token with _publish_ scope).
15
+ - ✅ \`GITHUB_TOKEN\` (built-in) has permissions to create PRs (enabled by default in new repos).
16
+ - ✅ For stable releases: \`release\` branch exists and is protected.
17
+
18
+ ## Canary Workflow (Automatic)
19
+
20
+ Every commit pushed to \`main\` triggers the \`.github/workflows/publish-canary.yml\` workflow.
21
+
22
+ 1. **Trigger**: Push to \`main\`.
23
+ 2. **Versioning**: Runs \`changeset version --snapshot canary\` to generate a temporary snapshot version.
24
+ 3. **Publish**: Packages are published to npm with the \`canary\` tag using \`changeset publish --tag canary\`.
25
+
26
+ ### Consuming Canary Builds
27
+
28
+ To install the latest bleeding-edge version:
29
+
30
+ \`\`\`bash
31
+ npm install @lssm/lib.contracts@canary
32
+ # or
33
+ bun add @lssm/lib.contracts@canary
34
+ \`\`\`
35
+
36
+ ## Stable Release Workflow (Manual)
37
+
38
+ Stable releases are managed via the \`release\` branch using the standard [Changesets Action](https://github.com/changesets/action).
39
+
40
+ 1. **Develop on \`main\`**: Create features and fixes.
41
+ 2. **Add Changesets**: Run \`bun changeset\` to document changes and impact (major/minor/patch).
42
+ 3. **Merge to \`release\`**: When ready to ship, open a PR from \`main\` to \`release\` or merge manually.
43
+ 4. **"Version Packages" PR**:
44
+ - The GitHub Action detects new changesets and automatically creates a Pull Request titled **"Version Packages"**.
45
+ - This PR contains the version bumps and updated \`CHANGELOG.md\` files.
46
+ 5. **Merge & Publish**:
47
+ - Review and merge the "Version Packages" PR.
48
+ - The Action runs again, detects the versions have been bumped, builds the libraries, and publishes them to npm with the \`latest\` tag.
49
+
50
+ ### Publishing Steps
51
+
52
+ 1. Ensure all changesets are present on \`main\`.
53
+ 2. Merge \`main\` into \`release\`:
54
+ \`\`\`bash
55
+ git checkout release
56
+ git pull origin release
57
+ git merge main
58
+ git push origin release
59
+ \`\`\`
60
+ 3. Go to GitHub Pull Requests. You will see a **"Version Packages"** PR created by the bot.
61
+ 4. Merge that PR.
62
+ 5. The release is now live on npm!
63
+
64
+ ## Manual Verification (Optional)
65
+
66
+ Before publishing a new version you can run:
67
+
68
+ \`\`\`bash
69
+ bun run build:not-apps
70
+ npx npm-packlist --json packages/libs/contracts
71
+ \`\`\`
72
+
73
+ ## Rollback
74
+
75
+ If a publish fails mid-way, re-run the workflow once the issue is fixed. Already published packages are skipped automatically. Use \`npm deprecate <package>@<version>\` if we need to warn consumers about a broken release.
76
+ `}]);