@ihabdevteam/core 0.370.0 → 0.372.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.
@@ -1770,7 +1770,7 @@ export declare function copyText(text: string): Promise<boolean>;
1770
1770
  *
1771
1771
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
1772
1772
  */
1773
- export declare const CORE_VERSION = "0.370.0";
1773
+ export declare const CORE_VERSION = "0.372.0";
1774
1774
 
1775
1775
  /** @public */
1776
1776
  declare const coreDefault: Record<string, unknown>;
@@ -11481,7 +11481,7 @@ export declare interface WordSearchResultWord {
11481
11481
  * 표시(items)·편집(editCells) 두 모드를 지원한다.
11482
11482
  * @public
11483
11483
  */
11484
- export declare function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, renderCellAction, showFillerAdd, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): JSX.Element;
11484
+ export declare function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, renderCellAction, showFillerAdd, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): JSX.Element;
11485
11485
 
11486
11486
  export declare function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, items, onSaveComplete, onLoad, onRemoveItem, onReset, resetLabel, saveButtonLabel, secondarySaveButtonLabel, onReorder, showCellCount, onAddItem, className, renderSavePopup, renderWordSearch, hideControls, saveOnly, tableName, nameValue, onNameChange, descriptionValue, onDescriptionChange, namePlaceholder, descriptionPlaceholder, existingNames, editingName, onCancel, initialItemsPerPage, renderCellAction, actionsLeftExtra }: WordTableBlockProps): JSX.Element;
11487
11487
 
@@ -11827,6 +11827,20 @@ export declare interface WordTableProps {
11827
11827
  className?: string;
11828
11828
  orientation?: WordTableOrientation;
11829
11829
  contentTypes?: WordTableContentType[];
11830
+ /**
11831
+ * 표의 **절반을 쓰는 머리 칸** — 가로면 왼쪽 절반, 세로면 위쪽 절반. 나머지 절반에
11832
+ * `items` 가 격자로 선다. 칸 속은 표의 다른 칸과 같은 조각(`WordCell`)으로 그린다.
11833
+ *
11834
+ * 활용표처럼 **모든 칸이 같은 낱말**인 표를 위해 둔다 — 그 표를 그냥 그리면 같은 그림이
11835
+ * 칸마다 되풀이된다. 머리 칸에만 그림을 두고 나머지는 글자만 세우는 꼴이다
11836
+ * (`baseContentTypes` 로 머리 칸만 따로 가린다).
11837
+ *
11838
+ * 표시 모드에서만 받는다 — `editCells` 로 그리는 편집 격자는 칸을 **번호로** 세므로
11839
+ * 걸친 칸이 들어오면 활성 칸·추가 자리가 어긋난다.
11840
+ */
11841
+ baseItem?: WordSearchResultItem;
11842
+ /** 머리 칸에만 걸리는 보임 — 안 주면 `contentTypes` 를 따른다. */
11843
+ baseContentTypes?: WordTableContentType[];
11830
11844
  cutLine?: WordTableCutLine;
11831
11845
  showOutline?: boolean;
11832
11846
  showDivLine?: boolean;
@@ -11997,10 +12011,7 @@ export declare interface WordTableProps {
11997
12011
  };
11998
12012
  }
11999
12013
 
12000
- /**
12001
- * @public 단어표 내용 미니 미리보기(그리드 썸네일).
12002
- * 단어표 불러오기 팝업·나의 단어표 카드 등에서 공유하는 '문서형' 미리보기.
12003
- */
12014
+ /** @public 단어표 내용 미니 미리보기(그리드 썸네일). */
12004
12015
  export declare function WordTableThumbnail({ items, className }: {
12005
12016
  items: WordSearchResultItem[];
12006
12017
  className?: string;
@@ -59,3 +59,12 @@
59
59
  미리보기에서는 1px 로도 두 낱말이 충분히 갈린다. */
60
60
  margin: 1px 0;
61
61
  }
62
+
63
+ /* **그 밖 몇 칸.** 여덟을 넘으면 여덟째가 이 칸이 된다(`MAX_THUMB_CELLS`).
64
+ 글자는 낱말 칸과 같은 꼴로 두되 흐리게 — 낱말이 아니라 세는 수라 읽는 차례가 뒤다. */
65
+ .word-table-thumb__cell--more {
66
+ justify-content: center;
67
+ }
68
+ .word-table-thumb__more {
69
+ color: var(--color-gray);
70
+ }
@@ -1,9 +1,6 @@
1
1
  import type { WordSearchResultItem } from '../../types/wordSearch';
2
2
  import './WordTableThumbnail.css';
3
- /**
4
- * @public 단어표 내용 미니 미리보기(그리드 썸네일).
5
- * 단어표 불러오기 팝업·나의 단어표 카드 등에서 공유하는 '문서형' 미리보기.
6
- */
3
+ /** @public 단어표 내용 미니 미리보기(그리드 썸네일). */
7
4
  export default function WordTableThumbnail({ items, className }: {
8
5
  items: WordSearchResultItem[];
9
6
  className?: string;
@@ -1,19 +1,60 @@
1
+ 'use client';
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { cx } from '../../utils/cx';
3
4
  import { Fragment } from 'react';
5
+ import { useTranslation } from 'react-i18next';
4
6
  import './WordTableThumbnail.css';
5
7
  /**
6
- * @public 단어표 내용 미니 미리보기(그리드 썸네일).
7
- * 단어표 불러오기 팝업·나의 단어표 카드 등에서 공유하는 '문서형' 미리보기.
8
+ * **썸네일이 그리는 칸은 여덟까지다.**
9
+ *
10
+ * 전에는 항목을 전부 그려 `rows = ceil(n/2)` 로 줄이 늘었다. 상한이 16 이 되면 8줄이라,
11
+ * 이 썸네일을 쓰는 네 자리(나의 단어표 · 말귀자료실 · 채점 추가 · 어드민 자료실)의 목록이
12
+ * 빽빽해진다. 그래서 여덟을 넘으면 **앞 일곱 + 여덟째에 `+N`** 으로 묶는다(2026-10-27).
13
+ *
14
+ * ## 높이가 **두 가지**다 — 140px 이라 믿고 셈하지 말 것
15
+ *
16
+ * `.word-table-thumb` 는 `height: 140px` 인데, 카드(`WordTableButton`)가 같은 요소에
17
+ * `.word-table-button__thumb { height: 290px }` 를 걸어 **덮는다.** 둘 다 클래스 하나라
18
+ * 특이도가 같아 **나중에 실린 쪽이 이기고**, `WordTableButton.tsx` 가 썸네일을 먼저(6줄)
19
+ * 제 CSS 를 나중(11줄) 불러서 **290px 가 이긴다**(지어 둔 `components.esm.css` 에서
20
+ * `.word-table-thumb` 314082 → `.word-table-button__thumb` 315638 바이트로 확인).
21
+ * 그 줄 순서가 뒤집히면 카드가 **조용히** 140px 로 내려앉는다 —
22
+ * `test/thumbHeightOverride1027.test.ts` 가 그 자리를 지킨다.
23
+ *
24
+ * 한 줄 높이를 브라우저에서 쟀다(2026-10-27, 틈 1px):
25
+ *
26
+ * | 칸에 쌓인 낱말 | 한 줄 | 290px 카드에 드는 칸 | 140px 맨몸에 드는 칸 |
27
+ * |---|---|---|---|
28
+ * | 하나 | 24.80px | 22 | 10 |
29
+ * | 둘(대립쌍) | 46.59px | **12** | 4 |
30
+ * | 셋 | 68.39px | 8 | 4 |
31
+ *
32
+ * 그러니 **카드에서는 여덟이 양쪽 다 다 보인다**(대립쌍 8칸 = 4줄 189px, 낱말 8칸 = 102px —
33
+ * 세워서 8/8 확인). 전에 "대립쌍은 네 칸에서 잘린다" 고 본 것은 140px 을 카드 높이로
34
+ * 잘못 잡은 탓이고, 실제로는 **12칸까지 한 번도 잘리지 않았다**(12/12 실측).
35
+ *
36
+ * 그래서 상한을 쌓인 낱말 수로 가르지 **않는다.** 그렇게 하면 카드에서 다 보이는 칸을
37
+ * 공짜로 버린다. 맨몸 140px 로 쓰는 자리는 코어·소비자 어디에도 없다(카드만 쓴다).
8
38
  */
39
+ const MAX_THUMB_CELLS = 8;
40
+ /** @public 단어표 내용 미니 미리보기(그리드 썸네일). */
9
41
  export default function WordTableThumbnail({ items, className }) {
42
+ const { t } = useTranslation();
10
43
  const n = items.length;
11
44
  // 3개 이하는 세로 1열(빈칸 없이 3개가 세로로), 4개 이상은 2열
12
45
  const cols = n <= 3 ? 1 : 2;
13
- const rows = Math.ceil(n / cols) || 1;
46
+ /* 넘치면 마지막 한 칸을 `+N` 에 내준다 — 앞 칸들을 보이고 끝 칸이 "그 밖 몇" 이다 */
47
+ const cap = MAX_THUMB_CELLS;
48
+ const over = n > cap;
49
+ const shown = items.slice(0, over ? cap - 1 : cap);
50
+ const hiddenCount = n - shown.length;
51
+ const rows = Math.ceil(Math.min(n, cap) / cols) || 1;
14
52
  const total = cols * rows;
15
53
  return (_jsx("div", { className: cx('word-table-thumb', className), style: { gridTemplateColumns: `repeat(${cols}, 1fr)` }, children: Array.from({ length: total }, (_, i) => {
16
- const item = items[i];
54
+ if (over && i === cap - 1) {
55
+ return (_jsx("div", { className: "word-table-thumb__cell word-table-thumb__cell--more", children: _jsx("span", { className: "word-table-thumb__more body-3", children: t('wordTable.thumbMore', { count: hiddenCount, defaultValue: '+{{count}}' }) }) }, i));
56
+ }
57
+ const item = shown[i];
17
58
  if (!item)
18
59
  return _jsx("div", { className: "word-table-thumb__cell word-table-thumb__cell--empty" }, i);
19
60
  return (_jsx("div", { className: "word-table-thumb__cell", children: (item.words?.length ? item.words : [{ label: item.id }]).map((w, wi) => (_jsxs(Fragment, { children: [wi > 0 && _jsx("span", { className: "word-table-thumb__divider" }), _jsx("span", { className: "word-table-thumb__word body-3", children: w.label })] }, wi))) }, i));
@@ -169,6 +169,15 @@ export interface WordTableBlockProps {
169
169
  */
170
170
  actionsLeftExtra?: ReactNode;
171
171
  }
172
+ /**
173
+ * 한 쪽에 놓을 수 있는 칸 수 — **상한이 곧 이 배열의 끝**이다.
174
+ *
175
+ * 12 → 16 으로 올렸다(사장님 결정 2026-10-27). 앱의 `MAX_SELECT` 가 짝 시험으로
176
+ * `Math.max(...CELL_COUNTS)` 에 묶여 있어, 여기가 와야 앱에서 16을 고를 수 있다.
177
+ *
178
+ * **늘릴 때는 `LAYOUTS` 도 함께 본다** — 표에 없는 수는 `gridFor` 가 만들어 내는데,
179
+ * 그 셈은 가로에서 **열을 늘려 폭부터 깎아** 그림칸이 쪼그라든다.
180
+ */
172
181
  export declare const CELL_COUNTS: number[];
173
182
  /** 표시(인쇄) 모드에서 선택 가능한 "페이지당 개수"(단어/대립쌍 수) — 이 값 그대로 페이지당 칸 수가 된다 */
174
183
  export declare const ITEMS_PER_PAGE_OPTIONS: number[];
@@ -1,3 +1,12 @@
1
- export const CELL_COUNTS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
1
+ /**
2
+ * 한 쪽에 놓을 수 있는 칸 수 — **상한이 곧 이 배열의 끝**이다.
3
+ *
4
+ * 12 → 16 으로 올렸다(사장님 결정 2026-10-27). 앱의 `MAX_SELECT` 가 짝 시험으로
5
+ * `Math.max(...CELL_COUNTS)` 에 묶여 있어, 여기가 와야 앱에서 16을 고를 수 있다.
6
+ *
7
+ * **늘릴 때는 `LAYOUTS` 도 함께 본다** — 표에 없는 수는 `gridFor` 가 만들어 내는데,
8
+ * 그 셈은 가로에서 **열을 늘려 폭부터 깎아** 그림칸이 쪼그라든다.
9
+ */
10
+ export const CELL_COUNTS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
2
11
  /** 표시(인쇄) 모드에서 선택 가능한 "페이지당 개수"(단어/대립쌍 수) — 이 값 그대로 페이지당 칸 수가 된다 */
3
12
  export const ITEMS_PER_PAGE_OPTIONS = [8, 4, 2, 1];
@@ -909,3 +909,11 @@
909
909
  /* 남는 세로를 위아래로 나눈다 — 표가 상자보다 납작할 때 아래로만 쏠려 보이지 않게 */
910
910
  align-items: center;
911
911
  }
912
+
913
+ /* **표의 절반을 쓰는 머리 칸**(`baseItem`) — 가로면 왼쪽 절반, 세로면 위쪽 절반.
914
+ 걸치는 자리는 칸 수에 따라 달라지므로 인라인으로 걸고, 여기서는 면과 결만 쥔다.
915
+ `--filler` 와 달리 속을 가운데로 모으지 않는다 — 속의 `WordCell` 이 제 상자를 꽉 쓴다.
916
+ 옮기기·초점 셈에서 이 칸은 빠진다(`WordTable.tsx` 의 카드 쿼리가 `:not()` 으로 뺀다). */
917
+ .word-table-block__card--base {
918
+ align-items: stretch;
919
+ }
@@ -13,6 +13,20 @@ export interface WordTableProps {
13
13
  className?: string;
14
14
  orientation?: WordTableOrientation;
15
15
  contentTypes?: WordTableContentType[];
16
+ /**
17
+ * 표의 **절반을 쓰는 머리 칸** — 가로면 왼쪽 절반, 세로면 위쪽 절반. 나머지 절반에
18
+ * `items` 가 격자로 선다. 칸 속은 표의 다른 칸과 같은 조각(`WordCell`)으로 그린다.
19
+ *
20
+ * 활용표처럼 **모든 칸이 같은 낱말**인 표를 위해 둔다 — 그 표를 그냥 그리면 같은 그림이
21
+ * 칸마다 되풀이된다. 머리 칸에만 그림을 두고 나머지는 글자만 세우는 꼴이다
22
+ * (`baseContentTypes` 로 머리 칸만 따로 가린다).
23
+ *
24
+ * 표시 모드에서만 받는다 — `editCells` 로 그리는 편집 격자는 칸을 **번호로** 세므로
25
+ * 걸친 칸이 들어오면 활성 칸·추가 자리가 어긋난다.
26
+ */
27
+ baseItem?: WordSearchResultItem;
28
+ /** 머리 칸에만 걸리는 보임 — 안 주면 `contentTypes` 를 따른다. */
29
+ baseContentTypes?: WordTableContentType[];
16
30
  cutLine?: WordTableCutLine;
17
31
  showOutline?: boolean;
18
32
  showDivLine?: boolean;
@@ -188,4 +202,4 @@ export interface WordTableProps {
188
202
  * 표시(items)·편집(editCells) 두 모드를 지원한다.
189
203
  * @public
190
204
  */
191
- export default function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, renderCellAction, showFillerAdd, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): import("react").JSX.Element;
205
+ export default function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, renderCellAction, showFillerAdd, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): import("react").JSX.Element;
@@ -192,7 +192,7 @@ function WordCell({ label, subLabel, colloquialLabel, homonum, showWord = true,
192
192
  * 표시(items)·편집(editCells) 두 모드를 지원한다.
193
193
  * @public
194
194
  */
195
- export default function WordTable({ title, titleIcon, disc, className, orientation = 'landscape', contentTypes = ['image', 'word', 'standardPron'], cutLine = 'show', showOutline = true, showDivLine = true, items, editCells, count, activeCell = null, onActivateCell, onRemoveCell, onRemoveItem, onReorder, renderCellAction, showFillerAdd = false, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
195
+ export default function WordTable({ title, titleIcon, disc, className, orientation = 'landscape', contentTypes = ['image', 'word', 'standardPron'], baseItem, baseContentTypes, cutLine = 'show', showOutline = true, showDivLine = true, items, editCells, count, activeCell = null, onActivateCell, onRemoveCell, onRemoveItem, onReorder, renderCellAction, showFillerAdd = false, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
196
196
  const clickMark = useCallback((cellIndex, clicked) => {
197
197
  onMarkClick?.(scoreIndexOffset + cellIndex, clicked);
198
198
  }, [onMarkClick, scoreIndexOffset]);
@@ -276,7 +276,7 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
276
276
  if (to == null)
277
277
  return;
278
278
  focusTarget.current = null;
279
- const cells = gridRef.current?.querySelectorAll('.word-table-block__card:not(.word-table-block__card--filler)');
279
+ const cells = gridRef.current?.querySelectorAll('.word-table-block__card:not(.word-table-block__card--filler):not(.word-table-block__card--base)');
280
280
  cells?.[to]?.querySelector('.word-table-block__card-handle button')?.focus();
281
281
  });
282
282
  /* 떠날 때 걸어 둔 것을 푼다 — 길게 누르는 중에 팝업이 닫히면 window 리스너와
@@ -410,13 +410,31 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
410
410
  const { scalerRef, scale, offset } = useFitScale(width, fitHeight ? height : undefined);
411
411
  const dataLen = isEdit ? (editCells?.length ?? 0) : (items?.length ?? 0);
412
412
  const cellCount = Math.max(count ?? dataLen, 1);
413
- const { cols, rows } = gridFor(orientation, cellCount);
414
- const show = {
415
- word: contentTypes.length === 0 || contentTypes.includes('word'),
416
- image: contentTypes.length === 0 || contentTypes.includes('image'),
417
- pron: contentTypes.length === 0 || contentTypes.includes('standardPron'),
418
- colloq: contentTypes.length === 0 || contentTypes.includes('colloquialPron'),
419
- };
413
+ /* 머리 칸은 표시 모드에서만 — 편집 격자는 칸을 번호로 세므로 걸친 칸이 번호를 어긋낸다 */
414
+ const hasBase = !isEdit && !!baseItem;
415
+ /**
416
+ * **반쪽은 방향만 뒤집힌 같은 비율이다.** 종이가 A 계열이라 가로 1123×794 의 왼쪽
417
+ * 절반은 561.5×794(비 0.7072)로 세로 전체(0.7070)와 같고, 세로의 위쪽 절반은
418
+ * 794×561.5 로 가로 전체와 같다. 그래서 손으로 맞춰 둔 `LAYOUTS` 를 **방향만 뒤집어**
419
+ * 그대로 쓴다 — 반쪽 전용 배치표를 또 두지 않는다.
420
+ */
421
+ const half = gridFor(orientation === 'landscape' ? 'portrait' : 'landscape', cellCount);
422
+ const plain = gridFor(orientation, cellCount);
423
+ /** `items` 가 서는 반쪽의 격자 — 자르는 선과 빈칸 셈이 이것을 센다 */
424
+ const itemCols = hasBase ? half.cols : plain.cols;
425
+ const itemRows = hasBase ? half.rows : plain.rows;
426
+ /* 겉 격자는 반쪽을 둘로 — 머리 칸이 한쪽을 통째로 걸친다. 한 격자로 두어야
427
+ `--cut-show` 의 선 바탕과 `gap: 1px` 셈을 그대로 쓸 수 있다(겹격자로 쪼개면 틈이 둘이 된다). */
428
+ const cols = hasBase && orientation === 'landscape' ? half.cols * 2 : itemCols;
429
+ const rows = hasBase && orientation === 'portrait' ? half.rows * 2 : itemRows;
430
+ const showOf = (types) => ({
431
+ word: types.length === 0 || types.includes('word'),
432
+ image: types.length === 0 || types.includes('image'),
433
+ pron: types.length === 0 || types.includes('standardPron'),
434
+ colloq: types.length === 0 || types.includes('colloquialPron'),
435
+ });
436
+ const show = showOf(contentTypes);
437
+ const baseShow = showOf(baseContentTypes ?? contentTypes);
420
438
  const hasPairs = isEdit
421
439
  ? (editCells ?? []).some(c => c !== null && c.length > 1)
422
440
  : (items ?? []).some(item => (item.words ?? []).length > 1);
@@ -462,7 +480,15 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
462
480
  gridTemplateRows: `repeat(${rows}, 1fr)`,
463
481
  }, children: [isEdit ? (_jsx(_Fragment, { children: (editCells ?? []).map((cell, i) => (_jsx("div", { className: cx('word-table-block__edit-cell', cell ? 'word-table-block__edit-cell--filled' : 'word-table-block__edit-cell--empty', activeCell === i ? 'word-table-block__edit-cell--active' : ''), style: dotDashStyle(i, cols, rows, cutLine), children: cell ? (_jsxs(_Fragment, { children: [cell.map((e, wi) => (_jsxs(Fragment, { children: [wi > 0 && _jsx("div", { className: "word-table-block__pair-divider" }), _jsx(WordCell, { outerScale: scale, label: e.word, subLabel: e.pronunciation,
464
482
  // 편집 칸도 구어체 발음을 넘긴다 — 빠져 있어 '구어체 발음'을 켜도 편집 모드에서만 비었다.
465
- colloquialLabel: e.colloquialPronunciation, homonum: e.homonum, showWord: show.word, showImage: show.image, showPronunciation: show.pron, showColloquial: show.colloq, buttonSize: buttonSize })] }, wi))), scoring && renderScore(i, cell.map(e => e.word).join(' / ')), onRemoveCell && (_jsx("div", { className: "word-table-block__card-close", children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "x", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: cell.length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), ariaLabel: cell.length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), onClick: () => onRemoveCell(i) }) }))] })) : (onActivateCell && (_jsx("div", { style: counterScale, children: _jsx(Button, { htmlType: "button", size: "48", type: "bar", icon: "plus", label: t('wordTable.addWord', '추가하기'), onClick: () => onActivateCell(i) }) }))) }, i))) })) : (_jsxs(_Fragment, { children: [(items ?? []).map((item, index) => (_jsxs("div", { "data-wordtable-cell": onReorder ? index : undefined, className: `word-table-block__card${onReorder ? ' word-table-block__card--draggable' : ''}${dragOver === index ? ' word-table-block__card--drag-over' : ''}${dragging === index ? ' word-table-block__card--dragging' : ''}`, style: dotDashStyle(index, cols, rows, cutLine), draggable: !!onReorder, onPointerDown: onReorder ? (e) => longPressDrag(e, index) : undefined, onKeyDown: onReorder ? (e) => moveByKey(e, index) : undefined, onDragStart: onReorder ? () => { dragIndex.current = index; } : undefined, onDragOver: onReorder ? (e) => { e.preventDefault(); setDragOver(index); } : undefined, onDragLeave: onReorder ? () => setDragOver(null) : undefined, onDrop: onReorder ? (e) => { e.preventDefault(); if (dragIndex.current !== null && dragIndex.current !== index) {
483
+ colloquialLabel: e.colloquialPronunciation, homonum: e.homonum, showWord: show.word, showImage: show.image, showPronunciation: show.pron, showColloquial: show.colloq, buttonSize: buttonSize })] }, wi))), scoring && renderScore(i, cell.map(e => e.word).join(' / ')), onRemoveCell && (_jsx("div", { className: "word-table-block__card-close", children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "x", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: cell.length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), ariaLabel: cell.length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), onClick: () => onRemoveCell(i) }) }))] })) : (onActivateCell && (_jsx("div", { style: counterScale, children: _jsx(Button, { htmlType: "button", size: "48", type: "bar", icon: "plus", label: t('wordTable.addWord', '추가하기'), onClick: () => onActivateCell(i) }) }))) }, i))) })) : (_jsxs(_Fragment, { children: [hasBase && baseItem && (
484
+ /* 걸치는 자리는 양쪽이 같은 식이다 — 가로면 왼쪽 `half.cols` 열 × 전체 `half.rows` 줄,
485
+ 세로면 전체 `half.cols` 열 × 위 `half.rows` 줄. 둘 다 `1 / span` 으로 같게 적힌다. */
486
+ _jsx("div", { className: "word-table-block__card word-table-block__card--base", style: {
487
+ gridColumn: `1 / span ${half.cols}`,
488
+ gridRow: `1 / span ${half.rows}`,
489
+ /* 머리 칸과 나머지 절반을 가르는 점선 — 가로면 오른쪽, 세로면 아래쪽 */
490
+ ...dotDashStyle(0, orientation === 'landscape' ? 2 : 1, orientation === 'landscape' ? 1 : 2, cutLine),
491
+ }, children: (baseItem.words ?? []).map((w, wi) => (_jsxs(Fragment, { children: [wi > 0 && _jsx("div", { className: "word-table-block__pair-divider" }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, homonum: w.homonum, showWord: baseShow.word, showImage: baseShow.image, showPronunciation: baseShow.pron, showColloquial: baseShow.colloq, buttonSize: buttonSize, wordInfo: (w.grade || w.syllables != null || w.pos || w.wordType) ? { grade: w.grade, syllables: w.syllables, pos: w.pos, wordType: w.wordType } : undefined })] }, wi))) })), (items ?? []).map((item, index) => (_jsxs("div", { "data-wordtable-cell": onReorder ? index : undefined, className: `word-table-block__card${onReorder ? ' word-table-block__card--draggable' : ''}${dragOver === index ? ' word-table-block__card--drag-over' : ''}${dragging === index ? ' word-table-block__card--dragging' : ''}`, style: dotDashStyle(index, itemCols, itemRows, cutLine), draggable: !!onReorder, onPointerDown: onReorder ? (e) => longPressDrag(e, index) : undefined, onKeyDown: onReorder ? (e) => moveByKey(e, index) : undefined, onDragStart: onReorder ? () => { dragIndex.current = index; } : undefined, onDragOver: onReorder ? (e) => { e.preventDefault(); setDragOver(index); } : undefined, onDragLeave: onReorder ? () => setDragOver(null) : undefined, onDrop: onReorder ? (e) => { e.preventDefault(); if (dragIndex.current !== null && dragIndex.current !== index) {
466
492
  onReorder(dragIndex.current, index);
467
493
  } ; dragIndex.current = null; setDragOver(null); } : undefined, onDragEnd: onReorder ? () => { dragIndex.current = null; setDragOver(null); } : undefined, children: [(item.words ?? []).map((w, i) => (_jsxs(Fragment, { children: [i > 0 && _jsx("div", { className: "word-table-block__pair-divider" }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, homonum: w.homonum, showWord: show.word, showImage: show.image, showPronunciation: show.pron, showColloquial: show.colloq, buttonSize: buttonSize, wordInfo: (w.grade || w.syllables != null || w.pos || w.wordType) ? { grade: w.grade, syllables: w.syllables, pos: w.pos, wordType: w.wordType } : undefined })] }, i))), scoring && renderScore(index, (item.words ?? []).map(w => w.label).join(' / ')), onReorder && (
468
494
  /* **옮기기 손잡이.** 키보드로 순서를 바꾸려면 초점이 갈 자리가 있어야 하는데,
@@ -476,7 +502,7 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
476
502
  defaultValue: '{{word}} 순서 바꾸기 (Alt + 화살표)',
477
503
  }) }) })), (renderCellAction || onRemoveItem) && (
478
504
  /* 오른쪽 위 한 줄 — 부르는 쪽이 얹은 것과 빼기가 나란히 선다(지우는 것이 끝) */
479
- _jsxs("div", { className: "word-table-block__card-actions", children: [renderCellAction?.(index, item), onRemoveItem && (_jsx("div", { className: "word-table-block__card-close", children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "x", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: (item.words ?? []).length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), ariaLabel: (item.words ?? []).length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), onClick: () => onRemoveItem(item.id) }) }))] }))] }, item.id))), Array.from({ length: Math.max(0, cols * rows - (items?.length ?? 0)) }).map((_, i) => {
505
+ _jsxs("div", { className: "word-table-block__card-actions", children: [renderCellAction?.(index, item), onRemoveItem && (_jsx("div", { className: "word-table-block__card-close", children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "x", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: (item.words ?? []).length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), ariaLabel: (item.words ?? []).length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), onClick: () => onRemoveItem(item.id) }) }))] }))] }, item.id))), Array.from({ length: Math.max(0, itemCols * itemRows - (items?.length ?? 0)) }).map((_, i) => {
480
506
  const isWithinCount = (items?.length ?? 0) + i < cellCount;
481
507
  return (_jsx("div", { className: "word-table-block__card word-table-block__card--filler", children: showFillerAdd && onActivateCell && isWithinCount && (_jsx("div", { style: counterScale, children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "bar", icon: "plus", label: t('wordTable.addWord', '추가하기'), onClick: () => onActivateCell((items?.length ?? 0) + i) }) })) }, `filler-${i}`));
482
508
  })] })), showTopBand && (_jsx(_Fragment, { children: _jsxs("div", { className: "word-table__band word-table__band--top", children: [_jsx("img", { className: "word-table__brand-logo", src: brand?.topLogo?.src ?? speechearLogo, alt: brand?.topLogo?.alt ?? '말귀' }), (() => {
@@ -59,6 +59,14 @@ export declare const LAYOUTS: Record<WordTableOrientation, Record<number, {
59
59
  cols: number;
60
60
  rows: number;
61
61
  }>>;
62
+ /**
63
+ * **가로 16칸은 여유가 1% 뿐이다 — 기준 폭을 올릴 때 여기를 본다.**
64
+ *
65
+ * 6×3 에서 칸이 187.2×264.7 이라 폭비 `187.2/280 = 0.6685`, 높이비 `264.7/400 = 0.6617`.
66
+ * 지금은 높이가 병목이라 배율이 12칸과 같지만, `REF_W_BOTH` 가 **283 을 넘으면 폭이
67
+ * 병목으로 바뀌어** 16칸만 작아진다. `wordTableCells16_1027` 시험이 그 자리를 센다.
68
+ */
69
+ export declare const REF_W_BOTH_MAX_FOR_16 = 283;
62
70
  /**
63
71
  * @public 칸 수에 맞는 격자. 표에 없는 수는 용지 비율로 만들어 낸다.
64
72
  *
@@ -60,6 +60,13 @@ export const LAYOUTS = {
60
60
  7: { cols: 4, rows: 2 }, 8: { cols: 4, rows: 2 },
61
61
  9: { cols: 5, rows: 2 }, 10: { cols: 5, rows: 2 },
62
62
  11: { cols: 4, rows: 3 }, 12: { cols: 4, rows: 3 },
63
+ /* **13~16 은 행을 3 으로 묶어 둔다 — 그래야 칸이 12칸과 같은 크기로 선다.**
64
+ 칸 배율은 `min(칸폭/280, 칸높이/400)` 인데 가로 A4(1123×794)에서는 **높이가 병목**이라,
65
+ 행이 3 이면 열을 5·6 으로 늘려도 배율이 0.6617 그대로다. 행을 4 로 늘리는 순간 0.4963 —
66
+ 그림이 눈에 띄게 쪼그라든다. `gridFor` 의 자동 셈(`sqrt(n*0.707)`)은 바로 그 행을
67
+ 늘리므로 손으로 적는다. */
68
+ 13: { cols: 5, rows: 3 }, 14: { cols: 5, rows: 3 },
69
+ 15: { cols: 5, rows: 3 }, 16: { cols: 6, rows: 3 },
63
70
  },
64
71
  portrait: {
65
72
  1: { cols: 1, rows: 1 }, 2: { cols: 1, rows: 2 }, 3: { cols: 1, rows: 3 },
@@ -67,8 +74,20 @@ export const LAYOUTS = {
67
74
  7: { cols: 2, rows: 4 }, 8: { cols: 2, rows: 4 },
68
75
  9: { cols: 2, rows: 5 }, 10: { cols: 2, rows: 5 },
69
76
  11: { cols: 3, rows: 4 }, 12: { cols: 3, rows: 4 },
77
+ /* 세로는 행을 4 로 묶는다 — 세로 A4(794×1123)에서 배율이 0.7019 로 12칸과 같다.
78
+ 행이 5 면 0.5615 로 떨어진다. */
79
+ 13: { cols: 4, rows: 4 }, 14: { cols: 4, rows: 4 },
80
+ 15: { cols: 4, rows: 4 }, 16: { cols: 4, rows: 4 },
70
81
  },
71
82
  };
83
+ /**
84
+ * **가로 16칸은 여유가 1% 뿐이다 — 기준 폭을 올릴 때 여기를 본다.**
85
+ *
86
+ * 6×3 에서 칸이 187.2×264.7 이라 폭비 `187.2/280 = 0.6685`, 높이비 `264.7/400 = 0.6617`.
87
+ * 지금은 높이가 병목이라 배율이 12칸과 같지만, `REF_W_BOTH` 가 **283 을 넘으면 폭이
88
+ * 병목으로 바뀌어** 16칸만 작아진다. `wordTableCells16_1027` 시험이 그 자리를 센다.
89
+ */
90
+ export const REF_W_BOTH_MAX_FOR_16 = 283;
72
91
  /**
73
92
  * @public 칸 수에 맞는 격자. 표에 없는 수는 용지 비율로 만들어 낸다.
74
93
  *
@@ -654,7 +654,8 @@
654
654
  "moved": "Moved to position {{n}} of {{total}}",
655
655
  "handle": "Reorder {{word}} (Alt + arrow keys)",
656
656
  "hint": "Alt + ← → to reorder"
657
- }
657
+ },
658
+ "thumbMore": "+{{count}}"
658
659
  },
659
660
  "wordSearch": {
660
661
  "filterTitle": "Word Search Settings",
@@ -641,7 +641,8 @@
641
641
  "moved": "{{total}}칸 가운데 {{n}}번째로 옮김",
642
642
  "handle": "{{word}} 순서 바꾸기 (Alt + 화살표)",
643
643
  "hint": "Alt + ← → 로 순서 바꾸기"
644
- }
644
+ },
645
+ "thumbMore": "+{{count}}"
645
646
  },
646
647
  "wordSearch": {
647
648
  "filterTitle": "단어 검색 설정",
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export declare const CORE_VERSION = "0.370.0";
49
+ export declare const CORE_VERSION = "0.372.0";
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export const CORE_VERSION = '0.370.0';
49
+ export const CORE_VERSION = '0.372.0';