@ihabdevteam/core 0.457.0 → 0.458.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.
@@ -2245,7 +2245,7 @@ export declare function copyText(text: string): Promise<boolean>;
2245
2245
  *
2246
2246
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
2247
2247
  */
2248
- export declare const CORE_VERSION = "0.457.0";
2248
+ export declare const CORE_VERSION = "0.458.0";
2249
2249
 
2250
2250
  /** @public */
2251
2251
  declare const coreDefault: Record<string, unknown>;
@@ -3236,6 +3236,12 @@ declare interface FilterSectionInfoProps {
3236
3236
  /** 종성 글자 → 음소(대표음) 변환. 매핑에 없으면 원본 유지. */
3237
3237
  export declare function finalToPhoneme(jong: string): string;
3238
3238
 
3239
+ /**
3240
+ * **한 목록 안에서 겹친 단축키**(청 (447)) — 꺼지지 않은 줄끼리 같은 자판 자리면 그 키를 돌려준다(`'E'`). 시험에서 메뉴마다 불러 겹침을 잡는다.
3241
+ * @public
3242
+ */
3243
+ export declare function findDuplicateShortcuts(columns: TooltipMenuColumn[]): string[];
3244
+
3239
3245
  /** @public 단어의 초성 자모 ('가구' → 'ㄱ') */
3240
3246
  export declare function firstChoseongOf(word: string): string;
3241
3247
 
@@ -3472,6 +3478,7 @@ export declare function folderMenuItems(lines: {
3472
3478
  }): {
3473
3479
  label: string;
3474
3480
  icon: string;
3481
+ shortcut: string;
3475
3482
  onClick: () => void;
3476
3483
  closeOnSelect: true;
3477
3484
  }[];
@@ -5845,6 +5852,9 @@ export declare const ORDER_SETS: unknown[];
5845
5852
  /** @public */
5846
5853
  export declare function OrderListStep({ _stepIndex, _totalSteps, ...rest }: StepWrapperProps): JSX.Element;
5847
5854
 
5855
+ /** 차례 단축키 — 0 번째 → `'1'` … 8 번째 → `'9'`, 그 뒤는 `null`(청 (447)) */
5856
+ export declare function orderShortcut(index: number): string | null;
5857
+
5848
5858
  /** @public */
5849
5859
  export declare function Page(_props: PageProps): null;
5850
5860
 
@@ -8623,7 +8633,7 @@ export declare interface ShortcutBadgeProps {
8623
8633
  }
8624
8634
 
8625
8635
  /** 단축키 글자 → 자판 자리(`KeyE` · `Digit1`). 글자 · 숫자 하나가 아니면 `null` */
8626
- export declare function shortcutCode(shortcut: string | undefined): string | null;
8636
+ export declare function shortcutCode(shortcut: string | null | undefined): string | null;
8627
8637
 
8628
8638
  /**
8629
8639
  * 채점 화면을 떠나려 할 때 **물어봐야 하는가.**
@@ -10300,14 +10310,17 @@ export declare type TooltipMenuColumnItem = {
10300
10310
  * Badge type="dot"으로 표시한다 — 두 메뉴가 같은 항목을 다르게 보여주지 않도록. */
10301
10311
  badgeCount?: number;
10302
10312
  /**
10303
- * **단축키**(말귀 청 (447), 사장님 지시 2026-11-16 *"버튼 단축키 가능한가? · 쇼컷을 이름에 붙이지 말고 우측에 보이도록"*) — 글자 하나
10304
- * (`'E'`) 또는 숫자 하나(`'1'`).
10305
- * · 보이기: 항목 오른쪽 끝에 키캡으로 따로 선다. 이름이 길면 이름이 줄고 키캡은 안 잘린다. 하위 메뉴(`children`) · 배지가 있으면 그쪽이 선다.
10306
- * · 누르기: 메뉴가 떠 있는 동안 그 키를 누르면 이 항목을 누른 것과 같다(`closeOnSelect` 그대로). **자판 자리(`event.code`)로 맞춰**
10307
- * 한글 입력 상태에서도 먹는다. 꺼진 항목 · 입력칸에 초점이 있을 때 · Ctrl/⌘/Alt 와 함께 누를 때는 안 먹는다. 지금 보이는 목록만 본다.
10313
+ * **단축키 — 필수**(말귀 청 (447), 사장님 지시 2026-11-16 *"쇼컷을 이름에 붙이지 말고 우측에 보이도록"* → *"tooltip menu 는 단축키를
10314
+ * 전체적으로 필수로 받아서 모두 사용할 수 있도록"*). 글자 하나(`'E'`) 또는 숫자 하나(`'1'`). 빠뜨리면 tsc 가 운다.
10315
+ * 앱 자료로 짓는 긴 목록처럼 키를 정할 수 없는 줄은 **`null` 로 밝힌다**(아홉째까지는 `withOrderShortcuts` 가 1~9 를 준다).
10316
+ * · 보이기: 항목 오른쪽 끝에 키캡으로 따로 선다. 이름이 길면 이름이 줄고 키캡은 안 잘린다. 하위 메뉴(`children`) · 배지가 있으면 그쪽이 선다
10317
+ * (누르는 것은 된다).
10318
+ * · 누르기: 메뉴가 떠 있는 동안 그 키를 누르면 이 항목을 누른 것과 같다(하위 메뉴면 들어간다, `closeOnSelect` 그대로). **자판 자리(`event.code`)로
10319
+ * 맞춰** 한글 입력 상태에서도 먹는다. 꺼진 항목 · 입력칸에 초점이 있을 때 · Ctrl/⌘/Alt 와 함께 누를 때는 안 먹는다. 지금 보이는 목록만 본다.
10320
+ * · 한 목록 안에서 겹치면 개발 중 콘솔에 한 번 알린다(`findDuplicateShortcuts`). 겹치면 앞의 것이 먹는다.
10308
10321
  * · 낭독기: `aria-keyshortcuts` 로 알린다.
10309
10322
  */
10310
- shortcut?: string;
10323
+ shortcut: string | null;
10311
10324
  };
10312
10325
 
10313
10326
  /** @public */
@@ -10720,6 +10733,8 @@ declare type TrainingCardAction = {
10720
10733
  disabled?: boolean;
10721
10734
  /** 단추 하나일 때의 색 꼴 — 기본 `default`(테두리 있음, 청 (443) ㉪). 좋아요가 켜졌을 때 `danger` 처럼 바꾼다(메뉴 꼴에서는 안 쓴다). */
10722
10735
  variant?: ButtonProps['variant'];
10736
+ /** 둘 이상이라 ⋯ 메뉴로 설 때의 단축키(말귀 청 (447)) — 안 주면 차례대로 1~9. 하나뿐이라 단추로 설 때는 안 쓴다 */
10737
+ shortcut?: string | null;
10723
10738
  };
10724
10739
 
10725
10740
  /** @public */
@@ -12975,6 +12990,15 @@ export declare function withEuRo(text: string): string;
12975
12990
  /** text 뒤에 문맥에 맞는 이/가를 붙여 반환한다. */
12976
12991
  export declare function withIga(text: string): string;
12977
12992
 
12993
+ /**
12994
+ * **앱 자료로 짓는 줄에 차례 단축키를 준다**(청 (447)) — 위에서부터 1~9, 열째부터는 `null`. 키를 이미 쥔 줄은 그대로 둔다.
12995
+ * 코어 안에서는 내비 더보기 · 차트 고르개처럼 무엇이 몇 개 올지 모르는 목록에 쓴다.
12996
+ * @public
12997
+ */
12998
+ export declare function withOrderShortcuts<T extends object>(items: T[]): (T & {
12999
+ shortcut: string | null;
13000
+ })[];
13001
+
12978
13002
  /**
12979
13003
  * @public 스텝 payload 에 **때 둘을 얹는다** — 보인 때 · 답한 때(말귀 요청 (68) 후속, 2026-10-02).
12980
13004
  *
@@ -506,7 +506,7 @@ export default function BarChart({ canvasHeight, fitHeight, focusableBars, size
506
506
  : t('trainingStatus.detail', '상세보기');
507
507
  return (_jsx(ChartSection, { className: sectionClassName, size: sectionSize, inGrid: inGrid, icon: icon, disc: disc, onClick: onClick, ariaLabel: cardAriaLabel, tooltip: cardTooltip, headSegment: headSegment,
508
508
  /* 좁아 고르개가 '⋯' 로 접히면 상세보기도 그 메뉴로 들어간다 — 머리에 단추 둘이 남지 않게 */
509
- headMenuItems: onDetail ? [{ label: detailTitle, icon: 'list', onClick: onDetail, closeOnSelect: true }] : undefined, title: t(titleKey), titleLevel: titleLevel, headRight: isSmall ? (headExtra ?? undefined) : ({ collapsed }) => _jsxs(_Fragment, { children: [!hideControls && _jsx(BarChartControls, { control: control }), headExtra, onDetail && !collapsed && (_jsx("span", { className: withLegacy("bar-chart__detail-btn"), children: _jsx(Button, { htmlType: "button", size: detailSize, type: "dot", icon: "list", ariaLabel: detailTitle, showTooltipInfo: detailTitle, onClick: onDetail }) }))] }),
509
+ headMenuItems: onDetail ? [{ label: detailTitle, icon: 'list', shortcut: 'D', onClick: onDetail, closeOnSelect: true }] : undefined, title: t(titleKey), titleLevel: titleLevel, headRight: isSmall ? (headExtra ?? undefined) : ({ collapsed }) => _jsxs(_Fragment, { children: [!hideControls && _jsx(BarChartControls, { control: control }), headExtra, onDetail && !collapsed && (_jsx("span", { className: withLegacy("bar-chart__detail-btn"), children: _jsx(Button, { htmlType: "button", size: detailSize, type: "dot", icon: "list", ariaLabel: detailTitle, showTooltipInfo: detailTitle, onClick: onDetail }) }))] }),
510
510
  /* 범례는 서브로우 밖 제 자리(`legend`)에 — 사장님 지시 2026-11-02, 수의 줄상자에서 푼다 */
511
511
  legend: _jsx(ChartLegend, { items: legendItems, className: "caption-1" }),
512
512
  /* 속을 카드 키에 맞출 때만 카드가 키를 박는다 — 안 맞추는 카드를 박으면 x축이 흘러나온다 */
@@ -5,7 +5,7 @@ import { createPortal } from 'react-dom';
5
5
  import './BottomNav.css';
6
6
  import Button from './Button';
7
7
  import CircleBadge from './CircleBadge';
8
- import MenuTooltip from './Tooltip/MenuTooltip';
8
+ import MenuTooltip, { withOrderShortcuts } from './Tooltip/MenuTooltip';
9
9
  // .tooltip__content(메뉴 표면)를 직접 쓰므로 정의 파일을 명시적으로 가져온다.
10
10
  // Tooltip.tsx만 이 CSS를 import하는데 BottomNav는 그 컴포넌트를 거치지 않아,
11
11
  // 프로덕션에서 청크가 갈리면 스타일 없이 렌더될 수 있다.
@@ -113,7 +113,8 @@ export default function BottomNav({ items = [], activeKey, onChange, appMode, on
113
113
  const activeMore = useMemo(() => hiddenItems.find(it => !!it.key && it.key === activeKey) ?? moreItems.find(it => it.selected || (it.key && it.key === activeKey)), [hiddenItems, activeKey, moreItems]);
114
114
  // 넘친 nav 항목 + 유틸 항목을 한 컬럼으로 합쳐 더보기 메뉴에 노출(각자 아이콘으로 구분)
115
115
  const moreColumns = useMemo(() => [{
116
- items: [
116
+ /* 단축키는 위에서부터 1~9(청 (447)) — 넘친 항목 · 유틸 항목은 앱 자료라 키를 정할 수 없다 */
117
+ items: withOrderShortcuts([
117
118
  ...hiddenItems.map(it => ({
118
119
  label: it.label,
119
120
  icon: it.icon,
@@ -143,7 +144,7 @@ export default function BottomNav({ items = [], activeKey, onChange, appMode, on
143
144
  handleCloseMore();
144
145
  },
145
146
  })),
146
- ]
147
+ ]),
147
148
  }], [hiddenItems, moreItems, activeKey, onChange, handleCloseMore]);
148
149
  // "…" 단추 배지 — 메뉴 안에서만 보이는 개수(넘친 항목 + 유틸)를 닫힌 채로도 알린다.
149
150
  const moreBadge = [...hiddenItems, ...moreItems].reduce((sum, it) => sum + badgeOf(it.badgeCount), 0);
@@ -11,7 +11,7 @@ import Tooltip from './Tooltip/Tooltip';
11
11
  import TooltipInfo from './Tooltip/InfoTooltip';
12
12
  import { useHoverAnchor } from '../hooks/useHoverAnchor';
13
13
  import { useIsoLayoutEffect } from '../hooks/useIsoLayoutEffect';
14
- import MenuTooltip from './Tooltip/MenuTooltip';
14
+ import MenuTooltip, { orderShortcut } from './Tooltip/MenuTooltip';
15
15
  import { CHART_HEAD_SIZE } from './controlSize';
16
16
  import { withLegacy } from '../utils/legacyBlocks';
17
17
  /** 차트 범례 — 색상 점 + 라벨 목록. BarChart/RingChart 섹션이 공유. @public */
@@ -188,8 +188,9 @@ export default function ChartSection({ type = 'chart', title, titleClassName, ti
188
188
  setMenuRect(null); }, [collapsed]);
189
189
  const menuItems = headSegment
190
190
  ? [
191
- ...headSegment.options.map(o => ({
191
+ ...headSegment.options.map((o, i) => ({
192
192
  label: o.label,
193
+ shortcut: orderShortcut(i),
193
194
  icon: o.icon,
194
195
  selected: o.key === headSegment.value,
195
196
  disabled: o.disabled,
@@ -6,7 +6,7 @@ import { useMediaQuery } from '../hooks';
6
6
  import BottomNav from './BottomNav';
7
7
  import Button from './Button';
8
8
  import CircleBadge from './CircleBadge';
9
- import MenuTooltip from './Tooltip/MenuTooltip';
9
+ import MenuTooltip, { orderShortcut } from './Tooltip/MenuTooltip';
10
10
  import { useAnchoredMenu, anchoredMenuZIndex } from '../hooks/useAnchoredMenu';
11
11
  import { createPortal } from 'react-dom';
12
12
  // 메뉴 표면(.tooltip__content) 정의 — Tooltip.tsx를 거치지 않고 클래스만 쓰므로 명시적으로.
@@ -117,8 +117,9 @@ export default function Header({ activeKey, onChange, items, malgwiItems: _malgw
117
117
  const utilMenuId = useId();
118
118
  const { open: utilOpen, toggle: toggleUtilMenu, close: closeUtilMenu, style: utilMenuStyle, triggerRef: utilTriggerRef, menuRef: utilMenuRef } = useAnchoredMenu({ computeStyle: computeUtilMenuStyle, onScroll: 'ignore', onResize: 'reposition' /* 회전하면 옛 좌표에 남았다 — 다시 잰다 */ });
119
119
  const utilColumns = useMemo(() => [{
120
- items: bottomMoreItems.map(it => ({
120
+ items: bottomMoreItems.map((it, i) => ({
121
121
  label: it.label,
122
+ shortcut: orderShortcut(i),
122
123
  icon: it.icon,
123
124
  badgeCount: it.badgeCount,
124
125
  selected: it.selected ?? (!!it.key && it.key === activeKey),
@@ -352,9 +352,9 @@ export default function PassCard({ ariaLabel, product, showPrice = false, plan,
352
352
  }, [hasMenu, handleCardClick]);
353
353
  const menuColumns = [{
354
354
  items: [
355
- ...(onUse ? [{ label: t('passCard.menu.use', '사용하기'), icon: 'play', onClick: () => { onUse(); setMenuAnchor(null); }, closeOnSelect: true }] : []),
356
- ...(onRefund ? [{ label: t('passCard.menu.refund', '환불하기'), icon: 'rotate-ccw', onClick: () => { onRefund(); setMenuAnchor(null); }, closeOnSelect: true }] : []),
357
- ...(onDelete ? [{ label: t('passCard.menu.delete', '삭제하기'), icon: 'trash-2', onClick: () => { onDelete(); setMenuAnchor(null); }, closeOnSelect: true }] : []),
355
+ ...(onUse ? [{ label: t('passCard.menu.use', '사용하기'), icon: 'play', shortcut: 'U', onClick: () => { onUse(); setMenuAnchor(null); }, closeOnSelect: true }] : []),
356
+ ...(onRefund ? [{ label: t('passCard.menu.refund', '환불하기'), icon: 'rotate-ccw', shortcut: 'R', onClick: () => { onRefund(); setMenuAnchor(null); }, closeOnSelect: true }] : []),
357
+ ...(onDelete ? [{ label: t('passCard.menu.delete', '삭제하기'), icon: 'trash-2', shortcut: 'D', onClick: () => { onDelete(); setMenuAnchor(null); }, closeOnSelect: true }] : []),
358
358
  ],
359
359
  }];
360
360
  return (_jsxs(_Fragment, { children: [_jsx("div", { className: "pass-card-frame", children: _jsxs("div", { ref: cardRef, className: `pass-card pass-card--${state}${hasMenu ? ' pass-card--clickable' : ''}`, style: cardStyle, onMouseEnter: handleMouseEnter, onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave,
@@ -20,17 +20,35 @@ export type TooltipMenuColumnItem = {
20
20
  * Badge type="dot"으로 표시한다 — 두 메뉴가 같은 항목을 다르게 보여주지 않도록. */
21
21
  badgeCount?: number;
22
22
  /**
23
- * **단축키**(말귀 청 (447), 사장님 지시 2026-11-16 *"버튼 단축키 가능한가? · 쇼컷을 이름에 붙이지 말고 우측에 보이도록"*) — 글자 하나
24
- * (`'E'`) 또는 숫자 하나(`'1'`).
25
- * · 보이기: 항목 오른쪽 끝에 키캡으로 따로 선다. 이름이 길면 이름이 줄고 키캡은 안 잘린다. 하위 메뉴(`children`) · 배지가 있으면 그쪽이 선다.
26
- * · 누르기: 메뉴가 떠 있는 동안 그 키를 누르면 이 항목을 누른 것과 같다(`closeOnSelect` 그대로). **자판 자리(`event.code`)로 맞춰**
27
- * 한글 입력 상태에서도 먹는다. 꺼진 항목 · 입력칸에 초점이 있을 때 · Ctrl/⌘/Alt 와 함께 누를 때는 안 먹는다. 지금 보이는 목록만 본다.
23
+ * **단축키 — 필수**(말귀 청 (447), 사장님 지시 2026-11-16 *"쇼컷을 이름에 붙이지 말고 우측에 보이도록"* → *"tooltip menu 는 단축키를
24
+ * 전체적으로 필수로 받아서 모두 사용할 수 있도록"*). 글자 하나(`'E'`) 또는 숫자 하나(`'1'`). 빠뜨리면 tsc 가 운다.
25
+ * 앱 자료로 짓는 긴 목록처럼 키를 정할 수 없는 줄은 **`null` 로 밝힌다**(아홉째까지는 `withOrderShortcuts` 가 1~9 를 준다).
26
+ * · 보이기: 항목 오른쪽 끝에 키캡으로 따로 선다. 이름이 길면 이름이 줄고 키캡은 안 잘린다. 하위 메뉴(`children`) · 배지가 있으면 그쪽이 선다
27
+ * (누르는 것은 된다).
28
+ * · 누르기: 메뉴가 떠 있는 동안 그 키를 누르면 이 항목을 누른 것과 같다(하위 메뉴면 들어간다, `closeOnSelect` 그대로). **자판 자리(`event.code`)로
29
+ * 맞춰** 한글 입력 상태에서도 먹는다. 꺼진 항목 · 입력칸에 초점이 있을 때 · Ctrl/⌘/Alt 와 함께 누를 때는 안 먹는다. 지금 보이는 목록만 본다.
30
+ * · 한 목록 안에서 겹치면 개발 중 콘솔에 한 번 알린다(`findDuplicateShortcuts`). 겹치면 앞의 것이 먹는다.
28
31
  * · 낭독기: `aria-keyshortcuts` 로 알린다.
29
32
  */
30
- shortcut?: string;
33
+ shortcut: string | null;
31
34
  };
32
35
  /** 단축키 글자 → 자판 자리(`KeyE` · `Digit1`). 글자 · 숫자 하나가 아니면 `null` */
33
- export declare function shortcutCode(shortcut: string | undefined): string | null;
36
+ export declare function shortcutCode(shortcut: string | null | undefined): string | null;
37
+ /** 차례 단축키 — 0 번째 → `'1'` … 8 번째 → `'9'`, 그 뒤는 `null`(청 (447)) */
38
+ export declare function orderShortcut(index: number): string | null;
39
+ /**
40
+ * **앱 자료로 짓는 줄에 차례 단축키를 준다**(청 (447)) — 위에서부터 1~9, 열째부터는 `null`. 키를 이미 쥔 줄은 그대로 둔다.
41
+ * 코어 안에서는 내비 더보기 · 차트 고르개처럼 무엇이 몇 개 올지 모르는 목록에 쓴다.
42
+ * @public
43
+ */
44
+ export declare function withOrderShortcuts<T extends object>(items: T[]): (T & {
45
+ shortcut: string | null;
46
+ })[];
47
+ /**
48
+ * **한 목록 안에서 겹친 단축키**(청 (447)) — 꺼지지 않은 줄끼리 같은 자판 자리면 그 키를 돌려준다(`'E'`). 시험에서 메뉴마다 불러 겹침을 잡는다.
49
+ * @public
50
+ */
51
+ export declare function findDuplicateShortcuts(columns: TooltipMenuColumn[]): string[];
34
52
  /** @public */
35
53
  export type TooltipMenuColumn = {
36
54
  /**
@@ -6,6 +6,7 @@ import Button from '../Button';
6
6
  import CircleBadge from '../CircleBadge';
7
7
  import './MenuTooltip.css';
8
8
  import { withLegacy } from '../../utils/legacyBlocks';
9
+ import { devWarnOnce } from '../../utils/devWarn';
9
10
  /** 단축키 글자 → 자판 자리(`KeyE` · `Digit1`). 글자 · 숫자 하나가 아니면 `null` */
10
11
  export function shortcutCode(shortcut) {
11
12
  const k = (shortcut ?? '').trim().toUpperCase();
@@ -15,6 +16,35 @@ export function shortcutCode(shortcut) {
15
16
  return `Digit${k}`;
16
17
  return null;
17
18
  }
19
+ /** 차례 단축키 — 0 번째 → `'1'` … 8 번째 → `'9'`, 그 뒤는 `null`(청 (447)) */
20
+ export function orderShortcut(index) {
21
+ return index >= 0 && index < 9 ? String(index + 1) : null;
22
+ }
23
+ /**
24
+ * **앱 자료로 짓는 줄에 차례 단축키를 준다**(청 (447)) — 위에서부터 1~9, 열째부터는 `null`. 키를 이미 쥔 줄은 그대로 둔다.
25
+ * 코어 안에서는 내비 더보기 · 차트 고르개처럼 무엇이 몇 개 올지 모르는 목록에 쓴다.
26
+ * @public
27
+ */
28
+ export function withOrderShortcuts(items) {
29
+ return items.map((it, i) => {
30
+ const own = it.shortcut;
31
+ return { ...it, shortcut: own !== undefined ? own : orderShortcut(i) };
32
+ });
33
+ }
34
+ /**
35
+ * **한 목록 안에서 겹친 단축키**(청 (447)) — 꺼지지 않은 줄끼리 같은 자판 자리면 그 키를 돌려준다(`'E'`). 시험에서 메뉴마다 불러 겹침을 잡는다.
36
+ * @public
37
+ */
38
+ export function findDuplicateShortcuts(columns) {
39
+ const seen = new Map();
40
+ for (const col of columns ?? [])
41
+ for (const it of col?.items ?? []) {
42
+ const code = it && !it.disabled ? shortcutCode(it.shortcut) : null;
43
+ if (code)
44
+ seen.set(code, (seen.get(code) ?? 0) + 1);
45
+ }
46
+ return [...seen].filter(([, n]) => n > 1).map(([code]) => code.replace(/^Key|^Digit/, ''));
47
+ }
18
48
  /** @public */
19
49
  export default function MenuTooltip({ columns = [], onClose, className = '', size = 'medium' }) {
20
50
  const { t } = useTranslation();
@@ -91,6 +121,12 @@ export default function MenuTooltip({ columns = [], onClose, className = '', siz
91
121
  }
92
122
  catch (err) { }
93
123
  }, [onClose, visibleDepth]);
124
+ /* 한 목록 안에서 키가 겹치면 개발 중 한 번 알린다(청 (447)) */
125
+ useEffect(() => {
126
+ const dup = findDuplicateShortcuts(current.columns);
127
+ if (dup.length)
128
+ devWarnOnce(`menu-shortcut-dup:${dup.join(',')}:${current.columns.flatMap(c => c.items.map(i => i.label)).join('|')}`, `[MenuTooltip] 한 메뉴 안에서 단축키가 겹칩니다: ${dup.join(', ')} — 앞의 항목만 먹습니다.`);
129
+ }, [current.columns]);
94
130
  /* **단축키**(청 (447)) — 떠 있는 동안 지금 보이는 목록의 항목을 자판 자리로 누른다. 최신 목록 · 손은 ref 로 읽어 듣개를 한 번만 건다 */
95
131
  const shortcutRef = useRef({ columns: current.columns, handleClick });
96
132
  shortcutRef.current = { columns: current.columns, handleClick };
@@ -13,6 +13,8 @@ export type TrainingCardAction = {
13
13
  disabled?: boolean;
14
14
  /** 단추 하나일 때의 색 꼴 — 기본 `default`(테두리 있음, 청 (443) ㉪). 좋아요가 켜졌을 때 `danger` 처럼 바꾼다(메뉴 꼴에서는 안 쓴다). */
15
15
  variant?: ButtonProps['variant'];
16
+ /** 둘 이상이라 ⋯ 메뉴로 설 때의 단축키(말귀 청 (447)) — 안 주면 차례대로 1~9. 하나뿐이라 단추로 설 때는 안 쓴다 */
17
+ shortcut?: string | null;
16
18
  };
17
19
  /** @public */
18
20
  export type TrainingCardProps = {
@@ -6,7 +6,7 @@ import { useCallback, useState } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import Button from '../Button';
8
8
  import Tooltip from '../Tooltip/Tooltip';
9
- import MenuTooltip from '../Tooltip/MenuTooltip';
9
+ import MenuTooltip, { withOrderShortcuts } from '../Tooltip/MenuTooltip';
10
10
  /** @public */
11
11
  export default function TrainingCard({ title, titleLevel = 3, category, categoryVariant = 'main', description, topActions, actions, children, footerLeft, footerRight, ariaLabel, onClick, draggable, onDragStart, onDragEnd, className, }) {
12
12
  const TitleTag = titleLevel ? `h${titleLevel}` : 'div';
@@ -50,5 +50,5 @@ export default function TrainingCard({ title, titleLevel = 3, category, category
50
50
  ? _jsx("div", { className: "training-card__body", children: children })
51
51
  : _jsx("div", { className: "training-card__body training-card__body--empty", "aria-hidden": "true" }), hasFooter ? (_jsxs("div", { className: "training-card__footer", children: [footerLeft != null && _jsx("div", { className: "training-card__footer-left", children: footerLeft }), footerRight != null && _jsx("div", { className: "training-card__meta", children: footerRight })] })) : _jsx("div", { className: "training-card__footer training-card__footer--empty", "aria-hidden": "true" }), menuRect && actionList.length > 1 && (
52
52
  /* 메뉴의 누름은 카드로 올라가지 않는다 — 고르는 것이 카드를 여는 것이 되면 안 된다 */
53
- _jsx("div", { className: "training-card__menu-host", onClick: (e) => e.stopPropagation(), children: _jsx(Tooltip, { anchorRect: menuRect, onClose: closeMenu, ariaLabel: t('tooltip.menu', '메뉴'), children: _jsx(MenuTooltip, { columns: [{ items: actionList.map(a => ({ label: a.label, icon: a.icon, selected: a.selected, disabled: a.disabled, onClick: a.onClick })) }], onClose: closeMenu, size: "small" }) }) }))] }));
53
+ _jsx("div", { className: "training-card__menu-host", onClick: (e) => e.stopPropagation(), children: _jsx(Tooltip, { anchorRect: menuRect, onClose: closeMenu, ariaLabel: t('tooltip.menu', '메뉴'), children: _jsx(MenuTooltip, { columns: [{ items: withOrderShortcuts(actionList.map(a => ({ label: a.label, icon: a.icon, selected: a.selected, disabled: a.disabled, onClick: a.onClick, shortcut: a.shortcut }))) }], onClose: closeMenu, size: "small" }) }) }))] }));
54
54
  }
@@ -22,6 +22,7 @@ export declare function folderMenuItems(lines: {
22
22
  }): {
23
23
  label: string;
24
24
  icon: string;
25
+ shortcut: string;
25
26
  onClick: () => void;
26
27
  closeOnSelect: true;
27
28
  }[];
@@ -9,11 +9,12 @@
9
9
  */
10
10
  /** @public 폴더 메뉴의 줄을 정해진 차례 · 아이콘으로 짓는다 */
11
11
  export function folderMenuItems(lines) {
12
- const row = (line, icon) => ({ ...line, icon, closeOnSelect: true });
12
+ /* 단축키도 차례와 함께 코어가 정한다(말귀 청 (447) — 메뉴 단축키 필수): 더하기 A · 폴더 추가 F · 이름 바꾸기 R · 삭제 D */
13
+ const row = (line, icon, shortcut) => ({ ...line, icon, shortcut, closeOnSelect: true });
13
14
  return [
14
- row(lines.add, 'plus'),
15
- row(lines.addFolder, 'folder-plus'),
16
- ...(lines.rename ? [row(lines.rename, 'edit-2')] : []),
17
- ...(lines.remove ? [row(lines.remove, 'trash-2')] : []),
15
+ row(lines.add, 'plus', 'A'),
16
+ row(lines.addFolder, 'folder-plus', 'F'),
17
+ ...(lines.rename ? [row(lines.rename, 'edit-2', 'R')] : []),
18
+ ...(lines.remove ? [row(lines.remove, 'trash-2', 'D')] : []),
18
19
  ];
19
20
  }
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export declare const CORE_VERSION = "0.457.0";
49
+ export declare const CORE_VERSION = "0.458.0";
@@ -46,4 +46,4 @@
46
46
  *
47
47
  * 값은 손으로 적고 `test/coreVersion.test.ts` 가 package.json 과 어긋나면 운다.
48
48
  */
49
- export const CORE_VERSION = '0.457.0';
49
+ export const CORE_VERSION = '0.458.0';