@lssm/example.learning-journey-ui-shared 1.41.0 → 1.42.2

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 (55) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +48 -0
  2. package/.turbo/turbo-build.log +44 -19
  3. package/CHANGELOG.md +40 -0
  4. package/LICENSE +21 -0
  5. package/README.md +3 -0
  6. package/dist/components/BadgeDisplay.d.ts +12 -0
  7. package/dist/components/BadgeDisplay.d.ts.map +1 -0
  8. package/dist/components/BadgeDisplay.js +45 -0
  9. package/dist/components/BadgeDisplay.js.map +1 -0
  10. package/dist/components/StreakCounter.d.ts +12 -0
  11. package/dist/components/StreakCounter.d.ts.map +1 -0
  12. package/dist/components/StreakCounter.js +46 -0
  13. package/dist/components/StreakCounter.js.map +1 -0
  14. package/dist/components/ViewTabs.d.ts +12 -0
  15. package/dist/components/ViewTabs.d.ts.map +1 -0
  16. package/dist/components/ViewTabs.js +49 -0
  17. package/dist/components/ViewTabs.js.map +1 -0
  18. package/dist/components/XpBar.d.ts +14 -0
  19. package/dist/components/XpBar.d.ts.map +1 -0
  20. package/dist/components/XpBar.js +47 -0
  21. package/dist/components/XpBar.js.map +1 -0
  22. package/dist/components/index.d.ts +5 -0
  23. package/dist/components/index.js +6 -0
  24. package/dist/docs/index.d.ts +1 -0
  25. package/dist/docs/index.js +1 -0
  26. package/dist/docs/learning-journey-ui-shared.docblock.d.ts +1 -0
  27. package/dist/docs/learning-journey-ui-shared.docblock.js +20 -0
  28. package/dist/docs/learning-journey-ui-shared.docblock.js.map +1 -0
  29. package/dist/{index.d.mts → example.d.ts} +2 -5
  30. package/dist/example.d.ts.map +1 -0
  31. package/dist/example.js +35 -0
  32. package/dist/example.js.map +1 -0
  33. package/dist/hooks/index.d.ts +2 -0
  34. package/dist/hooks/index.js +3 -0
  35. package/dist/{index-D_7WU_xm.d.mts → hooks/useLearningProgress.d.ts} +3 -2
  36. package/dist/hooks/useLearningProgress.d.ts.map +1 -0
  37. package/dist/{hooks-B-tDvppY.mjs → hooks/useLearningProgress.js} +4 -1
  38. package/dist/hooks/useLearningProgress.js.map +1 -0
  39. package/dist/index.d.ts +9 -0
  40. package/dist/index.js +11 -0
  41. package/dist/{types-BMAby_Ku.d.mts → types.d.ts} +2 -1
  42. package/dist/types.d.ts.map +1 -0
  43. package/dist/types.js +0 -0
  44. package/package.json +34 -16
  45. package/tsconfig.tsbuildinfo +1 -1
  46. package/tsdown.config.js +14 -11
  47. package/dist/components/index.d.mts +0 -2
  48. package/dist/components/index.mjs +0 -3
  49. package/dist/components-tyJAN4Ru.mjs +0 -164
  50. package/dist/hooks/index.d.mts +0 -2
  51. package/dist/hooks/index.mjs +0 -3
  52. package/dist/index-EWErSKip.d.mts +0 -34
  53. package/dist/index.mjs +0 -1643
  54. package/dist/types.d.mts +0 -2
  55. package/dist/types.mjs +0 -1
@@ -0,0 +1,48 @@
1
+ $ tsdown
2
+ ℹ tsdown v0.18.3 powered by rolldown v1.0.0-beta.57
3
+ ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/learning-journey-ui-shared/tsdown.config.js
4
+ ℹ entry: src/example.ts, src/index.ts, src/types.ts, src/components/BadgeDisplay.tsx, src/components/StreakCounter.tsx, src/components/ViewTabs.tsx, src/components/XpBar.tsx, src/components/index.ts, src/docs/index.ts, src/docs/learning-journey-ui-shared.docblock.ts, src/hooks/index.ts, src/hooks/useLearningProgress.ts
5
+ ℹ target: esnext
6
+ ℹ tsconfig: tsconfig.json
7
+ ℹ Build start
8
+ ℹ Cleaning 41 files
9
+ ℹ dist/hooks/useLearningProgress.js 2.54 kB │ gzip: 0.90 kB
10
+ ℹ dist/components/BadgeDisplay.js 1.50 kB │ gzip: 0.78 kB
11
+ ℹ dist/components/XpBar.js 1.29 kB │ gzip: 0.62 kB
12
+ ℹ dist/components/StreakCounter.js 1.10 kB │ gzip: 0.59 kB
13
+ ℹ dist/components/ViewTabs.js 1.09 kB │ gzip: 0.58 kB
14
+ ℹ dist/docs/learning-journey-ui-shared.docblock.js 0.76 kB │ gzip: 0.45 kB
15
+ ℹ dist/example.js 0.75 kB │ gzip: 0.42 kB
16
+ ℹ dist/index.js 0.53 kB │ gzip: 0.21 kB
17
+ ℹ dist/components/index.js 0.24 kB │ gzip: 0.12 kB
18
+ ℹ dist/hooks/index.js 0.10 kB │ gzip: 0.07 kB
19
+ ℹ dist/docs/index.js 0.05 kB │ gzip: 0.07 kB
20
+ ℹ dist/types.js 0.00 kB │ gzip: 0.02 kB
21
+ ℹ dist/hooks/useLearningProgress.js.map 4.64 kB │ gzip: 1.63 kB
22
+ ℹ dist/components/BadgeDisplay.js.map 2.40 kB │ gzip: 1.14 kB
23
+ ℹ dist/components/ViewTabs.js.map 1.92 kB │ gzip: 0.88 kB
24
+ ℹ dist/components/XpBar.js.map 1.91 kB │ gzip: 0.89 kB
25
+ ℹ dist/components/StreakCounter.js.map 1.63 kB │ gzip: 0.79 kB
26
+ ℹ dist/example.js.map 1.09 kB │ gzip: 0.58 kB
27
+ ℹ dist/docs/learning-journey-ui-shared.docblock.js.map 1.08 kB │ gzip: 0.59 kB
28
+ ℹ dist/types.d.ts.map 0.65 kB │ gzip: 0.33 kB
29
+ ℹ dist/hooks/useLearningProgress.d.ts.map 0.19 kB │ gzip: 0.16 kB
30
+ ℹ dist/components/StreakCounter.d.ts.map 0.19 kB │ gzip: 0.16 kB
31
+ ℹ dist/components/BadgeDisplay.d.ts.map 0.19 kB │ gzip: 0.16 kB
32
+ ℹ dist/components/ViewTabs.d.ts.map 0.18 kB │ gzip: 0.16 kB
33
+ ℹ dist/components/XpBar.d.ts.map 0.17 kB │ gzip: 0.15 kB
34
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
35
+ ℹ dist/types.d.ts 1.69 kB │ gzip: 0.61 kB
36
+ ℹ dist/example.d.ts 0.98 kB │ gzip: 0.41 kB
37
+ ℹ dist/index.d.ts 0.81 kB │ gzip: 0.25 kB
38
+ ℹ dist/hooks/useLearningProgress.d.ts 0.71 kB │ gzip: 0.35 kB
39
+ ℹ dist/components/StreakCounter.d.ts 0.35 kB │ gzip: 0.23 kB
40
+ ℹ dist/components/BadgeDisplay.d.ts 0.35 kB │ gzip: 0.23 kB
41
+ ℹ dist/components/ViewTabs.d.ts 0.34 kB │ gzip: 0.23 kB
42
+ ℹ dist/components/XpBar.d.ts 0.32 kB │ gzip: 0.23 kB
43
+ ℹ dist/components/index.d.ts 0.24 kB │ gzip: 0.12 kB
44
+ ℹ dist/hooks/index.d.ts 0.10 kB │ gzip: 0.07 kB
45
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
46
+ ℹ dist/docs/learning-journey-ui-shared.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
47
+ ℹ 38 files, total: 32.25 kB
48
+ ✔ Build complete in 13500ms
@@ -1,24 +1,49 @@
1
- $ bun build:bundle && bun build:types
1
+ $ bun build:types && bun build:bundle
2
+ $ tsc --noEmit
2
3
  $ tsdown
3
- ℹ tsdown v0.17.4 powered by rolldown v1.0.0-beta.53
4
+ ℹ tsdown v0.18.3 powered by rolldown v1.0.0-beta.57
4
5
  ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/learning-journey-ui-shared/tsdown.config.js
5
- ℹ entry: src/index.ts, src/hooks/index.ts, src/components/index.ts, src/types.ts
6
+ ℹ entry: src/example.ts, src/index.ts, src/types.ts, src/components/BadgeDisplay.tsx, src/components/StreakCounter.tsx, src/components/ViewTabs.tsx, src/components/XpBar.tsx, src/components/index.ts, src/docs/index.ts, src/docs/learning-journey-ui-shared.docblock.ts, src/hooks/index.ts, src/hooks/useLearningProgress.ts
6
7
  ℹ target: esnext
7
8
  ℹ tsconfig: tsconfig.json
8
9
  ℹ Build start
9
- ℹ dist/index.mjs 131.07 kB │ gzip: 43.50 kB
10
- ℹ dist/components/index.mjs  0.17 kB │ gzip: 0.14 kB
11
- ℹ dist/hooks/index.mjs  0.10 kB │ gzip: 0.09 kB
12
- ℹ dist/types.mjs  0.01 kB │ gzip: 0.03 kB
13
- ℹ dist/components-tyJAN4Ru.mjs  4.53 kB │ gzip: 1.63 kB
14
- ℹ dist/hooks-B-tDvppY.mjs  2.48 kB │ gzip: 0.87 kB
15
- ℹ dist/index.d.mts  1.58 kB │ gzip: 0.60 kB
16
- ℹ dist/types.d.mts  0.38 kB │ gzip: 0.19 kB
17
- ℹ dist/components/index.d.mts  0.16 kB │ gzip: 0.14 kB
18
- ℹ dist/hooks/index.d.mts  0.10 kB │ gzip: 0.09 kB
19
- ℹ dist/types-BMAby_Ku.d.mts  1.70 kB │ gzip: 0.60 kB
20
- ℹ dist/index-EWErSKip.d.mts  0.95 kB │ gzip: 0.37 kB
21
- ℹ dist/index-D_7WU_xm.d.mts  0.68 kB │ gzip: 0.35 kB
22
- ℹ 13 files, total: 143.90 kB
23
- ✔ Build complete in 9299ms
24
- $ tsc --noEmit
10
+ ℹ dist/hooks/useLearningProgress.js 2.54 kB │ gzip: 0.90 kB
11
+ ℹ dist/components/BadgeDisplay.js 1.50 kB │ gzip: 0.78 kB
12
+ ℹ dist/components/XpBar.js 1.29 kB │ gzip: 0.62 kB
13
+ ℹ dist/components/StreakCounter.js 1.10 kB │ gzip: 0.59 kB
14
+ ℹ dist/components/ViewTabs.js 1.09 kB │ gzip: 0.58 kB
15
+ ℹ dist/docs/learning-journey-ui-shared.docblock.js 0.76 kB │ gzip: 0.45 kB
16
+ ℹ dist/example.js 0.75 kB │ gzip: 0.42 kB
17
+ ℹ dist/index.js 0.53 kB │ gzip: 0.21 kB
18
+ ℹ dist/components/index.js 0.24 kB │ gzip: 0.12 kB
19
+ ℹ dist/hooks/index.js 0.10 kB │ gzip: 0.07 kB
20
+ ℹ dist/docs/index.js 0.05 kB │ gzip: 0.07 kB
21
+ ℹ dist/types.js 0.00 kB │ gzip: 0.02 kB
22
+ ℹ dist/hooks/useLearningProgress.js.map 4.64 kB │ gzip: 1.63 kB
23
+ ℹ dist/components/BadgeDisplay.js.map 2.40 kB │ gzip: 1.14 kB
24
+ ℹ dist/components/ViewTabs.js.map 1.92 kB │ gzip: 0.88 kB
25
+ ℹ dist/components/XpBar.js.map 1.91 kB │ gzip: 0.89 kB
26
+ ℹ dist/components/StreakCounter.js.map 1.63 kB │ gzip: 0.79 kB
27
+ ℹ dist/example.js.map 1.09 kB │ gzip: 0.58 kB
28
+ ℹ dist/docs/learning-journey-ui-shared.docblock.js.map 1.08 kB │ gzip: 0.59 kB
29
+ ℹ dist/types.d.ts.map 0.65 kB │ gzip: 0.33 kB
30
+ ℹ dist/hooks/useLearningProgress.d.ts.map 0.19 kB │ gzip: 0.16 kB
31
+ ℹ dist/components/StreakCounter.d.ts.map 0.19 kB │ gzip: 0.16 kB
32
+ ℹ dist/components/BadgeDisplay.d.ts.map 0.19 kB │ gzip: 0.16 kB
33
+ ℹ dist/components/ViewTabs.d.ts.map 0.18 kB │ gzip: 0.16 kB
34
+ ℹ dist/components/XpBar.d.ts.map 0.17 kB │ gzip: 0.15 kB
35
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
36
+ ℹ dist/types.d.ts 1.69 kB │ gzip: 0.61 kB
37
+ ℹ dist/example.d.ts 0.98 kB │ gzip: 0.41 kB
38
+ ℹ dist/index.d.ts 0.81 kB │ gzip: 0.25 kB
39
+ ℹ dist/hooks/useLearningProgress.d.ts 0.71 kB │ gzip: 0.35 kB
40
+ ℹ dist/components/StreakCounter.d.ts 0.35 kB │ gzip: 0.23 kB
41
+ ℹ dist/components/BadgeDisplay.d.ts 0.35 kB │ gzip: 0.23 kB
42
+ ℹ dist/components/ViewTabs.d.ts 0.34 kB │ gzip: 0.23 kB
43
+ ℹ dist/components/XpBar.d.ts 0.32 kB │ gzip: 0.23 kB
44
+ ℹ dist/components/index.d.ts 0.24 kB │ gzip: 0.12 kB
45
+ ℹ dist/hooks/index.d.ts 0.10 kB │ gzip: 0.07 kB
46
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
47
+ ℹ dist/docs/learning-journey-ui-shared.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
48
+ ℹ 38 files, total: 32.25 kB
49
+ ✔ Build complete in 13592ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,40 @@
1
+ # @lssm/example.learning-journey-ui-shared
2
+
3
+ ## 1.42.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 1f9ac4c: fix
8
+ - Updated dependencies [1f9ac4c]
9
+ - @lssm/lib.contracts@1.42.2
10
+ - @lssm/lib.design-system@1.42.2
11
+ - @lssm/lib.schema@1.42.2
12
+ - @lssm/lib.ui-kit-web@1.42.2
13
+ - @lssm/module.learning-journey@1.42.2
14
+
15
+ ## 1.42.1
16
+
17
+ ### Patch Changes
18
+
19
+ - f043995: Fix release
20
+ - Updated dependencies [f043995]
21
+ - @lssm/module.learning-journey@1.42.1
22
+ - @lssm/lib.design-system@1.42.1
23
+ - @lssm/lib.ui-kit-web@1.42.1
24
+ - @lssm/lib.contracts@1.42.1
25
+ - @lssm/lib.schema@1.42.1
26
+
27
+ ## 1.42.0
28
+
29
+ ### Minor Changes
30
+
31
+ - 8eefd9c: initial release
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [8eefd9c]
36
+ - @lssm/lib.contracts@1.42.0
37
+ - @lssm/lib.design-system@1.42.0
38
+ - @lssm/lib.schema@1.42.0
39
+ - @lssm/lib.ui-kit-web@1.42.0
40
+ - @lssm/module.learning-journey@1.42.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Chaman Ventures, SASU
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # @lssm/example.learning-journey-ui-shared
2
2
 
3
+ Website: https://contractspec.lssm.tech/
4
+
5
+
3
6
  Shared UI components and hooks for learning journey mini-apps.
4
7
 
5
8
  ## Components
@@ -0,0 +1,12 @@
1
+ import { BadgeDisplayProps } from "../types.js";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/components/BadgeDisplay.d.ts
5
+ declare function BadgeDisplay({
6
+ badges,
7
+ maxVisible,
8
+ size
9
+ }: BadgeDisplayProps): react_jsx_runtime0.JSX.Element;
10
+ //#endregion
11
+ export { BadgeDisplay };
12
+ //# sourceMappingURL=BadgeDisplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BadgeDisplay.d.ts","names":[],"sources":["../../src/components/BadgeDisplay.tsx"],"sourcesContent":[],"mappings":";;;;iBAuBgB,YAAA;;;;GAIb,oBAAiB,kBAAA,CAAA,GAAA,CAAA"}
@@ -0,0 +1,45 @@
1
+ 'use client';
2
+
3
+ import { cn } from "@lssm/lib.ui-kit-web/ui/utils";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/components/BadgeDisplay.tsx
7
+ const BADGE_ICONS = {
8
+ studio_first_30m: "🎯",
9
+ platform_tour: "🗺️",
10
+ crm_first_win: "🏆",
11
+ drill_master: "🧠",
12
+ coach_listener: "👂",
13
+ quest_complete: "⭐",
14
+ streak_7: "🔥",
15
+ streak_30: "💎",
16
+ default: "🏅"
17
+ };
18
+ const sizeStyles = {
19
+ sm: "h-6 w-6 text-sm",
20
+ md: "h-8 w-8 text-base",
21
+ lg: "h-10 w-10 text-lg"
22
+ };
23
+ function BadgeDisplay({ badges, maxVisible = 5, size = "md" }) {
24
+ const visibleBadges = badges.slice(0, maxVisible);
25
+ const hiddenCount = badges.length - maxVisible;
26
+ if (badges.length === 0) return /* @__PURE__ */ jsx("div", {
27
+ className: "text-muted-foreground text-sm",
28
+ children: "No badges earned yet"
29
+ });
30
+ return /* @__PURE__ */ jsxs("div", {
31
+ className: "flex items-center gap-1",
32
+ children: [visibleBadges.map((badge) => /* @__PURE__ */ jsx("div", {
33
+ className: cn("flex items-center justify-center rounded-full bg-gradient-to-br from-amber-400/20 to-amber-600/20", sizeStyles[size]),
34
+ title: badge.replace(/_/g, " "),
35
+ children: BADGE_ICONS[badge] ?? BADGE_ICONS.default
36
+ }, badge)), hiddenCount > 0 && /* @__PURE__ */ jsxs("div", {
37
+ className: cn("text-muted-foreground bg-muted flex items-center justify-center rounded-full", sizeStyles[size], "text-xs font-medium"),
38
+ children: ["+", hiddenCount]
39
+ })]
40
+ });
41
+ }
42
+
43
+ //#endregion
44
+ export { BadgeDisplay };
45
+ //# sourceMappingURL=BadgeDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BadgeDisplay.js","names":["BADGE_ICONS: Record<string, string>"],"sources":["../../src/components/BadgeDisplay.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@lssm/lib.ui-kit-web/ui/utils';\nimport type { BadgeDisplayProps } from '../types';\n\nconst BADGE_ICONS: Record<string, string> = {\n studio_first_30m: '🎯',\n platform_tour: '🗺️',\n crm_first_win: '🏆',\n drill_master: '🧠',\n coach_listener: '👂',\n quest_complete: '⭐',\n streak_7: '🔥',\n streak_30: '💎',\n default: '🏅',\n};\n\nconst sizeStyles = {\n sm: 'h-6 w-6 text-sm',\n md: 'h-8 w-8 text-base',\n lg: 'h-10 w-10 text-lg',\n};\n\nexport function BadgeDisplay({\n badges,\n maxVisible = 5,\n size = 'md',\n}: BadgeDisplayProps) {\n const visibleBadges = badges.slice(0, maxVisible);\n const hiddenCount = badges.length - maxVisible;\n\n if (badges.length === 0) {\n return (\n <div className=\"text-muted-foreground text-sm\">No badges earned yet</div>\n );\n }\n\n return (\n <div className=\"flex items-center gap-1\">\n {visibleBadges.map((badge) => (\n <div\n key={badge}\n className={cn(\n 'flex items-center justify-center rounded-full bg-gradient-to-br from-amber-400/20 to-amber-600/20',\n sizeStyles[size]\n )}\n title={badge.replace(/_/g, ' ')}\n >\n {BADGE_ICONS[badge] ?? BADGE_ICONS.default}\n </div>\n ))}\n {hiddenCount > 0 && (\n <div\n className={cn(\n 'text-muted-foreground bg-muted flex items-center justify-center rounded-full',\n sizeStyles[size],\n 'text-xs font-medium'\n )}\n >\n +{hiddenCount}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;AAKA,MAAMA,cAAsC;CAC1C,kBAAkB;CAClB,eAAe;CACf,eAAe;CACf,cAAc;CACd,gBAAgB;CAChB,gBAAgB;CAChB,UAAU;CACV,WAAW;CACX,SAAS;CACV;AAED,MAAM,aAAa;CACjB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,SAAgB,aAAa,EAC3B,QACA,aAAa,GACb,OAAO,QACa;CACpB,MAAM,gBAAgB,OAAO,MAAM,GAAG,WAAW;CACjD,MAAM,cAAc,OAAO,SAAS;AAEpC,KAAI,OAAO,WAAW,EACpB,QACE,oBAAC;EAAI,WAAU;YAAgC;GAA0B;AAI7E,QACE,qBAAC;EAAI,WAAU;aACZ,cAAc,KAAK,UAClB,oBAAC;GAEC,WAAW,GACT,qGACA,WAAW,MACZ;GACD,OAAO,MAAM,QAAQ,MAAM,IAAI;aAE9B,YAAY,UAAU,YAAY;KAP9B,MAQD,CACN,EACD,cAAc,KACb,qBAAC;GACC,WAAW,GACT,gFACA,WAAW,OACX,sBACD;cACF,KACG;IACE;GAEJ"}
@@ -0,0 +1,12 @@
1
+ import { StreakCounterProps } from "../types.js";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/components/StreakCounter.d.ts
5
+ declare function StreakCounter({
6
+ days,
7
+ isActive,
8
+ size
9
+ }: StreakCounterProps): react_jsx_runtime0.JSX.Element;
10
+ //#endregion
11
+ export { StreakCounter };
12
+ //# sourceMappingURL=StreakCounter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StreakCounter.d.ts","names":[],"sources":["../../src/components/StreakCounter.tsx"],"sourcesContent":[],"mappings":";;;;iBAuBgB,aAAA;;;;GAIb,qBAAkB,kBAAA,CAAA,GAAA,CAAA"}
@@ -0,0 +1,46 @@
1
+ 'use client';
2
+
3
+ import { cn } from "@lssm/lib.ui-kit-web/ui/utils";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/components/StreakCounter.tsx
7
+ const sizeStyles = {
8
+ sm: {
9
+ container: "gap-1 px-2 py-1",
10
+ icon: "text-base",
11
+ text: "text-xs"
12
+ },
13
+ md: {
14
+ container: "gap-1.5 px-3 py-1.5",
15
+ icon: "text-lg",
16
+ text: "text-sm"
17
+ },
18
+ lg: {
19
+ container: "gap-2 px-4 py-2",
20
+ icon: "text-xl",
21
+ text: "text-base"
22
+ }
23
+ };
24
+ function StreakCounter({ days, isActive = true, size = "md" }) {
25
+ const styles = sizeStyles[size];
26
+ return /* @__PURE__ */ jsxs("div", {
27
+ className: cn("inline-flex items-center rounded-full font-semibold", styles.container, isActive ? "bg-orange-500/10 text-orange-500" : "bg-muted text-muted-foreground"),
28
+ children: [/* @__PURE__ */ jsx("span", {
29
+ className: styles.icon,
30
+ role: "img",
31
+ "aria-label": "streak",
32
+ children: "🔥"
33
+ }), /* @__PURE__ */ jsxs("span", {
34
+ className: styles.text,
35
+ children: [
36
+ days,
37
+ " ",
38
+ days === 1 ? "day" : "days"
39
+ ]
40
+ })]
41
+ });
42
+ }
43
+
44
+ //#endregion
45
+ export { StreakCounter };
46
+ //# sourceMappingURL=StreakCounter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StreakCounter.js","names":[],"sources":["../../src/components/StreakCounter.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@lssm/lib.ui-kit-web/ui/utils';\nimport type { StreakCounterProps } from '../types';\n\nconst sizeStyles = {\n sm: {\n container: 'gap-1 px-2 py-1',\n icon: 'text-base',\n text: 'text-xs',\n },\n md: {\n container: 'gap-1.5 px-3 py-1.5',\n icon: 'text-lg',\n text: 'text-sm',\n },\n lg: {\n container: 'gap-2 px-4 py-2',\n icon: 'text-xl',\n text: 'text-base',\n },\n};\n\nexport function StreakCounter({\n days,\n isActive = true,\n size = 'md',\n}: StreakCounterProps) {\n const styles = sizeStyles[size];\n\n return (\n <div\n className={cn(\n 'inline-flex items-center rounded-full font-semibold',\n styles.container,\n isActive\n ? 'bg-orange-500/10 text-orange-500'\n : 'bg-muted text-muted-foreground'\n )}\n >\n <span className={styles.icon} role=\"img\" aria-label=\"streak\">\n 🔥\n </span>\n <span className={styles.text}>\n {days} {days === 1 ? 'day' : 'days'}\n </span>\n </div>\n );\n}\n"],"mappings":";;;;;;AAKA,MAAM,aAAa;CACjB,IAAI;EACF,WAAW;EACX,MAAM;EACN,MAAM;EACP;CACD,IAAI;EACF,WAAW;EACX,MAAM;EACN,MAAM;EACP;CACD,IAAI;EACF,WAAW;EACX,MAAM;EACN,MAAM;EACP;CACF;AAED,SAAgB,cAAc,EAC5B,MACA,WAAW,MACX,OAAO,QACc;CACrB,MAAM,SAAS,WAAW;AAE1B,QACE,qBAAC;EACC,WAAW,GACT,uDACA,OAAO,WACP,WACI,qCACA,iCACL;aAED,oBAAC;GAAK,WAAW,OAAO;GAAM,MAAK;GAAM,cAAW;aAAS;IAEtD,EACP,qBAAC;GAAK,WAAW,OAAO;;IACrB;IAAK;IAAE,SAAS,IAAI,QAAQ;;IACxB;GACH"}
@@ -0,0 +1,12 @@
1
+ import { ViewTabsProps } from "../types.js";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
+
4
+ //#region src/components/ViewTabs.d.ts
5
+ declare function ViewTabs({
6
+ currentView,
7
+ onViewChange,
8
+ availableViews
9
+ }: ViewTabsProps): react_jsx_runtime1.JSX.Element;
10
+ //#endregion
11
+ export { ViewTabs };
12
+ //# sourceMappingURL=ViewTabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewTabs.d.ts","names":[],"sources":["../../src/components/ViewTabs.tsx"],"sourcesContent":[],"mappings":";;;;iBAmBgB,QAAA;;;;GAIb,gBAAa,kBAAA,CAAA,GAAA,CAAA"}
@@ -0,0 +1,49 @@
1
+ 'use client';
2
+
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Button } from "@lssm/lib.design-system";
5
+
6
+ //#region src/components/ViewTabs.tsx
7
+ const VIEW_LABELS = {
8
+ overview: {
9
+ label: "Overview",
10
+ icon: "📊"
11
+ },
12
+ steps: {
13
+ label: "Steps",
14
+ icon: "📝"
15
+ },
16
+ progress: {
17
+ label: "Progress",
18
+ icon: "📈"
19
+ },
20
+ timeline: {
21
+ label: "Timeline",
22
+ icon: "📅"
23
+ }
24
+ };
25
+ const DEFAULT_VIEWS = [
26
+ "overview",
27
+ "steps",
28
+ "progress",
29
+ "timeline"
30
+ ];
31
+ function ViewTabs({ currentView, onViewChange, availableViews = DEFAULT_VIEWS }) {
32
+ return /* @__PURE__ */ jsx("div", {
33
+ className: "flex flex-wrap gap-2",
34
+ children: availableViews.map((view) => {
35
+ const { label, icon } = VIEW_LABELS[view];
36
+ return /* @__PURE__ */ jsxs(Button, {
37
+ variant: currentView === view ? "default" : "outline",
38
+ size: "sm",
39
+ onClick: () => onViewChange(view),
40
+ className: "gap-1.5",
41
+ children: [/* @__PURE__ */ jsx("span", { children: icon }), /* @__PURE__ */ jsx("span", { children: label })]
42
+ }, view);
43
+ })
44
+ });
45
+ }
46
+
47
+ //#endregion
48
+ export { ViewTabs };
49
+ //# sourceMappingURL=ViewTabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewTabs.js","names":["VIEW_LABELS: Record<LearningView, { label: string; icon: string }>","DEFAULT_VIEWS: LearningView[]"],"sources":["../../src/components/ViewTabs.tsx"],"sourcesContent":["'use client';\n\nimport { Button } from '@lssm/lib.design-system';\nimport type { ViewTabsProps, LearningView } from '../types';\n\nconst VIEW_LABELS: Record<LearningView, { label: string; icon: string }> = {\n overview: { label: 'Overview', icon: '📊' },\n steps: { label: 'Steps', icon: '📝' },\n progress: { label: 'Progress', icon: '📈' },\n timeline: { label: 'Timeline', icon: '📅' },\n};\n\nconst DEFAULT_VIEWS: LearningView[] = [\n 'overview',\n 'steps',\n 'progress',\n 'timeline',\n];\n\nexport function ViewTabs({\n currentView,\n onViewChange,\n availableViews = DEFAULT_VIEWS,\n}: ViewTabsProps) {\n return (\n <div className=\"flex flex-wrap gap-2\">\n {availableViews.map((view) => {\n const { label, icon } = VIEW_LABELS[view];\n const isActive = currentView === view;\n\n return (\n <Button\n key={view}\n variant={isActive ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => onViewChange(view)}\n className=\"gap-1.5\"\n >\n <span>{icon}</span>\n <span>{label}</span>\n </Button>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;AAKA,MAAMA,cAAqE;CACzE,UAAU;EAAE,OAAO;EAAY,MAAM;EAAM;CAC3C,OAAO;EAAE,OAAO;EAAS,MAAM;EAAM;CACrC,UAAU;EAAE,OAAO;EAAY,MAAM;EAAM;CAC3C,UAAU;EAAE,OAAO;EAAY,MAAM;EAAM;CAC5C;AAED,MAAMC,gBAAgC;CACpC;CACA;CACA;CACA;CACD;AAED,SAAgB,SAAS,EACvB,aACA,cACA,iBAAiB,iBACD;AAChB,QACE,oBAAC;EAAI,WAAU;YACZ,eAAe,KAAK,SAAS;GAC5B,MAAM,EAAE,OAAO,SAAS,YAAY;AAGpC,UACE,qBAAC;IAEC,SALa,gBAAgB,OAKT,YAAY;IAChC,MAAK;IACL,eAAe,aAAa,KAAK;IACjC,WAAU;eAEV,oBAAC,oBAAM,OAAY,EACnB,oBAAC,oBAAM,QAAa;MAPf,KAQE;IAEX;GACE"}
@@ -0,0 +1,14 @@
1
+ import { XpBarProps } from "../types.js";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
+
4
+ //#region src/components/XpBar.d.ts
5
+ declare function XpBar({
6
+ current,
7
+ max,
8
+ level,
9
+ showLabel,
10
+ size
11
+ }: XpBarProps): react_jsx_runtime2.JSX.Element;
12
+ //#endregion
13
+ export { XpBar };
14
+ //# sourceMappingURL=XpBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XpBar.d.ts","names":[],"sources":["../../src/components/XpBar.tsx"],"sourcesContent":[],"mappings":";;;;iBAkBgB,KAAA;;;;;;GAMb,aAAU,kBAAA,CAAA,GAAA,CAAA"}
@@ -0,0 +1,47 @@
1
+ 'use client';
2
+
3
+ import { Progress } from "@lssm/lib.ui-kit-web/ui/progress";
4
+ import { cn } from "@lssm/lib.ui-kit-web/ui/utils";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+
7
+ //#region src/components/XpBar.tsx
8
+ const sizeStyles = {
9
+ sm: "h-2",
10
+ md: "h-3",
11
+ lg: "h-4"
12
+ };
13
+ const labelSizeStyles = {
14
+ sm: "text-xs",
15
+ md: "text-sm",
16
+ lg: "text-base"
17
+ };
18
+ function XpBar({ current, max, level, showLabel = true, size = "md" }) {
19
+ const percentage = max > 0 ? Math.min(current / max * 100, 100) : 0;
20
+ return /* @__PURE__ */ jsxs("div", {
21
+ className: "w-full space-y-1",
22
+ children: [showLabel && /* @__PURE__ */ jsxs("div", {
23
+ className: cn("flex items-center justify-between", labelSizeStyles[size]),
24
+ children: [/* @__PURE__ */ jsxs("span", {
25
+ className: "text-muted-foreground font-medium",
26
+ children: [level !== void 0 && /* @__PURE__ */ jsxs("span", {
27
+ className: "text-primary mr-1",
28
+ children: ["Lvl ", level]
29
+ }), "XP"]
30
+ }), /* @__PURE__ */ jsxs("span", {
31
+ className: "font-semibold",
32
+ children: [
33
+ current.toLocaleString(),
34
+ " / ",
35
+ max.toLocaleString()
36
+ ]
37
+ })]
38
+ }), /* @__PURE__ */ jsx(Progress, {
39
+ value: percentage,
40
+ className: cn("bg-muted", sizeStyles[size])
41
+ })]
42
+ });
43
+ }
44
+
45
+ //#endregion
46
+ export { XpBar };
47
+ //# sourceMappingURL=XpBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XpBar.js","names":[],"sources":["../../src/components/XpBar.tsx"],"sourcesContent":["'use client';\n\nimport { Progress } from '@lssm/lib.ui-kit-web/ui/progress';\nimport { cn } from '@lssm/lib.ui-kit-web/ui/utils';\nimport type { XpBarProps } from '../types';\n\nconst sizeStyles = {\n sm: 'h-2',\n md: 'h-3',\n lg: 'h-4',\n};\n\nconst labelSizeStyles = {\n sm: 'text-xs',\n md: 'text-sm',\n lg: 'text-base',\n};\n\nexport function XpBar({\n current,\n max,\n level,\n showLabel = true,\n size = 'md',\n}: XpBarProps) {\n const percentage = max > 0 ? Math.min((current / max) * 100, 100) : 0;\n\n return (\n <div className=\"w-full space-y-1\">\n {showLabel && (\n <div\n className={cn(\n 'flex items-center justify-between',\n labelSizeStyles[size]\n )}\n >\n <span className=\"text-muted-foreground font-medium\">\n {level !== undefined && (\n <span className=\"text-primary mr-1\">Lvl {level}</span>\n )}\n XP\n </span>\n <span className=\"font-semibold\">\n {current.toLocaleString()} / {max.toLocaleString()}\n </span>\n </div>\n )}\n <Progress\n value={percentage}\n className={cn('bg-muted', sizeStyles[size])}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;AAMA,MAAM,aAAa;CACjB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,MAAM,kBAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,SAAgB,MAAM,EACpB,SACA,KACA,OACA,YAAY,MACZ,OAAO,QACM;CACb,MAAM,aAAa,MAAM,IAAI,KAAK,IAAK,UAAU,MAAO,KAAK,IAAI,GAAG;AAEpE,QACE,qBAAC;EAAI,WAAU;aACZ,aACC,qBAAC;GACC,WAAW,GACT,qCACA,gBAAgB,MACjB;cAED,qBAAC;IAAK,WAAU;eACb,UAAU,UACT,qBAAC;KAAK,WAAU;gBAAoB,QAAK;MAAa,EACtD;KAEG,EACP,qBAAC;IAAK,WAAU;;KACb,QAAQ,gBAAgB;KAAC;KAAI,IAAI,gBAAgB;;KAC7C;IACH,EAER,oBAAC;GACC,OAAO;GACP,WAAW,GAAG,YAAY,WAAW,MAAM;IAC3C;GACE"}
@@ -0,0 +1,5 @@
1
+ import { BadgeDisplay } from "./BadgeDisplay.js";
2
+ import { StreakCounter } from "./StreakCounter.js";
3
+ import { ViewTabs } from "./ViewTabs.js";
4
+ import { XpBar } from "./XpBar.js";
5
+ export { BadgeDisplay, StreakCounter, ViewTabs, XpBar };
@@ -0,0 +1,6 @@
1
+ import { XpBar } from "./XpBar.js";
2
+ import { StreakCounter } from "./StreakCounter.js";
3
+ import { BadgeDisplay } from "./BadgeDisplay.js";
4
+ import { ViewTabs } from "./ViewTabs.js";
5
+
6
+ export { BadgeDisplay, StreakCounter, ViewTabs, XpBar };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ import "./learning-journey-ui-shared.docblock.js";
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,20 @@
1
+ import { registerDocBlocks } from "@lssm/lib.contracts/docs";
2
+
3
+ //#region src/docs/learning-journey-ui-shared.docblock.ts
4
+ registerDocBlocks([{
5
+ id: "docs.examples.learning-journey-ui-shared",
6
+ title: "Learning Journey UI — Shared",
7
+ summary: "Shared UI components and hooks for learning journey mini-apps.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/examples/learning-journey-ui-shared",
11
+ tags: [
12
+ "learning",
13
+ "ui",
14
+ "shared"
15
+ ],
16
+ body: `## Includes\n- Hooks: useLearningProgress\n- Components: XpBar, StreakCounter, BadgeDisplay, ViewTabs\n\n## Notes\n- Keep components accessible (labels, focus, contrast).\n- Prefer design-system tokens and components.`
17
+ }]);
18
+
19
+ //#endregion
20
+ //# sourceMappingURL=learning-journey-ui-shared.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"learning-journey-ui-shared.docblock.js","names":[],"sources":["../../src/docs/learning-journey-ui-shared.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@lssm/lib.contracts/docs';\nimport { registerDocBlocks } from '@lssm/lib.contracts/docs';\n\nconst blocks: DocBlock[] = [\n {\n id: 'docs.examples.learning-journey-ui-shared',\n title: 'Learning Journey UI — Shared',\n summary: 'Shared UI components and hooks for learning journey mini-apps.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/learning-journey-ui-shared',\n tags: ['learning', 'ui', 'shared'],\n body: `## Includes\\n- Hooks: useLearningProgress\\n- Components: XpBar, StreakCounter, BadgeDisplay, ViewTabs\\n\\n## Notes\\n- Keep components accessible (labels, focus, contrast).\\n- Prefer design-system tokens and components.`,\n },\n];\n\nregisterDocBlocks(blocks);\n"],"mappings":";;;AAgBA,kBAb2B,CACzB;CACE,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EAAC;EAAY;EAAM;EAAS;CAClC,MAAM;CACP,CACF,CAEwB"}
@@ -1,7 +1,3 @@
1
- import { a as LearningViewProps, c as XpBarProps, i as LearningView, n as LearningMiniAppProps, o as StreakCounterProps, r as LearningProgressState, s as ViewTabsProps, t as BadgeDisplayProps } from "./types-BMAby_Ku.mjs";
2
- import { i as XpBar, n as BadgeDisplay, r as StreakCounter, t as ViewTabs } from "./index-EWErSKip.mjs";
3
- import { t as useLearningProgress } from "./index-D_7WU_xm.mjs";
4
-
5
1
  //#region src/example.d.ts
6
2
  declare const example: {
7
3
  readonly id: "learning-journey-ui-shared";
@@ -33,4 +29,5 @@ declare const example: {
33
29
  };
34
30
  };
35
31
  //#endregion
36
- export { BadgeDisplay, type BadgeDisplayProps, type LearningMiniAppProps, type LearningProgressState, type LearningView, type LearningViewProps, StreakCounter, type StreakCounterProps, ViewTabs, type ViewTabsProps, XpBar, type XpBarProps, example, useLearningProgress };
32
+ export { example as default };
33
+ //# sourceMappingURL=example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";cAAM;EAAA,SAAA,EAoBI,EAAA,4BAAA"}
@@ -0,0 +1,35 @@
1
+ //#region src/example.ts
2
+ const example = {
3
+ id: "learning-journey-ui-shared",
4
+ title: "Learning Journey UI — Shared",
5
+ summary: "Shared UI components and hooks for learning journey mini-apps.",
6
+ tags: [
7
+ "learning",
8
+ "ui",
9
+ "shared"
10
+ ],
11
+ kind: "ui",
12
+ visibility: "public",
13
+ docs: { rootDocId: "docs.examples.learning-journey-ui-shared" },
14
+ entrypoints: {
15
+ packageName: "@lssm/example.learning-journey-ui-shared",
16
+ docs: "./docs"
17
+ },
18
+ surfaces: {
19
+ templates: true,
20
+ sandbox: {
21
+ enabled: true,
22
+ modes: ["playground", "markdown"]
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 };
35
+ //# sourceMappingURL=example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["const example = {\n id: 'learning-journey-ui-shared',\n title: 'Learning Journey UI — Shared',\n summary: 'Shared UI components and hooks for learning journey mini-apps.',\n tags: ['learning', 'ui', 'shared'],\n kind: 'ui',\n visibility: 'public',\n docs: {\n rootDocId: 'docs.examples.learning-journey-ui-shared',\n },\n entrypoints: {\n packageName: '@lssm/example.learning-journey-ui-shared',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['playground', 'markdown'] },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n} as const;\n\nexport default example;\n"],"mappings":";AAAA,MAAM,UAAU;CACd,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;EAAC;EAAY;EAAM;EAAS;CAClC,MAAM;CACN,YAAY;CACZ,MAAM,EACJ,WAAW,4CACZ;CACD,aAAa;EACX,aAAa;EACb,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,cAAc,WAAW;GAAE;EAC7D,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
@@ -0,0 +1,2 @@
1
+ import { useLearningProgress } from "./useLearningProgress.js";
2
+ export { useLearningProgress };
@@ -0,0 +1,3 @@
1
+ import { useLearningProgress } from "./useLearningProgress.js";
2
+
3
+ export { useLearningProgress };
@@ -1,4 +1,4 @@
1
- import { r as LearningProgressState } from "./types-BMAby_Ku.mjs";
1
+ import { LearningProgressState } from "../types.js";
2
2
  import { LearningJourneyTrackSpec } from "@lssm/module.learning-journey/track-spec";
3
3
 
4
4
  //#region src/hooks/useLearningProgress.d.ts
@@ -18,4 +18,5 @@ declare function useLearningProgress(track: LearningJourneyTrackSpec): {
18
18
  incrementStreak: () => void;
19
19
  };
20
20
  //#endregion
21
- export { useLearningProgress as t };
21
+ export { useLearningProgress };
22
+ //# sourceMappingURL=useLearningProgress.d.ts.map