@eliceio/cdk-cli 1.7.1 → 1.8.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/README.md +18 -15
- package/es/commands/create/index.js +6 -3
- package/es/commands/create/scaffold.d.ts +1 -1
- package/es/commands/create/scaffold.js +1 -1
- package/es/commands/doctor/index.js +34 -1
- package/es/core/lesson-check.d.ts +7 -0
- package/es/core/lesson-check.js +87 -0
- package/es/core/templates.d.ts +2 -0
- package/es/core/templates.js +4 -1
- package/es/dev/host-page.js +5 -2
- package/es/dev/learner-files.d.ts +1 -1
- package/es/dev/learner-files.js +7 -4
- package/es/dev/learner-shares.d.ts +90 -0
- package/es/dev/learner-shares.js +282 -0
- package/es/dev/mock-api.d.ts +28 -0
- package/es/dev/mock-api.js +32 -1
- package/es/dev/server.d.ts +3 -0
- package/es/dev/server.js +22 -1
- package/package.json +2 -2
- package/skills/_shared/always.md +1 -1
- package/skills/_shared/references/02-design-the-material.md +10 -9
- package/skills/_shared/references/03-create-the-project.md +12 -11
- package/skills/_shared/references/05-screen-code.md +1 -0
- package/skills/_shared/references/08-fix-check-errors.md +1 -0
- package/skills/_shared/references/12-upload-with-the-material-mcp.md +2 -2
- package/skills/_shared/references/17-using-the-entry-template.md +44 -5
- package/skills/_shared/references/18-using-the-lesson-template.md +207 -0
- package/skills/_shared/references/19-lesson-layouts.md +2132 -0
- package/skills/elice-content-create/SKILL.md +4 -3
- package/skills/elice-content-publish/SKILL.md +3 -3
- package/templates/_shared/lib/cdk-mock.d.ts +16 -0
- package/templates/_shared/lib/cdk-mock.js +49 -0
- package/templates/blank/template.json +1 -1
- package/templates/board/README.md +15 -7
- package/templates/board/core/board.d.ts +13 -0
- package/templates/board/core/board.js +11 -1
- package/templates/board/core/files.d.ts +40 -0
- package/templates/board/core/files.js +176 -0
- package/templates/board/core/model.d.ts +5 -0
- package/templates/board/core/model.js +24 -7
- package/templates/board/core/settings.d.ts +2 -0
- package/templates/board/core/settings.js +12 -1
- package/templates/board/package.json +1 -1
- package/templates/board/screens/board.js +58 -0
- package/templates/board/screens/edit.js +36 -1
- package/templates/board/template.json +1 -1
- package/templates/board/ui/board.css +176 -0
- package/templates/board/ui/card.js +74 -1
- package/templates/board/ui/composer.js +169 -20
- package/templates/board/ui/icons.js +2 -0
- package/templates/board/ui/texts.js +30 -2
- package/templates/lesson/README.md +71 -0
- package/templates/lesson/commentary.txt +7 -0
- package/templates/lesson/core/dom.d.ts +4 -0
- package/templates/lesson/core/dom.js +22 -0
- package/templates/lesson/core/engine.d.ts +23 -0
- package/templates/lesson/core/engine.js +169 -0
- package/templates/lesson/core/interact.d.ts +2 -0
- package/templates/lesson/core/interact.js +429 -0
- package/templates/lesson/core/layout-files.d.ts +4 -0
- package/templates/lesson/core/layout-files.js +9 -0
- package/templates/lesson/core/lesson.d.ts +95 -0
- package/templates/lesson/core/lesson.js +609 -0
- package/templates/lesson/core/sample.d.ts +4 -0
- package/templates/lesson/core/sample.js +128 -0
- package/templates/lesson/edit.html +21 -0
- package/templates/lesson/gitignore +4 -0
- package/templates/lesson/index.html +22 -0
- package/templates/lesson/layouts/_actions.html +1 -0
- package/templates/lesson/layouts/_cmp.html +1 -0
- package/templates/lesson/layouts/_deco-corner.html +1 -0
- package/templates/lesson/layouts/_deco-cover.html +1 -0
- package/templates/lesson/layouts/_deco-section.html +1 -0
- package/templates/lesson/layouts/_foot.html +1 -0
- package/templates/lesson/layouts/_head.html +1 -0
- package/templates/lesson/layouts/_media.html +1 -0
- package/templates/lesson/layouts/agenda.html +13 -0
- package/templates/lesson/layouts/bar-chart.html +14 -0
- package/templates/lesson/layouts/cards.html +12 -0
- package/templates/lesson/layouts/checklist.html +12 -0
- package/templates/lesson/layouts/choice-list.html +13 -0
- package/templates/lesson/layouts/closing.html +13 -0
- package/templates/lesson/layouts/compare.html +12 -0
- package/templates/lesson/layouts/cover-dark.html +13 -0
- package/templates/lesson/layouts/cover.html +15 -0
- package/templates/lesson/layouts/figures.html +12 -0
- package/templates/lesson/layouts/flow.html +13 -0
- package/templates/lesson/layouts/how-to.html +15 -0
- package/templates/lesson/layouts/image-bg.html +12 -0
- package/templates/lesson/layouts/image-pair.html +15 -0
- package/templates/lesson/layouts/image-split.html +12 -0
- package/templates/lesson/layouts/layers.html +12 -0
- package/templates/lesson/layouts/objectives.html +12 -0
- package/templates/lesson/layouts/ox-card.html +24 -0
- package/templates/lesson/layouts/ox-list.html +21 -0
- package/templates/lesson/layouts/process.html +14 -0
- package/templates/lesson/layouts/profile.html +13 -0
- package/templates/lesson/layouts/prompt-builder.html +18 -0
- package/templates/lesson/layouts/quiz.html +14 -0
- package/templates/lesson/layouts/quote.html +12 -0
- package/templates/lesson/layouts/scenario-rows.html +12 -0
- package/templates/lesson/layouts/section.html +14 -0
- package/templates/lesson/layouts/simulation.html +18 -0
- package/templates/lesson/layouts/stat.html +14 -0
- package/templates/lesson/layouts/statement.html +13 -0
- package/templates/lesson/layouts/stats.html +12 -0
- package/templates/lesson/layouts/stepper.html +13 -0
- package/templates/lesson/layouts/table.html +12 -0
- package/templates/lesson/layouts/tabs.html +13 -0
- package/templates/lesson/layouts/text-visual.html +16 -0
- package/templates/lesson/layouts/timeline.html +12 -0
- package/templates/lesson/layouts/toggle.html +16 -0
- package/templates/lesson/layouts/variables.html +14 -0
- package/templates/lesson/layouts/venn.html +15 -0
- package/templates/lesson/layouts/versus.html +12 -0
- package/templates/lesson/metadata.json +9 -0
- package/templates/lesson/package.json +15 -0
- package/templates/lesson/public/img/sample-chat.svg +21 -0
- package/templates/lesson/screens/edit.js +79 -0
- package/templates/lesson/screens/learn.js +56 -0
- package/templates/lesson/styles.css +27 -0
- package/templates/lesson/template.json +7 -0
- package/templates/lesson/ui/design.css +1103 -0
- package/templates/lesson/ui/fonts/PretendardVariable.woff2 +0 -0
- package/templates/lesson/ui/learn.css +64 -0
- package/templates/lesson/ui/mobile.css +492 -0
- package/templates/lesson/ui/reset.css +6 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// core/lesson.js 타입 (편집기 자동완성 · 테스트용). lesson.js와 같이 고칩니다.
|
|
2
|
+
|
|
3
|
+
/** 슬롯 규칙 하나 (layouts/*.html 맨 위 <!--SCHEMA {...}-->) */
|
|
4
|
+
export interface SlotSpec {
|
|
5
|
+
req?: number | boolean;
|
|
6
|
+
max?: number;
|
|
7
|
+
/** 목록 항목 수 [최소, 최대] */
|
|
8
|
+
n?: [number, number];
|
|
9
|
+
t?: 'enum' | 'image' | 'bool' | 'row';
|
|
10
|
+
opts?: Array<string | number>;
|
|
11
|
+
default?: unknown;
|
|
12
|
+
style?: string;
|
|
13
|
+
hint?: string;
|
|
14
|
+
fields?: Record<string, SlotSpec>;
|
|
15
|
+
item?: SlotSpec;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface LayoutSchema {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
use: string;
|
|
22
|
+
avoid: string;
|
|
23
|
+
slots: Record<string, SlotSpec>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** 레이아웃 묶음 (parseLayouts 결과) */
|
|
27
|
+
export interface LayoutSet {
|
|
28
|
+
/** 쓸 수 있는 레이아웃 (순서: 장표 → 실습 → 퀴즈) */
|
|
29
|
+
ids: string[];
|
|
30
|
+
layouts: Record<string, { schema: LayoutSchema; template: string }>;
|
|
31
|
+
/** 부분 틀 ({{>head}} 등, layouts/_*.html) */
|
|
32
|
+
partials: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface LessonVariable {
|
|
36
|
+
key: string;
|
|
37
|
+
label?: string;
|
|
38
|
+
default?: string;
|
|
39
|
+
hint?: string;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface LessonMeta {
|
|
44
|
+
title?: string;
|
|
45
|
+
brand?: string;
|
|
46
|
+
variables?: LessonVariable[];
|
|
47
|
+
style?: 'document' | 'slide';
|
|
48
|
+
title_mode?: 'fixed' | 'free';
|
|
49
|
+
header?: 'hide' | 'show';
|
|
50
|
+
background?: 'decor' | 'plain';
|
|
51
|
+
header_right?: 'none' | 'title';
|
|
52
|
+
title_label?: 'chapter' | 'title' | 'none';
|
|
53
|
+
key_color?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface LessonSlide {
|
|
57
|
+
layout: string;
|
|
58
|
+
data?: Record<string, unknown>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** 편집 화면이 저장하는 내용 (settings, grading 없음) */
|
|
62
|
+
export interface Lesson {
|
|
63
|
+
meta?: LessonMeta;
|
|
64
|
+
slides: LessonSlide[];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface LessonFinding {
|
|
68
|
+
level: 'error' | 'warn';
|
|
69
|
+
message: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface BuiltLesson {
|
|
73
|
+
slides: { html: string; layout: string; title: string; notes: string }[];
|
|
74
|
+
report: LessonFinding[];
|
|
75
|
+
attrs: { title: string; header: string; hright: string; bg: string; key: string; single: boolean };
|
|
76
|
+
vars: Record<string, string>;
|
|
77
|
+
title: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface BuildOptions {
|
|
81
|
+
/** 레이아웃 묶음 (parseLayouts 결과, 화면은 core/layout-files.js의 LAYOUTS) */
|
|
82
|
+
layouts: LayoutSet;
|
|
83
|
+
/** 이미지 파일이 있는지 (Node 검사). 없으면 파일 검사를 하지 않는다 */
|
|
84
|
+
imageExists?: (path: string) => boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare const UNIVERSAL: Record<string, SlotSpec>;
|
|
88
|
+
/** 레이아웃 순서 (원본 build.py ORDER) */
|
|
89
|
+
export declare const ORDER: string[];
|
|
90
|
+
/** 레이아웃 틀 파일 { 경로: 내용 } → 레이아웃 묶음. SCHEMA 주석이 없거나 id가 파일 이름과 다르면 던진다 */
|
|
91
|
+
export declare function parseLayouts(files: Record<string, string>): LayoutSet;
|
|
92
|
+
export declare function visibleLength(s: unknown): number;
|
|
93
|
+
export declare function buildLesson(content: unknown, options: BuildOptions): BuiltLesson;
|
|
94
|
+
export declare function validateLesson(content: unknown, options: BuildOptions): LessonFinding[];
|
|
95
|
+
export declare function cleanLesson<T>(content: T, options: { layouts: LayoutSet }): T;
|