@ihabdevteam/core 0.402.0 → 0.404.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.
@@ -1922,7 +1922,7 @@ export declare function copyText(text: string): Promise<boolean>;
1922
1922
  *
1923
1923
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
1924
1924
  */
1925
- export declare const CORE_VERSION = "0.402.0";
1925
+ export declare const CORE_VERSION = "0.404.0";
1926
1926
 
1927
1927
  /** @public */
1928
1928
  declare const coreDefault: Record<string, unknown>;
@@ -2162,6 +2162,12 @@ export declare function DatePicker({ value, onChange, size, min, max, disabled,
2162
2162
  export declare interface DatePickerProps {
2163
2163
  value: string;
2164
2164
  onChange: (v: string) => void;
2165
+ /**
2166
+ * 트리거 높이 — **기본 40**(사장님 지시 2026-10-29. `Dropdown` 과 같은 자다).
2167
+ *
2168
+ * 줄·머리에서 곁에 서는 단추·글상자·고르개가 모두 40 이다. 기본이 48 이면 안 적은
2169
+ * 자리만 한 급 크게 서고, 그것을 막으려고 자리마다 40 을 손으로 적게 된다.
2170
+ */
2165
2171
  size?: 40 | 48 | 64;
2166
2172
  min?: string;
2167
2173
  max?: string;
@@ -2462,6 +2468,14 @@ export declare interface DropdownProps {
2462
2468
  placeholder?: string;
2463
2469
  disabled?: boolean;
2464
2470
  block?: boolean;
2471
+ /**
2472
+ * 트리거 높이 — **기본 40**(사장님 지시 2026-10-29).
2473
+ *
2474
+ * 기본이 48 이던 동안, 줄·머리에 세우는 자리마다 `size={40}` 을 손으로 적어 막아야 했고
2475
+ * 적는 자리가 늘수록 하나씩 빠졌다 — `PanelRow` 의 드롭다운이 그렇게 빠져 같은 줄의
2476
+ * 단추·글상자·고르개가 40 인데 혼자 48 로 섰다(실측 2026-10-29). `SegmentedControl` 도
2477
+ * 2026-09-21 에 같은 까닭으로 48 → 40 으로 내렸다. 큰 자리만 48 을 적는다.
2478
+ */
2465
2479
  size?: 40 | 48;
2466
2480
  error?: boolean;
2467
2481
  className?: string;
@@ -11701,6 +11715,18 @@ export declare interface WordSearchResultWord {
11701
11715
  * 그 번호가 가린다.
11702
11716
  */
11703
11717
  imageLabel?: string;
11718
+ /**
11719
+ * 이 낱말이 **꼴을 가질 수 있나** — `true` 일 때만 칸에 꼴 고르기 단추가 선다
11720
+ * (말귀 청 (355), 2026-10-29).
11721
+ *
11722
+ * 사장님이 못 박으셨다 — *"활용 단어 변경은 동사와 형용사만 허용해야 겠구나."* 꼴이 없는
11723
+ * 낱말에 단추가 서면 눌러도 **빈 차림표**가 뜬다.
11724
+ *
11725
+ * **코어는 품사로 가르지 않는다.** 사전의 품사는 `동/형` · `동/보동` 처럼 빗금으로 겹쳐
11726
+ * 적히고(말귀 라이브 실측 2026-10-27: 동 4,486 · 형 1,488 · 겹친 것 90여), 그 자를 코어와
11727
+ * 앱 두 군데 두면 활용표와 단어표가 갈린다. 재는 자는 부르는 쪽 하나다.
11728
+ */
11729
+ canPickForm?: boolean;
11704
11730
  homonum?: number;
11705
11731
  grade?: string;
11706
11732
  syllables?: number;
@@ -11720,9 +11746,9 @@ export declare interface WordSearchResultWord {
11720
11746
  * 표시(items)·편집(editCells) 두 모드를 지원한다.
11721
11747
  * @public
11722
11748
  */
11723
- export declare function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): JSX.Element;
11749
+ export declare function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, onPickForm, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): JSX.Element;
11724
11750
 
11725
- export declare function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReplaceItem, 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;
11751
+ export declare function WordTableBlock({ title, titleIcon, disc, filterTitle, filterCollapsible, filterDefaultCollapsed, filterCollapsed, onFilterCollapsedChange, filterHeaderSummary, brand, code, baseItem, baseContentTypes, cellCapacity, maxItemsPerPage, items, onSaveComplete, onLoad, onRemoveItem, onCopyItem, onReplaceItem, onPickForm, 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;
11726
11752
 
11727
11753
  /** @public */
11728
11754
  export declare interface WordTableBlockProps {
@@ -11829,6 +11855,8 @@ export declare interface WordTableBlockProps {
11829
11855
  onCopyItem?: (id: string, index: number) => void;
11830
11856
  /** 주면 칸에 **바꾸기 단추**가 선다 — 그 칸을 다른 낱말로. 꼴은 코어가 빼기·한 칸 더와 같게 짓는다(청 (353)). */
11831
11857
  onReplaceItem?: (id: string, index: number) => void;
11858
+ /** 주면 `canPickForm` 인 낱말의 칸에 **꼴 고르기**가 ⓘ 아래로 선다 — 누르면 그 단추의 자리를 준다(청 (355)). */
11859
+ onPickForm?: (id: string, index: number, anchor: DOMRect) => void;
11832
11860
  /** 전달하면 액션 영역 왼쪽에 초기화 버튼 표시 */
11833
11861
  onReset?: () => void;
11834
11862
  resetLabel?: string;
@@ -12194,6 +12222,19 @@ export declare interface WordTableProps {
12194
12222
  * **빼기도 함께 틀리는 것**이라, 한 자에 묶어 두는 편이 낫다.
12195
12223
  */
12196
12224
  onReplaceItem?: (id: string, index: number) => void;
12225
+ /**
12226
+ * 칸의 낱말을 **다른 꼴로** 바꾸는 차림표를 열 자리 — 주면 `canPickForm` 인 낱말의 칸에
12227
+ * ⓘ 아래로 단추가 선다(말귀 청 (355), 2026-10-29).
12228
+ *
12229
+ * **차림표는 코어가 안 연다.** 꼴 목록은 품사마다 다르고 그것을 아는 쪽은 부르는 쪽이다 —
12230
+ * 코어가 쥐는 것은 *단추가 어디에 서는가* 와 *무엇에 붙여 열 것인가* 뿐이다. 그래서 누르면
12231
+ * 그 단추의 **자리**(`DOMRect`)를 준다. 받은 쪽은 그대로 `Tooltip` 의 `anchorRect` 에 꽂는다.
12232
+ *
12233
+ * `index` 는 `indexOffset` 을 얹은 **표 전체 기준**이다(`onCopyItem` · `onReplaceItem` 과 같다).
12234
+ * 머리 칸(`baseItem`)에서 누르면 **`-1`** 이고 `id` 는 머리 낱말의 것이다 — 머리 칸은
12235
+ * 격자의 칸이 아니라 번호가 없다(`onReorder` 가 쪽을 넘을 때 쓰는 `-1` 과 같은 자다).
12236
+ */
12237
+ onPickForm?: (id: string, index: number, anchor: DOMRect) => void;
12197
12238
  onReorder?: (fromIndex: number, toIndex: number) => void;
12198
12239
  /**
12199
12240
  * 이 표의 첫 칸이 **전체 목록에서 몇 번째**인가 — 쪽으로 나뉜 표에서 `WordTableBlock` 이 준다
@@ -3,6 +3,12 @@ import './DatePicker.css';
3
3
  export interface DatePickerProps {
4
4
  value: string;
5
5
  onChange: (v: string) => void;
6
+ /**
7
+ * 트리거 높이 — **기본 40**(사장님 지시 2026-10-29. `Dropdown` 과 같은 자다).
8
+ *
9
+ * 줄·머리에서 곁에 서는 단추·글상자·고르개가 모두 40 이다. 기본이 48 이면 안 적은
10
+ * 자리만 한 급 크게 서고, 그것을 막으려고 자리마다 40 을 손으로 적게 된다.
11
+ */
6
12
  size?: 40 | 48 | 64;
7
13
  min?: string;
8
14
  max?: string;
@@ -18,6 +18,7 @@ import { useAnchoredMenu, anchoredMenuZIndex } from '../hooks/useAnchoredMenu';
18
18
  import { useCalendarMonth } from './useCalendarMonth';
19
19
  import { FOCUSABLE_SELECTOR } from '../hooks/useFocusTrap';
20
20
  import './DatePicker.css';
21
+ import { CONTROL_SIZE } from './controlSize';
21
22
  function daysInMonth(y, m) { return new Date(y, m + 1, 0).getDate(); }
22
23
  function firstDay(y, m) { return new Date(y, m, 1).getDay(); }
23
24
  function toISO(y, m, d) {
@@ -97,7 +98,7 @@ function monthOptions(year, label, min, max) {
97
98
  }
98
99
  return opts;
99
100
  }
100
- export default function DatePicker({ value, onChange, size = 48, min, max, disabled, placeholder: placeholderProp, className, today, }) {
101
+ export default function DatePicker({ value, onChange, size = CONTROL_SIZE, min, max, disabled, placeholder: placeholderProp, className, today, }) {
101
102
  const { t, i18n } = useTranslation();
102
103
  /* 기본 안내 문구도 사전에서 — 예전에는 '날짜 선택' 이 박혀 있어 영어 화면에서도 한국어였다.
103
104
  달력 판의 이름(`datePicker.chooseDate`)과 같은 말이라 같은 열쇠를 쓴다. */
@@ -14,6 +14,14 @@ export interface DropdownProps {
14
14
  placeholder?: string;
15
15
  disabled?: boolean;
16
16
  block?: boolean;
17
+ /**
18
+ * 트리거 높이 — **기본 40**(사장님 지시 2026-10-29).
19
+ *
20
+ * 기본이 48 이던 동안, 줄·머리에 세우는 자리마다 `size={40}` 을 손으로 적어 막아야 했고
21
+ * 적는 자리가 늘수록 하나씩 빠졌다 — `PanelRow` 의 드롭다운이 그렇게 빠져 같은 줄의
22
+ * 단추·글상자·고르개가 40 인데 혼자 48 로 섰다(실측 2026-10-29). `SegmentedControl` 도
23
+ * 2026-09-21 에 같은 까닭으로 48 → 40 으로 내렸다. 큰 자리만 48 을 적는다.
24
+ */
17
25
  size?: 40 | 48;
18
26
  error?: boolean;
19
27
  className?: string;
@@ -3,11 +3,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { cx } from '../utils/cx';
4
4
  import { useCallback, useEffect, useId, useRef, useState } from 'react';
5
5
  import { createPortal } from 'react-dom';
6
+ import { CONTROL_SIZE } from './controlSize';
6
7
  import { useTranslation } from 'react-i18next';
7
8
  import { useAnchoredMenu, anchoredMenuZIndex } from '../hooks/useAnchoredMenu';
8
9
  import './Dropdown.css';
9
10
  /** @public */
10
- export default function Dropdown({ options, value, onChange, placeholder, disabled = false, block = false, size = 48, error = false, className = '', ariaLabel, ariaDescribedBy }) {
11
+ export default function Dropdown({ options, value, onChange, placeholder, disabled = false, block = false, size = CONTROL_SIZE, error = false, className = '', ariaLabel, ariaDescribedBy }) {
11
12
  const { t } = useTranslation();
12
13
  const resolvedPlaceholder = placeholder ?? t('dropdown.placeholder', '선택');
13
14
  const listId = useId();
@@ -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, onCopyItem, onReplaceItem, 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, onReplaceItem, onPickForm, 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, onCopyItem, onReplaceItem, 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, onReplaceItem, onPickForm, 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, onCopyItem: onCopyItem, onReplaceItem: onReplaceItem,
384
+ baseItem: baseItem, baseContentTypes: baseContentTypes, onRemoveItem: onRemoveItem, onCopyItem: onCopyItem, onReplaceItem: onReplaceItem, onPickForm: onPickForm,
385
385
  /* 쪽이 나뉘면 끌어 옮기기가 통째로 꺼졌다(말귀 단어 찾기: 9개부터). 쪽 안의 자리를 전체 자리로 옮겨 넘긴다 —
386
386
  쪽을 넘는 이동은 하지 않는다. */
387
387
  onReorder: onReorder && ((from, to) => onReorder(from + i * itemsPerPage, to + i * itemsPerPage)),
@@ -400,7 +400,7 @@ export default function WordTableBlock({ title, titleIcon, disc, filterTitle, fi
400
400
  채울 자리는 마지막 쪽에서 모자랄 수 있으니 그것만 따로 센다. */
401
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
402
  /* 편집 격자에는 '한 칸 더'·'다른 단어로' 가 뜻이 없다 — 거기선 칸을 손으로 채운다 */
403
- onCopyItem: !isEditable ? onCopyItem : undefined, onReplaceItem: !isEditable ? onReplaceItem : undefined, onReorder: !isEditable ? onReorder : undefined,
403
+ onCopyItem: !isEditable ? onCopyItem : undefined, onReplaceItem: !isEditable ? onReplaceItem : undefined, onPickForm: !isEditable ? onPickForm : undefined, onReorder: !isEditable ? onReorder : undefined,
404
404
  /* 편집 모드에는 얹을 항목이 없다 — 칸을 손으로 채우는 꼴이다 */
405
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', '이 단어표에 대한 제목을 입력하세요.'),
406
406
  /* PanelRow의 라벨은 시각적으로만 붙어 있고 입력과 연결돼 있지 않아, 낭독기에는
@@ -120,6 +120,8 @@ export interface WordTableBlockProps {
120
120
  onCopyItem?: (id: string, index: number) => void;
121
121
  /** 주면 칸에 **바꾸기 단추**가 선다 — 그 칸을 다른 낱말로. 꼴은 코어가 빼기·한 칸 더와 같게 짓는다(청 (353)). */
122
122
  onReplaceItem?: (id: string, index: number) => void;
123
+ /** 주면 `canPickForm` 인 낱말의 칸에 **꼴 고르기**가 ⓘ 아래로 선다 — 누르면 그 단추의 자리를 준다(청 (355)). */
124
+ onPickForm?: (id: string, index: number, anchor: DOMRect) => void;
123
125
  /** 전달하면 액션 영역 왼쪽에 초기화 버튼 표시 */
124
126
  onReset?: () => void;
125
127
  resetLabel?: string;
@@ -176,7 +176,8 @@ export function captureHtml(els, paperW, paperH, autoPrint = false, fileName = '
176
176
  (이 글은 template literal 안이다 — **백틱을 쓰면 틀이 거기서 끊긴다.** 이 파일에서
177
177
  두 번째 밟았다. 글머리표는 별표로만 적는다.) */
178
178
  .word-table-cell--tap-too-small .word-table-cell__play-button,
179
- .word-table-cell--tap-too-small .word-table-cell__info-button { display: revert; }
179
+ .word-table-cell--tap-too-small .word-table-cell__info-button,
180
+ .word-table-cell--tap-too-small .word-table-cell__form-button { display: revert; }
180
181
  * { box-sizing: border-box; }
181
182
  html, body { margin: 0; padding: 24px 0; width: 100%; min-height: 100%; background: #f0f0f0; overflow: auto; }
182
183
  body { display: flex; flex-direction: column; align-items: center; gap: 24px; }
@@ -227,7 +228,8 @@ export function captureHtml(els, paperW, paperH, autoPrint = false, fileName = '
227
228
  }
228
229
  .paper-wrap > .word-table__content { flex: 1 1 0; min-height: 0; height: auto; }
229
230
  .paper-wrap:last-of-type { page-break-after: auto; break-after: auto; }
230
- .word-table-cell__play-button { display: none; }
231
+ .word-table-cell__play-button,
232
+ .word-table-cell__form-button { display: none; }
231
233
  .new-window-close { display: none; }
232
234
  }
233
235
  </style>
@@ -658,7 +658,11 @@
658
658
  opacity: 1;
659
659
  }
660
660
 
661
- .word-table-cell__info-button {
661
+ /* **ⓘ 와 꼴 고르기는 한 식구다**(청 (355), 2026-10-29) — 드러나는 때·감추는 때가 모두 같다.
662
+ 아래 다섯 마디에서 둘이 **늘 나란히** 적혀야 하고, `wordTableFormButton1029` 가 그것을 센다
663
+ (하나만 적으면 그 단추만 종이에 찍히거나, 작은 칸에서 혼자 남는다). */
664
+ .word-table-cell__info-button,
665
+ .word-table-cell__form-button {
662
666
  opacity: 0;
663
667
  transition: opacity 0.15s;
664
668
  }
@@ -667,7 +671,12 @@
667
671
  .word-table__edit-cell:focus-within .word-table-cell__info-button,
668
672
  .word-table-cell__info-button:focus-within,
669
673
  .word-table-cell__info-button:focus-visible,
670
- .word-table__edit-cell:hover .word-table-cell__info-button {
674
+ .word-table__edit-cell:hover .word-table-cell__info-button,
675
+ .word-table__card:hover .word-table-cell__form-button,
676
+ .word-table__edit-cell:focus-within .word-table-cell__form-button,
677
+ .word-table-cell__form-button:focus-within,
678
+ .word-table-cell__form-button:focus-visible,
679
+ .word-table__edit-cell:hover .word-table-cell__form-button {
671
680
  opacity: 1;
672
681
  }
673
682
 
@@ -678,7 +687,8 @@
678
687
  .word-table__card-actions,
679
688
  .word-table__card-handle,
680
689
  .word-table-cell__play-button,
681
- .word-table-cell__info-button {
690
+ .word-table-cell__info-button,
691
+ .word-table-cell__form-button {
682
692
  opacity: 1;
683
693
  }
684
694
  }
@@ -778,6 +788,7 @@
778
788
 
779
789
  .word-table-cell__play-button,
780
790
  .word-table-cell__info-button,
791
+ .word-table-cell__form-button,
781
792
  .word-table-cell__spinner {
782
793
  display: none;
783
794
  }
@@ -934,7 +945,8 @@
934
945
  `조상 꼴` 로 읽어 `scopePrefixNoDeadRules` 가 운다(처음 그렇게 짰다).
935
946
  **지우지 않고 감춘다** — 인쇄 문서가 이 마디를 복제해 종이의 재생 단추를 짓는다. */
936
947
  .word-table-cell--tap-too-small .word-table-cell__play-button,
937
- .word-table-cell--tap-too-small .word-table-cell__info-button {
948
+ .word-table-cell--tap-too-small .word-table-cell__info-button,
949
+ .word-table-cell--tap-too-small .word-table-cell__form-button {
938
950
  display: none;
939
951
  }
940
952
 
@@ -77,6 +77,19 @@ export interface WordTableProps {
77
77
  * **빼기도 함께 틀리는 것**이라, 한 자에 묶어 두는 편이 낫다.
78
78
  */
79
79
  onReplaceItem?: (id: string, index: number) => void;
80
+ /**
81
+ * 칸의 낱말을 **다른 꼴로** 바꾸는 차림표를 열 자리 — 주면 `canPickForm` 인 낱말의 칸에
82
+ * ⓘ 아래로 단추가 선다(말귀 청 (355), 2026-10-29).
83
+ *
84
+ * **차림표는 코어가 안 연다.** 꼴 목록은 품사마다 다르고 그것을 아는 쪽은 부르는 쪽이다 —
85
+ * 코어가 쥐는 것은 *단추가 어디에 서는가* 와 *무엇에 붙여 열 것인가* 뿐이다. 그래서 누르면
86
+ * 그 단추의 **자리**(`DOMRect`)를 준다. 받은 쪽은 그대로 `Tooltip` 의 `anchorRect` 에 꽂는다.
87
+ *
88
+ * `index` 는 `indexOffset` 을 얹은 **표 전체 기준**이다(`onCopyItem` · `onReplaceItem` 과 같다).
89
+ * 머리 칸(`baseItem`)에서 누르면 **`-1`** 이고 `id` 는 머리 낱말의 것이다 — 머리 칸은
90
+ * 격자의 칸이 아니라 번호가 없다(`onReorder` 가 쪽을 넘을 때 쓰는 `-1` 과 같은 자다).
91
+ */
92
+ onPickForm?: (id: string, index: number, anchor: DOMRect) => void;
80
93
  onReorder?: (fromIndex: number, toIndex: number) => void;
81
94
  /**
82
95
  * 이 표의 첫 칸이 **전체 목록에서 몇 번째**인가 — 쪽으로 나뉜 표에서 `WordTableBlock` 이 준다
@@ -255,4 +268,4 @@ export interface WordTableProps {
255
268
  * 표시(items)·편집(editCells) 두 모드를 지원한다.
256
269
  * @public
257
270
  */
258
- export default function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): import("react").JSX.Element;
271
+ export default function WordTable({ title, titleIcon, disc, className, orientation, contentTypes, baseItem, baseContentTypes, cutLine, showOutline, showDivLine, items, editCells, count, activeCell, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, onReplaceItem, onPickForm, indexOffset, totalCount, renderCellAction, showFillerAdd, addableCount, contentRef, buttonSize, brand, code, pageNumber, pageNumberPosition, fitHeight, scoring, marks, onMarkClick, scoreIndexOffset, }: WordTableProps): import("react").JSX.Element;
@@ -77,7 +77,7 @@ function rowTemplate(rows) {
77
77
  return '100%';
78
78
  return `repeat(${rows}, calc((100% - ${rows - 1} * var(--wt-cell-gap, 0px)) / ${rows}))`;
79
79
  }
80
- function WordCell({ label, subLabel, colloquialLabel, captionLabel, captionBadge, imageLabel, homonum, showWord = true, showImage = true, showPronunciation = true, showColloquial = true, showCaption = true, buttonSize = 40, wordInfo, outerScale = 1, }) {
80
+ function WordCell({ label, subLabel, colloquialLabel, captionLabel, captionBadge, imageLabel, pickForm, homonum, showWord = true, showImage = true, showPronunciation = true, showColloquial = true, showCaption = true, buttonSize = 40, wordInfo, outerScale = 1, }) {
81
81
  const { t } = useTranslation();
82
82
  const outerRef = useRef(null);
83
83
  const infoRef = useRef(null);
@@ -300,7 +300,27 @@ function WordCell({ label, subLabel, colloquialLabel, captionLabel, captionBadge
300
300
  /* 아이콘만 있는 버튼이라 이름이 없으면 화면 낭독기가 "버튼"으로만 읽는다.
301
301
  한 표에 칸마다 하나씩 있어 열두 개가 다 "버튼"이 된다 — 어느 낱말의
302
302
  것인지 알 길이 없으므로 낱말을 이름에 넣는다. */
303
- ariaLabel: t('wordTable.wordInfo', '{{word}} 낱말 정보', { word: label }), onClick: (e) => { e.stopPropagation(); infoToggle.touchPress(); } }), infoAnchor && infoTooltipItems && (_jsx(DescriptionTooltip, { anchorRect: infoAnchor, items: infoTooltipItems, showIndex: false }))] }))] })] }));
303
+ ariaLabel: t('wordTable.wordInfo', '{{word}} 낱말 정보', { word: label }), onClick: (e) => { e.stopPropagation(); infoToggle.touchPress(); } }), infoAnchor && infoTooltipItems && (_jsx(DescriptionTooltip, { anchorRect: infoAnchor, items: infoTooltipItems, showIndex: false }))] })), pickForm && (
304
+ /* **꼴 고르기 — ⓘ 아래**(말귀 청 (355), 2026-10-29. 사장님 지시: *"정보 버튼 아래
305
+ 버튼 추가해서 클릭하면 tooltip menu 로 해당 칸 단어의 기본형을 기준으로 유형을
306
+ 선택"*).
307
+
308
+ **차림표는 코어가 안 연다.** 꼴 목록은 품사마다 다르고 그것을 아는 쪽은 앱이다 —
309
+ 코어가 쥐는 것은 *어디에 서는가* 와 *어디에 붙여 열 것인가* 뿐이다. 그래서 누르면
310
+ **제 자리(`DOMRect`)** 를 준다. 앱이 그대로 `Tooltip` 의 `anchorRect` 에 꽂는다
311
+ (말귀 차림표가 이미 그 꼴로 먹는다 — React 이벤트 타입을 공개 자리에 안 들인다).
312
+
313
+ **용언에만 선다.** 꼴이 없는 낱말에 서면 눌러도 빈 차림표가 뜬다. 가르는 자는
314
+ `canPickForm` 하나이고 **앱이 잰다** — 사전의 품사는 `동/형` 처럼 빗금으로 겹쳐
315
+ 적혀서, 그 자를 코어와 앱 두 군데 두면 활용표와 단어표가 갈린다. */
316
+ _jsx("div", { className: "word-table-cell__form-button", children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "replace", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: t('wordTable.pickForm', '다른 꼴로'),
317
+ /* 한 표에 칸마다 하나씩이라 이름이 없으면 열두 개가 다 "버튼" 이 된다 */
318
+ ariaLabel: pickForm.n === null
319
+ ? t('wordTable.pickFormBaseAria', '기본형 낱말을 다른 꼴로')
320
+ : t('wordTable.pickFormAria', { n: pickForm.n, defaultValue: '{{n}}번 칸 낱말을 다른 꼴로' }), onClick: (e) => {
321
+ e.stopPropagation();
322
+ pickForm.onPick(e.currentTarget.getBoundingClientRect());
323
+ } }) }))] })] }));
304
324
  }
305
325
  /**
306
326
  * 단어표(표 디자인) — A4 종이를 컨테이너에 맞춰 축소(scale)하고,
@@ -308,7 +328,7 @@ function WordCell({ label, subLabel, colloquialLabel, captionLabel, captionBadge
308
328
  * 표시(items)·편집(editCells) 두 모드를 지원한다.
309
329
  * @public
310
330
  */
311
- 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, onReplaceItem, indexOffset = 0, totalCount, renderCellAction, showFillerAdd = false, addableCount, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
331
+ 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, onReplaceItem, onPickForm, indexOffset = 0, totalCount, renderCellAction, showFillerAdd = false, addableCount, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
312
332
  const clickMark = useCallback((cellIndex, clicked) => {
313
333
  onMarkClick?.(scoreIndexOffset + cellIndex, clicked);
314
334
  }, [onMarkClick, scoreIndexOffset]);
@@ -682,9 +702,25 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
682
702
  gridRow: `1 / span ${half.rows}`,
683
703
  /* 머리 칸과 나머지 절반을 가르는 점선 — 가로면 오른쪽, 세로면 아래쪽 */
684
704
  ...dotDashStyle(0, orientation === 'landscape' ? 2 : 1, orientation === 'landscape' ? 1 : 2, cutLine),
685
- }, 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, imageLabel: w.imageLabel, 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) {
705
+ }, 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, imageLabel: w.imageLabel,
706
+ /* **머리 칸에도 선다**(사장님 지시 2026-10-29 *"머리 칸에도 세워"*).
707
+ 한때 안 세웠다 — 그 칸이 기본형이라 거기서 꼴을 고르면 표 전체의
708
+ 기준이 흔들린다고 보았다. 그것이 바로 **치료사가 하려는 일**이다:
709
+ 활용표는 기본형 하나로 짜이므로, 표를 통째로 다른 낱말의 활용으로
710
+ 바꾸는 길이 머리 칸 말고는 없다.
711
+
712
+ **번호 자리에 `-1` 을 준다** — 머리 칸은 격자의 칸이 아니라 번호가
713
+ 없다(`onReorder` 가 쪽을 넘을 때 `-1` 을 쓰는 것과 같은 자다).
714
+ 낭독기 이름도 번호 대신 '기본형' 을 든다. */
715
+ pickForm: (onPickForm && w.canPickForm) ? {
716
+ n: null,
717
+ onPick: (anchor) => onPickForm(baseItem.id, -1, anchor),
718
+ } : undefined, 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) {
686
719
  onReorder(dragIndex.current, index);
687
- } ; 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, imageLabel: w.imageLabel, 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 || onReplaceItem || onReorder) && (
720
+ } ; 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, imageLabel: w.imageLabel, pickForm: (onPickForm && w.canPickForm) ? {
721
+ n: indexOffset + index + 1,
722
+ onPick: (anchor) => onPickForm(item.id, indexOffset + index, anchor),
723
+ } : undefined, 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 || onReplaceItem || onReorder) && (
688
724
  /* **오른쪽 기둥** — 빼기 → 부르는 쪽이 얹은 것 → 옮기기 손잡이 차례로 쌓인다
689
725
  (말귀 청 (331), 2026-10-28). 전에는 빼기와 얹은 것만 **한 줄**로 서고
690
726
  손잡이는 왼쪽 위에 따로 섰다 — 재생 단추와 **같은 자리라 겹쳤다.**
@@ -691,7 +691,10 @@
691
691
  "replaceItemAria": "Swap cell {{n}} only",
692
692
  "replacePairAria": "Swap pair {{n}} only",
693
693
  "thumbMoreAria_one": "1 more cell: {{words}}",
694
- "thumbMoreAria_other": "{{count}} more cells: {{words}}"
694
+ "thumbMoreAria_other": "{{count}} more cells: {{words}}",
695
+ "pickForm": "Other forms",
696
+ "pickFormAria": "Change the form in cell {{n}}",
697
+ "pickFormBaseAria": "Change the form of the base word"
695
698
  },
696
699
  "wordSearch": {
697
700
  "filterTitle": "Word Search Settings",
@@ -677,7 +677,10 @@
677
677
  "replacePair": "다른 쌍으로",
678
678
  "replaceItemAria": "{{n}}번 칸만 다른 단어로",
679
679
  "replacePairAria": "{{n}}번 칸만 다른 쌍으로",
680
- "thumbMoreAria": "그 밖 {{count}}칸: {{words}}"
680
+ "thumbMoreAria": "그 밖 {{count}}칸: {{words}}",
681
+ "pickForm": "다른 꼴로",
682
+ "pickFormAria": "{{n}}번 칸 낱말을 다른 꼴로",
683
+ "pickFormBaseAria": "기본형 낱말을 다른 꼴로"
681
684
  },
682
685
  "wordSearch": {
683
686
  "filterTitle": "단어 검색 설정",
@@ -42,6 +42,18 @@ export interface WordSearchResultWord {
42
42
  * 그 번호가 가린다.
43
43
  */
44
44
  imageLabel?: string;
45
+ /**
46
+ * 이 낱말이 **꼴을 가질 수 있나** — `true` 일 때만 칸에 꼴 고르기 단추가 선다
47
+ * (말귀 청 (355), 2026-10-29).
48
+ *
49
+ * 사장님이 못 박으셨다 — *"활용 단어 변경은 동사와 형용사만 허용해야 겠구나."* 꼴이 없는
50
+ * 낱말에 단추가 서면 눌러도 **빈 차림표**가 뜬다.
51
+ *
52
+ * **코어는 품사로 가르지 않는다.** 사전의 품사는 `동/형` · `동/보동` 처럼 빗금으로 겹쳐
53
+ * 적히고(말귀 라이브 실측 2026-10-27: 동 4,486 · 형 1,488 · 겹친 것 90여), 그 자를 코어와
54
+ * 앱 두 군데 두면 활용표와 단어표가 갈린다. 재는 자는 부르는 쪽 하나다.
55
+ */
56
+ canPickForm?: boolean;
45
57
  homonum?: number;
46
58
  grade?: string;
47
59
  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.402.0";
49
+ export declare const CORE_VERSION = "0.404.0";
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export const CORE_VERSION = '0.402.0';
49
+ export const CORE_VERSION = '0.404.0';