@eliceio/cdk-cli 1.3.0-contenttypes.0 → 1.3.0-contenttypes.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.
- package/README.md +21 -20
- package/es/cli.js +1 -1
- package/es/commands/create/index.js +1 -0
- package/es/commands/create/scaffold.d.ts +1 -1
- package/es/commands/create/scaffold.js +1 -1
- package/es/commands/doctor/index.js +6 -2
- package/es/core/config.d.ts +22 -0
- package/es/core/config.js +165 -1
- package/es/dev/assets.d.ts +80 -0
- package/es/dev/assets.js +240 -0
- package/es/dev/grading.d.ts +42 -26
- package/es/dev/grading.js +88 -39
- package/es/dev/host-page.js +26 -2
- package/es/dev/inject.d.ts +2 -1
- package/es/dev/inject.js +10 -2
- package/es/dev/mock-api.d.ts +23 -2
- package/es/dev/mock-api.js +210 -40
- package/es/dev/server.d.ts +12 -1
- package/es/dev/server.js +115 -9
- package/es/rules.json.js +1 -1
- package/package.json +2 -2
- package/rules.json +3 -3
- package/skills/_shared/references/02-design-the-material.md +1 -1
- package/skills/_shared/references/03-create-the-project.md +9 -8
- package/skills/_shared/references/04-rules.md +1 -1
- package/skills/_shared/references/05-screen-code.md +22 -20
- package/skills/_shared/references/06-using-the-quiz-template.md +2 -2
- package/skills/_shared/references/08-fix-check-errors.md +1 -1
- package/skills/_shared/references/09-check.md +1 -0
- package/skills/_shared/references/12-upload-with-the-material-mcp.md +1 -1
- package/skills/elice-content-publish/SKILL.md +1 -1
- package/templates/_shared/lib/cdk-mock.d.ts +17 -0
- package/templates/_shared/lib/cdk-mock.js +212 -7
- package/templates/_shared/lib/elice-content.d.ts +61 -1
- package/templates/_shared/lib/elice-content.js +317 -10
- package/templates/blank/README.md +1 -1
- package/templates/blank/screens/instructor.js +8 -2
- package/templates/blank/screens/learn.js +1 -1
- package/templates/blank/template.json +1 -1
- package/templates/document/README.md +92 -0
- package/templates/document/commentary.txt +2 -0
- package/templates/document/core/dom.d.ts +13 -0
- package/templates/document/core/dom.js +83 -0
- package/templates/document/core/file-type.d.ts +21 -0
- package/templates/document/core/file-type.js +85 -0
- package/templates/document/core/group-3d.d.ts +20 -0
- package/templates/document/core/group-3d.js +256 -0
- package/templates/document/core/inline-edit.d.ts +15 -0
- package/templates/document/core/inline-edit.js +377 -0
- package/templates/document/core/load.d.ts +13 -0
- package/templates/document/core/load.js +40 -0
- package/templates/document/core/pdf-options.d.ts +9 -0
- package/templates/document/core/pdf-options.js +36 -0
- package/templates/document/core/pdf-worker.d.ts +24 -0
- package/templates/document/core/pdf-worker.js +122 -0
- package/templates/document/core/pdf.d.ts +12 -0
- package/templates/document/core/pdf.js +190 -0
- package/templates/document/core/pptx-edit.d.ts +14 -0
- package/templates/document/core/pptx-edit.js +137 -0
- package/templates/document/core/pptx-fonts.d.ts +5 -0
- package/templates/document/core/pptx-fonts.js +115 -0
- package/templates/document/core/pptx-media.d.ts +18 -0
- package/templates/document/core/pptx-media.js +83 -0
- package/templates/document/core/pptx-view.d.ts +5 -0
- package/templates/document/core/pptx-view.js +185 -0
- package/templates/document/core/settings.d.ts +25 -0
- package/templates/document/core/settings.js +86 -0
- package/templates/document/core/slide-edges.d.ts +3 -0
- package/templates/document/core/slide-edges.js +82 -0
- package/templates/document/core/viewer.d.ts +28 -0
- package/templates/document/core/viewer.js +159 -0
- package/templates/document/edit.html +17 -0
- package/templates/document/gitignore +4 -0
- package/templates/document/index.html +18 -0
- package/templates/document/metadata.json +9 -0
- package/templates/document/package.json +17 -0
- package/templates/document/public/fonts/OFL-Caladea.txt +93 -0
- package/templates/document/public/fonts/OFL-Carlito.txt +93 -0
- package/templates/document/public/fonts/caladea-latin-400-normal.woff2 +0 -0
- package/templates/document/public/fonts/caladea-latin-700-normal.woff2 +0 -0
- package/templates/document/public/fonts/carlito-latin-400-normal.woff2 +0 -0
- package/templates/document/public/fonts/carlito-latin-700-normal.woff2 +0 -0
- package/templates/document/screens/edit.js +574 -0
- package/templates/document/screens/learn.js +61 -0
- package/templates/document/styles.css +644 -0
- package/templates/document/template.json +6 -0
- package/templates/document/ui/templates/edit.js +82 -0
- package/templates/document/ui/templates/page.js +11 -0
- package/templates/document/ui/templates/viewer.js +41 -0
- package/templates/document/ui/texts.d.ts +3 -0
- package/templates/document/ui/texts.js +62 -0
- package/templates/document/ui/theme.css +69 -0
- package/templates/quiz/README.md +11 -9
- package/templates/quiz/core/behaviors.d.ts +4 -0
- package/templates/quiz/core/behaviors.js +4 -2
- package/templates/quiz/core/editor.d.ts +17 -2
- package/templates/quiz/core/editor.js +85 -10
- package/templates/quiz/core/markdown.d.ts +15 -0
- package/templates/quiz/core/markdown.js +164 -4
- package/templates/quiz/core/model.d.ts +6 -2
- package/templates/quiz/core/model.js +30 -4
- package/templates/quiz/core/rich-text.d.ts +1 -2
- package/templates/quiz/core/rich-text.js +7 -59
- package/templates/quiz/public/img/mascot-half.webp +0 -0
- package/templates/quiz/screens/edit.js +165 -52
- package/templates/quiz/screens/learn.js +94 -38
- package/templates/quiz/styles.css +464 -4
- package/templates/quiz/template.json +1 -1
- package/templates/quiz/ui/templates/edit.d.ts +1 -0
- package/templates/quiz/ui/templates/edit.js +65 -9
- package/templates/quiz/ui/templates/page.js +14 -0
- package/templates/quiz/ui/templates/question.js +5 -3
- package/templates/quiz/ui/texts.js +38 -20
|
@@ -8,14 +8,16 @@ import { texts } from '../texts.js';
|
|
|
8
8
|
const t = texts.question;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* @param {{ q: object, no: number, type: string, body: Node, explanation: string | null }} props
|
|
12
|
-
* no: 1부터 (문제가 하나뿐이면 null: 번호 없이 제목만) · type: 유형 이름(학생 화면은 null: 그리지 않음) · body: 유형별 본문 · explanation: 해설(없으면 null)
|
|
11
|
+
* @param {{ q: object, no: number, type: string, body: Node, explanation: string | null, points?: number | null }} props
|
|
12
|
+
* no: 1부터 (문제가 하나뿐이면 null: 번호 없이 제목만) · type: 유형 이름(학생 화면은 null: 그리지 않음) · body: 유형별 본문 · explanation: 해설(없으면 null) ·
|
|
13
|
+
* points: 배점(부분 채점 · 직접 배점일 때만, 아니면 null: 그리지 않음)
|
|
13
14
|
*/
|
|
14
|
-
export const question = ({ q, no, type, body, explanation }) => html`
|
|
15
|
+
export const question = ({ q, no, type, body, explanation, points = null }) => html`
|
|
15
16
|
<fieldset class="qz-question">
|
|
16
17
|
<legend class="qz-question-head">
|
|
17
18
|
<span class="qz-question-title">${no === null ? q.title : t.title(no, q.title)}</span>
|
|
18
19
|
${type && html`<span class="qz-chip">${type}</span>`}
|
|
20
|
+
${points != null && html`<span class="qz-points">${t.points(points)}</span>`}
|
|
19
21
|
</legend>
|
|
20
22
|
${q.description ? markdown(q.description, 'qz-markdown qz-passage') : null} ${body}
|
|
21
23
|
<p class="qz-result" data-role="result" role="status" hidden></p>
|
|
@@ -31,12 +31,12 @@ export const texts = {
|
|
|
31
31
|
textDelete: i => (i === 0 ? '정답 지우기' : `유사 정답 ${i} 지우기`),
|
|
32
32
|
textMin: '정답은 하나 이상 있어야 합니다.',
|
|
33
33
|
unreadable:
|
|
34
|
-
'저장된 정답(기준 답안)을 이 화면이 읽지
|
|
34
|
+
'저장된 정답(기준 답안)을 이 화면이 읽지 못했습니다. 문제마다 정답을 다시 골라 저장해 주세요.',
|
|
35
35
|
validation: {
|
|
36
36
|
at: (no, message) => `문제 ${no}: ${message}`,
|
|
37
37
|
noAnswer: '정답을 골라 주세요.',
|
|
38
38
|
missingOption: '정답으로 고른 보기나 그룹이 지금 문제에 없습니다 (지웠음). 다시 골라 주세요.',
|
|
39
|
-
badRegex: '정답으로 기준 답안을 만들지
|
|
39
|
+
badRegex: '정답으로 기준 답안을 만들지 못했습니다. 정답을 다시 골라 주세요.',
|
|
40
40
|
roundTrip: '정답으로 낸 답이 기준 답안과 맞지 않습니다. 정답을 다시 골라 주세요.',
|
|
41
41
|
tooWide: '다른 답도 정답으로 인정됩니다. 정답을 다시 확인해 주세요.',
|
|
42
42
|
// 퀴즈 전체 정답 길이가 한도를 넘음 (가장 긴 문항에 붙여 보인다)
|
|
@@ -56,15 +56,20 @@ export const texts = {
|
|
|
56
56
|
// 제출 버튼 (다시 낼 때는 키트가 "다시 제출하기")
|
|
57
57
|
submit: '제출하기',
|
|
58
58
|
// 모두 맞혀야 100점(pattern)인 여러 문제 퀴즈에서 틀린 것이 있을 때 제출 바 위 한 줄 (점수 줄은 감춤)
|
|
59
|
-
someWrong: '틀린 문제가
|
|
60
|
-
// 부분 점수(partial_pattern)
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
someWrong: '틀린 문제가 있습니다. 다시 한번 풀어보세요.',
|
|
60
|
+
// 부분 점수(partial_pattern)가 100점보다 낮을 때 제출 바 위 결과 상자 (점수 · 제목 · 안내 · 마스코트). 100점이면 상자 없음
|
|
61
|
+
scoreUnit: '점',
|
|
62
|
+
scoreTitle: '아쉬워요!',
|
|
63
|
+
scoreSub: '틀린 문제를 다시 풀어 보세요.',
|
|
64
|
+
// 올린 그림을 받지 못함 (10초 안에 받지 못함 · 서명 주소 만료). 그림 자리에 보인다
|
|
65
|
+
imageExpired: '이미지 주소가 만료되었습니다. 새로고침해 주세요.',
|
|
63
66
|
},
|
|
64
67
|
|
|
65
68
|
/** 문항 */
|
|
66
69
|
question: {
|
|
67
70
|
title: (no, title) => `${no}. ${title}`,
|
|
71
|
+
// 부분 점수 · 직접 배점일 때 문제 제목 옆 배점
|
|
72
|
+
points: (points) => `${points}점`,
|
|
68
73
|
correct: '정답입니다!',
|
|
69
74
|
wrong: '오답입니다. 다시 한번 풀어보세요.',
|
|
70
75
|
explanation: '퀴즈 해설 보기',
|
|
@@ -75,7 +80,7 @@ export const texts = {
|
|
|
75
80
|
answer: '답안',
|
|
76
81
|
// 순서 맞추기: 고를 개수(답안 칸 수)가 보기 수와 같으면 개수를 말하지 않는다
|
|
77
82
|
orderHint: (slots, total) =>
|
|
78
|
-
slots >= total ? '정답 순서대로 보기를
|
|
83
|
+
slots >= total ? '정답 순서대로 보기를 선택합니다.' : `정답 순서대로 보기를 ${slots}개 선택합니다.`,
|
|
79
84
|
orderReset: '답안 초기화',
|
|
80
85
|
// 고른 보기의 순서 (화면 읽기 프로그램용, 화면에는 번호만)
|
|
81
86
|
orderNo: (no) => `${no}번째`,
|
|
@@ -112,14 +117,8 @@ export const texts = {
|
|
|
112
117
|
answerDeleted: '정답을 삭제했습니다.',
|
|
113
118
|
fieldDeleted: name => `${name} 내용을 지웠습니다.`,
|
|
114
119
|
typeChanged: '유형을 바꿔 질문만 남기고 모두 초기화했습니다.',
|
|
115
|
-
// partial_pattern: 문제 수가 바뀌어(또는 저장된 점수가 규칙에 맞지 않아) 점수를 똑같이 나눠 저장함
|
|
116
|
-
scoresSplit: (scores) => {
|
|
117
|
-
const min = Math.min(...scores);
|
|
118
|
-
const extra = scores.filter((s) => s > min).length;
|
|
119
|
-
return `문제 수가 바뀌어 점수를 똑같이 나눠 저장합니다: 문제마다 ${min}점${extra ? `, 마지막 ${extra}문제는 ${min + 1}점` : ''}.`;
|
|
120
|
-
},
|
|
121
120
|
addQuestion: '+ 문제 추가',
|
|
122
|
-
questionLimit: '문제는 20개까지 만들 수
|
|
121
|
+
questionLimit: '문제는 20개까지 만들 수 있습니다.',
|
|
123
122
|
title: '질문',
|
|
124
123
|
description: '설명',
|
|
125
124
|
options: '보기',
|
|
@@ -142,7 +141,7 @@ export const texts = {
|
|
|
142
141
|
orderTitle: '정답 순서',
|
|
143
142
|
noneHintOrder: '정답 순서에 들어가지 않는 보기',
|
|
144
143
|
noneClose: '오답 보기 삭제',
|
|
145
|
-
noneRowMin: '오답 보기가 하나만
|
|
144
|
+
noneRowMin: '오답 보기가 하나만 남았습니다. 모두 지우려면 상자의 ✕로 닫아 주세요.',
|
|
146
145
|
noneDeleted: n => `오답 보기 ${n}개를 삭제했습니다.`,
|
|
147
146
|
answer: '정답',
|
|
148
147
|
// 정답으로 고른 보기 줄 끝에 보이는 표시
|
|
@@ -176,14 +175,30 @@ export const texts = {
|
|
|
176
175
|
imageBusy: '올리는 중…',
|
|
177
176
|
imageRemove: '이미지 지우기',
|
|
178
177
|
imageDeleted: '이미지를 삭제했습니다.',
|
|
179
|
-
imageNotImage: '이미지 파일만 넣을 수
|
|
180
|
-
imageUnreadable: '이미지를 읽지
|
|
181
|
-
imageTooBig: '이미지가 너무
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
imageNotImage: '이미지 파일만 넣을 수 있습니다.',
|
|
179
|
+
imageUnreadable: '이미지를 읽지 못했습니다. 다른 파일로 다시 시도해 주세요.',
|
|
180
|
+
imageTooBig: '이미지가 너무 큽니다. 더 작은 이미지를 올려 주세요.',
|
|
181
|
+
imageProgress: (percent) => `이미지 올리는 중… ${percent}%`,
|
|
182
|
+
imageTotal: (max) =>
|
|
183
|
+
`이미지는 퀴즈 전체에 ${max}개까지 넣을 수 있습니다. 안 쓰는 이미지는 글에서 지워 주세요.`,
|
|
184
184
|
// 코드 버튼을 글을 고르지 않고 누르면 넣는 글
|
|
185
185
|
codeSample: '코드',
|
|
186
186
|
},
|
|
187
|
+
/** 부분 채점 설정 (문제가 2개 이상일 때 맨 위) · 문제별 배점 (카드 머리) */
|
|
188
|
+
scoring: {
|
|
189
|
+
toggle: '부분 채점 허용',
|
|
190
|
+
hintOn: '일부만 맞혀도 맞힌 만큼 점수가 기록됩니다.',
|
|
191
|
+
hintOff: '하나라도 틀리면 0점이고, 모두 맞아야 100점으로 기록됩니다.',
|
|
192
|
+
points: (no) => `문제 ${no} 배점`,
|
|
193
|
+
unit: '점',
|
|
194
|
+
total: (sum) => `합계 ${sum} / 100점`,
|
|
195
|
+
over: '학생은 최대 100점까지 받을 수 있습니다.',
|
|
196
|
+
under: '합계는 100점 이상이어야 합니다.',
|
|
197
|
+
equal: '동일 점수로 적용하기',
|
|
198
|
+
equalLine: '문제마다 동일한 점수로 채점됩니다. 문제의 배점을 직접 수정할 수 있습니다.',
|
|
199
|
+
modeEqual: '자동 배점',
|
|
200
|
+
modeCustom: '직접 배점',
|
|
201
|
+
},
|
|
187
202
|
sortLabel: label => `${label} 순서 바꾸기 (끌거나 ↑ · ↓ 키)`,
|
|
188
203
|
sortTitle: '끌어서 순서 바꾸기',
|
|
189
204
|
up: '↑',
|
|
@@ -212,5 +227,8 @@ export const texts = {
|
|
|
212
227
|
groupName: '그룹 이름을 입력해 주세요.',
|
|
213
228
|
placeholderMax: max => `입력란 힌트는 ${max}자까지 입력할 수 있습니다.`,
|
|
214
229
|
explanation: '해설 내용을 입력해 주세요.',
|
|
230
|
+
// 부분 채점 배점 (문제가 2개 이상 · 부분 채점 허용일 때)
|
|
231
|
+
pointsInt: '배점은 0부터 100 사이의 정수로 입력해 주세요.',
|
|
232
|
+
pointsTotal: '배점 합계는 100점 이상이어야 합니다.',
|
|
215
233
|
},
|
|
216
234
|
};
|