@ehfuse/taskbox 0.11.18 → 0.11.20

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.
@@ -7,6 +7,7 @@
7
7
  * - RichCommentBody: 서식 댓글을 허용 태그만 남겨 그린다. 링크는 소비처 열기(openExternalUrl), "@이름" 은 파랗게.
8
8
  */
9
9
  import { type ReactNode } from "react";
10
+ import type { TaskboxMentionCandidate, TaskboxSlashCommand } from "../types";
10
11
  export interface CommentRichEditorHandle {
11
12
  /** 저장할 댓글 글(서식 없으면 평문, 비었으면 ""). */
12
13
  getComment: () => string;
@@ -32,6 +33,9 @@ export interface CommentRichEditorProps {
32
33
  * boxed — 둥근 테두리 상자(댓글 고치기처럼 목록 사이에 놓일 때).
33
34
  */
34
35
  variant?: "bare" | "boxed";
36
+ /** "@" 언급 후보 · "/" 명령(0.11.20) — 안 주면 Provider 설정. 업무 상세 밖 소비처(게시판 댓글)가 TaskCommentInput 으로 준 값을 그대로 잇는다. */
37
+ mentionCandidates?: TaskboxMentionCandidate[];
38
+ slashCommands?: boolean | TaskboxSlashCommand[];
35
39
  }
36
40
  export declare const CommentRichEditor: import("react").ForwardRefExoticComponent<CommentRichEditorProps & import("react").RefAttributes<CommentRichEditorHandle>>;
37
41
  /** 서식 댓글 보기 — 허용 태그만 그리고, 링크는 소비처 열기로, "@이름" 은 파랗게. */
@@ -5,6 +5,8 @@
5
5
  * 미주입 시 내장 AccountAvatar 폴백.
6
6
  */
7
7
  import type { TaskBoxAttachment, TaskBoxComment, TaskBoxCommentReactionKind } from "../types";
8
+ import type { ComponentType } from "react";
9
+ import type { TaskboxMentionCandidate, TaskboxSlashCommand } from "../types/provider";
8
10
  /** 댓글 섹션 props 다. */
9
11
  export interface TaskCommentsSectionProps {
10
12
  taskSeq: number;
@@ -27,9 +29,27 @@ export declare function TaskCommentsSection({ taskSeq, comments, currentUserName
27
29
  export interface TaskCommentInputProps {
28
30
  onSubmit: (text: string, files?: File[]) => void;
29
31
  rows?: 1 | 2;
32
+ /** 넓은 칸 안내문(commentInput.placeholder 보다 먼저). */
33
+ placeholder?: string;
34
+ /** 좁은 칸(폰 · 한 줄 칸) 안내문(commentInput.placeholderShort 보다 먼저). */
35
+ placeholderShort?: string;
36
+ /** 넓은 화면 서식 에디터를 쓸지(commentInput.richEditor 보다 먼저). 댓글을 평문으로만 그리는 소비처는 false. */
37
+ richEditor?: boolean;
38
+ /** "@" 언급 후보 — [] 를 주면 언급 도우미를 끈다(이름으로 알림을 보내지 않는 소비처). */
39
+ mentionCandidates?: TaskboxMentionCandidate[];
40
+ /** "/" 명령 — true 면 기본 이모지 명령, false 면 끈다. */
41
+ slashCommands?: boolean | TaskboxSlashCommand[];
42
+ /** 파일 · 이미지 첨부(단추 · 끌어놓기 · 붙여넣기)를 받을지. 기본 true. 첨부를 끈 게시판은 false. */
43
+ attachments?: boolean;
44
+ /** 이모지 판(slots.emojiPicker 보다 먼저). */
45
+ emojiPicker?: ComponentType<{
46
+ onPick: (emoji: string) => void;
47
+ }>;
48
+ /** 보내기를 막는다(보내는 중 등). 칸에 쓰는 것은 막지 않는다. */
49
+ disabled?: boolean;
30
50
  }
31
51
  /**
32
52
  * 드로어 하단 고정 댓글 입력이다 — 보내기 버튼은 입력칸 안 오른쪽에 플로팅으로 띄운다.
33
53
  * 파일/이미지 첨부 아이콘은 모바일(1줄)에서는 보내기 버튼 왼쪽에, 데스크톱에서는 입력칸 왼쪽 아래에 둔다.
34
54
  */
35
- export declare function TaskCommentInput({ onSubmit, rows }: TaskCommentInputProps): import("react").JSX.Element;
55
+ export declare function TaskCommentInput({ onSubmit, rows, placeholder, placeholderShort, richEditor, mentionCandidates, slashCommands, attachments, emojiPicker, disabled, }: TaskCommentInputProps): import("react").JSX.Element;
@@ -8,7 +8,12 @@
8
8
  * 쓰는 법 — 에디터를 감싼 상자에 `handlers`(onKeyDownCapture · onKeyUp · onMouseUp · onInput)를 펴 넣고 `popper` 를 옆에 그린다.
9
9
  */
10
10
  import { type KeyboardEvent, type ReactNode } from "react";
11
- export declare function useEditableAssist(): {
11
+ import type { TaskboxMentionCandidate, TaskboxSlashCommand } from "../types";
12
+ /**
13
+ * candidates · slashCommands — 소비처가 칸마다 준 언급 후보 · "/" 명령(0.11.20 — TaskCommentInput props 를 서식 칸까지 잇는다).
14
+ * 안 주면 Provider 설정을 따른다(업무 상세는 바뀌지 않는다).
15
+ */
16
+ export declare function useEditableAssist(candidates?: TaskboxMentionCandidate[], slashCommands?: boolean | TaskboxSlashCommand[]): {
12
17
  handlers: {
13
18
  onKeyDownCapture: (event: KeyboardEvent<HTMLElement>) => void;
14
19
  onKeyUp: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/taskbox",
3
- "version": "0.11.18",
3
+ "version": "0.11.20",
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",