@ihabdevteam/core 0.372.0 → 0.374.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.372.0";
1773
+ export declare const CORE_VERSION = "0.374.0";
1774
1774
 
1775
1775
  /** @public */
1776
1776
  declare const coreDefault: Record<string, unknown>;
@@ -11462,6 +11462,18 @@ export declare interface WordSearchResultWord {
11462
11462
  label: string;
11463
11463
  subLabel?: string;
11464
11464
  colloquialLabel?: string;
11465
+ /**
11466
+ * 칸 **밑에 작게 붙는 이름표** — 그 칸이 무엇인지 말한다(`-아/어요` · `과거`).
11467
+ *
11468
+ * 활용표처럼 **칸마다 같은 낱말의 다른 꼴**이 서는 표를 위해 둔다. 거기서는 글자만 보고
11469
+ * 어느 꼴인지 가릴 수 없다 — `감사했다` 가 과거인 것은 알아도 `감사하고` 가 무엇인지는
11470
+ * 사람마다 다르게 읽는다.
11471
+ *
11472
+ * **발음(`subLabel`) 자리에 적으면 안 된다.** 칸의 재생 단추가 `subLabel || label` 로
11473
+ * 소리를 받아 오므로, 거기 이름표를 적으면 칸이 `-아/어요` 를 **소리 내어 읽는다**
11474
+ * (말귀가 활용표를 옮기며 실측 2026-10-27).
11475
+ */
11476
+ captionLabel?: string;
11465
11477
  homonum?: number;
11466
11478
  grade?: string;
11467
11479
  syllables?: number;
@@ -11483,7 +11495,7 @@ export declare interface WordSearchResultWord {
11483
11495
  */
11484
11496
  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
11497
 
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;
11498
+ export declare function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, 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
11499
 
11488
11500
  /** @public */
11489
11501
  export declare interface WordTableBlockProps {
@@ -11530,6 +11542,22 @@ export declare interface WordTableBlockProps {
11530
11542
  brand?: WordTableProps['brand'];
11531
11543
  /** 표 번호 — 띠 위 오른쪽에 선다. 안쪽 `WordTable` 로 그대로 간다. */
11532
11544
  code?: string;
11545
+ /**
11546
+ * 표의 **절반을 쓰는 머리 칸** — 안쪽 `WordTable` 의 같은 이름으로 그대로 간다.
11547
+ *
11548
+ * 활용표(모든 칸이 같은 낱말인 표)가 이것 때문에 **블록을 못 쓰고 `WordTable` 을 바로
11549
+ * 그리고 있었다** — 그러면 블록이 들고 있는 표 설정 판·저장 줄·쪽 나눔·인쇄를 전부 잃어
11550
+ * 앱이 그 셋을 손으로 베껴 두게 된다(말귀 청 (325), 2026-10-28).
11551
+ *
11552
+ * 쪽이 나뉘면 **쪽마다 머리 칸이 선다** — 한 장만 들고 보는 종이에 머리 낱말이 없으면
11553
+ * 나머지 칸이 무엇의 활용인지 알 수 없다.
11554
+ *
11555
+ * 표시 모드(`items` 를 주는 꼴)에서만 걸린다 — 편집 격자는 칸을 번호로 세므로 걸친 칸이
11556
+ * 들어오면 활성 칸·추가 자리가 어긋난다. 편집 모드에 주면 개발 모드에서 알려 준다.
11557
+ */
11558
+ baseItem?: WordTableProps['baseItem'];
11559
+ /** 머리 칸에만 걸리는 보임 — 안 주면 표 설정 판에서 고른 `contentTypes` 를 따른다. */
11560
+ baseContentTypes?: WordTableProps['baseContentTypes'];
11533
11561
  disc?: ReactNode;
11534
11562
  /** 현재 표의 저장된 이름(불러온 표 등). 있으면 인쇄/PDF 저장 시 파일명으로 사용, 없으면 "오늘 날짜 + 단어표/대립쌍표" */
11535
11563
  tableName?: string;
@@ -1,4 +1,4 @@
1
1
  import './WordTableBlock.css';
2
2
  import type { WordTableBlockProps } from './wordTableBlockTypes';
3
3
  export type { WordEntry, WordTableBlockProps } from './wordTableBlockTypes';
4
- export default 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): import("react").JSX.Element;
4
+ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, 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): import("react").JSX.Element;
@@ -45,7 +45,7 @@ function withUniqueIds(list) {
45
45
  return id === it.id ? it : { ...it, id };
46
46
  });
47
47
  }
48
- export default 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 }) {
48
+ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, 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 }) {
49
49
  const { t } = useTranslation();
50
50
  const resolvedResetLabel = resetLabel ?? t('wordPrint.clearAllSelection', '모두 선택 해제');
51
51
  const isEditable = items === undefined;
@@ -110,6 +110,10 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
110
110
  if (onAddItem && !isEditable && !showCellCount) {
111
111
  devWarnOnce('word-table-block-add-without-cell-count', '[WordTableBlock] 표시 모드에서 onAddItem 은 showCellCount 와 함께 줘야 "추가하기" 칸이 생긴다.');
112
112
  }
113
+ /* 머리 칸은 표시 모드에서만 선다 — 편집 격자에 주면 아무 데서도 안 터지고 **그냥 안 보인다** */
114
+ if (baseItem && isEditable) {
115
+ devWarnOnce('word-table-block-base-item-in-edit', '[WordTableBlock] baseItem 은 표시 모드(items 를 주는 꼴)에서만 걸린다 — 편집 격자에는 서지 않는다.');
116
+ }
113
117
  /* display 모드에서 칸 수 조절용 상태 (showCellCount일 때만 사용) — **고른 값만** 든다. 보이는 칸 수는
114
118
  max(고른 값, 항목 수) 로 그때그때 낸다. 전에는 고를 때와 항목이 늘 때 max 로 굳혀, 6칸을 골라 둔 표에 8개를
115
119
  담았다 3개로 줄여도 8칸이 남았다. 처음 값은 처음 항목 수 — 고르기 전에 하나를 빼도 표가 한 칸 줄어 흔들리지 않게. */
@@ -298,7 +302,7 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
298
302
  showWarning(t('wordTable.save.duplicateName', '이미 사용 중인 이름입니다.'));
299
303
  }
300
304
  };
301
- const savePreview = (_jsx(WordTable, { items: saveItems, orientation: orientation, contentTypes: contentTypes, cutLine: cutLine, showOutline: showOutline, showDivLine: showDivLine, count: count }));
305
+ const savePreview = (_jsx(WordTable, { items: saveItems, orientation: orientation, contentTypes: contentTypes, baseItem: baseItem, baseContentTypes: baseContentTypes, cutLine: cutLine, showOutline: showOutline, showDivLine: showDivLine, count: count }));
302
306
  return (_jsxs(_Fragment, { children: [_jsxs(Section, { type: "page", icon: titleIcon, title: title, disc: disc, className: cx('word-table-block', className), children: [showSaveAsPopup && (_jsx(Popup, { size: "small", title: secondarySaveButtonLabel ?? t('wordTable.saveAsNewButton', '다른 이름으로 저장'), onClose: () => setShowSaveAsPopup(false), footer: ({ closeWithAnimation }) => (_jsxs(_Fragment, { children: [_jsx(Button, { htmlType: "button", size: 48, type: "bar", label: t('common.cancel', '취소'), onClick: closeWithAnimation }), _jsx(Button, { htmlType: "button", size: 48, type: "bar", variant: "main", label: t('common.save', '저장'), disabled: !saveAsTrimmed || saveAsCollides, onClick: handleSaveAsConfirm })] })), children: _jsx(TextField, { label: t('wordTable.save.nameLabel', '이름'), value: saveAsName, onChange: setSaveAsName, placeholder: t('wordTable.save.placeholder', '이 단어표에 대한 제목을 입력하세요.'), maxLength: 40, size: 48, fullWidth: true, autoFocus: true, onEnter: handleSaveAsConfirm, error: saveAsCollides ? t('wordTable.save.duplicateName', '이미 사용 중인 이름입니다.') : undefined }) })), showSavePopup && onSaveComplete && renderSavePopup?.({
303
307
  defaultName: typeof title === 'string' ? title : t('wordTable.defaultName', '단어 표'),
304
308
  preview: savePreview,
@@ -326,13 +330,16 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
326
330
  setActiveCell(null);
327
331
  },
328
332
  onClose: handleCloseWordSearch,
329
- }), !hideControls && (_jsx(TableFilterPanel, { title: filterTitle, collapsible: filterCollapsible, defaultCollapsed: filterDefaultCollapsed, collapsed: filterCollapsed, onCollapsedChange: onFilterCollapsedChange, headerSummary: filterHeaderSummary, hasImage: hasImage, hasColloquial: hasColloquial, contentTypes: contentTypes, orientation: orientation, showOutline: showOutline, cutLine: cutLine, showDivLine: showDivLine, setters: { setContentTypes, setOrientation, setShowOutline, setCutLine, setShowDivLine, setShowTopInfo, setShowBottomInfo }, showCutLine: (pagesEnabled ? itemsPerPage : count) > 1, showDivLine2: hasPairs, middleSections: middleSections, extraSelected: middleSelected, onExtraSelect: handleMiddleSelect, showPaperBands: showBand, showTopInfo: showTopInfo, showBottomInfo: showBottomInfo })), isPaginated && pages ? (_jsx("div", { className: "word-table-block__pages", children: pages.map((page, i) => (_jsx(WordTable, { orientation: orientation, contentTypes: contentTypes, cutLine: cutLine, showOutline: showOutline, showDivLine: showDivLine, count: itemsPerPage, items: page, onRemoveItem: onRemoveItem,
333
+ }), !hideControls && (_jsx(TableFilterPanel, { title: filterTitle, collapsible: filterCollapsible, defaultCollapsed: filterDefaultCollapsed, collapsed: filterCollapsed, onCollapsedChange: onFilterCollapsedChange, headerSummary: filterHeaderSummary, hasImage: hasImage, hasColloquial: hasColloquial, contentTypes: contentTypes, orientation: orientation, showOutline: showOutline, cutLine: cutLine, showDivLine: showDivLine, setters: { setContentTypes, setOrientation, setShowOutline, setCutLine, setShowDivLine, setShowTopInfo, setShowBottomInfo }, showCutLine: (pagesEnabled ? itemsPerPage : count) > 1, showDivLine2: hasPairs, middleSections: middleSections, extraSelected: middleSelected, onExtraSelect: handleMiddleSelect, showPaperBands: showBand, showTopInfo: showTopInfo, showBottomInfo: showBottomInfo })), isPaginated && pages ? (_jsx("div", { className: "word-table-block__pages", children: pages.map((page, i) => (_jsx(WordTable, { orientation: orientation, contentTypes: contentTypes, cutLine: cutLine, showOutline: showOutline, showDivLine: showDivLine, count: itemsPerPage, items: page,
334
+ /* 쪽마다 머리 칸이 선다 — 한 장만 들고 보는 종이에 머리 낱말이 없으면
335
+ 나머지 칸이 무엇의 활용인지 알 수 없다 */
336
+ baseItem: baseItem, baseContentTypes: baseContentTypes, onRemoveItem: onRemoveItem,
330
337
  /* 쪽이 나뉘면 끌어 옮기기가 통째로 꺼졌다(말귀 단어 찾기: 9개부터). 쪽 안의 자리를 전체 자리로 옮겨 넘긴다 —
331
338
  쪽을 넘는 이동은 하지 않는다. */
332
339
  onReorder: onReorder && ((from, to) => onReorder(from + i * itemsPerPage, to + i * itemsPerPage)),
333
340
  /* 안쪽 표는 제 쪽 안의 번호를 준다 — 부르는 쪽에는 **표 전체 기준**으로 넘긴다
334
341
  (위 `onReorder` 와 같은 셈이다. 쪽이 몇으로 나뉘었는지는 부르는 쪽 일이 아니다). */
335
- renderCellAction: renderCellAction && ((n, item) => renderCellAction(n + i * itemsPerPage, item)), brand: band, code: code, contentRef: el => { pageRefs.current[i] = el; }, pageNumber: { current: i + 1, total: pages.length }, pageNumberPosition: pageNumberPosition }, i))) })) : (_jsx(WordTable, { orientation: orientation, contentTypes: contentTypes, cutLine: cutLine, showOutline: showOutline, showDivLine: showDivLine, count: count, items: isEditable ? undefined : (items ?? []), editCells: isEditable ? visibleCells : undefined, activeCell: activeCell, onActivateCell: (isEditable || onAddItem) ? setActiveCell : undefined, onRemoveCell: isEditable ? handleRemove : undefined, onRemoveItem: !isEditable ? onRemoveItem : undefined, onReorder: !isEditable ? onReorder : undefined,
342
+ renderCellAction: renderCellAction && ((n, item) => renderCellAction(n + i * itemsPerPage, item)), brand: band, code: code, contentRef: el => { pageRefs.current[i] = el; }, pageNumber: { current: i + 1, total: pages.length }, pageNumberPosition: pageNumberPosition }, i))) })) : (_jsx(WordTable, { orientation: orientation, contentTypes: contentTypes, cutLine: cutLine, showOutline: showOutline, showDivLine: showDivLine, count: count, items: isEditable ? undefined : (items ?? []), baseItem: isEditable ? undefined : baseItem, baseContentTypes: baseContentTypes, editCells: isEditable ? visibleCells : undefined, activeCell: activeCell, onActivateCell: (isEditable || onAddItem) ? setActiveCell : undefined, onRemoveCell: isEditable ? handleRemove : undefined, onRemoveItem: !isEditable ? onRemoveItem : undefined, onReorder: !isEditable ? onReorder : undefined,
336
343
  /* 편집 모드에는 얹을 항목이 없다 — 칸을 손으로 채우는 꼴이다 */
337
344
  renderCellAction: !isEditable ? renderCellAction : undefined, brand: band, code: code, showFillerAdd: !!onAddItem, contentRef: contentRef })), !hideControls && !saveOnly && actionsLeftExtra != null && (_jsx("div", { className: "word-table-block__table-actions", children: actionsLeftExtra })), inlineNameFields && !hideControls && (_jsxs(Panel, { size: "medium", labelWidth: 64, useBorder: false, useRowBorder: false, className: "word-table-block__meta", children: [_jsx(PanelRow, { variant: "custom", label: t('wordTable.save.nameLabel', '이름'), required: true, align: "vertical", useFullWidth: true, children: _jsx(TextField, { required: true, value: nameValue ?? '', onChange: onNameChange, placeholder: namePlaceholder ? namePlaceholder + t('wordTable.save.autoFillHint', ' (Tab 또는 space 입력시 자동 입력)') : t('wordTable.save.placeholder', '이 단어표에 대한 제목을 입력하세요.'),
338
345
  /* PanelRow의 라벨은 시각적으로만 붙어 있고 입력과 연결돼 있지 않아, 낭독기에는
@@ -60,6 +60,22 @@ export interface WordTableBlockProps {
60
60
  brand?: WordTableProps['brand'];
61
61
  /** 표 번호 — 띠 위 오른쪽에 선다. 안쪽 `WordTable` 로 그대로 간다. */
62
62
  code?: string;
63
+ /**
64
+ * 표의 **절반을 쓰는 머리 칸** — 안쪽 `WordTable` 의 같은 이름으로 그대로 간다.
65
+ *
66
+ * 활용표(모든 칸이 같은 낱말인 표)가 이것 때문에 **블록을 못 쓰고 `WordTable` 을 바로
67
+ * 그리고 있었다** — 그러면 블록이 들고 있는 표 설정 판·저장 줄·쪽 나눔·인쇄를 전부 잃어
68
+ * 앱이 그 셋을 손으로 베껴 두게 된다(말귀 청 (325), 2026-10-28).
69
+ *
70
+ * 쪽이 나뉘면 **쪽마다 머리 칸이 선다** — 한 장만 들고 보는 종이에 머리 낱말이 없으면
71
+ * 나머지 칸이 무엇의 활용인지 알 수 없다.
72
+ *
73
+ * 표시 모드(`items` 를 주는 꼴)에서만 걸린다 — 편집 격자는 칸을 번호로 세므로 걸친 칸이
74
+ * 들어오면 활성 칸·추가 자리가 어긋난다. 편집 모드에 주면 개발 모드에서 알려 준다.
75
+ */
76
+ baseItem?: WordTableProps['baseItem'];
77
+ /** 머리 칸에만 걸리는 보임 — 안 주면 표 설정 판에서 고른 `contentTypes` 를 따른다. */
78
+ baseContentTypes?: WordTableProps['baseContentTypes'];
63
79
  disc?: ReactNode;
64
80
  /** 현재 표의 저장된 이름(불러온 표 등). 있으면 인쇄/PDF 저장 시 파일명으로 사용, 없으면 "오늘 날짜 + 단어표/대립쌍표" */
65
81
  tableName?: string;
@@ -172,12 +188,43 @@ export interface WordTableBlockProps {
172
188
  /**
173
189
  * 한 쪽에 놓을 수 있는 칸 수 — **상한이 곧 이 배열의 끝**이다.
174
190
  *
175
- * 12 → 16 으로 올렸다(사장님 결정 2026-10-27). 앱의 `MAX_SELECT` 가 짝 시험으로
176
- * `Math.max(...CELL_COUNTS)` 에 묶여 있어, 여기가 와야 앱에서 16을 고를 수 있다.
191
+ * **12 로 돌아왔다**(사장님 결정 2026-10-27, 화면에서 16을 보신 뒤). 같은 날 12 → 16 으로
192
+ * 올렸다가 되돌린 것이다. 앱의 `MAX_SELECT` 가 짝 시험으로 `Math.max(...CELL_COUNTS)` 에
193
+ * 묶여 있어, 여기가 상한을 정한다.
194
+ *
195
+ * ## 되돌린 까닭은 **빈 칸**이다
196
+ *
197
+ * 칸 수를 올려도 배율은 안 깎인다(12~16 이 가로 `.6617` · 세로 `.7019` 로 같다 — 행을
198
+ * 묶어 두었으므로). 깎이는 대신 **빈 칸이 생긴다.** 양쪽 방향 다 꽉 차는 수는 **12 가
199
+ * 마지막**이다:
200
+ *
201
+ * | 칸 수 | 가로 | 빈칸 | 세로 | 빈칸 |
202
+ * |---|---|---|---|---|
203
+ * | **12** | 4×3 | **0** | 3×4 | **0** |
204
+ * | 15 | 5×3 | 0 | 4×4 | 1 |
205
+ * | 16 | 6×3 | **2** | 4×4 | 0 |
206
+ *
207
+ * 16의 가로는 **고칠 길이 없다** — 행을 3 으로 묶은 채 꽉 채우려면 열이 정수로 안 나오고
208
+ * (16/3), 행을 4 로 바꾸면 4×4 로 꽉 차는 대신 배율이 `.6617` → `.4963` 으로 깎인다.
209
+ * 18 로 더 가면 `LAYOUTS` 에 없어 `gridFor` 의 자동 셈으로 떨어져 **가로 5×4(빈칸 2 ·
210
+ * 배율 `.4963`) · 세로 4×5(빈칸 2 · `.5615`)** 로 양쪽이 다 쪼그라든다.
211
+ *
212
+ * ## `LAYOUTS` 의 13~16 은 **잠들어 있다 — 지우지 않는다**
213
+ *
214
+ * 이 배열이 12 까지라 13~16 은 지금 아무도 고를 수 없지만, 틀린 값이 아니라 손으로 맞춰
215
+ * 둔 값이다(행을 묶어 배율을 지키는 배치). 단어풀에서 골라 인쇄하는 길이 열리면 다시 쓴다.
216
+ * `wordTableCells16_1027` 이 **둘을 함께 재어** 지키고 있다 — 상한이 12 인 것과, 13~16 이
217
+ * `LAYOUTS` 에 살아 있는 것.
177
218
  *
178
219
  * **늘릴 때는 `LAYOUTS` 도 함께 본다** — 표에 없는 수는 `gridFor` 가 만들어 내는데,
179
- * 그 셈은 가로에서 **열을 늘려 폭부터 깎아** 그림칸이 쪼그라든다.
220
+ * 그 셈은 **행을 늘려** 그림칸을 쪼그라뜨린다.
180
221
  */
181
222
  export declare const CELL_COUNTS: number[];
182
- /** 표시(인쇄) 모드에서 선택 가능한 "페이지당 개수"(단어/대립쌍 수) — 이 값 그대로 페이지당 칸 수가 된다 */
223
+ /**
224
+ * 표시(인쇄) 모드에서 선택 가능한 "페이지당 개수"(단어/대립쌍 수) — 이 값 그대로 페이지당 칸 수가 된다
225
+ *
226
+ * **6 을 더했다**(사장님 지시 2026-10-27, "페이지당 단어수 6 추가"). 8 과 4 사이가 비어
227
+ * 있던 자리다. 6 은 가로 3×2 · 세로 2×3 으로 **양쪽 다 꽉 차는 수**라, 12칸 표를 두 장으로
228
+ * 나눌 때 빈 칸이 안 생긴다.
229
+ */
183
230
  export declare const ITEMS_PER_PAGE_OPTIONS: number[];
@@ -1,12 +1,43 @@
1
1
  /**
2
2
  * 한 쪽에 놓을 수 있는 칸 수 — **상한이 곧 이 배열의 끝**이다.
3
3
  *
4
- * 12 → 16 으로 올렸다(사장님 결정 2026-10-27). 앱의 `MAX_SELECT` 가 짝 시험으로
5
- * `Math.max(...CELL_COUNTS)` 에 묶여 있어, 여기가 와야 앱에서 16을 고를 수 있다.
4
+ * **12 로 돌아왔다**(사장님 결정 2026-10-27, 화면에서 16을 보신 뒤). 같은 날 12 → 16 으로
5
+ * 올렸다가 되돌린 것이다. 앱의 `MAX_SELECT` 가 짝 시험으로 `Math.max(...CELL_COUNTS)` 에
6
+ * 묶여 있어, 여기가 상한을 정한다.
7
+ *
8
+ * ## 되돌린 까닭은 **빈 칸**이다
9
+ *
10
+ * 칸 수를 올려도 배율은 안 깎인다(12~16 이 가로 `.6617` · 세로 `.7019` 로 같다 — 행을
11
+ * 묶어 두었으므로). 깎이는 대신 **빈 칸이 생긴다.** 양쪽 방향 다 꽉 차는 수는 **12 가
12
+ * 마지막**이다:
13
+ *
14
+ * | 칸 수 | 가로 | 빈칸 | 세로 | 빈칸 |
15
+ * |---|---|---|---|---|
16
+ * | **12** | 4×3 | **0** | 3×4 | **0** |
17
+ * | 15 | 5×3 | 0 | 4×4 | 1 |
18
+ * | 16 | 6×3 | **2** | 4×4 | 0 |
19
+ *
20
+ * 16의 가로는 **고칠 길이 없다** — 행을 3 으로 묶은 채 꽉 채우려면 열이 정수로 안 나오고
21
+ * (16/3), 행을 4 로 바꾸면 4×4 로 꽉 차는 대신 배율이 `.6617` → `.4963` 으로 깎인다.
22
+ * 18 로 더 가면 `LAYOUTS` 에 없어 `gridFor` 의 자동 셈으로 떨어져 **가로 5×4(빈칸 2 ·
23
+ * 배율 `.4963`) · 세로 4×5(빈칸 2 · `.5615`)** 로 양쪽이 다 쪼그라든다.
24
+ *
25
+ * ## `LAYOUTS` 의 13~16 은 **잠들어 있다 — 지우지 않는다**
26
+ *
27
+ * 이 배열이 12 까지라 13~16 은 지금 아무도 고를 수 없지만, 틀린 값이 아니라 손으로 맞춰
28
+ * 둔 값이다(행을 묶어 배율을 지키는 배치). 단어풀에서 골라 인쇄하는 길이 열리면 다시 쓴다.
29
+ * `wordTableCells16_1027` 이 **둘을 함께 재어** 지키고 있다 — 상한이 12 인 것과, 13~16 이
30
+ * `LAYOUTS` 에 살아 있는 것.
6
31
  *
7
32
  * **늘릴 때는 `LAYOUTS` 도 함께 본다** — 표에 없는 수는 `gridFor` 가 만들어 내는데,
8
- * 그 셈은 가로에서 **열을 늘려 폭부터 깎아** 그림칸이 쪼그라든다.
33
+ * 그 셈은 **행을 늘려** 그림칸을 쪼그라뜨린다.
34
+ */
35
+ export const CELL_COUNTS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
36
+ /**
37
+ * 표시(인쇄) 모드에서 선택 가능한 "페이지당 개수"(단어/대립쌍 수) — 이 값 그대로 페이지당 칸 수가 된다
38
+ *
39
+ * **6 을 더했다**(사장님 지시 2026-10-27, "페이지당 단어수 6 추가"). 8 과 4 사이가 비어
40
+ * 있던 자리다. 6 은 가로 3×2 · 세로 2×3 으로 **양쪽 다 꽉 차는 수**라, 12칸 표를 두 장으로
41
+ * 나눌 때 빈 칸이 안 생긴다.
9
42
  */
10
- export const CELL_COUNTS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
11
- /** 표시(인쇄) 모드에서 선택 가능한 "페이지당 개수"(단어/대립쌍 수) — 이 값 그대로 페이지당 칸 수가 된다 */
12
- export const ITEMS_PER_PAGE_OPTIONS = [8, 4, 2, 1];
43
+ export const ITEMS_PER_PAGE_OPTIONS = [8, 6, 4, 2, 1];
@@ -555,6 +555,15 @@
555
555
  font-weight: var(--wt-cell-sub-weight, var(--text-h3-weight));
556
556
  }
557
557
 
558
+ /* 칸 밑 이름표(`captionLabel`) — 활용표의 `-아/어요` · `과거` 가 서는 자리.
559
+ **발음과 같은 여림으로 둔다**(`--color-gray`) — 더 여리게 하면 종이에서 안 읽힌다.
560
+ 낱말을 읽는 데 방해가 되면 안 되지만, 치료 자리에서 뽑아 보는 종이라 **읽히기는 해야 한다.** */
561
+ .word-table-cell__caption {
562
+ color: var(--color-gray);
563
+ text-align: center;
564
+ white-space: nowrap;
565
+ }
566
+
558
567
  .word-table-cell__colloquial {
559
568
  color: var(--color-lightGray);
560
569
  text-align: center;
@@ -21,7 +21,7 @@ import { isTouchPointer, recentlyTouched, useTouchToggle } from '../hooks/touchT
21
21
  ihab 은 **흰 판을 마스크로 쓴다**(사용자 지시 2026-09-30: 글자색을 입힌다) — 그쪽은
22
22
  `WordTable.css` 가 제 곁의 파일을 직접 가리키므로 여기서 안 들여온다. */
23
23
  import speechearLogo from '../logo/Logo_SpeechEar_ko.svg';
24
- import { WORD_TABLE_PAPER, gridFor, CUT_CLASS, posLabels, wordTypeLabels, expandSlashLabel, dotDashStyle, REF_W_BOTH, REF_W_TEXT_ONLY, REF_W_IMAGE_ONLY, REF_H_BOTH, REF_H_TEXT_ONLY, REF_H_IMAGE_ONLY, } from './wordTableLayout';
24
+ import { WORD_TABLE_PAPER, gridFor, halfGridFor, CUT_CLASS, posLabels, wordTypeLabels, expandSlashLabel, dotDashStyle, REF_W_BOTH, REF_W_TEXT_ONLY, REF_W_IMAGE_ONLY, REF_H_BOTH, REF_H_TEXT_ONLY, REF_H_IMAGE_ONLY, } from './wordTableLayout';
25
25
  import { useFitScale } from './useFitScale';
26
26
  import { claimSound } from './Training/currentSound';
27
27
  import { playOneShot } from './Training/oneShotSound';
@@ -47,7 +47,7 @@ const srOnly = {
47
47
  const LONG_PRESS_MS = 400;
48
48
  /** 길게 누르기가 익기 전에 이만큼 움직이면 그건 끌기가 아니라 **스크롤**이라 취소한다 */
49
49
  const MOVE_THRESHOLD_PX = 8;
50
- function WordCell({ label, subLabel, colloquialLabel, homonum, showWord = true, showImage = true, showPronunciation = true, showColloquial = true, buttonSize = 40, wordInfo, outerScale = 1, }) {
50
+ function WordCell({ label, subLabel, colloquialLabel, captionLabel, homonum, showWord = true, showImage = true, showPronunciation = true, showColloquial = true, buttonSize = 40, wordInfo, outerScale = 1, }) {
51
51
  const { t } = useTranslation();
52
52
  const outerRef = useRef(null);
53
53
  const infoRef = useRef(null);
@@ -174,7 +174,7 @@ function WordCell({ label, subLabel, colloquialLabel, homonum, showWord = true,
174
174
  * 안 곱하면 또 조용히 헛돈다.
175
175
  */
176
176
  const tapTooSmall = buttonSize * outerScale < MIN_TAP_PX;
177
- return (_jsxs("div", { ref: outerRef, className: cx('word-table-cell', tapTooSmall && 'word-table-cell--tap-too-small', hasImage ? 'word-table-cell--with-image' : ''), "data-ref-w": refW, "data-ref-h": refH, children: [_jsxs("div", { className: "word-table-cell__inner", style: { transform: `scale(${scale})` }, children: [hasImage && (_jsxs("div", { className: "word-table-cell__image-wrap", children: [imgLoading && _jsx("div", { className: "word-table-cell__spinner" }), _jsx("img", { ref: imgRef, className: "word-table-cell__image", src: imageUrl, alt: label, draggable: false, style: { opacity: imgLoading ? 0 : 1 }, onLoad: handleImgLoad, onError: handleImgError })] })), showWord && _jsx("span", { className: "word-table-cell__word h0", children: label }), showPronunciation && pron && _jsxs("span", { className: "word-table-cell__sub h3", children: ["[", pron, "]"] }), showColloquial && colloquialLabel && _jsxs("span", { className: "word-table-cell__colloquial h5", children: ["[", colloquialLabel, "]"] })] }), _jsxs("div", { className: "word-table-cell__play-button", "data-audio-src": audioUrl, children: [_jsx("span", { "data-play-state": "play", style: { display: playing ? 'none' : undefined }, children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "play", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: t('common.play', '재생'), ariaLabel: label ? t('common.playFor', { name: label, defaultValue: `${label} 재생` }) : t('common.play', '재생'), onClick: handlePlay }) }), _jsx("span", { "data-play-state": "pause", style: { display: playing ? undefined : 'none' }, children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "pause", useBorder: false, selected: true, showTooltipInfo: t('common.pause', '멈춤'), ariaLabel: label ? t('common.pauseFor', { name: label, defaultValue: `${label} 멈춤` }) : t('common.pause', '멈춤'), onClick: handlePlay }) })] }), wordInfo && (_jsxs("div", { ref: infoRef, className: "word-table-cell__info-button", onPointerEnter: (e) => { if (!isTouchPointer(e))
177
+ return (_jsxs("div", { ref: outerRef, className: cx('word-table-cell', tapTooSmall && 'word-table-cell--tap-too-small', hasImage ? 'word-table-cell--with-image' : ''), "data-ref-w": refW, "data-ref-h": refH, children: [_jsxs("div", { className: "word-table-cell__inner", style: { transform: `scale(${scale})` }, children: [hasImage && (_jsxs("div", { className: "word-table-cell__image-wrap", children: [imgLoading && _jsx("div", { className: "word-table-cell__spinner" }), _jsx("img", { ref: imgRef, className: "word-table-cell__image", src: imageUrl, alt: label, draggable: false, style: { opacity: imgLoading ? 0 : 1 }, onLoad: handleImgLoad, onError: handleImgError })] })), showWord && _jsx("span", { className: "word-table-cell__word h0", children: label }), captionLabel && _jsx("span", { className: "word-table-cell__caption h5", children: captionLabel }), showPronunciation && pron && _jsxs("span", { className: "word-table-cell__sub h3", children: ["[", pron, "]"] }), showColloquial && colloquialLabel && _jsxs("span", { className: "word-table-cell__colloquial h5", children: ["[", colloquialLabel, "]"] })] }), _jsxs("div", { className: "word-table-cell__play-button", "data-audio-src": audioUrl, children: [_jsx("span", { "data-play-state": "play", style: { display: playing ? 'none' : undefined }, children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "play", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: t('common.play', '재생'), ariaLabel: label ? t('common.playFor', { name: label, defaultValue: `${label} 재생` }) : t('common.play', '재생'), onClick: handlePlay }) }), _jsx("span", { "data-play-state": "pause", style: { display: playing ? undefined : 'none' }, children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "pause", useBorder: false, selected: true, showTooltipInfo: t('common.pause', '멈춤'), ariaLabel: label ? t('common.pauseFor', { name: label, defaultValue: `${label} 멈춤` }) : t('common.pause', '멈춤'), onClick: handlePlay }) })] }), wordInfo && (_jsxs("div", { ref: infoRef, className: "word-table-cell__info-button", onPointerEnter: (e) => { if (!isTouchPointer(e))
178
178
  handleInfoEnter(); }, onPointerLeave: (e) => { if (!isTouchPointer(e))
179
179
  handleInfoLeave(); },
180
180
  // 이 div 자체는 포커스 대상이 아니지만 안의 Button이 포커스를 받으면
@@ -415,10 +415,16 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
415
415
  /**
416
416
  * **반쪽은 방향만 뒤집힌 같은 비율이다.** 종이가 A 계열이라 가로 1123×794 의 왼쪽
417
417
  * 절반은 561.5×794(비 0.7072)로 세로 전체(0.7070)와 같고, 세로의 위쪽 절반은
418
- * 794×561.5 로 가로 전체와 같다. 그래서 손으로 맞춰 둔 `LAYOUTS` 를 **방향만 뒤집어**
419
- * 그대로 쓴다 — 반쪽 전용 배치표를 또 두지 않는다.
418
+ * 794×561.5 로 가로 전체와 같다. 그래서 손으로 맞춰 둔 `LAYOUTS` 를 **방향만 뒤집어** 쓴다 —
419
+ * 반쪽 전용 배치표를 또 두지 않는다.
420
+ *
421
+ * **다만 뒤집기만 하면 읽기 결정까지 따라온다**(사장님 지시 2026-10-27 "wordcell 에 맞춰서").
422
+ * `LAYOUTS.portrait` 가 2~5 를 한 열로 세우는 것은 낱말을 한 줄에 하나씩 **읽히려는** 결정이지
423
+ * 칸을 크게 세우려는 결정이 아니다. 꼴 넷이 그 자리였다 — 반쪽에서 `1×4`(배율 0.4963)로 서던
424
+ * 것이 `2×2` 면 **0.9925**, 정확히 두 배이고 칸이 기준 칸(280×400)과 거의 같아진다.
425
+ * 고르는 자는 `halfGridFor` 머리말에 있다(빈 칸을 더 안 늘리고, 5% 넘게 좋아질 때만 바꾼다).
420
426
  */
421
- const half = gridFor(orientation === 'landscape' ? 'portrait' : 'landscape', cellCount);
427
+ const half = halfGridFor(orientation, cellCount);
422
428
  const plain = gridFor(orientation, cellCount);
423
429
  /** `items` 가 서는 반쪽의 격자 — 자르는 선과 빈칸 셈이 이것을 센다 */
424
430
  const itemCols = hasBase ? half.cols : plain.cols;
@@ -488,9 +494,9 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
488
494
  gridRow: `1 / span ${half.rows}`,
489
495
  /* 머리 칸과 나머지 절반을 가르는 점선 — 가로면 오른쪽, 세로면 아래쪽 */
490
496
  ...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) {
497
+ }, 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, captionLabel: w.captionLabel, 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) {
492
498
  onReorder(dragIndex.current, index);
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 && (
499
+ } ; 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, captionLabel: w.captionLabel, 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 && (
494
500
  /* **옮기기 손잡이.** 키보드로 순서를 바꾸려면 초점이 갈 자리가 있어야 하는데,
495
501
  칸 자체를 초점 대상으로 만들면 칸마다 뜻 없는 탭 정지점이 하나씩 늘고
496
502
  낭독기는 그것이 무엇인지 말할 수 없다. 이름 붙은 진짜 단추를 둔다 —
@@ -502,7 +508,7 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
502
508
  defaultValue: '{{word}} 순서 바꾸기 (Alt + 화살표)',
503
509
  }) }) })), (renderCellAction || onRemoveItem) && (
504
510
  /* 오른쪽 위 한 줄 — 부르는 쪽이 얹은 것과 빼기가 나란히 선다(지우는 것이 끝) */
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) => {
511
+ _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) }) }))] }))] }, index))), Array.from({ length: Math.max(0, itemCols * itemRows - (items?.length ?? 0)) }).map((_, i) => {
506
512
  const isWithinCount = (items?.length ?? 0) + i < cellCount;
507
513
  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}`));
508
514
  })] })), 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 ?? '말귀' }), (() => {
@@ -83,6 +83,46 @@ export declare function gridFor(orientation: WordTableOrientation, count: number
83
83
  cols: number;
84
84
  rows: number;
85
85
  };
86
+ /**
87
+ * @public **머리 칸이 절반을 쓸 때, 나머지 절반에 설 격자.**
88
+ *
89
+ * 반쪽은 **방향만 뒤집힌 같은 비율**이라(가로 1123×794 의 왼쪽 절반은 561.5×794 = 0.7072,
90
+ * 세로 전체가 0.7070) 온 장 배치표(`LAYOUTS`)를 뒤집어 쓰는 것이 **출발점**이다.
91
+ *
92
+ * ## 그런데 뒤집기만 하면 **읽기 결정까지 따라온다**
93
+ *
94
+ * `LAYOUTS.portrait` 는 2~5 를 한 열로 세운다. 그것은 낱말 목록을 **한 줄에 하나씩** 읽히려는
95
+ * 결정이지, 칸을 크게 세우려는 결정이 아니다. 반쪽에 그대로 옮기면 그 결정만 따라오고 칸이
96
+ * 쪼그라든다 — **꼴 넷이 그 자리였다**(말귀 활용표 실측 2026-10-27).
97
+ *
98
+ * 가로 종이 오른쪽 절반(561.5×794)에 기준 칸(280×400)을 놓고 잰 것:
99
+ *
100
+ * ```
101
+ * n 뒤집은 LAYOUTS 여기서 고르는 것 n 뒤집은 LAYOUTS 여기서 고르는 것
102
+ * 4 1×4 0.4963 → 2×2 0.9925 (2.00배) 7 2×4 0.4963 그대로
103
+ * 9 2×5 0.3970 → 3×3 0.6617 (1.67배) 11 3×4 0.4963 그대로
104
+ * ```
105
+ *
106
+ * **2×2 가 기준 칸과 거의 같다** — 561.5×794 를 넷으로 쪼개면 280.75×397 이고 기준 칸이
107
+ * 280×400 이다. 꼴 넷은 반쪽에서 **원래 크기로 설 수 있었는데** 그것을 버리고 쌓고 있었다.
108
+ *
109
+ * ## 고르는 자
110
+ *
111
+ * **① 빈 칸을 더 늘리지 않는다.** 사장님이 16→12 에서 세우신 자다. 그래서 *지금 뒤집은 값이
112
+ * 남기는 빈 칸* 을 천장으로 두고 그 안에서만 고른다.
113
+ *
114
+ * **② 그 안에서 배율이 가장 큰 것.** 배율은 `min(칸폭/280, 칸높이/400)` — 칸이 쓰는 그 자다.
115
+ *
116
+ * **③ 5% 넘게 좋아질 때만 바꾼다.** 수 대부분은 1% 차이로 가로·세로만 뒤집히는데, 그 1% 를
117
+ * 좇아 이미 선 표의 모양을 흔들 까닭이 없다. 이 문턱 덕에 **실제로 움직이는 것은 4 와 9 뿐**이다.
118
+ *
119
+ * ①이 없으면 7은 `7×1`(0.2865 — **지금의 0.58배**), 11은 `11×1`(0.1823 — **0.37배**)로 간다.
120
+ * "빈 칸 없는 것 중 가장 큰 것" 은 그래서 안 된다 — 그 둘은 쪼갤 수가 없는 수다.
121
+ */
122
+ export declare function halfGridFor(orientation: WordTableOrientation, count: number): {
123
+ cols: number;
124
+ rows: number;
125
+ };
86
126
  export declare const CUT_CLASS: Record<WordTableCutLine, string>;
87
127
  export declare const POS_LABEL: Record<string, string>;
88
128
  /** 어종(단어 유형) 약호 → 전체 표기. 데이터의 Class 컬럼은 축약형('고유'/'한자'/'외래'/'혼종')을 쓴다. */
@@ -120,6 +120,70 @@ export function gridFor(orientation, count) {
120
120
  [cols, rows] = [rows, cols];
121
121
  return { cols, rows };
122
122
  }
123
+ /**
124
+ * @public **머리 칸이 절반을 쓸 때, 나머지 절반에 설 격자.**
125
+ *
126
+ * 반쪽은 **방향만 뒤집힌 같은 비율**이라(가로 1123×794 의 왼쪽 절반은 561.5×794 = 0.7072,
127
+ * 세로 전체가 0.7070) 온 장 배치표(`LAYOUTS`)를 뒤집어 쓰는 것이 **출발점**이다.
128
+ *
129
+ * ## 그런데 뒤집기만 하면 **읽기 결정까지 따라온다**
130
+ *
131
+ * `LAYOUTS.portrait` 는 2~5 를 한 열로 세운다. 그것은 낱말 목록을 **한 줄에 하나씩** 읽히려는
132
+ * 결정이지, 칸을 크게 세우려는 결정이 아니다. 반쪽에 그대로 옮기면 그 결정만 따라오고 칸이
133
+ * 쪼그라든다 — **꼴 넷이 그 자리였다**(말귀 활용표 실측 2026-10-27).
134
+ *
135
+ * 가로 종이 오른쪽 절반(561.5×794)에 기준 칸(280×400)을 놓고 잰 것:
136
+ *
137
+ * ```
138
+ * n 뒤집은 LAYOUTS 여기서 고르는 것 n 뒤집은 LAYOUTS 여기서 고르는 것
139
+ * 4 1×4 0.4963 → 2×2 0.9925 (2.00배) 7 2×4 0.4963 그대로
140
+ * 9 2×5 0.3970 → 3×3 0.6617 (1.67배) 11 3×4 0.4963 그대로
141
+ * ```
142
+ *
143
+ * **2×2 가 기준 칸과 거의 같다** — 561.5×794 를 넷으로 쪼개면 280.75×397 이고 기준 칸이
144
+ * 280×400 이다. 꼴 넷은 반쪽에서 **원래 크기로 설 수 있었는데** 그것을 버리고 쌓고 있었다.
145
+ *
146
+ * ## 고르는 자
147
+ *
148
+ * **① 빈 칸을 더 늘리지 않는다.** 사장님이 16→12 에서 세우신 자다. 그래서 *지금 뒤집은 값이
149
+ * 남기는 빈 칸* 을 천장으로 두고 그 안에서만 고른다.
150
+ *
151
+ * **② 그 안에서 배율이 가장 큰 것.** 배율은 `min(칸폭/280, 칸높이/400)` — 칸이 쓰는 그 자다.
152
+ *
153
+ * **③ 5% 넘게 좋아질 때만 바꾼다.** 수 대부분은 1% 차이로 가로·세로만 뒤집히는데, 그 1% 를
154
+ * 좇아 이미 선 표의 모양을 흔들 까닭이 없다. 이 문턱 덕에 **실제로 움직이는 것은 4 와 9 뿐**이다.
155
+ *
156
+ * ①이 없으면 7은 `7×1`(0.2865 — **지금의 0.58배**), 11은 `11×1`(0.1823 — **0.37배**)로 간다.
157
+ * "빈 칸 없는 것 중 가장 큰 것" 은 그래서 안 된다 — 그 둘은 쪼갤 수가 없는 수다.
158
+ */
159
+ export function halfGridFor(orientation, count) {
160
+ /* 출발점 — 반쪽은 방향이 뒤집힌 꼴이라 배치표도 뒤집어 부른다 */
161
+ const base = gridFor(orientation === 'landscape' ? 'portrait' : 'landscape', count);
162
+ const n = Math.max(1, Math.ceil(count));
163
+ if (n <= 1)
164
+ return base;
165
+ const paper = WORD_TABLE_PAPER[orientation];
166
+ /* 가로면 왼쪽 절반(폭이 반), 세로면 위쪽 절반(높이가 반) */
167
+ const halfW = orientation === 'landscape' ? paper.width / 2 : paper.width;
168
+ const halfH = orientation === 'landscape' ? paper.height : paper.height / 2;
169
+ const scaleOf = (cols, rows) => Math.min((halfW / cols) / REF_W_BOTH, (halfH / rows) / REF_H_BOTH);
170
+ const emptyCeiling = Math.max(0, base.cols * base.rows - n);
171
+ const baseScale = scaleOf(base.cols, base.rows);
172
+ let best = base;
173
+ let bestScale = baseScale;
174
+ for (let cols = 1; cols <= n; cols++) {
175
+ const rows = Math.ceil(n / cols);
176
+ if (cols * rows - n > emptyCeiling)
177
+ continue;
178
+ const s = scaleOf(cols, rows);
179
+ if (s > bestScale) {
180
+ best = { cols, rows };
181
+ bestScale = s;
182
+ }
183
+ }
184
+ /* 5% 문턱 — 안 넘으면 지금 값을 그대로 둔다(머리말 ③) */
185
+ return bestScale > baseScale * 1.05 ? best : base;
186
+ }
123
187
  export const CUT_CLASS = {
124
188
  show: 'word-table-block__content--cut-show',
125
189
  dashed: '',
@@ -3,6 +3,18 @@ export interface WordSearchResultWord {
3
3
  label: string;
4
4
  subLabel?: string;
5
5
  colloquialLabel?: string;
6
+ /**
7
+ * 칸 **밑에 작게 붙는 이름표** — 그 칸이 무엇인지 말한다(`-아/어요` · `과거`).
8
+ *
9
+ * 활용표처럼 **칸마다 같은 낱말의 다른 꼴**이 서는 표를 위해 둔다. 거기서는 글자만 보고
10
+ * 어느 꼴인지 가릴 수 없다 — `감사했다` 가 과거인 것은 알아도 `감사하고` 가 무엇인지는
11
+ * 사람마다 다르게 읽는다.
12
+ *
13
+ * **발음(`subLabel`) 자리에 적으면 안 된다.** 칸의 재생 단추가 `subLabel || label` 로
14
+ * 소리를 받아 오므로, 거기 이름표를 적으면 칸이 `-아/어요` 를 **소리 내어 읽는다**
15
+ * (말귀가 활용표를 옮기며 실측 2026-10-27).
16
+ */
17
+ captionLabel?: string;
6
18
  homonum?: number;
7
19
  grade?: string;
8
20
  syllables?: number;
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export declare const CORE_VERSION = "0.372.0";
49
+ export declare const CORE_VERSION = "0.374.0";
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export const CORE_VERSION = '0.372.0';
49
+ export const CORE_VERSION = '0.374.0';