@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
|
@@ -29,9 +29,10 @@ body.qz-page .ec-submitbar {
|
|
|
29
29
|
margin: 0 -16px;
|
|
30
30
|
padding: 12px max(16px, 50% - 360px);
|
|
31
31
|
}
|
|
32
|
-
/*
|
|
33
|
-
|
|
34
|
-
body.qz-
|
|
32
|
+
/* 키트 점수 줄(정답 · 오답)은 감추고 문제 카드의 정답 · 오답과 아래 상자(.qz-overall)로 알린다.
|
|
33
|
+
pattern은 틀린 문제가 있다는 한 줄, partial_pattern은 100점보다 낮을 때 점수 상자 (채점하지 않을 때 "제출했어요."는 보임) */
|
|
34
|
+
body.qz-page .ec-result.ok,
|
|
35
|
+
body.qz-page .ec-result.no {
|
|
35
36
|
display: none;
|
|
36
37
|
}
|
|
37
38
|
.qz-result.qz-overall {
|
|
@@ -421,6 +422,10 @@ body.qz-score-hidden .ec-result.no {
|
|
|
421
422
|
color: inherit;
|
|
422
423
|
font: inherit;
|
|
423
424
|
white-space: normal;
|
|
425
|
+
/* 띄어쓰기 없는 긴 보기도 칩 안에서 끊는다 (한국어는 단어 단위) */
|
|
426
|
+
min-width: 0;
|
|
427
|
+
overflow-wrap: anywhere;
|
|
428
|
+
word-break: keep-all;
|
|
424
429
|
text-align: left;
|
|
425
430
|
cursor: inherit;
|
|
426
431
|
}
|
|
@@ -853,6 +858,33 @@ button.qe-add-question:disabled {
|
|
|
853
858
|
font-size: 16px;
|
|
854
859
|
}
|
|
855
860
|
}
|
|
861
|
+
/* 긴 보기 · 주관식 정답 · 그룹 이름 · 질문 · 입력란 힌트: 칸 안에서 다음 줄로 넘겨 다 보인다 (textarea, 높이는 글에 맞춤).
|
|
862
|
+
연주님 디자인(2026-11-18) 그대로: 글꼴은 둘레 글을 따르고(font: inherit — 보기 · 정답 · 그룹 이름은 body2 14px, 모바일 13px · 보통 굵기,
|
|
863
|
+
줄 간격도 둘레를 따름), 낱말 중간에서도 끊는다(word-break 기본) */
|
|
864
|
+
textarea.qe-inline-input {
|
|
865
|
+
font: inherit;
|
|
866
|
+
white-space: pre-wrap;
|
|
867
|
+
overflow-wrap: anywhere;
|
|
868
|
+
display: block;
|
|
869
|
+
}
|
|
870
|
+
textarea.qe-option-text,
|
|
871
|
+
textarea.qe-group-name {
|
|
872
|
+
min-height: 0;
|
|
873
|
+
}
|
|
874
|
+
/* 줄이 늘어도 손잡이 · 정답 표시 · 번호 · 그룹 고르기 · ✕는 첫 줄(높이 40px)에 맞춰 위에 둔다 */
|
|
875
|
+
.qe-option {
|
|
876
|
+
align-items: flex-start;
|
|
877
|
+
}
|
|
878
|
+
.qe-option > :not(.qe-option-field):not(textarea) {
|
|
879
|
+
align-self: flex-start;
|
|
880
|
+
}
|
|
881
|
+
.qe-option > .ec-icon-button,
|
|
882
|
+
.qe-option > .qe-option-no {
|
|
883
|
+
margin-top: calc((40px - var(--qe-row-control, 32px)) / 2);
|
|
884
|
+
}
|
|
885
|
+
.qe-option > .qe-answer {
|
|
886
|
+
min-height: 40px;
|
|
887
|
+
}
|
|
856
888
|
/* 보기 칸 + 정답 표시: 정답으로 고른 줄 끝에 "정답" */
|
|
857
889
|
.qe-option-field {
|
|
858
890
|
position: relative;
|
|
@@ -863,7 +895,8 @@ button.qe-add-question:disabled {
|
|
|
863
895
|
.qe-correct-tag {
|
|
864
896
|
visibility: hidden;
|
|
865
897
|
position: absolute;
|
|
866
|
-
|
|
898
|
+
/* 첫 줄 가운데 (칸 위아래 여백 8px + 줄 높이 24px의 반) */
|
|
899
|
+
top: 20px;
|
|
867
900
|
right: 8px;
|
|
868
901
|
transform: translateY(-50%);
|
|
869
902
|
color: var(--eds-primary-main);
|
|
@@ -1325,9 +1358,436 @@ button.qe-add-question:disabled {
|
|
|
1325
1358
|
background: var(--eds-action-selected, var(--eds-action-hover));
|
|
1326
1359
|
color: var(--qz-accent);
|
|
1327
1360
|
}
|
|
1361
|
+
/* 그림을 올리는 동안 진행률 (그림 버튼 옆) */
|
|
1362
|
+
.qe-md-progress {
|
|
1363
|
+
padding: 0 6px;
|
|
1364
|
+
color: var(--eds-text-secondary);
|
|
1365
|
+
font-size: var(--eds-fs-caption, 12px);
|
|
1366
|
+
white-space: nowrap;
|
|
1367
|
+
}
|
|
1368
|
+
.qe-md-progress[hidden] {
|
|
1369
|
+
display: none;
|
|
1370
|
+
}
|
|
1328
1371
|
.qe-md-sep {
|
|
1329
1372
|
width: 1px;
|
|
1330
1373
|
height: 18px;
|
|
1331
1374
|
margin: 0 4px;
|
|
1332
1375
|
background: var(--qz-border);
|
|
1333
1376
|
}
|
|
1377
|
+
|
|
1378
|
+
/* ---------- 부분 채점 (연주님 부분 채점 UI) ---------- */
|
|
1379
|
+
/* 학생: 직접 배점일 때 문제 머리의 배점 (연주님 디자인 수정판 2026-11-18).
|
|
1380
|
+
회색 알약(높이 24px · caption bold · 모서리 6px). 600px 이상은 제목 오른쪽 끝(제목은 남은 폭에서 줄바꿈),
|
|
1381
|
+
좁은 화면은 제목 위 한 줄 */
|
|
1382
|
+
.qz-question-head {
|
|
1383
|
+
flex-wrap: wrap;
|
|
1384
|
+
align-items: flex-start;
|
|
1385
|
+
row-gap: 2px;
|
|
1386
|
+
}
|
|
1387
|
+
.qz-question-head > .qz-question-title {
|
|
1388
|
+
flex: 1 1 100%;
|
|
1389
|
+
min-width: 0;
|
|
1390
|
+
}
|
|
1391
|
+
.qz-points {
|
|
1392
|
+
display: inline-flex;
|
|
1393
|
+
flex: none;
|
|
1394
|
+
align-items: center;
|
|
1395
|
+
box-sizing: border-box;
|
|
1396
|
+
height: 24px;
|
|
1397
|
+
padding: 0 8px;
|
|
1398
|
+
border-radius: 6px;
|
|
1399
|
+
background: var(--qz-surface-gray);
|
|
1400
|
+
color: var(--eds-text-secondary);
|
|
1401
|
+
font-size: var(--eds-fs-caption);
|
|
1402
|
+
font-weight: var(--eds-fw-bold);
|
|
1403
|
+
line-height: 1;
|
|
1404
|
+
white-space: nowrap;
|
|
1405
|
+
}
|
|
1406
|
+
.qz-question-head > .qz-points {
|
|
1407
|
+
order: -1;
|
|
1408
|
+
}
|
|
1409
|
+
@media (min-width: 600px) {
|
|
1410
|
+
.qz-question-head {
|
|
1411
|
+
flex-wrap: nowrap;
|
|
1412
|
+
gap: 12px;
|
|
1413
|
+
}
|
|
1414
|
+
.qz-question-head > .qz-question-title {
|
|
1415
|
+
flex: 1 1 0;
|
|
1416
|
+
}
|
|
1417
|
+
.qz-question-head > .qz-points {
|
|
1418
|
+
order: 0;
|
|
1419
|
+
margin-left: auto;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
/* 학생: 100점보다 낮을 때 제출 바 위 상자 — 점수 · "아쉬워요!" · 안내, 오른쪽 아래 마스코트(위로 조금 넘침) */
|
|
1423
|
+
.qz-result[data-result='partial'] {
|
|
1424
|
+
border: 0;
|
|
1425
|
+
background: color-mix(in srgb, var(--eds-primary-main) 8%, var(--eds-background-paper, #fff));
|
|
1426
|
+
color: var(--eds-primary-dark, var(--eds-primary-main));
|
|
1427
|
+
}
|
|
1428
|
+
.qz-result[data-result='partial']::before {
|
|
1429
|
+
display: none;
|
|
1430
|
+
}
|
|
1431
|
+
.qz-overall.qz-overall-mascot {
|
|
1432
|
+
position: relative;
|
|
1433
|
+
z-index: 1;
|
|
1434
|
+
min-height: 88px;
|
|
1435
|
+
padding-right: 112px;
|
|
1436
|
+
overflow: visible;
|
|
1437
|
+
}
|
|
1438
|
+
.qz-overall-img {
|
|
1439
|
+
position: absolute;
|
|
1440
|
+
right: 16px;
|
|
1441
|
+
bottom: 0;
|
|
1442
|
+
width: 100px;
|
|
1443
|
+
height: auto;
|
|
1444
|
+
pointer-events: none;
|
|
1445
|
+
}
|
|
1446
|
+
.qz-overall-score {
|
|
1447
|
+
display: block;
|
|
1448
|
+
flex: none;
|
|
1449
|
+
box-sizing: border-box;
|
|
1450
|
+
min-width: 72px;
|
|
1451
|
+
height: 56px;
|
|
1452
|
+
margin-right: 4px;
|
|
1453
|
+
padding: 0 14px;
|
|
1454
|
+
border: 0;
|
|
1455
|
+
border-radius: 12px;
|
|
1456
|
+
background: var(--eds-background-paper, #fff);
|
|
1457
|
+
color: var(--eds-primary-dark, var(--eds-primary-main));
|
|
1458
|
+
font-size: 22px;
|
|
1459
|
+
line-height: 56px;
|
|
1460
|
+
font-weight: var(--eds-fw-extrabold);
|
|
1461
|
+
font-variant-numeric: tabular-nums;
|
|
1462
|
+
text-align: center;
|
|
1463
|
+
white-space: nowrap;
|
|
1464
|
+
}
|
|
1465
|
+
.qz-overall-score small {
|
|
1466
|
+
margin: 0;
|
|
1467
|
+
color: var(--eds-primary-dark, var(--eds-primary-main));
|
|
1468
|
+
font-size: inherit;
|
|
1469
|
+
font-weight: inherit;
|
|
1470
|
+
line-height: inherit;
|
|
1471
|
+
}
|
|
1472
|
+
.qz-overall-text {
|
|
1473
|
+
display: grid;
|
|
1474
|
+
gap: 2px;
|
|
1475
|
+
}
|
|
1476
|
+
.qz-overall-title {
|
|
1477
|
+
color: var(--eds-primary-dark, var(--eds-primary-main));
|
|
1478
|
+
font-size: var(--eds-fs-body1);
|
|
1479
|
+
line-height: var(--eds-lh-body1);
|
|
1480
|
+
font-weight: var(--eds-fw-bold);
|
|
1481
|
+
}
|
|
1482
|
+
.qz-overall-hint {
|
|
1483
|
+
color: var(--eds-text-secondary);
|
|
1484
|
+
font-size: var(--eds-fs-body2);
|
|
1485
|
+
font-weight: var(--eds-fw-medium);
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
/* 편집: 부분 채점 설정 상자 (문제 2개 이상일 때 맨 위) */
|
|
1489
|
+
.qe-score {
|
|
1490
|
+
container-type: inline-size;
|
|
1491
|
+
display: flex;
|
|
1492
|
+
flex-direction: column;
|
|
1493
|
+
gap: 12px;
|
|
1494
|
+
margin-bottom: 16px;
|
|
1495
|
+
padding: 16px 20px;
|
|
1496
|
+
border: 1px solid var(--qz-border);
|
|
1497
|
+
border-radius: 12px;
|
|
1498
|
+
background: transparent;
|
|
1499
|
+
}
|
|
1500
|
+
.qe-score-switch {
|
|
1501
|
+
display: grid;
|
|
1502
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
1503
|
+
grid-template-areas: 'title input' 'hint input';
|
|
1504
|
+
align-items: center;
|
|
1505
|
+
gap: 2px 12px;
|
|
1506
|
+
cursor: pointer;
|
|
1507
|
+
}
|
|
1508
|
+
/* 스위치 (EDS Switch small): 누르는 자리는 44px */
|
|
1509
|
+
.qe-sw {
|
|
1510
|
+
position: relative;
|
|
1511
|
+
grid-area: input;
|
|
1512
|
+
align-self: center;
|
|
1513
|
+
flex: none;
|
|
1514
|
+
width: 32px;
|
|
1515
|
+
height: 20px;
|
|
1516
|
+
}
|
|
1517
|
+
.qe-sw input {
|
|
1518
|
+
position: absolute;
|
|
1519
|
+
inset: -12px -6px;
|
|
1520
|
+
z-index: 1;
|
|
1521
|
+
width: calc(100% + 12px);
|
|
1522
|
+
height: 44px;
|
|
1523
|
+
margin: 0;
|
|
1524
|
+
padding: 0;
|
|
1525
|
+
border: 0;
|
|
1526
|
+
border-radius: 32px;
|
|
1527
|
+
opacity: 0;
|
|
1528
|
+
cursor: pointer;
|
|
1529
|
+
}
|
|
1530
|
+
.qe-sw input:focus {
|
|
1531
|
+
outline: none;
|
|
1532
|
+
}
|
|
1533
|
+
.qe-sw-track {
|
|
1534
|
+
position: absolute;
|
|
1535
|
+
inset: 0;
|
|
1536
|
+
border-radius: 32px;
|
|
1537
|
+
background: color-mix(in srgb, var(--eds-text-primary) 38%, transparent);
|
|
1538
|
+
pointer-events: none;
|
|
1539
|
+
transition: background-color 0.15s;
|
|
1540
|
+
}
|
|
1541
|
+
.qe-sw-track::before {
|
|
1542
|
+
content: '';
|
|
1543
|
+
position: absolute;
|
|
1544
|
+
top: 3px;
|
|
1545
|
+
left: 3px;
|
|
1546
|
+
width: 14px;
|
|
1547
|
+
height: 14px;
|
|
1548
|
+
border-radius: 50%;
|
|
1549
|
+
background: #fff;
|
|
1550
|
+
box-shadow: 0 1px 2px #0000004d;
|
|
1551
|
+
transition: transform 0.15s;
|
|
1552
|
+
}
|
|
1553
|
+
.qe-sw input:checked + .qe-sw-track {
|
|
1554
|
+
background: var(--qz-accent);
|
|
1555
|
+
}
|
|
1556
|
+
.qe-sw input:checked + .qe-sw-track::before {
|
|
1557
|
+
transform: translate(12px);
|
|
1558
|
+
}
|
|
1559
|
+
.qe-sw input:focus-visible + .qe-sw-track {
|
|
1560
|
+
outline: 2px solid var(--qz-accent);
|
|
1561
|
+
outline-offset: 2px;
|
|
1562
|
+
}
|
|
1563
|
+
.qe-score-title {
|
|
1564
|
+
grid-area: title;
|
|
1565
|
+
font-size: var(--eds-fs-subtitle2);
|
|
1566
|
+
font-weight: var(--eds-fw-semibold);
|
|
1567
|
+
}
|
|
1568
|
+
.qe-score-hint {
|
|
1569
|
+
grid-area: hint;
|
|
1570
|
+
color: var(--eds-text-secondary);
|
|
1571
|
+
font-size: var(--eds-fs-body2);
|
|
1572
|
+
}
|
|
1573
|
+
/* 배점 줄: 배점 방식 알약 · 합계(또는 자동 안내) · 동일 점수 버튼, 아래 모자람 · 넘침 안내 */
|
|
1574
|
+
.qe-score-sum {
|
|
1575
|
+
display: grid;
|
|
1576
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
1577
|
+
align-content: center;
|
|
1578
|
+
align-items: center;
|
|
1579
|
+
gap: 4px 12px;
|
|
1580
|
+
padding: 12px 16px;
|
|
1581
|
+
border-radius: 8px;
|
|
1582
|
+
background: var(--eds-background-paper, #fff);
|
|
1583
|
+
}
|
|
1584
|
+
.qe-score-sum[hidden] {
|
|
1585
|
+
display: none;
|
|
1586
|
+
}
|
|
1587
|
+
.qe-score-row {
|
|
1588
|
+
display: contents;
|
|
1589
|
+
}
|
|
1590
|
+
.qe-score-row > * {
|
|
1591
|
+
display: flex;
|
|
1592
|
+
align-items: center;
|
|
1593
|
+
min-height: 32px;
|
|
1594
|
+
}
|
|
1595
|
+
.qe-score-row > .qe-score-mode,
|
|
1596
|
+
.qe-score-row > .qe-score-equal {
|
|
1597
|
+
min-height: 0;
|
|
1598
|
+
}
|
|
1599
|
+
.qe-score-mode {
|
|
1600
|
+
display: inline-flex;
|
|
1601
|
+
flex: none;
|
|
1602
|
+
align-items: center;
|
|
1603
|
+
height: 24px;
|
|
1604
|
+
padding: 0 6px;
|
|
1605
|
+
border-radius: 6px;
|
|
1606
|
+
background: color-mix(in srgb, var(--eds-primary-main) 15%, #fff);
|
|
1607
|
+
color: var(--eds-primary-dark);
|
|
1608
|
+
font-size: 11px;
|
|
1609
|
+
font-weight: 700;
|
|
1610
|
+
line-height: 1.38;
|
|
1611
|
+
white-space: nowrap;
|
|
1612
|
+
}
|
|
1613
|
+
:root[data-eds-theme='dark'] .qe-score-mode {
|
|
1614
|
+
background: color-mix(in srgb, var(--eds-primary-main) 30%, #000);
|
|
1615
|
+
color: var(--eds-primary-light);
|
|
1616
|
+
}
|
|
1617
|
+
.qe-score-total {
|
|
1618
|
+
flex: 1;
|
|
1619
|
+
min-width: 0;
|
|
1620
|
+
font-weight: var(--eds-fw-bold);
|
|
1621
|
+
font-variant-numeric: tabular-nums;
|
|
1622
|
+
}
|
|
1623
|
+
.qe-score-total[data-state='under'] {
|
|
1624
|
+
color: var(--eds-error-main);
|
|
1625
|
+
}
|
|
1626
|
+
.qe-score-total[data-state='ok'] {
|
|
1627
|
+
color: var(--eds-text-secondary);
|
|
1628
|
+
font-weight: var(--eds-fw-medium);
|
|
1629
|
+
}
|
|
1630
|
+
.qe-score-note {
|
|
1631
|
+
grid-area: 2 / 2 / auto / -1;
|
|
1632
|
+
min-width: 0;
|
|
1633
|
+
min-height: 20px;
|
|
1634
|
+
margin: 0;
|
|
1635
|
+
color: var(--eds-text-secondary);
|
|
1636
|
+
font-size: var(--eds-fs-body2);
|
|
1637
|
+
}
|
|
1638
|
+
.qe-score-note[data-state='under'] {
|
|
1639
|
+
color: var(--eds-error-main);
|
|
1640
|
+
}
|
|
1641
|
+
.qe-score-equal {
|
|
1642
|
+
display: inline-flex;
|
|
1643
|
+
align-items: center;
|
|
1644
|
+
gap: 6px;
|
|
1645
|
+
min-height: 0;
|
|
1646
|
+
padding: 4px 11px;
|
|
1647
|
+
border: 1px solid var(--qz-border);
|
|
1648
|
+
border-radius: 6px;
|
|
1649
|
+
background: var(--eds-background-paper, #fff);
|
|
1650
|
+
color: var(--eds-text-primary);
|
|
1651
|
+
font: inherit;
|
|
1652
|
+
font-size: 13px;
|
|
1653
|
+
font-weight: var(--eds-fw-semibold);
|
|
1654
|
+
line-height: 22px;
|
|
1655
|
+
cursor: pointer;
|
|
1656
|
+
}
|
|
1657
|
+
.qe-score-equal:hover {
|
|
1658
|
+
background: var(--eds-background-neutral);
|
|
1659
|
+
}
|
|
1660
|
+
.qe-score-equal:focus-visible {
|
|
1661
|
+
outline: 2px solid var(--qz-accent);
|
|
1662
|
+
outline-offset: 2px;
|
|
1663
|
+
}
|
|
1664
|
+
.qe-score-equal[hidden] {
|
|
1665
|
+
display: none;
|
|
1666
|
+
}
|
|
1667
|
+
.qe-score-sum[data-mode='equal'] {
|
|
1668
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
1669
|
+
}
|
|
1670
|
+
.qe-score-sum[data-mode='equal'] .qe-score-note {
|
|
1671
|
+
display: none;
|
|
1672
|
+
}
|
|
1673
|
+
.qe-score-sum[data-mode='custom'] {
|
|
1674
|
+
grid-template-columns: auto auto minmax(0, 1fr) auto;
|
|
1675
|
+
}
|
|
1676
|
+
.qe-score-sum[data-mode='custom'] .qe-score-total {
|
|
1677
|
+
flex: none;
|
|
1678
|
+
grid-column: 2;
|
|
1679
|
+
}
|
|
1680
|
+
.qe-score-sum[data-mode='custom'] .qe-score-note {
|
|
1681
|
+
grid-area: 1 / 3;
|
|
1682
|
+
min-height: 0;
|
|
1683
|
+
}
|
|
1684
|
+
.qe-score-sum[data-mode='custom'] .qe-score-equal {
|
|
1685
|
+
grid-area: 1 / 4;
|
|
1686
|
+
}
|
|
1687
|
+
/* 상자가 좁으면: 알약 · 버튼 한 줄, 합계 다음 줄, 안내 그 아래 */
|
|
1688
|
+
@container (width <= 520px) {
|
|
1689
|
+
.qe-score-sum[data-mode='custom'],
|
|
1690
|
+
.qe-score-sum[data-mode='equal'] {
|
|
1691
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
1692
|
+
justify-items: start;
|
|
1693
|
+
row-gap: 8px;
|
|
1694
|
+
}
|
|
1695
|
+
.qe-score-sum .qe-score-mode {
|
|
1696
|
+
grid-area: 1 / 1;
|
|
1697
|
+
}
|
|
1698
|
+
.qe-score-sum[data-mode='custom'] .qe-score-equal {
|
|
1699
|
+
grid-area: 1 / 2;
|
|
1700
|
+
justify-self: end;
|
|
1701
|
+
}
|
|
1702
|
+
.qe-score-sum[data-mode='custom'] .qe-score-total,
|
|
1703
|
+
.qe-score-sum[data-mode='equal'] .qe-score-total {
|
|
1704
|
+
grid-area: 2 / 1 / auto / -1;
|
|
1705
|
+
justify-self: stretch;
|
|
1706
|
+
min-height: 0;
|
|
1707
|
+
}
|
|
1708
|
+
.qe-score-sum[data-mode='custom'] .qe-score-note {
|
|
1709
|
+
grid-area: 3 / 1 / auto / -1;
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
/* 편집: 카드 머리의 문제별 배점 칸 (유형 버튼 옆, 구분선 뒤에 위 · 아래 · 삭제) */
|
|
1713
|
+
.qe-points {
|
|
1714
|
+
display: inline-flex;
|
|
1715
|
+
flex: none;
|
|
1716
|
+
align-items: center;
|
|
1717
|
+
gap: 4px;
|
|
1718
|
+
height: 32px;
|
|
1719
|
+
padding: 0 10px 0 4px;
|
|
1720
|
+
border: 1px solid var(--qz-border);
|
|
1721
|
+
border-radius: 6px;
|
|
1722
|
+
color: var(--eds-text-secondary);
|
|
1723
|
+
font-size: var(--eds-fs-body2);
|
|
1724
|
+
font-weight: var(--eds-fw-medium);
|
|
1725
|
+
white-space: nowrap;
|
|
1726
|
+
cursor: text;
|
|
1727
|
+
}
|
|
1728
|
+
.qe-points:hover {
|
|
1729
|
+
border-color: var(--eds-color-bluegray-400);
|
|
1730
|
+
}
|
|
1731
|
+
.qe-points:focus-within {
|
|
1732
|
+
border-color: var(--qz-accent);
|
|
1733
|
+
box-shadow: inset 0 0 0 1px var(--qz-accent);
|
|
1734
|
+
}
|
|
1735
|
+
.qe-points-label {
|
|
1736
|
+
position: absolute;
|
|
1737
|
+
width: 1px;
|
|
1738
|
+
height: 1px;
|
|
1739
|
+
overflow: hidden;
|
|
1740
|
+
clip-path: inset(50%);
|
|
1741
|
+
}
|
|
1742
|
+
.qe-points-input {
|
|
1743
|
+
width: 40px;
|
|
1744
|
+
height: 100%;
|
|
1745
|
+
min-height: 0;
|
|
1746
|
+
padding: 0 4px;
|
|
1747
|
+
border: 0;
|
|
1748
|
+
background: transparent;
|
|
1749
|
+
color: var(--eds-text-primary);
|
|
1750
|
+
font: inherit;
|
|
1751
|
+
font-weight: var(--eds-fw-semibold);
|
|
1752
|
+
text-align: right;
|
|
1753
|
+
}
|
|
1754
|
+
.qe-points-input:focus {
|
|
1755
|
+
outline: none;
|
|
1756
|
+
}
|
|
1757
|
+
.qe-points-unit {
|
|
1758
|
+
flex: none;
|
|
1759
|
+
}
|
|
1760
|
+
.qe-head-sep {
|
|
1761
|
+
flex: none;
|
|
1762
|
+
width: 1px;
|
|
1763
|
+
height: 20px;
|
|
1764
|
+
margin: 0 4px;
|
|
1765
|
+
background: var(--qz-border);
|
|
1766
|
+
}
|
|
1767
|
+
/* 좁은 화면: 카드 머리 첫 줄은 번호 · 위 · 아래 · 삭제, 둘째 줄에 유형 · 배점 */
|
|
1768
|
+
@media (max-width: 767.98px) {
|
|
1769
|
+
.qe-card-head {
|
|
1770
|
+
flex-wrap: wrap;
|
|
1771
|
+
gap: 8px;
|
|
1772
|
+
}
|
|
1773
|
+
.qe-card-head > strong {
|
|
1774
|
+
flex: auto;
|
|
1775
|
+
margin-right: 0;
|
|
1776
|
+
}
|
|
1777
|
+
.qe-card-head > .ec-icon-button {
|
|
1778
|
+
order: 1;
|
|
1779
|
+
}
|
|
1780
|
+
.qe-card-head::after {
|
|
1781
|
+
content: '';
|
|
1782
|
+
flex-basis: 100%;
|
|
1783
|
+
order: 1;
|
|
1784
|
+
height: 0;
|
|
1785
|
+
}
|
|
1786
|
+
.qe-card-head > .qe-type,
|
|
1787
|
+
.qe-card-head > .qe-points {
|
|
1788
|
+
order: 2;
|
|
1789
|
+
}
|
|
1790
|
+
.qe-card-head > .qe-head-sep {
|
|
1791
|
+
display: none;
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
@@ -17,6 +17,7 @@ export declare const row: Template;
|
|
|
17
17
|
export declare const addButton: Template;
|
|
18
18
|
export declare const card: Template;
|
|
19
19
|
export declare const typeMenu: Template;
|
|
20
|
+
export declare const scoreSettings: Template;
|
|
20
21
|
export declare const answerError: Template;
|
|
21
22
|
export declare const snackbar: Template;
|
|
22
23
|
export declare const answersIntro: Template;
|
|
@@ -223,6 +223,9 @@ export const field = ({
|
|
|
223
223
|
* 화면 낭독기에는 aria-label로 이름을 준다. size: 'title'(퀴즈 제목) · 'question'(질문) · 'body'(안내 · 설명)
|
|
224
224
|
* data-role="input" (input · textarea) · max가 있고 showCount가 false가 아니면 data-role="count" (글자 수, 칸에 초점이 있을 때만 보임)
|
|
225
225
|
* showCount: false면 max(입력 제한)는 지키되 글자 수 표시는 뺀다
|
|
226
|
+
* singleLine: 한 줄 값(줄바꿈 없음)이지만 길면 칸 안에서 다음 줄로 넘겨 다 보이는 칸 (textarea data-single-line, Enter · 붙여 넣은 줄바꿈은 동작이 막음)
|
|
227
|
+
* softWrap: 길면 칸 안에서 다음 줄로 넘기고 Shift+Enter로 줄을 바꾸는 칸 (textarea data-soft-wrap, Enter만 동작이 막음. 질문 칸)
|
|
228
|
+
* (보기 · 주관식 정답 · 그룹 이름 칸도 같은 textarea[data-soft-wrap])
|
|
226
229
|
* 필수 칸은 data-required: 비운 채 저장하면 동작이 aria-invalid를 붙인다 (빨간 밑줄)
|
|
227
230
|
*/
|
|
228
231
|
export const inlineField = ({
|
|
@@ -233,16 +236,20 @@ export const inlineField = ({
|
|
|
233
236
|
max,
|
|
234
237
|
showCount = true,
|
|
235
238
|
multiline = false,
|
|
239
|
+
singleLine = false,
|
|
240
|
+
softWrap = false,
|
|
236
241
|
}) => html`
|
|
237
242
|
<div class="qe-inline qe-inline-${size} ec-field ec-field-${size}">
|
|
238
243
|
${
|
|
239
|
-
multiline
|
|
244
|
+
multiline || singleLine || softWrap
|
|
240
245
|
? html`<textarea
|
|
241
246
|
class="qe-inline-input ec-field-input"
|
|
242
247
|
data-role="input"
|
|
243
248
|
rows="1"
|
|
244
249
|
aria-label="${label}"
|
|
245
250
|
placeholder="${placeholder}"
|
|
251
|
+
${singleLine && "data-single-line"}
|
|
252
|
+
${softWrap && "data-soft-wrap"}
|
|
246
253
|
${required && "data-required aria-required=true"}
|
|
247
254
|
></textarea>`
|
|
248
255
|
: html`<input
|
|
@@ -325,7 +332,8 @@ const toolIcon = {
|
|
|
325
332
|
|
|
326
333
|
/**
|
|
327
334
|
* 지문 · 해설 서식 도구 (칸에 초점이 있을 때 칸 아래에 뜸). 버튼마다 data-role:
|
|
328
|
-
* "md-bold" · "md-italic" · "md-strike" · "md-ul" · "md-ol" · "md-code" · "md-image" (그림 올리기, 못 쓰면 동작이 숨김)
|
|
335
|
+
* "md-bold" · "md-italic" · "md-strike" · "md-ul" · "md-ol" · "md-code" · "md-image" (그림 올리기, 못 쓰면 동작이 숨김) ·
|
|
336
|
+
* "md-progress" (그림을 올리는 동안 진행률)
|
|
329
337
|
*/
|
|
330
338
|
export const mdTools = () => {
|
|
331
339
|
const m = t.md;
|
|
@@ -345,6 +353,7 @@ export const mdTools = () => {
|
|
|
345
353
|
<button type="button" class="qe-md-btn" data-role="md-image" aria-label="${m.image}" title="${m.image}">
|
|
346
354
|
${toolIcon.image()}
|
|
347
355
|
</button>
|
|
356
|
+
<span class="qe-md-progress" data-role="md-progress" aria-live="polite" hidden></span>
|
|
348
357
|
</div>
|
|
349
358
|
`;
|
|
350
359
|
};
|
|
@@ -504,12 +513,14 @@ export const row = ({
|
|
|
504
513
|
${answer && answer.type !== "select" && answerControl(answer, index)}
|
|
505
514
|
${numbered && html`<span class="qe-option-no ec-list-no">${k.marker(index)}</span>`}
|
|
506
515
|
<span class="qe-option-field">
|
|
507
|
-
<
|
|
516
|
+
<textarea
|
|
508
517
|
class="qe-inline-input qe-option-text ec-field-input"
|
|
509
518
|
data-role="input"
|
|
519
|
+
data-soft-wrap
|
|
520
|
+
rows="1"
|
|
510
521
|
aria-label="${k.input(index)}"
|
|
511
522
|
placeholder="${k.input(index)}"
|
|
512
|
-
|
|
523
|
+
></textarea>
|
|
513
524
|
${answer &&
|
|
514
525
|
answer.type !== "select" &&
|
|
515
526
|
html`<span class="qe-correct-tag" aria-hidden="true">${t.correctTag}</span>`}
|
|
@@ -657,7 +668,7 @@ export const typeMenu = ({ label, types, value }) => html`
|
|
|
657
668
|
* data-role="type" (유형 버튼: 누르면 typeMenu, 브라우저 select를 둬도 됨) · data-role="up" · data-role="down" · data-role="delete"
|
|
658
669
|
* 문항이 하나뿐이면 ↑ · ↓는 숨긴다 (옮길 곳이 없음)
|
|
659
670
|
*/
|
|
660
|
-
export const card = ({ q, index, count, types, body }) => html`
|
|
671
|
+
export const card = ({ q, index, count, types, body, points }) => html`
|
|
661
672
|
<section class="qe-card ec-edit-card">
|
|
662
673
|
<header class="qe-card-head ec-edit-card-head">
|
|
663
674
|
<strong>${t.question(index + 1)}</strong>
|
|
@@ -674,6 +685,22 @@ export const card = ({ q, index, count, types, body }) => html`
|
|
|
674
685
|
<span class="qe-type-label">${typeName(types, q.type)}</span>
|
|
675
686
|
${icons.chevronDown()}
|
|
676
687
|
</button>
|
|
688
|
+
${points !== undefined &&
|
|
689
|
+
html`<label class="qe-points">
|
|
690
|
+
<span class="qe-points-label">${t.scoring.points(index + 1)}</span>
|
|
691
|
+
<input
|
|
692
|
+
type="number"
|
|
693
|
+
inputmode="numeric"
|
|
694
|
+
min="0"
|
|
695
|
+
max="100"
|
|
696
|
+
step="1"
|
|
697
|
+
class="qe-points-input"
|
|
698
|
+
data-role="points"
|
|
699
|
+
aria-label="${t.scoring.points(index + 1)}"
|
|
700
|
+
/>
|
|
701
|
+
<span class="qe-points-unit" aria-hidden="true">${t.scoring.unit}</span>
|
|
702
|
+
</label>
|
|
703
|
+
<span class="qe-head-sep" aria-hidden="true"></span>`}
|
|
677
704
|
<button
|
|
678
705
|
type="button"
|
|
679
706
|
class="ec-icon-button"
|
|
@@ -707,6 +734,31 @@ export const card = ({ q, index, count, types, body }) => html`
|
|
|
707
734
|
</section>
|
|
708
735
|
`;
|
|
709
736
|
|
|
737
|
+
/**
|
|
738
|
+
* 부분 채점 설정 (문제가 2개 이상일 때 편집 화면 맨 위, 연주님 부분 채점 UI): 스위치 · 안내, 켜면 배점 방식 · 합계 · 동일 점수 버튼.
|
|
739
|
+
* data-role="partial"(스위치) · "sum"(합계 줄, data-mode="equal|custom") · "mode" · "total" · "equal" · "note"
|
|
740
|
+
*/
|
|
741
|
+
export const scoreSettings = ({ partial }) => html`
|
|
742
|
+
<section class="qe-score" data-role="score-settings">
|
|
743
|
+
<label class="qe-score-switch">
|
|
744
|
+
<span class="qe-sw">
|
|
745
|
+
<input type="checkbox" role="switch" data-role="partial" ${partial && "checked"} />
|
|
746
|
+
<span class="qe-sw-track" aria-hidden="true"></span>
|
|
747
|
+
</span>
|
|
748
|
+
<span class="qe-score-title">${t.scoring.toggle}</span>
|
|
749
|
+
<span class="qe-score-hint">${partial ? t.scoring.hintOn : t.scoring.hintOff}</span>
|
|
750
|
+
</label>
|
|
751
|
+
<div class="qe-score-sum" data-role="sum" ${!partial && "hidden"}>
|
|
752
|
+
<div class="qe-score-row">
|
|
753
|
+
<span class="qe-score-mode" data-role="mode"></span>
|
|
754
|
+
<span class="qe-score-total" data-role="total" role="status"></span>
|
|
755
|
+
<button type="button" class="qe-score-equal" data-role="equal">${t.scoring.equal}</button>
|
|
756
|
+
</div>
|
|
757
|
+
<p class="qe-score-note" data-role="note"></p>
|
|
758
|
+
</div>
|
|
759
|
+
</section>
|
|
760
|
+
`;
|
|
761
|
+
|
|
710
762
|
/** 저장하지 못한 정답 문제 (정답 자리 위). data-role="answer-error" */
|
|
711
763
|
export const answerError = ({ text }) =>
|
|
712
764
|
html`<p class="qe-answer-error" data-role="answer-error" role="alert">
|
|
@@ -738,12 +790,14 @@ export const answersIntro = ({ text }) =>
|
|
|
738
790
|
*/
|
|
739
791
|
export const textAnswerRow = ({ index, canDelete }) => html`
|
|
740
792
|
<div class="qe-option qe-text-answer ec-list-row">
|
|
741
|
-
<
|
|
793
|
+
<textarea
|
|
742
794
|
class="qe-inline-input qe-option-text ec-field-input"
|
|
743
795
|
data-role="input"
|
|
796
|
+
data-soft-wrap
|
|
797
|
+
rows="1"
|
|
744
798
|
aria-label="${ta.textInput(index)}"
|
|
745
799
|
placeholder="${ta.textInput(index)}"
|
|
746
|
-
|
|
800
|
+
></textarea>
|
|
747
801
|
<button
|
|
748
802
|
type="button"
|
|
749
803
|
class="ec-icon-button ec-danger"
|
|
@@ -782,12 +836,14 @@ export const groupBox = ({ letter, canDelete, rows, add, nameLabel, namePlacehol
|
|
|
782
836
|
<div class="qe-group" data-group-box>
|
|
783
837
|
<div class="qe-group-head">
|
|
784
838
|
<span class="qe-group-badge">${letter}</span>
|
|
785
|
-
<
|
|
839
|
+
<textarea
|
|
786
840
|
class="qe-inline-input qe-group-name ec-field-input"
|
|
787
841
|
data-role="group-name"
|
|
842
|
+
data-soft-wrap
|
|
843
|
+
rows="1"
|
|
788
844
|
aria-label="${nameLabel}"
|
|
789
845
|
placeholder="${namePlaceholder}"
|
|
790
|
-
|
|
846
|
+
></textarea>
|
|
791
847
|
<button
|
|
792
848
|
type="button"
|
|
793
849
|
class="ec-icon-button ec-danger"
|
|
@@ -22,3 +22,17 @@ export const loading = () => html`
|
|
|
22
22
|
export const someWrong = () => html`
|
|
23
23
|
<p class="qz-result qz-overall" role="status" hidden>${texts.learn.someWrong}</p>
|
|
24
24
|
`;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 부분 점수(partial_pattern)가 100점보다 낮을 때 결과 상자 안 (위 한 줄과 같은 .qz-overall 자리에 넣음, 연주님 부분 채점 UI):
|
|
28
|
+
* 점수 · "아쉬워요!" · 안내 · 오른쪽 아래 마스코트. 100점이면 상자를 숨긴다 (만점 축하는 LXP 화면이 맡음)
|
|
29
|
+
* 마스코트 그림은 public/img/mascot-half.webp (실행 중 문자열 경로로 받는 파일이라 public/, zip에는 img/mascot-half.webp. 장식이라 alt 없음)
|
|
30
|
+
*/
|
|
31
|
+
export const partialScore = ({ score }) => html`
|
|
32
|
+
<strong class="qz-overall-score"><span>${score}</span><small>${texts.learn.scoreUnit}</small></strong>
|
|
33
|
+
<span class="qz-overall-text">
|
|
34
|
+
<strong class="qz-overall-title">${texts.learn.scoreTitle}</strong>
|
|
35
|
+
<span class="qz-overall-hint">${texts.learn.scoreSub}</span>
|
|
36
|
+
</span>
|
|
37
|
+
<img class="qz-overall-img" src="img/mascot-half.webp" alt="" />
|
|
38
|
+
`;
|