@hydralms/components 0.3.0 → 0.3.1

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 (47) hide show
  1. package/dist/StudentProfile-BPsZBaJj.cjs +1 -0
  2. package/dist/{StudentProfile-DeMxdrL3.js → StudentProfile-Cw2p-RZn.js} +577 -579
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.js +172 -166
  5. package/dist/license/index.d.ts +2 -2
  6. package/dist/license/tiers.d.ts +3 -0
  7. package/dist/modules.cjs +1 -1
  8. package/dist/modules.js +111 -110
  9. package/dist/sections/AdaptiveLearningPath/AdaptiveLearningPath.d.ts +5 -0
  10. package/dist/sections/AdaptiveLearningPath/path-connector.d.ts +8 -0
  11. package/dist/sections/AdaptiveLearningPath/path-milestone-marker.d.ts +7 -0
  12. package/dist/sections/AdaptiveLearningPath/path-node-card.d.ts +10 -0
  13. package/dist/sections/AdaptiveLearningPath/path-skill-bar.d.ts +8 -0
  14. package/dist/sections/AdaptiveLearningPath/types.d.ts +136 -0
  15. package/dist/sections/ContentAuthoringStudio/ContentAuthoringStudio.d.ts +5 -0
  16. package/dist/sections/ContentAuthoringStudio/block-editor-item.d.ts +14 -0
  17. package/dist/sections/ContentAuthoringStudio/block-type-picker.d.ts +12 -0
  18. package/dist/sections/ContentAuthoringStudio/types.d.ts +67 -0
  19. package/dist/sections/index.d.ts +4 -0
  20. package/dist/sections.cjs +1 -1
  21. package/dist/sections.js +1325 -232
  22. package/dist/withProGate-BJdu1T9Y.cjs +2 -0
  23. package/dist/withProGate-BvFc7Jwy.js +4975 -0
  24. package/package.json +24 -7
  25. package/src/license/index.ts +2 -2
  26. package/src/license/tiers.ts +12 -2
  27. package/src/modules/CoursePlayer/CoursePlayer.tsx +3 -1
  28. package/src/progress/stat-card.tsx +10 -5
  29. package/src/sections/AdaptiveLearningPath/AdaptiveLearningPath.tsx +251 -0
  30. package/src/sections/AdaptiveLearningPath/path-connector.tsx +27 -0
  31. package/src/sections/AdaptiveLearningPath/path-milestone-marker.tsx +50 -0
  32. package/src/sections/AdaptiveLearningPath/path-node-card.tsx +166 -0
  33. package/src/sections/AdaptiveLearningPath/path-skill-bar.tsx +49 -0
  34. package/src/sections/AdaptiveLearningPath/types.ts +159 -0
  35. package/src/sections/ContentAuthoringStudio/ContentAuthoringStudio.tsx +289 -0
  36. package/src/sections/ContentAuthoringStudio/block-editor-item.tsx +487 -0
  37. package/src/sections/ContentAuthoringStudio/block-type-picker.tsx +123 -0
  38. package/src/sections/ContentAuthoringStudio/types.ts +67 -0
  39. package/src/sections/ForumBoard/ForumBoard.tsx +8 -6
  40. package/src/sections/LessonPage/LessonPage.tsx +4 -7
  41. package/src/sections/index.ts +18 -0
  42. package/src/video/video-player.tsx +14 -5
  43. package/dist/StudentProfile-BVfZMbnV.cjs +0 -1
  44. package/dist/tabs-BsfVo2Bl.cjs +0 -173
  45. package/dist/tabs-BuY1iNJE.js +0 -22305
  46. package/dist/withProGate-BWqcKdPM.js +0 -137
  47. package/dist/withProGate-DX6XqKLp.cjs +0 -1
package/dist/sections.js CHANGED
@@ -1,154 +1,154 @@
1
- import { m as q, S as ee } from "./StudentProfile-DeMxdrL3.js";
2
- import { A as Se, a as Ae, b as Te, C as Ce, c as ze, d as Le, D as Qe, E as Me, e as ke, F as Ee, f as Ie, G as je, L as Ue, g as Fe, P as Be, h as De, Q as Pe, R as Ve, i as _e, j as Ge, k as We } from "./StudentProfile-DeMxdrL3.js";
3
- import { jsx as e, jsxs as a, Fragment as te } from "react/jsx-runtime";
4
- import { useState as L, useRef as K, useMemo as j, useEffect as se, useCallback as O } from "react";
5
- import { c as f, C as U, x as Y, ao as ie, as as ae, v as z, at as Q, a1 as $, ar as ne, aN as _, aP as G, aO as W, aI as le, aK as re, aL as H, ac as J, a_ as R, ai as de } from "./tabs-BuY1iNJE.js";
6
- import { AlertCircle as oe, List as ce, Grid as me, Download as ue } from "lucide-react";
7
- const he = [];
8
- function ve({
9
- questions: l,
10
- initialAnswers: N = [],
11
- onSubmit: r,
12
- onAnswerChange: y,
13
- showNavigator: F = !0,
14
- showQuestionNumbers: B = !0,
15
- questionGroups: b,
16
- isSubmitting: M = !1,
1
+ import { m as Ae, S as ne } from "./StudentProfile-Cw2p-RZn.js";
2
+ import { A as kt, a as Qt, b as $t, C as Vt, c as Ht, d as Ot, D as Gt, E as Wt, e as Kt, F as Yt, f as Jt, G as Xt, L as Zt, g as qt, P as ea, h as ta, Q as aa, R as ra, i as sa, j as ia, k as la } from "./StudentProfile-Cw2p-RZn.js";
3
+ import { jsx as e, jsxs as s, Fragment as $ } from "react/jsx-runtime";
4
+ import { useState as j, useRef as Z, useMemo as O, useEffect as Ne, useCallback as B, memo as ce } from "react";
5
+ import { c as T, C as W, x as q, ar as Te, av as ee, v as E, aw as R, a2 as te, au as Ie, aQ as Y, aS as J, aR as X, aL as Le, aN as Pe, aO as me, ae as se, b3 as ue, ak as De, B as ae, ad as A, as as Ee, b2 as be, b4 as Be, J as Re, a as ye, P as _e, an as Me, az as H } from "./withProGate-BvFc7Jwy.js";
6
+ import { AlertCircle as Fe, List as Ue, Grid as je, Download as ke, Plus as Qe, Minus as $e, Paperclip as Ve, Table as He, Globe as Oe, Music as Ge, MessageSquare as We, Code as Ke, Video as Ye, Image as Je, Heading as Xe, Type as de, GripVertical as Ze, ChevronRight as qe, ChevronDown as et, Copy as tt, Trash2 as ie, Eye as at, Pencil as rt, Save as st, SkipForward as it, Lock as we, Play as lt, CheckCircle2 as nt, ShieldCheck as ct, Sparkles as dt, Clock as Ce, Trophy as ot, Target as mt, BookOpen as ut, TrendingUp as pe, Flame as pt } from "lucide-react";
7
+ const ht = [];
8
+ function Rt({
9
+ questions: t,
10
+ initialAnswers: r = [],
11
+ onSubmit: a,
12
+ onAnswerChange: i,
13
+ showNavigator: l = !0,
14
+ showQuestionNumbers: C = !0,
15
+ questionGroups: x,
16
+ isSubmitting: p = !1,
17
17
  readOnly: h = !1,
18
- isLoading: D,
19
- error: k,
20
- onRetry: E,
21
- className: o,
22
- style: p
18
+ isLoading: N,
19
+ error: I,
20
+ onRetry: m,
21
+ className: c,
22
+ style: d
23
23
  }) {
24
- var d;
25
- const [S, x] = L(N), [A, T] = L(((d = l[0]) == null ? void 0 : d.uid) ?? null), m = K(/* @__PURE__ */ new Map()), g = j(() => {
26
- const s = /* @__PURE__ */ new Map();
27
- for (const i of S) {
28
- const n = s.get(i.uid);
29
- n ? n.push(i) : s.set(i.uid, [i]);
24
+ var _;
25
+ const [y, v] = j(r), [D, w] = j(((_ = t[0]) == null ? void 0 : _.uid) ?? null), L = Z(/* @__PURE__ */ new Map()), S = O(() => {
26
+ const o = /* @__PURE__ */ new Map();
27
+ for (const f of y) {
28
+ const b = o.get(f.uid);
29
+ b ? b.push(f) : o.set(f.uid, [f]);
30
30
  }
31
- return s;
32
- }, [S]), v = j(
33
- () => l.filter((s) => g.has(s.uid)).length,
34
- [l, g]
31
+ return o;
32
+ }, [y]), g = O(
33
+ () => t.filter((o) => S.has(o.uid)).length,
34
+ [t, S]
35
35
  );
36
- se(() => {
37
- const s = new IntersectionObserver(
38
- (i) => {
39
- for (const n of i)
40
- n.isIntersecting && T(n.target.getAttribute("data-question-uid"));
36
+ Ne(() => {
37
+ const o = new IntersectionObserver(
38
+ (f) => {
39
+ for (const b of f)
40
+ b.isIntersecting && w(b.target.getAttribute("data-question-uid"));
41
41
  },
42
42
  { rootMargin: "-20% 0px -60% 0px" }
43
43
  );
44
- return m.current.forEach((i) => s.observe(i)), () => s.disconnect();
45
- }, [l]);
46
- const P = O((s, i) => {
47
- i ? m.current.set(s, i) : m.current.delete(s);
48
- }, []), w = K(y);
49
- w.current = y;
50
- const I = O(
51
- (s, i) => {
52
- x(
53
- (n) => q(n, s, i, w.current)
44
+ return L.current.forEach((f) => o.observe(f)), () => o.disconnect();
45
+ }, [t]);
46
+ const k = B((o, f) => {
47
+ f ? L.current.set(o, f) : L.current.delete(o);
48
+ }, []), U = Z(i);
49
+ U.current = i;
50
+ const V = B(
51
+ (o, f) => {
52
+ v(
53
+ (b) => Ae(b, o, f, U.current)
54
54
  );
55
55
  },
56
56
  []
57
57
  );
58
- function u(s) {
59
- var i;
60
- (i = m.current.get(s)) == null || i.scrollIntoView({ behavior: "smooth", block: "center" });
58
+ function F(o) {
59
+ var f;
60
+ (f = L.current.get(o)) == null || f.scrollIntoView({ behavior: "smooth", block: "center" });
61
61
  }
62
- const V = j(() => {
63
- if (!b) return [{ label: null, questions: l }];
64
- const s = b.map(
65
- (c) => ({
66
- label: c.label,
67
- questions: c.questionUids.map((C) => l.find((Z) => Z.uid === C)).filter(Boolean)
62
+ const G = O(() => {
63
+ if (!x) return [{ label: null, questions: t }];
64
+ const o = x.map(
65
+ (M) => ({
66
+ label: M.label,
67
+ questions: M.questionUids.map((Q) => t.find((u) => u.uid === Q)).filter(Boolean)
68
68
  })
69
- ), i = new Set(b.flatMap((c) => c.questionUids)), n = l.filter((c) => !i.has(c.uid));
70
- return n.length > 0 && s.push({ label: null, questions: n }), s;
71
- }, [l, b]);
72
- let t = 0;
69
+ ), f = new Set(x.flatMap((M) => M.questionUids)), b = t.filter((M) => !f.has(M.uid));
70
+ return b.length > 0 && o.push({ label: null, questions: b }), o;
71
+ }, [t, x]);
72
+ let n = 0;
73
73
  return /* @__PURE__ */ e(
74
- ee,
74
+ ne,
75
75
  {
76
- isLoading: D,
77
- error: k,
78
- onRetry: E,
79
- className: o,
80
- style: p,
81
- skeleton: /* @__PURE__ */ a(te, { children: [
82
- /* @__PURE__ */ e(Q, { className: "h-32 w-full" }),
83
- /* @__PURE__ */ e(Q, { className: "h-32 w-full" }),
84
- /* @__PURE__ */ e(Q, { className: "h-32 w-full" })
76
+ isLoading: N,
77
+ error: I,
78
+ onRetry: m,
79
+ className: c,
80
+ style: d,
81
+ skeleton: /* @__PURE__ */ s($, { children: [
82
+ /* @__PURE__ */ e(R, { className: "h-32 w-full" }),
83
+ /* @__PURE__ */ e(R, { className: "h-32 w-full" }),
84
+ /* @__PURE__ */ e(R, { className: "h-32 w-full" })
85
85
  ] }),
86
- children: /* @__PURE__ */ a("div", { className: "flex gap-3", children: [
87
- /* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: [
88
- V.map((s, i) => /* @__PURE__ */ a("div", { children: [
89
- s.label && /* @__PURE__ */ e("p", { className: f("text-lg font-semibold mb-2 text-foreground", i > 0 && "mt-4"), children: s.label }),
90
- s.questions.map((n) => {
91
- const c = t++;
86
+ children: /* @__PURE__ */ s("div", { className: "flex gap-3", children: [
87
+ /* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [
88
+ G.map((o, f) => /* @__PURE__ */ s("div", { children: [
89
+ o.label && /* @__PURE__ */ e("p", { className: T("text-lg font-semibold mb-2 text-foreground", f > 0 && "mt-4"), children: o.label }),
90
+ o.questions.map((b) => {
91
+ const M = n++;
92
92
  return /* @__PURE__ */ e(
93
- U,
93
+ W,
94
94
  {
95
- ref: (C) => P(n.uid, C),
96
- "data-question-uid": n.uid,
95
+ ref: (Q) => k(b.uid, Q),
96
+ "data-question-uid": b.uid,
97
97
  className: "mb-2",
98
- children: /* @__PURE__ */ a(Y, { className: "pt-6", children: [
99
- B && /* @__PURE__ */ a("p", { className: "font-semibold text-sm text-muted-foreground mb-1", children: [
98
+ children: /* @__PURE__ */ s(q, { className: "pt-6", children: [
99
+ C && /* @__PURE__ */ s("p", { className: "font-semibold text-sm text-muted-foreground mb-1", children: [
100
100
  "Question ",
101
- c + 1
101
+ M + 1
102
102
  ] }),
103
103
  /* @__PURE__ */ e(
104
- ie,
104
+ Te,
105
105
  {
106
- question: n,
107
- sessionAnswers: g.get(n.uid) ?? he,
108
- onAnswer: (C) => I(n.uid, C),
106
+ question: b,
107
+ sessionAnswers: S.get(b.uid) ?? ht,
108
+ onAnswer: (Q) => V(b.uid, Q),
109
109
  readOnly: h
110
110
  }
111
111
  )
112
112
  ] })
113
113
  },
114
- n.uid
114
+ b.uid
115
115
  );
116
116
  })
117
- ] }, s.label ?? `ungrouped-${i}`)),
118
- /* @__PURE__ */ e(ae, { className: "my-3" }),
119
- /* @__PURE__ */ a("div", { className: "flex justify-between items-center", children: [
120
- /* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: [
121
- v,
117
+ ] }, o.label ?? `ungrouped-${f}`)),
118
+ /* @__PURE__ */ e(ee, { className: "my-3" }),
119
+ /* @__PURE__ */ s("div", { className: "flex justify-between items-center", children: [
120
+ /* @__PURE__ */ s("span", { className: "text-sm text-muted-foreground", children: [
121
+ g,
122
122
  " of ",
123
- l.length,
123
+ t.length,
124
124
  " answered"
125
125
  ] }),
126
126
  /* @__PURE__ */ e(
127
- z,
127
+ E,
128
128
  {
129
- onClick: () => r(S),
130
- disabled: M || h,
131
- children: M ? "Submitting..." : "Submit"
129
+ onClick: () => a(y),
130
+ disabled: p || h,
131
+ children: p ? "Submitting..." : "Submit"
132
132
  }
133
133
  )
134
134
  ] })
135
135
  ] }),
136
- F && /* @__PURE__ */ e(U, { className: "hidden md:block w-50 shrink-0 sticky top-4 self-start", children: /* @__PURE__ */ a(Y, { className: "p-3", children: [
136
+ l && /* @__PURE__ */ e(W, { className: "hidden md:block w-50 shrink-0 sticky top-4 self-start", children: /* @__PURE__ */ s(q, { className: "p-3", children: [
137
137
  /* @__PURE__ */ e("p", { className: "font-semibold text-sm mb-1 text-foreground", children: "Questions" }),
138
- /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: l.map((s, i) => {
139
- const n = g.has(s.uid), c = A === s.uid;
138
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((o, f) => {
139
+ const b = S.has(o.uid), M = D === o.uid;
140
140
  return /* @__PURE__ */ e(
141
141
  "button",
142
142
  {
143
143
  type: "button",
144
- className: f(
144
+ className: T(
145
145
  "inline-flex items-center justify-center text-xs font-medium min-w-9 px-1 py-0.5 rounded-full cursor-pointer border transition-colors",
146
- c ? "bg-primary border-primary text-primary-foreground" : n ? "border-success text-success bg-transparent" : "border-border text-foreground bg-transparent hover:bg-muted"
146
+ M ? "bg-primary border-primary text-primary-foreground" : b ? "border-success text-success bg-transparent" : "border-border text-foreground bg-transparent hover:bg-muted"
147
147
  ),
148
- onClick: () => u(s.uid),
149
- children: i + 1
148
+ onClick: () => F(o.uid),
149
+ children: f + 1
150
150
  },
151
- s.uid
151
+ o.uid
152
152
  );
153
153
  }) })
154
154
  ] }) })
@@ -156,7 +156,7 @@ function ve({
156
156
  }
157
157
  );
158
158
  }
159
- const X = {
159
+ const he = {
160
160
  pdf: "document",
161
161
  document: "document",
162
162
  video: "video",
@@ -165,200 +165,1293 @@ const X = {
165
165
  archive: "document",
166
166
  other: "document"
167
167
  };
168
- function we({
169
- resources: l,
170
- categories: N,
171
- onResourceClick: r,
172
- onDownload: y,
173
- viewMode: F = "list",
174
- allowViewToggle: B = !0,
175
- showSearch: b = !0,
176
- emptyMessage: M = "No resources found",
168
+ function _t({
169
+ resources: t,
170
+ categories: r,
171
+ onResourceClick: a,
172
+ onDownload: i,
173
+ viewMode: l = "list",
174
+ allowViewToggle: C = !0,
175
+ showSearch: x = !0,
176
+ emptyMessage: p = "No resources found",
177
177
  readOnly: h = !1,
178
- isLoading: D,
179
- error: k,
180
- onRetry: E,
181
- pageSize: o,
182
- currentPage: p = 1,
183
- totalItems: S,
184
- onPageChange: x,
185
- className: A,
186
- style: T
178
+ isLoading: N,
179
+ error: I,
180
+ onRetry: m,
181
+ pageSize: c,
182
+ currentPage: d = 1,
183
+ totalItems: y,
184
+ onPageChange: v,
185
+ className: D,
186
+ style: w
187
187
  }) {
188
- const [m, g] = L(""), [v, P] = L(null), [w, I] = L(F), u = j(() => {
189
- let t = l;
190
- if (v && (t = t.filter((d) => d.categoryUid === v)), m.trim()) {
191
- const d = m.toLowerCase();
192
- t = t.filter(
193
- (s) => {
194
- var i;
195
- return s.name.toLowerCase().includes(d) || ((i = s.description) == null ? void 0 : i.toLowerCase().includes(d));
188
+ const [L, S] = j(""), [g, k] = j(null), [U, V] = j(l), F = O(() => {
189
+ let n = t;
190
+ if (g && (n = n.filter((_) => _.categoryUid === g)), L.trim()) {
191
+ const _ = L.toLowerCase();
192
+ n = n.filter(
193
+ (o) => {
194
+ var f;
195
+ return o.name.toLowerCase().includes(_) || ((f = o.description) == null ? void 0 : f.toLowerCase().includes(_));
196
196
  }
197
197
  );
198
198
  }
199
- return t;
200
- }, [l, v, m]);
201
- if (D)
202
- return /* @__PURE__ */ a("div", { className: f("space-y-4", A), style: T, children: [
203
- /* @__PURE__ */ e(Q, { className: "h-9 w-full" }),
204
- /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children: Array.from({ length: 6 }).map((t, d) => /* @__PURE__ */ e(Q, { className: "h-32 w-full rounded-lg" }, d)) })
199
+ return n;
200
+ }, [t, g, L]);
201
+ if (N)
202
+ return /* @__PURE__ */ s("div", { className: T("space-y-4", D), style: w, children: [
203
+ /* @__PURE__ */ e(R, { className: "h-9 w-full" }),
204
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4", children: Array.from({ length: 6 }).map((n, _) => /* @__PURE__ */ e(R, { className: "h-32 w-full rounded-lg" }, _)) })
205
205
  ] });
206
- if (k)
207
- return /* @__PURE__ */ e("div", { className: f("py-12", A), style: T, children: /* @__PURE__ */ e(
208
- $,
206
+ if (I)
207
+ return /* @__PURE__ */ e("div", { className: T("py-12", D), style: w, children: /* @__PURE__ */ e(
208
+ te,
209
209
  {
210
- icon: /* @__PURE__ */ e(oe, { className: "size-10 text-destructive" }),
210
+ icon: /* @__PURE__ */ e(Fe, { className: "size-10 text-destructive" }),
211
211
  title: "Something went wrong",
212
- description: k,
213
- action: E ? /* @__PURE__ */ e(z, { variant: "outline", onClick: E, children: "Retry" }) : void 0
212
+ description: I,
213
+ action: m ? /* @__PURE__ */ e(E, { variant: "outline", onClick: m, children: "Retry" }) : void 0
214
214
  }
215
215
  ) });
216
- function V(t) {
217
- const d = X[t.type] ?? "document";
218
- return /* @__PURE__ */ a(
216
+ function G(n) {
217
+ const _ = he[n.type] ?? "document";
218
+ return /* @__PURE__ */ s(
219
219
  "div",
220
220
  {
221
- className: f(
221
+ className: T(
222
222
  "flex items-center gap-3 px-3 py-2",
223
- !h && r && "cursor-pointer hover:bg-muted",
224
- (h || !r) && "opacity-70"
223
+ !h && a && "cursor-pointer hover:bg-muted",
224
+ (h || !a) && "opacity-70"
225
225
  ),
226
- onClick: () => !h && (r == null ? void 0 : r(t)),
226
+ onClick: () => !h && (a == null ? void 0 : a(n)),
227
227
  children: [
228
- /* @__PURE__ */ e("div", { className: "min-w-10", children: /* @__PURE__ */ e(J, { type: d, size: 20 }) }),
229
- /* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: [
230
- /* @__PURE__ */ e("span", { className: "text-sm text-foreground", children: t.name }),
231
- (t.description || t.fileSize != null) && /* @__PURE__ */ e("span", { className: "block text-xs text-muted-foreground", children: [
232
- t.description,
233
- t.fileSize != null && R(t.fileSize)
228
+ /* @__PURE__ */ e("div", { className: "min-w-10", children: /* @__PURE__ */ e(se, { type: _, size: 20 }) }),
229
+ /* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [
230
+ /* @__PURE__ */ e("span", { className: "text-sm text-foreground", children: n.name }),
231
+ (n.description || n.fileSize != null) && /* @__PURE__ */ e("span", { className: "block text-xs text-muted-foreground", children: [
232
+ n.description,
233
+ n.fileSize != null && ue(n.fileSize)
234
234
  ].filter(Boolean).join(" · ") })
235
235
  ] }),
236
- y && /* @__PURE__ */ a(_, { children: [
237
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
238
- z,
236
+ i && /* @__PURE__ */ s(Y, { children: [
237
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(
238
+ E,
239
239
  {
240
240
  variant: "ghost",
241
241
  size: "icon-xs",
242
242
  "aria-label": "Download",
243
- onClick: (s) => {
244
- s.stopPropagation(), y(t);
243
+ onClick: (o) => {
244
+ o.stopPropagation(), i(n);
245
245
  },
246
- children: /* @__PURE__ */ e(ue, { size: 16 })
246
+ children: /* @__PURE__ */ e(ke, { size: 16 })
247
247
  }
248
248
  ) }),
249
- /* @__PURE__ */ e(W, { children: "Download" })
249
+ /* @__PURE__ */ e(X, { children: "Download" })
250
250
  ] })
251
251
  ]
252
252
  },
253
- t.uid
253
+ n.uid
254
254
  );
255
255
  }
256
- return /* @__PURE__ */ a("div", { className: A, style: T, children: [
257
- /* @__PURE__ */ a("div", { className: "flex gap-2 items-center mb-2", children: [
258
- b && /* @__PURE__ */ e("div", { className: "flex-1 max-w-80", children: /* @__PURE__ */ e(
259
- ne,
256
+ return /* @__PURE__ */ s("div", { className: D, style: w, children: [
257
+ /* @__PURE__ */ s("div", { className: "flex gap-2 items-center mb-2", children: [
258
+ x && /* @__PURE__ */ e("div", { className: "flex-1 max-w-80", children: /* @__PURE__ */ e(
259
+ Ie,
260
260
  {
261
- value: m,
262
- onChange: g,
261
+ value: L,
262
+ onChange: S,
263
263
  placeholder: "Search resources...",
264
264
  size: "small"
265
265
  }
266
266
  ) }),
267
- B && /* @__PURE__ */ a("div", { className: "flex gap-0.5", children: [
268
- /* @__PURE__ */ a(_, { children: [
269
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
270
- z,
267
+ C && /* @__PURE__ */ s("div", { className: "flex gap-0.5", children: [
268
+ /* @__PURE__ */ s(Y, { children: [
269
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(
270
+ E,
271
271
  {
272
272
  variant: "ghost",
273
273
  size: "icon-xs",
274
274
  "aria-label": "List view",
275
- className: f(w === "list" && "text-primary"),
276
- onClick: () => I("list"),
277
- children: /* @__PURE__ */ e(ce, { size: 18 })
275
+ className: T(U === "list" && "text-primary"),
276
+ onClick: () => V("list"),
277
+ children: /* @__PURE__ */ e(Ue, { size: 18 })
278
278
  }
279
279
  ) }),
280
- /* @__PURE__ */ e(W, { children: "List view" })
280
+ /* @__PURE__ */ e(X, { children: "List view" })
281
281
  ] }),
282
- /* @__PURE__ */ a(_, { children: [
283
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
284
- z,
282
+ /* @__PURE__ */ s(Y, { children: [
283
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(
284
+ E,
285
285
  {
286
286
  variant: "ghost",
287
287
  size: "icon-xs",
288
288
  "aria-label": "Grid view",
289
- className: f(w === "grid" && "text-primary"),
290
- onClick: () => I("grid"),
291
- children: /* @__PURE__ */ e(me, { size: 18 })
289
+ className: T(U === "grid" && "text-primary"),
290
+ onClick: () => V("grid"),
291
+ children: /* @__PURE__ */ e(je, { size: 18 })
292
292
  }
293
293
  ) }),
294
- /* @__PURE__ */ e(W, { children: "Grid view" })
294
+ /* @__PURE__ */ e(X, { children: "Grid view" })
295
295
  ] })
296
296
  ] })
297
297
  ] }),
298
- N && N.length > 0 && /* @__PURE__ */ e(
299
- le,
298
+ r && r.length > 0 && /* @__PURE__ */ e(
299
+ Le,
300
300
  {
301
- value: v ?? "all",
302
- onValueChange: (t) => P(t === "all" ? null : t),
301
+ value: g ?? "all",
302
+ onValueChange: (n) => k(n === "all" ? null : n),
303
303
  className: "mb-2",
304
- children: /* @__PURE__ */ a(re, { children: [
305
- /* @__PURE__ */ e(H, { value: "all", children: "All" }),
306
- N.map((t) => /* @__PURE__ */ e(H, { value: t.uid, children: t.label }, t.uid))
304
+ children: /* @__PURE__ */ s(Pe, { children: [
305
+ /* @__PURE__ */ e(me, { value: "all", children: "All" }),
306
+ r.map((n) => /* @__PURE__ */ e(me, { value: n.uid, children: n.label }, n.uid))
307
307
  ] })
308
308
  }
309
309
  ),
310
- u.length === 0 ? /* @__PURE__ */ e($, { title: M, description: "Try adjusting your search or filter." }) : w === "list" ? /* @__PURE__ */ e(U, { children: (x && o ? u.slice((p - 1) * o, p * o) : u).map(V) }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-2", children: (x && o ? u.slice((p - 1) * o, p * o) : u).map((t) => /* @__PURE__ */ e(
311
- U,
310
+ F.length === 0 ? /* @__PURE__ */ e(te, { title: p, description: "Try adjusting your search or filter." }) : U === "list" ? /* @__PURE__ */ e(W, { children: (v && c ? F.slice((d - 1) * c, d * c) : F).map(G) }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-2", children: (v && c ? F.slice((d - 1) * c, d * c) : F).map((n) => /* @__PURE__ */ e(
311
+ W,
312
312
  {
313
- className: f(
313
+ className: T(
314
314
  "transition-colors",
315
- !h && r && "cursor-pointer hover:border-primary"
315
+ !h && a && "cursor-pointer hover:border-primary"
316
316
  ),
317
- onClick: () => !h && (r == null ? void 0 : r(t)),
318
- children: /* @__PURE__ */ a(Y, { className: "pt-4 pb-4", children: [
319
- /* @__PURE__ */ a("div", { className: "flex gap-1 items-center mb-1", children: [
320
- /* @__PURE__ */ e(J, { type: X[t.type] ?? "document", size: 20 }),
321
- /* @__PURE__ */ e("span", { className: "font-semibold text-sm text-foreground truncate", children: t.name })
317
+ onClick: () => !h && (a == null ? void 0 : a(n)),
318
+ children: /* @__PURE__ */ s(q, { className: "pt-4 pb-4", children: [
319
+ /* @__PURE__ */ s("div", { className: "flex gap-1 items-center mb-1", children: [
320
+ /* @__PURE__ */ e(se, { type: he[n.type] ?? "document", size: 20 }),
321
+ /* @__PURE__ */ e("span", { className: "font-semibold text-sm text-foreground truncate", children: n.name })
322
322
  ] }),
323
- t.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mb-1 truncate", children: t.description }),
324
- t.fileSize != null && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: R(t.fileSize) })
323
+ n.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mb-1 truncate", children: n.description }),
324
+ n.fileSize != null && /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: ue(n.fileSize) })
325
325
  ] })
326
326
  },
327
- t.uid
327
+ n.uid
328
328
  )) }),
329
- x && o && u.length > 0 && /* @__PURE__ */ e(
330
- de,
329
+ v && c && F.length > 0 && /* @__PURE__ */ e(
330
+ De,
331
331
  {
332
- currentPage: p,
333
- totalPages: Math.ceil((S ?? u.length) / o),
334
- onPageChange: x,
332
+ currentPage: d,
333
+ totalPages: Math.ceil((y ?? F.length) / c),
334
+ onPageChange: v,
335
335
  className: "mt-4"
336
336
  }
337
337
  )
338
338
  ] });
339
339
  }
340
+ const le = [
341
+ { type: "richtext", label: "Rich Text", description: "Formatted text content" },
342
+ { type: "heading", label: "Heading", description: "Section heading" },
343
+ { type: "image", label: "Image", description: "Image with caption" },
344
+ { type: "video", label: "Video", description: "Video player" },
345
+ { type: "code", label: "Code", description: "Code snippet" },
346
+ { type: "callout", label: "Callout", description: "Info, warning, or tip" },
347
+ { type: "audio", label: "Audio", description: "Audio player" },
348
+ { type: "embed", label: "Embed", description: "External embed" },
349
+ { type: "table", label: "Table", description: "Data table" },
350
+ { type: "file", label: "Files", description: "File attachments" },
351
+ { type: "divider", label: "Divider", description: "Horizontal separator" }
352
+ ], Se = {
353
+ richtext: de,
354
+ heading: Xe,
355
+ image: Je,
356
+ video: Ye,
357
+ code: Ke,
358
+ callout: We,
359
+ audio: Ge,
360
+ embed: Oe,
361
+ table: He,
362
+ file: Ve,
363
+ divider: $e
364
+ };
365
+ function ft(t) {
366
+ return Se[t] ?? de;
367
+ }
368
+ function gt(t) {
369
+ var r;
370
+ return ((r = le.find((a) => a.type === t)) == null ? void 0 : r.label) ?? t;
371
+ }
372
+ function fe({
373
+ onSelect: t,
374
+ allowedTypes: r,
375
+ className: a
376
+ }) {
377
+ const [i, l] = j(!1), C = Z(null), x = r ? le.filter((p) => r.includes(p.type)) : le;
378
+ return Ne(() => {
379
+ if (!i) return;
380
+ function p(h) {
381
+ C.current && !C.current.contains(h.target) && l(!1);
382
+ }
383
+ return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
384
+ }, [i]), /* @__PURE__ */ s("div", { className: T("relative", a), ref: C, children: [
385
+ /* @__PURE__ */ s(
386
+ E,
387
+ {
388
+ variant: "ghost",
389
+ size: "sm",
390
+ onClick: () => l(!i),
391
+ className: "text-muted-foreground hover:text-foreground gap-1 h-7 text-xs",
392
+ children: [
393
+ /* @__PURE__ */ e(Qe, { className: "size-3.5" }),
394
+ "Add block"
395
+ ]
396
+ }
397
+ ),
398
+ i && /* @__PURE__ */ e("div", { className: "absolute left-1/2 -translate-x-1/2 top-full mt-1 z-50 w-72 rounded-lg border border-border bg-background shadow-lg p-2", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1", children: x.map(({ type: p, label: h }) => {
399
+ const N = Se[p] ?? de;
400
+ return /* @__PURE__ */ s(
401
+ "button",
402
+ {
403
+ type: "button",
404
+ onClick: () => {
405
+ t(p), l(!1);
406
+ },
407
+ className: "flex flex-col items-center gap-1 rounded-md p-2 text-xs text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",
408
+ children: [
409
+ /* @__PURE__ */ e(N, { className: "size-4" }),
410
+ /* @__PURE__ */ e("span", { children: h })
411
+ ]
412
+ },
413
+ p
414
+ );
415
+ }) }) })
416
+ ] });
417
+ }
418
+ const vt = ce(function({
419
+ item: r,
420
+ onChange: a,
421
+ onRemove: i,
422
+ onDuplicate: l,
423
+ onToggleCollapse: C,
424
+ dragProps: x,
425
+ isDragging: p,
426
+ isDragOver: h
427
+ }) {
428
+ const { id: N, block: I, collapsed: m } = r, c = ft(I.type), d = gt(I.type), y = B(
429
+ (L) => a(N, L),
430
+ [N, a]
431
+ ), v = B(() => i(N), [N, i]), D = B(() => l(N), [N, l]), w = B(() => C(N), [N, C]);
432
+ return /* @__PURE__ */ s(
433
+ "div",
434
+ {
435
+ ...x,
436
+ className: T(
437
+ "group rounded-lg border border-border bg-background transition-all",
438
+ p && "opacity-50",
439
+ h && "border-primary shadow-sm"
440
+ ),
441
+ children: [
442
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-1 px-2 py-1.5 border-b border-border/50", children: [
443
+ /* @__PURE__ */ e(
444
+ "span",
445
+ {
446
+ className: "cursor-grab text-muted-foreground/50 hover:text-muted-foreground",
447
+ "aria-label": "Drag to reorder",
448
+ children: /* @__PURE__ */ e(Ze, { className: "size-4" })
449
+ }
450
+ ),
451
+ /* @__PURE__ */ e(
452
+ "button",
453
+ {
454
+ type: "button",
455
+ onClick: w,
456
+ className: "text-muted-foreground hover:text-foreground p-0.5",
457
+ children: m ? /* @__PURE__ */ e(qe, { className: "size-3.5" }) : /* @__PURE__ */ e(et, { className: "size-3.5" })
458
+ }
459
+ ),
460
+ /* @__PURE__ */ s(ae, { variant: "secondary", className: "text-[10px] gap-1 px-1.5 py-0", children: [
461
+ /* @__PURE__ */ e(c, { className: "size-3" }),
462
+ d
463
+ ] }),
464
+ /* @__PURE__ */ e("div", { className: "flex-1" }),
465
+ /* @__PURE__ */ e(
466
+ E,
467
+ {
468
+ variant: "ghost",
469
+ size: "sm",
470
+ onClick: D,
471
+ className: "h-6 w-6 p-0 opacity-0 group-hover:opacity-100 text-muted-foreground",
472
+ children: /* @__PURE__ */ e(tt, { className: "size-3" })
473
+ }
474
+ ),
475
+ /* @__PURE__ */ e(
476
+ E,
477
+ {
478
+ variant: "ghost",
479
+ size: "sm",
480
+ onClick: v,
481
+ className: "h-6 w-6 p-0 opacity-0 group-hover:opacity-100 text-destructive",
482
+ children: /* @__PURE__ */ e(ie, { className: "size-3" })
483
+ }
484
+ )
485
+ ] }),
486
+ !m && /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e(xt, { block: I, onChange: y }) })
487
+ ]
488
+ }
489
+ );
490
+ });
491
+ function xt({
492
+ block: t,
493
+ onChange: r
494
+ }) {
495
+ switch (t.type) {
496
+ case "richtext":
497
+ return /* @__PURE__ */ e(
498
+ Ee,
499
+ {
500
+ value: t.html,
501
+ onChange: (a) => r({ ...t, html: a }),
502
+ placeholder: "Write your content..."
503
+ }
504
+ );
505
+ case "heading":
506
+ return /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
507
+ /* @__PURE__ */ s(
508
+ "select",
509
+ {
510
+ value: t.level ?? 2,
511
+ onChange: (a) => r({ ...t, level: Number(a.target.value) }),
512
+ className: "h-9 rounded-md border border-input bg-transparent px-2 text-sm",
513
+ children: [
514
+ /* @__PURE__ */ e("option", { value: 1, children: "H1" }),
515
+ /* @__PURE__ */ e("option", { value: 2, children: "H2" }),
516
+ /* @__PURE__ */ e("option", { value: 3, children: "H3" })
517
+ ]
518
+ }
519
+ ),
520
+ /* @__PURE__ */ e(
521
+ A,
522
+ {
523
+ value: t.text,
524
+ onChange: (a) => r({ ...t, text: a.target.value }),
525
+ placeholder: "Heading text...",
526
+ className: "flex-1"
527
+ }
528
+ )
529
+ ] });
530
+ case "image":
531
+ return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
532
+ /* @__PURE__ */ e(
533
+ A,
534
+ {
535
+ value: t.src,
536
+ onChange: (a) => r({ ...t, src: a.target.value }),
537
+ placeholder: "Image URL..."
538
+ }
539
+ ),
540
+ /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
541
+ /* @__PURE__ */ e(
542
+ A,
543
+ {
544
+ value: t.alt ?? "",
545
+ onChange: (a) => r({ ...t, alt: a.target.value }),
546
+ placeholder: "Alt text...",
547
+ className: "flex-1"
548
+ }
549
+ ),
550
+ /* @__PURE__ */ e(
551
+ A,
552
+ {
553
+ value: t.caption ?? "",
554
+ onChange: (a) => r({ ...t, caption: a.target.value }),
555
+ placeholder: "Caption...",
556
+ className: "flex-1"
557
+ }
558
+ )
559
+ ] }),
560
+ t.src && /* @__PURE__ */ e(
561
+ "img",
562
+ {
563
+ src: t.src,
564
+ alt: t.alt ?? "",
565
+ className: "max-h-40 rounded-md object-cover"
566
+ }
567
+ )
568
+ ] });
569
+ case "video":
570
+ return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
571
+ /* @__PURE__ */ e(
572
+ A,
573
+ {
574
+ value: t.video.src ?? "",
575
+ onChange: (a) => r({ ...t, video: { ...t.video, src: a.target.value } }),
576
+ placeholder: "Video URL..."
577
+ }
578
+ ),
579
+ /* @__PURE__ */ e(
580
+ A,
581
+ {
582
+ value: t.video.title ?? "",
583
+ onChange: (a) => r({ ...t, video: { ...t.video, title: a.target.value } }),
584
+ placeholder: "Video title..."
585
+ }
586
+ )
587
+ ] });
588
+ case "code":
589
+ return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
590
+ /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
591
+ /* @__PURE__ */ e(
592
+ A,
593
+ {
594
+ value: t.language ?? "",
595
+ onChange: (a) => r({ ...t, language: a.target.value }),
596
+ placeholder: "Language (e.g. javascript)",
597
+ className: "w-40"
598
+ }
599
+ ),
600
+ /* @__PURE__ */ e(
601
+ A,
602
+ {
603
+ value: t.filename ?? "",
604
+ onChange: (a) => r({ ...t, filename: a.target.value }),
605
+ placeholder: "Filename (optional)",
606
+ className: "flex-1"
607
+ }
608
+ )
609
+ ] }),
610
+ /* @__PURE__ */ e(
611
+ "textarea",
612
+ {
613
+ value: t.code,
614
+ onChange: (a) => r({ ...t, code: a.target.value }),
615
+ placeholder: "Paste your code...",
616
+ className: "w-full min-h-24 rounded-md border border-input bg-muted p-3 font-mono text-sm resize-y focus:outline-none focus:ring-2 focus:ring-ring",
617
+ spellCheck: !1
618
+ }
619
+ )
620
+ ] });
621
+ case "callout":
622
+ return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
623
+ /* @__PURE__ */ s(
624
+ "select",
625
+ {
626
+ value: t.variant ?? "info",
627
+ onChange: (a) => r({
628
+ ...t,
629
+ variant: a.target.value
630
+ }),
631
+ className: "h-9 rounded-md border border-input bg-transparent px-2 text-sm",
632
+ children: [
633
+ /* @__PURE__ */ e("option", { value: "info", children: "Info" }),
634
+ /* @__PURE__ */ e("option", { value: "warning", children: "Warning" }),
635
+ /* @__PURE__ */ e("option", { value: "tip", children: "Tip" })
636
+ ]
637
+ }
638
+ ),
639
+ /* @__PURE__ */ e(
640
+ A,
641
+ {
642
+ value: t.content,
643
+ onChange: (a) => r({ ...t, content: a.target.value }),
644
+ placeholder: "Callout text..."
645
+ }
646
+ )
647
+ ] });
648
+ case "audio":
649
+ return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
650
+ /* @__PURE__ */ e(
651
+ A,
652
+ {
653
+ value: t.src,
654
+ onChange: (a) => r({ ...t, src: a.target.value }),
655
+ placeholder: "Audio URL..."
656
+ }
657
+ ),
658
+ /* @__PURE__ */ e(
659
+ A,
660
+ {
661
+ value: t.title ?? "",
662
+ onChange: (a) => r({ ...t, title: a.target.value }),
663
+ placeholder: "Title (optional)"
664
+ }
665
+ )
666
+ ] });
667
+ case "embed":
668
+ return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
669
+ /* @__PURE__ */ e(
670
+ A,
671
+ {
672
+ value: t.src,
673
+ onChange: (a) => r({ ...t, src: a.target.value }),
674
+ placeholder: "Embed URL..."
675
+ }
676
+ ),
677
+ /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
678
+ /* @__PURE__ */ e(
679
+ A,
680
+ {
681
+ value: t.title ?? "",
682
+ onChange: (a) => r({ ...t, title: a.target.value }),
683
+ placeholder: "Title (optional)",
684
+ className: "flex-1"
685
+ }
686
+ ),
687
+ /* @__PURE__ */ s(
688
+ "select",
689
+ {
690
+ value: t.aspectRatio ?? "16/9",
691
+ onChange: (a) => r({
692
+ ...t,
693
+ aspectRatio: a.target.value
694
+ }),
695
+ className: "h-9 rounded-md border border-input bg-transparent px-2 text-sm",
696
+ children: [
697
+ /* @__PURE__ */ e("option", { value: "16/9", children: "16:9" }),
698
+ /* @__PURE__ */ e("option", { value: "4/3", children: "4:3" }),
699
+ /* @__PURE__ */ e("option", { value: "1/1", children: "1:1" })
700
+ ]
701
+ }
702
+ )
703
+ ] })
704
+ ] });
705
+ case "table":
706
+ return /* @__PURE__ */ e(Nt, { block: t, onChange: r });
707
+ case "file":
708
+ return /* @__PURE__ */ s("p", { className: "text-sm text-muted-foreground", children: [
709
+ "File attachments are managed via the ",
710
+ /* @__PURE__ */ e("code", { className: "text-xs", children: "files" }),
711
+ " prop.",
712
+ t.files.length > 0 && /* @__PURE__ */ s("span", { className: "ml-1", children: [
713
+ "(",
714
+ t.files.length,
715
+ " file",
716
+ t.files.length !== 1 && "s",
717
+ " attached)"
718
+ ] })
719
+ ] });
720
+ case "divider":
721
+ return /* @__PURE__ */ e(ee, {});
722
+ case "question":
723
+ case "flashcards":
724
+ return /* @__PURE__ */ s("p", { className: "text-sm text-muted-foreground italic", children: [
725
+ "Interactive ",
726
+ t.type,
727
+ " blocks are configured via props."
728
+ ] });
729
+ case "custom":
730
+ return /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground italic", children: "Custom blocks are not editable in the authoring studio." });
731
+ default:
732
+ return null;
733
+ }
734
+ }
735
+ function Nt({
736
+ block: t,
737
+ onChange: r
738
+ }) {
739
+ const { headers: a, rows: i, caption: l } = t;
740
+ function C(m, c) {
741
+ const d = [...a];
742
+ d[m] = c, r({ ...t, headers: d });
743
+ }
744
+ function x(m, c, d) {
745
+ const y = i.map((v) => [...v]);
746
+ y[m][c] = d, r({ ...t, rows: y });
747
+ }
748
+ function p() {
749
+ r({
750
+ ...t,
751
+ headers: [...a, ""],
752
+ rows: i.map((m) => [...m, ""])
753
+ });
754
+ }
755
+ function h(m) {
756
+ a.length <= 1 || r({
757
+ ...t,
758
+ headers: a.filter((c, d) => d !== m),
759
+ rows: i.map((c) => c.filter((d, y) => y !== m))
760
+ });
761
+ }
762
+ function N() {
763
+ r({
764
+ ...t,
765
+ rows: [...i, a.map(() => "")]
766
+ });
767
+ }
768
+ function I(m) {
769
+ r({
770
+ ...t,
771
+ rows: i.filter((c, d) => d !== m)
772
+ });
773
+ }
774
+ return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
775
+ /* @__PURE__ */ e(
776
+ A,
777
+ {
778
+ value: l ?? "",
779
+ onChange: (m) => r({ ...t, caption: m.target.value }),
780
+ placeholder: "Table caption (optional)",
781
+ className: "text-sm"
782
+ }
783
+ ),
784
+ /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ s("table", { className: "w-full text-sm", children: [
785
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ s("tr", { children: [
786
+ a.map((m, c) => /* @__PURE__ */ e("th", { className: "p-1", children: /* @__PURE__ */ s("div", { className: "flex gap-0.5", children: [
787
+ /* @__PURE__ */ e(
788
+ A,
789
+ {
790
+ value: m,
791
+ onChange: (d) => C(c, d.target.value),
792
+ placeholder: `Col ${c + 1}`,
793
+ className: "h-7 text-xs font-semibold"
794
+ }
795
+ ),
796
+ a.length > 1 && /* @__PURE__ */ e(
797
+ E,
798
+ {
799
+ variant: "ghost",
800
+ size: "sm",
801
+ onClick: () => h(c),
802
+ className: "h-7 w-7 p-0 text-destructive shrink-0",
803
+ children: /* @__PURE__ */ e(ie, { className: "size-3" })
804
+ }
805
+ )
806
+ ] }) }, c)),
807
+ /* @__PURE__ */ e("th", { className: "p-1 w-8", children: /* @__PURE__ */ e(
808
+ E,
809
+ {
810
+ variant: "ghost",
811
+ size: "sm",
812
+ onClick: p,
813
+ className: "h-7 w-7 p-0 text-muted-foreground",
814
+ children: "+"
815
+ }
816
+ ) })
817
+ ] }) }),
818
+ /* @__PURE__ */ e("tbody", { children: i.map((m, c) => /* @__PURE__ */ s("tr", { children: [
819
+ m.map((d, y) => /* @__PURE__ */ e("td", { className: "p-1", children: /* @__PURE__ */ e(
820
+ A,
821
+ {
822
+ value: d,
823
+ onChange: (v) => x(c, y, v.target.value),
824
+ className: "h-7 text-xs"
825
+ }
826
+ ) }, y)),
827
+ /* @__PURE__ */ e("td", { className: "p-1", children: /* @__PURE__ */ e(
828
+ E,
829
+ {
830
+ variant: "ghost",
831
+ size: "sm",
832
+ onClick: () => I(c),
833
+ className: "h-7 w-7 p-0 text-destructive",
834
+ children: /* @__PURE__ */ e(ie, { className: "size-3" })
835
+ }
836
+ ) })
837
+ ] }, c)) })
838
+ ] }) }),
839
+ /* @__PURE__ */ e(
840
+ E,
841
+ {
842
+ variant: "ghost",
843
+ size: "sm",
844
+ onClick: N,
845
+ className: "text-xs text-muted-foreground",
846
+ children: "+ Add row"
847
+ }
848
+ )
849
+ ] });
850
+ }
851
+ let bt = 0;
852
+ function re() {
853
+ return `ab_${++bt}_${Date.now().toString(36)}`;
854
+ }
855
+ function yt(t) {
856
+ return t.map((r) => ({ id: re(), block: r }));
857
+ }
858
+ function wt(t) {
859
+ switch (t) {
860
+ case "richtext":
861
+ return { type: "richtext", html: "" };
862
+ case "heading":
863
+ return { type: "heading", text: "", level: 2 };
864
+ case "image":
865
+ return { type: "image", src: "", alt: "" };
866
+ case "video":
867
+ return { type: "video", video: { src: "" } };
868
+ case "code":
869
+ return { type: "code", code: "", language: "javascript" };
870
+ case "callout":
871
+ return { type: "callout", content: "", variant: "info" };
872
+ case "audio":
873
+ return { type: "audio", src: "" };
874
+ case "embed":
875
+ return { type: "embed", src: "" };
876
+ case "table":
877
+ return { type: "table", headers: ["Column 1", "Column 2"], rows: [["", ""]] };
878
+ case "file":
879
+ return { type: "file", files: [] };
880
+ case "divider":
881
+ return { type: "divider" };
882
+ case "question":
883
+ return {
884
+ type: "question",
885
+ question: {
886
+ uid: re(),
887
+ type: "multiple_choice",
888
+ content: "",
889
+ answers: []
890
+ }
891
+ };
892
+ case "flashcards":
893
+ return { type: "flashcards", cards: [] };
894
+ case "custom":
895
+ return { type: "custom", render: null };
896
+ default:
897
+ return { type: "richtext", html: "" };
898
+ }
899
+ }
900
+ function Ct({
901
+ title: t = "",
902
+ blocks: r,
903
+ onBlocksChange: a,
904
+ onTitleChange: i,
905
+ onSave: l,
906
+ showPreviewToggle: C = !0,
907
+ allowedBlockTypes: x,
908
+ readOnly: p = !1,
909
+ isLoading: h,
910
+ error: N,
911
+ onRetry: I,
912
+ className: m,
913
+ style: c
914
+ }) {
915
+ const [d, y] = j(t), [v, D] = j(
916
+ () => yt(r ?? [])
917
+ ), [w, L] = j(p ? "preview" : "edit"), S = O(() => v.map((u) => u.block), [v]), g = B(
918
+ (u) => {
919
+ D(u), a == null || a(u.map((z) => z.block));
920
+ },
921
+ [a]
922
+ ), k = Z(v);
923
+ k.current = v;
924
+ function U(u, z) {
925
+ const P = { id: re(), block: wt(u) }, K = [...v];
926
+ K.splice(z, 0, P), g(K);
927
+ }
928
+ const V = B((u, z) => {
929
+ g(k.current.map((P) => P.id === u ? { ...P, block: z } : P));
930
+ }, [g]), F = B((u) => {
931
+ g(k.current.filter((z) => z.id !== u));
932
+ }, [g]), G = B((u) => {
933
+ const z = k.current, P = z.findIndex((ze) => ze.id === u);
934
+ if (P === -1) return;
935
+ const K = {
936
+ id: re(),
937
+ block: structuredClone(z[P].block)
938
+ }, oe = [...z];
939
+ oe.splice(P + 1, 0, K), g(oe);
940
+ }, [g]), n = B((u) => {
941
+ D(
942
+ (z) => z.map(
943
+ (P) => P.id === u ? { ...P, collapsed: !P.collapsed } : P
944
+ )
945
+ );
946
+ }, []);
947
+ function _(u) {
948
+ y(u), i == null || i(u);
949
+ }
950
+ function o() {
951
+ l == null || l({ title: d, blocks: S });
952
+ }
953
+ const { getDragProps: f, dragIndex: b, dragOverIndex: M } = Be({
954
+ items: v,
955
+ onReorder: g,
956
+ disabled: p || w === "preview"
957
+ }), Q = w === "edit" && !p;
958
+ return /* @__PURE__ */ e(
959
+ ne,
960
+ {
961
+ isLoading: h,
962
+ error: N,
963
+ onRetry: I,
964
+ className: m,
965
+ style: c,
966
+ skeleton: /* @__PURE__ */ s($, { children: [
967
+ /* @__PURE__ */ e(R, { className: "h-10 w-64" }),
968
+ /* @__PURE__ */ e(R, { className: "h-6 w-32" }),
969
+ /* @__PURE__ */ e(R, { className: "h-32 w-full" }),
970
+ /* @__PURE__ */ e(R, { className: "h-24 w-full" }),
971
+ /* @__PURE__ */ e(R, { className: "h-32 w-full" })
972
+ ] }),
973
+ children: /* @__PURE__ */ s("div", { children: [
974
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-2 mb-4", children: [
975
+ Q ? /* @__PURE__ */ e(
976
+ A,
977
+ {
978
+ value: d,
979
+ onChange: (u) => _(u.target.value),
980
+ placeholder: "Lesson title...",
981
+ className: "text-lg font-semibold flex-1 h-10"
982
+ }
983
+ ) : /* @__PURE__ */ e("h2", { className: "text-xl font-bold flex-1 text-foreground", children: d || "Untitled Lesson" }),
984
+ C && !p && /* @__PURE__ */ e(
985
+ E,
986
+ {
987
+ variant: "outline",
988
+ size: "sm",
989
+ onClick: () => L(w === "edit" ? "preview" : "edit"),
990
+ className: "gap-1.5",
991
+ children: w === "edit" ? /* @__PURE__ */ s($, { children: [
992
+ /* @__PURE__ */ e(at, { className: "size-3.5" }),
993
+ " Preview"
994
+ ] }) : /* @__PURE__ */ s($, { children: [
995
+ /* @__PURE__ */ e(rt, { className: "size-3.5" }),
996
+ " Edit"
997
+ ] })
998
+ }
999
+ ),
1000
+ l && !p && /* @__PURE__ */ s(E, { size: "sm", onClick: o, className: "gap-1.5", children: [
1001
+ /* @__PURE__ */ e(st, { className: "size-3.5" }),
1002
+ " Save"
1003
+ ] })
1004
+ ] }),
1005
+ Q ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
1006
+ /* @__PURE__ */ e("div", { className: "flex justify-center py-1", children: /* @__PURE__ */ e(
1007
+ fe,
1008
+ {
1009
+ onSelect: (u) => U(u, 0),
1010
+ allowedTypes: x
1011
+ }
1012
+ ) }),
1013
+ v.length === 0 && /* @__PURE__ */ e(
1014
+ te,
1015
+ {
1016
+ title: "No content blocks",
1017
+ description: "Click 'Add block' above to start building your lesson."
1018
+ }
1019
+ ),
1020
+ v.map((u, z) => /* @__PURE__ */ s("div", { children: [
1021
+ /* @__PURE__ */ e(
1022
+ vt,
1023
+ {
1024
+ item: u,
1025
+ onChange: V,
1026
+ onRemove: F,
1027
+ onDuplicate: G,
1028
+ onToggleCollapse: n,
1029
+ dragProps: f(z),
1030
+ isDragging: b === z,
1031
+ isDragOver: M === z
1032
+ }
1033
+ ),
1034
+ /* @__PURE__ */ e("div", { className: "flex justify-center py-1", children: /* @__PURE__ */ e(
1035
+ fe,
1036
+ {
1037
+ onSelect: (P) => U(P, z + 1),
1038
+ allowedTypes: x
1039
+ }
1040
+ ) })
1041
+ ] }, u.id))
1042
+ ] }) : (
1043
+ /* Preview mode */
1044
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-3", children: v.length > 0 ? v.map((u) => /* @__PURE__ */ e(Re, { block: u.block, readOnly: !0 }, u.id)) : /* @__PURE__ */ e(
1045
+ te,
1046
+ {
1047
+ title: "No content yet",
1048
+ description: "Switch to edit mode to add content blocks."
1049
+ }
1050
+ ) })
1051
+ )
1052
+ ] })
1053
+ }
1054
+ );
1055
+ }
1056
+ const Mt = be(
1057
+ Ct,
1058
+ "ContentAuthoringStudio"
1059
+ ), St = {
1060
+ mastered: { label: "Mastered", variant: "success", icon: ct },
1061
+ completed: { label: "Completed", variant: "success", icon: nt },
1062
+ in_progress: { label: "In Progress", variant: "info", icon: lt },
1063
+ available: { label: "Available", variant: "secondary" },
1064
+ locked: { label: "Locked", variant: "muted", icon: we },
1065
+ skipped: { label: "Skipped", variant: "muted", icon: it }
1066
+ }, zt = ce(function({
1067
+ node: r,
1068
+ onClick: a,
1069
+ onStart: i,
1070
+ readOnly: l = !1,
1071
+ className: C
1072
+ }) {
1073
+ const x = St[r.status], p = x.icon, h = r.status !== "locked" && !l, N = !l && (r.status === "available" || r.recommended) && r.status !== "locked" && r.status !== "completed" && r.status !== "mastered" && i, I = B(() => {
1074
+ h && a && a(r.uid);
1075
+ }, [h, a, r.uid]), m = B(
1076
+ (d) => {
1077
+ (d.key === "Enter" || d.key === " ") && (d.preventDefault(), a == null || a(r.uid));
1078
+ },
1079
+ [a, r.uid]
1080
+ ), c = B(
1081
+ (d) => {
1082
+ d.stopPropagation(), i == null || i(r.uid);
1083
+ },
1084
+ [i, r.uid]
1085
+ );
1086
+ return /* @__PURE__ */ e(
1087
+ W,
1088
+ {
1089
+ className: T(
1090
+ "transition-all",
1091
+ h && a && "cursor-pointer hover:border-primary/50 hover:shadow-md",
1092
+ r.status === "in_progress" && "border-primary ring-1 ring-primary/20",
1093
+ r.status === "locked" && "opacity-60",
1094
+ r.status === "skipped" && "opacity-50",
1095
+ r.recommended && r.status !== "locked" && "border-primary/40",
1096
+ C
1097
+ ),
1098
+ onClick: h && a ? I : void 0,
1099
+ role: h && a ? "button" : void 0,
1100
+ tabIndex: h && a ? 0 : void 0,
1101
+ onKeyDown: h && a ? m : void 0,
1102
+ children: /* @__PURE__ */ e(q, { className: "p-4", children: /* @__PURE__ */ s("div", { className: "flex items-start gap-3", children: [
1103
+ /* @__PURE__ */ e(
1104
+ "div",
1105
+ {
1106
+ className: T(
1107
+ "shrink-0 w-9 h-9 rounded-lg flex items-center justify-center",
1108
+ r.status === "locked" ? "bg-muted text-muted-foreground" : "bg-primary/10 text-primary"
1109
+ ),
1110
+ children: r.icon ?? /* @__PURE__ */ e(se, { type: r.type, size: 18 })
1111
+ }
1112
+ ),
1113
+ /* @__PURE__ */ s("div", { className: "flex-1 min-w-0", children: [
1114
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-wrap", children: [
1115
+ /* @__PURE__ */ e("h4", { className: "text-sm font-semibold text-foreground truncate", children: r.title }),
1116
+ r.recommended && r.status !== "locked" && /* @__PURE__ */ s(ae, { variant: "default", className: "text-[10px] px-1.5 h-5 gap-0.5", children: [
1117
+ /* @__PURE__ */ e(dt, { size: 10 }),
1118
+ "Recommended"
1119
+ ] })
1120
+ ] }),
1121
+ r.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-0.5 line-clamp-1", children: r.description }),
1122
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-3 mt-2 flex-wrap", children: [
1123
+ /* @__PURE__ */ s(ae, { variant: x.variant, className: "text-[10px] px-1.5 h-5 gap-0.5", children: [
1124
+ p && /* @__PURE__ */ e(p, { size: 10 }),
1125
+ x.label
1126
+ ] }),
1127
+ r.estimatedDuration != null && r.estimatedDuration > 0 && /* @__PURE__ */ s("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1128
+ /* @__PURE__ */ e(Ce, { size: 12 }),
1129
+ ye(r.estimatedDuration)
1130
+ ] }),
1131
+ r.score != null && /* @__PURE__ */ s("span", { className: "text-xs font-medium tabular-nums text-foreground", children: [
1132
+ r.score,
1133
+ "%"
1134
+ ] })
1135
+ ] })
1136
+ ] }),
1137
+ N && /* @__PURE__ */ e(
1138
+ E,
1139
+ {
1140
+ size: "sm",
1141
+ variant: r.recommended ? "default" : "outline",
1142
+ className: "shrink-0",
1143
+ onClick: c,
1144
+ children: r.status === "in_progress" ? "Continue" : "Start"
1145
+ }
1146
+ )
1147
+ ] }) })
1148
+ }
1149
+ );
1150
+ });
1151
+ function ge({ fromStatus: t, className: r }) {
1152
+ const a = t === "mastered" || t === "completed", i = t === "in_progress";
1153
+ return /* @__PURE__ */ e("div", { className: T("flex justify-center", r), children: /* @__PURE__ */ e(
1154
+ "div",
1155
+ {
1156
+ className: T(
1157
+ "w-0.5 h-8",
1158
+ a && "bg-success",
1159
+ i && "bg-primary",
1160
+ !a && !i && "bg-border",
1161
+ t === "skipped" && "border-l border-dashed border-muted-foreground bg-transparent"
1162
+ )
1163
+ }
1164
+ ) });
1165
+ }
1166
+ const At = {
1167
+ default: "text-primary",
1168
+ gold: "text-palette-3",
1169
+ silver: "text-muted-foreground",
1170
+ bronze: "text-palette-3/70"
1171
+ };
1172
+ function ve({
1173
+ milestone: t,
1174
+ className: r
1175
+ }) {
1176
+ const a = t.variant ?? "default";
1177
+ return /* @__PURE__ */ s(
1178
+ "div",
1179
+ {
1180
+ className: T(
1181
+ "flex items-center gap-3 py-2 px-4",
1182
+ !t.reached && "opacity-50",
1183
+ r
1184
+ ),
1185
+ children: [
1186
+ /* @__PURE__ */ e("div", { className: "flex-1 h-px bg-border" }),
1187
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
1188
+ t.reached ? /* @__PURE__ */ e(ot, { size: 16, className: At[a] }) : /* @__PURE__ */ e(we, { size: 14, className: "text-muted-foreground" }),
1189
+ /* @__PURE__ */ e(
1190
+ "span",
1191
+ {
1192
+ className: T(
1193
+ "text-xs font-semibold whitespace-nowrap",
1194
+ t.reached ? "text-foreground" : "text-muted-foreground"
1195
+ ),
1196
+ children: t.title
1197
+ }
1198
+ )
1199
+ ] }),
1200
+ /* @__PURE__ */ e("div", { className: "flex-1 h-px bg-border" })
1201
+ ]
1202
+ }
1203
+ );
1204
+ }
1205
+ const Tt = ce(function({ skill: r, onClick: a, className: i }) {
1206
+ const l = r.targetProficiency ?? 100;
1207
+ return /* @__PURE__ */ s(Y, { children: [
1208
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ s(
1209
+ "button",
1210
+ {
1211
+ type: "button",
1212
+ onClick: a ? () => a(r.uid) : void 0,
1213
+ disabled: !a,
1214
+ className: T(
1215
+ "flex items-center gap-2 min-w-0 text-left",
1216
+ a && "cursor-pointer hover:opacity-80",
1217
+ !a && "cursor-default",
1218
+ i
1219
+ ),
1220
+ children: [
1221
+ /* @__PURE__ */ e("span", { className: "text-xs font-medium text-foreground whitespace-nowrap truncate min-w-16", children: r.name }),
1222
+ /* @__PURE__ */ e(
1223
+ _e,
1224
+ {
1225
+ value: r.proficiency,
1226
+ max: l,
1227
+ size: "sm",
1228
+ className: "flex-1 min-w-20"
1229
+ }
1230
+ ),
1231
+ /* @__PURE__ */ s("span", { className: "text-xs tabular-nums text-muted-foreground whitespace-nowrap", children: [
1232
+ r.proficiency,
1233
+ "%"
1234
+ ] })
1235
+ ]
1236
+ }
1237
+ ) }),
1238
+ /* @__PURE__ */ s(X, { children: [
1239
+ r.name,
1240
+ ": ",
1241
+ r.proficiency,
1242
+ "%",
1243
+ l < 100 ? ` / ${l}% target` : ""
1244
+ ] })
1245
+ ] });
1246
+ }), xe = {
1247
+ beginner: { label: "Beginner", variant: "success" },
1248
+ intermediate: { label: "Intermediate", variant: "warning" },
1249
+ advanced: { label: "Advanced", variant: "destructive" }
1250
+ };
1251
+ function It({
1252
+ title: t,
1253
+ description: r,
1254
+ difficulty: a,
1255
+ nodes: i = [],
1256
+ progress: l,
1257
+ skills: C,
1258
+ milestones: x,
1259
+ onNodeClick: p,
1260
+ onNodeStart: h,
1261
+ onSkillClick: N,
1262
+ readOnly: I = !1,
1263
+ isLoading: m,
1264
+ error: c,
1265
+ onRetry: d,
1266
+ className: y,
1267
+ style: v
1268
+ }) {
1269
+ const D = O(() => {
1270
+ const S = /* @__PURE__ */ new Map();
1271
+ if (x)
1272
+ for (const g of x)
1273
+ S.set(g.afterNodeIndex, g);
1274
+ return S;
1275
+ }, [x]), w = Array.isArray(i) ? i : [], L = Array.isArray(C) ? C : [];
1276
+ return /* @__PURE__ */ e(
1277
+ ne,
1278
+ {
1279
+ isLoading: m,
1280
+ error: c,
1281
+ onRetry: d,
1282
+ className: y,
1283
+ style: v,
1284
+ skeleton: /* @__PURE__ */ s($, { children: [
1285
+ /* @__PURE__ */ e(R, { className: "h-8 w-64" }),
1286
+ /* @__PURE__ */ e(R, { className: "h-4 w-96 mt-2" }),
1287
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3 mt-6", children: Array.from({ length: 4 }, (S, g) => /* @__PURE__ */ e(R, { className: "h-28" }, g)) }),
1288
+ /* @__PURE__ */ e("div", { className: "mt-8 space-y-3", children: Array.from({ length: 5 }, (S, g) => /* @__PURE__ */ e(R, { className: "h-20" }, g)) })
1289
+ ] }),
1290
+ children: /* @__PURE__ */ s("div", { className: y, style: v, children: [
1291
+ /* @__PURE__ */ s("div", { className: "flex items-start justify-between gap-4 flex-wrap", children: [
1292
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-4", children: [
1293
+ /* @__PURE__ */ e(
1294
+ Me,
1295
+ {
1296
+ value: l.completionPercentage,
1297
+ size: 64,
1298
+ strokeWidth: 5,
1299
+ className: "shrink-0 text-primary"
1300
+ }
1301
+ ),
1302
+ /* @__PURE__ */ s("div", { children: [
1303
+ /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: t }),
1304
+ r && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mt-0.5", children: r })
1305
+ ] })
1306
+ ] }),
1307
+ a && /* @__PURE__ */ e(ae, { variant: xe[a].variant, children: xe[a].label })
1308
+ ] }),
1309
+ /* @__PURE__ */ s("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3 mt-6", children: [
1310
+ /* @__PURE__ */ e(
1311
+ H,
1312
+ {
1313
+ icon: /* @__PURE__ */ e(mt, {}),
1314
+ label: "Progress",
1315
+ value: `${Math.round(l.completionPercentage)}%`,
1316
+ subtitle: "of path completed",
1317
+ accent: "var(--primary)"
1318
+ }
1319
+ ),
1320
+ /* @__PURE__ */ e(
1321
+ H,
1322
+ {
1323
+ icon: /* @__PURE__ */ e(ut, {}),
1324
+ label: "Completed",
1325
+ value: `${l.completedNodes}/${l.totalNodes}`,
1326
+ subtitle: "activities",
1327
+ accent: "var(--success)"
1328
+ }
1329
+ ),
1330
+ /* @__PURE__ */ e(
1331
+ H,
1332
+ {
1333
+ icon: /* @__PURE__ */ e(Ce, {}),
1334
+ label: "Time Spent",
1335
+ value: ye(l.totalTimeSpent),
1336
+ subtitle: "total",
1337
+ accent: "var(--info)"
1338
+ }
1339
+ ),
1340
+ l.averageScore != null ? /* @__PURE__ */ e(
1341
+ H,
1342
+ {
1343
+ icon: /* @__PURE__ */ e(pe, {}),
1344
+ label: "Avg Score",
1345
+ value: `${Math.round(l.averageScore)}%`,
1346
+ subtitle: "across activities",
1347
+ accent: "var(--warning)"
1348
+ }
1349
+ ) : l.currentStreak != null ? /* @__PURE__ */ e(
1350
+ H,
1351
+ {
1352
+ icon: /* @__PURE__ */ e(pt, {}),
1353
+ label: "Streak",
1354
+ value: `${l.currentStreak}`,
1355
+ subtitle: "days",
1356
+ accent: "var(--warning)"
1357
+ }
1358
+ ) : /* @__PURE__ */ e(
1359
+ H,
1360
+ {
1361
+ icon: /* @__PURE__ */ e(pe, {}),
1362
+ label: "Remaining",
1363
+ value: `${l.totalNodes - l.completedNodes}`,
1364
+ subtitle: "activities left",
1365
+ accent: "var(--warning)"
1366
+ }
1367
+ )
1368
+ ] }),
1369
+ L.length > 0 && /* @__PURE__ */ s($, { children: [
1370
+ /* @__PURE__ */ e(ee, { className: "my-5" }),
1371
+ /* @__PURE__ */ s("div", { children: [
1372
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-foreground mb-3", children: "Skills" }),
1373
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-2", children: L.map((S) => /* @__PURE__ */ e(
1374
+ Tt,
1375
+ {
1376
+ skill: S,
1377
+ onClick: N
1378
+ },
1379
+ S.uid
1380
+ )) })
1381
+ ] })
1382
+ ] }),
1383
+ /* @__PURE__ */ e(ee, { className: "my-5" }),
1384
+ /* @__PURE__ */ s(
1385
+ "div",
1386
+ {
1387
+ className: "relative",
1388
+ role: "list",
1389
+ "aria-label": `Learning path: ${l.completedNodes} of ${l.totalNodes} completed`,
1390
+ children: [
1391
+ w.map((S, g) => /* @__PURE__ */ s("div", { role: "listitem", children: [
1392
+ g > 0 && /* @__PURE__ */ e(ge, { fromStatus: w[g - 1].status }),
1393
+ D.has(g - 1) && /* @__PURE__ */ e(
1394
+ ve,
1395
+ {
1396
+ milestone: D.get(g - 1),
1397
+ className: "my-1"
1398
+ }
1399
+ ),
1400
+ /* @__PURE__ */ e(
1401
+ zt,
1402
+ {
1403
+ node: S,
1404
+ onClick: p,
1405
+ onStart: h,
1406
+ readOnly: I
1407
+ }
1408
+ )
1409
+ ] }, S.uid)),
1410
+ w.length > 0 && D.has(w.length - 1) && /* @__PURE__ */ s($, { children: [
1411
+ /* @__PURE__ */ e(ge, { fromStatus: w[w.length - 1].status }),
1412
+ /* @__PURE__ */ e(
1413
+ ve,
1414
+ {
1415
+ milestone: D.get(w.length - 1),
1416
+ className: "my-1"
1417
+ }
1418
+ )
1419
+ ] })
1420
+ ]
1421
+ }
1422
+ )
1423
+ ] })
1424
+ }
1425
+ );
1426
+ }
1427
+ const Ft = be(
1428
+ It,
1429
+ "AdaptiveLearningPath"
1430
+ );
340
1431
  export {
341
- Se as AnnouncementFeed,
342
- Ae as AssessmentReview,
343
- Te as AssignmentSubmission,
344
- Ce as CertificateViewer,
345
- ze as CourseCatalog,
346
- Le as CourseOutline,
347
- Qe as DiscussionThread,
348
- Me as EnrollmentWizard,
349
- ke as ExamSession,
350
- Ee as FlashcardStudySession,
351
- Ie as ForumBoard,
352
- je as GradebookTable,
353
- Ue as LecturePlayer,
354
- Fe as LessonPage,
355
- Be as PracticeQuiz,
356
- De as ProgressDashboard,
357
- Pe as QuizSession,
358
- Ve as RequirementsChecklist,
359
- we as ResourceLibrary,
360
- _e as RubricView,
361
- ve as ScrollableQuiz,
362
- Ge as StudentProfile,
363
- We as SurveyForm
1432
+ Ft as AdaptiveLearningPath,
1433
+ kt as AnnouncementFeed,
1434
+ Qt as AssessmentReview,
1435
+ $t as AssignmentSubmission,
1436
+ Vt as CertificateViewer,
1437
+ Mt as ContentAuthoringStudio,
1438
+ Ht as CourseCatalog,
1439
+ Ot as CourseOutline,
1440
+ Gt as DiscussionThread,
1441
+ Wt as EnrollmentWizard,
1442
+ Kt as ExamSession,
1443
+ Yt as FlashcardStudySession,
1444
+ Jt as ForumBoard,
1445
+ Xt as GradebookTable,
1446
+ Zt as LecturePlayer,
1447
+ qt as LessonPage,
1448
+ ea as PracticeQuiz,
1449
+ ta as ProgressDashboard,
1450
+ aa as QuizSession,
1451
+ ra as RequirementsChecklist,
1452
+ _t as ResourceLibrary,
1453
+ sa as RubricView,
1454
+ Rt as ScrollableQuiz,
1455
+ ia as StudentProfile,
1456
+ la as SurveyForm
364
1457
  };