@lokvis/ui-react 0.2.1 → 0.4.1
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/components/AssetPanel.d.ts.map +1 -1
- package/dist/components/AssetPanel.js +18 -62
- package/dist/components/AssetPanel.js.map +1 -1
- package/dist/components/Canvas.d.ts +4 -4
- package/dist/components/Canvas.d.ts.map +1 -1
- package/dist/components/Canvas.js +9 -9
- package/dist/components/Canvas.js.map +1 -1
- package/dist/components/CommandPalette.d.ts +7 -7
- package/dist/components/CommandPalette.d.ts.map +1 -1
- package/dist/components/CommandPalette.js +10 -10
- package/dist/components/CommandPalette.js.map +1 -1
- package/dist/components/CompareSlider.d.ts +9 -8
- package/dist/components/CompareSlider.d.ts.map +1 -1
- package/dist/components/CompareSlider.js +10 -9
- package/dist/components/CompareSlider.js.map +1 -1
- package/dist/components/DownloadPanel.d.ts +3 -3
- package/dist/components/DownloadPanel.d.ts.map +1 -1
- package/dist/components/DownloadPanel.js +10 -17
- package/dist/components/DownloadPanel.js.map +1 -1
- package/dist/components/ErrorBanner.d.ts +2 -2
- package/dist/components/ErrorBanner.d.ts.map +1 -1
- package/dist/components/ErrorBanner.js +3 -3
- package/dist/components/ErrorBanner.js.map +1 -1
- package/dist/components/ErrorBoundary.d.ts +40 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.js +52 -0
- package/dist/components/ErrorBoundary.js.map +1 -0
- package/dist/components/ExifPanel.d.ts +1 -1
- package/dist/components/ExifPanel.d.ts.map +1 -1
- package/dist/components/ExifPanel.js +2 -2
- package/dist/components/ExifPanel.js.map +1 -1
- package/dist/components/GlobalDropzone.d.ts +5 -5
- package/dist/components/GlobalDropzone.d.ts.map +1 -1
- package/dist/components/GlobalDropzone.js +15 -8
- package/dist/components/GlobalDropzone.js.map +1 -1
- package/dist/components/HistoryPanel.d.ts +2 -2
- package/dist/components/HistoryPanel.d.ts.map +1 -1
- package/dist/components/HistoryPanel.js +23 -23
- package/dist/components/HistoryPanel.js.map +1 -1
- package/dist/components/Inspector.d.ts.map +1 -1
- package/dist/components/Inspector.js +13 -10
- package/dist/components/Inspector.js.map +1 -1
- package/dist/components/ParamForm.d.ts.map +1 -1
- package/dist/components/ParamForm.js +10 -7
- package/dist/components/ParamForm.js.map +1 -1
- package/dist/components/PipelineBar.d.ts.map +1 -1
- package/dist/components/PipelineBar.js +19 -28
- package/dist/components/PipelineBar.js.map +1 -1
- package/dist/components/ProgressBar.d.ts +4 -4
- package/dist/components/ProgressBar.d.ts.map +1 -1
- package/dist/components/ProgressBar.js +8 -8
- package/dist/components/ProgressBar.js.map +1 -1
- package/dist/components/StatusBar.d.ts +3 -3
- package/dist/components/StatusBar.d.ts.map +1 -1
- package/dist/components/StatusBar.js +12 -21
- package/dist/components/StatusBar.js.map +1 -1
- package/dist/components/StatusDot.d.ts +12 -0
- package/dist/components/StatusDot.d.ts.map +1 -0
- package/dist/components/StatusDot.js +15 -0
- package/dist/components/StatusDot.js.map +1 -0
- package/dist/components/ThemeToggle.d.ts +4 -4
- package/dist/components/ThemeToggle.d.ts.map +1 -1
- package/dist/components/ThemeToggle.js +7 -7
- package/dist/components/ThemeToggle.js.map +1 -1
- package/dist/components/ToolRunner.d.ts +53 -0
- package/dist/components/ToolRunner.d.ts.map +1 -0
- package/dist/components/ToolRunner.js +142 -0
- package/dist/components/ToolRunner.js.map +1 -0
- package/dist/components/Toolbar.d.ts.map +1 -1
- package/dist/components/Toolbar.js +3 -3
- package/dist/components/Toolbar.js.map +1 -1
- package/dist/components/WorkflowEditor.d.ts +6 -6
- package/dist/components/WorkflowEditor.d.ts.map +1 -1
- package/dist/components/WorkflowEditor.js +40 -49
- package/dist/components/WorkflowEditor.js.map +1 -1
- package/dist/components/WorkflowTemplates.d.ts +2 -2
- package/dist/components/WorkflowTemplates.d.ts.map +1 -1
- package/dist/components/WorkflowTemplates.js +17 -7
- package/dist/components/WorkflowTemplates.js.map +1 -1
- package/dist/components/Workspace.d.ts +45 -23
- package/dist/components/Workspace.d.ts.map +1 -1
- package/dist/components/Workspace.js +87 -40
- package/dist/components/Workspace.js.map +1 -1
- package/dist/hooks/useCustomPresets.d.ts +98 -0
- package/dist/hooks/useCustomPresets.d.ts.map +1 -0
- package/dist/hooks/useCustomPresets.js +210 -0
- package/dist/hooks/useCustomPresets.js.map +1 -0
- package/dist/hooks/useLokvis.d.ts +19 -1
- package/dist/hooks/useLokvis.d.ts.map +1 -1
- package/dist/hooks/useLokvis.js +30 -9
- package/dist/hooks/useLokvis.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/store/assets-slice.d.ts +8 -1
- package/dist/store/assets-slice.d.ts.map +1 -1
- package/dist/store/assets-slice.js +101 -54
- package/dist/store/assets-slice.js.map +1 -1
- package/dist/store/capabilities-slice.d.ts +1 -1
- package/dist/store/capabilities-slice.d.ts.map +1 -1
- package/dist/store/capabilities-slice.js +8 -1
- package/dist/store/capabilities-slice.js.map +1 -1
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +1 -1
- package/dist/store/index.js.map +1 -1
- package/dist/store/runtime-slice.d.ts.map +1 -1
- package/dist/store/runtime-slice.js +22 -16
- package/dist/store/runtime-slice.js.map +1 -1
- package/dist/store/subscribe-utils.d.ts +45 -0
- package/dist/store/subscribe-utils.d.ts.map +1 -0
- package/dist/store/subscribe-utils.js +69 -0
- package/dist/store/subscribe-utils.js.map +1 -0
- package/dist/store/types.d.ts +19 -11
- package/dist/store/types.d.ts.map +1 -1
- package/dist/store/types.js +0 -10
- package/dist/store/types.js.map +1 -1
- package/dist/store/workflow-slice.d.ts +1 -1
- package/dist/store/workflow-slice.d.ts.map +1 -1
- package/dist/store/workflow-slice.js +19 -51
- package/dist/store/workflow-slice.js.map +1 -1
- package/dist/utils.d.ts +24 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +31 -0
- package/dist/utils.js.map +1 -0
- package/package.json +7 -6
- package/src/components/AssetPanel.tsx +224 -264
- package/src/components/Canvas.tsx +178 -174
- package/src/components/CommandPalette.tsx +242 -242
- package/src/components/CompareSlider.tsx +168 -165
- package/src/components/DownloadPanel.tsx +201 -207
- package/src/components/ErrorBanner.tsx +64 -64
- package/src/components/ErrorBoundary.tsx +101 -0
- package/src/components/ExifPanel.tsx +154 -154
- package/src/components/GlobalDropzone.tsx +175 -170
- package/src/components/HistoryPanel.tsx +219 -219
- package/src/components/Inspector.tsx +145 -137
- package/src/components/ParamForm.tsx +140 -137
- package/src/components/PipelineBar.tsx +97 -104
- package/src/components/ProgressBar.tsx +78 -78
- package/src/components/StatusBar.tsx +145 -152
- package/src/components/StatusDot.tsx +27 -0
- package/src/components/ThemeToggle.tsx +98 -98
- package/src/components/ToolRunner.tsx +352 -0
- package/src/components/Toolbar.tsx +65 -65
- package/src/components/WorkflowEditor.tsx +333 -326
- package/src/components/WorkflowTemplates.tsx +101 -78
- package/src/components/Workspace.tsx +310 -223
- package/src/css-modules.d.ts +3 -0
- package/src/hooks/useCustomPresets.ts +284 -0
- package/src/hooks/useLokvis.ts +43 -10
- package/src/index.ts +7 -0
- package/src/store/assets-slice.ts +106 -52
- package/src/store/capabilities-slice.ts +10 -2
- package/src/store/index.ts +1 -1
- package/src/store/runtime-slice.ts +20 -15
- package/src/store/subscribe-utils.ts +82 -0
- package/src/store/types.ts +19 -12
- package/src/store/workflow-slice.ts +19 -53
- package/src/utils.ts +41 -0
- package/dist/store.d.ts +0 -76
- package/dist/store.d.ts.map +0 -1
- package/dist/store.js +0 -217
- package/dist/store.js.map +0 -1
|
@@ -5,17 +5,18 @@
|
|
|
5
5
|
* before / after 两张图。用于直观展示工作流处理效果。
|
|
6
6
|
*
|
|
7
7
|
* 交互:
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* - 鼠标拖拽分隔条(或点击容器任意位置)调整揭示比例
|
|
9
|
+
* - 触摸:touchmove 同步
|
|
10
|
+
* - 键盘:← → 调整 5% 步长(聚焦分隔条时)
|
|
11
11
|
*
|
|
12
12
|
* 数据来源:
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* - before: `store.selectedAssetId` 对应的 thumbnails(由 store.ensureThumbnails 生成)
|
|
14
|
+
* - after: `store.selectedOutputId` 对应的 thumbnails
|
|
15
|
+
* - 任一缺失则不渲染(返回 null)
|
|
16
16
|
*
|
|
17
|
-
* 注:本组件只负责"展示对比",不负责生成缩略图。缩略图由
|
|
18
|
-
*
|
|
17
|
+
* 注:本组件只负责"展示对比",不负责生成缩略图。缩略图由 store.ensureThumbnails
|
|
18
|
+
* 统一生成(TD-5.1:创建/替换/释放在 store 内闭环)并存入 store.thumbnails,
|
|
19
|
+
* 本组件按 assetId 取用。
|
|
19
20
|
*/
|
|
20
21
|
|
|
21
22
|
import * as React from 'react';
|
|
@@ -23,164 +24,166 @@ import { Icon } from '@lokvis/ui-core';
|
|
|
23
24
|
import { useWorkspaceStore } from '../store/index.js';
|
|
24
25
|
|
|
25
26
|
export interface CompareSliderProps {
|
|
26
|
-
|
|
27
|
+
className?: string;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export function CompareSlider({ className = '' }: CompareSliderProps) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
31
|
+
const assets = useWorkspaceStore((s) => s.assets);
|
|
32
|
+
const thumbnails = useWorkspaceStore((s) => s.thumbnails);
|
|
33
|
+
const selectedAssetId = useWorkspaceStore((s) => s.selectedAssetId);
|
|
34
|
+
const selectedOutputId = useWorkspaceStore((s) => s.selectedOutputId);
|
|
35
|
+
const lastOutputIds = useWorkspaceStore((s) => s.lastOutputIds);
|
|
36
|
+
|
|
37
|
+
// before:用户选中的输入资产;after:用户选中的输出资产(默认第一个)
|
|
38
|
+
const beforeId = selectedAssetId;
|
|
39
|
+
const afterId = selectedOutputId ?? lastOutputIds[0] ?? null;
|
|
40
|
+
|
|
41
|
+
const beforeAsset = beforeId ? assets.find((a) => a.id === beforeId) : null;
|
|
42
|
+
const afterAsset = afterId ? assets.find((a) => a.id === afterId) : null;
|
|
43
|
+
const beforeUrl = beforeId ? thumbnails[beforeId] : undefined;
|
|
44
|
+
const afterUrl = afterId ? thumbnails[afterId] : undefined;
|
|
45
|
+
|
|
46
|
+
const containerRef = React.useRef<HTMLDivElement>(null);
|
|
47
|
+
const [pos, setPos] = React.useState(50); // 0-100,分隔条位置百分比
|
|
48
|
+
const [dragging, setDragging] = React.useState(false);
|
|
49
|
+
|
|
50
|
+
// 切换资产时重置位置到中央
|
|
51
|
+
React.useEffect(() => {
|
|
52
|
+
setPos(50);
|
|
53
|
+
}, [beforeId, afterId]);
|
|
54
|
+
|
|
55
|
+
const updatePos = React.useCallback((clientX: number) => {
|
|
56
|
+
const el = containerRef.current;
|
|
57
|
+
if (!el) return;
|
|
58
|
+
const rect = el.getBoundingClientRect();
|
|
59
|
+
const ratio = (clientX - rect.left) / rect.width;
|
|
60
|
+
setPos(Math.max(0, Math.min(100, ratio * 100)));
|
|
61
|
+
}, []);
|
|
62
|
+
|
|
63
|
+
// 鼠标拖拽
|
|
64
|
+
const handleMouseDown = (e: React.MouseEvent) => {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
setDragging(true);
|
|
67
|
+
updatePos(e.clientX);
|
|
68
|
+
};
|
|
69
|
+
React.useEffect(() => {
|
|
70
|
+
if (!dragging) return;
|
|
71
|
+
const onMove = (e: MouseEvent) => updatePos(e.clientX);
|
|
72
|
+
const onUp = () => setDragging(false);
|
|
73
|
+
document.addEventListener('mousemove', onMove);
|
|
74
|
+
document.addEventListener('mouseup', onUp);
|
|
75
|
+
return () => {
|
|
76
|
+
document.removeEventListener('mousemove', onMove);
|
|
77
|
+
document.removeEventListener('mouseup', onUp);
|
|
78
|
+
};
|
|
79
|
+
}, [dragging, updatePos]);
|
|
80
|
+
|
|
81
|
+
// 触摸拖拽
|
|
82
|
+
const handleTouchStart = (e: React.TouchEvent) => {
|
|
83
|
+
setDragging(true);
|
|
84
|
+
if (e.touches[0]) updatePos(e.touches[0].clientX);
|
|
85
|
+
};
|
|
86
|
+
React.useEffect(() => {
|
|
87
|
+
if (!dragging) return;
|
|
88
|
+
const onMove = (e: TouchEvent) => {
|
|
89
|
+
if (e.touches[0]) updatePos(e.touches[0].clientX);
|
|
90
|
+
};
|
|
91
|
+
const onEnd = () => setDragging(false);
|
|
92
|
+
document.addEventListener('touchmove', onMove, { passive: true });
|
|
93
|
+
document.addEventListener('touchend', onEnd);
|
|
94
|
+
return () => {
|
|
95
|
+
document.removeEventListener('touchmove', onMove);
|
|
96
|
+
document.removeEventListener('touchend', onEnd);
|
|
97
|
+
};
|
|
98
|
+
}, [dragging, updatePos]);
|
|
99
|
+
|
|
100
|
+
// 键盘:← → 调整 5%
|
|
101
|
+
const handleKeyDown = (e: React.KeyboardEvent) => {
|
|
102
|
+
if (e.key === 'ArrowLeft') {
|
|
103
|
+
e.preventDefault();
|
|
104
|
+
setPos((p) => Math.max(0, p - 5));
|
|
105
|
+
} else if (e.key === 'ArrowRight') {
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
setPos((p) => Math.min(100, p + 5));
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
if (!beforeUrl || !afterUrl) return null;
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<div
|
|
115
|
+
ref={containerRef}
|
|
116
|
+
role="group"
|
|
117
|
+
aria-label="前后对比滑块"
|
|
118
|
+
className={`relative select-none overflow-hidden rounded-lg ring-1 ring-[var(--lokvis-border)]/50 ${className}`}
|
|
119
|
+
onMouseDown={handleMouseDown}
|
|
120
|
+
onTouchStart={handleTouchStart}
|
|
121
|
+
>
|
|
122
|
+
{/* after 全图(底层)——决定容器尺寸 */}
|
|
123
|
+
<img
|
|
124
|
+
src={afterUrl}
|
|
125
|
+
alt="After"
|
|
126
|
+
draggable={false}
|
|
127
|
+
className="block max-h-full max-w-full object-contain pointer-events-none"
|
|
128
|
+
/>
|
|
129
|
+
|
|
130
|
+
{/* before 覆盖层:绝对定位同尺寸,用 clip-path 从右侧裁剪到 pos%
|
|
131
|
+
(避免读取 containerRef.current.clientWidth 这种"渲染期读 ref"反模式) */}
|
|
132
|
+
<div
|
|
133
|
+
className="absolute inset-0"
|
|
134
|
+
style={{ clipPath: `inset(0 ${100 - pos}% 0 0)` }}
|
|
135
|
+
>
|
|
136
|
+
<img
|
|
137
|
+
src={beforeUrl}
|
|
138
|
+
alt="Before"
|
|
139
|
+
draggable={false}
|
|
140
|
+
className="block max-h-full max-w-full object-contain pointer-events-none"
|
|
141
|
+
/>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
{/* before/after 标签 */}
|
|
145
|
+
<span className="absolute top-2 left-2 rounded bg-[var(--lokvis-scrim)] px-1.5 py-0.5 text-[10px] font-medium text-[var(--lokvis-primary-fg)]">
|
|
146
|
+
Before
|
|
147
|
+
</span>
|
|
148
|
+
<span className="absolute top-2 right-2 rounded bg-[var(--lokvis-scrim)] px-1.5 py-0.5 text-[10px] font-medium text-[var(--lokvis-primary-fg)]">
|
|
149
|
+
After
|
|
150
|
+
</span>
|
|
151
|
+
|
|
152
|
+
{/* 分隔条 */}
|
|
153
|
+
<div
|
|
154
|
+
className="absolute top-0 bottom-0 z-10 cursor-ew-resize"
|
|
155
|
+
style={{ left: `${pos}%`, transform: 'translateX(-50%)' }}
|
|
156
|
+
role="separator"
|
|
157
|
+
aria-valuenow={Math.round(pos)}
|
|
158
|
+
aria-valuemin={0}
|
|
159
|
+
aria-valuemax={100}
|
|
160
|
+
aria-label="Comparison slider position"
|
|
161
|
+
tabIndex={0}
|
|
162
|
+
onKeyDown={handleKeyDown}
|
|
163
|
+
>
|
|
164
|
+
<div className="absolute inset-y-0 left-1/2 w-0.5 -translate-x-1/2 bg-[var(--lokvis-surface)] shadow-[var(--lokvis-elevation-1)]" />
|
|
165
|
+
<div className="absolute top-1/2 left-1/2 flex h-8 w-8 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-[var(--lokvis-surface)] shadow-[var(--lokvis-elevation-2)] ring-1 ring-[var(--lokvis-border)]">
|
|
166
|
+
<Icon size={14} className="text-[var(--lokvis-fg-muted)]">
|
|
167
|
+
<path d="M9 5l-5 7 5 7M15 5l5 7-5 7" />
|
|
168
|
+
</Icon>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
{/* 元数据对比(底部叠加) */}
|
|
173
|
+
{(beforeAsset || afterAsset) && (
|
|
174
|
+
<div className="absolute bottom-2 inset-x-2 flex justify-between text-[10px] text-[var(--lokvis-primary-fg)]">
|
|
175
|
+
{beforeAsset?.metadata.dimensions && (
|
|
176
|
+
<span className="rounded bg-[var(--lokvis-scrim)] px-1.5 py-0.5">
|
|
177
|
+
{beforeAsset.metadata.dimensions.width}×{beforeAsset.metadata.dimensions.height}
|
|
178
|
+
</span>
|
|
179
|
+
)}
|
|
180
|
+
{afterAsset?.metadata.dimensions && (
|
|
181
|
+
<span className="rounded bg-[var(--lokvis-scrim)] px-1.5 py-0.5">
|
|
182
|
+
{afterAsset.metadata.dimensions.width}×{afterAsset.metadata.dimensions.height}
|
|
183
|
+
</span>
|
|
184
|
+
)}
|
|
185
|
+
</div>
|
|
186
|
+
)}
|
|
187
|
+
</div>
|
|
188
|
+
);
|
|
186
189
|
}
|