lens-content-processor 0.4.0 → 0.6.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/dist/bundler/video.d.ts +12 -6
- package/dist/bundler/video.js +57 -34
- package/dist/bundler/video.js.map +1 -1
- package/dist/cli.d.ts +11 -2
- package/dist/cli.js +36 -19
- package/dist/cli.js.map +1 -1
- package/dist/content-schema.js +71 -16
- package/dist/content-schema.js.map +1 -1
- package/dist/dedupe-errors.d.ts +14 -0
- package/dist/dedupe-errors.js +33 -0
- package/dist/dedupe-errors.js.map +1 -0
- package/dist/flattener/index.d.ts +3 -28
- package/dist/flattener/index.js +507 -745
- package/dist/flattener/index.js.map +1 -1
- package/dist/flattener/resolve-text-links.d.ts +25 -0
- package/dist/flattener/resolve-text-links.js +248 -0
- package/dist/flattener/resolve-text-links.js.map +1 -0
- package/dist/flattener/test-helpers.d.ts +1 -1
- package/dist/flattener/test-helpers.js +1 -3
- package/dist/flattener/test-helpers.js.map +1 -1
- package/dist/index.d.ts +53 -21
- package/dist/index.js +285 -140
- package/dist/index.js.map +1 -1
- package/dist/parser/article.d.ts +2 -1
- package/dist/parser/article.js +75 -14
- package/dist/parser/article.js.map +1 -1
- package/dist/parser/course.d.ts +1 -1
- package/dist/parser/course.js +79 -22
- package/dist/parser/course.js.map +1 -1
- package/dist/parser/frontmatter.d.ts +1 -1
- package/dist/parser/frontmatter.js +38 -12
- package/dist/parser/frontmatter.js.map +1 -1
- package/dist/parser/learning-outcome.d.ts +5 -2
- package/dist/parser/learning-outcome.js +75 -37
- package/dist/parser/learning-outcome.js.map +1 -1
- package/dist/parser/lens.d.ts +40 -41
- package/dist/parser/lens.js +365 -349
- package/dist/parser/lens.js.map +1 -1
- package/dist/parser/module.d.ts +7 -15
- package/dist/parser/module.js +135 -171
- package/dist/parser/module.js.map +1 -1
- package/dist/parser/sections.d.ts +12 -1
- package/dist/parser/sections.js +74 -95
- package/dist/parser/sections.js.map +1 -1
- package/dist/parser/video-transcript.d.ts +2 -1
- package/dist/parser/video-transcript.js +8 -7
- package/dist/parser/video-transcript.js.map +1 -1
- package/dist/reference-graph.d.ts +8 -0
- package/dist/reference-graph.js +105 -0
- package/dist/reference-graph.js.map +1 -0
- package/dist/validator/card-module-membership.d.ts +2 -0
- package/dist/validator/card-module-membership.js +80 -0
- package/dist/validator/card-module-membership.js.map +1 -0
- package/dist/validator/output-integrity.js +5 -5
- package/dist/validator/output-integrity.js.map +1 -1
- package/dist/validator/segment-fields.d.ts +1 -1
- package/dist/validator/segment-fields.js +2 -2
- package/dist/validator/segment-fields.js.map +1 -1
- package/dist/validator/test-segments.d.ts +12 -0
- package/dist/validator/test-segments.js +40 -0
- package/dist/validator/test-segments.js.map +1 -0
- package/dist/validator/url-reachability.d.ts +2 -1
- package/dist/validator/url-reachability.js +40 -20
- package/dist/validator/url-reachability.js.map +1 -1
- package/package.json +1 -1
- package/dist/validator/chat-precedence.d.ts +0 -9
- package/dist/validator/chat-precedence.js +0 -32
- package/dist/validator/chat-precedence.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export interface UrlToValidate {
|
|
|
3
3
|
file: string;
|
|
4
4
|
line: number;
|
|
5
5
|
label: string;
|
|
6
|
+
allowUnreachable?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export interface ProcessResult {
|
|
8
9
|
modules: FlattenedModule[];
|
|
@@ -15,40 +16,57 @@ export interface FlattenedModule {
|
|
|
15
16
|
title: string;
|
|
16
17
|
contentId: string | null;
|
|
17
18
|
sections: Section[];
|
|
19
|
+
sourcePath?: string;
|
|
18
20
|
parentSlug?: string;
|
|
19
21
|
parentTitle?: string;
|
|
20
22
|
error?: string;
|
|
21
23
|
warnings?: string[];
|
|
24
|
+
addToAiContext?: string[] | null;
|
|
25
|
+
}
|
|
26
|
+
/** Light co-branding for a partnership/demo course (e.g. the Iliad demo). */
|
|
27
|
+
export interface CoursePartner {
|
|
28
|
+
/** Display name of the partner org, e.g. "Iliad". Used as alt/aria text. */
|
|
29
|
+
name: string;
|
|
30
|
+
/** Big lockup logo: bare filename served from /assets/partners/, or an absolute URL/path. */
|
|
31
|
+
logo: string;
|
|
32
|
+
/** Optional small/square mark for narrow (mobile) headers; falls back to logo. */
|
|
33
|
+
logoSmall?: string;
|
|
34
|
+
/** Optional click-through URL — the logo links here when set. */
|
|
35
|
+
url?: string;
|
|
22
36
|
}
|
|
23
37
|
export interface Course {
|
|
24
38
|
slug: string;
|
|
25
39
|
title: string;
|
|
40
|
+
slugAliases?: string[];
|
|
41
|
+
/** Present only when both partner-name and partner-logo are set in frontmatter. */
|
|
42
|
+
partner?: CoursePartner;
|
|
26
43
|
progression: ProgressionItem[];
|
|
27
44
|
error?: string;
|
|
28
45
|
}
|
|
29
46
|
export interface Section {
|
|
30
|
-
type:
|
|
47
|
+
type: "lens" | "test";
|
|
48
|
+
displayType?: "lens-article" | "lens-video" | "lens-mixed";
|
|
31
49
|
meta: SectionMeta;
|
|
32
50
|
segments: Segment[];
|
|
51
|
+
sourcePath?: string;
|
|
33
52
|
optional?: boolean;
|
|
53
|
+
hide?: boolean;
|
|
34
54
|
feedback?: boolean;
|
|
35
55
|
contentId: string | null;
|
|
36
56
|
learningOutcomeId: string | null;
|
|
37
57
|
learningOutcomeName: string | null;
|
|
38
|
-
videoId: string | null;
|
|
39
58
|
wordCount?: number;
|
|
40
59
|
videoDurationSeconds?: number;
|
|
41
60
|
tldr?: string;
|
|
61
|
+
summaryForTutor?: string;
|
|
62
|
+
addToAiContext?: string[] | null;
|
|
63
|
+
addToAiContextLo?: string[] | null;
|
|
42
64
|
}
|
|
43
65
|
export interface SectionMeta {
|
|
44
66
|
title?: string;
|
|
45
|
-
author?: string;
|
|
46
|
-
sourceUrl?: string;
|
|
47
|
-
published?: string;
|
|
48
|
-
channel?: string;
|
|
49
67
|
}
|
|
50
68
|
export interface ProgressionItem {
|
|
51
|
-
type:
|
|
69
|
+
type: "module" | "meeting";
|
|
52
70
|
slug?: string;
|
|
53
71
|
path?: string;
|
|
54
72
|
name?: string;
|
|
@@ -59,37 +77,47 @@ export interface ContentError {
|
|
|
59
77
|
line?: number;
|
|
60
78
|
message: string;
|
|
61
79
|
suggestion?: string;
|
|
62
|
-
severity:
|
|
63
|
-
category?:
|
|
80
|
+
severity: "error" | "warning";
|
|
81
|
+
category?: "production" | "wip";
|
|
64
82
|
}
|
|
65
83
|
export interface TextSegment {
|
|
66
|
-
type:
|
|
84
|
+
type: "text";
|
|
67
85
|
content: string;
|
|
68
86
|
optional?: boolean;
|
|
69
87
|
}
|
|
70
88
|
export interface ChatSegment {
|
|
71
|
-
type:
|
|
89
|
+
type: "chat";
|
|
72
90
|
instructions?: string;
|
|
73
91
|
hidePreviousContentFromUser?: boolean;
|
|
74
92
|
hidePreviousContentFromTutor?: boolean;
|
|
75
93
|
optional?: boolean;
|
|
94
|
+
minMessages?: number;
|
|
76
95
|
}
|
|
77
|
-
export interface
|
|
78
|
-
type:
|
|
96
|
+
export interface ArticleSegment {
|
|
97
|
+
type: "article";
|
|
79
98
|
content: string;
|
|
80
99
|
collapsed_before?: string;
|
|
81
100
|
collapsed_after?: string;
|
|
101
|
+
title?: string;
|
|
102
|
+
author?: string;
|
|
103
|
+
sourceUrl?: string;
|
|
104
|
+
published?: string;
|
|
105
|
+
sourcePath?: string;
|
|
82
106
|
optional?: boolean;
|
|
83
107
|
}
|
|
84
|
-
export interface
|
|
85
|
-
type:
|
|
108
|
+
export interface VideoSegment {
|
|
109
|
+
type: "video";
|
|
86
110
|
from: number;
|
|
87
111
|
to: number | null;
|
|
88
|
-
transcript:
|
|
112
|
+
transcript: TranscriptSentence[];
|
|
113
|
+
title?: string;
|
|
114
|
+
channel?: string;
|
|
115
|
+
videoId?: string;
|
|
116
|
+
isShort?: boolean;
|
|
89
117
|
optional?: boolean;
|
|
90
118
|
}
|
|
91
119
|
export interface QuestionSegment {
|
|
92
|
-
type:
|
|
120
|
+
type: "question";
|
|
93
121
|
content: string;
|
|
94
122
|
assessmentInstructions?: string;
|
|
95
123
|
maxTime?: string;
|
|
@@ -97,18 +125,22 @@ export interface QuestionSegment {
|
|
|
97
125
|
enforceVoice?: boolean;
|
|
98
126
|
optional?: boolean;
|
|
99
127
|
feedback?: boolean;
|
|
128
|
+
minMessages?: number;
|
|
100
129
|
}
|
|
101
130
|
export interface RoleplaySegment {
|
|
102
|
-
type:
|
|
131
|
+
type: "roleplay";
|
|
103
132
|
id: string;
|
|
104
133
|
content: string;
|
|
105
134
|
aiInstructions: string;
|
|
106
135
|
openingMessage?: string;
|
|
107
136
|
assessmentInstructions?: string;
|
|
137
|
+
userCustomizable?: boolean;
|
|
108
138
|
optional?: boolean;
|
|
109
139
|
feedback?: boolean;
|
|
110
140
|
}
|
|
111
|
-
export type Segment = TextSegment | ChatSegment |
|
|
112
|
-
|
|
113
|
-
export {
|
|
141
|
+
export type Segment = TextSegment | ChatSegment | ArticleSegment | VideoSegment | QuestionSegment | RoleplaySegment;
|
|
142
|
+
import { type TranscriptSentence } from "./bundler/video.js";
|
|
143
|
+
export type { TranscriptSentence } from "./bundler/video.js";
|
|
144
|
+
export type { ContentTier } from "./validator/tier.js";
|
|
145
|
+
export { checkTierViolation } from "./validator/tier.js";
|
|
114
146
|
export declare function processContent(files: Map<string, string>): ProcessResult;
|