@ehfuse/taskbox 0.7.44 → 0.7.46

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.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * "@" 언급 자동완성(2026-10-16) — 글 입력칸에서 "@" 뒤로 치는 글자로 사람 후보를 걸러 위 · 아래 화살표와 Enter 로 고른다.
3
+ * 고르면 "@" 부터 친 글자까지를 "@이름 " 으로 바꾼다. 후보가 없으면(소비처가 mentionCandidates 를 안 넘기면) 아무것도 하지 않는다.
4
+ *
5
+ * 쓰는 법 — 입력칸에 `inputRef` 와 `onKeyDown`(먼저 부르고, true 면 자기 키 처리를 건너뛴다) · `onSelectionChange` 를 잇고, `popper` 를 옆에 그린다.
6
+ * 입력칸의 값 · 바꾸기(value · setValue)는 소비처 것을 그대로 쓴다(제어 입력칸).
7
+ */
8
+ import { type KeyboardEvent, type ReactNode } from "react";
9
+ import type { TaskboxMentionCandidate } from "../types/provider";
10
+ export declare function useMentionAutocomplete({ value, setValue, candidates, }: {
11
+ value: string;
12
+ setValue: (next: string) => void;
13
+ candidates?: TaskboxMentionCandidate[];
14
+ }): {
15
+ inputRef: (element: HTMLTextAreaElement | HTMLInputElement | null) => void;
16
+ onKeyDown: (event: KeyboardEvent) => boolean;
17
+ onSelectionChange: () => void;
18
+ popper: ReactNode;
19
+ };
@@ -24,6 +24,12 @@ export interface TaskboxFileUrlOptions {
24
24
  thumb?: "sm" | "md" | "lg";
25
25
  download?: boolean;
26
26
  }
27
+ /** @이름 언급 후보 한 사람이다. */
28
+ export interface TaskboxMentionCandidate {
29
+ name: string;
30
+ avatar?: string;
31
+ subtitle?: string;
32
+ }
27
33
  /** UI 교체 슬롯 모음이다. */
28
34
  export interface TaskboxSlots {
29
35
  avatar?: ComponentType<TaskboxAvatarProps>;
@@ -104,6 +110,11 @@ export interface TaskboxConfig {
104
110
  * prop 을 따로 뚫지 않은 자리(ReceiverAvatarStack)는 여기서 읽는다(없으면 이니셜).
105
111
  */
106
112
  avatarSrcByName?: Map<string, string>;
113
+ /**
114
+ * @이름 언급 후보(2026-10-16) — 지정하면 댓글 입력칸에서 "@" 를 치면 이 목록에서 고르는 자동완성이 뜬다.
115
+ * 미지정(기본)=자동완성 없음(지금과 같다). 고르면 "@이름 " 이 글에 들어가고, 알림은 소비처 서버가 글에서 찾아 보낸다.
116
+ */
117
+ mentionCandidates?: TaskboxMentionCandidate[];
107
118
  /** 로그인 계정 seq — 완료 "되돌리기" 판정 등 화면 곳곳의 본인 판정에 쓴다(prop 을 안 받는 자리용). */
108
119
  myAccountSeq?: number;
109
120
  /**
@@ -21,6 +21,8 @@ export interface TaskBoxMonthCalendarProps {
21
21
  disableDrag?: boolean;
22
22
  onOpenDetail: (task: TaskBoxItem) => void;
23
23
  onTaskContextMenu: (task: TaskBoxItem, event: React.MouseEvent) => void;
24
+ /** 날짜 띠 아래 구분선을 숨긴다(0.7.45) — 칸 안이 한 덩어리로 보이게 하려는 소비처용. 기본은 지금처럼 선을 긋는다. */
25
+ hideDateDivider?: boolean;
24
26
  }
25
27
  /** 월간 캘린더 컴포넌트다. */
26
- export declare function TaskBoxMonthCalendar({ tasks, googleEvents, onGoogleEventClick, statusOptions, fallbackToStartDate, myAccountSeq, avatarSrcByName, onToggleCompleted, todayStr, onMoveTask, onAddSchedule, canAdd, disableDrag, onOpenDetail, onTaskContextMenu, }: TaskBoxMonthCalendarProps): import("react").JSX.Element;
28
+ export declare function TaskBoxMonthCalendar({ tasks, googleEvents, onGoogleEventClick, statusOptions, fallbackToStartDate, myAccountSeq, avatarSrcByName, onToggleCompleted, todayStr, onMoveTask, onAddSchedule, canAdd, disableDrag, onOpenDetail, onTaskContextMenu, hideDateDivider, }: TaskBoxMonthCalendarProps): import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/taskbox",
3
- "version": "0.7.44",
3
+ "version": "0.7.46",
4
4
  "description": "A React/MUI task inbox component with notices, per-user assignments, read tracking, and mobile card UI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",