@ihabdevteam/core 0.385.0 → 0.387.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.
@@ -1787,7 +1787,7 @@ export declare function copyText(text: string): Promise<boolean>;
1787
1787
  *
1788
1788
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
1789
1789
  */
1790
- export declare const CORE_VERSION = "0.385.0";
1790
+ export declare const CORE_VERSION = "0.387.0";
1791
1791
 
1792
1792
  /** @public */
1793
1793
  declare const coreDefault: Record<string, unknown>;
@@ -10813,6 +10813,14 @@ export declare function useWordTableDisplaySettings(items: WordSearchResultItem[
10813
10813
  * 안 쓰는 화면에 켜고 끌 것이 없는 절이 서면 안 되므로 기본은 거짓이다. */
10814
10814
  opts?: {
10815
10815
  paperBands?: boolean;
10816
+ /**
10817
+ * 한 쪽에 설 수 있는 **최대 칸 수** — 칸 수와는 다른 것이다(말귀 청 (333)·(340)).
10818
+ *
10819
+ * 활용표의 칸 수는 낱말이 정해서 서른여섯까지 가는데, 종이 한 장에 열둘보다 많으면
10820
+ * 글자가 작아져 못 읽는다. `WordTableBlock` 에는 (333) 으로 들어갔고 **이 길에는
10821
+ * 빠져 있었다** — 저장된 표를 열면 쪽당 첫 칸이 '13개'(칸 수 전부)로 섰다.
10822
+ */
10823
+ maxItemsPerPage?: number;
10816
10824
  }): UseWordTableDisplaySettingsResult;
10817
10825
 
10818
10826
  /** @public */
@@ -11431,7 +11439,7 @@ export declare interface WordSearchFilterPanelProps {
11431
11439
  }
11432
11440
 
11433
11441
  /** @public */
11434
- export declare function WordSearchResultBlock({ titleIcon, resultCount, resultUnit, searchQuery, items, groups, selected, onSelect, maxSelect, onClearSelection, onPrint, onPrintEmpty, className, emptyHint, sectionType, disc, }: WordSearchResultBlockProps): JSX.Element;
11442
+ export declare function WordSearchResultBlock({ titleIcon, resultCount, resultUnit, searchQuery, items, groups, selected, onSelect, maxSelect, onClearSelection, onPrint, onPrintEmpty, className, emptyHint, showEmptyText, sectionType, disc, }: WordSearchResultBlockProps): JSX.Element;
11435
11443
 
11436
11444
  /** @public */
11437
11445
  export declare interface WordSearchResultBlockProps {
@@ -11466,6 +11474,25 @@ export declare interface WordSearchResultBlockProps {
11466
11474
  * 왜 없는지를 말해 주는 자리다.
11467
11475
  */
11468
11476
  emptyHint?: ReactNode;
11477
+ /**
11478
+ * 결과가 0 일 때 **"검색 결과가 없습니다." 를 세울지** — 기본 참(말귀 청 (341), 2026-10-28,
11479
+ * 사장님 지시 *"결과가 0이면 '검색 결과가 없습니다.' 제거하고 filterpanel 접었을때와 동일한
11480
+ * 높이로"*).
11481
+ *
11482
+ * **0 에는 두 가지가 있다.**
11483
+ *
11484
+ * | | 보기 | 빈 말이 |
11485
+ * |---|---|---|
11486
+ * | **아직 안 찾았다** | 활용표에서 글자를 치기 전 | **군더더기** — 찾은 적이 없다 |
11487
+ * | **찾았는데 없다** | `ㅋㅋㅋ` 를 친 뒤 | **쓸모 있다** — 왜 비었는지 말해 준다 |
11488
+ *
11489
+ * 코어는 `items.length === 0` 하나로 둘을 같게 본다. **부르는 쪽은 둘을 안다**(찾기를
11490
+ * 돌렸는지 아닌지를 아니까). 그래서 통째로 없애지 않고 **끌 손잡이**만 둔다 — 찾기 전에만
11491
+ * 끄면 된다. 끄면 그 자리가 통째로 빠져 머리 한 줄만 남는다.
11492
+ *
11493
+ * `emptyHint` 는 이것과 **따로 간다** — 끈 채로 힌트만 보일 일이 있다면 그 뜻대로 선다.
11494
+ */
11495
+ showEmptyText?: boolean;
11469
11496
  }
11470
11497
 
11471
11498
  /** @public */
@@ -11530,9 +11557,9 @@ export declare interface WordSearchResultWord {
11530
11557
  * 표시(items)·편집(editCells) 두 모드를 지원한다.
11531
11558
  * @public
11532
11559
  */
11533
- export declare function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): JSX.Element;
11560
+ export declare function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): JSX.Element;
11534
11561
 
11535
- export declare function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, 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;
11562
+ export declare function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, 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;
11536
11563
 
11537
11564
  /** @public */
11538
11565
  export declare interface WordTableBlockProps {
@@ -11635,6 +11662,8 @@ export declare interface WordTableBlockProps {
11635
11662
  onSaveComplete?: (name: string, items: WordSearchResultItem[], description?: string, saveAsNew?: boolean) => void;
11636
11663
  onLoad?: () => void;
11637
11664
  onRemoveItem?: (id: string) => void;
11665
+ /** 주면 칸에 **복사 단추**가 선다 — 그 낱말을 한 칸 더 만든다. 꼴은 코어가 빼기·옮기기와 같게 짓는다. */
11666
+ onCopyItem?: (id: string, index: number) => void;
11638
11667
  /** 전달하면 액션 영역 왼쪽에 초기화 버튼 표시 */
11639
11668
  onReset?: () => void;
11640
11669
  resetLabel?: string;
@@ -11850,7 +11879,7 @@ export declare type WordTableOrientation = 'landscape' | 'portrait';
11850
11879
  * 표 내부에는 제목을 두지 않아 팝업 헤더 제목과 중복되지 않는다.
11851
11880
  * @public
11852
11881
  */
11853
- export declare function WordTablePopup({ items, words, title, subtitle, emptyText, buttons, renderButtons, renderFooter, footerClassName, footerLayout, printFileName, showSettings, autoPrint, className, onClose, scoring, onScoreChange, printHeader, brand, code, beforeClose }: WordTablePopupProps): JSX.Element;
11882
+ export declare function WordTablePopup({ items, words, baseItem, baseContentTypes, maxItemsPerPage, title, subtitle, emptyText, buttons, renderButtons, renderFooter, footerClassName, footerLayout, printFileName, showSettings, autoPrint, className, onClose, scoring, onScoreChange, printHeader, brand, code, beforeClose }: WordTablePopupProps): JSX.Element;
11854
11883
 
11855
11884
  /** @public */
11856
11885
  export declare interface WordTablePopupActions {
@@ -11864,6 +11893,20 @@ export declare interface WordTablePopupActions {
11864
11893
  export declare interface WordTablePopupProps {
11865
11894
  /** 표시할 단어표 항목(저장된 표 등). 지정 시 words보다 우선. */
11866
11895
  items?: WordSearchResultItem[];
11896
+ /**
11897
+ * **절반을 쓰는 머리 칸** — 안쪽 `WordTable` 의 같은 이름 프롭으로 그대로 간다(말귀 청 (340)).
11898
+ *
11899
+ * 활용표의 칸은 **모두 같은 낱말의 다른 꼴**이라, 머리 칸이 없으면 종이에
11900
+ * `가벼워요 · 가벼운 · 가볍기 …` 만 남고 **그것이 `가볍다` 의 활용이라는 말이 아무 데도
11901
+ * 없다.** 이름표(`두루높임`)는 *어떤 꼴인가* 를 말할 뿐 *무엇의 꼴인가* 는 말하지 않는다.
11902
+ * 만들기 화면에는 서는 칸이라, 이것이 없으면 **저장하면 사라지는 꼴**이었다(청 (325) 가
11903
+ * `WordTableBlock` 에만 들어갔다).
11904
+ */
11905
+ baseItem?: WordSearchResultItem;
11906
+ /** 머리 칸에만 따로 걸 구성 — 안 주면 표의 것을 따른다(활용표는 그림을 머리 칸에만 둔다). */
11907
+ baseContentTypes?: WordTableContentType[];
11908
+ /** 한 쪽에 설 수 있는 최대 칸 수 — 칸 수와는 다른 것이다(청 (333)·(340)). */
11909
+ maxItemsPerPage?: number;
11867
11910
  /** 표시할 단어 목록(문자열). 각 단어를 한 칸으로 매핑한다. items 미지정 시 사용. */
11868
11911
  words?: unknown[];
11869
11912
  /** 팝업 제목. 기본값 '주요 단어'. */
@@ -11958,6 +12001,16 @@ export declare interface WordTableProps {
11958
12001
  * 초점을 두고 `Alt`+`←`/`→`, 그리고 **길게 눌러**(400ms) 손가락으로 끌기.
11959
12002
  * 키보드로 옮기면 초점이 그 칸을 따라가고 바뀐 자리를 `role="status"` 로 알린다.
11960
12003
  */
12004
+ /**
12005
+ * 칸을 **한 칸 더** 만든다 — 주면 칸의 오른쪽 기둥에 복사 단추가 선다(사용자 지시 2026-10-28).
12006
+ *
12007
+ * **코어가 그린다.** 전에는 부르는 쪽이 `renderCellAction` 으로 제 단추를 얹었는데, 그러면
12008
+ * 같은 자리에 선 단추인데 **꼴이 저마다**가 된다 — `useBorder` 가 기본 `true` 라 안 적은
12009
+ * 쪽만 테두리가 생겨 칸 위에서 혼자 튀었다(사장님이 화면에서 짚으셨다. 2026-09-27 에도
12010
+ * 같은 것을 이르셨다: *"다른 단어로 버튼만 다르네? 베리언트 동일하게"*).
12011
+ * 여기서 그리면 빼기·옮기기와 **같은 꼴로 지어진다** — 맞출 것이 없다.
12012
+ */
12013
+ onCopyItem?: (id: string, index: number) => void;
11961
12014
  onReorder?: (fromIndex: number, toIndex: number) => void;
11962
12015
  /**
11963
12016
  * 이 표의 첫 칸이 **전체 목록에서 몇 번째**인가 — 쪽으로 나뉜 표에서 `WordTableBlock` 이 준다
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { type PopupProps } from '../Popup/Popup';
3
- import type { WordTableProps } from '../WordTable';
3
+ import type { WordTableProps, WordTableContentType } from '../WordTable';
4
4
  import type { WordSearchResultItem } from '../../types/wordSearch';
5
5
  import { type ScoreMark } from '../Word/wordTableScoring';
6
6
  import './WordTablePopup.css';
@@ -15,6 +15,20 @@ export interface WordTablePopupActions {
15
15
  export interface WordTablePopupProps {
16
16
  /** 표시할 단어표 항목(저장된 표 등). 지정 시 words보다 우선. */
17
17
  items?: WordSearchResultItem[];
18
+ /**
19
+ * **절반을 쓰는 머리 칸** — 안쪽 `WordTable` 의 같은 이름 프롭으로 그대로 간다(말귀 청 (340)).
20
+ *
21
+ * 활용표의 칸은 **모두 같은 낱말의 다른 꼴**이라, 머리 칸이 없으면 종이에
22
+ * `가벼워요 · 가벼운 · 가볍기 …` 만 남고 **그것이 `가볍다` 의 활용이라는 말이 아무 데도
23
+ * 없다.** 이름표(`두루높임`)는 *어떤 꼴인가* 를 말할 뿐 *무엇의 꼴인가* 는 말하지 않는다.
24
+ * 만들기 화면에는 서는 칸이라, 이것이 없으면 **저장하면 사라지는 꼴**이었다(청 (325) 가
25
+ * `WordTableBlock` 에만 들어갔다).
26
+ */
27
+ baseItem?: WordSearchResultItem;
28
+ /** 머리 칸에만 따로 걸 구성 — 안 주면 표의 것을 따른다(활용표는 그림을 머리 칸에만 둔다). */
29
+ baseContentTypes?: WordTableContentType[];
30
+ /** 한 쪽에 설 수 있는 최대 칸 수 — 칸 수와는 다른 것이다(청 (333)·(340)). */
31
+ maxItemsPerPage?: number;
18
32
  /** 표시할 단어 목록(문자열). 각 단어를 한 칸으로 매핑한다. items 미지정 시 사용. */
19
33
  words?: unknown[];
20
34
  /** 팝업 제목. 기본값 '주요 단어'. */
@@ -71,4 +85,4 @@ export interface WordTablePopupProps {
71
85
  * 표 내부에는 제목을 두지 않아 팝업 헤더 제목과 중복되지 않는다.
72
86
  * @public
73
87
  */
74
- export default function WordTablePopup({ items, words, title, subtitle, emptyText, buttons, renderButtons, renderFooter, footerClassName, footerLayout, printFileName, showSettings, autoPrint, className, onClose, scoring, onScoreChange, printHeader, brand, code, beforeClose }: WordTablePopupProps): import("react").JSX.Element;
88
+ export default function WordTablePopup({ items, words, baseItem, baseContentTypes, maxItemsPerPage, title, subtitle, emptyText, buttons, renderButtons, renderFooter, footerClassName, footerLayout, printFileName, showSettings, autoPrint, className, onClose, scoring, onScoreChange, printHeader, brand, code, beforeClose }: WordTablePopupProps): import("react").JSX.Element;
@@ -19,7 +19,7 @@ import { useToastState } from '../../hooks/useToastState';
19
19
  * 표 내부에는 제목을 두지 않아 팝업 헤더 제목과 중복되지 않는다.
20
20
  * @public
21
21
  */
22
- export default function WordTablePopup({ items, words, title, subtitle, emptyText, buttons, renderButtons, renderFooter, footerClassName, footerLayout, printFileName, showSettings, autoPrint, className, onClose, scoring = false, onScoreChange, printHeader, brand, code, beforeClose }) {
22
+ export default function WordTablePopup({ items, words, baseItem, baseContentTypes, maxItemsPerPage, title, subtitle, emptyText, buttons, renderButtons, renderFooter, footerClassName, footerLayout, printFileName, showSettings, autoPrint, className, onClose, scoring = false, onScoreChange, printHeader, brand, code, beforeClose }) {
23
23
  const { t } = useTranslation();
24
24
  // items 우선, 없으면 문자열 words → 한 단어=한 칸으로 매핑
25
25
  const tableItems = useMemo(() => {
@@ -30,7 +30,7 @@ export default function WordTablePopup({ items, words, title, subtitle, emptyTex
30
30
  .map((w, i) => ({ id: `${w}-${i}`, words: [{ label: w }] }));
31
31
  }, [items, words]);
32
32
  // 표 설정(구성·용지 방향·외곽선·페이지당 개수 등) — showSettings일 때만 FilterPanel로 노출하고, 값은 항상 표에 반영한다.
33
- const { settings, filterSections, filterSelected, handleSelect, pages, isPaginated, pageNumberPosition } = useWordTableDisplaySettings(tableItems, { paperBands: Boolean(brand?.show) });
33
+ const { settings, filterSections, filterSelected, handleSelect, pages, isPaginated, pageNumberPosition } = useWordTableDisplaySettings(tableItems, { paperBands: Boolean(brand?.show), maxItemsPerPage });
34
34
  /* 쪽마다 첫 칸이 표 전체에서 몇 번째인지 — 쪽 안에서 0부터 다시 세는 번호를
35
35
  표 전체 번호로 옮긴다. */
36
36
  const pageStart = useMemo(() => pageStartIndexes(pages.map(p => p.length)), [pages]);
@@ -115,5 +115,7 @@ export default function WordTablePopup({ items, words, title, subtitle, emptyTex
115
115
  }, 100);
116
116
  return () => window.clearTimeout(id);
117
117
  }, [autoPrint]);
118
- return (_jsxs(Popup, { title: title ?? t('keyWords.title', '주요 단어'), subtitle: subtitle, size: "large", className: cx('word-table-popup', className), buttons: footerButtons, footer: customFooter, footerClassName: footerClassName, footerLayout: footerLayout, beforeClose: beforeClose, onClose: onClose, children: [tableItems.length > 0 ? (_jsxs("div", { className: "word-table-popup__body", children: [showSettings && (_jsx(TableFilterPanel, { sections: filterSections, selected: filterSelected, onSelect: handleSelect })), isPaginated ? (_jsx("div", { className: "word-table-popup__pages", children: pages.map((page, i) => (_jsx(WordTable, { items: page, orientation: settings.orientation, contentTypes: settings.contentTypes, cutLine: settings.cutLine, showOutline: settings.showOutline, showDivLine: settings.showDivLine, count: settings.count, contentRef: el => { pageRefs.current[i] = el; }, pageNumber: { current: i + 1, total: pages.length }, pageNumberPosition: pageNumberPosition, brand: brand && { ...brand, top: settings.showTopInfo, bottom: settings.showBottomInfo }, code: code, scoring: scoring, scoreIndexOffset: pageStart[i], marks: marksForTable, onMarkClick: handleMarkClick }, i))) })) : (_jsx("div", { className: "word-table-popup__table", children: _jsx(WordTable, { items: tableItems, orientation: settings.orientation, contentTypes: settings.contentTypes, cutLine: settings.cutLine, showOutline: settings.showOutline, showDivLine: settings.showDivLine, count: settings.count, contentRef: contentRef, fitHeight: true, scoring: scoring, marks: marksForTable, onMarkClick: handleMarkClick, brand: brand && { ...brand, top: settings.showTopInfo, bottom: settings.showBottomInfo }, code: code }) }))] })) : (_jsx("p", { className: "word-table-popup__empty body-3", children: emptyText ?? t('keyWords.empty', '추출된 주요 단어가 없습니다.') })), _jsx(Toast, { message: toastMsg, position: "top", onClose: handleToastClose }, toastKey)] }));
118
+ return (_jsxs(Popup, { title: title ?? t('keyWords.title', '주요 단어'), subtitle: subtitle, size: "large", className: cx('word-table-popup', className), buttons: footerButtons, footer: customFooter, footerClassName: footerClassName, footerLayout: footerLayout, beforeClose: beforeClose, onClose: onClose, children: [tableItems.length > 0 ? (_jsxs("div", { className: "word-table-popup__body", children: [showSettings && (_jsx(TableFilterPanel, { sections: filterSections, selected: filterSelected, onSelect: handleSelect })), isPaginated ? (_jsx("div", { className: "word-table-popup__pages", children: pages.map((page, i) => (_jsx(WordTable, { items: page, orientation: settings.orientation, contentTypes: settings.contentTypes,
119
+ /* 쪽마다 머리 칸이 선다 — 한 장만 뽑아 들어도 무엇의 활용인지 알 수 있게 */
120
+ baseItem: baseItem, baseContentTypes: baseContentTypes, cutLine: settings.cutLine, showOutline: settings.showOutline, showDivLine: settings.showDivLine, count: settings.count, contentRef: el => { pageRefs.current[i] = el; }, pageNumber: { current: i + 1, total: pages.length }, pageNumberPosition: pageNumberPosition, brand: brand && { ...brand, top: settings.showTopInfo, bottom: settings.showBottomInfo }, code: code, scoring: scoring, scoreIndexOffset: pageStart[i], marks: marksForTable, onMarkClick: handleMarkClick }, i))) })) : (_jsx("div", { className: "word-table-popup__table", children: _jsx(WordTable, { items: tableItems, orientation: settings.orientation, contentTypes: settings.contentTypes, baseItem: baseItem, baseContentTypes: baseContentTypes, cutLine: settings.cutLine, showOutline: settings.showOutline, showDivLine: settings.showDivLine, count: settings.count, contentRef: contentRef, fitHeight: true, scoring: scoring, marks: marksForTable, onMarkClick: handleMarkClick, brand: brand && { ...brand, top: settings.showTopInfo, bottom: settings.showBottomInfo }, code: code }) }))] })) : (_jsx("p", { className: "word-table-popup__empty body-3", children: emptyText ?? t('keyWords.empty', '추출된 주요 단어가 없습니다.') })), _jsx(Toast, { message: toastMsg, position: "top", onClose: handleToastClose }, toastKey)] }));
119
121
  }
@@ -167,3 +167,22 @@
167
167
  /* 부제가 두 줄이 될 때 — 알림(걸러지고 있다) 위, 선택 안내 아래로 쌓는다.
168
168
  Section 의 disc 는 한 줄을 전제하므로 여기서 블록으로 만든다. */
169
169
 
170
+
171
+ /* **머리 한 줄만 남은 꼴** — 접힌 `FilterPanel` 과 나란히 서는 자리라 높이를 맞춘다
172
+ (말귀 청 (341), 2026-10-28. 사장님 지시 *"filterpanel 접었을때와 동일한 높이로"*).
173
+
174
+ 접힌 판은 세로 여백이 0 이고 머리의 `min-height: 60px` 로 선다. 이 상자는 위아래로
175
+ `--spacing-l` 을 더 두므로 그대로면 더 높다(실측: 접힌 판 62px · 이 상자 88px).
176
+ **결과가 있을 때의 여백은 안 건드린다** — 그 여백은 사용자 지시로 맞춰 둔 것이고,
177
+ 여기서 바뀌는 것은 *머리뿐인 그때*의 세로 자뿐이다. */
178
+ .word-search-result-block__inner--head-only {
179
+ padding-top: 0;
180
+ padding-bottom: 0;
181
+ /* **틈도 0 이다.** 결과가 없어도 빈 `__items` 격자는 그대로 서는데(높이 0),
182
+ 상자가 세로 flex 라 **그 0짜리 칸과의 틈 16px 이 그대로 든다** — 여백만 0 으로 두고
183
+ 재니 78px 이었다(실측). 머리 하나뿐일 때는 틈이 설 자리가 없다. */
184
+ gap: 0;
185
+ }
186
+ .word-search-result-block__inner--head-only .word-search-result-block__head {
187
+ min-height: 60px;
188
+ }
@@ -40,6 +40,25 @@ export interface WordSearchResultBlockProps {
40
40
  * 왜 없는지를 말해 주는 자리다.
41
41
  */
42
42
  emptyHint?: ReactNode;
43
+ /**
44
+ * 결과가 0 일 때 **"검색 결과가 없습니다." 를 세울지** — 기본 참(말귀 청 (341), 2026-10-28,
45
+ * 사장님 지시 *"결과가 0이면 '검색 결과가 없습니다.' 제거하고 filterpanel 접었을때와 동일한
46
+ * 높이로"*).
47
+ *
48
+ * **0 에는 두 가지가 있다.**
49
+ *
50
+ * | | 보기 | 빈 말이 |
51
+ * |---|---|---|
52
+ * | **아직 안 찾았다** | 활용표에서 글자를 치기 전 | **군더더기** — 찾은 적이 없다 |
53
+ * | **찾았는데 없다** | `ㅋㅋㅋ` 를 친 뒤 | **쓸모 있다** — 왜 비었는지 말해 준다 |
54
+ *
55
+ * 코어는 `items.length === 0` 하나로 둘을 같게 본다. **부르는 쪽은 둘을 안다**(찾기를
56
+ * 돌렸는지 아닌지를 아니까). 그래서 통째로 없애지 않고 **끌 손잡이**만 둔다 — 찾기 전에만
57
+ * 끄면 된다. 끄면 그 자리가 통째로 빠져 머리 한 줄만 남는다.
58
+ *
59
+ * `emptyHint` 는 이것과 **따로 간다** — 끈 채로 힌트만 보일 일이 있다면 그 뜻대로 선다.
60
+ */
61
+ showEmptyText?: boolean;
43
62
  }
44
63
  /** @public */
45
- export default function WordSearchResultBlock({ titleIcon, resultCount, resultUnit, searchQuery, items, groups, selected, onSelect, maxSelect, onClearSelection, onPrint, onPrintEmpty, className, emptyHint, sectionType, disc, }: WordSearchResultBlockProps): import("react").JSX.Element;
64
+ export default function WordSearchResultBlock({ titleIcon, resultCount, resultUnit, searchQuery, items, groups, selected, onSelect, maxSelect, onClearSelection, onPrint, onPrintEmpty, className, emptyHint, showEmptyText, sectionType, disc, }: WordSearchResultBlockProps): import("react").JSX.Element;
@@ -16,7 +16,7 @@ import { useHoverAnchor } from '../../hooks/useHoverAnchor';
16
16
  import { makeWordQueryMatcher } from '../../utils/koreanSyllable';
17
17
  import { withIga, withEulReul } from '../../utils/josa';
18
18
  /** @public */
19
- export default function WordSearchResultBlock({ titleIcon, resultCount, resultUnit, searchQuery, items, groups, selected = [], onSelect, maxSelect, onClearSelection, onPrint, onPrintEmpty, className, emptyHint, sectionType = 'page', disc, }) {
19
+ export default function WordSearchResultBlock({ titleIcon, resultCount, resultUnit, searchQuery, items, groups, selected = [], onSelect, maxSelect, onClearSelection, onPrint, onPrintEmpty, className, emptyHint, showEmptyText = true, sectionType = 'page', disc, }) {
20
20
  const { t, i18n } = useTranslation();
21
21
  // 한국어에서만 조사(이/가·을/를)를 unit 말미에 붙인다 — 문구에는 조사를 고정하지 않는다.
22
22
  const ko = i18n.language?.startsWith('ko') ?? false;
@@ -174,6 +174,9 @@ export default function WordSearchResultBlock({ titleIcon, resultCount, resultUn
174
174
  그 알림을 **안 보이는 쪽**을 골랐다(위 지시). 다시 필요해지면 `disc` 가 아니라
175
175
  안내 줄 곁에 설 자리를 새로 내야 한다. */
176
176
  const discNode = disc ?? discLabel;
177
+ /* 상자 안에 **머리 한 줄만** 남는가 — 결과도 없고 빈 말도 안 세우는 그 꼴이다 */
178
+ const noResults = groups ? groups.length === 0 : items.length === 0;
179
+ const isHeadOnly = noResults && !showEmptyText && !emptyHint;
177
180
  return (
178
181
  /* 제목·부제·조작부가 **상자 안** 에 선다(사용자 지시 2026-09-29) — 전에는 `Section` 의 머리가
179
182
  상자 밖에 서서 제목이 테두리 위에 뜨고 좌우 여백도 옆의 `FilterPanel` 과 달라 보였다.
@@ -183,7 +186,7 @@ export default function WordSearchResultBlock({ titleIcon, resultCount, resultUn
183
186
  과 아주 같은 h4 로 맞췄는데, 그러니 결과 덩이의 머리가 그 위 판 제목들(`검색 옵션` ·
184
187
  `단어 검색 설정`)과 같은 급이 되어 **무엇이 무엇의 머리인지 안 보였다.** 거르개 판은
185
188
  결과를 고르는 도구고 이 덩이는 그 결과라, 나란한 것이 아니라 아래 딸린 것이다. */
186
- _jsxs(Section, { type: sectionType, className: cx('word-search-result-block', className), children: [_jsxs("div", { className: "word-search-result-block__inner", children: [(titleLabel || toolbar || discNode) && (_jsxs("div", { className: "word-search-result-block__head", children: [_jsxs("div", { className: "word-search-result-block__head-main", children: [titleIcon && _jsx(Icon, { icon: titleIcon, className: "word-search-result-block__head-icon" }), titleLabel && _jsx("span", { className: "word-search-result-block__title h3", children: titleLabel })] }), toolbar && _jsx("div", { className: "word-search-result-block__head-actions", children: toolbar }), discNode && _jsx("div", { className: "word-search-result-block__head-disc body-3", children: discNode })] })), (groups ? groups.length === 0 : items.length === 0) && (_jsxs("div", { className: "word-search-result-block__empty-wrap", children: [_jsx("p", { className: "word-search-result-block__empty body-3", children: t('wordSearch.emptyResult', '검색 결과가 없습니다.') }), emptyHint && _jsx("p", { className: "word-search-result-block__empty-hint body-3", children: emptyHint })] })), groups ? ((pagedGroups ?? []).map((group) => (
189
+ _jsxs(Section, { type: sectionType, className: cx('word-search-result-block', className), children: [_jsxs("div", { className: cx('word-search-result-block__inner', isHeadOnly && 'word-search-result-block__inner--head-only'), children: [(titleLabel || toolbar || discNode) && (_jsxs("div", { className: "word-search-result-block__head", children: [_jsxs("div", { className: "word-search-result-block__head-main", children: [titleIcon && _jsx(Icon, { icon: titleIcon, className: "word-search-result-block__head-icon" }), titleLabel && _jsx("span", { className: "word-search-result-block__title h3", children: titleLabel })] }), toolbar && _jsx("div", { className: "word-search-result-block__head-actions", children: toolbar }), discNode && _jsx("div", { className: "word-search-result-block__head-disc body-3", children: discNode })] })), noResults && (showEmptyText || emptyHint) && (_jsxs("div", { className: "word-search-result-block__empty-wrap", children: [showEmptyText && _jsx("p", { className: "word-search-result-block__empty body-3", children: t('wordSearch.emptyResult', '검색 결과가 없습니다.') }), emptyHint && _jsx("p", { className: "word-search-result-block__empty-hint body-3", children: emptyHint })] })), groups ? ((pagedGroups ?? []).map((group) => (
187
190
  /* **묶음 이름을 머리로 그린다**(말귀 청 (308), 2026-10-19).
188
191
  `pagedGroups` 가 `label` 을 들고 왔는데 **그리는 자리에서 안 썼다** — 받은 이름이
189
192
  `key` 로만 쓰이고 사라져, 보는 사람은 어느 자리가 갈린 쌍인지 모른 채 한 덩어리로
@@ -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, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, 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, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, 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;
@@ -44,7 +44,7 @@ function withUniqueIds(list) {
44
44
  return id === it.id ? it : { ...it, id };
45
45
  });
46
46
  }
47
- export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, 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 }) {
47
+ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, 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
48
  const { t } = useTranslation();
49
49
  const resolvedResetLabel = resetLabel ?? t('wordPrint.clearAllSelection', '모두 선택 해제');
50
50
  const isEditable = items === undefined;
@@ -381,7 +381,7 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
381
381
  }), !hideControls && (_jsx(TableFilterPanel, { title: filterTitle, collapsible: filterCollapsible, defaultCollapsed: filterDefaultCollapsed, collapsed: filterCollapsed, onCollapsedChange: onFilterCollapsedChange, headerSummary: filterHeaderSummary, hasImage: hasImage, hasColloquial: hasColloquial, hasCaption: hasCaption, 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,
382
382
  /* 쪽마다 머리 칸이 선다 — 한 장만 들고 보는 종이에 머리 낱말이 없으면
383
383
  나머지 칸이 무엇의 활용인지 알 수 없다 */
384
- baseItem: baseItem, baseContentTypes: baseContentTypes, onRemoveItem: onRemoveItem,
384
+ baseItem: baseItem, baseContentTypes: baseContentTypes, onRemoveItem: onRemoveItem, onCopyItem: onCopyItem,
385
385
  /* 쪽이 나뉘면 끌어 옮기기가 통째로 꺼졌다(말귀 단어 찾기: 9개부터). 쪽 안의 자리를 전체 자리로 옮겨 넘긴다 —
386
386
  쪽을 넘는 이동은 하지 않는다. */
387
387
  onReorder: onReorder && ((from, to) => onReorder(from + i * itemsPerPage, to + i * itemsPerPage)),
@@ -398,7 +398,9 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
398
398
  showFillerAdd: !!onAddItem, onActivateCell: onAddItem ? (n => setActiveCell(n + i * itemsPerPage)) : undefined,
399
399
  /* 칸 크기가 쪽마다 같아야 해서 `count` 는 모든 쪽이 '페이지당 개수' 다 —
400
400
  채울 자리는 마지막 쪽에서 모자랄 수 있으니 그것만 따로 센다. */
401
- addableCount: Math.max(0, Math.min(itemsPerPage, capacity - i * itemsPerPage)), 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,
401
+ addableCount: Math.max(0, Math.min(itemsPerPage, capacity - i * itemsPerPage)), 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,
402
+ /* 편집 격자에는 '한 칸 더' 가 뜻이 없다 — 거기선 칸을 손으로 채운다 */
403
+ onCopyItem: !isEditable ? onCopyItem : undefined, onReorder: !isEditable ? onReorder : undefined,
402
404
  /* 편집 모드에는 얹을 항목이 없다 — 칸을 손으로 채우는 꼴이다 */
403
405
  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', '이 단어표에 대한 제목을 입력하세요.'),
404
406
  /* PanelRow의 라벨은 시각적으로만 붙어 있고 입력과 연결돼 있지 않아, 낭독기에는
@@ -41,4 +41,12 @@ export declare function useWordTableDisplaySettings(items: WordSearchResultItem[
41
41
  * 안 쓰는 화면에 켜고 끌 것이 없는 절이 서면 안 되므로 기본은 거짓이다. */
42
42
  opts?: {
43
43
  paperBands?: boolean;
44
+ /**
45
+ * 한 쪽에 설 수 있는 **최대 칸 수** — 칸 수와는 다른 것이다(말귀 청 (333)·(340)).
46
+ *
47
+ * 활용표의 칸 수는 낱말이 정해서 서른여섯까지 가는데, 종이 한 장에 열둘보다 많으면
48
+ * 글자가 작아져 못 읽는다. `WordTableBlock` 에는 (333) 으로 들어갔고 **이 길에는
49
+ * 빠져 있었다** — 저장된 표를 열면 쪽당 첫 칸이 '13개'(칸 수 전부)로 섰다.
50
+ */
51
+ maxItemsPerPage?: number;
44
52
  }): UseWordTableDisplaySettingsResult;
@@ -17,6 +17,7 @@ export function useWordTableDisplaySettings(items,
17
17
  opts) {
18
18
  const { t } = useTranslation();
19
19
  const showBands = opts?.paperBands === true;
20
+ const maxItemsPerPage = opts?.maxItemsPerPage;
20
21
  const [orientation, setOrientation] = useState('landscape');
21
22
  const [contentTypes, setContentTypes] = useState([...DEFAULT_CONTENT_TYPES]);
22
23
  const [cutLine, setCutLine] = useState('show');
@@ -37,7 +38,9 @@ opts) {
37
38
  이 훅에는 머리 칸이 없으므로 `items` 만 센다. */
38
39
  const hasCaption = hasCaptionIn(items);
39
40
  // 페이지 분할 — 페이지당 개수(기본 8, 실제 개수보다 크면 전체로 클램프)로 나눈다. 항목이 없으면 1칸짜리 빈 표.
40
- const effectiveItemsPerPage = Math.min(itemsPerPageSetting, Math.max(itemCount, 1));
41
+ /* 천장이 있으면 거기서 멎는다 — 칸 수와 **한 쪽에 서는 수**는 다른 것이다(청 (333)) */
42
+ const perPageCeiling = Math.max(1, Math.min(Math.max(itemCount, 1), maxItemsPerPage ?? Math.max(itemCount, 1)));
43
+ const effectiveItemsPerPage = Math.min(itemsPerPageSetting, perPageCeiling);
41
44
  const pages = useMemo(() => chunkItems(items, effectiveItemsPerPage), [items, effectiveItemsPerPage]);
42
45
  const isPaginated = pages.length > 1;
43
46
  // 표 렌더의 칸 수 = 페이지당 개수(마지막 페이지가 적어도 그리드 칸 수는 통일).
@@ -65,7 +68,7 @@ opts) {
65
68
  buildCompositionSection(t, { hasImage, hasColloquial, hasCaption }),
66
69
  buildOrientationSection(t),
67
70
  // 내용이 있는(1개 이상) 표면 페이지당 개수를 항상 노출.
68
- ...(itemCount > 0 ? [buildItemsPerPageSection(t, { hasPairs, itemCount })] : []),
71
+ ...(itemCount > 0 ? [buildItemsPerPageSection(t, { hasPairs, itemCount, max: maxItemsPerPage })] : []),
69
72
  /* **'페이지 번호' 자리 고르개는 없앤다** — 띠를 쓰든 안 쓰든 아예 안 세운다.
70
73
  사용자 지시다(2026-09-30). `pageNumberPosition` 프롭은 남아 있어 부르는 쪽이 코드로
71
74
  자리를 정할 수는 있고, 다만 화면에서 고르게 하지 않는다.
@@ -78,7 +81,7 @@ opts) {
78
81
  ...(hasPairs ? [buildDivLineSection(t)] : []),
79
82
  /* 띠를 쓰는 화면에서만 — 안 쓰는 표에 켜고 끌 것이 없는 절이 서면 안 된다 */
80
83
  ...(showBands ? [buildTopInfoSection(t), buildBottomInfoSection(t)] : []),
81
- ], [t, hasImage, hasColloquial, hasCaption, itemCount, hasPairs, isPaginated, count, showBands]);
84
+ ], [t, hasImage, hasColloquial, hasCaption, itemCount, hasPairs, isPaginated, count, showBands, maxItemsPerPage]);
82
85
  const filterSelected = {
83
86
  ...buildTableSettingsSelected(t, { contentTypes, orientation, showOutline, cutLine, showDivLine, showTopInfo, showBottomInfo }),
84
87
  ...(itemCount > 0 ? { [t(hasPairs ? 'wordTable.filter.itemsPerPagePair' : 'wordTable.filter.itemsPerPageWord')]: `${effectiveItemsPerPage}개` } : {}),
@@ -116,6 +116,8 @@ export interface WordTableBlockProps {
116
116
  onSaveComplete?: (name: string, items: WordSearchResultItem[], description?: string, saveAsNew?: boolean) => void;
117
117
  onLoad?: () => void;
118
118
  onRemoveItem?: (id: string) => void;
119
+ /** 주면 칸에 **복사 단추**가 선다 — 그 낱말을 한 칸 더 만든다. 꼴은 코어가 빼기·옮기기와 같게 짓는다. */
120
+ onCopyItem?: (id: string, index: number) => void;
119
121
  /** 전달하면 액션 영역 왼쪽에 초기화 버튼 표시 */
120
122
  onReset?: () => void;
121
123
  resetLabel?: string;
@@ -49,6 +49,16 @@ export interface WordTableProps {
49
49
  * 초점을 두고 `Alt`+`←`/`→`, 그리고 **길게 눌러**(400ms) 손가락으로 끌기.
50
50
  * 키보드로 옮기면 초점이 그 칸을 따라가고 바뀐 자리를 `role="status"` 로 알린다.
51
51
  */
52
+ /**
53
+ * 칸을 **한 칸 더** 만든다 — 주면 칸의 오른쪽 기둥에 복사 단추가 선다(사용자 지시 2026-10-28).
54
+ *
55
+ * **코어가 그린다.** 전에는 부르는 쪽이 `renderCellAction` 으로 제 단추를 얹었는데, 그러면
56
+ * 같은 자리에 선 단추인데 **꼴이 저마다**가 된다 — `useBorder` 가 기본 `true` 라 안 적은
57
+ * 쪽만 테두리가 생겨 칸 위에서 혼자 튀었다(사장님이 화면에서 짚으셨다. 2026-09-27 에도
58
+ * 같은 것을 이르셨다: *"다른 단어로 버튼만 다르네? 베리언트 동일하게"*).
59
+ * 여기서 그리면 빼기·옮기기와 **같은 꼴로 지어진다** — 맞출 것이 없다.
60
+ */
61
+ onCopyItem?: (id: string, index: number) => void;
52
62
  onReorder?: (fromIndex: number, toIndex: number) => void;
53
63
  /**
54
64
  * 이 표의 첫 칸이 **전체 목록에서 몇 번째**인가 — 쪽으로 나뉜 표에서 `WordTableBlock` 이 준다
@@ -227,4 +237,4 @@ export interface WordTableProps {
227
237
  * 표시(items)·편집(editCells) 두 모드를 지원한다.
228
238
  * @public
229
239
  */
230
- export default function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): import("react").JSX.Element;
240
+ export default function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): import("react").JSX.Element;
@@ -277,7 +277,7 @@ function WordCell({ label, subLabel, colloquialLabel, captionLabel, captionBadge
277
277
  * 표시(items)·편집(editCells) 두 모드를 지원한다.
278
278
  * @public
279
279
  */
280
- 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, indexOffset = 0, totalCount, renderCellAction, showFillerAdd = false, addableCount, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
280
+ 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, onCopyItem, indexOffset = 0, totalCount, renderCellAction, showFillerAdd = false, addableCount, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
281
281
  const clickMark = useCallback((cellIndex, clicked) => {
282
282
  onMarkClick?.(scoreIndexOffset + cellIndex, clicked);
283
283
  }, [onMarkClick, scoreIndexOffset]);
@@ -632,7 +632,7 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
632
632
  ...dotDashStyle(0, orientation === 'landscape' ? 2 : 1, orientation === 'landscape' ? 1 : 2, cutLine),
633
633
  }, children: (baseItem.words ?? []).map((w, wi) => (_jsxs(Fragment, { children: [wi > 0 && _jsx("div", { className: withLegacy("word-table__pair-divider") }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, captionLabel: w.captionLabel, captionBadge: w.captionBadge, homonum: w.homonum, showWord: baseShow.word, showImage: baseShow.image, showPronunciation: baseShow.pron, showColloquial: baseShow.colloq, showCaption: baseShow.caption, 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, "data-wordtable-index": onReorder ? indexOffset + index : undefined, className: withLegacy(`word-table__card${onReorder ? ' word-table__card--draggable' : ''}${dragOver === index ? ' word-table__card--drag-over' : ''}${dragging === index ? ' word-table__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) {
634
634
  onReorder(dragIndex.current, index);
635
- } ; 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: withLegacy("word-table__pair-divider") }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, captionLabel: w.captionLabel, captionBadge: w.captionBadge, homonum: w.homonum, showWord: show.word, showImage: show.image, showPronunciation: show.pron, showColloquial: show.colloq, showCaption: show.caption, 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(' / ')), (renderCellAction || onRemoveItem || onReorder) && (
635
+ } ; 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: withLegacy("word-table__pair-divider") }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, captionLabel: w.captionLabel, captionBadge: w.captionBadge, homonum: w.homonum, showWord: show.word, showImage: show.image, showPronunciation: show.pron, showColloquial: show.colloq, showCaption: show.caption, 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(' / ')), (renderCellAction || onRemoveItem || onCopyItem || onReorder) && (
636
636
  /* **오른쪽 기둥** — 빼기 → 부르는 쪽이 얹은 것 → 옮기기 손잡이 차례로 쌓인다
637
637
  (말귀 청 (331), 2026-10-28). 전에는 빼기와 얹은 것만 **한 줄**로 서고
638
638
  손잡이는 왼쪽 위에 따로 섰다 — 재생 단추와 **같은 자리라 겹쳤다.**
@@ -642,7 +642,15 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
642
642
  단어표에 맞춘 것이라 끼어들 단추가 없는 표에서 구멍이 났다(활용표: ✕ 밑이
643
643
  48px 비고 손잡이만 홀로 내려가 있었다).
644
644
  **자리를 수로 못 박지 않는다** — 쌓아서 세우면 몇 개가 들든 붙어 선다. */
645
- _jsxs("div", { className: withLegacy("word-table__card-actions"), children: [onRemoveItem && (_jsx("div", { className: withLegacy("word-table__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) }) })), renderCellAction?.(index, item), onReorder && (
645
+ _jsxs("div", { className: withLegacy("word-table__card-actions"), children: [onRemoveItem && (_jsx("div", { className: withLegacy("word-table__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) }) })), onCopyItem && (
646
+ /* **빼기 바로 아래** — 사장님이 화면에서 그 자리에 두셨다.
647
+ 꼴은 위아래 이웃과 **한 글자도 안 다르다**(`type="dot"` ·
648
+ `transparent-lightGray` · `useBorder={false}`). 셋을 한자리에 적어 두는
649
+ 것이 맞추는 유일한 길이다 — 떨어뜨려 두면 또 어긋난다. */
650
+ _jsx("div", { className: withLegacy("word-table__card-copy"), children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "copy", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: t('wordTable.copyItem', '한 칸 더'), ariaLabel: t('wordTable.copyItemAria', {
651
+ n: indexOffset + index + 1,
652
+ defaultValue: '{{n}}번 칸 낱말을 한 칸 더',
653
+ }), onClick: () => onCopyItem(item.id, indexOffset + index) }) })), renderCellAction?.(index, item), onReorder && (
646
654
  /* **옮기기 손잡이.** 키보드로 순서를 바꾸려면 초점이 갈 자리가 있어야 하는데,
647
655
  칸 자체를 초점 대상으로 만들면 칸마다 뜻 없는 탭 정지점이 하나씩 늘고
648
656
  낭독기는 그것이 무엇인지 말할 수 없다. 이름 붙은 진짜 단추를 둔다 —
@@ -552,6 +552,8 @@
552
552
  "corner": "Corner"
553
553
  },
554
554
  "addWord": "Add",
555
+ "copyItem": "Duplicate",
556
+ "copyItemAria": "Duplicate the word in cell {{n}}",
555
557
  "wordInfo": "Info for {{word}}",
556
558
  "emptyItems": "Please add at least one word.",
557
559
  "load": "Load",
@@ -544,6 +544,8 @@
544
544
  "corner": "코너"
545
545
  },
546
546
  "addWord": "추가하기",
547
+ "copyItem": "한 칸 더",
548
+ "copyItemAria": "{{n}}번 칸 낱말을 한 칸 더",
547
549
  "wordInfo": "{{word}} 낱말 정보",
548
550
  "emptyItems": "단어를 1개 이상 추가해주세요.",
549
551
  "load": "불러오기",
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export declare const CORE_VERSION = "0.385.0";
49
+ export declare const CORE_VERSION = "0.387.0";
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export const CORE_VERSION = '0.385.0';
49
+ export const CORE_VERSION = '0.387.0';