@ihabdevteam/core 0.403.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.403.0";
1925
+ export declare const CORE_VERSION = "0.404.0";
1926
1926
 
1927
1927
  /** @public */
1928
1928
  declare const coreDefault: Record<string, unknown>;
@@ -12231,6 +12231,8 @@ export declare interface WordTableProps {
12231
12231
  * 그 단추의 **자리**(`DOMRect`)를 준다. 받은 쪽은 그대로 `Tooltip` 의 `anchorRect` 에 꽂는다.
12232
12232
  *
12233
12233
  * `index` 는 `indexOffset` 을 얹은 **표 전체 기준**이다(`onCopyItem` · `onReplaceItem` 과 같다).
12234
+ * 머리 칸(`baseItem`)에서 누르면 **`-1`** 이고 `id` 는 머리 낱말의 것이다 — 머리 칸은
12235
+ * 격자의 칸이 아니라 번호가 없다(`onReorder` 가 쪽을 넘을 때 쓰는 `-1` 과 같은 자다).
12234
12236
  */
12235
12237
  onPickForm?: (id: string, index: number, anchor: DOMRect) => void;
12236
12238
  onReorder?: (fromIndex: number, toIndex: number) => void;
@@ -86,6 +86,8 @@ export interface WordTableProps {
86
86
  * 그 단추의 **자리**(`DOMRect`)를 준다. 받은 쪽은 그대로 `Tooltip` 의 `anchorRect` 에 꽂는다.
87
87
  *
88
88
  * `index` 는 `indexOffset` 을 얹은 **표 전체 기준**이다(`onCopyItem` · `onReplaceItem` 과 같다).
89
+ * 머리 칸(`baseItem`)에서 누르면 **`-1`** 이고 `id` 는 머리 낱말의 것이다 — 머리 칸은
90
+ * 격자의 칸이 아니라 번호가 없다(`onReorder` 가 쪽을 넘을 때 쓰는 `-1` 과 같은 자다).
89
91
  */
90
92
  onPickForm?: (id: string, index: number, anchor: DOMRect) => void;
91
93
  onReorder?: (fromIndex: number, toIndex: number) => void;
@@ -315,7 +315,9 @@ function WordCell({ label, subLabel, colloquialLabel, captionLabel, captionBadge
315
315
  적혀서, 그 자를 코어와 앱 두 군데 두면 활용표와 단어표가 갈린다. */
316
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
317
  /* 한 표에 칸마다 하나씩이라 이름이 없으면 열두 개가 다 "버튼" 이 된다 */
318
- ariaLabel: t('wordTable.pickFormAria', { n: pickForm.n, defaultValue: '{{n}}번 칸 낱말을 다른 꼴로' }), onClick: (e) => {
318
+ ariaLabel: pickForm.n === null
319
+ ? t('wordTable.pickFormBaseAria', '기본형 낱말을 다른 꼴로')
320
+ : t('wordTable.pickFormAria', { n: pickForm.n, defaultValue: '{{n}}번 칸 낱말을 다른 꼴로' }), onClick: (e) => {
319
321
  e.stopPropagation();
320
322
  pickForm.onPick(e.currentTarget.getBoundingClientRect());
321
323
  } }) }))] })] }));
@@ -701,9 +703,19 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
701
703
  /* 머리 칸과 나머지 절반을 가르는 점선 — 가로면 오른쪽, 세로면 아래쪽 */
702
704
  ...dotDashStyle(0, orientation === 'landscape' ? 2 : 1, orientation === 'landscape' ? 1 : 2, cutLine),
703
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,
704
- /* **머리 칸에는 꼴 고르기가 없다** — 그 칸이 바로 기본형이다.
705
- 거기서 꼴을 고르면 표 전체의 기준이 흔들린다. */
706
- 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) {
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) {
707
719
  onReorder(dragIndex.current, index);
708
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) ? {
709
721
  n: indexOffset + index + 1,
@@ -693,7 +693,8 @@
693
693
  "thumbMoreAria_one": "1 more cell: {{words}}",
694
694
  "thumbMoreAria_other": "{{count}} more cells: {{words}}",
695
695
  "pickForm": "Other forms",
696
- "pickFormAria": "Change the form in cell {{n}}"
696
+ "pickFormAria": "Change the form in cell {{n}}",
697
+ "pickFormBaseAria": "Change the form of the base word"
697
698
  },
698
699
  "wordSearch": {
699
700
  "filterTitle": "Word Search Settings",
@@ -679,7 +679,8 @@
679
679
  "replacePairAria": "{{n}}번 칸만 다른 쌍으로",
680
680
  "thumbMoreAria": "그 밖 {{count}}칸: {{words}}",
681
681
  "pickForm": "다른 꼴로",
682
- "pickFormAria": "{{n}}번 칸 낱말을 다른 꼴로"
682
+ "pickFormAria": "{{n}}번 칸 낱말을 다른 꼴로",
683
+ "pickFormBaseAria": "기본형 낱말을 다른 꼴로"
683
684
  },
684
685
  "wordSearch": {
685
686
  "filterTitle": "단어 검색 설정",
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export declare const CORE_VERSION = "0.403.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.403.0';
49
+ export const CORE_VERSION = '0.404.0';