@lssm/example.learning-journey-ui-shared 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 (119) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +383 -24
  2. package/.turbo/turbo-build.log +384 -26
  3. package/CHANGELOG.md +6 -6
  4. package/LICENSE +21 -0
  5. package/dist/components/BadgeDisplay.d.ts +12 -0
  6. package/dist/components/BadgeDisplay.d.ts.map +1 -0
  7. package/dist/components/BadgeDisplay.js +45 -0
  8. package/dist/components/BadgeDisplay.js.map +1 -0
  9. package/dist/components/StreakCounter.d.ts +12 -0
  10. package/dist/components/StreakCounter.d.ts.map +1 -0
  11. package/dist/components/StreakCounter.js +46 -0
  12. package/dist/components/StreakCounter.js.map +1 -0
  13. package/dist/components/ViewTabs.d.ts +12 -0
  14. package/dist/components/ViewTabs.d.ts.map +1 -0
  15. package/dist/components/ViewTabs.js +49 -0
  16. package/dist/components/ViewTabs.js.map +1 -0
  17. package/dist/components/XpBar.d.ts +14 -0
  18. package/dist/components/XpBar.d.ts.map +1 -0
  19. package/dist/components/XpBar.js +47 -0
  20. package/dist/components/XpBar.js.map +1 -0
  21. package/dist/components/index.d.ts +5 -0
  22. package/dist/components/index.js +6 -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-shared.docblock.d.ts +1 -0
  26. package/dist/docs/learning-journey-ui-shared.docblock.js +21 -0
  27. package/dist/docs/learning-journey-ui-shared.docblock.js.map +1 -0
  28. package/dist/{index.d.mts → example.d.ts} +2 -5
  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/hooks/index.d.ts +2 -0
  33. package/dist/hooks/index.js +3 -0
  34. package/dist/{index-D_7WU_xm.d.mts → hooks/useLearningProgress.d.ts} +3 -2
  35. package/dist/hooks/useLearningProgress.d.ts.map +1 -0
  36. package/dist/{hooks-B-tDvppY.mjs → hooks/useLearningProgress.js} +4 -1
  37. package/dist/hooks/useLearningProgress.js.map +1 -0
  38. package/dist/index.d.ts +9 -0
  39. package/dist/index.js +11 -0
  40. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -0
  41. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
  42. package/dist/libs/contracts/dist/docs/index.js +25 -0
  43. package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
  44. package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
  45. package/dist/libs/contracts/dist/docs/presentations.js +72 -0
  46. package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
  47. package/dist/libs/contracts/dist/docs/registry.js +45 -0
  48. package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
  49. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +81 -0
  50. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
  51. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +58 -0
  52. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
  53. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -0
  54. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
  55. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +358 -0
  56. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
  57. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +38 -0
  58. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
  59. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +17 -0
  60. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
  61. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +21 -0
  62. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
  63. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +49 -0
  64. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
  65. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +80 -0
  66. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
  67. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +85 -0
  68. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
  69. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +46 -0
  70. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
  71. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +68 -0
  72. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
  73. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +41 -0
  74. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
  75. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +70 -0
  76. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
  77. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +48 -0
  78. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
  79. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +63 -0
  80. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
  81. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +156 -0
  82. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
  83. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +21 -0
  84. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
  85. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +102 -0
  86. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
  87. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +21 -0
  88. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
  89. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
  90. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
  91. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +6 -0
  92. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js.map +1 -0
  93. package/dist/libs/design-system/dist/components/atoms/Button.js +34 -0
  94. package/dist/libs/design-system/dist/components/atoms/Button.js.map +1 -0
  95. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +56 -0
  96. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js.map +1 -0
  97. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +14 -0
  98. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
  99. package/dist/libs/ui-kit-web/dist/ui/progress.js +24 -0
  100. package/dist/libs/ui-kit-web/dist/ui/progress.js.map +1 -0
  101. package/dist/libs/ui-kit-web/dist/ui/utils.js +11 -0
  102. package/dist/libs/ui-kit-web/dist/ui/utils.js.map +1 -0
  103. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +11 -0
  104. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
  105. package/dist/{types-BMAby_Ku.d.mts → types.d.ts} +2 -1
  106. package/dist/types.d.ts.map +1 -0
  107. package/dist/types.js +0 -0
  108. package/package.json +23 -16
  109. package/tsconfig.tsbuildinfo +1 -1
  110. package/tsdown.config.js +14 -11
  111. package/dist/components/index.d.mts +0 -2
  112. package/dist/components/index.mjs +0 -3
  113. package/dist/components-tyJAN4Ru.mjs +0 -164
  114. package/dist/hooks/index.d.mts +0 -2
  115. package/dist/hooks/index.mjs +0 -3
  116. package/dist/index-EWErSKip.d.mts +0 -34
  117. package/dist/index.mjs +0 -55
  118. package/dist/types.d.mts +0 -2
  119. package/dist/types.mjs +0 -1
package/tsdown.config.js CHANGED
@@ -1,14 +1,17 @@
1
1
  import { defineConfig } from 'tsdown';
2
+ import { moduleLibrary, withDevExports } from '@lssm/tool.tsdown';
3
+
4
+ export default defineConfig(() => ({
5
+ ...moduleLibrary,
6
+ ...withDevExports,
7
+ }));
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
2
16
 
3
- export default defineConfig({
4
- entry: [
5
- 'src/index.ts',
6
- 'src/hooks/index.ts',
7
- 'src/components/index.ts',
8
- 'src/types.ts',
9
- ],
10
- format: 'esm',
11
- target: 'esnext',
12
- dts: true,
13
- });
14
17
 
@@ -1,2 +0,0 @@
1
- import { i as XpBar, n as BadgeDisplay, r as StreakCounter, t as ViewTabs } from "../index-EWErSKip.mjs";
2
- export { BadgeDisplay, StreakCounter, ViewTabs, XpBar };
@@ -1,3 +0,0 @@
1
- import { i as XpBar, n as BadgeDisplay, r as StreakCounter, t as ViewTabs } from "../components-tyJAN4Ru.mjs";
2
-
3
- export { BadgeDisplay, StreakCounter, ViewTabs, XpBar };
@@ -1,164 +0,0 @@
1
- import { Progress } from "@lssm/lib.ui-kit-web/ui/progress";
2
- import { cn } from "@lssm/lib.ui-kit-web/ui/utils";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { Button } from "@lssm/lib.design-system";
5
-
6
- //#region src/components/XpBar.tsx
7
- const sizeStyles$2 = {
8
- sm: "h-2",
9
- md: "h-3",
10
- lg: "h-4"
11
- };
12
- const labelSizeStyles = {
13
- sm: "text-xs",
14
- md: "text-sm",
15
- lg: "text-base"
16
- };
17
- function XpBar({ current, max, level, showLabel = true, size = "md" }) {
18
- const percentage = max > 0 ? Math.min(current / max * 100, 100) : 0;
19
- return /* @__PURE__ */ jsxs("div", {
20
- className: "w-full space-y-1",
21
- children: [showLabel && /* @__PURE__ */ jsxs("div", {
22
- className: cn("flex items-center justify-between", labelSizeStyles[size]),
23
- children: [/* @__PURE__ */ jsxs("span", {
24
- className: "text-muted-foreground font-medium",
25
- children: [level !== void 0 && /* @__PURE__ */ jsxs("span", {
26
- className: "text-primary mr-1",
27
- children: ["Lvl ", level]
28
- }), "XP"]
29
- }), /* @__PURE__ */ jsxs("span", {
30
- className: "font-semibold",
31
- children: [
32
- current.toLocaleString(),
33
- " / ",
34
- max.toLocaleString()
35
- ]
36
- })]
37
- }), /* @__PURE__ */ jsx(Progress, {
38
- value: percentage,
39
- className: cn("bg-muted", sizeStyles$2[size])
40
- })]
41
- });
42
- }
43
-
44
- //#endregion
45
- //#region src/components/StreakCounter.tsx
46
- const sizeStyles$1 = {
47
- sm: {
48
- container: "gap-1 px-2 py-1",
49
- icon: "text-base",
50
- text: "text-xs"
51
- },
52
- md: {
53
- container: "gap-1.5 px-3 py-1.5",
54
- icon: "text-lg",
55
- text: "text-sm"
56
- },
57
- lg: {
58
- container: "gap-2 px-4 py-2",
59
- icon: "text-xl",
60
- text: "text-base"
61
- }
62
- };
63
- function StreakCounter({ days, isActive = true, size = "md" }) {
64
- const styles = sizeStyles$1[size];
65
- return /* @__PURE__ */ jsxs("div", {
66
- 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"),
67
- children: [/* @__PURE__ */ jsx("span", {
68
- className: styles.icon,
69
- role: "img",
70
- "aria-label": "streak",
71
- children: "🔥"
72
- }), /* @__PURE__ */ jsxs("span", {
73
- className: styles.text,
74
- children: [
75
- days,
76
- " ",
77
- days === 1 ? "day" : "days"
78
- ]
79
- })]
80
- });
81
- }
82
-
83
- //#endregion
84
- //#region src/components/BadgeDisplay.tsx
85
- const BADGE_ICONS = {
86
- studio_first_30m: "🎯",
87
- platform_tour: "🗺️",
88
- crm_first_win: "🏆",
89
- drill_master: "🧠",
90
- coach_listener: "👂",
91
- quest_complete: "⭐",
92
- streak_7: "🔥",
93
- streak_30: "💎",
94
- default: "🏅"
95
- };
96
- const sizeStyles = {
97
- sm: "h-6 w-6 text-sm",
98
- md: "h-8 w-8 text-base",
99
- lg: "h-10 w-10 text-lg"
100
- };
101
- function BadgeDisplay({ badges, maxVisible = 5, size = "md" }) {
102
- const visibleBadges = badges.slice(0, maxVisible);
103
- const hiddenCount = badges.length - maxVisible;
104
- if (badges.length === 0) return /* @__PURE__ */ jsx("div", {
105
- className: "text-muted-foreground text-sm",
106
- children: "No badges earned yet"
107
- });
108
- return /* @__PURE__ */ jsxs("div", {
109
- className: "flex items-center gap-1",
110
- children: [visibleBadges.map((badge) => /* @__PURE__ */ jsx("div", {
111
- className: cn("flex items-center justify-center rounded-full bg-gradient-to-br from-amber-400/20 to-amber-600/20", sizeStyles[size]),
112
- title: badge.replace(/_/g, " "),
113
- children: BADGE_ICONS[badge] ?? BADGE_ICONS.default
114
- }, badge)), hiddenCount > 0 && /* @__PURE__ */ jsxs("div", {
115
- className: cn("text-muted-foreground bg-muted flex items-center justify-center rounded-full", sizeStyles[size], "text-xs font-medium"),
116
- children: ["+", hiddenCount]
117
- })]
118
- });
119
- }
120
-
121
- //#endregion
122
- //#region src/components/ViewTabs.tsx
123
- const VIEW_LABELS = {
124
- overview: {
125
- label: "Overview",
126
- icon: "📊"
127
- },
128
- steps: {
129
- label: "Steps",
130
- icon: "📝"
131
- },
132
- progress: {
133
- label: "Progress",
134
- icon: "📈"
135
- },
136
- timeline: {
137
- label: "Timeline",
138
- icon: "📅"
139
- }
140
- };
141
- const DEFAULT_VIEWS = [
142
- "overview",
143
- "steps",
144
- "progress",
145
- "timeline"
146
- ];
147
- function ViewTabs({ currentView, onViewChange, availableViews = DEFAULT_VIEWS }) {
148
- return /* @__PURE__ */ jsx("div", {
149
- className: "flex flex-wrap gap-2",
150
- children: availableViews.map((view) => {
151
- const { label, icon } = VIEW_LABELS[view];
152
- return /* @__PURE__ */ jsxs(Button, {
153
- variant: currentView === view ? "default" : "outline",
154
- size: "sm",
155
- onClick: () => onViewChange(view),
156
- className: "gap-1.5",
157
- children: [/* @__PURE__ */ jsx("span", { children: icon }), /* @__PURE__ */ jsx("span", { children: label })]
158
- }, view);
159
- })
160
- });
161
- }
162
-
163
- //#endregion
164
- export { XpBar as i, BadgeDisplay as n, StreakCounter as r, ViewTabs as t };
@@ -1,2 +0,0 @@
1
- import { t as useLearningProgress } from "../index-D_7WU_xm.mjs";
2
- export { useLearningProgress };
@@ -1,3 +0,0 @@
1
- import { t as useLearningProgress } from "../hooks-B-tDvppY.mjs";
2
-
3
- export { useLearningProgress };
@@ -1,34 +0,0 @@
1
- import { c as XpBarProps, o as StreakCounterProps, s as ViewTabsProps, t as BadgeDisplayProps } from "./types-BMAby_Ku.mjs";
2
- import * as react_jsx_runtime0 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_runtime0.JSX.Element;
12
- //#endregion
13
- //#region src/components/StreakCounter.d.ts
14
- declare function StreakCounter({
15
- days,
16
- isActive,
17
- size
18
- }: StreakCounterProps): react_jsx_runtime0.JSX.Element;
19
- //#endregion
20
- //#region src/components/BadgeDisplay.d.ts
21
- declare function BadgeDisplay({
22
- badges,
23
- maxVisible,
24
- size
25
- }: BadgeDisplayProps): react_jsx_runtime0.JSX.Element;
26
- //#endregion
27
- //#region src/components/ViewTabs.d.ts
28
- declare function ViewTabs({
29
- currentView,
30
- onViewChange,
31
- availableViews
32
- }: ViewTabsProps): react_jsx_runtime0.JSX.Element;
33
- //#endregion
34
- export { XpBar as i, BadgeDisplay as n, StreakCounter as r, ViewTabs as t };
package/dist/index.mjs DELETED
@@ -1,55 +0,0 @@
1
- import { t as useLearningProgress } from "./hooks-B-tDvppY.mjs";
2
- import { i as XpBar, n as BadgeDisplay, r as StreakCounter, t as ViewTabs } from "./components-tyJAN4Ru.mjs";
3
- import { registerDocBlocks } from "@lssm/lib.contracts/docs";
4
-
5
- //#region src/example.ts
6
- const example = {
7
- id: "learning-journey-ui-shared",
8
- title: "Learning Journey UI — Shared",
9
- summary: "Shared UI components and hooks for learning journey mini-apps.",
10
- tags: [
11
- "learning",
12
- "ui",
13
- "shared"
14
- ],
15
- kind: "ui",
16
- visibility: "public",
17
- docs: { rootDocId: "docs.examples.learning-journey-ui-shared" },
18
- entrypoints: {
19
- packageName: "@lssm/example.learning-journey-ui-shared",
20
- docs: "./docs"
21
- },
22
- surfaces: {
23
- templates: true,
24
- sandbox: {
25
- enabled: true,
26
- modes: ["playground", "markdown"]
27
- },
28
- studio: {
29
- enabled: true,
30
- installable: true
31
- },
32
- mcp: { enabled: true }
33
- }
34
- };
35
- var example_default = example;
36
-
37
- //#endregion
38
- //#region src/docs/learning-journey-ui-shared.docblock.ts
39
- registerDocBlocks([{
40
- id: "docs.examples.learning-journey-ui-shared",
41
- title: "Learning Journey UI — Shared",
42
- summary: "Shared UI components and hooks for learning journey mini-apps.",
43
- kind: "reference",
44
- visibility: "public",
45
- route: "/docs/examples/learning-journey-ui-shared",
46
- tags: [
47
- "learning",
48
- "ui",
49
- "shared"
50
- ],
51
- 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.`
52
- }]);
53
-
54
- //#endregion
55
- export { BadgeDisplay, StreakCounter, ViewTabs, XpBar, example_default as example, useLearningProgress };
package/dist/types.d.mts DELETED
@@ -1,2 +0,0 @@
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
- export { BadgeDisplayProps, LearningMiniAppProps, LearningProgressState, LearningView, LearningViewProps, StreakCounterProps, ViewTabsProps, XpBarProps };
package/dist/types.mjs DELETED
@@ -1 +0,0 @@
1
- export { };