@eliceio/cdk-cli 1.1.0 → 1.2.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.
Files changed (75) hide show
  1. package/README.md +65 -38
  2. package/es/cli.js +35 -2
  3. package/es/commands/create/index.js +2 -2
  4. package/es/commands/dev/index.d.ts +8 -3
  5. package/es/commands/dev/index.js +72 -3
  6. package/es/commands/doctor/index.d.ts +1 -1
  7. package/es/commands/doctor/index.js +10 -13
  8. package/es/commands/setup/index.d.ts +1 -1
  9. package/es/commands/setup/index.js +4 -3
  10. package/es/commands/uninstall/index.d.ts +1 -1
  11. package/es/commands/uninstall/index.js +7 -30
  12. package/es/core/config.d.ts +2 -2
  13. package/es/core/config.js +2 -2
  14. package/es/core/skills.d.ts +22 -4
  15. package/es/core/skills.js +89 -17
  16. package/es/dev/browser.d.ts +22 -0
  17. package/es/dev/browser.js +105 -0
  18. package/es/dev/check.d.ts +84 -0
  19. package/es/dev/check.js +326 -0
  20. package/es/dev/host-page.js +10 -0
  21. package/es/dev/mock-api.js +1 -1
  22. package/es/dev/server.d.ts +2 -0
  23. package/es/dev/server.js +1 -0
  24. package/es/rules/check.js +1 -1
  25. package/es/rules/manifest.d.ts +1 -1
  26. package/es/rules/manifest.js +2 -2
  27. package/es/test-old-skill.d.ts +5 -0
  28. package/package.json +3 -2
  29. package/skills/_shared/always.md +13 -5
  30. package/skills/{elice-content-guide/topics → _shared/references}/00-what-the-person-decides.md +2 -2
  31. package/skills/{elice-content-guide/topics → _shared/references}/02-design-the-material.md +13 -4
  32. package/skills/{elice-content-guide/topics → _shared/references}/03-create-the-project.md +2 -2
  33. package/skills/_shared/references/05-screen-code.md +169 -0
  34. package/skills/{elice-content-guide/topics → _shared/references}/06-using-the-quiz-template.md +4 -3
  35. package/skills/{elice-content-guide/topics → _shared/references}/07-move-existing-html.md +1 -1
  36. package/skills/_shared/references/08-fix-check-errors.md +28 -0
  37. package/skills/_shared/references/09-check.md +29 -0
  38. package/skills/_shared/references/10-build.md +8 -0
  39. package/skills/_shared/references/12-upload-with-the-material-mcp.md +83 -0
  40. package/skills/elice-content-check/SKILL.md +7 -9
  41. package/skills/elice-content-create/SKILL.md +12 -10
  42. package/skills/elice-content-migrate/SKILL.md +10 -8
  43. package/skills/elice-content-publish/SKILL.md +10 -8
  44. package/templates/_shared/lib/cdk-mock.d.ts +1 -1
  45. package/templates/_shared/lib/cdk-mock.js +2 -2
  46. package/templates/_shared/lib/elice-content.css +1 -1
  47. package/templates/_shared/lib/elice-content.d.ts +1 -1
  48. package/templates/_shared/lib/elice-content.js +35 -18
  49. package/templates/blank/README.md +24 -21
  50. package/templates/blank/screens/edit.js +1 -1
  51. package/templates/blank/template.json +1 -1
  52. package/templates/quiz/README.md +8 -7
  53. package/templates/quiz/core/editor.js +141 -4
  54. package/templates/quiz/core/model.js +4 -3
  55. package/templates/quiz/metadata.json +1 -1
  56. package/templates/quiz/screens/edit.js +673 -162
  57. package/templates/quiz/screens/learn.js +1 -1
  58. package/templates/quiz/styles.css +557 -73
  59. package/templates/quiz/template.json +2 -2
  60. package/templates/quiz/ui/templates/edit.d.ts +1 -1
  61. package/templates/quiz/ui/templates/edit.js +417 -76
  62. package/templates/quiz/ui/templates/page.js +2 -17
  63. package/templates/quiz/ui/templates/question.js +1 -1
  64. package/templates/quiz/ui/texts.js +40 -27
  65. package/skills/elice-content-guide/SKILL.md +0 -42
  66. package/skills/elice-content-guide/topics/05-screen-code.md +0 -132
  67. package/skills/elice-content-guide/topics/08-fix-check-errors.md +0 -27
  68. package/skills/elice-content-guide/topics/09-check.md +0 -11
  69. package/skills/elice-content-guide/topics/10-build.md +0 -8
  70. package/skills/elice-content-guide/topics/12-upload-with-the-material-mcp.md +0 -41
  71. package/templates/quiz/instructor.html +0 -17
  72. package/templates/quiz/screens/instructor.js +0 -33
  73. /package/skills/{elice-content-guide/topics → _shared/references}/01-check-the-environment.md +0 -0
  74. /package/skills/{elice-content-guide/topics → _shared/references}/04-rules.md +0 -0
  75. /package/skills/{elice-content-guide/topics → _shared/references}/11-more.md +0 -0
@@ -18,7 +18,7 @@ else root.replaceChildren(app.emptyState());
18
18
 
19
19
  function show() {
20
20
  const { title, description, questions = [] } = app.content;
21
- // 학생 화면에는 문항 유형을 보이지 않는다 (무엇을 할지는 질문 문장이 알려 줌). 교육자 화면에는 보인다
21
+ // 문항 유형은 보이지 않는다 (무엇을 할지는 질문 문장이 알려 줌). 교육자도 이 화면에서 풀어 본다 (교육자 화면 없음)
22
22
  const views = questions.map((q, i) =>
23
23
  renderQuestion(q, i, {
24
24
  templates,
@@ -1,24 +1,7 @@
1
1
  /* 퀴즈 앱 스타일. 색 · 간격 · 모서리 값은 ui/theme.css(그 아래는 EDS 토큰 lib/elice-tokens.css), 모양은 EDS 컴포넌트 명세를 따릅니다
2
- 보기 = RadioCard · 유형 표시(교육자) = Tag(muted) · 배지 = Tag(filled) · 해설 = Accordion */
2
+ 보기 = RadioCard · 유형 표시 = Tag(muted) · 해설 = Accordion */
3
3
 
4
- /* ---------- 학생 · 교육자 ---------- */
5
- /* Tag filled primary medium: 24px, 모서리 6px, 11px / 700 */
6
- .qz-badge {
7
- align-self: flex-start;
8
- display: inline-flex;
9
- align-items: center;
10
- height: 24px;
11
- padding: 0 6px;
12
- border-radius: 6px;
13
- font-size: 11px;
14
- font-weight: var(--eds-fw-bold);
15
- color: var(--qz-accent-contrast);
16
- background: var(--qz-accent);
17
- }
18
- .qz-badge.dark {
19
- background: var(--eds-secondary-main);
20
- color: var(--eds-secondary-contrast-text);
21
- }
4
+ /* ---------- 학생 ---------- */
22
5
  .qz-title {
23
6
  margin: 0;
24
7
  }
@@ -30,19 +13,6 @@
30
13
  font-size: var(--eds-fs-caption);
31
14
  margin: 0;
32
15
  }
33
- .qz-summary {
34
- display: flex;
35
- flex-direction: column;
36
- gap: 6px;
37
- padding: 16px 20px;
38
- border: 1px solid var(--qz-question-border);
39
- border-radius: var(--qz-radius-card);
40
- background: var(--qz-surface);
41
- }
42
- .qz-summary p {
43
- margin: 0;
44
- }
45
-
46
16
  .qz-question {
47
17
  margin: 0;
48
18
  padding: var(--qz-card-padding);
@@ -406,7 +376,7 @@
406
376
  .qz-group:hover .ec-dropzone {
407
377
  border-color: var(--qz-accent);
408
378
  }
409
- /* 읽기 전용(교육자 화면 · 튜터링): 놓으라는 안내 · 누르는 손 모양을 감춘다 (빈 칸 자리는 그대로) */
379
+ /* 읽기 전용(disabled로 그린 문항): 놓으라는 안내 · 누르는 손 모양을 감춘다 (빈 칸 자리는 그대로) */
410
380
  .qz-question:disabled .qz-group {
411
381
  cursor: default;
412
382
  }
@@ -462,10 +432,6 @@
462
432
  grid-row: 2;
463
433
  grid-column: 3;
464
434
  }
465
- /* 좁은 화면의 그룹 고르기는 보기 글 아래 줄이라 열 머리를 두지 않는다 (고르기 안의 이름으로 알 수 있음) */
466
- .qe-option.qe-answer-head-select {
467
- display: none;
468
- }
469
435
  }
470
436
 
471
437
  /* ---------- 편집 ---------- */
@@ -474,7 +440,7 @@
474
440
  flex-direction: column;
475
441
  gap: 16px;
476
442
  padding: var(--qz-card-padding);
477
- border: 1px solid var(--qz-border);
443
+ border: 0;
478
444
  border-radius: var(--qz-radius-card);
479
445
  background: var(--qz-surface);
480
446
  }
@@ -490,6 +456,8 @@
490
456
  .qe-card-head > strong {
491
457
  flex: none;
492
458
  white-space: nowrap;
459
+ /* <strong>의 기본 굵기(bolder)를 쓰지 않고 semibold로 고정 */
460
+ font-weight: var(--eds-fw-semibold);
493
461
  }
494
462
  .qe-type {
495
463
  width: auto;
@@ -596,42 +564,36 @@
596
564
  min-height: 40px;
597
565
  cursor: pointer;
598
566
  }
567
+ /* 정답 표시: 고르면 보라색 채움 + 흰 체크 (단일은 원, 복수는 둥근 사각형) */
599
568
  .qe-answer input {
600
- width: 18px;
601
- height: 18px;
569
+ appearance: none;
570
+ -webkit-appearance: none;
571
+ width: 22px;
572
+ height: 22px;
602
573
  margin: 0;
603
574
  padding: 0;
604
- accent-color: var(--qz-accent);
575
+ border: 2px solid var(--eds-action-disabled, #c4cad1);
576
+ border-radius: 50%;
577
+ background: var(--qz-surface) center / 14px no-repeat;
605
578
  cursor: pointer;
606
579
  }
607
- /* 정답으로 고른 줄 (그룹은 그룹에 넣은 보기) */
608
- .qe-option[data-correct] {
609
- background: var(--qz-accent-soft);
610
- }
611
- /* 목록 위 "정답" 열 머리: 줄의 정답 칸과 같은 자리 */
612
- .qe-answer-head {
613
- color: var(--eds-text-secondary);
614
- font-size: var(--eds-fs-caption);
615
- font-weight: var(--eds-fw-bold);
616
- }
617
- .qe-handle-space {
618
- flex: none;
619
- width: 32px;
580
+ .qe-answer input[type='checkbox'] {
581
+ border-radius: 6px;
620
582
  }
621
- /* 그룹 분류: 그룹 고르기는 보기 글 뒤, 삭제 버튼(40px) 앞 */
622
- .qe-answer-head-select {
623
- justify-content: flex-end;
583
+ .qe-answer input:checked {
584
+ border-color: var(--qz-accent);
585
+ background-color: var(--qz-accent);
586
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
624
587
  }
625
- .qe-answer-head-select .qe-handle-space {
626
- display: none;
588
+ .qe-answer input:focus-visible {
589
+ outline: 2px solid var(--qz-accent);
590
+ outline-offset: 2px;
627
591
  }
628
- .qe-answer-head-select .qe-answer-col {
629
- flex: 0 1 160px;
630
- justify-content: flex-start;
631
- margin-right: 46px;
632
- padding-left: 12px;
592
+ /* 정답으로 고른 줄 (그룹은 그룹에 넣은 보기): 윤곽선 없는 칸이라 배경 없이 보라 밑줄로 (체크 원과 함께 알림) */
593
+ .qe-option[data-correct] .qe-option-text {
594
+ border-bottom-color: var(--qz-accent);
633
595
  }
634
- /* 그룹 분류 보기 줄의 정답 그룹 고르기 */
596
+ /* 그룹 분류 보기 줄의 정답 그룹 고르기: 보기 글 뒤, 삭제 버튼(40px) 앞 */
635
597
  .qe-answer-group {
636
598
  flex: 0 1 160px;
637
599
  width: auto;
@@ -670,18 +632,540 @@
670
632
  align-self: stretch;
671
633
  border-style: dashed;
672
634
  }
673
- /* 표시 옵션 (답안 순서 섞기 · 해설): 보기 · 정답과 줄로 나눔 */
674
- .qe-display {
675
- padding-top: 16px;
676
- border-top: 1px solid var(--ec-line);
635
+ /* 보기 · 그룹 추가: EDS Button contained · color inherit · medium (elice-design-system@7f3366a, button.ts).
636
+ 회색 채움(라이트 bluegray200, hover bluegray300 · 다크 gray700, hover gray800), 14px / 600, 여백 8px 16px, 모서리 8px.
637
+ 문항 추가(보라 점선)와 구분한다. 키트 기본 button의 min-height 44px는 풀어 40px로 */
638
+ .qe-options > .qe-add {
639
+ min-height: 0;
640
+ padding: 8px 16px;
641
+ border: 0;
642
+ border-radius: 8px;
643
+ background: var(--eds-color-bluegray-200);
644
+ color: var(--eds-text-primary);
645
+ }
646
+ @media (hover: hover) {
647
+ .qe-options > .qe-add:hover {
648
+ background: var(--eds-color-bluegray-300);
649
+ }
650
+ }
651
+ .qe-options > .qe-add:focus-visible,
652
+ .qe-options > .qe-add:active {
653
+ background: color-mix(in srgb, var(--eds-color-bluegray-300) 70%, white);
654
+ }
655
+ .qe-options > .qe-add:disabled {
656
+ background: var(--eds-action-disabled-background);
657
+ color: var(--eds-action-disabled);
658
+ }
659
+ :root[data-eds-theme='dark'] .qe-options > .qe-add {
660
+ background: var(--eds-color-gray-700);
677
661
  }
662
+ :root[data-eds-theme='dark'] .qe-options > .qe-add:hover {
663
+ background: var(--eds-color-gray-800);
664
+ }
665
+ /* 표시 옵션 (답안 순서 섞기 · 해설): 보기 · 정답과 줄로 나눔 */
666
+ /* EDS Chip medium (elice-design-system@7f3366a, chip.spec.md): 높이 32px, 모서리 32px, 라벨 13px / 500, 아이콘 20px(왼쪽 8px, 라벨과 7px).
667
+ 꺼짐 = outlined, 켜짐 = muted primary (배경 primary 15% + 흰색, 글자 primary dark · 다크 테마는 배경 primary 30% + 검정, 글자 primary light).
668
+ 켜짐은 색 외에 체크 아이콘으로도 알린다. 체크박스는 화면에서만 숨김 */
678
669
  .qe-switch {
670
+ position: relative;
671
+ display: inline-flex;
672
+ align-items: center;
673
+ gap: 7px;
674
+ height: 32px;
675
+ padding: 0 11px 0 8px;
676
+ border: 1px solid var(--eds-surface-border);
677
+ border-radius: 32px;
678
+ background: transparent;
679
+ color: var(--eds-text-primary);
680
+ font-size: 13px;
681
+ font-weight: var(--eds-fw-medium);
682
+ line-height: 1.38;
683
+ cursor: pointer;
684
+ user-select: none;
685
+ }
686
+ @media (hover: hover) {
687
+ .qe-switch:hover {
688
+ background: var(--eds-action-hover);
689
+ }
690
+ }
691
+ .qe-switch input {
692
+ position: absolute;
693
+ width: 1px;
694
+ height: 1px;
695
+ opacity: 0;
696
+ pointer-events: none;
697
+ }
698
+ .qe-chip-icon {
699
+ display: inline-flex;
700
+ }
701
+ .qe-chip-on {
702
+ display: none;
703
+ }
704
+ .qe-switch:has(input:checked) .qe-chip-on {
705
+ display: inline-flex;
706
+ }
707
+ .qe-switch:has(input:checked) .qe-chip-off {
708
+ display: none;
709
+ }
710
+ .qe-switch:has(input:checked) {
711
+ border-color: transparent;
712
+ background: color-mix(in srgb, var(--eds-primary-main) 15%, white);
713
+ color: var(--eds-primary-dark);
714
+ }
715
+ :root[data-eds-theme='dark'] .qe-switch:has(input:checked) {
716
+ background: color-mix(in srgb, var(--eds-primary-main) 30%, black);
717
+ color: var(--eds-primary-light);
718
+ }
719
+ .qe-switch:has(input:focus-visible) {
720
+ outline: 2px solid var(--qz-accent);
721
+ outline-offset: 2px;
722
+ }
723
+ /* 라벨 없는 바로 쓰는 칸 (퀴즈 제목 · 안내, 질문 · 설명): 테두리 대신 밑줄, 초점이면 강조색 굵은 밑줄 + 옅은 배경 */
724
+ .qe-inline {
725
+ display: flex;
726
+ flex-direction: column;
727
+ gap: 4px;
728
+ }
729
+ .qe-inline-input {
730
+ width: 100%;
731
+ padding: 8px 12px;
732
+ border: 0;
733
+ border-bottom: 1px solid var(--qz-border);
734
+ border-radius: var(--eds-radius) var(--eds-radius) 0 0;
735
+ background: transparent;
736
+ color: var(--eds-text-primary);
737
+ line-height: 1.5;
738
+ transition: background-color 120ms ease, box-shadow 120ms ease;
739
+ }
740
+ .qe-inline-input::placeholder {
741
+ color: var(--eds-text-disabled);
742
+ }
743
+ /* 윤곽선 없는 입력 칸은 배경색을 쓰지 않는다 (hover는 밑줄 색, 초점은 굵은 보라 밑줄로 알림) */
744
+ .qe-inline-input:hover {
745
+ border-bottom-color: var(--eds-color-bluegray-400);
746
+ }
747
+ .qe-inline-input:focus {
748
+ outline: none;
749
+ border-bottom-color: transparent;
750
+ box-shadow: inset 0 -2px 0 var(--qz-accent);
751
+ }
752
+ /* 비운 채 저장한 필수 칸 */
753
+ .qe-inline-input[aria-invalid='true'] {
754
+ border-bottom-color: transparent;
755
+ box-shadow: inset 0 -2px 0 var(--eds-error-main);
756
+ }
757
+ /* 여러 줄 칸: 글에 맞춰 높이가 는다 (field-sizing을 모르는 브라우저는 동작이 높이를 맞춤) */
758
+ textarea.qe-inline-input {
759
+ resize: none;
760
+ overflow: hidden;
761
+ min-height: 0;
762
+ field-sizing: content;
763
+ }
764
+ .qe-inline-title .qe-inline-input {
765
+ font-size: var(--eds-fs-h6);
766
+ font-weight: var(--eds-fw-bold);
767
+ }
768
+ .qe-inline-question .qe-inline-input {
769
+ font-size: var(--eds-fs-subtitle2);
770
+ font-weight: var(--eds-fw-semibold);
771
+ }
772
+ .qe-inline-body .qe-inline-input {
773
+ font-size: var(--eds-fs-body2);
774
+ color: var(--eds-text-secondary);
775
+ }
776
+ /* 글자 수는 칸에 초점이 있을 때만 */
777
+ .qe-inline {
778
+ position: relative;
779
+ }
780
+ .qe-inline .qe-count {
781
+ position: absolute;
782
+ top: 100%;
783
+ right: 0;
784
+ margin-top: 2px;
785
+ visibility: hidden;
786
+ }
787
+ .qe-inline:focus-within .qe-count {
788
+ visibility: visible;
789
+ }
790
+ /* 퀴즈 제목 · 안내: 흰 카드. 문항 카드보다 여백(28px)과 모서리(16px)를 키우고 제목과 안내 사이에 구분선을 둔다.
791
+ 입력 칸 밑줄은 평소에 없애고 (밑줄이 연달아 이어지는 번잡함), hover 때 연한 밑줄, 초점일 때 보라 굵은 밑줄로 알린다 */
792
+ .qe-quiz-info {
793
+ gap: 12px;
794
+ padding: 28px;
795
+ border: 0;
796
+ border-radius: 16px;
797
+ background: var(--qz-surface);
798
+ }
799
+ .qe-quiz-info .qe-inline-title {
800
+ padding-bottom: 12px;
801
+ border-bottom: 1px solid var(--eds-surface-border);
802
+ }
803
+ .qe-quiz-info .qe-inline-input {
804
+ border-bottom-color: transparent;
805
+ }
806
+ .qe-quiz-info .qe-inline-input:hover:not(:focus) {
807
+ border-bottom-color: var(--eds-color-bluegray-400);
808
+ }
809
+
810
+ /* 편집 화면: 화면 높이가 남으면 "초안에 반영" 바를 맨 아래 푸터에 두고, 내용이 길면 화면 아래에 붙여 둔다 */
811
+ body.qe-page {
812
+ min-height: 100vh;
813
+ min-height: 100dvh;
814
+ display: flex;
815
+ flex-direction: column;
816
+ padding: 24px 16px 0;
817
+ }
818
+ body.qe-page main {
819
+ width: 100%;
820
+ flex: 1;
821
+ padding-bottom: 24px;
822
+ }
823
+ body.qe-page .ec-submitbar {
824
+ max-width: none;
825
+ margin: 0 -16px;
826
+ padding: 12px max(16px, calc((100% - 720px) / 2));
827
+ z-index: 8;
828
+ }
829
+
830
+ /* 편집 화면 전체 배경은 EDS background.neutral (카드는 paper 색 그대로, 아래 바도 같은 색) */
831
+ :root:has(body.qe-page) {
832
+ --ec-bg: var(--eds-background-neutral);
833
+ }
834
+
835
+ /* 보기 제목줄: 제목 왼쪽, 보기 순서 섞기 토글 오른쪽 */
836
+ .qe-section-head {
837
+ display: flex;
838
+ align-items: center;
839
+ justify-content: space-between;
840
+ gap: 12px;
841
+ }
842
+ /* 필요할 때만 여는 칸 (설명 · 해설): 닫혀 있으면 글자 버튼만 */
843
+ .qe-reveal {
844
+ display: flex;
845
+ flex-direction: column;
846
+ align-items: flex-start;
847
+ }
848
+ .qe-reveal-body {
849
+ display: flex;
850
+ align-items: flex-start;
851
+ gap: 4px;
852
+ align-self: stretch;
853
+ }
854
+ .qe-reveal-body > .qe-inline {
855
+ flex: 1;
856
+ min-width: 0;
857
+ }
858
+ .qe-reveal [hidden] {
859
+ display: none;
860
+ }
861
+ /* EDS Button: variant outlined · color secondary · size small (elice-design-system@7f3366a, button.spec.md)
862
+ 13px / 600, 여백 4px 11px, 줄높이 22px, 모서리 6px, 테두리 surface.border, hover 테두리 bluegray400 + action.hover 배경,
863
+ 포커스 · 누름 배경 secondary 30%. 키트 기본 button의 min-height 44px는 이 버튼에서 풀어 준다 */
864
+ .qe-reveal-button {
865
+ min-height: 0;
866
+ padding: 4px 11px;
867
+ border: 1px solid var(--eds-surface-border);
868
+ border-radius: 6px;
869
+ background: transparent;
870
+ color: var(--eds-secondary-main);
871
+ font: inherit;
872
+ font-size: 13px;
873
+ font-weight: var(--eds-fw-semibold);
874
+ line-height: 22px;
875
+ cursor: pointer;
876
+ }
877
+ @media (hover: hover) {
878
+ .qe-reveal-button:hover {
879
+ border-color: var(--eds-color-bluegray-400);
880
+ background: var(--eds-action-hover);
881
+ }
882
+ :root[data-eds-theme='dark'] .qe-reveal-button:hover {
883
+ border-color: #ffffff80;
884
+ }
885
+ }
886
+ .qe-reveal-button:focus-visible,
887
+ .qe-reveal-button:active {
888
+ background: color-mix(in srgb, var(--eds-secondary-main) 30%, transparent);
889
+ }
890
+
891
+ /* 끌기 손잡이: 데스크톱(마우스) 환경에서는 줄 밖 왼쪽 여백에 두어 자리를 차지하지 않고,
892
+ 줄에 올리거나 초점이 있을 때만 보인다. 터치 환경과 좁은 화면에서는 줄 안에 항상 보인다 */
893
+ @media (hover: hover) and (pointer: fine) and (min-width: 768px) {
894
+ .qe-option {
895
+ position: relative;
896
+ }
897
+ .qe-option .qe-handle {
898
+ position: absolute;
899
+ left: -22px;
900
+ top: 50%;
901
+ width: 20px;
902
+ margin-top: -20px;
903
+ opacity: 0;
904
+ transition: opacity 120ms ease-in-out;
905
+ }
906
+ .qe-option:hover .qe-handle,
907
+ .qe-option:focus-within .qe-handle,
908
+ .qe-option[data-dragging] .qe-handle {
909
+ opacity: 1;
910
+ }
911
+ }
912
+
913
+ /* 해설: 닫혀 있으면 아이콘 + "해설 추가 +" 윤곽선 버튼, 열리면 카드 없이 머리줄(아이콘 · 이름 · 지우기) + 밑줄 입력 칸.
914
+ "보기" 소제목줄(이름 왼쪽, 조작 오른쪽)과 같은 구조 */
915
+ .qe-reveal-card .qe-reveal-button {
916
+ display: inline-flex;
917
+ align-items: center;
918
+ gap: 6px;
919
+ }
920
+ .qe-reveal-head > svg {
921
+ color: var(--qz-accent);
922
+ }
923
+ .qe-reveal-card .qe-reveal-body {
924
+ flex-direction: column;
925
+ align-items: stretch;
926
+ gap: 4px;
927
+ }
928
+ .qe-reveal-head {
679
929
  display: flex;
680
930
  align-items: center;
681
931
  gap: 8px;
932
+ font-size: var(--eds-fs-body2);
682
933
  }
683
- .qe-switch input {
684
- width: 18px;
685
- height: 18px;
686
- accent-color: var(--qz-accent);
934
+ .qe-reveal-head strong {
935
+ flex: none;
936
+ font-weight: var(--eds-fw-bold);
937
+ }
938
+ /* 이름 옆 보조 글자: 글을 써도 남는 안내 (좁으면 말줄임) */
939
+ .qe-reveal-hint {
940
+ min-width: 0;
941
+ overflow: hidden;
942
+ color: var(--eds-text-secondary);
943
+ font-size: var(--eds-fs-caption);
944
+ font-weight: var(--eds-fw-medium);
945
+ text-overflow: ellipsis;
946
+ white-space: nowrap;
947
+ }
948
+ .qe-reveal-head [data-role='reveal-close'] {
949
+ margin-left: auto;
950
+ }
951
+
952
+ /* 질문 칸 바로 아래 "설명 추가"는 칸에 붙여 둔다 */
953
+ .qe-inline + .qe-reveal {
954
+ margin-top: -8px;
955
+ }
956
+
957
+ /* EDS Snackbar (elice-design-system@7f3366a, snackbar.ts · SnackbarContent.tsx): 배경 background.snackbar, 글자 흰색(다크는 검정),
958
+ 모서리 12px, 글자 500, 그림자 elevation 4, info 아이콘은 info.light. 위치는 편집 영역과 같은 가운데 아래, 하단 바 높이만큼 올린다 */
959
+ .qe-snackbar {
960
+ position: fixed;
961
+ left: 50%;
962
+ transform: translateX(-50%);
963
+ bottom: 80px;
964
+ z-index: 20;
965
+ display: flex;
966
+ align-items: center;
967
+ max-width: min(480px, calc(100vw - 48px));
968
+ padding: 6px 8px 6px 16px;
969
+ border-radius: 12px;
970
+ background: var(--eds-background-snackbar);
971
+ color: var(--eds-common-white, #fff);
972
+ font-size: var(--eds-fs-body2);
973
+ font-weight: var(--eds-fw-medium);
974
+ line-height: 1.43;
975
+ box-shadow: var(--ec-shadow);
976
+ }
977
+ :root[data-eds-theme='dark'] .qe-snackbar {
978
+ color: #000;
979
+ }
980
+ .qe-snackbar-icon {
981
+ display: inline-flex;
982
+ margin-right: 8px;
983
+ color: var(--eds-info-light);
984
+ }
985
+ .qe-snackbar-text {
986
+ flex: 1;
987
+ padding: 8px 0;
988
+ }
989
+ /* EDS Button text small · color inherit (13px / 600, 여백 5px 12px, 모서리 6px). 키트 기본 button의 min-height 44px를 푼다 */
990
+ button.qe-snackbar-action {
991
+ flex: none;
992
+ min-height: 0;
993
+ margin-left: 16px;
994
+ padding: 5px 12px;
995
+ border: 0;
996
+ border-radius: 6px;
997
+ background: transparent;
998
+ color: inherit;
999
+ font-size: 13px;
1000
+ font-weight: var(--eds-fw-semibold);
1001
+ line-height: 22px;
1002
+ }
1003
+ button.qe-snackbar-action:hover {
1004
+ background: rgb(255 255 255 / 0.12);
1005
+ }
1006
+ :root[data-eds-theme='dark'] button.qe-snackbar-action:hover {
1007
+ background: rgb(0 0 0 / 0.08);
1008
+ }
1009
+ @media (max-width: 599.98px) {
1010
+ .qe-snackbar {
1011
+ left: 8px;
1012
+ right: 8px;
1013
+ transform: none;
1014
+ max-width: none;
1015
+ }
1016
+ }
1017
+
1018
+ /* 편집 화면 아이콘 버튼 (삭제 ✕ · 휴지통 · ↑ ↓): EDS IconButton default · size small (elice-design-system@7f3366a, icon-button.ts · spec).
1019
+ 아이콘 20px + 안쪽 여백 4px = 28px, 원형, 아이콘 색 action.active, hover 배경 action.hover,
1020
+ 누름 · 포커스 배경 background.inverse 8% (다크 16%). 삭제 ✕도 빨강이 아닌 같은 중립색 (hover도 동일) */
1021
+ .qe-card button.ec-icon-button,
1022
+ .qe-card button.ec-icon-button.ec-danger {
1023
+ width: 28px;
1024
+ height: 28px;
1025
+ min-height: 28px;
1026
+ padding: 0;
1027
+ border-radius: 50%;
1028
+ background: none;
1029
+ color: var(--eds-action-active);
1030
+ }
1031
+ .qe-card button.ec-icon-button svg {
1032
+ width: 20px;
1033
+ height: 20px;
1034
+ }
1035
+ @media (hover: hover) {
1036
+ .qe-card button.ec-icon-button:hover,
1037
+ .qe-card button.ec-icon-button.ec-danger:hover {
1038
+ background: var(--eds-action-hover);
1039
+ }
1040
+ }
1041
+ .qe-card button.ec-icon-button:active,
1042
+ .qe-card button.ec-icon-button:focus-visible,
1043
+ .qe-card button.ec-icon-button.ec-danger:active,
1044
+ .qe-card button.ec-icon-button.ec-danger:focus-visible {
1045
+ background: color-mix(in srgb, var(--eds-background-inverse) 8%, transparent);
1046
+ }
1047
+ :root[data-eds-theme='dark'] .qe-card button.ec-icon-button:active,
1048
+ :root[data-eds-theme='dark'] .qe-card button.ec-icon-button:focus-visible {
1049
+ background: color-mix(in srgb, var(--eds-background-inverse) 16%, transparent);
1050
+ }
1051
+ .qe-card button.ec-icon-button:disabled,
1052
+ .qe-card button.ec-icon-button.ec-danger:disabled {
1053
+ background: none;
1054
+ color: var(--eds-action-disabled);
1055
+ }
1056
+
1057
+ /* 문항 카드 머리의 삭제 · 순서 변경(↑ ↓): EDS IconButton outlined · size small (icon-button.ts)의 테두리 1px surface.border와 크기
1058
+ (아이콘 20px + 안쪽 여백 4px + 테두리 2px = 30px)를 따르되, 모양은 원형 대신 사각형 + 모서리 4px (디자인 요청).
1059
+ 보기 줄의 ✕는 테두리 없이 둔다 */
1060
+ .qe-card-head button.ec-icon-button {
1061
+ width: 30px;
1062
+ height: 30px;
1063
+ min-height: 30px;
1064
+ border: 1px solid var(--eds-surface-border);
1065
+ border-radius: 4px;
1066
+ }
1067
+
1068
+ /* "문항 N"과 유형 선택 사이: 머리줄 기본 간격(8px)에 4px을 더해 12px (좁은 화면은 4px + 4px) */
1069
+ .qe-card-head > strong {
1070
+ margin-right: 4px;
1071
+ }
1072
+
1073
+ /* 하단 바는 불투명하게: 전체 배경색(background.neutral, 투명도 4%)을 그대로 쓰면 뒤의 내용이 비쳐 겹쳐 보인다.
1074
+ 같은 색을 background.default 위에 합성해 같은 색으로 보이되 비치지 않게 한다 */
1075
+ body.qe-page .ec-submitbar {
1076
+ background:
1077
+ linear-gradient(var(--eds-background-neutral), var(--eds-background-neutral)),
1078
+ var(--eds-background-default);
1079
+ }
1080
+
1081
+ /* 하단 "초안에 반영" 버튼: EDS Button contained · color secondary (elice-design-system@7f3366a, button.ts).
1082
+ 배경 secondary.main, 글자 secondary.contrast-text, hover secondary.dark, 누름 · 포커스는 dark에 흰색 30%를 겹침 */
1083
+ body.qe-page .ec-submitbar button.ec-primary {
1084
+ background: var(--eds-secondary-main);
1085
+ color: var(--eds-secondary-contrast-text);
1086
+ }
1087
+ @media (hover: hover) {
1088
+ body.qe-page .ec-submitbar button.ec-primary:hover {
1089
+ background: var(--eds-secondary-dark);
1090
+ }
1091
+ }
1092
+ body.qe-page .ec-submitbar button.ec-primary:focus-visible,
1093
+ body.qe-page .ec-submitbar button.ec-primary:active {
1094
+ background: color-mix(in srgb, var(--eds-secondary-dark) 70%, white);
1095
+ }
1096
+ :root[data-eds-theme='dark'] body.qe-page .ec-submitbar button.ec-primary:focus-visible,
1097
+ :root[data-eds-theme='dark'] body.qe-page .ec-submitbar button.ec-primary:active {
1098
+ background: color-mix(in srgb, var(--eds-secondary-dark) 70%, black);
1099
+ }
1100
+ body.qe-page .ec-submitbar button.ec-primary:disabled {
1101
+ background: var(--eds-action-disabled-background);
1102
+ color: var(--eds-action-disabled);
1103
+ }
1104
+
1105
+ /* 정답 · 보기 제목 옆 안내: 제목과 같은 줄, 보조 글자 12px (caption). 좁으면 말줄임 */
1106
+ .qe-hint-inline {
1107
+ flex: 1;
1108
+ min-width: 0;
1109
+ overflow: hidden;
1110
+ color: var(--eds-text-secondary);
1111
+ font-size: var(--eds-fs-caption);
1112
+ font-weight: var(--eds-fw-medium);
1113
+ text-overflow: ellipsis;
1114
+ white-space: nowrap;
1115
+ }
1116
+
1117
+ /* 그룹 분류 편집판 (그룹별 상자): 그룹마다 상자, 그 안에 보기. 왼쪽 여백은 끌기 손잡이 자리 */
1118
+ .qe-groups {
1119
+ display: flex;
1120
+ flex-direction: column;
1121
+ gap: 12px;
1122
+ }
1123
+ .qe-group {
1124
+ display: flex;
1125
+ flex-direction: column;
1126
+ gap: 8px;
1127
+ padding: 16px 16px 16px 24px;
1128
+ border-radius: 12px;
1129
+ background: var(--eds-background-neutral);
1130
+ }
1131
+ .qe-group[data-over] {
1132
+ outline: 2px dashed var(--qz-accent);
1133
+ outline-offset: -2px;
1134
+ }
1135
+ .qe-group-none {
1136
+ border: 1px dashed var(--eds-surface-border);
1137
+ background: transparent;
1138
+ }
1139
+ .qe-group-head {
1140
+ display: flex;
1141
+ align-items: center;
1142
+ gap: 8px;
1143
+ }
1144
+ .qe-group-none .qe-group-head strong {
1145
+ font-weight: var(--eds-fw-bold);
1146
+ }
1147
+ .qe-group-badge {
1148
+ flex: none;
1149
+ display: inline-flex;
1150
+ align-items: center;
1151
+ justify-content: center;
1152
+ width: 24px;
1153
+ height: 24px;
1154
+ border-radius: 6px;
1155
+ background: var(--qz-accent);
1156
+ color: var(--qz-accent-contrast);
1157
+ font-size: var(--eds-fs-caption);
1158
+ font-weight: var(--eds-fw-bold);
1159
+ }
1160
+ .qe-group-name {
1161
+ flex: 1;
1162
+ min-width: 0;
1163
+ font-weight: var(--eds-fw-bold);
1164
+ }
1165
+
1166
+ /* 순서 맞추기: 번호 목록도 끌어 놓을 곳이라 놓을 수 있을 때 윤곽을 보인다 */
1167
+ .qe-options[data-group-box][data-over] {
1168
+ outline: 2px dashed var(--qz-accent);
1169
+ outline-offset: 4px;
1170
+ border-radius: 8px;
687
1171
  }