@fivepixels-js/react 0.2.8 → 0.2.9
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/THIRD_PARTY_NOTICES.md +29 -0
- package/dist/components/icons/Icons.d.ts +3 -0
- package/dist/components/icons/Icons.d.ts.map +1 -1
- package/dist/components/icons/Icons.js +4 -0
- package/dist/components/icons/Icons.js.map +1 -1
- package/dist/components/overlay/DeviceFrameArtwork.d.ts +10 -0
- package/dist/components/overlay/DeviceFrameArtwork.d.ts.map +1 -0
- package/dist/components/overlay/DeviceFrameArtwork.js +112 -0
- package/dist/components/overlay/DeviceFrameArtwork.js.map +1 -0
- package/dist/components/overlay/DevicePreviewChrome.d.ts +2 -0
- package/dist/components/overlay/DevicePreviewChrome.d.ts.map +1 -0
- package/dist/components/overlay/DevicePreviewChrome.js +523 -0
- package/dist/components/overlay/DevicePreviewChrome.js.map +1 -0
- package/dist/components/overlay/DevicePreviewQrCard.d.ts +18 -0
- package/dist/components/overlay/DevicePreviewQrCard.d.ts.map +1 -0
- package/dist/components/overlay/DevicePreviewQrCard.js +94 -0
- package/dist/components/overlay/DevicePreviewQrCard.js.map +1 -0
- package/dist/components/overlay/DeviceStatusBar.d.ts +13 -0
- package/dist/components/overlay/DeviceStatusBar.d.ts.map +1 -0
- package/dist/components/overlay/DeviceStatusBar.js +168 -0
- package/dist/components/overlay/DeviceStatusBar.js.map +1 -0
- package/dist/components/overlay/FloatingPinRail.d.ts.map +1 -1
- package/dist/components/overlay/FloatingPinRail.js +43 -23
- package/dist/components/overlay/FloatingPinRail.js.map +1 -1
- package/dist/components/panel/ReportControlPanel.d.ts.map +1 -1
- package/dist/components/panel/ReportControlPanel.js +7 -6
- package/dist/components/panel/ReportControlPanel.js.map +1 -1
- package/dist/components/report/ReportView.d.ts.map +1 -1
- package/dist/components/report/ReportView.js +13 -3
- package/dist/components/report/ReportView.js.map +1 -1
- package/dist/components/ui/FloatingWindow.d.ts +46 -0
- package/dist/components/ui/FloatingWindow.d.ts.map +1 -0
- package/dist/components/ui/FloatingWindow.js +183 -0
- package/dist/components/ui/FloatingWindow.js.map +1 -0
- package/dist/constants/devicePreview.d.ts +137 -0
- package/dist/constants/devicePreview.d.ts.map +1 -0
- package/dist/constants/devicePreview.js +501 -0
- package/dist/constants/devicePreview.js.map +1 -0
- package/dist/constants/motionClasses.d.ts +2 -0
- package/dist/constants/motionClasses.d.ts.map +1 -1
- package/dist/constants/motionClasses.js +2 -0
- package/dist/constants/motionClasses.js.map +1 -1
- package/dist/constants/overlayChrome.d.ts +13 -0
- package/dist/constants/overlayChrome.d.ts.map +1 -0
- package/dist/constants/overlayChrome.js +13 -0
- package/dist/constants/overlayChrome.js.map +1 -0
- package/dist/hooks/report/assembleReportContextValue.d.ts +15 -0
- package/dist/hooks/report/assembleReportContextValue.d.ts.map +1 -1
- package/dist/hooks/report/assembleReportContextValue.js +15 -0
- package/dist/hooks/report/assembleReportContextValue.js.map +1 -1
- package/dist/hooks/report/useReportPanelShell.d.ts +15 -0
- package/dist/hooks/report/useReportPanelShell.d.ts.map +1 -1
- package/dist/hooks/report/useReportPanelShell.js +18 -1
- package/dist/hooks/report/useReportPanelShell.js.map +1 -1
- package/dist/hooks/report/useReportState.d.ts +15 -0
- package/dist/hooks/report/useReportState.d.ts.map +1 -1
- package/dist/hooks/useDevicePreviewPreference.d.ts +17 -0
- package/dist/hooks/useDevicePreviewPreference.d.ts.map +1 -0
- package/dist/hooks/useDevicePreviewPreference.js +123 -0
- package/dist/hooks/useDevicePreviewPreference.js.map +1 -0
- package/dist/hooks/useOverlayChrome.d.ts +16 -0
- package/dist/hooks/useOverlayChrome.d.ts.map +1 -0
- package/dist/hooks/useOverlayChrome.js +131 -0
- package/dist/hooks/useOverlayChrome.js.map +1 -0
- package/dist/hooks/usePanelDock.d.ts +2 -0
- package/dist/hooks/usePanelDock.d.ts.map +1 -1
- package/dist/hooks/usePanelDock.js +22 -0
- package/dist/hooks/usePanelDock.js.map +1 -1
- package/dist/hooks/usePinnedFeedbackPreference.d.ts +3 -1
- package/dist/hooks/usePinnedFeedbackPreference.d.ts.map +1 -1
- package/dist/hooks/usePinnedFeedbackPreference.js +11 -1
- package/dist/hooks/usePinnedFeedbackPreference.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +41 -0
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +41 -0
- package/dist/i18n/ko.js.map +1 -1
- package/dist/i18n/types.d.ts +41 -0
- package/dist/i18n/types.d.ts.map +1 -1
- package/dist/providers/reportContext.d.ts +76 -1
- package/dist/providers/reportContext.d.ts.map +1 -1
- package/dist/providers/reportContextPartitions.d.ts +1 -1
- package/dist/providers/reportContextPartitions.d.ts.map +1 -1
- package/dist/providers/reportContextPartitions.js +15 -0
- package/dist/providers/reportContextPartitions.js.map +1 -1
- package/dist/styles/reportStylesheet.d.ts +1 -1
- package/dist/styles/reportStylesheet.d.ts.map +1 -1
- package/dist/styles/reportStylesheet.js +1 -1
- package/dist/styles/reportStylesheet.js.map +1 -1
- package/dist/types/pinnedFeedback.d.ts +7 -0
- package/dist/types/pinnedFeedback.d.ts.map +1 -1
- package/dist/types/pinnedFeedback.js.map +1 -1
- package/dist/utils/overlay/devicePreviewCapture.d.ts +51 -0
- package/dist/utils/overlay/devicePreviewCapture.d.ts.map +1 -0
- package/dist/utils/overlay/devicePreviewCapture.js +156 -0
- package/dist/utils/overlay/devicePreviewCapture.js.map +1 -0
- package/dist/utils/overlay/edgeDock.d.ts +47 -0
- package/dist/utils/overlay/edgeDock.d.ts.map +1 -0
- package/dist/utils/overlay/edgeDock.js +144 -0
- package/dist/utils/overlay/edgeDock.js.map +1 -0
- package/dist/utils/overlay/floatingWindowStack.d.ts +6 -0
- package/dist/utils/overlay/floatingWindowStack.d.ts.map +1 -0
- package/dist/utils/overlay/floatingWindowStack.js +17 -0
- package/dist/utils/overlay/floatingWindowStack.js.map +1 -0
- package/dist/utils/pinned/pinnedFeedback.d.ts.map +1 -1
- package/dist/utils/pinned/pinnedFeedback.js +5 -2
- package/dist/utils/pinned/pinnedFeedback.js.map +1 -1
- package/dist/utils/qr/devicePreviewShareUrl.d.ts +13 -0
- package/dist/utils/qr/devicePreviewShareUrl.d.ts.map +1 -0
- package/dist/utils/qr/devicePreviewShareUrl.js +53 -0
- package/dist/utils/qr/devicePreviewShareUrl.js.map +1 -0
- package/dist/utils/qr/encodeQrSvg.d.ts +13 -0
- package/dist/utils/qr/encodeQrSvg.d.ts.map +1 -0
- package/dist/utils/qr/encodeQrSvg.js +31 -0
- package/dist/utils/qr/encodeQrSvg.js.map +1 -0
- package/dist/vendor/nayuki/qrcodegen.d.ts +94 -0
- package/dist/vendor/nayuki/qrcodegen.d.ts.map +1 -0
- package/dist/vendor/nayuki/qrcodegen.js +836 -0
- package/dist/vendor/nayuki/qrcodegen.js.map +1 -0
- package/package.json +7 -2
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { buildQrSvgPath, encodeQrModules } from "../../utils/qr/encodeQrSvg.js";
|
|
4
|
+
import { resolveDevicePreviewQrUrl } from "../../utils/qr/devicePreviewShareUrl.js";
|
|
5
|
+
const MANUAL_URL_STORAGE_KEY = "fivepixels:device-preview-qr-manual-url";
|
|
6
|
+
function readStoredManualUrl() {
|
|
7
|
+
if (typeof window === "undefined") {
|
|
8
|
+
return "";
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
return window.sessionStorage.getItem(MANUAL_URL_STORAGE_KEY) ?? "";
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return "";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function persistManualUrl(value) {
|
|
18
|
+
if (typeof window === "undefined") {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
if (value.trim()) {
|
|
23
|
+
window.sessionStorage.setItem(MANUAL_URL_STORAGE_KEY, value);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
window.sessionStorage.removeItem(MANUAL_URL_STORAGE_KEY);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// ignore quota / private mode
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export function DevicePreviewQrCard({ left,
|
|
34
|
+
// top,
|
|
35
|
+
maxWidth, title, hintLocalhost, urlInputLabel, urlInputPlaceholder, urlInputAriaLabel, invalidUrlMessage, emptyUrlMessage, copyLabel, copiedLabel, copyAriaLabel, qrAriaLabel, }) {
|
|
36
|
+
const pageHref = typeof window !== "undefined" ? window.location.href : "";
|
|
37
|
+
const [manualUrl, setManualUrl] = useState(readStoredManualUrl);
|
|
38
|
+
const [copied, setCopied] = useState(false);
|
|
39
|
+
const resolved = useMemo(() => resolveDevicePreviewQrUrl({
|
|
40
|
+
pageHref,
|
|
41
|
+
manualUrl,
|
|
42
|
+
}), [pageHref, manualUrl]);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (resolved.needsManualUrl) {
|
|
45
|
+
persistManualUrl(manualUrl);
|
|
46
|
+
}
|
|
47
|
+
}, [manualUrl, resolved.needsManualUrl]);
|
|
48
|
+
const qr = useMemo(() => {
|
|
49
|
+
if (!resolved.url) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
const encoded = encodeQrModules(resolved.url);
|
|
54
|
+
const { path, dimension } = buildQrSvgPath(encoded);
|
|
55
|
+
return { path, dimension, url: resolved.url };
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}, [resolved.url]);
|
|
61
|
+
const statusMessage = (() => {
|
|
62
|
+
if (!resolved.needsManualUrl) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
if (!manualUrl.trim()) {
|
|
66
|
+
return emptyUrlMessage;
|
|
67
|
+
}
|
|
68
|
+
if (!resolved.url || !qr) {
|
|
69
|
+
return invalidUrlMessage;
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
})();
|
|
73
|
+
const handleCopy = async () => {
|
|
74
|
+
if (!resolved.url) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
await navigator.clipboard.writeText(resolved.url);
|
|
79
|
+
setCopied(true);
|
|
80
|
+
window.setTimeout(() => setCopied(false), 1500);
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
setCopied(false);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const width = Math.max(168, Math.min(220, maxWidth));
|
|
87
|
+
return (_jsxs("div", { "data-fivepixels-interactive": "", className: "pointer-events-auto fixed z-[1000001] top-[50%] flex flex-col gap-[4px]", style: {
|
|
88
|
+
left,
|
|
89
|
+
width,
|
|
90
|
+
maxWidth: Math.max(0, maxWidth),
|
|
91
|
+
transform: "translateY(-50%)",
|
|
92
|
+
}, role: "region", "aria-label": title, children: [_jsx("div", { className: "text-[14px] font-semibold tracking-[0.01em] text-[var(--adaptive-black900)] whitespace-break-spaces leading-[1.5]", children: title }), _jsx("div", { className: "overflow-hidden rounded-[16px] bg-white border border-[var(--adaptive-border-subtle)]", children: qr ? (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${qr.dimension} ${qr.dimension}`, className: "block aspect-square w-full", role: "img", "aria-label": qrAriaLabel, children: [_jsx("rect", { width: qr.dimension, height: qr.dimension, fill: "#ffffff" }), _jsx("path", { d: qr.path, fill: "#0f172a" })] })) : (_jsx("div", { className: "flex aspect-square w-full items-center justify-center border border-dashed border-[rgba(148,163,184,0.55)] bg-[rgba(248,250,252,0.92)] px-[10px] text-center text-[10px] font-medium leading-snug text-slate-500", "aria-hidden": true, children: "QR" })) }), resolved.needsManualUrl ? (_jsxs("div", { className: "flex flex-col gap-[4px]", children: [_jsx("label", { className: "flex flex-col gap-[3px]", children: _jsx("input", { type: "url", value: manualUrl, onChange: (event) => setManualUrl(event.target.value), placeholder: urlInputPlaceholder, "aria-label": urlInputAriaLabel, className: "h-[30px] w-full rounded-[8px] border border-[var(--adaptive-border-subtle)] bg-[var(--adaptive-black50)] px-[8px] text-[11px] text-[var(--adaptive-black900)] outline-none placeholder:text-[var(--adaptive-black500)] focus:border-[var(--adaptive-blue500)]" }) }), statusMessage ? _jsx("p", { className: "text-[9px] leading-snug text-[var(--adaptive-red500)]", children: statusMessage }) : null] })) : null, resolved.url ? (_jsx("div", { className: "flex flex-col gap-[6px]", children: _jsx("button", { type: "button", onClick: () => void handleCopy(), "aria-label": copyAriaLabel, className: "h-[28px] rounded-[8px] border border-[var(--adaptive-border-subtle)] bg-[var(--adaptive-black50)] px-[8px] text-[10px] font-semibold text-[var(--adaptive-black900)] hover:bg-[var(--adaptive-black100)]", children: copied ? copiedLabel : copyLabel }) })) : null, _jsx("p", { className: "text-[12px] text-[var(--adaptive-black500)] leading-[1.5] whitespace-break-spaces", children: hintLocalhost })] }));
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=DevicePreviewQrCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevicePreviewQrCard.js","sourceRoot":"","sources":["../../../src/components/overlay/DevicePreviewQrCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,MAAM,sBAAsB,GAAG,yCAAyC,CAAC;AAEzE,SAAS,mBAAmB;IACxB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,EAAE,CAAC;I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,eAAK,SAAS,EAAC,yBAAyB,aACpC,gBAAO,SAAS,EAAC,yBAAyB,YAEtC,gBACI,IAAI,EAAC,KAAK,EACV,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACrD,WAAW,EAAE,mBAAmB,gBACpB,iBAAiB,EAC7B,SAAS,EAAC,+PAA+P,GAC3Q,GACE,EACP,aAAa,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,uDAAuD,YAAE,aAAa,GAAK,CAAC,CAAC,CAAC,IAAI,IAC9G,CACT,CAAC,CAAC,CAAC,IAAI,EAEP,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CACZ,cAAK,SAAS,EAAC,yBAAyB,YAOpC,iBACI,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,UAAU,EAAE,gBACpB,aAAa,EACzB,SAAS,EAAC,0MAA0M,YAEnN,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,GAC5B,GACP,CACT,CAAC,CAAC,CAAC,IAAI,EACR,YAAG,SAAS,EAAC,mFAAmF,YAAE,aAAa,GAAK,IAClH,CACT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type DevicePreviewPreset } from "../../constants/devicePreview.js";
|
|
2
|
+
type StatusBarAppearance = "light" | "dark";
|
|
3
|
+
type DeviceStatusBarProps = {
|
|
4
|
+
preset: DevicePreviewPreset;
|
|
5
|
+
width: number;
|
|
6
|
+
scale?: number;
|
|
7
|
+
appearance?: StatusBarAppearance;
|
|
8
|
+
showCutout?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function getDeviceStatusBarHeight(preset: DevicePreviewPreset, screenWidth: number, scale?: number): number;
|
|
11
|
+
export declare function DeviceStatusBar({ preset, width, scale, appearance, showCutout, }: DeviceStatusBarProps): import("react").JSX.Element | null;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=DeviceStatusBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceStatusBar.d.ts","sourceRoot":"","sources":["../../../src/components/overlay/DeviceStatusBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAIH,KAAK,mBAAmB,EAE3B,MAAM,8BAA8B,CAAC;AAEtC,KAAK,mBAAmB,GAAG,OAAO,GAAG,MAAM,CAAC;AAE5C,KAAK,oBAAoB,GAAG;IACxB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AA2iBF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,SAAI,UAEnG;AAED,wBAAgB,eAAe,CAAC,EAC5B,MAAM,EACN,KAAK,EACL,KAAS,EACT,UAAoB,EACpB,UAAiB,GACpB,EAAE,oBAAoB,sCAmCtB"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DEVICE_CHROME_COLOR, getDeviceSafeAreaTop, scaleStatusBarMetrics, } from "../../constants/devicePreview.js";
|
|
3
|
+
const IOS_TIME = "9:41";
|
|
4
|
+
const ANDROID_TIME = "9:41";
|
|
5
|
+
const BATTERY_PERCENT = 80;
|
|
6
|
+
function themeColors(appearance) {
|
|
7
|
+
switch (appearance) {
|
|
8
|
+
case "dark":
|
|
9
|
+
return { foreground: "#ffffff" };
|
|
10
|
+
case "light":
|
|
11
|
+
default:
|
|
12
|
+
return { foreground: "#000000" };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function CellularIcon({ color, height }) {
|
|
16
|
+
const barW = Math.max(2.2, height * 0.22);
|
|
17
|
+
const gap = Math.max(1.4, height * 0.12);
|
|
18
|
+
const ratios = [0.28, 0.48, 0.7, 1];
|
|
19
|
+
const w = barW * 4 + gap * 3;
|
|
20
|
+
return (_jsx("svg", { width: w, height: height, viewBox: `0 0 ${w} ${height}`, style: { overflow: "visible", display: "block" }, "aria-hidden": true, children: ratios.map((ratio, index) => {
|
|
21
|
+
const h = height * ratio;
|
|
22
|
+
return (_jsx("rect", { x: index * (barW + gap), y: height - h, width: barW, height: h, rx: barW / 2, fill: color }, index));
|
|
23
|
+
}) }));
|
|
24
|
+
}
|
|
25
|
+
function WifiIcon({ color, size }) {
|
|
26
|
+
const h = size * 0.78;
|
|
27
|
+
return (_jsxs("svg", { width: size, height: h, viewBox: "-1.2 -1.2 18.4 14", style: { overflow: "visible", display: "block" }, "aria-hidden": true, children: [_jsx("circle", { cx: "8", cy: "10.35", r: "1.25", fill: color }), _jsx("path", { d: "M5.1 7.35c1.6-1.55 4.2-1.55 5.8 0", fill: "none", stroke: color, strokeWidth: "1.7", strokeLinecap: "round" }), _jsx("path", { d: "M2.75 4.95c2.9-2.85 7.6-2.85 10.5 0", fill: "none", stroke: color, strokeWidth: "1.7", strokeLinecap: "round" }), _jsx("path", { d: "M0.7 2.55c4-3.8 10.6-3.8 14.6 0", fill: "none", stroke: color, strokeWidth: "1.7", strokeLinecap: "round" })] }));
|
|
28
|
+
}
|
|
29
|
+
function BatteryIcon({ color, width, height }) {
|
|
30
|
+
const stroke = 1.5;
|
|
31
|
+
const tipW = 2.2;
|
|
32
|
+
const tipGap = 1.1;
|
|
33
|
+
const bodyW = width - tipW - tipGap;
|
|
34
|
+
const ox = stroke / 2 + 0.25;
|
|
35
|
+
const oy = stroke / 2 + 0.25;
|
|
36
|
+
const ow = bodyW - ox * 2;
|
|
37
|
+
const oh = height - oy * 2;
|
|
38
|
+
const fillInset = Math.max(ox + 1.1, height * 0.22);
|
|
39
|
+
return (_jsxs("svg", { width: width, height: height, viewBox: `0 0 ${width} ${height}`, style: { overflow: "visible", display: "block" }, "aria-hidden": true, children: [_jsx("rect", { x: ox, y: oy, width: ow, height: oh, rx: oh * 0.28, fill: "none", stroke: color, strokeWidth: stroke, opacity: "0.4" }), _jsx("rect", { x: fillInset, y: fillInset, width: bodyW - fillInset * 2, height: height - fillInset * 2, rx: (height - fillInset * 2) * 0.2, fill: color }), _jsx("rect", { x: bodyW + tipGap * 0.15, y: height * 0.3, width: tipW, height: height * 0.4, rx: tipW / 2, fill: color, opacity: "0.4" })] }));
|
|
40
|
+
}
|
|
41
|
+
function BatteryWithPercent({ color, width, height }) {
|
|
42
|
+
const stroke = 1.5;
|
|
43
|
+
const tipW = 2.4;
|
|
44
|
+
const tipGap = 1.1;
|
|
45
|
+
const bodyW = width - tipW - tipGap;
|
|
46
|
+
const ox = stroke / 2 + 0.35;
|
|
47
|
+
const oy = stroke / 2 + 0.35;
|
|
48
|
+
const ow = bodyW - ox * 2;
|
|
49
|
+
const oh = height - oy * 2;
|
|
50
|
+
const fillInset = ox + 1.15;
|
|
51
|
+
const fillW = Math.max(2, (bodyW - fillInset * 2) * (BATTERY_PERCENT / 100));
|
|
52
|
+
const fontSize = Math.max(9, height * 0.62);
|
|
53
|
+
return (_jsxs("svg", { width: width, height: height, viewBox: `0 0 ${width} ${height}`, style: { overflow: "visible", display: "block" }, "aria-hidden": true, children: [_jsx("rect", { x: ox, y: oy, width: ow, height: oh, rx: oh * 0.3, fill: "none", stroke: color, strokeWidth: stroke, opacity: "0.4" }), _jsx("rect", { x: fillInset, y: fillInset, width: fillW, height: height - fillInset * 2, rx: (height - fillInset * 2) * 0.22, fill: "#34C759" }), _jsx("text", { x: bodyW / 2, y: height / 2 + 0.35, textAnchor: "middle", dominantBaseline: "middle", fill: "#ffffff", fontSize: fontSize, fontWeight: "700", fontFamily: '-apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif', children: BATTERY_PERCENT }), _jsx("rect", { x: bodyW + tipGap * 0.15, y: height * 0.3, width: tipW, height: height * 0.4, rx: tipW / 2, fill: color, opacity: "0.4" })] }));
|
|
54
|
+
}
|
|
55
|
+
function TrailingIcons({ color, cellularH, wifiSize, batteryW, batteryH, gap, withPercent, }) {
|
|
56
|
+
return (_jsxs("div", { className: "flex items-center", style: { gap, color, overflow: "visible", lineHeight: 0 }, children: [_jsx(CellularIcon, { color: color, height: cellularH }), _jsx(WifiIcon, { color: color, size: wifiSize }), withPercent ? (_jsx(BatteryWithPercent, { color: color, width: batteryW, height: batteryH })) : (_jsx(BatteryIcon, { color: color, width: batteryW, height: batteryH }))] }));
|
|
57
|
+
}
|
|
58
|
+
function TimeLabel({ color, fontSize, children }) {
|
|
59
|
+
return (_jsx("span", { style: {
|
|
60
|
+
color,
|
|
61
|
+
WebkitTextFillColor: color,
|
|
62
|
+
fontSize,
|
|
63
|
+
fontVariantNumeric: "tabular-nums",
|
|
64
|
+
lineHeight: 1,
|
|
65
|
+
}, children: children }));
|
|
66
|
+
}
|
|
67
|
+
function CutoutVisual({ cutout }) {
|
|
68
|
+
switch (cutout.kind) {
|
|
69
|
+
case "notch":
|
|
70
|
+
return (_jsx("div", { className: "relative shrink-0", style: {
|
|
71
|
+
width: cutout.width,
|
|
72
|
+
height: cutout.height,
|
|
73
|
+
background: DEVICE_CHROME_COLOR,
|
|
74
|
+
borderBottomLeftRadius: cutout.height * 0.45,
|
|
75
|
+
borderBottomRightRadius: cutout.height * 0.45,
|
|
76
|
+
}, children: _jsx("div", { className: "absolute left-1/2 top-[42%] -translate-x-1/2 -translate-y-1/2 rounded-full", style: {
|
|
77
|
+
width: 6.4,
|
|
78
|
+
height: 6.4,
|
|
79
|
+
background: DEVICE_CHROME_COLOR,
|
|
80
|
+
} }) }));
|
|
81
|
+
case "island":
|
|
82
|
+
return (_jsx("div", { className: "relative shrink-0", style: {
|
|
83
|
+
width: cutout.width,
|
|
84
|
+
height: cutout.height,
|
|
85
|
+
borderRadius: 999,
|
|
86
|
+
background: DEVICE_CHROME_COLOR,
|
|
87
|
+
}, children: _jsx("div", { className: "absolute top-1/2 -translate-y-1/2 rounded-full", style: {
|
|
88
|
+
right: 12,
|
|
89
|
+
width: 8,
|
|
90
|
+
height: 8,
|
|
91
|
+
background: DEVICE_CHROME_COLOR,
|
|
92
|
+
} }) }));
|
|
93
|
+
case "punch":
|
|
94
|
+
return (_jsx("div", { className: "relative shrink-0 rounded-full", style: {
|
|
95
|
+
width: cutout.radius * 2,
|
|
96
|
+
height: cutout.radius * 2,
|
|
97
|
+
background: DEVICE_CHROME_COLOR,
|
|
98
|
+
}, children: _jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full", style: {
|
|
99
|
+
width: cutout.radius * 0.7,
|
|
100
|
+
height: cutout.radius * 0.7,
|
|
101
|
+
background: DEVICE_CHROME_COLOR,
|
|
102
|
+
} }) }));
|
|
103
|
+
case "none":
|
|
104
|
+
default:
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function CenterColumn({ cutout }) {
|
|
109
|
+
if (cutout.kind === "none") {
|
|
110
|
+
return (_jsx("div", { className: "flex h-full shrink-0 items-center justify-center", style: { width: cutout.width } }));
|
|
111
|
+
}
|
|
112
|
+
return (_jsx("div", { className: "flex h-full shrink-0 items-center justify-center", style: { width: cutout.width }, "data-fivepixels-device-cutout": cutout.kind, children: _jsx(CutoutVisual, { cutout: cutout }) }));
|
|
113
|
+
}
|
|
114
|
+
function StatusThreeColumn({ color, fontFamily, fontSize, fontWeight, padLeft, padRight, cutout, left, right, center, }) {
|
|
115
|
+
return (_jsxs("div", { className: "flex h-full w-full items-center", style: {
|
|
116
|
+
color,
|
|
117
|
+
WebkitTextFillColor: color,
|
|
118
|
+
fontFamily,
|
|
119
|
+
fontSize,
|
|
120
|
+
fontWeight,
|
|
121
|
+
letterSpacing: "-0.02em",
|
|
122
|
+
}, children: [_jsx("div", { className: "flex min-w-0 flex-1 items-center justify-center", style: { paddingLeft: padLeft || undefined, overflow: "visible" }, children: left }), center ?? _jsx(CenterColumn, { cutout: cutout }), _jsx("div", { className: "flex min-w-0 flex-1 items-center justify-center", style: { paddingRight: padRight || undefined, overflow: "visible" }, children: right })] }));
|
|
123
|
+
}
|
|
124
|
+
function renderClassic(color, metrics) {
|
|
125
|
+
const iosFont = '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif';
|
|
126
|
+
return (_jsx(StatusThreeColumn, { color: color, fontFamily: iosFont, fontSize: metrics.timeSize, fontWeight: 600, padLeft: metrics.padLeft, padRight: metrics.padRight, cutout: metrics.cutout, left: _jsxs("div", { className: "flex items-center", style: { gap: 4 }, children: [_jsx(TimeLabel, { color: color, fontSize: metrics.timeSize, children: "SKT" }), _jsx(CellularIcon, { color: color, height: metrics.cellularH })] }), center: _jsx("div", { className: "flex shrink-0 items-center justify-center", children: _jsx(TimeLabel, { color: color, fontSize: metrics.timeSize, children: IOS_TIME }) }), right: _jsx(TrailingIcons, { color: color, cellularH: metrics.cellularH, wifiSize: metrics.wifi, batteryW: metrics.batteryW, batteryH: metrics.batteryH, gap: metrics.iconGap, withPercent: metrics.batteryPercent }) }));
|
|
127
|
+
}
|
|
128
|
+
function renderFaceId(color, metrics) {
|
|
129
|
+
const iosFont = '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif';
|
|
130
|
+
return (_jsx(StatusThreeColumn, { color: color, fontFamily: iosFont, fontSize: metrics.timeSize, fontWeight: 600, padLeft: metrics.padLeft, padRight: metrics.padRight, cutout: metrics.cutout, left: _jsx(TimeLabel, { color: color, fontSize: metrics.timeSize, children: IOS_TIME }), right: _jsx(TrailingIcons, { color: color, cellularH: metrics.cellularH, wifiSize: metrics.wifi, batteryW: metrics.batteryW, batteryH: metrics.batteryH, gap: metrics.iconGap, withPercent: metrics.batteryPercent }) }));
|
|
131
|
+
}
|
|
132
|
+
function renderAndroid(color, metrics) {
|
|
133
|
+
const androidFont = 'Roboto, "Noto Sans", system-ui, sans-serif';
|
|
134
|
+
return (_jsx(StatusThreeColumn, { color: color, fontFamily: androidFont, fontSize: metrics.timeSize, fontWeight: 500, padLeft: metrics.padLeft, padRight: metrics.padRight, cutout: metrics.cutout, left: _jsx(TimeLabel, { color: color, fontSize: metrics.timeSize, children: ANDROID_TIME }), right: _jsx(TrailingIcons, { color: color, cellularH: metrics.cellularH, wifiSize: metrics.wifi, batteryW: metrics.batteryW, batteryH: metrics.batteryH, gap: metrics.iconGap, withPercent: metrics.batteryPercent }) }));
|
|
135
|
+
}
|
|
136
|
+
function renderTablet(color, metrics) {
|
|
137
|
+
const iosFont = '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif';
|
|
138
|
+
return (_jsx(StatusThreeColumn, { color: color, fontFamily: iosFont, fontSize: metrics.timeSize, fontWeight: 600, padLeft: metrics.padLeft, padRight: metrics.padRight, cutout: metrics.cutout, left: _jsx(TimeLabel, { color: color, fontSize: metrics.timeSize, children: IOS_TIME }), right: _jsx(TrailingIcons, { color: color, cellularH: metrics.cellularH, wifiSize: metrics.wifi, batteryW: metrics.batteryW, batteryH: metrics.batteryH, gap: metrics.iconGap, withPercent: metrics.batteryPercent }) }));
|
|
139
|
+
}
|
|
140
|
+
export function getDeviceStatusBarHeight(preset, screenWidth, scale = 1) {
|
|
141
|
+
return Math.max(0, Math.round(getDeviceSafeAreaTop(preset, screenWidth) * scale));
|
|
142
|
+
}
|
|
143
|
+
export function DeviceStatusBar({ preset, width, scale = 1, appearance = "light", showCutout = true, }) {
|
|
144
|
+
const metrics = scaleStatusBarMetrics(preset, width);
|
|
145
|
+
const height = Math.max(0, Math.round(metrics.safeAreaTop * scale));
|
|
146
|
+
const { foreground } = themeColors(appearance);
|
|
147
|
+
const cutout = showCutout ? metrics.cutout : { kind: "none", width: metrics.cutout.width, height: 0, top: 0 };
|
|
148
|
+
let content = null;
|
|
149
|
+
switch (metrics.layout) {
|
|
150
|
+
case "classic":
|
|
151
|
+
content = renderClassic(foreground, { ...metrics, cutout });
|
|
152
|
+
break;
|
|
153
|
+
case "faceId":
|
|
154
|
+
content = renderFaceId(foreground, { ...metrics, cutout });
|
|
155
|
+
break;
|
|
156
|
+
case "android":
|
|
157
|
+
content = renderAndroid(foreground, { ...metrics, cutout });
|
|
158
|
+
break;
|
|
159
|
+
case "tablet":
|
|
160
|
+
content = renderTablet(foreground, { ...metrics, cutout });
|
|
161
|
+
break;
|
|
162
|
+
case "none":
|
|
163
|
+
default:
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
return (_jsx("div", { className: "pointer-events-none absolute left-0 right-0 top-0 overflow-hidden bg-[var(--adaptive-neutralTintOpacity700)] backdrop-blur-[10px]", style: { height, color: foreground, WebkitTextFillColor: foreground }, "data-fivepixels-device-status-bar": metrics.layout, "aria-hidden": true, children: content }));
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=DeviceStatusBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceStatusBar.js","sourceRoot":"","sources":["../../../src/components/overlay/DeviceStatusBar.tsx"],"names":[],"mappings":";AACA,OAAO,EACH,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GAGxB,MAAM,8BAA8B,CAAC;AAYtC,MAAM,QAAQ,GAAG,MAAM,CAAC;AACxB,MAAM,YAAY,GAAG,MAAM,CAAC;AAC5B,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,SAAS,WAAW,CAAC,UAA+B;IAChD,QAAQ,UAAU,EAAE,CAAC;QACjB,KAAK,MAAM;YACP,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;QACrC,KAAK,OAAO,CAAC;QACb;YACI,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;IACzC,CAAC;AACL,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAqC;IACtE,MAAM,IAAI,GAAG,IAAI,CAAC,G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-1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingPinRail.d.ts","sourceRoot":"","sources":["../../../src/components/overlay/FloatingPinRail.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FloatingPinRail.d.ts","sourceRoot":"","sources":["../../../src/components/overlay/FloatingPinRail.tsx"],"names":[],"mappings":"AA+KA,wBAAgB,eAAe,uCA0L9B"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useMemo, useState } from "react";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { CloseIcon, ChevronDownIcon } from "../../components/icons/Icons.js";
|
|
4
|
+
import { FloatingWindow } from "../../components/ui/FloatingWindow.js";
|
|
5
|
+
import { PIN_RAIL_EXPANDED_WIDTH } from "../../constants/overlayChrome.js";
|
|
4
6
|
import { MOTION } from "../../constants/motionClasses.js";
|
|
5
7
|
import { useReportData, useReportPreferences, useReportSession } from "../../providers/reportContext.js";
|
|
6
8
|
import { formatFeedbackCaseId } from "../../utils/feedback/feedbackCaseId.js";
|
|
@@ -22,20 +24,33 @@ function PinRailCard({ item, index, onOpen, onRemove }) {
|
|
|
22
24
|
window.setTimeout(() => setPulsing(false), 180);
|
|
23
25
|
onOpen(item);
|
|
24
26
|
};
|
|
25
|
-
return (_jsxs("div", { className: `${MOTION.pinCardEnter} group relative flex
|
|
27
|
+
return (_jsxs("div", { className: `${MOTION.pinCardEnter} group relative flex overflow-hidden rounded-[8px] border border-[var(--adaptive-border-subtle)] bg-[var(--adaptive-black50)] ${pulsing ? MOTION.pinCardPulse : ""}`, style: { animationDelay: `${index * 35}ms` }, children: [_jsxs("button", { type: "button", "data-fivepixels-interactive": "", onClick: handleOpen, "aria-label": messages.pins.openPinAriaLabel, className: "flex min-w-0 flex-1 text-left transition-colors hover:bg-[var(--adaptive-black100)]", children: [_jsx("span", { className: "flex min-w-[72px] shrink-0 items-center justify-center border-r border-[var(--adaptive-border-subtle)] bg-[var(--adaptive-black100)] px-[8px] py-[8px] text-[12px] font-semibold text-[var(--adaptive-black900)]", children: item.fcNumber ? formatFeedbackCaseId(item.fcNumber) : "#FC-—" }), _jsx("span", { className: "min-w-0 flex-1 truncate px-[12px] py-[8px] pr-[28px] text-[11px] leading-[1.35] text-[var(--adaptive-black500)]", children: item.summary })] }), _jsx("button", { type: "button", "data-fivepixels-interactive": "", onClick: () => onRemove(item.reportId), "aria-label": messages.pins.removePinAriaLabel, className: "absolute right-[6px] top-1/2 z-[1] flex h-[20px] w-[20px] -translate-y-1/2 items-center justify-center rounded-[4px] text-[var(--adaptive-black400)] opacity-0 transition-opacity hover:bg-[var(--adaptive-tintOpacity200)] hover:text-[var(--adaptive-black900)] group-hover:opacity-100", children: _jsx(CloseIcon, { className: "h-[12px] w-[12px]" }) })] }));
|
|
26
28
|
}
|
|
27
|
-
function PinnedRouteAccordion({ group, collapsed,
|
|
29
|
+
function PinnedRouteAccordion({ group, collapsed, onToggle, onOpen, onRemove, }) {
|
|
28
30
|
const { messages } = useReportPreferences();
|
|
29
31
|
const expanded = !collapsed;
|
|
30
|
-
return (_jsxs("section", { className: "
|
|
32
|
+
return (_jsxs("section", { className: "flex flex-col gap-[6px]", children: [_jsxs("button", { type: "button", "data-fivepixels-interactive": "", onClick: onToggle, "aria-expanded": expanded, "aria-label": messages.pins.routeToggleAriaLabel(group.pathname), className: "flex w-full items-center justify-between gap-[8px] rounded-[8px] border border-[var(--adaptive-border-subtle)] bg-[var(--adaptive-black100)] px-[10px] py-[8px] text-left transition-colors hover:bg-[var(--adaptive-black200)]", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-[7px]", children: [_jsx(CircularProgress, { progress: group.progress, size: 22 }), _jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "block truncate text-[11px] font-semibold text-[var(--adaptive-black900)]", children: group.pathname }), _jsx("span", { className: "block text-[10px] tabular-nums text-[var(--adaptive-black500)]", children: messages.pins.completedCasesLabel(group.progress.resolved, group.progress.total) })] })] }), _jsx(ChevronDownIcon, { className: `h-[13px] w-[13px] shrink-0 text-[var(--adaptive-black500)] transition-transform duration-200 ease-[cubic-bezier(0.22,1,0.36,1)] ${expanded ? "rotate-180" : ""}` })] }), _jsx("div", { className: MOTION.pinRailBody, "data-expanded": expanded ? "true" : "false", children: _jsx("div", { className: MOTION.pinRailBodyInner, children: _jsx("div", { className: "flex flex-col gap-[6px]", children: group.items.map((item, index) => (_jsx(PinRailCard, { item: item, index: index, onOpen: onOpen, onRemove: onRemove }, item.reportId))) }) }) })] }));
|
|
31
33
|
}
|
|
32
34
|
export function FloatingPinRail() {
|
|
33
|
-
const { messages, pinnedFeedbackItems, pinRailCollapsed, setPinRailCollapsed, unpinFeedback, syncPinnedFeedbackReports } = useReportPreferences();
|
|
35
|
+
const { messages, pinnedFeedbackItems, pinRailCollapsed, pinRailPlacement, setPinRailCollapsed, setPinRailPlacement, unpinFeedback, syncPinnedFeedbackReports, isMobileViewport, } = useReportPreferences();
|
|
34
36
|
const { openPinnedFeedback } = useReportSession();
|
|
35
37
|
const { reports, allPageReports } = useReportData();
|
|
36
38
|
const [entered, setEntered] = useState(false);
|
|
37
39
|
const [collapsedRoutes, setCollapsedRoutes] = useState(() => new Set());
|
|
38
40
|
const hasPins = pinnedFeedbackItems.length > 0;
|
|
41
|
+
const [mode, setMode] = useState(() => (pinRailCollapsed ? "minimized" : "normal"));
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
setMode((current) => {
|
|
44
|
+
if (pinRailCollapsed) {
|
|
45
|
+
return "minimized";
|
|
46
|
+
}
|
|
47
|
+
return current === "minimized" ? "normal" : current;
|
|
48
|
+
});
|
|
49
|
+
}, [pinRailCollapsed]);
|
|
50
|
+
const handleModeChange = useCallback((next) => {
|
|
51
|
+
setMode(next);
|
|
52
|
+
setPinRailCollapsed(next === "minimized");
|
|
53
|
+
}, [setPinRailCollapsed]);
|
|
39
54
|
const enrichedItems = useMemo(() => {
|
|
40
55
|
const reportById = new Map([...allPageReports, ...reports].map((report) => [report.id, report]));
|
|
41
56
|
return [...pinnedFeedbackItems].reverse().map((item) => {
|
|
@@ -83,30 +98,35 @@ export function FloatingPinRail() {
|
|
|
83
98
|
const frame = window.requestAnimationFrame(() => setEntered(true));
|
|
84
99
|
return () => window.cancelAnimationFrame(frame);
|
|
85
100
|
}, [hasPins]);
|
|
86
|
-
if (!hasPins) {
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
const expanded = !pinRailCollapsed;
|
|
90
101
|
const handleOpen = (item) => {
|
|
91
102
|
void openPinnedFeedback(item.reportId, {
|
|
92
103
|
caseId: item.caseId,
|
|
93
104
|
pathname: item.pathname,
|
|
94
105
|
});
|
|
95
106
|
};
|
|
96
|
-
|
|
97
|
-
|
|
107
|
+
const handlePositionChange = useCallback((next) => {
|
|
108
|
+
setPinRailPlacement(next);
|
|
109
|
+
}, [setPinRailPlacement]);
|
|
110
|
+
if (!hasPins || isMobileViewport) {
|
|
111
|
+
return null;
|
|
98
112
|
}
|
|
99
|
-
return (_jsx(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
113
|
+
return (_jsx(FloatingWindow, { dataChrome: "pin", className: entered ? MOTION.pinRailEnter : "", width: PIN_RAIL_EXPANDED_WIDTH, minWidth: 240, minHeight: 160, position: pinRailPlacement, onPositionChange: handlePositionChange, mode: mode, onModeChange: handleModeChange, resizable: true, resizeAriaLabel: messages.marker.resizeAriaLabel, contentClassName: "px-[12px] pb-[12px]", ariaLabel: messages.pins.railTitle, controls: {
|
|
114
|
+
onClose: () => handleModeChange("minimized"),
|
|
115
|
+
closeAriaLabel: messages.pins.railCollapseAriaLabel,
|
|
116
|
+
minimizeAriaLabel: messages.pins.railCollapseAriaLabel,
|
|
117
|
+
maximizeAriaLabel: messages.marker.windowMaximizeAriaLabel,
|
|
118
|
+
restoreAriaLabel: messages.marker.windowRestoreAriaLabel,
|
|
119
|
+
}, title: _jsxs("span", { className: "truncate text-[12px] font-bold text-[var(--adaptive-black900)]", children: [messages.pins.railTitle, " ", messages.pins.railCountLabel(pinnedFeedbackItems.length), " (", overallProgress.percentage, "%)"] }), headerRight: _jsxs("span", { className: "flex items-center gap-[6px]", children: [_jsx(CircularProgress, { progress: overallProgress, size: 18, showPercentLabel: true }), _jsx("button", { type: "button", "data-fivepixels-interactive": "", onPointerDown: (event) => event.stopPropagation(), onClick: () => handleModeChange(mode === "minimized" ? "normal" : "minimized"), "aria-expanded": mode !== "minimized", "aria-label": mode === "minimized" ? messages.pins.railExpandAriaLabel : messages.pins.railCollapseAriaLabel, title: messages.pins.repositionTitle, className: "flex h-[22px] w-[22px] items-center justify-center rounded-[6px] text-[var(--adaptive-black500)] transition-colors hover:bg-[var(--adaptive-tintOpacity200)] hover:text-[var(--adaptive-black900)]", children: _jsx(ChevronDownIcon, { className: `h-[14px] w-[14px] transition-transform duration-200 ease-[cubic-bezier(0.22,1,0.36,1)] ${mode === "minimized" ? "" : "rotate-180"}` }) })] }), children: _jsx("div", { className: `flex flex-col gap-[10px] ${mode === "maximized" ? "h-full overflow-y-auto" : "max-h-[min(60vh,520px)] overflow-y-auto"}`, children: routeGroups.map((group) => (_jsx(PinnedRouteAccordion, { group: group, collapsed: collapsedRoutes.has(group.pathname), onToggle: () => {
|
|
120
|
+
setCollapsedRoutes((current) => {
|
|
121
|
+
const next = new Set(current);
|
|
122
|
+
if (next.has(group.pathname)) {
|
|
123
|
+
next.delete(group.pathname);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
next.add(group.pathname);
|
|
127
|
+
}
|
|
128
|
+
return next;
|
|
129
|
+
});
|
|
130
|
+
}, onOpen: handleOpen, onRemove: unpinFeedback }, group.pathname))) }) }));
|
|
111
131
|
}
|
|
112
132
|
//# sourceMappingURL=FloatingPinRail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingPinRail.js","sourceRoot":"","sources":["../../../src/components/overlay/FloatingPinRail.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FloatingPinRail.js","sourceRoot":"","sources":["../../../src/components/overlay/FloatingPinRail.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,EAA2B,MAAM,mCAAmC,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErG,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,6BAA6B,EAAmC,MAAM,kCAAkC,CAAC;AAElH,SAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,gBAAgB,GAAG,KAAK,EAAuF;IAC5J,MAAM,EAAE,QAAQ,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAC5C,MAAM,WAAW,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IACjD,MAAM,MAAM,GAAG,CAAC,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IACxC,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC;IAC3C,MAAM,MAAM,GAAG,aAAa,GAAG,CAAC,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,CAAC,CAAC,OAAO,EAAE,EAAE;wBAC3B,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;wBAE9B,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;4BAC3B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;wBAChC,CAAC;6BAAM,CAAC;4BACJ,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;wBAC7B,CAAC;wBAED,OAAO,IAAI,CAAC;oBAChB,CAAC,CAAC,CAAC;gBACP,CAAC,EACD,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,aAAa,IAjBlB,KAAK,CAAC,QAAQ,CAkBrB,CACL,CAAC,GACA,GACO,CACpB,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportControlPanel.d.ts","sourceRoot":"","sources":["../../../src/components/panel/ReportControlPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReportControlPanel.d.ts","sourceRoot":"","sources":["../../../src/components/panel/ReportControlPanel.tsx"],"names":[],"mappings":"AA0FA,wBAAgB,kBAAkB,gCAugBjC"}
|
|
@@ -4,7 +4,7 @@ import { panelAnchorSide, placementToCollapsedPanelStyle, usePanelDock } from ".
|
|
|
4
4
|
import { usePanelResize, panelSizeToStyle } from "../../hooks/usePanelResize.js";
|
|
5
5
|
import { usePanelFeedbackTransfer } from "../../hooks/usePanelFeedbackTransfer.js";
|
|
6
6
|
import { useReport } from "../../providers/reportContext.js";
|
|
7
|
-
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, EyeOpenIcon, LogoIcon, SelectIcon, SettingsIcon } from "../../components/icons/Icons.js";
|
|
7
|
+
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, DevicePreviewIcon, EyeOpenIcon, LogoIcon, SelectIcon, SettingsIcon, } from "../../components/icons/Icons.js";
|
|
8
8
|
import { IconTooltipButton } from "../../components/ui/IconTooltipButton.js";
|
|
9
9
|
import { HoverTooltip } from "../../components/ui/HoverTooltip.js";
|
|
10
10
|
import { PanelDockGuides } from "./PanelDockGuides.js";
|
|
@@ -34,6 +34,7 @@ import { PanelProjectFooter } from "./PanelProjectFooter.js";
|
|
|
34
34
|
import { createPersonalKeyBackupFilename, downloadPersonalKeyBackup } from "../../utils/feedback/feedbackDataTransfer.js";
|
|
35
35
|
import { getPanelTabDefinition } from "../../constants/panelTabRegistry.js";
|
|
36
36
|
import { MOTION, PANEL_TAB_FADE_MS, panelCollapseInClass } from "../../constants/motionClasses.js";
|
|
37
|
+
import { PANEL_LAYER_Z_INDEX } from "../../utils/overlay/floatingWindowStack.js";
|
|
37
38
|
function PanelCollapseTab({ collapsed, anchorSide, onClick, messages }) {
|
|
38
39
|
const hideIcon = anchorSide === "right" ? _jsx(ChevronRightIcon, { className: "h-4 w-4" }) : _jsx(ChevronLeftIcon, { className: "h-4 w-4" });
|
|
39
40
|
const expandIcon = anchorSide === "right" ? _jsx(ChevronLeftIcon, { className: "h-4 w-4" }) : _jsx(ChevronRightIcon, { className: "h-4 w-4" });
|
|
@@ -47,7 +48,7 @@ function PanelTabButton({ label, active, onClick }) {
|
|
|
47
48
|
return (_jsxs("button", { type: "button", onClick: onClick, className: `flex flex-1 items-center justify-center gap-[6px] px-[10px] py-[4px] hover:bg-[var(--adaptive-black200)] ${active ? "bg-[var(--adaptive-black50)]" : ""}`, children: [_jsx("p", { className: `${active ? "text-[var(--adaptive-black900)]" : "text-[var(--adaptive-black500)]"} font-[500] text-[14px]`, children: label }), _jsx(ChevronDownIcon, { className: `h-4 w-4 shrink-0 transition-transform ${active ? "rotate-180" : ""}` })] }));
|
|
48
49
|
}
|
|
49
50
|
export function ReportControlPanel() {
|
|
50
|
-
const { mode, roleStatItems, errorMessage, environment, projectId, appVersion, activeReplyReportId, showFeedbackList, visiblePanelTabs, isMobileViewport, panelTab, panelAppearance, setPanelAppearance, tooltipAppearance, setTooltipAppearance, questionThreadDisplay, setQuestionThreadDisplay, canTransferFeedback, personalKey, publicKey, panelView, messages, toggleReportMode, toggleIssueMode, openPanelTab, setErrorMessage, refetch, panelCollapsed, setPanelCollapsed, } = useReport();
|
|
51
|
+
const { mode, roleStatItems, errorMessage, environment, projectId, appVersion, activeReplyReportId, showFeedbackList, visiblePanelTabs, isMobileViewport, panelTab, panelAppearance, setPanelAppearance, tooltipAppearance, setTooltipAppearance, questionThreadDisplay, setQuestionThreadDisplay, canTransferFeedback, personalKey, publicKey, panelView, messages, toggleReportMode, toggleIssueMode, openPanelTab, setErrorMessage, refetch, panelCollapsed, setPanelCollapsed, devicePreviewUiOpen, setDevicePreviewUiOpen, } = useReport();
|
|
51
52
|
const [personalKeyStep, setPersonalKeyStep] = useState("none");
|
|
52
53
|
const [personalKeyNotice, setPersonalKeyNotice] = useState("");
|
|
53
54
|
const isRecording = mode === "report";
|
|
@@ -165,13 +166,13 @@ export function ReportControlPanel() {
|
|
|
165
166
|
const resolvedSizeStyle = panelExpanded ? panelSizeToStyle(panelSize, applyFixedHeight || isGateView) : undefined;
|
|
166
167
|
const panelSideControls = panelExpanded ? (_jsx("div", { className: "flex shrink-0 flex-col items-center border-l border-l-[var(--adaptive-border-subtle)] h-full", children: _jsx(PanelCollapseTab, { collapsed: panelCollapsed, anchorSide: anchorSide, onClick: handleTogglePanelCollapsed, messages: messages }) })) : null;
|
|
167
168
|
const gateBody = panelView === "onboarding" ? _jsx(PanelOnboarding, {}) : panelView === "setup-complete" || panelView === "key-issue" ? _jsx(PanelKeyGate, { mode: panelView }) : null;
|
|
168
|
-
return (_jsxs(_Fragment, { children: [_jsx(PanelDockGuides, { visible: isDragging, activeCorner: activeCorner }), isResizing ? (_jsx(CornerResizeGhost, { ghostRef: ghostRef, zIndexClassName: "z-[
|
|
169
|
-
? "min-h-[40px] bg-[var(--adaptive-neutralTintOpacity900)] backdrop-blur-[10px] rounded-[16px] shadow-[
|
|
169
|
+
return (_jsxs(_Fragment, { children: [_jsx(PanelDockGuides, { visible: isDragging, activeCorner: activeCorner }), isResizing ? (_jsx(CornerResizeGhost, { ghostRef: ghostRef, zIndexClassName: "z-[1001001]" })) : null, _jsxs("div", { ref: panelRef, "data-fp-chrome": "panel", "data-collapsed": panelCollapsed && !isRecording ? "true" : "false", "data-dragging": isDragging ? "true" : "false", "data-anchor-side": anchorSide, onDragEnter: isGateView ? undefined : handleDragEnter, onDragLeave: isGateView ? undefined : handleDragLeave, onDragOver: isGateView ? undefined : handleDragOver, onDrop: isGateView ? undefined : handleDrop, className: `pointer-events-auto border border-[var(--adaptive-border-subtle)] flex ${MOTION.panelEnter} ${MOTION.panelDock} ${isDragging ? MOTION.panelDockDragging : ""} ${isRecording
|
|
170
|
+
? "min-h-[40px] bg-[var(--adaptive-neutralTintOpacity900)] backdrop-blur-[10px] rounded-[16px] shadow-[var(--adaptive-popup-shadow)]"
|
|
170
171
|
: panelCollapsed
|
|
171
172
|
? ""
|
|
172
|
-
: "relative bg-[var(--adaptive-neutralTintOpacity900)] backdrop-blur-[10px] rounded-[16px] shadow-[
|
|
173
|
+
: "relative bg-[var(--adaptive-neutralTintOpacity900)] backdrop-blur-[10px] rounded-[16px] shadow-[var(--adaptive-popup-shadow)]"}`, style: { ...resolvedPanelStyle, ...resolvedSizeStyle, zIndex: PANEL_LAYER_Z_INDEX }, children: [panelExpanded ? (_jsx(CornerResizeHandle, { corner: resizeCorner, ariaLabel: messages.panel.resizeAriaLabel, inactive: isDragging, onPointerDown: handleResizePointerDown })) : null, _jsxs("div", { className: `${shellMotionClass} ${panelCollapsed && !isRecording ? "flex shrink-0" : `flex w-full min-w-0 flex-col ${applyFixedHeight || isGateView ? "h-full min-h-0" : ""}`}`.trim(), children: [panelCollapsed && !isRecording ? null : _jsx(PanelStatusBannerStack, {}), isRecording ? (_jsxs("section", { className: "flex items-center justify-between gap-[16px] px-[12px] py-[8px]", children: [_jsx("section", { className: "flex items-center gap-[4px] justify-start shrink-0", children: _jsx(LogoIcon, { className: "w-[94px]" }) }), _jsx("button", { type: "button", onClick: toggleReportMode, className: "flex items-center shrink-0 bg-[#F6572E] p-[4px_8px] rounded-[6px]", children: _jsx("p", { className: "text-[14px] font-bold text-[var(--adaptive-black50)]", children: messages.panel.stopFeedback }) })] })) : panelCollapsed ? (_jsx(PanelCollapseTab, { collapsed: panelCollapsed, anchorSide: anchorSide, onClick: handleTogglePanelCollapsed, messages: messages })) : isGateView ? (_jsxs("section", { className: "relative flex h-full min-h-0 flex-1 flex-col", children: [_jsxs("section", { className: "flex shrink-0", children: [anchorSide === "left" ? panelSideControls : null, _jsx("div", { className: "flex flex-1 flex-col", children: _jsx("section", { className: "flex items-center justify-between gap-[8px] cursor-move border-b border-b-[var(--adaptive-border-subtle)] p-[4px_12px]", onPointerDown: handleDragHandlePointerDown, children: _jsx(LogoIcon, { className: "w-[94px] shrink-0" }) }) }), anchorSide === "right" ? panelSideControls : null] }), _jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto", children: gateBody })] })) : (_jsx(_Fragment, { children: _jsxs("section", { className: `relative flex min-w-0 flex-col ${applyFixedHeight ? "h-full min-h-0 flex-1" : "shrink-0"}`, children: [isDragOver ? (_jsx("div", { className: "pointer-events-none absolute inset-0 z-[30] flex items-center justify-center rounded-[12px] bg-[#dbeafe]/90 px-[16px] text-center backdrop-blur-[2px]", children: _jsx("p", { className: "text-[14px] font-bold text-[var(--adaptive-blue500)]", children: messages.panel.importDragOverlay }) })) : null, _jsxs("section", { className: "flex shrink-0", children: [anchorSide === "left" ? panelSideControls : null, _jsxs("div", { className: "flex flex-1 flex-col", children: [_jsxs("section", {
|
|
173
174
|
// className="flex items-center justify-between gap-[8px] cursor-move border-b border-b-[var(--adaptive-border-subtle)] p-[4px_12px]"
|
|
174
|
-
className: "flex items-center justify-between gap-[8px] cursor-move border-b border-b-[var(--adaptive-border-subtle)]", onPointerDown: handleDragHandlePointerDown, children: [_jsx("section", { className: "flex min-w-0 items-center gap-[4px] py-[4px] pl-[12px]", children: _jsx(LogoIcon, { className: "w-[94px] shrink-0" }) }), _jsxs("section", { className: "flex shrink-0 items-center h-full", children: [_jsx(PanelPresentationSwitch, {}), _jsx(IconTooltipButton, { label: messages.panel.viewFeedbacks, active: isIssueMode, onClick: toggleIssueMode, children: _jsx(EyeOpenIcon, { className: "h-[16px] w-[16px]" }) }), _jsx(PanelAutoRefreshControl, {}), _jsx(IconTooltipButton, { label: messages.panel.tabSettings, active: panelTab === "settings" || panelTab === "command", onClick: () => handlePanelTabClick("settings"), children: _jsx(SettingsIcon, { className: "h-[16px] w-[16px]" }) })] })] }), _jsxs("section", { className: "flex items-center h-full", children: [_jsx("button", { type: "button", onClick: toggleReportMode, className: "flex flex-col shrink-0 justify-center items-center gap-[4px] p-[0_16px] border-r border-r-[var(--adaptive-border-subtle)] h-full hover:bg-[#f6572d]", children: _jsx(SelectIcon, { className: "w-[24px]" }) }), _jsxs("section", { className: "flex flex-col min-w-0 flex-1 px-[16px] py-[8px] gap-[4px]", "aria-label": messages.panel.repositionAriaLabel, title: messages.panel.repositionTitle, style: isDragging ? { opacity: 0.8 } : undefined, children: [_jsx("p", { className: "text-[12px] text-[var(--adaptive-black500)] font-bold", children: "\uB0B4 \uBAA8\uB4E0 \uD65C\uB3D9" }), _jsx("section", { className: "flex", children: roleStatItems.map((item) => item.kind === "cta" ? (_jsx("p", { className: "flex-1 self-center text-[12px] font-medium text-[var(--adaptive-black600)]", children: item.display }, item.key)) : (_jsxs("section", { className: "flex items-start gap-[4px] flex-1", children: [_jsx("p", { className: "text-[14px] text-[var(--adaptive-black500)]", children: item.label }), _jsxs("p", { className: "text-[14px] font-semibold text-[var(--adaptive-black900)]", children: [item.display, "\uAC1C"] })] }, item.key))) })] })] })] }), anchorSide === "right" ? panelSideControls : null] }), _jsx("section", { className: "flex shrink-0 items-stretch border-t border-[var(--adaptive-border-subtle)]", children: _jsx("div", { className: "flex min-w-0 flex-1 overflow-hidden border-b border-b-[var(--adaptive-border-subtle)]", children: visiblePanelTabs.map((tabId, index) => (_jsxs("div", { className: "contents", children: [index > 0 ? _jsx("div", { className: "h-full w-[1px] bg-[var(--adaptive-border-subtle)]" }) : null, _jsx(PanelTabButton, { label: messages.panel[getPanelTabDefinition(tabId).labelKey], active: panelTab === tabId, onClick: () => handlePanelTabClick(tabId) })] }, tabId))) }) }), errorMessage && importStep === "none" && commandStep === "none" && !activeReplyReportId ? (_jsx("p", { className: `px-[8px] text-[12px] text-rose-700 ${MOTION.noticeIn}`, children: errorMessage })) : null, personalKeyNotice ? _jsx("p", { className: `px-[8px] py-[4px] text-[12px] text-[var(--adaptive-green500)] ${MOTION.noticeIn}`, children: personalKeyNotice }) : null, personalKeyStep !== "none" ? (_jsx(ReportPersonalKeyDialog, { mode: personalKeyStep, onCancel: () => setPersonalKeyStep("none"), onComplete: (message) => {
|
|
175
|
+
className: "flex items-center justify-between gap-[8px] cursor-move border-b border-b-[var(--adaptive-border-subtle)]", onPointerDown: handleDragHandlePointerDown, children: [_jsx("section", { className: "flex min-w-0 items-center gap-[4px] py-[4px] pl-[12px]", children: _jsx(LogoIcon, { className: "w-[94px] shrink-0" }) }), _jsxs("section", { className: "flex shrink-0 items-center h-full", children: [_jsx(PanelPresentationSwitch, {}), _jsx(IconTooltipButton, { label: messages.panel.viewFeedbacks, active: isIssueMode, onClick: toggleIssueMode, children: _jsx(EyeOpenIcon, { className: "h-[16px] w-[16px]" }) }), _jsx(IconTooltipButton, { label: messages.panel.devicePreview, active: devicePreviewUiOpen, onClick: () => setDevicePreviewUiOpen(!devicePreviewUiOpen), children: _jsx(DevicePreviewIcon, { className: "h-[16px] w-[16px]" }) }), _jsx(PanelAutoRefreshControl, {}), _jsx(IconTooltipButton, { label: messages.panel.tabSettings, active: panelTab === "settings" || panelTab === "command", onClick: () => handlePanelTabClick("settings"), children: _jsx(SettingsIcon, { className: "h-[16px] w-[16px]" }) })] })] }), _jsxs("section", { className: "flex items-center h-full", children: [_jsx("button", { type: "button", onClick: toggleReportMode, className: "flex flex-col shrink-0 justify-center items-center gap-[4px] p-[0_16px] border-r border-r-[var(--adaptive-border-subtle)] h-full hover:bg-[#f6572d]", children: _jsx(SelectIcon, { className: "w-[24px]" }) }), _jsxs("section", { className: "flex flex-col min-w-0 flex-1 px-[16px] py-[8px] gap-[4px]", "aria-label": messages.panel.repositionAriaLabel, title: messages.panel.repositionTitle, style: isDragging ? { opacity: 0.8 } : undefined, children: [_jsx("p", { className: "text-[12px] text-[var(--adaptive-black500)] font-bold", children: "\uB0B4 \uBAA8\uB4E0 \uD65C\uB3D9" }), _jsx("section", { className: "flex", children: roleStatItems.map((item) => item.kind === "cta" ? (_jsx("p", { className: "flex-1 self-center text-[12px] font-medium text-[var(--adaptive-black600)]", children: item.display }, item.key)) : (_jsxs("section", { className: "flex items-start gap-[4px] flex-1", children: [_jsx("p", { className: "text-[14px] text-[var(--adaptive-black500)]", children: item.label }), _jsxs("p", { className: "text-[14px] font-semibold text-[var(--adaptive-black900)]", children: [item.display, "\uAC1C"] })] }, item.key))) })] })] })] }), anchorSide === "right" ? panelSideControls : null] }), _jsx("section", { className: "flex shrink-0 items-stretch border-t border-[var(--adaptive-border-subtle)]", children: _jsx("div", { className: "flex min-w-0 flex-1 overflow-hidden border-b border-b-[var(--adaptive-border-subtle)]", children: visiblePanelTabs.map((tabId, index) => (_jsxs("div", { className: "contents", children: [index > 0 ? _jsx("div", { className: "h-full w-[1px] bg-[var(--adaptive-border-subtle)]" }) : null, _jsx(PanelTabButton, { label: messages.panel[getPanelTabDefinition(tabId).labelKey], active: panelTab === tabId, onClick: () => handlePanelTabClick(tabId) })] }, tabId))) }) }), errorMessage && importStep === "none" && commandStep === "none" && !activeReplyReportId ? (_jsx("p", { className: `px-[8px] text-[12px] text-rose-700 ${MOTION.noticeIn}`, children: errorMessage })) : null, personalKeyNotice ? _jsx("p", { className: `px-[8px] py-[4px] text-[12px] text-[var(--adaptive-green500)] ${MOTION.noticeIn}`, children: personalKeyNotice }) : null, personalKeyStep !== "none" ? (_jsx(ReportPersonalKeyDialog, { mode: personalKeyStep, onCancel: () => setPersonalKeyStep("none"), onComplete: (message) => {
|
|
175
176
|
setPersonalKeyNotice(message);
|
|
176
177
|
setPersonalKeyStep("none");
|
|
177
178
|
} })) : null, personalKeyStep === "none" && importStep === "project-mismatch" && pendingImport ? (_jsx(ReportImportProjectMismatchDialog, { currentProject: transferScope, importedProject: pendingImport.project, exportedAt: pendingImport.exportedAt, onProceed: handleProceedImportAfterMismatch, onCancel: handleCancelImport })) : null, personalKeyStep === "none" && importStep === "confirm" && pendingImport ? (_jsx(ReportImportConfirmDialog, { onApply: handleApplyImport, onCancel: handleCancelImport, onBackupAndApply: handleBackupAndApplyImport })) : null, tabShellMounted ? (_jsx("div", { className: `${MOTION.panelTabShell} ${applyFixedHeight ? "min-h-0 flex-1" : ""}`, "data-open": tabShellOpen ? "true" : "false", children: _jsx("div", { className: MOTION.panelTabShellInner, children: _jsxs("div", { className: applyFixedHeight ? "flex min-h-0 flex-1 flex-col overflow-hidden" : "flex flex-col", children: [renderedTab === "overview" && commandStep === "none" ? _jsx(ReportOverview, {}) : null, renderedTab === "route-details" && commandStep === "none" ? _jsx(ReportRouteDetails, {}) : null, renderedTab === "feedback-list" && showFeedbackList && commandStep === "none" ? _jsx(ReportFeedbackList, {}) : null, renderedTab === "diagnostics" && commandStep === "none" ? _jsx(ReportAuthDiagnostics, {}) : null, renderedTab === "my-tasks" && commandStep === "none" ? _jsx(ReportMyTasksPanel, {}) : null, renderedTab === "page-brief" && commandStep === "none" ? _jsx(ReportPageBriefPanel, {}) : null, renderedTab === "needs-attention" && commandStep === "none" ? _jsx(ReportNeedsAttentionPanel, {}) : null, renderedTab === "project-health" && commandStep === "none" ? _jsx(ReportProjectHealthPanel, {}) : null, renderedTab === "today-digest" && commandStep === "none" ? _jsx(ReportTodayDigestPanel, {}) : null, renderedTab === "settings" && commandStep === "none" ? (_jsx(PanelSettings, { transferDisabled: !canTransferFeedback, panelAppearance: panelAppearance, onPanelAppearanceChange: setPanelAppearance, tooltipAppearance: tooltipAppearance, onTooltipAppearanceChange: setTooltipAppearance, questionThreadDisplay: questionThreadDisplay, onQuestionThreadDisplayChange: setQuestionThreadDisplay, onExport: handleExport, onImport: handleImportFromMenu, onCommand: handleOpenCommand, hasPersonalKey: Boolean(personalKey), onKeyCopy: () => void handleKeyCopy(), onPublicKeyCopy: () => void handlePublicKeyCopy(), onKeyInsert: () => {
|