@lssm/example.learning-journey-ui-coaching 0.0.0-canary-20251217080011 → 0.0.0-canary-20251219202229

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 (212) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +483 -22
  2. package/.turbo/turbo-build.log +484 -24
  3. package/CHANGELOG.md +9 -9
  4. package/LICENSE +21 -0
  5. package/dist/CoachingMiniApp.d.ts +17 -0
  6. package/dist/CoachingMiniApp.d.ts.map +1 -0
  7. package/dist/CoachingMiniApp.js +65 -0
  8. package/dist/CoachingMiniApp.js.map +1 -0
  9. package/dist/components/EngagementMeter.d.ts +18 -0
  10. package/dist/components/EngagementMeter.d.ts.map +1 -0
  11. package/dist/components/EngagementMeter.js +108 -0
  12. package/dist/components/EngagementMeter.js.map +1 -0
  13. package/dist/components/TipCard.d.ts +21 -0
  14. package/dist/components/TipCard.d.ts.map +1 -0
  15. package/dist/components/TipCard.js +76 -0
  16. package/dist/components/TipCard.js.map +1 -0
  17. package/dist/components/TipFeed.d.ts +18 -0
  18. package/dist/components/TipFeed.d.ts.map +1 -0
  19. package/dist/components/TipFeed.js +66 -0
  20. package/dist/components/TipFeed.js.map +1 -0
  21. package/dist/components/index.d.ts +4 -0
  22. package/dist/components/index.js +5 -0
  23. package/dist/docs/index.d.ts +1 -0
  24. package/dist/docs/index.js +1 -0
  25. package/dist/docs/learning-journey-ui-coaching.docblock.d.ts +1 -0
  26. package/dist/docs/learning-journey-ui-coaching.docblock.js +21 -0
  27. package/dist/docs/learning-journey-ui-coaching.docblock.js.map +1 -0
  28. package/dist/{index.d.mts → example.d.ts} +2 -18
  29. package/dist/example.d.ts.map +1 -0
  30. package/dist/example.js +35 -0
  31. package/dist/example.js.map +1 -0
  32. package/dist/examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js +45 -0
  33. package/dist/examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js.map +1 -0
  34. package/dist/examples/learning-journey-ui-shared/dist/components/StreakCounter.js +46 -0
  35. package/dist/examples/learning-journey-ui-shared/dist/components/StreakCounter.js.map +1 -0
  36. package/dist/examples/learning-journey-ui-shared/dist/components/ViewTabs.js +49 -0
  37. package/dist/examples/learning-journey-ui-shared/dist/components/ViewTabs.js.map +1 -0
  38. package/dist/examples/learning-journey-ui-shared/dist/components/XpBar.js +47 -0
  39. package/dist/examples/learning-journey-ui-shared/dist/components/XpBar.js.map +1 -0
  40. package/dist/examples/learning-journey-ui-shared/dist/components/index.js +4 -0
  41. package/dist/examples/learning-journey-ui-shared/dist/docs/index.js +1 -0
  42. package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js +21 -0
  43. package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js.map +1 -0
  44. package/dist/examples/learning-journey-ui-shared/dist/hooks/index.js +1 -0
  45. package/dist/examples/learning-journey-ui-shared/dist/hooks/useLearningProgress.js +74 -0
  46. package/dist/examples/learning-journey-ui-shared/dist/hooks/useLearningProgress.js.map +1 -0
  47. package/dist/examples/learning-journey-ui-shared/dist/index.js +8 -0
  48. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -0
  49. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
  50. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/index.js +24 -0
  51. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/meta.docs.js +29 -0
  52. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
  53. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/presentations.js +72 -0
  54. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
  55. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/registry.js +45 -0
  56. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/registry.js.map +1 -0
  57. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +80 -0
  58. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
  59. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +57 -0
  60. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
  61. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -0
  62. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
  63. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +357 -0
  64. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
  65. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -0
  66. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
  67. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -0
  68. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
  69. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -0
  70. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
  71. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -0
  72. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
  73. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +79 -0
  74. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
  75. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +84 -0
  76. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
  77. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +45 -0
  78. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
  79. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -0
  80. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
  81. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +40 -0
  82. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
  83. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +69 -0
  84. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
  85. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -0
  86. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
  87. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +62 -0
  88. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
  89. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +155 -0
  90. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
  91. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -0
  92. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
  93. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +101 -0
  94. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
  95. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -0
  96. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
  97. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech-contracts.docs.js +96 -0
  98. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
  99. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +6 -0
  100. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js.map +1 -0
  101. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js +34 -0
  102. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js.map +1 -0
  103. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +56 -0
  104. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js.map +1 -0
  105. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +14 -0
  106. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
  107. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js +24 -0
  108. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js.map +1 -0
  109. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js +11 -0
  110. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js.map +1 -0
  111. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +11 -0
  112. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
  113. package/dist/index.d.ts +12 -0
  114. package/dist/index.js +14 -0
  115. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -0
  116. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
  117. package/dist/libs/contracts/dist/docs/index.js +25 -0
  118. package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
  119. package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
  120. package/dist/libs/contracts/dist/docs/presentations.js +72 -0
  121. package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
  122. package/dist/libs/contracts/dist/docs/registry.js +45 -0
  123. package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
  124. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +81 -0
  125. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
  126. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +58 -0
  127. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
  128. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -0
  129. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
  130. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +358 -0
  131. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
  132. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +38 -0
  133. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
  134. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +17 -0
  135. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
  136. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +21 -0
  137. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
  138. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +49 -0
  139. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
  140. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +80 -0
  141. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
  142. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +85 -0
  143. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
  144. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +46 -0
  145. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
  146. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +68 -0
  147. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
  148. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +41 -0
  149. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
  150. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +70 -0
  151. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
  152. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +48 -0
  153. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
  154. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +63 -0
  155. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
  156. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +156 -0
  157. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
  158. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +21 -0
  159. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
  160. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +102 -0
  161. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
  162. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +21 -0
  163. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
  164. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
  165. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
  166. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +6 -0
  167. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js.map +1 -0
  168. package/dist/libs/design-system/dist/components/atoms/Button.js +34 -0
  169. package/dist/libs/design-system/dist/components/atoms/Button.js.map +1 -0
  170. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +56 -0
  171. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js.map +1 -0
  172. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +14 -0
  173. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
  174. package/dist/libs/ui-kit-web/dist/ui/card.js +37 -0
  175. package/dist/libs/ui-kit-web/dist/ui/card.js.map +1 -0
  176. package/dist/libs/ui-kit-web/dist/ui/utils.js +11 -0
  177. package/dist/libs/ui-kit-web/dist/ui/utils.js.map +1 -0
  178. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +11 -0
  179. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
  180. package/dist/views/Overview.d.ts +16 -0
  181. package/dist/views/Overview.d.ts.map +1 -0
  182. package/dist/views/Overview.js +153 -0
  183. package/dist/views/Overview.js.map +1 -0
  184. package/dist/views/Progress.d.ts +11 -0
  185. package/dist/views/Progress.d.ts.map +1 -0
  186. package/dist/views/Progress.js +118 -0
  187. package/dist/views/Progress.js.map +1 -0
  188. package/dist/views/Steps.d.ts +12 -0
  189. package/dist/views/Steps.d.ts.map +1 -0
  190. package/dist/views/Steps.js +69 -0
  191. package/dist/views/Steps.js.map +1 -0
  192. package/dist/views/Timeline.d.ts +11 -0
  193. package/dist/views/Timeline.d.ts.map +1 -0
  194. package/dist/views/Timeline.js +113 -0
  195. package/dist/views/Timeline.js.map +1 -0
  196. package/dist/views/index.d.ts +5 -0
  197. package/dist/views/index.js +6 -0
  198. package/package.json +28 -18
  199. package/src/components/EngagementMeter.tsx +0 -2
  200. package/src/components/TipFeed.tsx +1 -1
  201. package/tsconfig.tsbuildinfo +1 -1
  202. package/tsdown.config.js +14 -10
  203. package/dist/TipFeed-_1oKR35X.mjs +0 -234
  204. package/dist/components/index.d.mts +0 -2
  205. package/dist/components/index.mjs +0 -4
  206. package/dist/components-kh0CpIG2.mjs +0 -1
  207. package/dist/index-BH0UbqIy.d.mts +0 -47
  208. package/dist/index-BjhNDTSh.d.mts +0 -34
  209. package/dist/index.mjs +0 -110
  210. package/dist/views/index.d.mts +0 -2
  211. package/dist/views/index.mjs +0 -4
  212. package/dist/views-BTGcWRSz.mjs +0 -421
@@ -0,0 +1,96 @@
1
+ import { registerDocBlocks } from "./registry.js";
2
+
3
+ //#region ../learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech-contracts.docs.js
4
+ const techContractsDocs = [{
5
+ id: "docs.tech.contracts.presentations-v2",
6
+ title: "Presentations V2 — Unified Descriptor & Transform Engine",
7
+ summary: "How PresentationDescriptorV2 and TransformEngine keep docs/renderers consistent.",
8
+ visibility: "public",
9
+ route: "/docs/tech/contracts/presentations-v2",
10
+ kind: "reference",
11
+ tags: [
12
+ "presentations",
13
+ "docs",
14
+ "mcp"
15
+ ],
16
+ body: `## Presentations V2 — Unified Descriptor & Transform Engine
17
+
18
+ ### Purpose
19
+
20
+ Unify presentations into one descriptor (\`PresentationDescriptorV2\`) that declares a single source (React component key or BlockNote doc) and a list of output targets (react, markdown, application/json, application/xml). A pluggable \`TransformEngine\` renders any target and applies PII redaction.
21
+
22
+ ### Types
23
+
24
+ \`\`\`ts
25
+ type PresentationTarget =
26
+ | 'react'
27
+ | 'markdown'
28
+ | 'application/json'
29
+ | 'application/xml';
30
+
31
+ type PresentationSource =
32
+ | {
33
+ type: 'component';
34
+ framework: 'react';
35
+ componentKey: string;
36
+ props?: AnySchemaModel;
37
+ }
38
+ | { type: 'blocknotejs'; docJson: unknown; blockConfig?: unknown };
39
+
40
+ interface PresentationDescriptorV2 {
41
+ meta: PresentationV2Meta; // includes partial OwnerShipMeta + description
42
+ policy?: { flags?: string[]; pii?: string[] };
43
+ source: PresentationSource;
44
+ targets: PresentationTarget[];
45
+ }
46
+
47
+ // Shared ownership schema (source of truth in @lssm/lib.contracts/src/ownership.ts)
48
+ interface OwnerShipMeta {
49
+ title: string;
50
+ description: string;
51
+ domain: string;
52
+ owners: Owner[];
53
+ tags: Tag[];
54
+ stability: Stability;
55
+ }
56
+
57
+ type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
58
+ type Owner = string; // curated list available in code (e.g., '@sigil-team', 'team-strit')
59
+ type Tag = string; // curated list available in code (e.g., 'auth', 'spots')
60
+
61
+ // For V2 presentations, meta is a Partial<OwnerShipMeta> plus description, name, version
62
+ interface PresentationV2Meta extends Partial<OwnerShipMeta> {
63
+ name: string;
64
+ version: number;
65
+ description?: string;
66
+ }
67
+ \`\`\`
68
+
69
+ ### Engine
70
+
71
+ Use \`createDefaultTransformEngine()\` and register custom renderers as needed (e.g., high-fidelity BlockNote → Markdown). The default engine supports markdown/json/xml; a React renderer returns a serializable descriptor the host app renders via a \`componentMap\` or a BlockNote renderer. The canonical source type string is \`blocknotejs\` (not \`blocknote\`).
72
+
73
+ PII paths (JSON-like) are redacted from rendered outputs.
74
+
75
+ ### MCP Integration
76
+
77
+ \`createMcpServer\` accepts \`presentationsV2\`. Each descriptor is exposed under \`presentation://<name>/v<version>\` and negotiated variants (\`.md/.json/.xml\`) are rendered by the engine.
78
+
79
+ ### Migration
80
+
81
+ - V1 \`PresentationSpec\` remains supported; a back-compat helper converts V1 → V2 when convenient.
82
+ - Prefer V2 for new work.
83
+
84
+ ### Examples (Sigil)
85
+
86
+ - \`sigil.auth.webauth_tabs_v2\`: component source (\`componentKey: 'sigil.webauth.tabs'\`), targets \`react/json/xml\`.
87
+ - \`sigil.signup.guide_v2\`: BlockNote doc source, targets \`react/markdown/json/xml\`.
88
+
89
+ ### React Rendering
90
+
91
+ Host apps use a \`componentMap\` (e.g., \`'sigil.webauth.tabs' → WebAuthTabs\`) and a BlockNote renderer to turn the React render descriptor into elements.`
92
+ }];
93
+ registerDocBlocks(techContractsDocs);
94
+
95
+ //#endregion
96
+ //# sourceMappingURL=tech-contracts.docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tech-contracts.docs.js","names":[],"sources":["../../../../../../../../../learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech-contracts.docs.js"],"sourcesContent":["import { registerDocBlocks } from \"./registry.js\";\n\n//#region ../../libs/contracts/dist/docs/tech-contracts.docs.js\nconst techContractsDocs = [{\n\tid: \"docs.tech.contracts.presentations-v2\",\n\ttitle: \"Presentations V2 — Unified Descriptor & Transform Engine\",\n\tsummary: \"How PresentationDescriptorV2 and TransformEngine keep docs/renderers consistent.\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/contracts/presentations-v2\",\n\tkind: \"reference\",\n\ttags: [\n\t\t\"presentations\",\n\t\t\"docs\",\n\t\t\"mcp\"\n\t],\n\tbody: `## Presentations V2 — Unified Descriptor & Transform Engine\n\n### Purpose\n\nUnify presentations into one descriptor (\\`PresentationDescriptorV2\\`) that declares a single source (React component key or BlockNote doc) and a list of output targets (react, markdown, application/json, application/xml). A pluggable \\`TransformEngine\\` renders any target and applies PII redaction.\n\n### Types\n\n\\`\\`\\`ts\ntype PresentationTarget =\n | 'react'\n | 'markdown'\n | 'application/json'\n | 'application/xml';\n\ntype PresentationSource =\n | {\n type: 'component';\n framework: 'react';\n componentKey: string;\n props?: AnySchemaModel;\n }\n | { type: 'blocknotejs'; docJson: unknown; blockConfig?: unknown };\n\ninterface PresentationDescriptorV2 {\n meta: PresentationV2Meta; // includes partial OwnerShipMeta + description\n policy?: { flags?: string[]; pii?: string[] };\n source: PresentationSource;\n targets: PresentationTarget[];\n}\n\n// Shared ownership schema (source of truth in @lssm/lib.contracts/src/ownership.ts)\ninterface OwnerShipMeta {\n title: string;\n description: string;\n domain: string;\n owners: Owner[];\n tags: Tag[];\n stability: Stability;\n}\n\ntype Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';\ntype Owner = string; // curated list available in code (e.g., '@sigil-team', 'team-strit')\ntype Tag = string; // curated list available in code (e.g., 'auth', 'spots')\n\n// For V2 presentations, meta is a Partial<OwnerShipMeta> plus description, name, version\ninterface PresentationV2Meta extends Partial<OwnerShipMeta> {\n name: string;\n version: number;\n description?: string;\n}\n\\`\\`\\`\n\n### Engine\n\nUse \\`createDefaultTransformEngine()\\` and register custom renderers as needed (e.g., high-fidelity BlockNote → Markdown). The default engine supports markdown/json/xml; a React renderer returns a serializable descriptor the host app renders via a \\`componentMap\\` or a BlockNote renderer. The canonical source type string is \\`blocknotejs\\` (not \\`blocknote\\`).\n\nPII paths (JSON-like) are redacted from rendered outputs.\n\n### MCP Integration\n\n\\`createMcpServer\\` accepts \\`presentationsV2\\`. Each descriptor is exposed under \\`presentation://<name>/v<version>\\` and negotiated variants (\\`.md/.json/.xml\\`) are rendered by the engine.\n\n### Migration\n\n- V1 \\`PresentationSpec\\` remains supported; a back-compat helper converts V1 → V2 when convenient.\n- Prefer V2 for new work.\n\n### Examples (Sigil)\n\n- \\`sigil.auth.webauth_tabs_v2\\`: component source (\\`componentKey: 'sigil.webauth.tabs'\\`), targets \\`react/json/xml\\`.\n- \\`sigil.signup.guide_v2\\`: BlockNote doc source, targets \\`react/markdown/json/xml\\`.\n\n### React Rendering\n\nHost apps use a \\`componentMap\\` (e.g., \\`'sigil.webauth.tabs' → WebAuthTabs\\`) and a BlockNote renderer to turn the React render descriptor into elements.`\n}];\nregisterDocBlocks(techContractsDocs);\n\n//#endregion\nexport { techContractsDocs };\n//# sourceMappingURL=tech-contracts.docs.js.map"],"mappings":";;;AAGA,MAAM,oBAAoB,CAAC;CAC1B,IAAI;CACJ,OAAO;CACP,SAAS;CACT,YAAY;CACZ,OAAO;CACP,MAAM;CACN,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4EN,CAAC;AACF,kBAAkB,kBAAkB"}
@@ -0,0 +1,6 @@
1
+ //#region ../learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js
2
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
3
+
4
+ //#endregion
5
+ export { __esmMin };
6
+ //# sourceMappingURL=rolldown_runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolldown_runtime.js","names":[],"sources":["../../../../../../../../../learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js"],"sourcesContent":["//#region ../../libs/design-system/dist/_virtual/rolldown_runtime.js\nvar __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);\n\n//#endregion\nexport { __esmMin };\n//# sourceMappingURL=rolldown_runtime.js.map"],"mappings":";AACA,IAAI,YAAY,IAAI,eAAe,OAAO,MAAM,GAAG,KAAK,EAAE,GAAG"}
@@ -0,0 +1,34 @@
1
+ import { Button as Button$1 } from "../../ui-kit-web/dist/ui/button.js";
2
+ import "react";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { Loader2 } from "lucide-react";
5
+
6
+ //#region ../learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js
7
+ function Button({ children, loading, spinnerPlacement = "start", onPress, onPressIn, onPressOut, onLongPress, onTouchStart, onTouchEnd, onTouchCancel, onMouseDown, onMouseUp, onClick, className, disabled, ...rest }) {
8
+ const isDisabled = Boolean(disabled || loading);
9
+ const content = !rest.asChild ? /* @__PURE__ */ jsxs(Fragment, { children: [
10
+ loading && spinnerPlacement === "start" ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : null,
11
+ children,
12
+ loading && spinnerPlacement === "end" ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : null
13
+ ] }) : children;
14
+ return /* @__PURE__ */ jsx(Button$1, {
15
+ ...rest,
16
+ className,
17
+ disabled: isDisabled,
18
+ "aria-busy": loading ? true : void 0,
19
+ "aria-disabled": isDisabled ? true : void 0,
20
+ onPress: onPress || onClick,
21
+ onClick: onPress || onClick,
22
+ onMouseDown: onMouseDown || onPressIn,
23
+ onMouseUp: onMouseUp || onPressOut,
24
+ onTouchStart,
25
+ onTouchEnd: onTouchEnd || onPressOut,
26
+ onTouchCancel: onTouchCancel || onPressOut,
27
+ type: rest?.type ?? "button",
28
+ children: content
29
+ });
30
+ }
31
+
32
+ //#endregion
33
+ export { Button };
34
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","names":[],"sources":["../../../../../../../../../../learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js"],"sourcesContent":["import { Button as Button$1 } from \"../../ui-kit-web/dist/ui/button.js\";\nimport \"react\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport { Loader2 } from \"lucide-react\";\n\n//#region ../../libs/design-system/dist/components/atoms/Button.js\nfunction Button({ children, loading, spinnerPlacement = \"start\", onPress, onPressIn, onPressOut, onLongPress, onTouchStart, onTouchEnd, onTouchCancel, onMouseDown, onMouseUp, onClick, className, disabled, ...rest }) {\n\tconst isDisabled = Boolean(disabled || loading);\n\tconst content = !rest.asChild ? /* @__PURE__ */ jsxs(Fragment, { children: [\n\t\tloading && spinnerPlacement === \"start\" ? /* @__PURE__ */ jsx(Loader2, { className: \"h-4 w-4 animate-spin\" }) : null,\n\t\tchildren,\n\t\tloading && spinnerPlacement === \"end\" ? /* @__PURE__ */ jsx(Loader2, { className: \"h-4 w-4 animate-spin\" }) : null\n\t] }) : children;\n\treturn /* @__PURE__ */ jsx(Button$1, {\n\t\t...rest,\n\t\tclassName,\n\t\tdisabled: isDisabled,\n\t\t\"aria-busy\": loading ? true : void 0,\n\t\t\"aria-disabled\": isDisabled ? true : void 0,\n\t\tonPress: onPress || onClick,\n\t\tonClick: onPress || onClick,\n\t\tonMouseDown: onMouseDown || onPressIn,\n\t\tonMouseUp: onMouseUp || onPressOut,\n\t\tonTouchStart,\n\t\tonTouchEnd: onTouchEnd || onPressOut,\n\t\tonTouchCancel: onTouchCancel || onPressOut,\n\t\ttype: rest?.type ?? \"button\",\n\t\tchildren: content\n\t});\n}\n\n//#endregion\nexport { Button };\n//# sourceMappingURL=Button.js.map"],"mappings":";;;;;;AAMA,SAAS,OAAO,EAAE,UAAU,SAAS,mBAAmB,SAAS,SAAS,WAAW,YAAY,aAAa,cAAc,YAAY,eAAe,aAAa,WAAW,SAAS,WAAW,UAAU,GAAG,QAAQ;CACvN,MAAM,aAAa,QAAQ,YAAY,QAAQ;CAC/C,MAAM,UAAU,CAAC,KAAK,UAA0B,qBAAK,UAAU,EAAE,UAAU;EAC1E,WAAW,qBAAqB,UAA0B,oBAAI,SAAS,EAAE,WAAW,wBAAwB,CAAC,GAAG;EAChH;EACA,WAAW,qBAAqB,QAAwB,oBAAI,SAAS,EAAE,WAAW,wBAAwB,CAAC,GAAG;EAC9G,EAAE,CAAC,GAAG;AACP,QAAuB,oBAAI,UAAU;EACpC,GAAG;EACH;EACA,UAAU;EACV,aAAa,UAAU,OAAO,KAAK;EACnC,iBAAiB,aAAa,OAAO,KAAK;EAC1C,SAAS,WAAW;EACpB,SAAS,WAAW;EACpB,aAAa,eAAe;EAC5B,WAAW,aAAa;EACxB;EACA,YAAY,cAAc;EAC1B,eAAe,iBAAiB;EAChC,MAAM,MAAM,QAAQ;EACpB,UAAU;EACV,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
2
+ import * as React$1 from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
+ import { Slot } from "@radix-ui/react-slot";
6
+
7
+ //#region ../learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js
8
+ init_utils();
9
+ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-hidden focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
10
+ variants: {
11
+ variant: {
12
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
13
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
14
+ outline: "border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
15
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
16
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
17
+ link: "text-primary underline-offset-4 hover:underline"
18
+ },
19
+ size: {
20
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
21
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
22
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
23
+ icon: "size-9"
24
+ }
25
+ },
26
+ defaultVariants: {
27
+ variant: "default",
28
+ size: "default"
29
+ }
30
+ });
31
+ const Button = React$1.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
32
+ if (asChild) return /* @__PURE__ */ jsx(Slot, {
33
+ "data-slot": "button",
34
+ className: cn(buttonVariants({
35
+ variant,
36
+ size,
37
+ className
38
+ })),
39
+ ...props
40
+ });
41
+ return /* @__PURE__ */ jsx("button", {
42
+ ref,
43
+ "data-slot": "button",
44
+ className: cn(buttonVariants({
45
+ variant,
46
+ size,
47
+ className
48
+ })),
49
+ ...props
50
+ });
51
+ });
52
+ Button.displayName = "Button";
53
+
54
+ //#endregion
55
+ export { Button };
56
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","names":[],"sources":["../../../../../../../../../../../learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js"],"sourcesContent":["import { cn, init_utils } from \"../ui-kit-core/dist/utils.js\";\nimport * as React$1 from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { cva } from \"class-variance-authority\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n//#region ../../libs/design-system/dist/ui-kit-web/dist/ui/button.js\ninit_utils();\nconst buttonVariants = cva(\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-hidden focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\", {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n\t\t\tdestructive: \"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n\t\t\toutline: \"border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50\",\n\t\t\tsecondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n\t\t\tghost: \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n\t\t\tlink: \"text-primary underline-offset-4 hover:underline\"\n\t\t},\n\t\tsize: {\n\t\t\tdefault: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n\t\t\tsm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n\t\t\tlg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n\t\t\ticon: \"size-9\"\n\t\t}\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t\tsize: \"default\"\n\t}\n});\nconst Button = React$1.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {\n\tif (asChild) return /* @__PURE__ */ jsx(Slot, {\n\t\t\"data-slot\": \"button\",\n\t\tclassName: cn(buttonVariants({\n\t\t\tvariant,\n\t\t\tsize,\n\t\t\tclassName\n\t\t})),\n\t\t...props\n\t});\n\treturn /* @__PURE__ */ jsx(\"button\", {\n\t\tref,\n\t\t\"data-slot\": \"button\",\n\t\tclassName: cn(buttonVariants({\n\t\t\tvariant,\n\t\t\tsize,\n\t\t\tclassName\n\t\t})),\n\t\t...props\n\t});\n});\nButton.displayName = \"Button\";\n\n//#endregion\nexport { Button };\n//# sourceMappingURL=button.js.map"],"mappings":";;;;;;;AAOA,YAAY;AACZ,MAAM,iBAAiB,IAAI,icAAic;CAC3d,UAAU;EACT,SAAS;GACR,SAAS;GACT,aAAa;GACb,SAAS;GACT,WAAW;GACX,OAAO;GACP,MAAM;GACN;EACD,MAAM;GACL,SAAS;GACT,IAAI;GACJ,IAAI;GACJ,MAAM;GACN;EACD;CACD,iBAAiB;EAChB,SAAS;EACT,MAAM;EACN;CACD,CAAC;AACF,MAAM,SAAS,QAAQ,YAAY,EAAE,WAAW,SAAS,MAAM,UAAU,OAAO,GAAG,SAAS,QAAQ;AACnG,KAAI,QAAS,QAAuB,oBAAI,MAAM;EAC7C,aAAa;EACb,WAAW,GAAG,eAAe;GAC5B;GACA;GACA;GACA,CAAC,CAAC;EACH,GAAG;EACH,CAAC;AACF,QAAuB,oBAAI,UAAU;EACpC;EACA,aAAa;EACb,WAAW,GAAG,eAAe;GAC5B;GACA;GACA;GACA,CAAC,CAAC;EACH,GAAG;EACH,CAAC;EACD;AACF,OAAO,cAAc"}
@@ -0,0 +1,14 @@
1
+ import { __esmMin } from "../../../../_virtual/rolldown_runtime.js";
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+
5
+ //#region ../learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js
6
+ function cn(...inputs) {
7
+ return twMerge(clsx(inputs));
8
+ }
9
+ var init_utils = __esmMin((() => {}));
10
+ init_utils();
11
+
12
+ //#endregion
13
+ export { cn, init_utils };
14
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../../../../../../../../../../learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js"],"sourcesContent":["import { __esmMin } from \"../../../../_virtual/rolldown_runtime.js\";\nimport { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n//#region ../../libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js\nfunction cn(...inputs) {\n\treturn twMerge(clsx(inputs));\n}\nvar init_utils = __esmMin((() => {}));\ninit_utils();\n\n//#endregion\nexport { cn, init_utils };\n//# sourceMappingURL=utils.js.map"],"mappings":";;;;;AAKA,SAAS,GAAG,GAAG,QAAQ;AACtB,QAAO,QAAQ,KAAK,OAAO,CAAC;;AAE7B,IAAI,aAAa,gBAAgB,IAAI;AACrC,YAAY"}
@@ -0,0 +1,24 @@
1
+ 'use client';
2
+
3
+ import { cn } from "../ui-kit-core/dist/utils.js";
4
+ import "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
7
+
8
+ //#region ../learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js
9
+ function Progress({ className, value, ...props }) {
10
+ return /* @__PURE__ */ jsx(ProgressPrimitive.Root, {
11
+ "data-slot": "progress",
12
+ className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
13
+ ...props,
14
+ children: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {
15
+ "data-slot": "progress-indicator",
16
+ className: "bg-primary h-full w-full flex-1 transition-all",
17
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
18
+ })
19
+ });
20
+ }
21
+
22
+ //#endregion
23
+ export { Progress };
24
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.js","names":[],"sources":["../../../../../../../../../learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js"],"sourcesContent":["'use client';\n\nimport { cn } from \"../ui-kit-core/dist/utils.js\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\n\n//#region ../../libs/ui-kit-web/dist/ui/progress.js\nfunction Progress({ className, value, ...props }) {\n\treturn /* @__PURE__ */ jsx(ProgressPrimitive.Root, {\n\t\t\"data-slot\": \"progress\",\n\t\tclassName: cn(\"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\", className),\n\t\t...props,\n\t\tchildren: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {\n\t\t\t\"data-slot\": \"progress-indicator\",\n\t\t\tclassName: \"bg-primary h-full w-full flex-1 transition-all\",\n\t\t\tstyle: { transform: `translateX(-${100 - (value || 0)}%)` }\n\t\t})\n\t});\n}\n\n//#endregion\nexport { Progress };\n//# sourceMappingURL=progress.js.map"],"mappings":";;;;;;;;AAQA,SAAS,SAAS,EAAE,WAAW,OAAO,GAAG,SAAS;AACjD,QAAuB,oBAAI,kBAAkB,MAAM;EAClD,aAAa;EACb,WAAW,GAAG,kEAAkE,UAAU;EAC1F,GAAG;EACH,UAA0B,oBAAI,kBAAkB,WAAW;GAC1D,aAAa;GACb,WAAW;GACX,OAAO,EAAE,WAAW,eAAe,OAAO,SAAS,GAAG,KAAK;GAC3D,CAAC;EACF,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ //#region ../learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js
5
+ function cn(...inputs) {
6
+ return twMerge(clsx(inputs));
7
+ }
8
+
9
+ //#endregion
10
+ export { cn };
11
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../../../../../../../learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n//#region ../../libs/ui-kit-web/dist/ui/utils.js\nfunction cn(...inputs) {\n\treturn twMerge(clsx(inputs));\n}\n\n//#endregion\nexport { cn };\n//# sourceMappingURL=utils.js.map"],"mappings":";;;;AAIA,SAAS,GAAG,GAAG,QAAQ;AACtB,QAAO,QAAQ,KAAK,OAAO,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ //#region ../learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js
5
+ function cn(...inputs) {
6
+ return twMerge(clsx(inputs));
7
+ }
8
+
9
+ //#endregion
10
+ export { cn };
11
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../../../../../../../../learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n//#region ../../libs/ui-kit-web/dist/ui-kit-core/dist/utils.js\nfunction cn(...inputs) {\n\treturn twMerge(clsx(inputs));\n}\n\n//#endregion\nexport { cn };\n//# sourceMappingURL=utils.js.map"],"mappings":";;;;AAIA,SAAS,GAAG,GAAG,QAAQ;AACtB,QAAO,QAAQ,KAAK,OAAO,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { CoachingMiniApp } from "./CoachingMiniApp.js";
2
+ import { EngagementMeter } from "./components/EngagementMeter.js";
3
+ import { TipCard } from "./components/TipCard.js";
4
+ import { TipFeed } from "./components/TipFeed.js";
5
+ import "./components/index.js";
6
+ import example from "./example.js";
7
+ import { Overview } from "./views/Overview.js";
8
+ import { Steps } from "./views/Steps.js";
9
+ import { Progress as ProgressView } from "./views/Progress.js";
10
+ import { Timeline } from "./views/Timeline.js";
11
+ import "./views/index.js";
12
+ export { CoachingMiniApp, EngagementMeter, Overview, ProgressView as Progress, Steps, Timeline, TipCard, TipFeed, example };
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ import { TipCard } from "./components/TipCard.js";
2
+ import { Overview } from "./views/Overview.js";
3
+ import { Steps } from "./views/Steps.js";
4
+ import { EngagementMeter } from "./components/EngagementMeter.js";
5
+ import { Progress as ProgressView } from "./views/Progress.js";
6
+ import { TipFeed } from "./components/TipFeed.js";
7
+ import { Timeline } from "./views/Timeline.js";
8
+ import { CoachingMiniApp } from "./CoachingMiniApp.js";
9
+ import example_default from "./example.js";
10
+ import "./views/index.js";
11
+ import "./components/index.js";
12
+ import "./docs/index.js";
13
+
14
+ export { CoachingMiniApp, EngagementMeter, Overview, ProgressView as Progress, Steps, Timeline, TipCard, TipFeed, example_default as example };
@@ -0,0 +1,17 @@
1
+ import { registerDocBlocks } from "./registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js
4
+ const accessibility_wcag_compliance_specs_DocBlocks = [{
5
+ id: "docs.accessibility_wcag_compliance_specs",
6
+ title: "Accessibility & WCAG Compliance — **specs.md**",
7
+ summary: "> **Goal:** Ship interfaces that are usable by everyone, by default. This spec sets non‑negotiable rules, checklists, and CI gates to meet **WCAG\xA02.2 AA** (aim for AAA where low‑cost), align with **EN\xA0301\xA0549** (EU), and keep parity on **web (Next.js)** and **mobile (Expo/React\xA0Native)**.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/accessibility_wcag_compliance_specs",
11
+ tags: ["accessibility_wcag_compliance_specs"],
12
+ body: "# Accessibility & WCAG Compliance — **specs.md**\n\n> **Goal:** Ship interfaces that are usable by everyone, by default. This spec sets non‑negotiable rules, checklists, and CI gates to meet **WCAG\xA02.2 AA** (aim for AAA where low‑cost), align with **EN\xA0301\xA0549** (EU), and keep parity on **web (Next.js)** and **mobile (Expo/React\xA0Native)**.\n\n---\n\n## 0) Scope & Principles\n\n- **Standards:** WCAG\xA02.2\xA0AA (incl. new 2.2 SCs: Focus Not Obscured, Focus Appearance, Target Size, Dragging Movements, Accessible Authentication, Redundant Entry). EN\xA0301\xA0549 compliance by conformance to WCAG.\n- **Principles:** Perceivable, Operable, Understandable, Robust (POUR).\n- **Rule of ARIA:** “No ARIA is better than bad ARIA.” Prefer native elements.\n- **Definition of Done (DoD):** No Critical/Major a11y issues in CI; keyboard complete; SR (screen reader) smoke test passed; contrasts pass; acceptance criteria below satisfied.\n- **Repo Alignment:** Web apps use **Radix Primitives + shadcn** wrappers centralized in `packages/lssm/libs/ui-kit-web`. Prefer those components over per‑app duplicates (`packages/*/apps/*/src/components/ui`). When missing, add to `ui-kit-web` first, then adopt app‑side.\n\n---\n\n## 1) Design Requirements (Design System & Tokens)\n\n**1.1 Color & Contrast**\n\n- Body text, icons essential to meaning: **≥\xA04.5:1**; large text (≥\xA018.66px regular / 14px bold): **≥\xA03:1**.\n- Interactive states (default/hover/active/disabled/focus) must maintain contrast **≥\xA03:1** against adjacent colors; text within components follows text ratios.\n- Provide light & dark themes with tokens that guarantee minimums. **Never rely solely on color** to convey meaning; pair with text, shape, or icon.\n\n**1.2 Focus Indicators (WCAG\xA02.4.11/12)**\n\n- Every interactive element has a **visible focus** with clear offset; indicator contrast **≥\xA03:1** vs adjacent colors and indicator **area ≥\xA02\xA0CSS\xA0px** thick.\n- Focus **must not be obscured** by sticky headers/footers or scroll containers.\n\n**1.3 Motion & Preferences**\n\n- Respect `prefers-reduced-motion`: suppress large parallax, auto‑animations; provide instant alternatives.\n- Avoid motion that could trigger vestibular issues; under PRM, use fade/scale under **150ms**.\n\n**1.4 Target Size (2.5.8)**\n\n- Hit areas **≥\xA024×24\xA0CSS\xA0px** (web) and **≥\xA044×44\xA0dp** (mobile) unless exempt.\n\n**1.5 Typography & Layout**\n\n- Support zoom to **400%** without loss of content/functionality; responsive reflow at **320\xA0CSS\xA0px** width.\n- Maintain clear heading hierarchy (h1…h6), one **h1** per view.\n\n- Repository baseline (Web): default body text uses Tailwind `text-lg` (≈18px). As of 2025‑09‑20, the repository bumped all Tailwind typography scale usages by +1 step (e.g., `text-sm`→`text-base`, `text-base`→`text-lg`, …, `text-8xl`→`text-9xl`). For long‑form content, default to `prose-lg`.\n- Do not use `text-xs` for body copy. Reserve `text-sm` only for non‑essential meta (timestamps, fine print) while ensuring contrast and touch targets remain compliant.\n- When increasing font size, ensure line height supports readability. Prefer Tailwind defaults or `leading-relaxed`/`leading-7` for body text where dense blocks appear.\n\n**1.6 Iconography & Imagery**\n\n- Decorative images: `alt=\"\"` or `aria-hidden=\"true\"`.\n- Informative images: concise, specific **alt**; complex charts require a **data table or long description**.\n\n---\n\n## 2) Content Requirements (UX Writing)\n\n- Links say **what happens** (avoid “click here”).\n- Buttons start with verbs; avoid ambiguous labels.\n- Form labels are **visible**; placeholders are **not labels**.\n- Error messages: human + programmatic association; avoid color‑only.\n- Authentication: allow **copy/paste**, password managers, and avoid cognitive tests alone (**3.3.7/3.3.8/3.3.9**).\n- Avoid CAPTCHAs that block users; if unavoidable, provide **multiple alternatives** (logic-free).\n\n---\n\n## 3) Engineering Requirements (Web — Next.js/React)\n\n> Use and extend `packages/lssm/libs/ui-kit-web` as the default UI surface. It wraps **Radix** primitives with sensible a11y defaults (focus rings, roles, keyboard, ARIA binding). When a gap exists, add it to `ui-kit-web` first.\n\n**3.1 Semantics & Landmarks**\n\n- Use native elements: `<button>`, `<a href>`, `<label for>`, `<fieldset>`, `<legend>`, `<table>`, etc.\n- Landmarks per page: `header`, `nav`, `main`, `aside`, `footer`. Provide a **Skip to main content** link.\n- Provide a **Route Announcer** (`aria-live=\"polite\"`) and move focus to page **h1** after navigation.\n\n**3.2 Keyboard**\n\n- All functionality available with keyboard alone. Tab order follows DOM/visual order; **no keyboard traps**.\n- Common bindings:\n - Space/Enter → activate button; Enter on link;\n - Esc closes dialogs/menus;\n - Arrow keys for lists/menus/tablists with **roving tabindex**.\n\n**3.3 Focus Management**\n\n- On route change (Next.js), move focus to the page `<h1>` or container and announce via a live region.\n- Dialogs/menus: **trap focus** inside; return focus to invoking control on close.\n- Don’t steal focus except after explicit user action.\n\n**3.4 Forms**\n\n- Each input has a `<label>` or `aria-label`. Group related inputs with `<fieldset><legend>`.\n- Associate errors via `aria-describedby` or inline IDs; announce with `role=\"alert\"` (assertive only for critical).\n- Provide **autocomplete** tokens for known fields; show **inline validation** and do not block on **onBlur** alone.\n\n**3.5 ARIA Usage**\n\n- Only when needed; match patterns (dialog, menu, combobox, tablist, listbox) per ARIA Authoring Practices.\n- Ensure **name/role/value** are programmatically determinable.\n\n**3.6 Media**\n\n- Videos: **captions**; provide **transcripts** for audio; audio descriptions for essential visual info.\n- No auto‑playing audio. Auto‑playing video must be muted and pausable; provide controls.\n\n**3.7 Tables & Data**\n\n- Use `<th scope>` for headers; captions via `<caption>`; announce sorting via `aria-sort`.\n- Provide CSV/JSON export where charts are primary.\n\n**3.8 Performance & Robustness**\n\n- Avoid content shifts that move focus; reserve space or use skeletons.\n- Maintain accessible names through hydration/SSR; avoid `dangerouslySetInnerHTML` where possible.\n\n**3.9 Next.js specifics**\n\n- Use `next/link` for navigation; ensure links are **links**, not buttons.\n- `next/image` must include **alt** (empty if decorative).\n- Announce route changes with a **global live region** and shift focus to the new view.\n\n**3.10 Accessibility library integration**\n\n- Import `@lssm/lib.accessibility` at app root. It auto-imports its `styles.css` via the package entry; ensure bundlers keep CSS side effects. If your app tree-shakes CSS, explicitly import the stylesheet once in your root layout:\n\n```tsx\n// app/layout.tsx\nimport '@lssm/lib.accessibility'; // includes tokens and provider exports\n// or if needed: import '@lssm/lib.accessibility/src/styles.css';\n```\n\n- Wrap the app with `AccessibilityProvider` and include an element with `id=\"main\"` for the skip link target.\n\n---\n\n## 3b) lssm/ui-kit-web — Component Patterns & Defaults\n\n> Source: `packages/lssm/libs/ui-kit-web/ui/*`\n\n- **Button/Input/Textarea**: Built‑in `focus-visible` rings; ensure visible labels via `FormLabel` or `aria-label`.\n- **Form** (`form.tsx`): `FormControl` wires `aria-invalid` and `aria-describedby` to `FormMessage` and `FormDescription`. Prefer `FormMessage` for inline errors. Add `role=\"alert\"` only for critical.\n- **Dialog/Sheet/Dropdown**: Use Radix wrappers for focus‑trap and return‑focus. Provide `DialogTitle` + `DialogDescription` for name/description.\n- **Select/Combobox**: Prefer `SelectTrigger` with visible label; for icon‑only triggers, supply `aria-label`. Document examples in each app.\n- **Tabs**: Use `TabsList`, `TabsTrigger`, `TabsContent`; names are programmatically determinable.\n- **Toast/Toaster**: Prefer non‑blocking announcements; map critical to assertive region; include action buttons with clear labels.\n- **Table**: Use `TableCaption`; ensure `TableHead` cells use proper `scope`. Provide `aria-sort` on sortable headers.\n- **Utilities to add (repo action)**:\n - `SkipLink` component and pattern in layouts.\n - `RouteAnnouncer` (`aria-live=\"polite\"`) and **FocusOnRouteChange** helper.\n - `VisuallyHidden` wrapper (Radix visually-hidden or minimal utility).\n - `useReducedMotion` helper; honor in animated components.\n - Touch‑size variants (≥44×44) for interactive atoms.\n\n---\n\n## 4) Engineering Requirements (Mobile — Expo/React\xA0Native)\n\n- Set `accessibilityLabel`, `accessibilityHint`, and `accessibilityRole` on touchables.\n- Ensure **hit slop** / min size **≥\xA044×44\xA0dp**.\n- Support Dynamic Type / font scaling; no clipped text at **200%**.\n- Respect **Invert Colors** and **Reduce Motion**; avoid flashing.\n- Group related items with `accessibilityElements` ordering; hide decoration with `accessible={false}` or `importantForAccessibility=\"no-hide-descendants\"` when appropriate.\n- Test with **VoiceOver (iOS)** and **TalkBack (Android)**.\n\n---\n\n## 5) Component Patterns (Acceptance Rules)\n\n**Buttons & Links**\n\n- Use `<button>` for actions, `<a href>` for navigation. Provide disabled states that are perceivable beyond color.\n\n**Navigation**\n\n- Provide **Skip link**. One primary nav landmark. Indicate current page (`aria-current=\"page\"`).\n\n**Menus/Combobox/Autocomplete**\n\n- Follow ARIA patterns: focus moves into list; `aria-expanded`, `aria-controls`, `aria-activedescendant` when applicable; Esc closes; typing filters.\n\n**Modals/Dialogs**\n\n- `role=\"dialog\"` or `alertdialog` with **label**; focus trapped; background inert; Esc closes; return focus to trigger.\n\n**Tabs**\n\n- `role=\"tablist\"`; tabs are in the tab order; arrow keys switch focus; content is `role=\"tabpanel\"` with `aria-labelledby`.\n\n**Toasts/Notifications**\n\n- Non-critical: `aria-live=\"polite\"`; critical: `role=\"alert\"` sparingly.\n\n**Infinite Scroll / “Load More”**\n\n- Provide **Load more** control; announce new content to SR; preserve keyboard position.\n\n**Drag & Drop (2.5.7)**\n\n- Provide **non‑drag** alternative (e.g., move up/down buttons).\n\n**Charts & Maps**\n\n- Provide **table alternative** or textual summary; keyboard access to datapoints where interactive.\n\n---\n\n## 6) Testing & CI (Blocking Gates)\n\n**Static & Unit**\n\n- `eslint-plugin-jsx-a11y` — error on violations.\n- `jest-axe` — unit tests for components.\n\n**Automated Integration**\n\n- `axe-core` via Playwright or Cypress on critical flows.\n- `pa11y-ci` on key routes; threshold: **0 Critical / 0 Serious** to merge.\n- Lighthouse CI a11y score **≥\xA095** on target pages.\n\n**Manual QA (per release)**\n\n- **Keyboard patrol:** navigate primary flows without mouse.\n- **Screen reader smoke:** NVDA (Windows) or VoiceOver (macOS/iOS) across login, navigation, forms, dialogs.\n- **Zoom & Reflow:** 200–400% & 320\xA0px width.\n- **Color/Contrast check:** tokens in both themes.\n\n**Reporting**\n\n- A11y issues labeled: `a11y-blocker`, `a11y-bug`, `a11y-enhancement` with WCAG ref.\n\n---\n\n## 7) Repository‑Specific Adoption Plan\n\n- Centralize UI usage on `packages/lssm/libs/ui-kit-web` and de‑duplicate per‑app `components/ui` where feasible.\n- Introduce `SkipLink`, `RouteAnnouncer`, `FocusOnRouteChange`, and `VisuallyHidden` in `ui-kit-web`. Adopt in app layouts (`app/layout.tsx`) first.\n- Add `useReducedMotion` and wire into animated components (e.g., `drawer`, `tooltip`, `carousel`).\n- Add touch‑size variants to `Button`, `IconButton`, `TabsTrigger`, toggles.\n- Document Select label patterns and error association in Forms.\n\n---\n\n## 8) Code Snippets\n\n**Skip Link**\n\n```html\n<a\n class=\"sr-only focus:not-sr-only focus-visible:outline focus-visible:ring-4 focus-visible:ring-offset-2\"\n href=\"#main\"\n >Skip to main content</a\n>\n<main id=\"main\">…</main>\n```\n\n**Dialog (Radix + shadcn/ui) — essentials**\n\n```tsx\n// Ensure label, description, focus trap, and return focus on close remain intact\n<Dialog>\n <DialogTrigger asChild>\n <button aria-haspopup=\"dialog\">Open settings</button>\n </DialogTrigger>\n <DialogContent aria-describedby=\"settings-desc\">\n <DialogTitle>Settings</DialogTitle>\n <p id=\"settings-desc\">Update your preferences.</p>\n <DialogClose asChild>\n <button>Close</button>\n </DialogClose>\n </DialogContent>\n</Dialog>\n```\n\n**Form error association**\n\n```tsx\n<label htmlFor=\"email\">Email</label>\n<input id=\"email\" name=\"email\" type=\"email\" aria-describedby=\"email-err\" />\n<p id=\"email-err\" role=\"alert\">Enter a valid email.</p>\n```\n\n**Route change announcement (Next.js)**\n\n```tsx\n// Add once at app root\n<div\n aria-live=\"polite\"\n aria-atomic=\"true\"\n id=\"route-announcer\"\n className=\"sr-only\"\n/>\n```\n\n---\n\n## 9) Exceptions & Waivers\n\n- If a criterion cannot be met, file an issue with: context, attempted alternatives, WCAG reference, impact assessment, and a remediation date. **Temporary waivers only.**\n\n---\n\n## 10) Ownership\n\n- **Design:** maintains token contrast, component specs.\n- **Engineering:** enforces CI gates, implements patterns.\n- **QA:** runs manual checks per release.\n- **PM:** blocks release if AA not met on user‑visible flows.\n\n---\n\n## 11) References (internalize; no external dependency at runtime)\n\n- WCAG\xA02.2 (AA), EN\xA0301\xA0549. ARIA Authoring Practices. Platform HIG (Apple, Material).\n- `packages/lssm/libs/ui-kit-web` as the canonical UI source for web.\n\n> **Bottom line:** Shipping means **accessible by default**. We don’t trade a11y for speed; we bake it into speed.\n\n---\n\n## 12) Adoption Status (2025-09-23)\n\n- web-artisan: AccessibilityProvider integrated; sr-only/forced-colors applied; 44x44 targets; forms announce errors; jest-axe and cypress-axe in place.\n- web-strit: AccessibilityProvider integrated; forced-colors, sr-only; forms announce errors; 44x44 targets; contrast tokens and text-scale wired; jest-axe and cypress-axe in place.\n- web-coliving: AccessibilityProvider integrated; forced-colors and focus visibility added; text-scale wired; landing pages converted to `Section`/stacks with text-lg defaults; CTA capture standardized; ESLint guard for text-xs in main content; jest-axe and cypress-axe in place. Next: audit icon-only controls and ensure 44x44 targets; add role=\"alert\" where critical.\n\n> CI gates: run eslint a11y, jest-axe on components, and cypress-axe on critical flows per app.\n\n---\n\n## 13) CI Hardening & Visual QA\n\n- Linting: Run eslint with jsx-a11y rules across all web apps; block on violations.\n- Unit: Run jest-axe for ui-kit-web and app-level components.\n- Integration: cypress-axe on key flows (auth, forms, dialogs, tables).\n- Synthetic scans: pa11y-ci on critical pages (0 Critical/Serious policy).\n- Performance/A11y audit: Lighthouse CI with a11y score >= 95 on target routes.\n- Artifacts: Upload pa11y and Lighthouse reports per PR; annotate failures.\n\n### Recent additions (2025-09-26)\n\n- AutocompleteInput (groceries): Upgraded to ARIA combobox pattern with `aria-controls`, `aria-activedescendant`, `Escape`/`Tab` handling, and labelled listbox.\n- Cypress a11y tests added for furniture and incidents modules on `/modules` and operators flows; checks run axe with critical/serious impacts.\n\n## 14) Accessibility Telemetry (PostHog)\n\n- Events (anonymized): a11y_pref_changed (text_scale, contrast_mode, reduce_motion), a11y_panel_opened.\n- Properties: app, route, previous_value, new_value, timestamp.\n- Dashboards: Adoption over time, per app/route; correlation with reduced bounce on forms.\n- Privacy: No PII; aggregate only.\n"
13
+ }];
14
+ registerDocBlocks(accessibility_wcag_compliance_specs_DocBlocks);
15
+
16
+ //#endregion
17
+ //# sourceMappingURL=accessibility_wcag_compliance_specs.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibility_wcag_compliance_specs.docblock.js","names":[],"sources":["../../../../../../../libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"./registry.js\";\n\n//#region src/docs/accessibility_wcag_compliance_specs.docblock.ts\nconst accessibility_wcag_compliance_specs_DocBlocks = [{\n\tid: \"docs.accessibility_wcag_compliance_specs\",\n\ttitle: \"Accessibility & WCAG Compliance — **specs.md**\",\n\tsummary: \"> **Goal:** Ship interfaces that are usable by everyone, by default. This spec sets non‑negotiable rules, checklists, and CI gates to meet **WCAG\\xA02.2 AA** (aim for AAA where low‑cost), align with **EN\\xA0301\\xA0549** (EU), and keep parity on **web (Next.js)** and **mobile (Expo/React\\xA0Native)**.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/accessibility_wcag_compliance_specs\",\n\ttags: [\"accessibility_wcag_compliance_specs\"],\n\tbody: \"# Accessibility & WCAG Compliance — **specs.md**\\n\\n> **Goal:** Ship interfaces that are usable by everyone, by default. This spec sets non‑negotiable rules, checklists, and CI gates to meet **WCAG\\xA02.2 AA** (aim for AAA where low‑cost), align with **EN\\xA0301\\xA0549** (EU), and keep parity on **web (Next.js)** and **mobile (Expo/React\\xA0Native)**.\\n\\n---\\n\\n## 0) Scope & Principles\\n\\n- **Standards:** WCAG\\xA02.2\\xA0AA (incl. new 2.2 SCs: Focus Not Obscured, Focus Appearance, Target Size, Dragging Movements, Accessible Authentication, Redundant Entry). EN\\xA0301\\xA0549 compliance by conformance to WCAG.\\n- **Principles:** Perceivable, Operable, Understandable, Robust (POUR).\\n- **Rule of ARIA:** “No ARIA is better than bad ARIA.” Prefer native elements.\\n- **Definition of Done (DoD):** No Critical/Major a11y issues in CI; keyboard complete; SR (screen reader) smoke test passed; contrasts pass; acceptance criteria below satisfied.\\n- **Repo Alignment:** Web apps use **Radix Primitives + shadcn** wrappers centralized in `packages/lssm/libs/ui-kit-web`. Prefer those components over per‑app duplicates (`packages/*/apps/*/src/components/ui`). When missing, add to `ui-kit-web` first, then adopt app‑side.\\n\\n---\\n\\n## 1) Design Requirements (Design System & Tokens)\\n\\n**1.1 Color & Contrast**\\n\\n- Body text, icons essential to meaning: **≥\\xA04.5:1**; large text (≥\\xA018.66px regular / 14px bold): **≥\\xA03:1**.\\n- Interactive states (default/hover/active/disabled/focus) must maintain contrast **≥\\xA03:1** against adjacent colors; text within components follows text ratios.\\n- Provide light & dark themes with tokens that guarantee minimums. **Never rely solely on color** to convey meaning; pair with text, shape, or icon.\\n\\n**1.2 Focus Indicators (WCAG\\xA02.4.11/12)**\\n\\n- Every interactive element has a **visible focus** with clear offset; indicator contrast **≥\\xA03:1** vs adjacent colors and indicator **area ≥\\xA02\\xA0CSS\\xA0px** thick.\\n- Focus **must not be obscured** by sticky headers/footers or scroll containers.\\n\\n**1.3 Motion & Preferences**\\n\\n- Respect `prefers-reduced-motion`: suppress large parallax, auto‑animations; provide instant alternatives.\\n- Avoid motion that could trigger vestibular issues; under PRM, use fade/scale under **150ms**.\\n\\n**1.4 Target Size (2.5.8)**\\n\\n- Hit areas **≥\\xA024×24\\xA0CSS\\xA0px** (web) and **≥\\xA044×44\\xA0dp** (mobile) unless exempt.\\n\\n**1.5 Typography & Layout**\\n\\n- Support zoom to **400%** without loss of content/functionality; responsive reflow at **320\\xA0CSS\\xA0px** width.\\n- Maintain clear heading hierarchy (h1…h6), one **h1** per view.\\n\\n- Repository baseline (Web): default body text uses Tailwind `text-lg` (≈18px). As of 2025‑09‑20, the repository bumped all Tailwind typography scale usages by +1 step (e.g., `text-sm`→`text-base`, `text-base`→`text-lg`, …, `text-8xl`→`text-9xl`). For long‑form content, default to `prose-lg`.\\n- Do not use `text-xs` for body copy. Reserve `text-sm` only for non‑essential meta (timestamps, fine print) while ensuring contrast and touch targets remain compliant.\\n- When increasing font size, ensure line height supports readability. Prefer Tailwind defaults or `leading-relaxed`/`leading-7` for body text where dense blocks appear.\\n\\n**1.6 Iconography & Imagery**\\n\\n- Decorative images: `alt=\\\"\\\"` or `aria-hidden=\\\"true\\\"`.\\n- Informative images: concise, specific **alt**; complex charts require a **data table or long description**.\\n\\n---\\n\\n## 2) Content Requirements (UX Writing)\\n\\n- Links say **what happens** (avoid “click here”).\\n- Buttons start with verbs; avoid ambiguous labels.\\n- Form labels are **visible**; placeholders are **not labels**.\\n- Error messages: human + programmatic association; avoid color‑only.\\n- Authentication: allow **copy/paste**, password managers, and avoid cognitive tests alone (**3.3.7/3.3.8/3.3.9**).\\n- Avoid CAPTCHAs that block users; if unavoidable, provide **multiple alternatives** (logic-free).\\n\\n---\\n\\n## 3) Engineering Requirements (Web — Next.js/React)\\n\\n> Use and extend `packages/lssm/libs/ui-kit-web` as the default UI surface. It wraps **Radix** primitives with sensible a11y defaults (focus rings, roles, keyboard, ARIA binding). When a gap exists, add it to `ui-kit-web` first.\\n\\n**3.1 Semantics & Landmarks**\\n\\n- Use native elements: `<button>`, `<a href>`, `<label for>`, `<fieldset>`, `<legend>`, `<table>`, etc.\\n- Landmarks per page: `header`, `nav`, `main`, `aside`, `footer`. Provide a **Skip to main content** link.\\n- Provide a **Route Announcer** (`aria-live=\\\"polite\\\"`) and move focus to page **h1** after navigation.\\n\\n**3.2 Keyboard**\\n\\n- All functionality available with keyboard alone. Tab order follows DOM/visual order; **no keyboard traps**.\\n- Common bindings:\\n - Space/Enter → activate button; Enter on link;\\n - Esc closes dialogs/menus;\\n - Arrow keys for lists/menus/tablists with **roving tabindex**.\\n\\n**3.3 Focus Management**\\n\\n- On route change (Next.js), move focus to the page `<h1>` or container and announce via a live region.\\n- Dialogs/menus: **trap focus** inside; return focus to invoking control on close.\\n- Don’t steal focus except after explicit user action.\\n\\n**3.4 Forms**\\n\\n- Each input has a `<label>` or `aria-label`. Group related inputs with `<fieldset><legend>`.\\n- Associate errors via `aria-describedby` or inline IDs; announce with `role=\\\"alert\\\"` (assertive only for critical).\\n- Provide **autocomplete** tokens for known fields; show **inline validation** and do not block on **onBlur** alone.\\n\\n**3.5 ARIA Usage**\\n\\n- Only when needed; match patterns (dialog, menu, combobox, tablist, listbox) per ARIA Authoring Practices.\\n- Ensure **name/role/value** are programmatically determinable.\\n\\n**3.6 Media**\\n\\n- Videos: **captions**; provide **transcripts** for audio; audio descriptions for essential visual info.\\n- No auto‑playing audio. Auto‑playing video must be muted and pausable; provide controls.\\n\\n**3.7 Tables & Data**\\n\\n- Use `<th scope>` for headers; captions via `<caption>`; announce sorting via `aria-sort`.\\n- Provide CSV/JSON export where charts are primary.\\n\\n**3.8 Performance & Robustness**\\n\\n- Avoid content shifts that move focus; reserve space or use skeletons.\\n- Maintain accessible names through hydration/SSR; avoid `dangerouslySetInnerHTML` where possible.\\n\\n**3.9 Next.js specifics**\\n\\n- Use `next/link` for navigation; ensure links are **links**, not buttons.\\n- `next/image` must include **alt** (empty if decorative).\\n- Announce route changes with a **global live region** and shift focus to the new view.\\n\\n**3.10 Accessibility library integration**\\n\\n- Import `@lssm/lib.accessibility` at app root. It auto-imports its `styles.css` via the package entry; ensure bundlers keep CSS side effects. If your app tree-shakes CSS, explicitly import the stylesheet once in your root layout:\\n\\n```tsx\\n// app/layout.tsx\\nimport '@lssm/lib.accessibility'; // includes tokens and provider exports\\n// or if needed: import '@lssm/lib.accessibility/src/styles.css';\\n```\\n\\n- Wrap the app with `AccessibilityProvider` and include an element with `id=\\\"main\\\"` for the skip link target.\\n\\n---\\n\\n## 3b) lssm/ui-kit-web — Component Patterns & Defaults\\n\\n> Source: `packages/lssm/libs/ui-kit-web/ui/*`\\n\\n- **Button/Input/Textarea**: Built‑in `focus-visible` rings; ensure visible labels via `FormLabel` or `aria-label`.\\n- **Form** (`form.tsx`): `FormControl` wires `aria-invalid` and `aria-describedby` to `FormMessage` and `FormDescription`. Prefer `FormMessage` for inline errors. Add `role=\\\"alert\\\"` only for critical.\\n- **Dialog/Sheet/Dropdown**: Use Radix wrappers for focus‑trap and return‑focus. Provide `DialogTitle` + `DialogDescription` for name/description.\\n- **Select/Combobox**: Prefer `SelectTrigger` with visible label; for icon‑only triggers, supply `aria-label`. Document examples in each app.\\n- **Tabs**: Use `TabsList`, `TabsTrigger`, `TabsContent`; names are programmatically determinable.\\n- **Toast/Toaster**: Prefer non‑blocking announcements; map critical to assertive region; include action buttons with clear labels.\\n- **Table**: Use `TableCaption`; ensure `TableHead` cells use proper `scope`. Provide `aria-sort` on sortable headers.\\n- **Utilities to add (repo action)**:\\n - `SkipLink` component and pattern in layouts.\\n - `RouteAnnouncer` (`aria-live=\\\"polite\\\"`) and **FocusOnRouteChange** helper.\\n - `VisuallyHidden` wrapper (Radix visually-hidden or minimal utility).\\n - `useReducedMotion` helper; honor in animated components.\\n - Touch‑size variants (≥44×44) for interactive atoms.\\n\\n---\\n\\n## 4) Engineering Requirements (Mobile — Expo/React\\xA0Native)\\n\\n- Set `accessibilityLabel`, `accessibilityHint`, and `accessibilityRole` on touchables.\\n- Ensure **hit slop** / min size **≥\\xA044×44\\xA0dp**.\\n- Support Dynamic Type / font scaling; no clipped text at **200%**.\\n- Respect **Invert Colors** and **Reduce Motion**; avoid flashing.\\n- Group related items with `accessibilityElements` ordering; hide decoration with `accessible={false}` or `importantForAccessibility=\\\"no-hide-descendants\\\"` when appropriate.\\n- Test with **VoiceOver (iOS)** and **TalkBack (Android)**.\\n\\n---\\n\\n## 5) Component Patterns (Acceptance Rules)\\n\\n**Buttons & Links**\\n\\n- Use `<button>` for actions, `<a href>` for navigation. Provide disabled states that are perceivable beyond color.\\n\\n**Navigation**\\n\\n- Provide **Skip link**. One primary nav landmark. Indicate current page (`aria-current=\\\"page\\\"`).\\n\\n**Menus/Combobox/Autocomplete**\\n\\n- Follow ARIA patterns: focus moves into list; `aria-expanded`, `aria-controls`, `aria-activedescendant` when applicable; Esc closes; typing filters.\\n\\n**Modals/Dialogs**\\n\\n- `role=\\\"dialog\\\"` or `alertdialog` with **label**; focus trapped; background inert; Esc closes; return focus to trigger.\\n\\n**Tabs**\\n\\n- `role=\\\"tablist\\\"`; tabs are in the tab order; arrow keys switch focus; content is `role=\\\"tabpanel\\\"` with `aria-labelledby`.\\n\\n**Toasts/Notifications**\\n\\n- Non-critical: `aria-live=\\\"polite\\\"`; critical: `role=\\\"alert\\\"` sparingly.\\n\\n**Infinite Scroll / “Load More”**\\n\\n- Provide **Load more** control; announce new content to SR; preserve keyboard position.\\n\\n**Drag & Drop (2.5.7)**\\n\\n- Provide **non‑drag** alternative (e.g., move up/down buttons).\\n\\n**Charts & Maps**\\n\\n- Provide **table alternative** or textual summary; keyboard access to datapoints where interactive.\\n\\n---\\n\\n## 6) Testing & CI (Blocking Gates)\\n\\n**Static & Unit**\\n\\n- `eslint-plugin-jsx-a11y` — error on violations.\\n- `jest-axe` — unit tests for components.\\n\\n**Automated Integration**\\n\\n- `axe-core` via Playwright or Cypress on critical flows.\\n- `pa11y-ci` on key routes; threshold: **0 Critical / 0 Serious** to merge.\\n- Lighthouse CI a11y score **≥\\xA095** on target pages.\\n\\n**Manual QA (per release)**\\n\\n- **Keyboard patrol:** navigate primary flows without mouse.\\n- **Screen reader smoke:** NVDA (Windows) or VoiceOver (macOS/iOS) across login, navigation, forms, dialogs.\\n- **Zoom & Reflow:** 200–400% & 320\\xA0px width.\\n- **Color/Contrast check:** tokens in both themes.\\n\\n**Reporting**\\n\\n- A11y issues labeled: `a11y-blocker`, `a11y-bug`, `a11y-enhancement` with WCAG ref.\\n\\n---\\n\\n## 7) Repository‑Specific Adoption Plan\\n\\n- Centralize UI usage on `packages/lssm/libs/ui-kit-web` and de‑duplicate per‑app `components/ui` where feasible.\\n- Introduce `SkipLink`, `RouteAnnouncer`, `FocusOnRouteChange`, and `VisuallyHidden` in `ui-kit-web`. Adopt in app layouts (`app/layout.tsx`) first.\\n- Add `useReducedMotion` and wire into animated components (e.g., `drawer`, `tooltip`, `carousel`).\\n- Add touch‑size variants to `Button`, `IconButton`, `TabsTrigger`, toggles.\\n- Document Select label patterns and error association in Forms.\\n\\n---\\n\\n## 8) Code Snippets\\n\\n**Skip Link**\\n\\n```html\\n<a\\n class=\\\"sr-only focus:not-sr-only focus-visible:outline focus-visible:ring-4 focus-visible:ring-offset-2\\\"\\n href=\\\"#main\\\"\\n >Skip to main content</a\\n>\\n<main id=\\\"main\\\">…</main>\\n```\\n\\n**Dialog (Radix + shadcn/ui) — essentials**\\n\\n```tsx\\n// Ensure label, description, focus trap, and return focus on close remain intact\\n<Dialog>\\n <DialogTrigger asChild>\\n <button aria-haspopup=\\\"dialog\\\">Open settings</button>\\n </DialogTrigger>\\n <DialogContent aria-describedby=\\\"settings-desc\\\">\\n <DialogTitle>Settings</DialogTitle>\\n <p id=\\\"settings-desc\\\">Update your preferences.</p>\\n <DialogClose asChild>\\n <button>Close</button>\\n </DialogClose>\\n </DialogContent>\\n</Dialog>\\n```\\n\\n**Form error association**\\n\\n```tsx\\n<label htmlFor=\\\"email\\\">Email</label>\\n<input id=\\\"email\\\" name=\\\"email\\\" type=\\\"email\\\" aria-describedby=\\\"email-err\\\" />\\n<p id=\\\"email-err\\\" role=\\\"alert\\\">Enter a valid email.</p>\\n```\\n\\n**Route change announcement (Next.js)**\\n\\n```tsx\\n// Add once at app root\\n<div\\n aria-live=\\\"polite\\\"\\n aria-atomic=\\\"true\\\"\\n id=\\\"route-announcer\\\"\\n className=\\\"sr-only\\\"\\n/>\\n```\\n\\n---\\n\\n## 9) Exceptions & Waivers\\n\\n- If a criterion cannot be met, file an issue with: context, attempted alternatives, WCAG reference, impact assessment, and a remediation date. **Temporary waivers only.**\\n\\n---\\n\\n## 10) Ownership\\n\\n- **Design:** maintains token contrast, component specs.\\n- **Engineering:** enforces CI gates, implements patterns.\\n- **QA:** runs manual checks per release.\\n- **PM:** blocks release if AA not met on user‑visible flows.\\n\\n---\\n\\n## 11) References (internalize; no external dependency at runtime)\\n\\n- WCAG\\xA02.2 (AA), EN\\xA0301\\xA0549. ARIA Authoring Practices. Platform HIG (Apple, Material).\\n- `packages/lssm/libs/ui-kit-web` as the canonical UI source for web.\\n\\n> **Bottom line:** Shipping means **accessible by default**. We don’t trade a11y for speed; we bake it into speed.\\n\\n---\\n\\n## 12) Adoption Status (2025-09-23)\\n\\n- web-artisan: AccessibilityProvider integrated; sr-only/forced-colors applied; 44x44 targets; forms announce errors; jest-axe and cypress-axe in place.\\n- web-strit: AccessibilityProvider integrated; forced-colors, sr-only; forms announce errors; 44x44 targets; contrast tokens and text-scale wired; jest-axe and cypress-axe in place.\\n- web-coliving: AccessibilityProvider integrated; forced-colors and focus visibility added; text-scale wired; landing pages converted to `Section`/stacks with text-lg defaults; CTA capture standardized; ESLint guard for text-xs in main content; jest-axe and cypress-axe in place. Next: audit icon-only controls and ensure 44x44 targets; add role=\\\"alert\\\" where critical.\\n\\n> CI gates: run eslint a11y, jest-axe on components, and cypress-axe on critical flows per app.\\n\\n---\\n\\n## 13) CI Hardening & Visual QA\\n\\n- Linting: Run eslint with jsx-a11y rules across all web apps; block on violations.\\n- Unit: Run jest-axe for ui-kit-web and app-level components.\\n- Integration: cypress-axe on key flows (auth, forms, dialogs, tables).\\n- Synthetic scans: pa11y-ci on critical pages (0 Critical/Serious policy).\\n- Performance/A11y audit: Lighthouse CI with a11y score >= 95 on target routes.\\n- Artifacts: Upload pa11y and Lighthouse reports per PR; annotate failures.\\n\\n### Recent additions (2025-09-26)\\n\\n- AutocompleteInput (groceries): Upgraded to ARIA combobox pattern with `aria-controls`, `aria-activedescendant`, `Escape`/`Tab` handling, and labelled listbox.\\n- Cypress a11y tests added for furniture and incidents modules on `/modules` and operators flows; checks run axe with critical/serious impacts.\\n\\n## 14) Accessibility Telemetry (PostHog)\\n\\n- Events (anonymized): a11y_pref_changed (text_scale, contrast_mode, reduce_motion), a11y_panel_opened.\\n- Properties: app, route, previous_value, new_value, timestamp.\\n- Dashboards: Adoption over time, per app/route; correlation with reduced bounce on forms.\\n- Privacy: No PII; aggregate only.\\n\"\n}];\nregisterDocBlocks(accessibility_wcag_compliance_specs_DocBlocks);\n\n//#endregion\nexport { accessibility_wcag_compliance_specs_DocBlocks };\n//# sourceMappingURL=accessibility_wcag_compliance_specs.docblock.js.map"],"mappings":";;;AAGA,MAAM,gDAAgD,CAAC;CACtD,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,sCAAsC;CAC7C,MAAM;CACN,CAAC;AACF,kBAAkB,8CAA8C"}
@@ -0,0 +1,25 @@
1
+ import { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes } from "./presentations.js";
2
+ import { DocRegistry, defaultDocRegistry, registerDocBlocks } from "./registry.js";
3
+ import { techContractsDocs } from "./tech-contracts.docs.js";
4
+ import { metaDocs } from "./meta.docs.js";
5
+ import "./accessibility_wcag_compliance_specs.docblock.js";
6
+ import "./tech/lifecycle-stage-system.docblock.js";
7
+ import "./tech/presentation-runtime.docblock.js";
8
+ import "./tech/auth/better-auth-nextjs.docblock.js";
9
+ import "./tech/schema/README.docblock.js";
10
+ import "./tech/templates/runtime.docblock.js";
11
+ import "./tech/workflows/overview.docblock.js";
12
+ import "./tech/mcp-endpoints.docblock.js";
13
+ import "./tech/vscode-extension.docblock.js";
14
+ import "./tech/telemetry-ingest.docblock.js";
15
+ import "./tech/contracts/openapi-export.docblock.js";
16
+ import "./tech/studio/workspaces.docblock.js";
17
+ import "./tech/studio/sandbox-unlogged.docblock.js";
18
+ import "./tech/studio/workspace-ops.docblock.js";
19
+ import "./tech/studio/project-routing.docblock.js";
20
+ import "./tech/studio/platform-admin-panel.docblock.js";
21
+ import "./tech/studio/learning-events.docblock.js";
22
+ import "./tech/studio/learning-journeys.docblock.js";
23
+ import "./tech/studio/project-access-teams.docblock.js";
24
+ import "./tech/studio/team-invitations.docblock.js";
25
+ import "./tech/llm/llm-integration.docblock.js";
@@ -0,0 +1,30 @@
1
+ import { registerDocBlocks } from "./registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/meta.docs.js
4
+ const metaDocs = [{
5
+ id: "docs.meta.docblocks-process",
6
+ title: "DocBlocks process",
7
+ summary: "How to author goal/how/usage DocBlocks close to code.",
8
+ kind: "reference",
9
+ visibility: "mixed",
10
+ route: "/docs/meta/docblocks-process",
11
+ tags: ["docs", "process"],
12
+ body: `## DocBlocks authoring rules
13
+
14
+ - Colocate docs beside implementation; avoid barrel /docs folders.
15
+ - Split intent:
16
+ - **goal**: why this exists (before implementation).
17
+ - **how**: operational/runbook steps.
18
+ - **usage**: quick checklist for consumers.
19
+ - Use \`visibility\`: public | internal | mixed.
20
+ - Prefer routes like \`/docs/<domain>/<topic>/<kind>\`; ids mirror that.
21
+ - Keep body Markdown LLM-friendly; avoid HTML.
22
+ - Add owners/tags/domain/stability when known.
23
+ - For presentations/markdown outputs, rely on TransformEngine via DocRegistry.
24
+ - No sourcePath; DocBlocks are canonical.`
25
+ }];
26
+ registerDocBlocks(metaDocs);
27
+
28
+ //#endregion
29
+ export { metaDocs };
30
+ //# sourceMappingURL=meta.docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.docs.js","names":[],"sources":["../../../../../../../libs/contracts/dist/docs/meta.docs.js"],"sourcesContent":["import { registerDocBlocks } from \"./registry.js\";\n\n//#region src/docs/meta.docs.ts\nconst metaDocs = [{\n\tid: \"docs.meta.docblocks-process\",\n\ttitle: \"DocBlocks process\",\n\tsummary: \"How to author goal/how/usage DocBlocks close to code.\",\n\tkind: \"reference\",\n\tvisibility: \"mixed\",\n\troute: \"/docs/meta/docblocks-process\",\n\ttags: [\"docs\", \"process\"],\n\tbody: `## DocBlocks authoring rules\n\n- Colocate docs beside implementation; avoid barrel /docs folders.\n- Split intent:\n - **goal**: why this exists (before implementation).\n - **how**: operational/runbook steps.\n - **usage**: quick checklist for consumers.\n- Use \\`visibility\\`: public | internal | mixed.\n- Prefer routes like \\`/docs/<domain>/<topic>/<kind>\\`; ids mirror that.\n- Keep body Markdown LLM-friendly; avoid HTML.\n- Add owners/tags/domain/stability when known.\n- For presentations/markdown outputs, rely on TransformEngine via DocRegistry.\n- No sourcePath; DocBlocks are canonical.`\n}];\nregisterDocBlocks(metaDocs);\n\n//#endregion\nexport { metaDocs };\n//# sourceMappingURL=meta.docs.js.map"],"mappings":";;;AAGA,MAAM,WAAW,CAAC;CACjB,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,QAAQ,UAAU;CACzB,MAAM;;;;;;;;;;;;;CAaN,CAAC;AACF,kBAAkB,SAAS"}
@@ -0,0 +1,72 @@
1
+ //#region ../../libs/contracts/dist/docs/presentations.js
2
+ const DEFAULT_TARGETS = [
3
+ "markdown",
4
+ "application/json",
5
+ "application/xml",
6
+ "react"
7
+ ];
8
+ function normalizeRoute(route) {
9
+ if (!route.length) return "/";
10
+ const withLeading = route.startsWith("/") ? route : `/${route}`;
11
+ return withLeading === "/" ? "/" : withLeading.replace(/\/+$/, "");
12
+ }
13
+ function deriveRoute(block, routePrefix) {
14
+ if (block.route) return normalizeRoute(block.route);
15
+ const prefix = routePrefix ?? "/docs";
16
+ const slug = block.id.replace(/^docs\.?/, "").replace(/\./g, "/").replace(/\/+/g, "/");
17
+ return normalizeRoute(slug.startsWith("/") ? slug : `${prefix}/${slug}`);
18
+ }
19
+ function buildName(block, namespace) {
20
+ return namespace ? `${namespace}.${block.id}` : block.id;
21
+ }
22
+ function docBlockToPresentationV2(block, options) {
23
+ const targets = options?.defaultTargets ?? DEFAULT_TARGETS;
24
+ const version = block.version ?? options?.defaultVersion ?? 1;
25
+ const stability = block.stability ?? options?.defaultStability ?? "stable";
26
+ return {
27
+ meta: {
28
+ name: buildName(block, options?.namespace),
29
+ version,
30
+ description: block.summary ?? block.title,
31
+ tags: block.tags,
32
+ owners: block.owners,
33
+ domain: block.domain,
34
+ stability
35
+ },
36
+ policy: block.visibility && block.visibility !== "public" ? { flags: [block.visibility] } : void 0,
37
+ source: {
38
+ type: "blocknotejs",
39
+ docJson: block.body
40
+ },
41
+ targets
42
+ };
43
+ }
44
+ function docBlockToPresentationSpec(block, options) {
45
+ const version = block.version ?? options?.defaultVersion ?? 1;
46
+ const stability = block.stability ?? options?.defaultStability ?? "stable";
47
+ return {
48
+ meta: {
49
+ name: buildName(block, options?.namespace),
50
+ version,
51
+ stability,
52
+ tags: block.tags,
53
+ owners: block.owners,
54
+ description: block.summary ?? block.title
55
+ },
56
+ content: {
57
+ kind: "markdown",
58
+ content: block.body
59
+ }
60
+ };
61
+ }
62
+ function docBlocksToPresentationRoutes(blocks, options) {
63
+ return blocks.map((block) => ({
64
+ block,
65
+ route: deriveRoute(block, options?.routePrefix),
66
+ descriptor: docBlockToPresentationV2(block, options)
67
+ }));
68
+ }
69
+
70
+ //#endregion
71
+ export { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes };
72
+ //# sourceMappingURL=presentations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentations.js","names":[],"sources":["../../../../../../../libs/contracts/dist/docs/presentations.js"],"sourcesContent":["//#region src/docs/presentations.ts\nconst DEFAULT_TARGETS = [\n\t\"markdown\",\n\t\"application/json\",\n\t\"application/xml\",\n\t\"react\"\n];\nfunction normalizeRoute(route) {\n\tif (!route.length) return \"/\";\n\tconst withLeading = route.startsWith(\"/\") ? route : `/${route}`;\n\treturn withLeading === \"/\" ? \"/\" : withLeading.replace(/\\/+$/, \"\");\n}\nfunction deriveRoute(block, routePrefix) {\n\tif (block.route) return normalizeRoute(block.route);\n\tconst prefix = routePrefix ?? \"/docs\";\n\tconst slug = block.id.replace(/^docs\\.?/, \"\").replace(/\\./g, \"/\").replace(/\\/+/g, \"/\");\n\treturn normalizeRoute(slug.startsWith(\"/\") ? slug : `${prefix}/${slug}`);\n}\nfunction buildName(block, namespace) {\n\treturn namespace ? `${namespace}.${block.id}` : block.id;\n}\nfunction docBlockToPresentationV2(block, options) {\n\tconst targets = options?.defaultTargets ?? DEFAULT_TARGETS;\n\tconst version = block.version ?? options?.defaultVersion ?? 1;\n\tconst stability = block.stability ?? options?.defaultStability ?? \"stable\";\n\treturn {\n\t\tmeta: {\n\t\t\tname: buildName(block, options?.namespace),\n\t\t\tversion,\n\t\t\tdescription: block.summary ?? block.title,\n\t\t\ttags: block.tags,\n\t\t\towners: block.owners,\n\t\t\tdomain: block.domain,\n\t\t\tstability\n\t\t},\n\t\tpolicy: block.visibility && block.visibility !== \"public\" ? { flags: [block.visibility] } : void 0,\n\t\tsource: {\n\t\t\ttype: \"blocknotejs\",\n\t\t\tdocJson: block.body\n\t\t},\n\t\ttargets\n\t};\n}\nfunction docBlockToPresentationSpec(block, options) {\n\tconst version = block.version ?? options?.defaultVersion ?? 1;\n\tconst stability = block.stability ?? options?.defaultStability ?? \"stable\";\n\treturn {\n\t\tmeta: {\n\t\t\tname: buildName(block, options?.namespace),\n\t\t\tversion,\n\t\t\tstability,\n\t\t\ttags: block.tags,\n\t\t\towners: block.owners,\n\t\t\tdescription: block.summary ?? block.title\n\t\t},\n\t\tcontent: {\n\t\t\tkind: \"markdown\",\n\t\t\tcontent: block.body\n\t\t}\n\t};\n}\nfunction docBlocksToPresentationRoutes(blocks, options) {\n\treturn blocks.map((block) => ({\n\t\tblock,\n\t\troute: deriveRoute(block, options?.routePrefix),\n\t\tdescriptor: docBlockToPresentationV2(block, options)\n\t}));\n}\nfunction docBlocksToPresentationSpecs(blocks, options) {\n\treturn blocks.map((block) => docBlockToPresentationSpec(block, options));\n}\nfunction mapDocRoutes(routes) {\n\treturn routes.map(({ route, descriptor }) => [route, descriptor]);\n}\n\n//#endregion\nexport { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, mapDocRoutes };\n//# sourceMappingURL=presentations.js.map"],"mappings":";AACA,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;CACA;AACD,SAAS,eAAe,OAAO;AAC9B,KAAI,CAAC,MAAM,OAAQ,QAAO;CAC1B,MAAM,cAAc,MAAM,WAAW,IAAI,GAAG,QAAQ,IAAI;AACxD,QAAO,gBAAgB,MAAM,MAAM,YAAY,QAAQ,QAAQ,GAAG;;AAEnE,SAAS,YAAY,OAAO,aAAa;AACxC,KAAI,MAAM,MAAO,QAAO,eAAe,MAAM,MAAM;CACnD,MAAM,SAAS,eAAe;CAC9B,MAAM,OAAO,MAAM,GAAG,QAAQ,YAAY,GAAG,CAAC,QAAQ,OAAO,IAAI,CAAC,QAAQ,QAAQ,IAAI;AACtF,QAAO,eAAe,KAAK,WAAW,IAAI,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO;;AAEzE,SAAS,UAAU,OAAO,WAAW;AACpC,QAAO,YAAY,GAAG,UAAU,GAAG,MAAM,OAAO,MAAM;;AAEvD,SAAS,yBAAyB,OAAO,SAAS;CACjD,MAAM,UAAU,SAAS,kBAAkB;CAC3C,MAAM,UAAU,MAAM,WAAW,SAAS,kBAAkB;CAC5D,MAAM,YAAY,MAAM,aAAa,SAAS,oBAAoB;AAClE,QAAO;EACN,MAAM;GACL,MAAM,UAAU,OAAO,SAAS,UAAU;GAC1C;GACA,aAAa,MAAM,WAAW,MAAM;GACpC,MAAM,MAAM;GACZ,QAAQ,MAAM;GACd,QAAQ,MAAM;GACd;GACA;EACD,QAAQ,MAAM,cAAc,MAAM,eAAe,WAAW,EAAE,OAAO,CAAC,MAAM,WAAW,EAAE,GAAG,KAAK;EACjG,QAAQ;GACP,MAAM;GACN,SAAS,MAAM;GACf;EACD;EACA;;AAEF,SAAS,2BAA2B,OAAO,SAAS;CACnD,MAAM,UAAU,MAAM,WAAW,SAAS,kBAAkB;CAC5D,MAAM,YAAY,MAAM,aAAa,SAAS,oBAAoB;AAClE,QAAO;EACN,MAAM;GACL,MAAM,UAAU,OAAO,SAAS,UAAU;GAC1C;GACA;GACA,MAAM,MAAM;GACZ,QAAQ,MAAM;GACd,aAAa,MAAM,WAAW,MAAM;GACpC;EACD,SAAS;GACR,MAAM;GACN,SAAS,MAAM;GACf;EACD;;AAEF,SAAS,8BAA8B,QAAQ,SAAS;AACvD,QAAO,OAAO,KAAK,WAAW;EAC7B;EACA,OAAO,YAAY,OAAO,SAAS,YAAY;EAC/C,YAAY,yBAAyB,OAAO,QAAQ;EACpD,EAAE"}