@tansy/lms 0.0.0-stage → 0.1.0

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/lms.css ADDED
@@ -0,0 +1,92 @@
1
+ /* The LMS plugin's pages. Colours, fonts and widths come from the active theme's --site-* tokens, with plain fallbacks. */
2
+ .lms-main {
3
+ max-width: var(--site-size-measure, 46rem);
4
+ margin: 0 auto;
5
+ padding: var(--site-space-section, 3rem) 1rem;
6
+ color: var(--site-color-text, inherit);
7
+ font-family: var(--site-font-body, inherit);
8
+ line-height: 1.6;
9
+ min-width: 0;
10
+ }
11
+ .lms-main h1 { font-size: 2.25rem; line-height: 1.2; margin: 0 0 0.5rem; }
12
+ .lms-main h2 { margin: var(--site-space-section, 2.5rem) 0 1rem; }
13
+ .lms-main a, .lms-sidebar a { color: var(--site-color-accent, inherit); }
14
+ .lms-muted { color: var(--site-color-muted, #666); }
15
+ .lms-kicker { font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 0.5rem; color: var(--site-color-muted, #666); }
16
+ .lms-lead { font-size: 1.125rem; margin: 0 0 1rem; }
17
+ .lms-hero { margin-bottom: 1.5rem; display: grid; gap: 0.75rem; }
18
+ .lms-hero > * { margin: 0; }
19
+ .lms-cover { width: 100%; height: auto; border-radius: var(--site-radius-card, 0.5rem); margin: 0 0 1.5rem; }
20
+ .lms-avatar { width: 6rem; height: 6rem; object-fit: cover; border-radius: 999px; }
21
+ .lms-body > * + * { margin-top: var(--site-space-gap, 1.25rem); }
22
+
23
+ .lms-button {
24
+ display: inline-block; font: inherit; padding: 0.625rem 1.125rem; border-radius: 0.375rem; border: 0; text-decoration: none; cursor: pointer;
25
+ background: var(--site-color-accent, #222); color: var(--site-color-on-accent, #fff) !important;
26
+ }
27
+ .lms-button:disabled { opacity: 0.6; cursor: default; }
28
+ .lms-cta { display: grid; gap: 0.5rem; justify-items: start; margin: 1.5rem 0; }
29
+ .lms-error { color: #c53030; margin: 0; }
30
+ .lms-success { color: #2f855a; margin: 0; }
31
+ .lms-plans { display: grid; gap: 0.5rem; }
32
+ .lms-plans > p { margin: 0; }
33
+ .lms-plans ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
34
+ .lms-plans li { padding: 0.75rem 1rem; border: 1px solid var(--site-color-border, #ddd); border-radius: var(--site-radius-card, 0.5rem); }
35
+ .lms-plans .lms-cta { margin: 0.5rem 0 0; }
36
+ .lms-badge { margin-left: 0.5rem; padding: 0 0.5rem; border: 1px solid var(--site-color-border, #ddd); border-radius: 999px; font-size: 0.75rem; }
37
+ .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
38
+
39
+ .lms-progress { display: grid; gap: 0.25rem; font-size: 0.875rem; }
40
+ .lms-bar { height: 0.5rem; border-radius: 999px; background: color-mix(in srgb, var(--site-color-text, #222) 10%, transparent); overflow: hidden; }
41
+ .lms-bar > span { display: block; height: 100%; background: var(--site-color-accent, #2f855a); }
42
+
43
+ .lms-outline h3 { font-size: 1rem; margin: 1.25rem 0 0.5rem; }
44
+ .lms-outline ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.375rem; }
45
+ .lms-outline li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.375rem; }
46
+ .lms-outline li[aria-current="page"] > a, .lms-outline li[aria-current="page"] > span:not(.lms-tick) { font-weight: 600; }
47
+ .lms-tick { width: 1.25rem; flex: none; text-align: center; color: var(--site-color-muted, #666); }
48
+ .lms-done .lms-tick { color: #2f855a; }
49
+
50
+ .lms-classroom { display: grid; grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr); gap: 2rem; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
51
+ .lms-sidebar { padding: var(--site-space-section, 3rem) 0; font-size: 0.9375rem; display: grid; gap: 1rem; align-content: start; }
52
+ .lms-lesson { margin: 0; padding-left: 0; padding-right: 0; }
53
+ @media (max-width: 760px) {
54
+ .lms-classroom { grid-template-columns: minmax(0, 1fr); gap: 0; }
55
+ .lms-sidebar { order: 2; padding-top: 0; border-top: 1px solid var(--site-color-border, #e5e5e5); }
56
+ }
57
+ .lms-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--site-color-border, #e5e5e5); }
58
+
59
+ .lms-figure { margin: 0; }
60
+ .lms-video { width: 100%; border-radius: var(--site-radius-card, 0.5rem); }
61
+ .lms-embed { position: relative; aspect-ratio: 16 / 9; }
62
+ .lms-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--site-radius-card, 0.5rem); }
63
+
64
+ .lms-quiz { padding: 1.25rem; border: 1px solid var(--site-color-border, #ddd); border-radius: var(--site-radius-card, 0.5rem); display: grid; gap: 0.75rem; }
65
+ .lms-quiz h2 { margin: 0; font-size: 1.25rem; }
66
+ .lms-quiz p { margin: 0; }
67
+ .lms-questions { padding-left: 1.25rem; display: grid; gap: 1rem; margin: 0 0 1rem; }
68
+ .lms-questions fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.375rem; }
69
+ .lms-questions legend { font-weight: 600; margin-bottom: 0.25rem; }
70
+ .lms-choice { display: flex; gap: 0.5rem; align-items: baseline; }
71
+ .lms-questions input:not([type]), .lms-form input { font: inherit; padding: 0.5rem; border: 1px solid var(--site-color-border, #ccc); border-radius: 0.375rem; background: transparent; color: inherit; max-width: 100%; }
72
+
73
+ .lms-cards { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; }
74
+ .lms-card { padding: 1.25rem; border: 1px solid var(--site-color-border, #e5e5e5); border-radius: var(--site-radius-card, 0.5rem); display: grid; gap: 0.5rem; }
75
+ .lms-card > * { margin: 0; }
76
+ .lms-card h2, .lms-card h3 { margin: 0; font-size: 1.25rem; }
77
+ .lms-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 1rem 0; }
78
+ .lms-form label { width: 100%; }
79
+ .lms-download a::before { content: "↓ "; }
80
+
81
+ /* The editor's canvas: the parts of a block shown only while it's edited. */
82
+ .lms-editor-placeholder { display: grid; gap: 0.5rem; padding: 1rem; border: 1px dashed var(--site-color-border, #ccc); border-radius: var(--site-radius-card, 0.5rem); }
83
+ .lms-editor-placeholder p { margin: 0; }
84
+ .lms-editor-note { display: grid; gap: 0.25rem; margin-top: 0.5rem; font-size: 0.875rem; color: var(--site-color-muted, #666); }
85
+ .lms-download-edit { display: flex; gap: 0.35em; align-items: baseline; }
86
+ .lms-question-edit { display: grid; gap: 0.75rem; }
87
+ .lms-question-prompt { font-weight: 600; }
88
+ .lms-choices-edit { display: grid; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
89
+ .lms-choices-edit li { display: flex; gap: 0.5rem; align-items: center; }
90
+ .lms-editor-input { flex: 1; min-width: 0; padding: 0.375rem 0.5rem; border: 1px solid var(--site-color-border, #ccc); border-radius: 0.375rem; background: transparent; color: inherit; font: inherit; }
91
+ .lms-editor-remove, .lms-editor-add { padding: 0.25rem 0.5rem; border: 0; border-radius: 0.375rem; background: transparent; color: var(--site-color-muted, #666); font: inherit; cursor: pointer; }
92
+ .lms-editor-remove:hover, .lms-editor-add:hover { color: inherit; background: color-mix(in srgb, currentColor 8%, transparent); }
package/logic.d.ts ADDED
@@ -0,0 +1,47 @@
1
+ /** Pure helpers, shared by the server half and the render module. No imports, so both can use them. */
2
+ /** Lowercase letters, digits and single hyphens, from any title. */
3
+ export declare function slugify(text: string, fallback?: string): string;
4
+ export interface QuestionBlock {
5
+ id: string;
6
+ type: string;
7
+ value: Record<string, unknown>;
8
+ }
9
+ export interface PublicQuestion {
10
+ id: string;
11
+ prompt: string;
12
+ kind: "single" | "multiple" | "short";
13
+ choices: string[];
14
+ }
15
+ export type Answer = number | number[] | string;
16
+ /** The questions of a quiz's stream, in order. Anything that isn't a question is skipped. */
17
+ export declare function questionsOf(stream: unknown): QuestionBlock[];
18
+ /** What a learner may see of a question: never its answer or explanation. Built field by field, so a field added later stays out. */
19
+ export declare function publicQuestion(block: QuestionBlock): PublicQuestion;
20
+ /** Whether one answer is right. A question with no usable answer key counts as wrong, so a mistake in it never gives marks away. */
21
+ export declare function isCorrect(block: QuestionBlock, answer: unknown): boolean;
22
+ /** A whole-number percentage. A quiz with no questions can't be passed. */
23
+ export declare function grade(questions: QuestionBlock[], answers: Record<string, unknown>): {
24
+ score: number;
25
+ correct: number;
26
+ total: number;
27
+ };
28
+ export declare const CERTIFICATE_CODE: RegExp;
29
+ /** 16 characters from 80 random bits. `random` returns that many random bytes. */
30
+ export declare function certificateCode(random: (size: number) => Uint8Array): string;
31
+ /** As typed: spaces, hyphens and lowercase are forgiven. */
32
+ export declare const normalizeCode: (text: string) => string;
33
+ /** Lessons in reading order: by their section's position, then their own. Lessons outside a section come first. */
34
+ export declare function orderLessons<T extends {
35
+ id: number;
36
+ section?: unknown;
37
+ position?: unknown;
38
+ }>(lessons: T[], sections: Array<{
39
+ id: number;
40
+ position?: unknown;
41
+ }>): T[];
42
+ /** Whole-number percent of lessons done. */
43
+ export declare const percentDone: (done: number, total: number) => number;
44
+ /** A privacy-friendly embed address for a YouTube or Vimeo link over https, or null for anything else. */
45
+ export declare function embedUrl(url: string): string | null;
46
+ /** A price in the page's language, such as "$49.00". An unknown currency shows its code. */
47
+ export declare const money: (amount: number, currency: string, locale: string) => string;
package/logic.js ADDED
@@ -0,0 +1,115 @@
1
+ /** Pure helpers, shared by the server half and the render module. No imports, so both can use them. */
2
+ /** Lowercase letters, digits and single hyphens, from any title. */
3
+ export function slugify(text, fallback = "lesson") {
4
+ const slug = text.normalize("NFKD").replace(/[̀-ͯ]/g, "").toLowerCase()
5
+ .replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80).replace(/-+$/, "");
6
+ return slug || fallback;
7
+ }
8
+ const KINDS = new Set(["single", "multiple", "short"]);
9
+ const kindOf = (value) => (typeof value === "string" && KINDS.has(value) ? value : "single");
10
+ const choicesOf = (value) => (Array.isArray(value) ? value.filter((choice) => typeof choice === "string").slice(0, 50) : []);
11
+ /** The questions of a quiz's stream, in order. Anything that isn't a question is skipped. */
12
+ export function questionsOf(stream) {
13
+ if (!Array.isArray(stream))
14
+ return [];
15
+ return stream.filter((block) => !!block && typeof block === "object" && block.type === "lms_question" && typeof block.id === "string" && !!block.value && typeof block.value === "object");
16
+ }
17
+ /** What a learner may see of a question: never its answer or explanation. Built field by field, so a field added later stays out. */
18
+ export function publicQuestion(block) {
19
+ const kind = kindOf(block.value.kind);
20
+ return { id: block.id, prompt: typeof block.value.prompt === "string" ? block.value.prompt : "", kind, choices: kind === "short" ? [] : choicesOf(block.value.choices) };
21
+ }
22
+ const normalize = (text) => text.normalize("NFKC").trim().replace(/\s+/g, " ").toLowerCase();
23
+ const indexes = (value) => (Array.isArray(value) ? value : [value]).filter((item) => Number.isSafeInteger(item));
24
+ /** Whether one answer is right. A question with no usable answer key counts as wrong, so a mistake in it never gives marks away. */
25
+ export function isCorrect(block, answer) {
26
+ const kind = kindOf(block.value.kind);
27
+ const correct = block.value.correct;
28
+ if (kind === "short") {
29
+ const accepted = (Array.isArray(correct) ? correct : [correct]).filter((item) => typeof item === "string" && item.trim() !== "").map(normalize);
30
+ return typeof answer === "string" && accepted.includes(normalize(answer));
31
+ }
32
+ const key = [...new Set(indexes(correct))].sort((a, b) => a - b);
33
+ if (!key.length)
34
+ return false;
35
+ if (kind === "single")
36
+ return key.length === 1 && typeof answer === "number" && answer === key[0];
37
+ if (!Array.isArray(answer) || !answer.every((item) => Number.isSafeInteger(item)))
38
+ return false;
39
+ const given = [...new Set(answer)].sort((a, b) => a - b);
40
+ return given.length === key.length && given.every((item, i) => item === key[i]);
41
+ }
42
+ /** A whole-number percentage. A quiz with no questions can't be passed. */
43
+ export function grade(questions, answers) {
44
+ if (!questions.length)
45
+ return { score: 0, correct: 0, total: 0 };
46
+ const correct = questions.filter((question) => Object.hasOwn(answers, question.id) && isCorrect(question, answers[question.id])).length;
47
+ return { score: Math.round((correct / questions.length) * 100), correct, total: questions.length };
48
+ }
49
+ /** Crockford's base32 without the letters people misread, so a code read aloud or typed by hand still matches. */
50
+ const CODE_ALPHABET = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
51
+ export const CERTIFICATE_CODE = /^[0-9A-HJKMNP-TV-Z]{16}$/;
52
+ /** 16 characters from 80 random bits. `random` returns that many random bytes. */
53
+ export function certificateCode(random) {
54
+ const bytes = random(10);
55
+ let bits = 0;
56
+ let value = 0;
57
+ let code = "";
58
+ for (const byte of bytes) {
59
+ value = (value << 8) | byte;
60
+ bits += 8;
61
+ while (bits >= 5) {
62
+ code += CODE_ALPHABET[(value >>> (bits - 5)) & 31];
63
+ bits -= 5;
64
+ }
65
+ }
66
+ return code;
67
+ }
68
+ /** As typed: spaces, hyphens and lowercase are forgiven. */
69
+ export const normalizeCode = (text) => text.toUpperCase().replace(/[\s-]/g, "").replace(/O/g, "0").replace(/[IL]/g, "1");
70
+ /** Lessons in reading order: by their section's position, then their own. Lessons outside a section come first. */
71
+ export function orderLessons(lessons, sections) {
72
+ const sectionOrder = new Map(sections.map((section) => [section.id, typeof section.position === "number" ? section.position : Number.MAX_SAFE_INTEGER]));
73
+ const rank = (lesson) => (typeof lesson.section === "number" ? sectionOrder.get(lesson.section) ?? Number.MAX_SAFE_INTEGER : -1);
74
+ const own = (lesson) => (typeof lesson.position === "number" ? lesson.position : Number.MAX_SAFE_INTEGER);
75
+ return [...lessons].sort((a, b) => rank(a) - rank(b) || (typeof a.section === "number" && typeof b.section === "number" ? a.section - b.section : 0) || own(a) - own(b) || a.id - b.id);
76
+ }
77
+ /** Whole-number percent of lessons done. */
78
+ export const percentDone = (done, total) => (total > 0 ? Math.min(100, Math.round((done / total) * 100)) : 0);
79
+ /** A privacy-friendly embed address for a YouTube or Vimeo link over https, or null for anything else. */
80
+ export function embedUrl(url) {
81
+ let parsed;
82
+ try {
83
+ parsed = new URL(url);
84
+ }
85
+ catch {
86
+ return null;
87
+ }
88
+ if (parsed.protocol !== "https:")
89
+ return null;
90
+ const host = parsed.hostname.replace(/^www\./, "");
91
+ const id = (value, pattern) => (value && pattern.test(value) ? value : null);
92
+ const youtube = /^[A-Za-z0-9_-]{6,20}$/;
93
+ let video = null;
94
+ if (host === "youtube.com" || host === "m.youtube.com")
95
+ video = id(parsed.pathname === "/watch" ? parsed.searchParams.get("v") : parsed.pathname.match(/^\/(?:embed|shorts)\/([^/]+)/)?.[1], youtube);
96
+ else if (host === "youtu.be")
97
+ video = id(parsed.pathname.slice(1), youtube);
98
+ if (video)
99
+ return `https://www.youtube-nocookie.com/embed/${video}`;
100
+ if (host === "vimeo.com") {
101
+ const vimeo = id(parsed.pathname.slice(1), /^\d{1,12}$/);
102
+ if (vimeo)
103
+ return `https://player.vimeo.com/video/${vimeo}`;
104
+ }
105
+ return null;
106
+ }
107
+ /** A price in the page's language, such as "$49.00". An unknown currency shows its code. */
108
+ export const money = (amount, currency, locale) => {
109
+ try {
110
+ return new Intl.NumberFormat(locale, { style: "currency", currency: currency.toUpperCase() }).format(amount);
111
+ }
112
+ catch {
113
+ return `${amount} ${currency.toUpperCase()}`;
114
+ }
115
+ };
package/messages.d.ts ADDED
@@ -0,0 +1,364 @@
1
+ import type { FieldLabels } from "tansy/plugin";
2
+ /** The LMS's dashboard words, read as `t("ext.lms.<key>")`, and its collections' names. */
3
+ export declare const messages: {
4
+ en: {
5
+ section: string;
6
+ pages: {
7
+ "lms/courses": string;
8
+ "lms/courses/:id": string;
9
+ "lms/learners": string;
10
+ };
11
+ collections: {
12
+ "lms-my-courses": string;
13
+ "lms-certificate": string;
14
+ };
15
+ widgets: {
16
+ "lms-overview": string;
17
+ };
18
+ actions: {
19
+ "lms-enroll": string;
20
+ };
21
+ categories: {
22
+ Lesson: string;
23
+ };
24
+ settings: {
25
+ passingScore: {
26
+ label: string;
27
+ description: string;
28
+ };
29
+ requireQuizzes: {
30
+ label: string;
31
+ description: string;
32
+ };
33
+ certificates: {
34
+ label: string;
35
+ description: string;
36
+ };
37
+ };
38
+ common: {
39
+ course: string;
40
+ draft: string;
41
+ published: string;
42
+ draftBadge: string;
43
+ percent: string;
44
+ };
45
+ learners: {
46
+ cantRead: string;
47
+ intro: string;
48
+ noCourses: string;
49
+ };
50
+ columns: {
51
+ course: string;
52
+ enrolled: string;
53
+ completed: string;
54
+ completedWeek: string;
55
+ average: string;
56
+ passRate: string;
57
+ status: string;
58
+ taughtBy: string;
59
+ lessons: string;
60
+ };
61
+ courses: {
62
+ allDescription: string;
63
+ ownDescription: string;
64
+ cantList: string;
65
+ empty: string;
66
+ notFound: string;
67
+ notFoundBody: string;
68
+ back: string;
69
+ create: string;
70
+ newTitle: string;
71
+ notCreated: string;
72
+ };
73
+ widget: {
74
+ cantRead: string;
75
+ newEnrollments: string;
76
+ completed: string;
77
+ mostStarted: string;
78
+ };
79
+ builder: {
80
+ notSaved: string;
81
+ failed: string;
82
+ moveUp: string;
83
+ moveDown: string;
84
+ moveLabelUp: string;
85
+ moveLabelDown: string;
86
+ published: string;
87
+ draft: string;
88
+ wrong: string;
89
+ loading: string;
90
+ detailsSaved: string;
91
+ quizTitle: string;
92
+ quizAdded: string;
93
+ lessonTitle: string;
94
+ freePreview: string;
95
+ quiz: string;
96
+ addQuiz: string;
97
+ editContent: string;
98
+ sectionFor: string;
99
+ noSection: string;
100
+ removePreview: string;
101
+ makePreview: string;
102
+ unpublish: string;
103
+ publish: string;
104
+ confirmDeleteLesson: string;
105
+ lessonDeleted: string;
106
+ delete: string;
107
+ backToCourses: string;
108
+ counts: string;
109
+ coverAndDescription: string;
110
+ draftAgain: string;
111
+ nowPublished: string;
112
+ unpublishCourse: string;
113
+ publishCourse: string;
114
+ curriculum: string;
115
+ sectionTitle: string;
116
+ moveLessonsFirst: string;
117
+ confirmDeleteSection: string;
118
+ sectionDeleted: string;
119
+ deleteSection: string;
120
+ notInSection: string;
121
+ noLessons: string;
122
+ addLesson: string;
123
+ newLesson: string;
124
+ lessonAdded: string;
125
+ start: string;
126
+ addSection: string;
127
+ newSection: string;
128
+ sectionAdded: string;
129
+ lessonWithoutSection: string;
130
+ details: string;
131
+ title: string;
132
+ summary: string;
133
+ summaryHint: string;
134
+ whoCanEnroll: string;
135
+ accessFree: string;
136
+ accessPaid: string;
137
+ accessEnrollment: string;
138
+ price: string;
139
+ priceHint: string;
140
+ noPayments: string;
141
+ level: string;
142
+ notSet: string;
143
+ beginner: string;
144
+ intermediate: string;
145
+ advanced: string;
146
+ minutes: string;
147
+ taughtBy: string;
148
+ taughtByManager: string;
149
+ taughtByOwn: string;
150
+ saveDetails: string;
151
+ };
152
+ enroll: {
153
+ prompt: string;
154
+ failed: string;
155
+ result: string;
156
+ resultUnknown: string;
157
+ builderPanel: string;
158
+ builderLink: string;
159
+ };
160
+ editors: {
161
+ startWriting: string;
162
+ video: string;
163
+ uploadVideo: string;
164
+ orPaste: string;
165
+ videoTitle: string;
166
+ transcript: string;
167
+ addTranscript: string;
168
+ download: string;
169
+ downloadFile: string;
170
+ ask: string;
171
+ accepted: string;
172
+ choiceCorrect: string;
173
+ correct: string;
174
+ choice: string;
175
+ removeChoice: string;
176
+ addChoice: string;
177
+ explanation: string;
178
+ why: string;
179
+ };
180
+ };
181
+ ar: {
182
+ section: string;
183
+ pages: {
184
+ "lms/courses": string;
185
+ "lms/courses/:id": string;
186
+ "lms/learners": string;
187
+ };
188
+ collections: {
189
+ "lms-my-courses": string;
190
+ "lms-certificate": string;
191
+ };
192
+ widgets: {
193
+ "lms-overview": string;
194
+ };
195
+ actions: {
196
+ "lms-enroll": string;
197
+ };
198
+ categories: {
199
+ Lesson: string;
200
+ };
201
+ settings: {
202
+ passingScore: {
203
+ label: string;
204
+ description: string;
205
+ };
206
+ requireQuizzes: {
207
+ label: string;
208
+ description: string;
209
+ };
210
+ certificates: {
211
+ label: string;
212
+ description: string;
213
+ };
214
+ };
215
+ common: {
216
+ course: string;
217
+ draft: string;
218
+ published: string;
219
+ draftBadge: string;
220
+ percent: string;
221
+ };
222
+ learners: {
223
+ cantRead: string;
224
+ intro: string;
225
+ noCourses: string;
226
+ };
227
+ columns: {
228
+ course: string;
229
+ enrolled: string;
230
+ completed: string;
231
+ completedWeek: string;
232
+ average: string;
233
+ passRate: string;
234
+ status: string;
235
+ taughtBy: string;
236
+ lessons: string;
237
+ };
238
+ courses: {
239
+ allDescription: string;
240
+ ownDescription: string;
241
+ cantList: string;
242
+ empty: string;
243
+ notFound: string;
244
+ notFoundBody: string;
245
+ back: string;
246
+ create: string;
247
+ newTitle: string;
248
+ notCreated: string;
249
+ };
250
+ widget: {
251
+ cantRead: string;
252
+ newEnrollments: string;
253
+ completed: string;
254
+ mostStarted: string;
255
+ };
256
+ builder: {
257
+ notSaved: string;
258
+ failed: string;
259
+ moveUp: string;
260
+ moveDown: string;
261
+ moveLabelUp: string;
262
+ moveLabelDown: string;
263
+ published: string;
264
+ draft: string;
265
+ wrong: string;
266
+ loading: string;
267
+ detailsSaved: string;
268
+ quizTitle: string;
269
+ quizAdded: string;
270
+ lessonTitle: string;
271
+ freePreview: string;
272
+ quiz: string;
273
+ addQuiz: string;
274
+ editContent: string;
275
+ sectionFor: string;
276
+ noSection: string;
277
+ removePreview: string;
278
+ makePreview: string;
279
+ unpublish: string;
280
+ publish: string;
281
+ confirmDeleteLesson: string;
282
+ lessonDeleted: string;
283
+ delete: string;
284
+ backToCourses: string;
285
+ counts: string;
286
+ coverAndDescription: string;
287
+ draftAgain: string;
288
+ nowPublished: string;
289
+ unpublishCourse: string;
290
+ publishCourse: string;
291
+ curriculum: string;
292
+ sectionTitle: string;
293
+ moveLessonsFirst: string;
294
+ confirmDeleteSection: string;
295
+ sectionDeleted: string;
296
+ deleteSection: string;
297
+ notInSection: string;
298
+ noLessons: string;
299
+ addLesson: string;
300
+ newLesson: string;
301
+ lessonAdded: string;
302
+ start: string;
303
+ addSection: string;
304
+ newSection: string;
305
+ sectionAdded: string;
306
+ lessonWithoutSection: string;
307
+ details: string;
308
+ title: string;
309
+ summary: string;
310
+ summaryHint: string;
311
+ whoCanEnroll: string;
312
+ accessFree: string;
313
+ accessPaid: string;
314
+ accessEnrollment: string;
315
+ price: string;
316
+ priceHint: string;
317
+ noPayments: string;
318
+ level: string;
319
+ notSet: string;
320
+ beginner: string;
321
+ intermediate: string;
322
+ advanced: string;
323
+ minutes: string;
324
+ taughtBy: string;
325
+ taughtByManager: string;
326
+ taughtByOwn: string;
327
+ saveDetails: string;
328
+ };
329
+ enroll: {
330
+ prompt: string;
331
+ failed: string;
332
+ result: string;
333
+ resultUnknown: string;
334
+ builderPanel: string;
335
+ builderLink: string;
336
+ };
337
+ editors: {
338
+ startWriting: string;
339
+ video: string;
340
+ uploadVideo: string;
341
+ orPaste: string;
342
+ videoTitle: string;
343
+ transcript: string;
344
+ addTranscript: string;
345
+ download: string;
346
+ downloadFile: string;
347
+ ask: string;
348
+ accepted: string;
349
+ choiceCorrect: string;
350
+ correct: string;
351
+ choice: string;
352
+ removeChoice: string;
353
+ addChoice: string;
354
+ explanation: string;
355
+ why: string;
356
+ };
357
+ };
358
+ };
359
+ /** The collections' names in other interface languages. Added by a migration, so names an owner set stay. */
360
+ export declare const COLLECTION_LABELS: Record<string, Record<string, string>>;
361
+ /** Fields' words in other interface languages, by collection. Added by a migration, so words an owner set stay. */
362
+ export declare const FIELD_LABELS: Record<string, Record<string, FieldLabels>>;
363
+ /** The same for the blocks the plugin's schema makes, by block. */
364
+ export declare const BLOCK_FIELD_LABELS: Record<string, Record<string, FieldLabels>>;