@ehfuse/taskbox 0.7.14 → 0.7.16

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.
@@ -61,6 +61,15 @@ export interface TaskboxConfig {
61
61
  * 앱 웹뷰(Flutter)처럼 새 탭이 없는 환경은 여기서 외부 브라우저 열기 메시지를 보낸다.
62
62
  */
63
63
  openExternalUrl?: (url: string) => void;
64
+ /**
65
+ * 업무 공유 텍스트를 기기 공유시트로 넘기는 방법. 미지정이면 `navigator.share`,
66
+ * 그것도 없으면 클립보드 복사로 떨어진다(utils/taskShareText).
67
+ *
68
+ * 앱 웹뷰(Flutter)에는 `navigator.share` 가 **없다.** 그래서 주입하지 않으면 앱에서는
69
+ * 공유 버튼이 늘 "업무 내용을 복사했습니다" 로 끝나고 카톡·문자 선택 화면이 뜨지 않는다.
70
+ * 앱 소비처는 여기에 네이티브 공유 브릿지를 넘긴다.
71
+ */
72
+ shareText?: (text: string) => void;
64
73
  /**
65
74
  * 업무 제목·본문 AI 번역. 주입되면 내용 읽기 뷰의 아이콘 열 마지막에 번역 아이콘이 생기고,
66
75
  * 언어를 고르면 결과를 다이얼로그로 보여준다. 결과는 화면이 (업무, 언어)별로 세션 캐시한다.
@@ -8,7 +8,11 @@ import type { TaskBoxItem } from "../types";
8
8
  export declare function buildTaskShareText(task: TaskBoxItem): string;
9
9
  /**
10
10
  * 업무 내용을 공유한다(상세 드로어 공유 버튼·우클릭 메뉴 공용).
11
- * 모바일(useNativeShare)은 기기 공유시트(카톡/문자 선택 UI)를 먼저 시도하고,
12
- * 공유시트가 없는 환경(데스크톱·앱 웹뷰 — 웹뷰에는 navigator.share 가 없다)은 클립보드 복사로 폴백한다.
11
+ *
12
+ * 우선순위
13
+ * 1. 소비처 주입(shareText) — 앱 웹뷰가 네이티브 공유시트를 띄우는 길이다.
14
+ * 웹뷰에는 navigator.share 가 **없어서**, 이게 없으면 앱은 늘 3번으로 떨어진다.
15
+ * 2. navigator.share — 모바일 브라우저의 기기 공유시트
16
+ * 3. 클립보드 복사 — 데스크톱 등 공유시트가 없는 환경
13
17
  */
14
- export declare function shareTaskText(task: TaskBoxItem, useNativeShare: boolean): void;
18
+ export declare function shareTaskText(task: TaskBoxItem, useNativeShare: boolean, shareText?: (text: string) => void): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/taskbox",
3
- "version": "0.7.14",
3
+ "version": "0.7.16",
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",