@aiquants/daily-report 0.20.0 → 0.21.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.
Files changed (116) hide show
  1. package/README.md +229 -8
  2. package/dist/client.d.mts +201 -739
  3. package/dist/client.d.ts +201 -739
  4. package/dist/client.js +5 -6
  5. package/dist/client.mjs +5 -6
  6. package/dist/index.d.mts +5 -197
  7. package/dist/index.d.ts +5 -197
  8. package/dist/index.js +1 -2
  9. package/dist/index.mjs +1 -2
  10. package/dist/logger-D3krZrNK.d.mts +0 -14
  11. package/dist/logger-D3krZrNK.d.ts +0 -14
  12. package/dist/server.d.mts +114 -744
  13. package/dist/server.d.ts +114 -744
  14. package/dist/server.js +1 -2
  15. package/dist/server.mjs +1 -2
  16. package/dist/{sse-schema-ChSFm-4q.d.mts → sse-schema-DCxpdETM.d.mts} +1106 -1090
  17. package/dist/{sse-schema-BdUGThiz.d.ts → sse-schema-DoQw8_om.d.ts} +1106 -1090
  18. package/dist/types-CqgYQgbH.d.mts +0 -34
  19. package/dist/types-CqgYQgbH.d.ts +0 -34
  20. package/package.json +9 -10
  21. package/dist/client.js.map +0 -1
  22. package/dist/client.mjs.map +0 -1
  23. package/dist/index.js.map +0 -1
  24. package/dist/index.mjs.map +0 -1
  25. package/dist/server.js.map +0 -1
  26. package/dist/server.mjs.map +0 -1
  27. package/src/client/components/business-day-thumb-overlay.tsx +0 -19
  28. package/src/client/components/daily-report-attachment-indicator.spec.tsx +0 -51
  29. package/src/client/components/daily-report-attachment-indicator.tsx +0 -45
  30. package/src/client/components/daily-report-attachment-list.spec.tsx +0 -94
  31. package/src/client/components/daily-report-attachment-list.tsx +0 -112
  32. package/src/client/components/daily-report-comment-item.tsx +0 -89
  33. package/src/client/components/daily-report-comment-section.tsx +0 -166
  34. package/src/client/components/daily-report-detail-list.tsx +0 -842
  35. package/src/client/components/daily-report-edit-form.tsx +0 -87
  36. package/src/client/components/daily-report-ids-stream-status.spec.tsx +0 -93
  37. package/src/client/components/daily-report-ids-stream-status.tsx +0 -67
  38. package/src/client/components/daily-report-list.tsx +0 -1232
  39. package/src/client/components/daily-report-page.spec.tsx +0 -119
  40. package/src/client/components/daily-report-page.tsx +0 -140
  41. package/src/client/components/daily-report-resize-panels.spec.tsx +0 -307
  42. package/src/client/components/daily-report-resolved-content.tsx +0 -207
  43. package/src/client/components/daily-report-scroll-restoration.spec.tsx +0 -422
  44. package/src/client/components/report-views.spec.tsx +0 -375
  45. package/src/client/components/unread-indicator.tsx +0 -13
  46. package/src/client/config-context.tsx +0 -184
  47. package/src/client/contexts/daily-report-action-context.spec.tsx +0 -433
  48. package/src/client/contexts/daily-report-action-context.tsx +0 -1147
  49. package/src/client/contexts/daily-report-error-context.spec.tsx +0 -66
  50. package/src/client/contexts/daily-report-error-context.tsx +0 -98
  51. package/src/client/hooks/use-animated-number.spec.ts +0 -103
  52. package/src/client/hooks/use-animated-number.ts +0 -69
  53. package/src/client/hooks/use-daily-report-comments.ts +0 -73
  54. package/src/client/hooks/use-daily-report-sse-connection.ts +0 -86
  55. package/src/client/hooks/use-daily-report.spec.ts +0 -546
  56. package/src/client/hooks/use-daily-report.ts +0 -549
  57. package/src/client/hooks/use-dynamic-viewport-height.ts +0 -127
  58. package/src/client/hooks/use-responsive-layout.spec.ts +0 -74
  59. package/src/client/hooks/use-responsive-layout.ts +0 -63
  60. package/src/client/route-helpers.spec.ts +0 -100
  61. package/src/client/route-helpers.ts +0 -61
  62. package/src/client/streaming/daily-report-ids-stream-client.spec.ts +0 -910
  63. package/src/client/streaming/daily-report-ids-stream-client.ts +0 -730
  64. package/src/client/streaming/daily-report-ids-stream-session.spec.ts +0 -401
  65. package/src/client/streaming/daily-report-ids-stream-session.ts +0 -319
  66. package/src/client/ui/button.tsx +0 -42
  67. package/src/client/ui/cn.ts +0 -14
  68. package/src/client/ui/input.tsx +0 -21
  69. package/src/client/ui/label.tsx +0 -16
  70. package/src/client/ui/switch.tsx +0 -19
  71. package/src/client/ui/tabs.tsx +0 -40
  72. package/src/client/ui/textarea.tsx +0 -19
  73. package/src/client/utils/constants.spec.ts +0 -96
  74. package/src/client/utils/constants.ts +0 -84
  75. package/src/client.ts +0 -28
  76. package/src/index.ts +0 -11
  77. package/src/lucide-icons.d.ts +0 -6
  78. package/src/server/authz.spec.ts +0 -57
  79. package/src/server/authz.ts +0 -99
  80. package/src/server/cache.spec.ts +0 -556
  81. package/src/server/cache.ts +0 -303
  82. package/src/server/etag.ts +0 -18
  83. package/src/server/external-source.ts +0 -60
  84. package/src/server/handlers.action.spec.ts +0 -44
  85. package/src/server/handlers.attachment.spec.ts +0 -470
  86. package/src/server/handlers.ids-stream.spec.ts +0 -618
  87. package/src/server/handlers.ts +0 -1638
  88. package/src/server/handlers.unauthorized-cookie.spec.ts +0 -187
  89. package/src/server/handlers.visibility.spec.ts +0 -774
  90. package/src/server/ports.ts +0 -222
  91. package/src/server/response.ts +0 -37
  92. package/src/server/schema.spec.ts +0 -30
  93. package/src/server/schema.ts +0 -344
  94. package/src/server/service.spec.ts +0 -1130
  95. package/src/server/service.ts +0 -2045
  96. package/src/server/sse-reader.spec.ts +0 -302
  97. package/src/server/sse-reader.ts +0 -267
  98. package/src/server/test-helpers/handlers-config.ts +0 -321
  99. package/src/server/transaction-retry.spec.ts +0 -63
  100. package/src/server/visibility.spec.ts +0 -403
  101. package/src/server/visibility.ts +0 -373
  102. package/src/server.spec.ts +0 -160
  103. package/src/server.ts +0 -131
  104. package/src/shared/business-date.spec.ts +0 -82
  105. package/src/shared/business-date.ts +0 -104
  106. package/src/shared/comment-adapter.spec.ts +0 -38
  107. package/src/shared/comment-adapter.ts +0 -80
  108. package/src/shared/ids-stream.spec.ts +0 -154
  109. package/src/shared/ids-stream.ts +0 -279
  110. package/src/shared/logger.ts +0 -47
  111. package/src/shared/sse-schema.spec.ts +0 -50
  112. package/src/shared/sse-schema.ts +0 -198
  113. package/src/shared/text-utils.spec.ts +0 -42
  114. package/src/shared/text-utils.ts +0 -65
  115. package/src/shared/types.ts +0 -109
  116. package/src/styles/standalone.entry.css +0 -51
package/dist/client.d.ts CHANGED
@@ -1,50 +1,23 @@
1
- import * as react from 'react';
2
- import { RefObject, ReactNode, Context } from 'react';
3
- import { ScrollBarThumbOverlayRenderProps, ScrollPaneInertiaOptions, ScrollBarTapCircleOptions } from '@aiquants/virtualscroll';
4
- import { D as DailyReportAttachmentSummary, a as DailyReportItem, b as DailyReportDetail, c as DailyReportUser } from './types-CqgYQgbH.js';
5
- import { U as UIComment, D as DailyReportSseMessage } from './sse-schema-BdUGThiz.js';
6
- import { ShouldRevalidateFunction } from 'react-router';
7
- import 'zod';
8
-
9
- /**
10
- * Tooltip bubble that anchors to the scrollbar thumb while interacting.
11
- * スクロール操作中にスクロールバーのサムへ連動表示するツールチップのコンポーネント。
12
- */
1
+ import * as react from "react";
2
+ import { RefObject, ReactNode, Context } from "react";
3
+ import { ScrollBarThumbOverlayRenderProps, VirtualScrollLocale, VirtualScrollLabels, ScrollPaneInertiaOptions, ScrollBarTapCircleOptions } from "@aiquants/virtualscroll";
4
+ import { D as DailyReportAttachmentSummary, a as DailyReportItem, b as DailyReportDetail, c as DailyReportUser } from "./types-CqgYQgbH.js";
5
+ import { U as UIComment, D as DailyReportSseMessage } from "./sse-schema-DoQw8_om.js";
6
+ import { ShouldRevalidateFunction } from "react-router";
7
+ import "zod";
13
8
  declare const BusinessDayThumbOverlay: ({ orientation, thumbCenter, label, isDragging, isTapScrollActive, isWheelScrollActive }: ScrollBarThumbOverlayRenderProps & {
14
9
  label: string;
15
10
  isWheelScrollActive: boolean;
16
11
  }) => react.JSX.Element | null;
17
-
18
12
  type DailyReportAttachmentIndicatorProps = {
19
- /** 添付の件数。0 なら何も描画しない。 */
20
13
  count: number;
21
- /** 読み上げ・ツールチップ用の見出し。消費アプリの `fieldLabels.attachments` を渡す。 */
22
14
  label: string;
23
15
  };
24
- /**
25
- * Renders the attachment marker, or nothing when the report has no attachment.
26
- * 添付の目印を描画する (添付が無ければ何も描画しない)。
27
- *
28
- * @param props Attachment count and the label. 添付件数と見出し。
29
- * @returns The marker element, or null. 目印の要素 (添付が無ければ null)。
30
- */
31
16
  declare const DailyReportAttachmentIndicator: ({ count, label }: DailyReportAttachmentIndicatorProps) => react.JSX.Element | null;
32
-
33
17
  type DailyReportAttachmentListProps = {
34
- /** 表示する添付一覧。空配列ならこのコンポーネントは何も描画しない。 */
35
18
  attachments: DailyReportAttachmentSummary[];
36
19
  };
37
- /**
38
- * Renders the attachment section of a daily report detail card.
39
- * 日報詳細カードの添付ファイル節を描画するコンポーネント。
40
- *
41
- * 表示文言はすべて `fieldLabels` から取る (パッケージは業務ドメインの語彙も言語も持たない)。
42
- *
43
- * @param props Attachments to render. 描画する添付一覧。
44
- * @returns The section element, or null when there is nothing to show. 節の要素 (表示対象が無ければ null)。
45
- */
46
20
  declare const DailyReportAttachmentList: ({ attachments }: DailyReportAttachmentListProps) => react.JSX.Element | null;
47
-
48
21
  type DailyReportPostedCommentProps = {
49
22
  comment: UIComment;
50
23
  reportHubId: number;
@@ -55,12 +28,7 @@ type DailyReportPostedCommentProps = {
55
28
  onTrashClick: (e: React.MouseEvent | React.TouchEvent, commentId: number | string) => void;
56
29
  resolvedIdMap?: Map<number, number>;
57
30
  };
58
- /**
59
- * Renders a single comment item with delete functionality.
60
- * 削除機能付きの単一コメントアイテムを描画するコンポーネント。
61
- */
62
31
  declare const DailyReportPostedComment: ({ comment, reportHubId: _reportHubId, businessDate: _businessDate, onOptimisticDelete, pendingDeleteId, onPendingDeleteIdChange, onTrashClick, resolvedIdMap }: DailyReportPostedCommentProps) => react.JSX.Element;
63
-
64
32
  type DailyReportCommentListProps = {
65
33
  comments: UIComment[];
66
34
  reportHubId: number;
@@ -70,36 +38,13 @@ type DailyReportCommentListProps = {
70
38
  onPendingDeleteIdChange: (id: number | string | null) => void;
71
39
  resolvedIdMap?: Map<number, number>;
72
40
  };
73
- /**
74
- * Renders a list of daily report comments.
75
- * 日報コメントのリストを描画するコンポーネント。
76
- */
77
41
  declare const DailyReportCommentList: ({ comments, reportHubId, businessDate, onDeleteComment, pendingDeleteId, onPendingDeleteIdChange, resolvedIdMap }: DailyReportCommentListProps) => react.JSX.Element | null;
78
42
  type DailyReportCommentFormProps = {
79
43
  reportHubId: number;
80
44
  businessDate: string;
81
45
  onAddComment?: (content: string) => Promise<void> | void;
82
46
  };
83
- /**
84
- * Renders a form to add a new comment to a daily report.
85
- * 日報に新しいコメントを追加するためのフォームを描画するコンポーネント。
86
- */
87
47
  declare const DailyReportCommentForm: ({ reportHubId, businessDate, onAddComment }: DailyReportCommentFormProps) => react.JSX.Element;
88
-
89
- /**
90
- * Scroll restore slot for DailyReportDetailList that survives tab unmounting.
91
- * タブアンマウントをまたいで DailyReportDetailList のスクロール位置を持ち回る共有スロット。
92
- *
93
- * topItem は先頭可視カードの**同一性アンカー** (reportHubId + 行内オフセット px + 保存時 index)。
94
- * ❗ 生の論理 px を保存してはならない: 可変高さでは px→行変換が再マウントの推定空間で行われ、
95
- * 深い位置で別のカードに着地する (実機で確定した実害バグ)。同一性アンカーは一覧が留守中に
96
- * 変わっても findIndex で正しいカードへ再解決される。index は該当カードが消えていたときの
97
- * 近似フォールバック。offsetPx はカード上端がビューポート上端より上に隠れている px (論理座標)。
98
- * anchorReportHubId は「記録時点の選択日報」。復元はこれが現在の選択と一致するときだけ行う:
99
- * 選択が他ビューで変わっていたら、復元よりも「選択日報へのスクロール」(既存 UX) を優先する。
100
- * measuredHeights は実測カード高さ (reportHubId → px)。着地窓の行内オフセットの厳密さと
101
- * 総高さ推定の質を保つため、実測をアンマウント越しに持ち回る。
102
- */
103
48
  type DailyReportDetailListScrollRestore = {
104
49
  topItem: {
105
50
  reportHubId: number;
@@ -114,260 +59,272 @@ type DailyReportDetailListProps = {
114
59
  userId?: string | null;
115
60
  selectedItemId?: number | null;
116
61
  onSelectItem?: (id: number | null) => void;
117
- /**
118
- * スクロール位置の共有スロット。マウント時に一度だけ読み、スクロールのたびに書き戻す。
119
- * ❗ 値をレンダー時に読んで props へ焼き込む方式は禁止 (daily-report-list.tsx 参照)
120
- */
121
62
  scrollRestoreRef?: RefObject<DailyReportDetailListScrollRestore>;
122
63
  };
123
- /**
124
- * Daily report detail cards rendered with dynamic height virtual scroll.
125
- * 動的高さの仮想スクロールで日報詳細カードを描画するコンポーネント。
126
- */
127
64
  declare const DailyReportDetailList: ({ dailyReportItems, userId, selectedItemId, onSelectItem, scrollRestoreRef }: DailyReportDetailListProps) => react.JSX.Element;
128
-
129
65
  type DailyReportEditFormProps = {
130
66
  report: DailyReportDetail;
131
67
  onCancel?: () => void;
132
68
  onPublishSuccess?: () => void;
133
69
  };
134
70
  declare const DailyReportEditForm: ({ report, onCancel, onPublishSuccess }: DailyReportEditFormProps) => react.JSX.Element;
135
-
136
- /**
137
- * Renders the streaming progress / recovery badge for the ids stream.
138
- * ids ストリームの進捗・復旧バッジを描画するコンポーネント。
139
- */
140
71
  declare const DailyReportIdsStreamStatus: () => react.JSX.Element | null;
141
-
142
- /**
143
- * Props for the DailyReportList component.
144
- * DailyReportList コンポーネントのプロパティ型定義。
145
- */
146
72
  type DailyReportListProps = {
147
73
  dailyReportItems: DailyReportItem[];
148
74
  autoMarkRead?: boolean;
149
75
  selectedReportHubId: number | null;
150
76
  onSelectItem: (reportHubId: number | null) => void;
151
77
  userId?: string | null;
152
- /**
153
- * Shared slot to preserve scroll position across unmounted tab switches.
154
- * タブ切替 (アンマウント) をまたいでスクロール位置を持ち回る共有スロット。
155
- * 値は VirtualScroll の論理座標 (inset 非依存。onScroll が配信する座標系)。
156
- * マウント時に一度だけ読み、スクロールのたびに書き戻す。
157
- */
158
78
  scrollOffsetRef?: RefObject<number>;
159
79
  };
160
- /**
161
- * Daily report list cards with key metadata and preview content via virtual scrolling.
162
- * 主なメタデータと内容プレビューを仮想スクロール表示する日報リスト。
163
- */
164
80
  declare const DailyReportList: ({ dailyReportItems, autoMarkRead, selectedReportHubId, onSelectItem, userId, scrollOffsetRef }: DailyReportListProps) => react.JSX.Element;
165
-
166
- /** ヘッダー描画スロットに渡される引数。 */
81
+ type DailyReportLocale = VirtualScrollLocale;
82
+ type DailyReportOperation = "create" | "update" | "publish" | "delete" | "addComment" | "deleteComment" | "toggleStar" | "toggleRead";
83
+ type DailyReportLabels = VirtualScrollLabels & {
84
+ readonly id: string;
85
+ readonly businessDate: string;
86
+ readonly author: string;
87
+ readonly visitTime: string;
88
+ readonly createdAt: string;
89
+ readonly updatedAt: string;
90
+ readonly updatedBy: string;
91
+ readonly category: string;
92
+ readonly categoryInfo: string;
93
+ readonly creationCategory: string;
94
+ readonly customer: string;
95
+ readonly subject: string;
96
+ readonly content: string;
97
+ readonly interviewers: string;
98
+ readonly comments: string;
99
+ readonly attachments: string;
100
+ readonly attachmentMissing: string;
101
+ readonly attachmentDownload: string;
102
+ readonly tabArticle: string;
103
+ readonly tabRelations: string;
104
+ readonly relationsEmpty: string;
105
+ readonly title: string;
106
+ readonly tabList: string;
107
+ readonly tabTree: string;
108
+ readonly tabDetailList: string;
109
+ readonly treeComingSoon: string;
110
+ readonly totalCountLoading: string;
111
+ readonly createReport: string;
112
+ readonly createReportTitle: string;
113
+ readonly devControls: string;
114
+ readonly devSseToggle: string;
115
+ readonly devReload: string;
116
+ readonly devClearCache: string;
117
+ readonly autoRead: string;
118
+ readonly autoReadTitle: string;
119
+ readonly loadErrorBadge: string;
120
+ readonly loadError: string;
121
+ readonly reload: string;
122
+ readonly loadingIds: string;
123
+ readonly streamFailed: string;
124
+ readonly streamRetry: string;
125
+ readonly streamRevalidating: string;
126
+ readonly listEmpty: string;
127
+ readonly selectPrompt: string;
128
+ readonly loading: string;
129
+ readonly reportNotFound: string;
130
+ readonly contentEmpty: string;
131
+ readonly contentEmptyPreview: string;
132
+ readonly confirmDelete: string;
133
+ readonly deleteFailed: string;
134
+ readonly starAdd: string;
135
+ readonly starRemove: string;
136
+ readonly markRead: string;
137
+ readonly markUnread: string;
138
+ readonly deleteReport: string;
139
+ readonly resizeHandle: string;
140
+ readonly overlayBackdrop: string;
141
+ readonly overlayDialog: string;
142
+ readonly close: string;
143
+ readonly formTitle: string;
144
+ readonly formTitlePlaceholder: string;
145
+ readonly formContent: string;
146
+ readonly formContentPlaceholder: string;
147
+ readonly formCancel: string;
148
+ readonly formSave: string;
149
+ readonly formPublish: string;
150
+ readonly commentPlaceholder: string;
151
+ readonly commentSend: string;
152
+ readonly commentDelete: string;
153
+ readonly commentDeleteConfirm: string;
154
+ readonly unknownUser: string;
155
+ readonly sourceInternal: string;
156
+ readonly totalCount: (count: number) => string;
157
+ readonly debounce: (milliseconds: number) => string;
158
+ readonly streamProgressCount: (loaded: number) => string;
159
+ readonly streamProgressRatio: (loaded: number, total: number, percent: number) => string;
160
+ readonly streamRetrying: (loaded: number) => string;
161
+ readonly reportLoadFailed: (reportHubId: number) => string;
162
+ readonly reportSummaryLoadFailed: (reportHubId: number) => string;
163
+ readonly interviewerWithAffiliation: (name: string, affiliation: string) => string;
164
+ readonly operationFailed: (operation: DailyReportOperation) => string;
165
+ };
166
+ type DailyReportLabelOverrides = {
167
+ readonly [K in keyof DailyReportLabels]?: DailyReportLabels[K];
168
+ };
169
+ declare const DAILY_REPORT_LABEL_KEYS: readonly [
170
+ "scrollUp",
171
+ "scrollDown",
172
+ "scrollLeft",
173
+ "scrollRight",
174
+ "scrollToTop",
175
+ "scrollToBottom",
176
+ "noItems",
177
+ "id",
178
+ "businessDate",
179
+ "author",
180
+ "visitTime",
181
+ "createdAt",
182
+ "updatedAt",
183
+ "updatedBy",
184
+ "category",
185
+ "categoryInfo",
186
+ "creationCategory",
187
+ "customer",
188
+ "subject",
189
+ "content",
190
+ "interviewers",
191
+ "comments",
192
+ "attachments",
193
+ "attachmentMissing",
194
+ "attachmentDownload",
195
+ "tabArticle",
196
+ "tabRelations",
197
+ "relationsEmpty",
198
+ "title",
199
+ "tabList",
200
+ "tabTree",
201
+ "tabDetailList",
202
+ "treeComingSoon",
203
+ "totalCountLoading",
204
+ "createReport",
205
+ "createReportTitle",
206
+ "devControls",
207
+ "devSseToggle",
208
+ "devReload",
209
+ "devClearCache",
210
+ "autoRead",
211
+ "autoReadTitle",
212
+ "loadErrorBadge",
213
+ "loadError",
214
+ "reload",
215
+ "loadingIds",
216
+ "streamFailed",
217
+ "streamRetry",
218
+ "streamRevalidating",
219
+ "listEmpty",
220
+ "selectPrompt",
221
+ "loading",
222
+ "reportNotFound",
223
+ "contentEmpty",
224
+ "contentEmptyPreview",
225
+ "confirmDelete",
226
+ "deleteFailed",
227
+ "starAdd",
228
+ "starRemove",
229
+ "markRead",
230
+ "markUnread",
231
+ "deleteReport",
232
+ "resizeHandle",
233
+ "overlayBackdrop",
234
+ "overlayDialog",
235
+ "close",
236
+ "formTitle",
237
+ "formTitlePlaceholder",
238
+ "formContent",
239
+ "formContentPlaceholder",
240
+ "formCancel",
241
+ "formSave",
242
+ "formPublish",
243
+ "commentPlaceholder",
244
+ "commentSend",
245
+ "commentDelete",
246
+ "commentDeleteConfirm",
247
+ "unknownUser",
248
+ "sourceInternal",
249
+ "totalCount",
250
+ "debounce",
251
+ "streamProgressCount",
252
+ "streamProgressRatio",
253
+ "streamRetrying",
254
+ "reportLoadFailed",
255
+ "reportSummaryLoadFailed",
256
+ "interviewerWithAffiliation",
257
+ "operationFailed"
258
+ ];
259
+ declare const DAILY_REPORT_LABEL_CATALOGS: Readonly<Record<DailyReportLocale, DailyReportLabels>>;
260
+ declare const resolveDailyReportLabels: (locale: DailyReportLocale | undefined, overrides: DailyReportLabelOverrides | undefined) => DailyReportLabels;
167
261
  type DailyReportHeaderProps = {
168
262
  title: string;
169
263
  annotation?: ReactNode;
170
264
  };
171
- /**
172
- * Display labels for the report detail/list fields, sections, and side-pane tabs.
173
- * 日報の詳細/一覧カードのフィールド・セクション・タブ見出しの表示ラベル群。
174
- *
175
- * パッケージは中立な英語ラベルのみを既定として同梱し、ドメイン固有の表現 (言語・業務語彙) は
176
- * 消費アプリが `fieldLabels` で注入する。これによりパッケージ本体が業務ドメイン知識を持たない。
177
- */
178
- type DailyReportFieldLabels = {
179
- id: string;
180
- businessDate: string;
181
- author: string;
182
- visitTime: string;
183
- createdAt: string;
184
- updatedAt: string;
185
- updatedBy: string;
186
- category: string;
187
- categoryInfo: string;
188
- creationCategory: string;
189
- customer: string;
190
- subject: string;
191
- content: string;
192
- interviewers: string;
193
- comments: string;
194
- attachments: string;
195
- /** 実体の消失が確認された添付に添える注記。 */
196
- attachmentMissing: string;
197
- /** 添付をダウンロードするリンクのラベル。 */
198
- attachmentDownload: string;
199
- tabArticle: string;
200
- tabRelations: string;
201
- relationsEmpty: string;
202
- };
203
- /**
204
- * Mutation-failure notification payload (for a host-supplied error surface).
205
- * ミューテーション失敗の通知情報 (ホストが独自の通知 UI を出すための口)。
206
- */
207
265
  type DailyReportErrorInfo = {
208
- /** 失敗した操作の種別 (create / update / publish / delete / addComment / deleteComment / toggleStar / toggleRead)。 */
209
- operation: string;
210
- /** 表示用のメッセージ (パッケージ内蔵バナー用)。 */
266
+ operation: DailyReportOperation;
211
267
  message: string;
212
- /** 元例外 (診断用)。 */
213
268
  cause?: unknown;
214
269
  };
215
- /** データソースごとのバッジ表示設定。 */
216
270
  type SourceTypeConfig = {
217
271
  label: string;
218
272
  badgeClassName?: string;
219
- /** コメント投稿を許可するかどうか (既定 true)。false の場合、該当ソースの日報でコメント投稿フォームを非表示にする。 */
220
273
  allowComment?: boolean;
221
274
  };
222
- /** クライアント層の設定一式。 */
223
275
  type DailyReportClientConfig = {
224
- /** 画面タイトル (ヘッダーへ渡す)。 */
225
- title: string;
226
- /** API ベースパス (例 `/daily_report/api`)。末尾スラッシュ無し。 */
227
276
  apiBasePath: string;
228
- /** SSE エンドポイントパス (例 `/sse/daily_report/updates`)。 */
229
277
  ssePath: string;
230
- /** 下書き状態を表すラベル名。UI の編集モード判定に使う。既定はプレースホルダーなので消費側で自アプリのラベル名へ上書きする。 */
231
278
  draftLabelName: string;
232
- /** 詳細/一覧カード of field 見出しラベル。既定は中立英語。アプリが自ドメインの表記を注入する。 */
233
- fieldLabels: DailyReportFieldLabels;
234
- /** 外部ソース区分ごとのバッジ表示設定。 */
235
- sourceTypeConfigs?: Record<string, SourceTypeConfig>;
236
- /** ヘッダー描画スロット。アプリのヘッダーコンポーネントを差し込む。 */
279
+ locale: DailyReportLocale;
280
+ labels: DailyReportLabels;
281
+ sourceTypeConfigs: Record<string, SourceTypeConfig>;
237
282
  renderHeader: (props: DailyReportHeaderProps) => ReactNode;
238
- /** 開発向けコントロール (SSE 購読トグル等) を表示するか。 */
239
283
  showDevControls: boolean;
240
- /**
241
- * ミューテーション失敗時の通知ポート。未指定ならパッケージ内蔵の role="alert"
242
- * バナーで表示する。ホストが独自トースト等を持つ場合はここへ委譲する。
243
- */
244
284
  onError?: (info: DailyReportErrorInfo) => void;
245
285
  };
246
- /**
247
- * Partial client-config override. `fieldLabels` may itself be partially overridden.
248
- * クライアント設定の部分上書き型。`fieldLabels` も部分上書き可 (プロバイダーが深くマージする)。
249
- */
250
- type DailyReportClientConfigInput = Partial<Omit<DailyReportClientConfig, "fieldLabels">> & {
251
- fieldLabels?: Partial<DailyReportFieldLabels>;
252
- sourceTypeConfigs?: Record<string, SourceTypeConfig>;
286
+ type DailyReportClientConfigInput = Partial<Omit<DailyReportClientConfig, "locale" | "labels">> & {
287
+ locale?: DailyReportLocale;
288
+ labels?: DailyReportLabelOverrides;
253
289
  };
254
- /** 中立英語のフィールドラベル既定 (ドメイン非依存)。 */
255
- declare const defaultDailyReportFieldLabels: DailyReportFieldLabels;
256
- /** 既定設定 (消費側は必要なフィールドのみ部分上書きする)。 */
257
- declare const defaultDailyReportClientConfig: DailyReportClientConfig;
258
- /**
259
- * Provides a partial override of the daily-report client configuration.
260
- * 日報クライアント設定の部分上書きを提供するプロバイダー。
261
- */
290
+ type DailyReportClientConfigDefaults = Readonly<Pick<DailyReportClientConfig, "apiBasePath" | "ssePath" | "draftLabelName" | "renderHeader" | "showDevControls">>;
291
+ declare const defaultDailyReportClientConfig: DailyReportClientConfigDefaults;
262
292
  declare const DailyReportConfigProvider: ({ config, children }: {
263
293
  config?: DailyReportClientConfigInput;
264
294
  children: ReactNode;
265
295
  }) => react.JSX.Element;
266
- /**
267
- * Reads the daily-report client configuration (defaults when no provider).
268
- * 日報クライアント設定を読む (プロバイダー未設置時は既定値)。
269
- */
270
296
  declare const useDailyReportConfig: () => DailyReportClientConfig;
271
- /**
272
- * Resolves source type badge configuration with case-insensitive fallback.
273
- * ケースインセンシティブなフォールバック付きでデータソースバッジ設定を解決する。
274
- */
275
297
  declare const resolveSourceTypeConfig: (sourceType?: string | null, sourceTypeConfigs?: Record<string, SourceTypeConfig>) => SourceTypeConfig | undefined;
276
-
277
- /**
278
- * Error display when the ids stream terminally failed before any data arrived.
279
- * データ未受信のまま ID ストリームが力尽きたときのエラー表示コンポーネント。
280
- *
281
- * 再試行はストリームセッションの retry へ直結する (受信済みカーソルから再開)。
282
- */
283
298
  declare const DailyReportLoadError: () => react.JSX.Element;
284
- /**
285
- * Loading screen shown only until the first stream chunk arrives.
286
- * 最初のストリームチャンクが届くまでの間だけ表示するローディング画面。
287
- */
288
299
  declare const DailyReportLoading: () => react.JSX.Element;
289
300
  type DailyReportPageProps = {
290
- /** 表示中ユーザー (楽観的コメントの作者名等に使用)。 */
291
301
  user?: DailyReportUser;
292
- /** 難読化済みの内部ユーザー ID (未登録ユーザーは null)。 */
293
302
  userId?: string | null;
294
- /** クライアント設定の部分上書き (ヘッダー描画・パス・ラベル名・フィールドラベルなど)。 */
295
303
  config?: DailyReportClientConfigInput;
296
304
  };
297
- /**
298
- * Chrome-agnostic daily report page with client configuration provider.
299
- * 設定プロバイダー込みの日報ページコンポーネント。
300
- */
301
305
  declare const DailyReportPage: ({ config, ...rest }: DailyReportPageProps) => react.JSX.Element;
302
-
303
306
  type DailyReportResolvedContentProps = {
304
307
  userId?: string | null;
305
308
  };
306
- /**
307
- * Displays streamed daily reports with layout and tabbed virtual scroll views.
308
- * レイアウトとタブ付き仮想スクロールでストリーム受信済み日報を表示するコンポーネント。
309
- *
310
- * アイテムは Action Context (ストリームチャンクをマージ済み) から読む。
311
- */
312
309
  declare const DailyReportResolvedContent: ({ userId }: DailyReportResolvedContentProps) => react.JSX.Element;
313
-
314
310
  type UnreadIndicatorProps = {
315
311
  className?: string;
316
312
  };
317
- /**
318
- * A simple blue dot indicator used to represent unread status.
319
- * 未読状態を表すためのシンプルな青いドットインジケーター。
320
- */
321
313
  declare const UnreadIndicator: ({ className }: UnreadIndicatorProps) => react.JSX.Element;
322
-
323
314
  type DailyReportActionContextType = {
324
- /** 表示中ユーザー (楽観的コメントの作者名等に使用)。 */
325
315
  user?: DailyReportUser;
326
- /** reportHubId -> Map<tempCommentId, content> (追加コメントの一時IDと内容) */
327
316
  pendingAddCommentIds: React.MutableRefObject<Map<number, Map<number, string>>>;
328
- /** reportHubId -> Set<tempCommentId> (削除された一時ID) */
329
317
  pendingDeleteCommentIds: React.MutableRefObject<Map<number, Set<number>>>;
330
- /** reportHubId -> boolean (スターの保留状態) */
331
318
  pendingStarUpdates: React.MutableRefObject<Map<number, boolean>>;
332
- /** reportHubId -> boolean (既読の保留状態) */
333
319
  pendingReadUpdates: React.MutableRefObject<Map<number, boolean>>;
334
- /** tempId -> realId (解決されたID) */
335
320
  resolvedIdMap: React.MutableRefObject<Map<number, number>>;
336
- /** 状態変更通知用バージョン */
337
321
  version: number;
338
- /** 日報リスト */
339
322
  items: DailyReportItem[];
340
- /** SSE購読が有効かどうか */
341
323
  isSseEnabled: boolean;
342
- /** SSE購読の有効/無効を切り替える */
343
324
  toggleSse: () => void;
344
- /**
345
- * コメントを追加します。
346
- * @param reportHubId 日報HubID
347
- * @param content コメント内容
348
- * @param businessDate 営業日
349
- */
350
325
  addComment: (reportHubId: number, content: string, businessDate: string) => Promise<void>;
351
- /**
352
- * コメントを削除します。
353
- * @param reportHubId 日報HubID
354
- * @param commentId コメントID (一時IDまたは実ID)
355
- * @param businessDate 営業日
356
- */
357
326
  deleteComment: (reportHubId: number, commentId: number, businessDate: string) => Promise<void>;
358
- /**
359
- * スターの状態を切り替えます。
360
- * @param reportHubId 日報HubID
361
- * @param isStarred 新しいスター状態
362
- * @param businessDate 営業日
363
- */
364
327
  toggleStar: (reportHubId: number, isStarred: boolean, businessDate: string) => Promise<void>;
365
- /**
366
- * 既読の状態を切り替えます。
367
- * @param reportHubId 日報HubID
368
- * @param isRead 新しい既読状態
369
- * @param businessDate 営業日
370
- */
371
328
  toggleRead: (reportHubId: number, isRead: boolean, businessDate: string) => Promise<void>;
372
329
  createReport: (businessDate: string) => Promise<number>;
373
330
  updateReport: (reportHubId: number, data: {
@@ -376,59 +333,28 @@ type DailyReportActionContextType = {
376
333
  }, businessDate: string) => Promise<void>;
377
334
  publishReport: (reportHubId: number, businessDate: string) => Promise<void>;
378
335
  deleteReport: (reportHubId: number, businessDate: string) => Promise<void>;
379
- /** stale アイテムをリストから除去する安全弁 */
380
336
  removeStaleItem: (reportHubId: number) => void;
381
- /** データのみリロード (ページリロードなし) */
382
337
  refetchData: () => Promise<void>;
383
- /** キャッシュを破棄してデータのみ再読み込み (ページリロードなし) */
384
338
  clearCacheAndRefetch: () => Promise<void>;
385
339
  };
386
340
  declare global {
387
341
  var __DailyReportActionContext: Context<DailyReportActionContextType | null> | undefined;
388
342
  }
389
343
  declare const useDailyReportActionContext: () => DailyReportActionContextType;
390
- /**
391
- * Provides a context for daily report actions including comments, stars, leads, and basic CRUD operations.
392
- * Also manages optimistic UI updates and real-time synchronization via SSE.
393
- * 日報のアクション(コメント追加・削除、スター、既読)を管理するプロバイダー。
394
- * 楽観的UI更新とAPI通信の抽象化を提供します。
395
- */
396
344
  declare const DailyReportActionProvider: ({ children, user, initialItems, userId }: {
397
345
  children: ReactNode;
398
346
  user?: DailyReportUser;
399
347
  initialItems?: DailyReportItem[];
400
348
  userId?: string | null;
401
349
  }) => react.JSX.Element;
402
-
403
350
  type DailyReportErrorSurface = {
404
- /** ミューテーション失敗を通知する。 */
405
351
  notifyError: (info: DailyReportErrorInfo) => void;
406
352
  };
407
- /**
408
- * Returns the error-surface API (safe no-op outside the provider).
409
- * 通知 API を返す処理 (Provider 外では no-op)。
410
- */
411
353
  declare const useDailyReportErrorSurface: () => DailyReportErrorSurface;
412
- /**
413
- * Provides the mutation error surface and renders the default alert banner.
414
- * ミューテーション通知シームを供給し、既定のアラートバナーを描画するプロバイダー。
415
- *
416
- * `config.onError` があればホストへ委譲し、内蔵バナーは描画しない (二重表示防止)。
417
- */
418
354
  declare const DailyReportErrorProvider: ({ children }: {
419
355
  children: ReactNode;
420
356
  }) => react.JSX.Element;
421
-
422
- /**
423
- * Animates numeric changes with ease-out cubic.
424
- * 数値変化をイーズアウト 3 次で補間するフック。
425
- *
426
- * @param value Target value. 目標値。
427
- * @param durationMs Animation duration. アニメーション時間 (既定 250ms)。
428
- * @returns Displayed (interpolated) value. 表示用の補間値。
429
- */
430
357
  declare const useAnimatedNumber: (value: number, durationMs?: number) => number;
431
-
432
358
  type CacheEntry<T> = {
433
359
  data: T;
434
360
  expiresAt: number;
@@ -443,114 +369,30 @@ declare const DailyReportCache: {
443
369
  lastMutations: Map<number, number>;
444
370
  recentDeletes: Map<number, number>;
445
371
  lastPrune: number;
446
- /**
447
- * Prune expired entries from the cache.
448
- * キャッシュから期限切れのエントリを削除する。
449
- */
450
372
  prune(): void;
451
- /**
452
- * Clear all cached entries and pending requests.
453
- * すべてのキャッシュエントリおよび待機中リクエストをクリアする。
454
- */
455
373
  clear(): void;
456
- /**
457
- * Check if the cache entry is still valid.
458
- * キャッシュエントリがまだ有効かを確認する。
459
- */
460
374
  isValid: (ex: number) => boolean;
461
- /**
462
- * Notify all listeners of a report update.
463
- * レポートの更新をすべてのリスナーに通知する。
464
- */
465
375
  notify: (id: number) => void;
466
- /**
467
- * Retrieve a cached report by ID.
468
- * ID でキャッシュされたレポートを取得する。
469
- */
470
376
  getReport(id: number, ignoreExpiry?: boolean): DailyReportDetail | null;
471
- /**
472
- * Retrieve a cached list of reports by business date key.
473
- * 営業日キーでレポートのキャッシュリストを取得する。
474
- */
475
377
  getList(dateKey: string | null, ignoreExpiry?: boolean): DailyReportDetail[] | null;
476
- /**
477
- * Set a report in the cache and optionally sync with the list cache.
478
- * キャッシュにレポートを設定し、必要に応じてリストキャッシュと同期する。
479
- */
480
378
  set(report: DailyReportDetail, expiresAt: number, syncList?: boolean): void;
481
- /**
482
- * Update a cached report with partial data.
483
- * 部分的なデータでキャッシュされたレポートを更新する。
484
- */
485
379
  update(id: number, updates: Partial<DailyReportDetail>, strict?: boolean): void;
486
- /**
487
- * Delete a report from the cache and update the corresponding list.
488
- * キャッシュからレポートを削除し、対応するリストを更新する。
489
- */
490
380
  delete(id: number, date: string): void;
491
- /**
492
- * Merge server report with cached report to handle optimistic updates and zombies.
493
- * サーバーレポートとキャッシュレポートをマージして、楽観的更新とゾンビコメントを処理する。
494
- */
495
381
  merge(serverReport: DailyReportDetail, cachedReport?: DailyReportDetail | null): DailyReportDetail;
496
- /**
497
- * Hydrate the cache with fetched reports, handling comment merges and locks.
498
- * フェッチされたレポートでキャッシュをハイドレートし、コメントのマージとロックを処理する。
499
- */
500
382
  cacheMany(reports: DailyReportDetail[], dateKey: string | null, fetchStart: number): DailyReportDetail[];
501
383
  };
502
- /**
503
- * Update the cache for a single report.
504
- * 単一レポートのキャッシュを更新する。
505
- */
506
384
  declare const writeCache: (r: DailyReportDetail, exp: number, sync?: boolean) => void;
507
- /**
508
- * Get a cached report by ID.
509
- * ID でキャッシュされたレポートを取得する。
510
- */
511
385
  declare const getCachedReport: (id: number, opts?: {
512
386
  ignoreExpiry?: boolean;
513
387
  }) => DailyReportDetail | null;
514
- /**
515
- * Update specific fields of a cached report.
516
- * キャッシュされたレポートの特定のフィールドを更新する。
517
- */
518
388
  declare const updateDailyReportCache: (id: number, u: Partial<DailyReportDetail>) => void;
519
- /**
520
- * Delete a report from the cache.
521
- * キャッシュからレポートを削除する。
522
- */
523
389
  declare const deleteDailyReportCache: (id: number, d: string) => void;
524
- /**
525
- * Clear all daily report cache store entries.
526
- * 日報の全キャッシュストアを消去する。
527
- */
528
390
  declare const clearDailyReportCache: () => void;
529
391
  declare const acquireMutationLock: (id: number) => void;
530
392
  declare const releaseMutationLock: (id: number) => void;
531
393
  declare const registerRecentDeletion: (cId: number) => Map<number, number>;
532
- /**
533
- * Subscribe to cache-ready events for a specific report.
534
- * Returns an unsubscribe function.
535
- *
536
- * 特定レポートのキャッシュ書き込みを監視する。
537
- * 解除関数を返す。
538
- */
539
394
  declare const subscribeCacheReady: (reportHubId: number, callback: () => void) => (() => void);
540
395
  declare const applyDailyReportServerUpdates: (_reportHubId: number, report: DailyReportDetail) => void;
541
- /**
542
- * Applies a broadcast (cross-user SSE) report while preserving the viewer's own per-viewer state.
543
- * 全ユーザー放送 (SSE) の report を、受信者自身の per-viewer 状態を保持したまま反映する処理。
544
- *
545
- * SSE の report-create/update/publish が運ぶ isRead/isStarred は**操作した本人の状態**。
546
- * そのまま書くと受信者の既読/スター表示が他人の状態で上書きされる。共有フィールドだけを
547
- * 取り込み、per-viewer フィールドは受信者のキャッシュ値を保持する。ローカルに無い日報は
548
- * 種まきしない (送信者の per-viewer 値で汚すより、次のフェッチが受信者視点の正しい値を
549
- * 取るのに任せるほうが安全)。
550
- *
551
- * ❗ 信頼できる経路 (自分の HTTP 応答・recipient フィルタ済みの自分宛 status-update) は
552
- * {@link applyDailyReportServerUpdates} を使うこと — そちらは値をそのまま書く。
553
- */
554
396
  declare const applyBroadcastReportUpdate: (report: DailyReportDetail) => void;
555
397
  type DailyReportDetailResource = {
556
398
  report: DailyReportDetail | null;
@@ -558,17 +400,8 @@ type DailyReportDetailResource = {
558
400
  isLoading: boolean;
559
401
  isRefetching: boolean;
560
402
  };
561
- /**
562
- * Provides a fetcher-driven daily report detail reader with business-date aware caching.
563
- * 営業日キャッシュ対応の日報詳細取得フック。
564
- */
565
403
  declare const useDailyReportDetail: (reportHubId: number, businessDate: string | null) => DailyReportDetailResource;
566
- /**
567
- * Provides a business-date aware prefetch helper.
568
- * 営業日キャッシュを活用した日報プリフェッチ補助フック。
569
- */
570
404
  declare const useDailyReportPrefetch: () => (date: string | null) => void;
571
-
572
405
  type User = {
573
406
  displayName?: string;
574
407
  name?: {
@@ -579,10 +412,6 @@ type User = {
579
412
  value: string;
580
413
  }[];
581
414
  };
582
- /**
583
- * Manages daily report comments, integrating server data with optimistic local updates.
584
- * サーバーデータとローカルの楽観的更新を統合して日報コメントを管理するフック。
585
- */
586
415
  declare const useDailyReportComments: (report: DailyReportDetail | null, user: User | null | undefined, userId?: string | null) => {
587
416
  uiComments: UIComment[];
588
417
  handleAddComment: (content: string) => Promise<void>;
@@ -591,27 +420,13 @@ declare const useDailyReportComments: (report: DailyReportDetail | null, user: U
591
420
  setPendingDeleteId: react.Dispatch<react.SetStateAction<string | number | null>>;
592
421
  resolvedIdMap: Map<number, number>;
593
422
  };
594
-
595
423
  type UseDailyReportSseConnectionOptions = {
596
424
  isSseEnabled: boolean;
597
425
  onMessage: (payload: Exclude<DailyReportSseMessage, {
598
426
  type: "connected";
599
427
  }>) => void;
600
428
  };
601
- /**
602
- * Manages Daily Report SSE connection lifecycle with reconnect handling.
603
- * Handles open, message parse/dispatch, error logging, retry, and cleanup.
604
- *
605
- * 日報 SSE 接続のライフサイクルを管理する Hook。
606
- * 接続開始、メッセージ解析と配送、エラー時再接続、クリーンアップを管理します。
607
- */
608
429
  declare const useDailyReportSseConnection: ({ isSseEnabled, onMessage }: UseDailyReportSseConnectionOptions) => void;
609
-
610
- /**
611
- * Shared hook for calculating viewport height of virtual scroll containers.
612
- * 仮想スクロールコンテナのビューポート高さを計測する共通フック。
613
- */
614
-
615
430
  type UseDynamicViewportHeightOptions = {
616
431
  enableMutationObserver?: boolean;
617
432
  bottomGap?: number;
@@ -621,37 +436,8 @@ type UseDynamicViewportHeightResult = {
621
436
  viewportHeight: number;
622
437
  updateViewportHeight: () => void;
623
438
  };
624
- /**
625
- * Computes and updates the viewport height for scroll containers while reacting to layout changes.
626
- * レイアウト変化に追従しながらスクロールコンテナのビューポート高さを算出して更新する関数。
627
- */
628
439
  declare const useDynamicViewportHeight: (containerRef: RefObject<HTMLDivElement | null>, options?: UseDynamicViewportHeightOptions) => UseDynamicViewportHeightResult;
629
-
630
- /**
631
- * React Router route helpers for the daily-report page (revalidation policy / client loader).
632
- * 日報ページ向け React Router ルートヘルパー (再検証ポリシー / クライアントローダー)。
633
- */
634
-
635
- /**
636
- * Prevents loader revalidation when POP navigations keep identical URL state.
637
- * URL 状態が同一の POP ナビゲーション時にローダー再検証を抑止。
638
- */
639
440
  declare const dailyReportShouldRevalidate: ShouldRevalidateFunction;
640
- /**
641
- * Creates a React Router clientLoader that bootstraps the ids stream session.
642
- * ID ストリームセッションを起動する React Router clientLoader を生成する処理。
643
- *
644
- * ID 一覧は Promise で返さず、モジュール常駐のストリームセッションが供給する
645
- * (ページ側は `useDailyReportIdsStream` で購読する)。ローダー時点でセッションを
646
- * 生成することが**コールドロードの最重要最適化** — ページマウントの effect まで
647
- * 遅らせると、ストリームの開始が「ハイドレーション完了 + effect flush」の後ろに
648
- * 直列化される。再訪 (セッション既存) は serverLoader を待たずに鮮度確認を先行させる。
649
- *
650
- * `config.apiBasePath` を上書きするアプリは同じ値を `options.apiBasePath` にも渡すこと
651
- * (渡し忘れは初回 1 回だけ誤パス生成 → ページマウントの ensure が自己修復する)。
652
- *
653
- * 返す関数へ `hydrate = true as const` を付与済み (初期ハイドレーションでも実行される)。
654
- */
655
441
  declare const createDailyReportClientLoader: <TServerData extends Record<string, unknown>>(options?: {
656
442
  apiBasePath?: string;
657
443
  }) => {
@@ -660,382 +446,98 @@ declare const createDailyReportClientLoader: <TServerData extends Record<string,
660
446
  }): Promise<TServerData>;
661
447
  hydrate: true;
662
448
  };
663
-
664
- /** ストリームのライフサイクル局面。 */
665
449
  type DailyReportIdsStreamPhase = "idle" | "streaming" | "retrying" | "complete" | "failed" | "auth-required";
666
- /** publish されるスナップショット。publish 間で参照が安定している。 */
667
450
  type DailyReportIdsStreamState = {
668
- /** 受信済みアイテム (reportHubId で重複排除済み)。 */
669
451
  items: DailyReportItem[];
670
- /** 一意アイテム件数 (`items.length` と同値。表示用の別名)。 */
671
452
  loadedCount: number;
672
- /** サーバー申告の全体件数。先頭行未着なら null。 */
673
453
  totalCount: number | null;
674
- /** ライフサイクル局面。 */
675
454
  phase: DailyReportIdsStreamPhase;
676
- /** complete 後のバックグラウンド再検証が走っているか。 */
677
455
  isRevalidating: boolean;
678
- /** 一度でも完走したか (再検証中の UI 判定に使う)。 */
679
456
  hasCompletedOnce: boolean;
680
- /**
681
- * 直近の「実際の完走」時刻 (未完走は null)。鮮度判定 (SWR 窓) の唯一の根拠。
682
- * 完走の publish でのみ更新される — 再検証の諦めなど phase が complete のままの
683
- * publish で更新すると、古いデータが新鮮扱いされ再検証が永久に走らなくなる。
684
- */
685
457
  completedAt: number | null;
686
- /** 直近の失敗 (成功で null に戻る)。 */
687
458
  error: Error | null;
688
459
  };
689
- /** テスト注入用の依存一式。 */
690
460
  type DailyReportIdsStreamClientOptions = {
691
- /** API ベースパス (既定 `/daily_report/api`)。 */
692
461
  apiBasePath?: string;
693
- /** fetch 実装 (既定 globalThis.fetch)。 */
694
462
  fetchFn?: (input: string, init: {
695
463
  signal: AbortSignal;
696
464
  headers: Record<string, string>;
697
465
  cache: RequestCache;
698
466
  }) => Promise<Response>;
699
- /** タイマー実装 (既定 setTimeout / clearTimeout)。 */
700
467
  setTimeoutFn?: (handler: () => void, ms: number) => ReturnType<typeof setTimeout>;
701
468
  clearTimeoutFn?: (id: ReturnType<typeof setTimeout>) => void;
702
- /**
703
- * 1 回の read が無音でいられる上限 (ms)。0 以下で無効。
704
- * これを超えたら接続を half-open とみなして中断し、retryable として
705
- * カーソル再開へ倒す。サーバーのハートビート間隔より必ず長く取る
706
- * (生きているが遅いだけの全量クエリ待ちを誤って切らないため)。
707
- */
708
469
  readStallTimeoutMs?: number;
709
- /** 警告ロガー (既定 console.warn)。 */
710
470
  warn?: (...args: unknown[]) => void;
711
- /**
712
- * チャンク由来 publish の合体窓 (ms)。0 で無効 (毎チャンク即時 publish)。
713
- * 高速回線ではネットワーク read が密集し、publish ごとに全件ソート + 全行再レンダーが
714
- * 走るため、先頭は即時 (初回描画優先)・後続は窓内で合体するスロットルを掛ける。
715
- * 完走 publish と外部ミューテーション (ユーザー操作の即時フィードバック) は対象外。
716
- */
717
471
  publishCoalesceMs?: number;
718
472
  };
719
- /**
720
- * NDJSON ids stream client with dedupe, cursor resume, and exponential backoff.
721
- * 重複排除・カーソル再開・指数バックオフを備えた NDJSON ids ストリームクライアント。
722
- */
723
473
  declare class DailyReportIdsStreamClient {
724
474
  private readonly apiBasePath;
725
475
  private readonly fetchFn;
726
476
  private readonly setTimeoutFn;
727
477
  private readonly clearTimeoutFn;
728
478
  private readonly warn;
729
- /** 1 回の read が無音でいられる上限 (ms)。0 以下で無効。 */
730
479
  private readonly readStallTimeoutMs;
731
- /** reportHubId → アイテム。挿入順を保ち、再開の重複到着を吸収する。 */
732
480
  private readonly itemMap;
733
481
  private readonly listeners;
734
482
  private state;
735
483
  private lastCursor;
736
- /**
737
- * 最後に受け取ったスナップショットトークン。カーソルと**対**で意味を持つ。
738
- *
739
- * サーバーはこのトークンが現在の配列と一致するときだけカーソルを信用する。
740
- * トークンを欠いたカーソルは安全側 (先頭から再送) へ倒されるため、対で送れないなら
741
- * 送らないのと同じコスト (全量再送) になる。
742
- */
743
484
  private lastSnapshot;
744
485
  private consecutiveFailures;
745
486
  private started;
746
487
  private disposed;
747
- /** 実行中ループの世代。refresh/dispose で進め、旧ループの続行を無効化する。 */
748
488
  private loopGeneration;
749
489
  private activeAbortController;
750
- /**
751
- * 先頭 (cursor 無し) から始まった走査で観測した ID の集合。
752
- * 完走時にこの集合へ含まれない Map エントリを剪定し、サーバー側で削除された
753
- * 日報がモジュール常駐データに永久残留するのを防ぐ。途中失敗のカーソル再開は
754
- * 同じ走査の続きなので集合を引き継ぐ (全区間の和 = サーバーの全量)。
755
- */
756
490
  private activeSeenIds;
757
- /**
758
- * 外部削除のトゥームストーン。サーバーは配列全体を先に確定させてから送出するため、
759
- * 走査中に届いた削除の後、同じ削除前スナップショットの後続チャンクが同 ID を
760
- * 再配送してくる。これを吸収せずに素通しすると、削除済み日報が Map へ戻り
761
- * 完走剪定も免れてしまう (観測集合に再記録されるため)。新しい走査の開始
762
- * (削除コミット後のスナップショット) でクリアする。
763
- */
764
491
  private readonly externalRemovalTombstones;
765
- /**
766
- * 走行中の再検証中に届いた明示的キャッシュバイパス要求の持ち越しフラグ。
767
- * 走行中の再検証は中断しない方針のため、要求を黙って捨てず完走後に連結実行する。
768
- */
769
492
  private pendingForceRefresh;
770
493
  private wakeRetryWait;
771
494
  private readonly handleOnline;
772
- /** チャンク由来 publish の合体窓 (ms)。 */
773
495
  private readonly publishCoalesceMs;
774
- /** 合体窓のトレーリングタイマー。 */
775
496
  private publishCoalesceTimer;
776
- /** 直近のアイテム publish 時刻 (leading edge 判定用)。 */
777
497
  private lastItemsPublishAt;
778
498
  constructor(options?: DailyReportIdsStreamClientOptions);
779
- /**
780
- * Returns the current snapshot (stable reference between publishes).
781
- * 現在のスナップショットを返す処理 (publish 間で参照が安定)。
782
- */
783
499
  getState(): DailyReportIdsStreamState;
784
- /**
785
- * Subscribes to snapshot updates.
786
- * スナップショット更新の購読を登録する処理。
787
- *
788
- * @param listener Change callback. 変更通知コールバック。
789
- * @returns Unsubscribe function. 購読解除関数。
790
- */
791
500
  subscribe(listener: () => void): () => void;
792
- /**
793
- * Starts the initial stream (idempotent).
794
- * 初回ストリーミングを開始する処理 (冪等)。
795
- */
796
501
  start(): void;
797
- /**
798
- * Restarts after a terminal failure (no-op unless phase is "failed").
799
- * failed からの手動再開処理 (failed 以外では何もしない)。
800
- *
801
- * 受信済みデータと再開カーソルは保持したまま続きから読む。
802
- */
803
502
  retry(): void;
804
- /**
805
- * Revalidates a completed stream in the background (SWR-style).
806
- * 完走済みストリームをバックグラウンドで再検証する処理 (SWR)。
807
- *
808
- * カーソルを捨てて先頭から読み直し、Map の重複排除で差分を上書き吸収し、
809
- * 完走時に「今回の走査で観測されなかった行」を剪定する (サーバー側削除の反映)。
810
- * failed のときはカーソルを保持した再開に切り替える (forceRefresh 指定は失わない)。
811
- * streaming/retrying 中は何もしない。
812
- *
813
- * @param options.forceRefresh サーバー側 SqlResultCache をバイパスするか。
814
- */
815
503
  refresh(options?: {
816
504
  forceRefresh?: boolean;
817
505
  }): void;
818
- /**
819
- * Applies an externally-known upsert (SSE / local mutation) to the resident data.
820
- * 外部由来 (SSE / ローカル操作) の upsert を常駐データへ反映する処理。
821
- *
822
- * これを欠くと、マウント中に作成された日報がストリームセッションに存在せず、
823
- * 鮮度窓内の再訪 (再検証なし) で一覧から消える。アクティブな走査中は観測集合にも
824
- * 刻み、完走時の剪定で「生きていると分かっている行」を誤って落とさないようにする。
825
- */
826
506
  applyExternalUpsert(item: DailyReportItem): void;
827
- /**
828
- * Applies an externally-known removal (SSE report-delete / stale valve) to the resident data.
829
- * 外部由来 (SSE report-delete / stale 安全弁) の削除を常駐データへ反映する処理。
830
- *
831
- * 走査中の後続チャンク (削除前スナップショット) による同一行の再配送は、
832
- * クライアント側トゥームストーンが次の新しい走査までブロックする。
833
- */
834
507
  applyExternalRemoval(reportHubId: number): void;
835
- /**
836
- * Aborts everything and detaches listeners (terminal).
837
- * すべてを中断しリスナーを外す終了処理 (以後再利用不可)。
838
- */
839
508
  dispose(): void;
840
- /**
841
- * Connection-retry loop: stream → classify → backoff → resume.
842
- * 接続リトライループ。ストリーム → 結果分類 → バックオフ → カーソル再開。
843
- */
844
509
  private runStreamLoop;
845
- /**
846
- * Prunes map entries not observed by the completed full scan.
847
- * 完走した全量走査で観測されなかった Map エントリを剪定する処理。
848
- *
849
- * サーバー側で削除された日報の残留 (再訪時の亡霊復活・loadedCount > totalCount) を防ぐ。
850
- * 観測集合が無い場合 (理論上到達しない防御) は何も消さない。
851
- */
852
510
  private pruneUnseenItems;
853
- /**
854
- * Runs one streaming attempt and classifies its outcome.
855
- * 1 回のストリーミング試行を実行し、結末を分類する処理。
856
- */
857
511
  private streamOnce;
858
- /**
859
- * Reads one chunk, racing the read against a stall watchdog.
860
- * 1 チャンクを読む処理。読み取りを stall ウォッチドッグと競争させる。
861
- *
862
- * サーバーが無音のまま接続を half-open で放置しても (NAT/プロキシのアイドル切断・
863
- * VPN 断・スリープ)、`reader.read()` は永久に保留したままになる。これを検知するため
864
- * read とタイマーを競争させ、無音が上限を超えたら番兵を返す。生きているが遅いだけの
865
- * 全量クエリ待ちはサーバーのハートビート (空行) が read を解決するので誤検知しない。
866
- * `readStallTimeoutMs <= 0` のときは素の read (タイマーを張らない・テスト用)。
867
- *
868
- * @returns 読み取り結果、または stall を表す番兵。read の reject はそのまま伝播する。
869
- */
870
512
  private readWithStallGuard;
871
- /**
872
- * Merges chunk items into the dedupe map.
873
- * チャンクのアイテム群を重複排除 Map へ取り込む処理。
874
- *
875
- * @returns True when anything was added or changed. 追加または内容変化があれば true。
876
- */
877
- /**
878
- * Absorbs one chunk line, applying its restart directive first.
879
- * チャンク行を 1 行吸収する処理。再開指示があれば最初に適用する。
880
- *
881
- * ❗ リセット (restarted) とトークン記録を**この関数の内部**に置くのは意図的。
882
- * 「吸収より前に初期化せよ」を呼び出し側の責務にすると、順序を間違えたとき
883
- * 再開直後の行が新しい観測集合へ入らず完走剪定で即座に消える。関数へ畳み込めば
884
- * 呼び出し側に順序という概念が存在しなくなる。
885
- */
886
513
  private absorbChunkLine;
887
- /** アイテム配列を再スナップショットして即時 publish する。 */
888
514
  private publishItems;
889
- /**
890
- * チャンク由来のアイテム publish をスロットルする (leading edge 即時 + trailing 合体)。
891
- * 最初のチャンクは即時に描画へ届け、窓内に密集した後続チャンクは 1 回の publish
892
- * (= 1 回の全件ソートと再レンダー) へ合体する。合体窓 0 は無効 (常に即時)。
893
- */
894
515
  private schedulePublishItems;
895
- /** 保留中のトレーリング publish を破棄する (完走 publish が全量を運ぶ場合など)。 */
896
516
  private cancelScheduledPublishItems;
897
- /** 部分状態をマージした新スナップショットを作り、購読者へ通知する。 */
898
517
  private publish;
899
- /** 再開カーソル付きのストリーム URL を構築する。 */
900
518
  private buildStreamUrl;
901
- /**
902
- * バックオフ待機。online イベント・dispose・後続ループの開始で早期解除される。
903
- *
904
- * タイマー ID は待機ごとのローカルに閉じ、共有スロット (wakeRetryWait) は
905
- * 「まだ自分を指しているときだけ」外す。単一スロットへ素朴に書くと、
906
- * 追い越された旧待機の finish が新しいループのタイマーを消してしまい、
907
- * 再検証が永久に固まる (実測済みの競合)。
908
- */
909
519
  private waitBeforeRetry;
910
520
  }
911
-
912
- /**
913
- * Full-document reload indirection (mockable seam for auth-expiry tests).
914
- * ドキュメント全体を再読込する間接層 (認証切れテストで差し替え可能にする継ぎ目)。
915
- */
916
521
  declare const reloadDocument: () => void;
917
- /**
918
- * Ensures a stream session for the given user, creating/refreshing as needed.
919
- * 指定ユーザーのストリームセッションを確立する処理 (必要に応じ生成/再検証)。
920
- *
921
- * - ユーザーまたは API パスが変わっていれば作り直す (別ユーザーのデータを見せない)。
922
- * - failed なら自動 retry (再訪 = ユーザーの再試行意思とみなす)。
923
- * - 完走から {@link REVALIDATE_AFTER_MS} 経過していればバックグラウンド再検証。
924
- *
925
- * SSR では何もしない。clientLoader とページマウントの両方から呼ばれ、冪等。
926
- *
927
- * @param options.apiBasePath API ベースパス (config の apiBasePath)。
928
- * @param options.userKey 難読化ユーザー ID (未登録ユーザーは null)。
929
- */
930
522
  declare const ensureDailyReportIdsStreamSession: (options: {
931
523
  apiBasePath?: string;
932
524
  userKey: string | null;
933
525
  }) => void;
934
- /**
935
- * Bootstraps the session from the clientLoader: create when absent, else reconcile.
936
- * clientLoader からのセッション起動処理。不在なら生成、既存なら照合と鮮度確認。
937
- *
938
- * コールドロードの最重要ゲート対策: 生成をページマウントの effect まで遅らせると、
939
- * ストリームの最初のバイト要求が「serverLoader 完了 → ハイドレーション → effect flush」
940
- * の後ろに直列化される。ローダー時点で生成すればハイドレーションと並行してフェッチが走る。
941
- *
942
- * パス契約: 生成時のパスは factory オプション (未指定は既定値へ正規化)。
943
- * `config.apiBasePath` だけを上書きした利用者では初回のみ誤パスで生成されるが、
944
- * ページマウント側の ensure がパス不一致を検知して作り直す (自己修復・初回 1 回きり)。
945
- * **既存セッションのパスはここでは照合しない** — 照合すると、factory 未指定 ×
946
- * config 上書きの組み合わせでナビゲーションごとにセッションが破棄されるスラッシングになる。
947
- *
948
- * @param options.apiBasePath 生成時に使う API ベースパス (未指定は既定値)。
949
- * @param options.userKey 難読化ユーザー ID (未登録ユーザーは null)。
950
- */
951
526
  declare const bootstrapDailyReportIdsStreamSession: (options: {
952
527
  apiBasePath?: string;
953
528
  userKey: string | null;
954
529
  }) => void;
955
- /**
956
- * Kicks a freshness check for an existing session before the user is known.
957
- * ユーザー確定前に既存セッションの鮮度確認だけを先行させる処理。
958
- *
959
- * clientLoader が serverLoader を await する前に呼び、再訪 (支配的経路) の
960
- * 再検証開始を数十〜数百 ms 前倒しする。セッションが無ければ何もしない
961
- * (誰のデータを読むべきか分からないため)。直後の reconcile が userKey を照合し、
962
- * ユーザーが変わっていればセッションごと破棄されるので先行は安全。
963
- * 走行中の再検証は中断しない (runFreshnessCheck の isRevalidating ガード)。
964
- */
965
530
  declare const primeDailyReportIdsStreamSession: () => void;
966
- /**
967
- * Relays an externally-known item upsert into the resident stream data.
968
- * 外部由来のアイテム upsert を常駐ストリームデータへ中継する処理。
969
- *
970
- * プロバイダーの作成/公開系ミューテーション (ローカル操作と SSE) から呼ばれる。
971
- * これを欠くと、鮮度窓内の再訪で「作成したばかりの日報が消える」。
972
- */
973
531
  declare const upsertDailyReportIdsStreamItem: (item: DailyReportItem) => void;
974
- /**
975
- * Relays an externally-known item removal into the resident stream data.
976
- * 外部由来のアイテム削除を常駐ストリームデータへ中継する処理。
977
- *
978
- * report-delete SSE・ローカル削除・stale 安全弁から呼ばれる。
979
- * これを欠くと、鮮度窓内の再訪で「削除したはずの日報が蘇る」。
980
- */
981
532
  declare const removeDailyReportIdsStreamItem: (reportHubId: number) => void;
982
- /**
983
- * Restarts a failed stream (UI retry button entry point).
984
- * failed ストリームを再開する処理 (UI の再試行ボタン入口)。
985
- */
986
533
  declare const retryDailyReportIdsStream: () => void;
987
- /**
988
- * Re-validates the stream, optionally bypassing the server-side cache.
989
- * ストリームを再検証する処理 (サーバーキャッシュのバイパス指定可)。
990
- *
991
- * 開発向けリロード/キャッシュクリアボタンから呼ばれる。
992
- *
993
- * @param options.forceRefresh サーバー側 SqlResultCache をバイパスするか。
994
- */
995
534
  declare const refreshDailyReportIdsStream: (options?: {
996
535
  forceRefresh?: boolean;
997
536
  }) => void;
998
- /**
999
- * Returns the current session's owner key (undefined when no session exists).
1000
- * 現行セッションの持ち主 (userKey) を返す処理 (セッション不在時は undefined)。
1001
- *
1002
- * 遅延解決するミューテーション継続の門番に使う。POST /action の待機中にリロード無しの
1003
- * ユーザー切替が起きると、切替時の三重遮断 (セッション破棄 + 詳細キャッシュ破棄 +
1004
- * プロバイダーリマウント) の**後**に旧ユーザーの継続が解決し、モジュール常駐状態
1005
- * (新ユーザーのセッション・詳細キャッシュ) へ旧ユーザーのデータを注入してしまう。
1006
- * 継続側は開始時点の userKey とこの値を比較し、不一致 (undefined 含む) なら
1007
- * モジュール常駐状態への書き込みを放棄する (fail-closed)。
1008
- */
1009
537
  declare const getDailyReportIdsStreamSessionUserKey: () => string | null | undefined;
1010
- /**
1011
- * React binding for the module-resident ids stream session.
1012
- * モジュール常駐 ids ストリームセッションの React バインディング。
1013
- *
1014
- * セッションが後から生成されても再購読なしで追従する (リスナーはセッションではなく
1015
- * モジュールに属する)。スナップショット参照は publish 単位で安定している。
1016
- *
1017
- * @returns Current stream state. 現在のストリーム状態。
1018
- */
1019
538
  declare const useDailyReportIdsStream: () => DailyReportIdsStreamState;
1020
- /**
1021
- * Destroys the session (test isolation helper).
1022
- * セッションを破棄するテスト用ヘルパー。
1023
- */
1024
539
  declare const resetDailyReportIdsStreamSessionForTesting: () => void;
1025
-
1026
- /**
1027
- * Shared constants for Daily Report data fetching parameters.
1028
- * 日報データ取得で利用する共通パラメーター。
1029
- */
1030
540
  declare const DAILY_REPORT_FETCH_DEBOUNCE_MS = 120;
1031
- /**
1032
- * Delay before the provider auto-connects SSE, freeing a browser connection slot for first paint.
1033
- * SSE を自動接続するまでの遅延。初回描画とその中身フェッチへ接続枠を譲るための猶予。
1034
- *
1035
- * HTTP/1.1 のオリジン当たり 6 接続のうち、ids ストリームと SSE で 2 枠を常時占有する。
1036
- * SSE 接続を初回描画直後まで遅らせ、その 1 枠を初回の中身フェッチ (`/business-date`) に回す。
1037
- * リアルタイム更新の初動がこの分だけ遅れるが、その間の状態はストリーム / SWR が担保する。
1038
- */
1039
541
  declare const SSE_INITIAL_CONNECT_DEFER_MS = 1000;
1040
542
  declare const DEFAULT_ITEM_HEIGHT = 160;
1041
543
  declare const ITEM_VERTICAL_PADDING = 6;
@@ -1050,49 +552,9 @@ declare const WHEEL_RESET_TIMEOUT_MS = 240;
1050
552
  declare const VIRTUAL_SCROLL_OVERSCAN_COUNT = 15;
1051
553
  declare const SCROLL_BAR_WIDTH = 8;
1052
554
  declare const MAX_PREVIEW_LINES = 3;
1053
- /**
1054
- * Tap-scroll circle tuning shared by every daily-report list.
1055
- * 日報のすべての一覧が共有するタップスクロールサークルの調整値。
1056
- *
1057
- * ❗ **List タブと DetailList タブで同じ値を使うこと。** 片方だけ独自定義にすると、
1058
- * 同じ指の位置でタブごとに速度が何十倍も違う (実測で最大 77 倍) という事故になる。
1059
- *
1060
- * 値の根拠 (ビューポート 800px で実測):
1061
- *
1062
- * | 引き距離 | 速度 | List (行 160px) |
1063
- * | --- | --- | --- |
1064
- * | 0 | 160 px/s | 1 行/秒 |
1065
- * | 1/4 | 525 px/s | 3.3 行/秒 |
1066
- * | 1/2 | 1,298 px/s | 8 行/秒 |
1067
- * | 最大 | 6,400 px/s | 40 行/秒 (0.67 行/フレーム) |
1068
- *
1069
- * - `exponentialSteepness: 3` — 引き幅の前半をゆっくりにして微速の分解能を確保する。
1070
- * 大きくしすぎると低速域が最小速度へ張り付いて**引いても動かない死角**になる
1071
- * (旧値 7.5 では引き幅の 43.85% が死角だった)。
1072
- * - `exponentialScale: 8` — 最高速の上限 (ビューポート比)。`maxSpeedMultiplier` と揃えて
1073
- * 上限がどちらで決まるかを一意にする。1 フレームあたりの移動をオーバースキャン
1074
- * (`VIRTUAL_SCROLL_OVERSCAN_COUNT`) の行数より十分小さく保つ値にすること。
1075
- * - `easedOffset` は使わない。最小速度 160 px/s で十分に遅く、下駄を履かせると
1076
- * 低速域の分解能がその分だけ失われる。
1077
- *
1078
- * 長距離の移動はタップスクロールではなくスクロールバーのつまみ (と
1079
- * `BusinessDayThumbOverlay` の日付表示) が担う。ここを速くして解こうとしない。
1080
- */
1081
555
  declare const TAP_SCROLL_CIRCLE_OPTIONS: ScrollBarTapCircleOptions;
1082
- /**
1083
- * Pointer types allowed to drag-scroll the list content.
1084
- * 一覧のコンテンツ領域をドラッグしてスクロールできるポインタ種別。
1085
- *
1086
- * ❗ **`enablePointerDrag` を丸ごと切ってはならない。** `ScrollPane` はコンテンツを
1087
- * transform で動かしておりネイティブのスクロール領域を持たない
1088
- * (`.aqvs-scroll-pane-content` は `overflow: hidden`) ため、切るとタッチ端末から
1089
- * スクロール手段が消える (一度そうしてしまい、モバイルで一切スクロールできなくなった)。
1090
- *
1091
- * マウスのドラッグだけを外す。行のタップ判定 (`useTapClick`) ・テキスト選択と競合するため。
1092
- * 画面幅のメディアクエリで切り替える案は採らなかった。画面幅は入力手段を表さないので
1093
- * 「主入力がマウスのタッチ対応ノート」のような端末を取りこぼす。判定は**イベントの
1094
- * ポインタ種別**で行うため、同一端末でマウスと指を使い分けても常に正しく振る舞う。
1095
- */
1096
- declare const CONTENT_DRAG_POINTER_INPUTS: readonly ["pen", "touch"];
1097
-
1098
- export { BusinessDayThumbOverlay, CONTENT_DRAG_POINTER_INPUTS, DAILY_REPORT_FETCH_DEBOUNCE_MS, DEFAULT_ITEM_HEIGHT, type DailyReportActionContextType, DailyReportActionProvider, DailyReportAttachmentIndicator, DailyReportAttachmentList, DailyReportCache, type DailyReportClientConfig, type DailyReportClientConfigInput, DailyReportCommentForm, DailyReportCommentList, DailyReportConfigProvider, DailyReportDetailList, type DailyReportDetailListScrollRestore, type DailyReportDetailResource, DailyReportEditForm, type DailyReportErrorInfo, DailyReportErrorProvider, type DailyReportFieldLabels, type DailyReportHeaderProps, DailyReportIdsStreamClient, type DailyReportIdsStreamClientOptions, type DailyReportIdsStreamPhase, type DailyReportIdsStreamState, DailyReportIdsStreamStatus, DailyReportList, DailyReportLoadError, DailyReportLoading, DailyReportPage, type DailyReportPageProps, DailyReportPostedComment, DailyReportResolvedContent, EMPTY_DETAIL, EMPTY_ITEM, FAST_SCROLL_INERTIA_OPTIONS, FAST_SCROLL_WHEEL_MULTIPLIER, ITEM_CONTAINER_HEIGHT, ITEM_VERTICAL_PADDING, MAX_PREVIEW_LINES, PREFETCH_LOOKAHEAD, PREFETCH_MAX_DATES, SCROLL_BAR_WIDTH, SSE_INITIAL_CONNECT_DEFER_MS, type SourceTypeConfig, TAP_SCROLL_CIRCLE_OPTIONS, UnreadIndicator, VIRTUAL_SCROLL_OVERSCAN_COUNT, WHEEL_RESET_TIMEOUT_MS, acquireMutationLock, applyBroadcastReportUpdate, applyDailyReportServerUpdates, bootstrapDailyReportIdsStreamSession, clearDailyReportCache, createDailyReportClientLoader, dailyReportShouldRevalidate, defaultDailyReportClientConfig, defaultDailyReportFieldLabels, deleteDailyReportCache, ensureDailyReportIdsStreamSession, getCachedReport, getDailyReportIdsStreamSessionUserKey, primeDailyReportIdsStreamSession, refreshDailyReportIdsStream, registerRecentDeletion, releaseMutationLock, reloadDocument, removeDailyReportIdsStreamItem, resetDailyReportIdsStreamSessionForTesting, resolveSourceTypeConfig, retryDailyReportIdsStream, subscribeCacheReady, updateDailyReportCache, upsertDailyReportIdsStreamItem, useAnimatedNumber, useDailyReportActionContext, useDailyReportComments, useDailyReportConfig, useDailyReportDetail, useDailyReportErrorSurface, useDailyReportIdsStream, useDailyReportPrefetch, useDailyReportSseConnection, useDynamicViewportHeight, writeCache };
556
+ declare const CONTENT_DRAG_POINTER_INPUTS: readonly [
557
+ "pen",
558
+ "touch"
559
+ ];
560
+ export { BusinessDayThumbOverlay, CONTENT_DRAG_POINTER_INPUTS, DAILY_REPORT_FETCH_DEBOUNCE_MS, DAILY_REPORT_LABEL_CATALOGS, DAILY_REPORT_LABEL_KEYS, DEFAULT_ITEM_HEIGHT, type DailyReportActionContextType, DailyReportActionProvider, DailyReportAttachmentIndicator, DailyReportAttachmentList, DailyReportCache, type DailyReportClientConfig, type DailyReportClientConfigDefaults, type DailyReportClientConfigInput, DailyReportCommentForm, DailyReportCommentList, DailyReportConfigProvider, DailyReportDetailList, type DailyReportDetailListScrollRestore, type DailyReportDetailResource, DailyReportEditForm, type DailyReportErrorInfo, DailyReportErrorProvider, type DailyReportHeaderProps, DailyReportIdsStreamClient, type DailyReportIdsStreamClientOptions, type DailyReportIdsStreamPhase, type DailyReportIdsStreamState, DailyReportIdsStreamStatus, type DailyReportLabelOverrides, type DailyReportLabels, DailyReportList, DailyReportLoadError, DailyReportLoading, type DailyReportLocale, type DailyReportOperation, DailyReportPage, type DailyReportPageProps, DailyReportPostedComment, DailyReportResolvedContent, EMPTY_DETAIL, EMPTY_ITEM, FAST_SCROLL_INERTIA_OPTIONS, FAST_SCROLL_WHEEL_MULTIPLIER, ITEM_CONTAINER_HEIGHT, ITEM_VERTICAL_PADDING, MAX_PREVIEW_LINES, PREFETCH_LOOKAHEAD, PREFETCH_MAX_DATES, SCROLL_BAR_WIDTH, SSE_INITIAL_CONNECT_DEFER_MS, type SourceTypeConfig, TAP_SCROLL_CIRCLE_OPTIONS, UnreadIndicator, VIRTUAL_SCROLL_OVERSCAN_COUNT, WHEEL_RESET_TIMEOUT_MS, acquireMutationLock, applyBroadcastReportUpdate, applyDailyReportServerUpdates, bootstrapDailyReportIdsStreamSession, clearDailyReportCache, createDailyReportClientLoader, dailyReportShouldRevalidate, defaultDailyReportClientConfig, deleteDailyReportCache, ensureDailyReportIdsStreamSession, getCachedReport, getDailyReportIdsStreamSessionUserKey, primeDailyReportIdsStreamSession, refreshDailyReportIdsStream, registerRecentDeletion, releaseMutationLock, reloadDocument, removeDailyReportIdsStreamItem, resetDailyReportIdsStreamSessionForTesting, resolveDailyReportLabels, resolveSourceTypeConfig, retryDailyReportIdsStream, subscribeCacheReady, updateDailyReportCache, upsertDailyReportIdsStreamItem, useAnimatedNumber, useDailyReportActionContext, useDailyReportComments, useDailyReportConfig, useDailyReportDetail, useDailyReportErrorSurface, useDailyReportIdsStream, useDailyReportPrefetch, useDailyReportSseConnection, useDynamicViewportHeight, writeCache };