@lssm/example.learning-journey-ui-gamified 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.
- package/.turbo/turbo-build$colon$bundle.log +483 -22
- package/.turbo/turbo-build.log +484 -24
- package/CHANGELOG.md +9 -9
- package/LICENSE +21 -0
- package/dist/GamifiedMiniApp.d.ts +17 -0
- package/dist/GamifiedMiniApp.d.ts.map +1 -0
- package/dist/GamifiedMiniApp.js +65 -0
- package/dist/GamifiedMiniApp.js.map +1 -0
- package/dist/components/DayCalendar.d.ts +16 -0
- package/dist/components/DayCalendar.d.ts.map +1 -0
- package/dist/components/DayCalendar.js +33 -0
- package/dist/components/DayCalendar.js.map +1 -0
- package/dist/components/FlashCard.d.ts +19 -0
- package/dist/components/FlashCard.d.ts.map +1 -0
- package/dist/components/FlashCard.js +80 -0
- package/dist/components/FlashCard.js.map +1 -0
- package/dist/components/MasteryRing.d.ts +18 -0
- package/dist/components/MasteryRing.d.ts.map +1 -0
- package/dist/components/MasteryRing.js +82 -0
- package/dist/components/MasteryRing.js.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +5 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/learning-journey-ui-gamified.docblock.d.ts +1 -0
- package/dist/docs/learning-journey-ui-gamified.docblock.js +21 -0
- package/dist/docs/learning-journey-ui-gamified.docblock.js.map +1 -0
- package/dist/{index.d.mts → example.d.ts} +2 -18
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +35 -0
- package/dist/example.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js +45 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/StreakCounter.js +46 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/StreakCounter.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/ViewTabs.js +49 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/ViewTabs.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/XpBar.js +47 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/XpBar.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/index.js +4 -0
- package/dist/examples/learning-journey-ui-shared/dist/docs/index.js +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js +21 -0
- package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/hooks/index.js +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/hooks/useLearningProgress.js +74 -0
- package/dist/examples/learning-journey-ui-shared/dist/hooks/useLearningProgress.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/index.js +8 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/index.js +24 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/meta.docs.js +29 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/presentations.js +72 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/registry.js +45 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/registry.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +80 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +57 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +357 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +79 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +84 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +45 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +40 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +69 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +62 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +155 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +101 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech-contracts.docs.js +96 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +6 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js +34 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +56 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +14 -0
- 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
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js +24 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js +11 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js.map +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +11 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +14 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +17 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/index.js +25 -0
- package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
- package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
- package/dist/libs/contracts/dist/docs/presentations.js +72 -0
- package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
- package/dist/libs/contracts/dist/docs/registry.js +45 -0
- package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +81 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +58 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +17 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +358 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +38 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +17 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +21 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +49 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +80 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +85 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +46 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +68 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +41 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +70 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +48 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +63 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +156 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +21 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +102 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +21 -0
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
- package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +6 -0
- package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js.map +1 -0
- package/dist/libs/design-system/dist/components/atoms/Button.js +34 -0
- package/dist/libs/design-system/dist/components/atoms/Button.js.map +1 -0
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +56 -0
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js.map +1 -0
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +14 -0
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
- package/dist/libs/ui-kit-web/dist/ui/card.js +37 -0
- package/dist/libs/ui-kit-web/dist/ui/card.js.map +1 -0
- package/dist/libs/ui-kit-web/dist/ui/utils.js +11 -0
- package/dist/libs/ui-kit-web/dist/ui/utils.js.map +1 -0
- package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +11 -0
- package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js.map +1 -0
- package/dist/views/Overview.d.ts +15 -0
- package/dist/views/Overview.d.ts.map +1 -0
- package/dist/views/Overview.js +164 -0
- package/dist/views/Overview.js.map +1 -0
- package/dist/views/Progress.d.ts +11 -0
- package/dist/views/Progress.d.ts.map +1 -0
- package/dist/views/Progress.js +145 -0
- package/dist/views/Progress.js.map +1 -0
- package/dist/views/Steps.d.ts +12 -0
- package/dist/views/Steps.d.ts.map +1 -0
- package/dist/views/Steps.js +56 -0
- package/dist/views/Steps.js.map +1 -0
- package/dist/views/Timeline.d.ts +11 -0
- package/dist/views/Timeline.d.ts.map +1 -0
- package/dist/views/Timeline.js +133 -0
- package/dist/views/Timeline.js.map +1 -0
- package/dist/views/index.d.ts +5 -0
- package/dist/views/index.js +6 -0
- package/package.json +28 -18
- package/tsconfig.tsbuildinfo +1 -1
- package/tsdown.config.js +14 -10
- package/dist/DayCalendar-Cha869Bi.mjs +0 -178
- package/dist/components/index.d.mts +0 -2
- package/dist/components/index.mjs +0 -4
- package/dist/components-kh0CpIG2.mjs +0 -1
- package/dist/index-Bc83ZTkD.d.mts +0 -33
- package/dist/index-C7CBKOil.d.mts +0 -44
- package/dist/index.mjs +0 -110
- package/dist/views/index.d.mts +0 -2
- package/dist/views/index.mjs +0 -4
- package/dist/views-B-DapxWu.mjs +0 -467
package/tsdown.config.js
CHANGED
|
@@ -1,13 +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/views/index.ts',
|
|
7
|
-
'src/components/index.ts',
|
|
8
|
-
],
|
|
9
|
-
format: 'esm',
|
|
10
|
-
target: 'esnext',
|
|
11
|
-
dts: true,
|
|
12
|
-
});
|
|
13
17
|
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { Card, CardContent } from "@lssm/lib.ui-kit-web/ui/card";
|
|
3
|
-
import { Button } from "@lssm/lib.design-system";
|
|
4
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { cn } from "@lssm/lib.ui-kit-web/ui/utils";
|
|
6
|
-
|
|
7
|
-
//#region src/components/FlashCard.tsx
|
|
8
|
-
function FlashCard({ step, isCompleted, isCurrent, onComplete }) {
|
|
9
|
-
const [isFlipped, setIsFlipped] = useState(false);
|
|
10
|
-
return /* @__PURE__ */ jsx(Card, {
|
|
11
|
-
className: cn("relative cursor-pointer overflow-hidden transition-all duration-300", isCurrent && "ring-primary ring-2", isCompleted && "opacity-60"),
|
|
12
|
-
onClick: () => !isCompleted && setIsFlipped(!isFlipped),
|
|
13
|
-
children: /* @__PURE__ */ jsxs(CardContent, {
|
|
14
|
-
className: "p-6",
|
|
15
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
16
|
-
className: cn("space-y-4 transition-opacity duration-200", isFlipped ? "opacity-0" : "opacity-100"),
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */ jsxs("div", {
|
|
19
|
-
className: "flex items-start justify-between",
|
|
20
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
21
|
-
className: "flex-1",
|
|
22
|
-
children: [/* @__PURE__ */ jsx("h3", {
|
|
23
|
-
className: "text-lg font-semibold",
|
|
24
|
-
children: step.title
|
|
25
|
-
}), step.description && /* @__PURE__ */ jsx("p", {
|
|
26
|
-
className: "text-muted-foreground mt-1 text-sm",
|
|
27
|
-
children: step.description
|
|
28
|
-
})]
|
|
29
|
-
}), step.xpReward && /* @__PURE__ */ jsxs("span", {
|
|
30
|
-
className: "rounded-full bg-green-500/10 px-2 py-1 text-xs font-semibold text-green-500",
|
|
31
|
-
children: [
|
|
32
|
-
"+",
|
|
33
|
-
step.xpReward,
|
|
34
|
-
" XP"
|
|
35
|
-
]
|
|
36
|
-
})]
|
|
37
|
-
}),
|
|
38
|
-
isCompleted && /* @__PURE__ */ jsxs("div", {
|
|
39
|
-
className: "flex items-center gap-2 text-green-500",
|
|
40
|
-
children: [/* @__PURE__ */ jsx("span", { children: "✓" }), /* @__PURE__ */ jsx("span", {
|
|
41
|
-
className: "text-sm font-medium",
|
|
42
|
-
children: "Completed"
|
|
43
|
-
})]
|
|
44
|
-
}),
|
|
45
|
-
isCurrent && !isCompleted && /* @__PURE__ */ jsx("p", {
|
|
46
|
-
className: "text-muted-foreground text-xs",
|
|
47
|
-
children: "Tap to reveal action"
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
}), isFlipped && !isCompleted && /* @__PURE__ */ jsxs("div", {
|
|
51
|
-
className: "absolute inset-0 flex flex-col items-center justify-center gap-4 bg-gradient-to-br from-violet-500/10 to-violet-600/10 p-6",
|
|
52
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
53
|
-
className: "text-center text-sm",
|
|
54
|
-
children: step.instructions ?? "Complete this step to earn XP"
|
|
55
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
56
|
-
className: "flex gap-2",
|
|
57
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
58
|
-
variant: "outline",
|
|
59
|
-
size: "sm",
|
|
60
|
-
onClick: () => setIsFlipped(false),
|
|
61
|
-
children: "Back"
|
|
62
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
63
|
-
size: "sm",
|
|
64
|
-
onClick: (e) => {
|
|
65
|
-
e.stopPropagation();
|
|
66
|
-
onComplete?.();
|
|
67
|
-
},
|
|
68
|
-
children: "Mark Complete"
|
|
69
|
-
})]
|
|
70
|
-
})]
|
|
71
|
-
})]
|
|
72
|
-
})
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region src/components/MasteryRing.tsx
|
|
78
|
-
const sizeStyles = {
|
|
79
|
-
sm: {
|
|
80
|
-
container: "h-16 w-16",
|
|
81
|
-
text: "text-xs",
|
|
82
|
-
ring: 48,
|
|
83
|
-
stroke: 4
|
|
84
|
-
},
|
|
85
|
-
md: {
|
|
86
|
-
container: "h-24 w-24",
|
|
87
|
-
text: "text-sm",
|
|
88
|
-
ring: 72,
|
|
89
|
-
stroke: 6
|
|
90
|
-
},
|
|
91
|
-
lg: {
|
|
92
|
-
container: "h-32 w-32",
|
|
93
|
-
text: "text-base",
|
|
94
|
-
ring: 96,
|
|
95
|
-
stroke: 8
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
const colorStyles = {
|
|
99
|
-
green: "stroke-green-500",
|
|
100
|
-
blue: "stroke-blue-500",
|
|
101
|
-
violet: "stroke-violet-500",
|
|
102
|
-
orange: "stroke-orange-500"
|
|
103
|
-
};
|
|
104
|
-
function MasteryRing({ label, percentage, size = "md", color = "violet" }) {
|
|
105
|
-
const styles = sizeStyles[size];
|
|
106
|
-
const radius = (styles.ring - styles.stroke) / 2;
|
|
107
|
-
const circumference = 2 * Math.PI * radius;
|
|
108
|
-
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
109
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
110
|
-
className: cn("relative flex flex-col items-center gap-1", styles.container),
|
|
111
|
-
children: [
|
|
112
|
-
/* @__PURE__ */ jsxs("svg", {
|
|
113
|
-
className: "absolute -rotate-90",
|
|
114
|
-
width: styles.ring,
|
|
115
|
-
height: styles.ring,
|
|
116
|
-
viewBox: `0 0 ${styles.ring} ${styles.ring}`,
|
|
117
|
-
children: [/* @__PURE__ */ jsx("circle", {
|
|
118
|
-
cx: styles.ring / 2,
|
|
119
|
-
cy: styles.ring / 2,
|
|
120
|
-
r: radius,
|
|
121
|
-
fill: "none",
|
|
122
|
-
strokeWidth: styles.stroke,
|
|
123
|
-
className: "stroke-muted"
|
|
124
|
-
}), /* @__PURE__ */ jsx("circle", {
|
|
125
|
-
cx: styles.ring / 2,
|
|
126
|
-
cy: styles.ring / 2,
|
|
127
|
-
r: radius,
|
|
128
|
-
fill: "none",
|
|
129
|
-
strokeWidth: styles.stroke,
|
|
130
|
-
strokeLinecap: "round",
|
|
131
|
-
strokeDasharray: circumference,
|
|
132
|
-
strokeDashoffset,
|
|
133
|
-
className: cn("transition-all duration-500", colorStyles[color])
|
|
134
|
-
})]
|
|
135
|
-
}),
|
|
136
|
-
/* @__PURE__ */ jsx("div", {
|
|
137
|
-
className: "flex h-full flex-col items-center justify-center",
|
|
138
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
139
|
-
className: cn("font-bold", styles.text),
|
|
140
|
-
children: [Math.round(percentage), "%"]
|
|
141
|
-
})
|
|
142
|
-
}),
|
|
143
|
-
/* @__PURE__ */ jsx("span", {
|
|
144
|
-
className: cn("text-muted-foreground mt-1 truncate", styles.text),
|
|
145
|
-
children: label
|
|
146
|
-
})
|
|
147
|
-
]
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
//#endregion
|
|
152
|
-
//#region src/components/DayCalendar.tsx
|
|
153
|
-
function DayCalendar({ totalDays, currentDay, completedDays }) {
|
|
154
|
-
return /* @__PURE__ */ jsx("div", {
|
|
155
|
-
className: "grid grid-cols-7 gap-2",
|
|
156
|
-
children: Array.from({ length: totalDays }, (_, i) => i + 1).map((day) => {
|
|
157
|
-
const isCompleted = completedDays.includes(day);
|
|
158
|
-
const isCurrent = day === currentDay;
|
|
159
|
-
const isLocked = day > currentDay;
|
|
160
|
-
return /* @__PURE__ */ jsx("div", {
|
|
161
|
-
className: cn("flex h-12 w-12 flex-col items-center justify-center rounded-lg border text-sm font-medium transition-all", isCompleted && "border-green-500 bg-green-500/10 text-green-500", isCurrent && !isCompleted && "border-violet-500 bg-violet-500/10 text-violet-500 ring-2 ring-violet-500/50", isLocked && "border-muted bg-muted/50 text-muted-foreground", !isCompleted && !isCurrent && !isLocked && "border-border bg-card"),
|
|
162
|
-
children: isCompleted ? /* @__PURE__ */ jsx("span", {
|
|
163
|
-
className: "text-lg",
|
|
164
|
-
children: "✓"
|
|
165
|
-
}) : isLocked ? /* @__PURE__ */ jsx("span", {
|
|
166
|
-
className: "text-lg",
|
|
167
|
-
children: "🔒"
|
|
168
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
169
|
-
className: "text-muted-foreground text-xs",
|
|
170
|
-
children: "Day"
|
|
171
|
-
}), /* @__PURE__ */ jsx("span", { children: day })] })
|
|
172
|
-
}, day);
|
|
173
|
-
})
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
//#endregion
|
|
178
|
-
export { MasteryRing as n, FlashCard as r, DayCalendar as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { LearningViewProps } from "@lssm/example.learning-journey-ui-shared";
|
|
2
|
-
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/views/Overview.d.ts
|
|
5
|
-
interface GamifiedOverviewProps extends LearningViewProps {
|
|
6
|
-
onStart?: () => void;
|
|
7
|
-
}
|
|
8
|
-
declare function Overview({
|
|
9
|
-
track,
|
|
10
|
-
progress,
|
|
11
|
-
onStart
|
|
12
|
-
}: GamifiedOverviewProps): react_jsx_runtime3.JSX.Element;
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/views/Steps.d.ts
|
|
15
|
-
declare function Steps({
|
|
16
|
-
track,
|
|
17
|
-
progress,
|
|
18
|
-
onStepComplete
|
|
19
|
-
}: LearningViewProps): react_jsx_runtime3.JSX.Element;
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/views/Progress.d.ts
|
|
22
|
-
declare function Progress({
|
|
23
|
-
track,
|
|
24
|
-
progress
|
|
25
|
-
}: LearningViewProps): react_jsx_runtime3.JSX.Element;
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/views/Timeline.d.ts
|
|
28
|
-
declare function Timeline({
|
|
29
|
-
track,
|
|
30
|
-
progress
|
|
31
|
-
}: LearningViewProps): react_jsx_runtime3.JSX.Element;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { Overview as i, Progress as n, Steps as r, Timeline as t };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
import { LearningJourneyStepSpec } from "@lssm/module.learning-journey/track-spec";
|
|
3
|
-
|
|
4
|
-
//#region src/components/FlashCard.d.ts
|
|
5
|
-
interface FlashCardProps {
|
|
6
|
-
step: LearningJourneyStepSpec;
|
|
7
|
-
isCompleted: boolean;
|
|
8
|
-
isCurrent: boolean;
|
|
9
|
-
onComplete?: () => void;
|
|
10
|
-
}
|
|
11
|
-
declare function FlashCard({
|
|
12
|
-
step,
|
|
13
|
-
isCompleted,
|
|
14
|
-
isCurrent,
|
|
15
|
-
onComplete
|
|
16
|
-
}: FlashCardProps): react_jsx_runtime0.JSX.Element;
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/components/MasteryRing.d.ts
|
|
19
|
-
interface MasteryRingProps {
|
|
20
|
-
label: string;
|
|
21
|
-
percentage: number;
|
|
22
|
-
size?: 'sm' | 'md' | 'lg';
|
|
23
|
-
color?: 'green' | 'blue' | 'violet' | 'orange';
|
|
24
|
-
}
|
|
25
|
-
declare function MasteryRing({
|
|
26
|
-
label,
|
|
27
|
-
percentage,
|
|
28
|
-
size,
|
|
29
|
-
color
|
|
30
|
-
}: MasteryRingProps): react_jsx_runtime0.JSX.Element;
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/components/DayCalendar.d.ts
|
|
33
|
-
interface DayCalendarProps {
|
|
34
|
-
totalDays: number;
|
|
35
|
-
currentDay: number;
|
|
36
|
-
completedDays: number[];
|
|
37
|
-
}
|
|
38
|
-
declare function DayCalendar({
|
|
39
|
-
totalDays,
|
|
40
|
-
currentDay,
|
|
41
|
-
completedDays
|
|
42
|
-
}: DayCalendarProps): react_jsx_runtime0.JSX.Element;
|
|
43
|
-
//#endregion
|
|
44
|
-
export { MasteryRing as n, FlashCard as r, DayCalendar as t };
|
package/dist/index.mjs
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { i as Overview, n as Progress, r as Steps, t as Timeline } from "./views-B-DapxWu.mjs";
|
|
2
|
-
import { n as MasteryRing, r as FlashCard, t as DayCalendar } from "./DayCalendar-Cha869Bi.mjs";
|
|
3
|
-
import "./components-kh0CpIG2.mjs";
|
|
4
|
-
import { useCallback, useState } from "react";
|
|
5
|
-
import { Card, CardContent } from "@lssm/lib.ui-kit-web/ui/card";
|
|
6
|
-
import { ViewTabs, useLearningProgress } from "@lssm/example.learning-journey-ui-shared";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { registerDocBlocks } from "@lssm/lib.contracts/docs";
|
|
9
|
-
|
|
10
|
-
//#region src/GamifiedMiniApp.tsx
|
|
11
|
-
function GamifiedMiniApp({ track, progress: externalProgress, onStepComplete: externalOnStepComplete, onViewChange, initialView = "overview" }) {
|
|
12
|
-
const [currentView, setCurrentView] = useState(initialView);
|
|
13
|
-
const { progress: internalProgress, completeStep: internalCompleteStep } = useLearningProgress(track);
|
|
14
|
-
const progress = externalProgress ?? internalProgress;
|
|
15
|
-
const handleViewChange = useCallback((view) => {
|
|
16
|
-
setCurrentView(view);
|
|
17
|
-
onViewChange?.(view);
|
|
18
|
-
}, [onViewChange]);
|
|
19
|
-
const handleStepComplete = useCallback((stepId) => {
|
|
20
|
-
if (externalOnStepComplete) externalOnStepComplete(stepId);
|
|
21
|
-
else internalCompleteStep(stepId);
|
|
22
|
-
}, [externalOnStepComplete, internalCompleteStep]);
|
|
23
|
-
const handleStartFromOverview = useCallback(() => {
|
|
24
|
-
setCurrentView("steps");
|
|
25
|
-
onViewChange?.("steps");
|
|
26
|
-
}, [onViewChange]);
|
|
27
|
-
const renderView = () => {
|
|
28
|
-
const viewProps = {
|
|
29
|
-
track,
|
|
30
|
-
progress,
|
|
31
|
-
onStepComplete: handleStepComplete
|
|
32
|
-
};
|
|
33
|
-
switch (currentView) {
|
|
34
|
-
case "overview": return /* @__PURE__ */ jsx(Overview, {
|
|
35
|
-
...viewProps,
|
|
36
|
-
onStart: handleStartFromOverview
|
|
37
|
-
});
|
|
38
|
-
case "steps": return /* @__PURE__ */ jsx(Steps, { ...viewProps });
|
|
39
|
-
case "progress": return /* @__PURE__ */ jsx(Progress, { ...viewProps });
|
|
40
|
-
case "timeline": return /* @__PURE__ */ jsx(Timeline, { ...viewProps });
|
|
41
|
-
default: return /* @__PURE__ */ jsx(Overview, {
|
|
42
|
-
...viewProps,
|
|
43
|
-
onStart: handleStartFromOverview
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
48
|
-
className: "space-y-6",
|
|
49
|
-
children: [/* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, {
|
|
50
|
-
className: "p-4",
|
|
51
|
-
children: /* @__PURE__ */ jsx(ViewTabs, {
|
|
52
|
-
currentView,
|
|
53
|
-
onViewChange: handleViewChange
|
|
54
|
-
})
|
|
55
|
-
}) }), renderView()]
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region src/example.ts
|
|
61
|
-
const example = {
|
|
62
|
-
id: "learning-journey-ui-gamified",
|
|
63
|
-
title: "Learning Journey UI — Gamified",
|
|
64
|
-
summary: "UI mini-app for gamified learning: flashcards, mastery ring, calendar.",
|
|
65
|
-
tags: [
|
|
66
|
-
"learning",
|
|
67
|
-
"ui",
|
|
68
|
-
"gamified"
|
|
69
|
-
],
|
|
70
|
-
kind: "ui",
|
|
71
|
-
visibility: "public",
|
|
72
|
-
docs: { rootDocId: "docs.examples.learning-journey-ui-gamified" },
|
|
73
|
-
entrypoints: {
|
|
74
|
-
packageName: "@lssm/example.learning-journey-ui-gamified",
|
|
75
|
-
docs: "./docs"
|
|
76
|
-
},
|
|
77
|
-
surfaces: {
|
|
78
|
-
templates: true,
|
|
79
|
-
sandbox: {
|
|
80
|
-
enabled: true,
|
|
81
|
-
modes: ["playground", "markdown"]
|
|
82
|
-
},
|
|
83
|
-
studio: {
|
|
84
|
-
enabled: true,
|
|
85
|
-
installable: true
|
|
86
|
-
},
|
|
87
|
-
mcp: { enabled: true }
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
var example_default = example;
|
|
91
|
-
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/docs/learning-journey-ui-gamified.docblock.ts
|
|
94
|
-
registerDocBlocks([{
|
|
95
|
-
id: "docs.examples.learning-journey-ui-gamified",
|
|
96
|
-
title: "Learning Journey UI — Gamified",
|
|
97
|
-
summary: "UI mini-app components for gamified learning: flashcards, mastery, streak/calendar.",
|
|
98
|
-
kind: "reference",
|
|
99
|
-
visibility: "public",
|
|
100
|
-
route: "/docs/examples/learning-journey-ui-gamified",
|
|
101
|
-
tags: [
|
|
102
|
-
"learning",
|
|
103
|
-
"ui",
|
|
104
|
-
"gamified"
|
|
105
|
-
],
|
|
106
|
-
body: `## Includes\n- Gamified mini-app shell\n- Views: overview, steps, progress, timeline\n- Components: flash card, mastery ring, day calendar\n\n## Notes\n- Compose with design system components.\n- Respect prefers-reduced-motion; keep tap targets large.`
|
|
107
|
-
}]);
|
|
108
|
-
|
|
109
|
-
//#endregion
|
|
110
|
-
export { DayCalendar, FlashCard, GamifiedMiniApp, MasteryRing, Overview, Progress, Steps, Timeline, example_default as example };
|
package/dist/views/index.d.mts
DELETED
package/dist/views/index.mjs
DELETED