@aiquants/daily-report 0.12.0 → 0.12.3
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.
- package/dist/client.js +5 -5
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +3 -3
- package/dist/client.mjs.map +1 -1
- package/package.json +6 -6
- package/src/client/components/daily-report-attachment-indicator.tsx +1 -1
- package/src/client/components/daily-report-comment-item.tsx +1 -1
- package/src/client/components/daily-report-detail-list.tsx +3 -1
- package/src/client/components/daily-report-ids-stream-status.tsx +1 -1
- package/src/client/components/daily-report-list.tsx +7 -3
- package/src/client/components/daily-report-resolved-content.tsx +3 -1
- package/src/client/components/daily-report-scroll-restoration.spec.tsx +1 -1
- package/src/lucide-icons.d.ts +6 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiquants/daily-report",
|
|
3
|
-
"version": "0.12.
|
|
4
|
-
"description": "Reusable daily-report feature package: shared types/schemas, React (Router v7) UI with virtual scrolling + optimistic updates + SSE sync, and a drizzle (mssql) server layer with DI ports (auth, user resolution, redis, external sources).",
|
|
3
|
+
"version": "0.12.3",
|
|
4
|
+
"description": "Reusable daily-report feature package: shared types/schemas, React (Router v7 / v8) UI with virtual scrolling + optimistic updates + SSE sync, and a drizzle (mssql) server layer with DI ports (auth, user resolution, redis, external sources).",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
7
7
|
],
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"jsdom": "^27.4.0",
|
|
65
65
|
"react": "^19.2.7",
|
|
66
66
|
"react-dom": "^19.2.7",
|
|
67
|
-
"react-router": "^
|
|
67
|
+
"react-router": "^8.3.0",
|
|
68
68
|
"rimraf": "^6.1.2",
|
|
69
69
|
"tailwindcss": "^4.1.18",
|
|
70
70
|
"tailwindcss-animate": "^1.0.7",
|
|
@@ -73,16 +73,16 @@
|
|
|
73
73
|
"vitest": "^4.1.10",
|
|
74
74
|
"zod": "^3.25.76",
|
|
75
75
|
"@aiquants/swipe-overlay": "1.2.4",
|
|
76
|
-
"@aiquants/virtualscroll": "
|
|
76
|
+
"@aiquants/virtualscroll": "^2.0.0"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"drizzle-orm": ">=1.0.0-beta.4 <2.0.0",
|
|
80
80
|
"react": ">=18",
|
|
81
81
|
"react-dom": ">=18",
|
|
82
|
-
"react-router": "^7.0.0",
|
|
82
|
+
"react-router": "^7.0.0 || ^8.0.0",
|
|
83
83
|
"zod": ">=3.25.0 <5.0.0",
|
|
84
84
|
"@aiquants/swipe-overlay": "^1.2.4",
|
|
85
|
-
"@aiquants/virtualscroll": "^
|
|
85
|
+
"@aiquants/virtualscroll": "^2.0.0"
|
|
86
86
|
},
|
|
87
87
|
"peerDependenciesMeta": {
|
|
88
88
|
"drizzle-orm": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import TrashIcon from "@heroicons/react/24/outline/TrashIcon.js"
|
|
2
2
|
import { useState } from "react"
|
|
3
3
|
import { resolveCommentColorClass, type UIComment } from "../../shared/comment-adapter"
|
|
4
4
|
import { fallbackText, formatToIsoDate } from "../../shared/text-utils"
|
|
@@ -15,7 +15,9 @@ type DailyReportVirtualScrollHandle = VirtualScrollHandle & {
|
|
|
15
15
|
selectItem: (id: number) => void
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
import
|
|
18
|
+
import Check from "lucide-react/dist/esm/icons/check"
|
|
19
|
+
import Star from "lucide-react/dist/esm/icons/star"
|
|
20
|
+
import Trash2 from "lucide-react/dist/esm/icons/trash-2"
|
|
19
21
|
import { type RefObject, useCallback, useEffect, useMemo, useRef, useState } from "react"
|
|
20
22
|
import { fallbackText, formatToIsoDate } from "../../shared/text-utils"
|
|
21
23
|
import type { DailyReportDetail, DailyReportItem } from "../../shared/types"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - complete + 再検証中: 控えめな「最新化中」インジケーター
|
|
10
10
|
* - それ以外 (idle / complete): 何も描画しない
|
|
11
11
|
*/
|
|
12
|
-
import
|
|
12
|
+
import RefreshCw from "lucide-react/dist/esm/icons/refresh-cw"
|
|
13
13
|
import { useAnimatedNumber } from "../hooks/use-animated-number"
|
|
14
14
|
import { retryDailyReportIdsStream, useDailyReportIdsStream } from "../streaming/daily-report-ids-stream-session"
|
|
15
15
|
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { SwipeCloseGuardContext, useSwipeGuardState, useSwipeToDismissOverlay, useTapClick, useTransitionDisplay } from "@aiquants/swipe-overlay"
|
|
6
6
|
import { type ScrollBarThumbOverlayRenderProps, VirtualScroll, type VirtualScrollHandle } from "@aiquants/virtualscroll"
|
|
7
|
-
import
|
|
7
|
+
import Check from "lucide-react/dist/esm/icons/check"
|
|
8
|
+
import Star from "lucide-react/dist/esm/icons/star"
|
|
9
|
+
import Trash2 from "lucide-react/dist/esm/icons/trash-2"
|
|
8
10
|
import { type CSSProperties, memo, type RefObject, useCallback, useEffect, useMemo, useRef, useState } from "react"
|
|
9
11
|
import { fallbackText, formatToIsoDate } from "../../shared/text-utils"
|
|
10
12
|
import type { DailyReportDetail, DailyReportItem } from "../../shared/types"
|
|
@@ -396,8 +398,10 @@ export const DailyReportList = ({ dailyReportItems, autoMarkRead = false, select
|
|
|
396
398
|
const handleScroll = useCallback(
|
|
397
399
|
(position: number) => {
|
|
398
400
|
// onScroll が配信する論理座標をそのまま共有スロットへ書く (保存と復元で座標系を一致させる)。
|
|
399
|
-
//
|
|
400
|
-
//
|
|
401
|
+
// 補足 (virtualscroll 2.0.0): ハンドル getScrollPosition も論理座標に統一されたため
|
|
402
|
+
// 読み戻しても座標は一致するが、配信引数が正 (追加のハンドル呼び出しは冗長)。
|
|
403
|
+
// 歴史的経緯: 2.0.0 以前はペイン座標を返す非対称があり、読み戻しが inset 分ずれる
|
|
404
|
+
// 実害バグの原因だった
|
|
401
405
|
if (scrollOffsetRef) {
|
|
402
406
|
scrollOffsetRef.current = position
|
|
403
407
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Plus from "lucide-react/dist/esm/icons/plus"
|
|
2
|
+
import RefreshCw from "lucide-react/dist/esm/icons/refresh-cw"
|
|
3
|
+
import RotateCw from "lucide-react/dist/esm/icons/rotate-cw"
|
|
2
4
|
import type { ReactNode } from "react"
|
|
3
5
|
import { useEffect, useMemo, useRef, useState } from "react"
|
|
4
6
|
import { useSearchParams } from "react-router"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* 対策の契約 (ここで固定する):
|
|
13
13
|
* - 親は ref **オブジェクト**を渡し、子が**マウント時に一度だけ**値を読む (レンダー時読取の排除)。
|
|
14
|
-
* - 保存座標は onScroll
|
|
14
|
+
* - 保存座標は onScroll が配信する**論理座標**。(virtualscroll 2.0.0 でハンドルも論理座標に統一済み。旧仕様の getScrollPosition はペイン座標で、読み戻しがずれの原因だった)
|
|
15
15
|
* - DetailList はアンカー (記録時の選択日報) が一致するときだけ復元し、
|
|
16
16
|
* 復元マウントでは初回の「選択日報へのスクロール」を 1 回だけスキップする。
|
|
17
17
|
*/
|