@vitavision/stage2d 0.11.0 → 0.13.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.
- package/README.md +3 -6
- package/dist/index.d.ts +806 -74
- package/dist/index.js +6669 -4568
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/AreaSet.tsx +87 -56
- package/src/components/ContourEditor.tsx +297 -39
- package/src/components/DatumEditor.tsx +261 -0
- package/src/components/DraftShape.tsx +56 -11
- package/src/components/EllipseSet.tsx +3 -3
- package/src/components/GridLayer.tsx +1 -2
- package/src/components/HeatmapLayer.tsx +1 -1
- package/src/components/MaskEditor.tsx +22 -9
- package/src/components/MeasureOverlay.tsx +320 -89
- package/src/components/PointSet.tsx +18 -10
- package/src/components/PolylineSet.tsx +81 -17
- package/src/components/RectRoiEditor.tsx +193 -88
- package/src/components/ShapeEditor.tsx +14 -4
- package/src/components/areaBatching.ts +111 -0
- package/src/components/contourArc.ts +268 -0
- package/src/components/datumEdit.ts +149 -0
- package/src/components/labelLod.ts +2 -3
- package/src/components/markerShapes.ts +1 -2
- package/src/components/measureGeometry.ts +34 -1
- package/src/components/measureHit.ts +371 -0
- package/src/components/overlayRole.ts +1 -1
- package/src/components/pointIndex.ts +2 -3
- package/src/components/polylineIndex.ts +3 -3
- package/src/components/shapeEdit.ts +38 -5
- package/src/components/stage/CompareLayer.tsx +228 -0
- package/src/components/stage/ImageLayer.tsx +56 -15
- package/src/components/stage/ImageStage.tsx +231 -128
- package/src/components/stage/StageSurface.tsx +44 -18
- package/src/components/stage/StageToolbar.tsx +26 -8
- package/src/components/stage/compareStyle.ts +155 -0
- package/src/components/stage/gesture.ts +5 -0
- package/src/components/stage/hitTest.ts +19 -0
- package/src/components/stage/useStageHitTest.ts +11 -0
- package/src/components/stage/view.ts +33 -6
- package/src/components/useShapeDrag.ts +2 -4
- package/src/index.ts +34 -2
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Two registered images of one size, compared in place: a checkerboard of the two, a wipe
|
|
3
|
+
* between them, or their difference.
|
|
4
|
+
*
|
|
5
|
+
* A stage layer like `ImageLayer`: both images are laid out at the stage's own pixel size, so
|
|
6
|
+
* they stay registered with each other and with every overlay at any zoom. All three modes are
|
|
7
|
+
* CSS on the second image (a mask, a clip, a blend), never a canvas, so nothing is read back or
|
|
8
|
+
* redrawn as the view moves.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { useState, type KeyboardEvent, type PointerEvent } from "react";
|
|
12
|
+
|
|
13
|
+
import { cn } from "@vitavision/ui";
|
|
14
|
+
import { visibleRect } from "../labelLod";
|
|
15
|
+
import { overlayRole } from "../overlayRole";
|
|
16
|
+
import { clampSplit, compareStyles, knobPosition, splitForKey, splitText, type CompareMode, type CompareOrientation } from "./compareStyle";
|
|
17
|
+
import { useStage } from "./ImageStage";
|
|
18
|
+
import { useStageDrag } from "./StageSurface";
|
|
19
|
+
import { useScreenPx } from "./useScreenPx";
|
|
20
|
+
import { PIXEL_CENTRE } from "./view";
|
|
21
|
+
|
|
22
|
+
/** Props of `CompareLayer`. */
|
|
23
|
+
export interface CompareLayerProps {
|
|
24
|
+
/** Image A's URL: the reference. It is the stage's size. */
|
|
25
|
+
a: string;
|
|
26
|
+
/** Image B's URL: compared with A. The same size as A. */
|
|
27
|
+
b: string;
|
|
28
|
+
/**
|
|
29
|
+
* How they are compared.
|
|
30
|
+
* - `checker`: alternate squares of A and B, `cell` image pixels across, A at the top-left.
|
|
31
|
+
* - `wipe`: A before the divider and B after it; drag the divider, or focus it and use the keys.
|
|
32
|
+
* - `difference`: the per-channel difference of the two, brightened by `gain`. Identical pixels
|
|
33
|
+
* are black. It is computed on the sRGB-encoded values the browser composites, not on linear
|
|
34
|
+
* light, so treat it as a picture of where the images differ, not as a measurement.
|
|
35
|
+
*/
|
|
36
|
+
mode: CompareMode;
|
|
37
|
+
/** The wipe's divider, as the fraction of the image before it (0 to 1), when the app controls it. */
|
|
38
|
+
split?: number | undefined;
|
|
39
|
+
/** The divider's starting place when the layer controls it. Defaults to 0.5. */
|
|
40
|
+
defaultSplit?: number | undefined;
|
|
41
|
+
/** Called as the divider is dragged or moved by a key, with the new fraction. */
|
|
42
|
+
onSplitChange?: ((split: number) => void) | undefined;
|
|
43
|
+
/** `vertical` (the default) puts A left of the divider; `horizontal` puts A above it. */
|
|
44
|
+
orientation?: CompareOrientation | undefined;
|
|
45
|
+
/** The checkerboard's square, in image pixels. Defaults to 32. */
|
|
46
|
+
cell?: number | undefined;
|
|
47
|
+
/** How much the difference is brightened: 1 shows it as it is, 4 makes a small one visible. Defaults to 1. */
|
|
48
|
+
gain?: number | undefined;
|
|
49
|
+
/** What the comparison shows, for assistive technology. */
|
|
50
|
+
alt: string;
|
|
51
|
+
/** The two images' names, for the divider's value and its tags. Defaults to `["A", "B"]`. */
|
|
52
|
+
labels?: readonly [string, string] | undefined;
|
|
53
|
+
/** The zoom (CSS pixels per image pixel) from which pixels are drawn as blocks. Defaults to 4. */
|
|
54
|
+
pixelatedAbove?: number | undefined;
|
|
55
|
+
/** Merged onto the layer's wrapper with `cn`. */
|
|
56
|
+
className?: string | undefined;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** The divider's line, its knob's radius and the band that grabs it, in screen pixels. */
|
|
60
|
+
const LINE_PX = 1.5;
|
|
61
|
+
const KNOB_PX = 8;
|
|
62
|
+
const GRAB_PX = 12;
|
|
63
|
+
/** The tags' size and their distance from the knob's centre, in screen pixels. */
|
|
64
|
+
const TAG_PX = 11;
|
|
65
|
+
const TAG_GAP_PX = 14;
|
|
66
|
+
|
|
67
|
+
const HALO = overlayRole("halo");
|
|
68
|
+
const DIVIDER = overlayRole("label");
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Two same-size images compared inside an `ImageStage`: as a checkerboard, a wipe or their
|
|
72
|
+
* difference (`mode`).
|
|
73
|
+
*
|
|
74
|
+
* - **Wipe.** The divider is a line one and a half screen pixels wide with a knob kept in the
|
|
75
|
+
* middle of the part of it on screen. Drag the line or the knob; the press is claimed, so the
|
|
76
|
+
* stage does not pan from it.
|
|
77
|
+
* - **Keyboard.** The knob is a slider (0 to 100, the share of A): arrow keys move it 1 % (10 %
|
|
78
|
+
* with Shift), Page Up and Page Down 10 %, Home and End to either edge. The keys do not reach
|
|
79
|
+
* the stage, so they do not pan it.
|
|
80
|
+
* - **Pixels.** Past `pixelatedAbove` both images are drawn as blocks, as `ImageLayer` does.
|
|
81
|
+
*
|
|
82
|
+
* The images are one picture to assistive technology (`role="img"`, named by `alt`); the knob is
|
|
83
|
+
* outside it, so it stays reachable. The wrapper carries `data-mode`, and `data-pixelated` while
|
|
84
|
+
* pixelated; the knob carries `data-dragging` during a drag.
|
|
85
|
+
*/
|
|
86
|
+
export function CompareLayer({
|
|
87
|
+
a,
|
|
88
|
+
b,
|
|
89
|
+
mode,
|
|
90
|
+
split,
|
|
91
|
+
defaultSplit = 0.5,
|
|
92
|
+
onSplitChange,
|
|
93
|
+
orientation = "vertical",
|
|
94
|
+
cell = 32,
|
|
95
|
+
gain = 1,
|
|
96
|
+
alt,
|
|
97
|
+
labels = ["A", "B"],
|
|
98
|
+
pixelatedAbove = 4,
|
|
99
|
+
className,
|
|
100
|
+
}: CompareLayerProps) {
|
|
101
|
+
const stage = useStage();
|
|
102
|
+
const px = useScreenPx();
|
|
103
|
+
const startDrag = useStageDrag();
|
|
104
|
+
const [ownSplit, setOwnSplit] = useState(() => clampSplit(defaultSplit));
|
|
105
|
+
const [dragging, setDragging] = useState(false);
|
|
106
|
+
const current = clampSplit(split ?? ownSplit);
|
|
107
|
+
|
|
108
|
+
const change = (next: number) => {
|
|
109
|
+
const clamped = clampSplit(next);
|
|
110
|
+
setOwnSplit(clamped);
|
|
111
|
+
onSplitChange?.(clamped);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const styles = compareStyles(mode, { split: current, orientation, cell, gain });
|
|
115
|
+
const pixelated = stage.view.scale >= pixelatedAbove;
|
|
116
|
+
const image = { width: stage.image.width, height: stage.image.height };
|
|
117
|
+
const imgClass = "pointer-events-none absolute inset-0 h-full w-full select-none";
|
|
118
|
+
const rendering = pixelated ? ("pixelated" as const) : undefined;
|
|
119
|
+
|
|
120
|
+
// The divider is drawn in the layer's own CSS pixels (0 at the image's left edge, not at its
|
|
121
|
+
// first pixel's centre), the frame `clip-path` and `visibleRect` work in.
|
|
122
|
+
const vertical = orientation === "vertical";
|
|
123
|
+
const length = vertical ? image.height : image.width;
|
|
124
|
+
const extent = vertical ? image.width : image.height;
|
|
125
|
+
const at = current * extent;
|
|
126
|
+
const visible = visibleRect(stage.view, stage.box);
|
|
127
|
+
const along = knobPosition(visible === null ? null : vertical ? [visible.y, visible.y + visible.height] : [visible.x, visible.x + visible.width], length);
|
|
128
|
+
const knob = vertical ? { x: at, y: along } : { x: along, y: at };
|
|
129
|
+
const line = vertical ? { x1: at, y1: 0, x2: at, y2: image.height } : { x1: 0, y1: at, x2: image.width, y2: at };
|
|
130
|
+
|
|
131
|
+
const grab = (event: PointerEvent<SVGElement>) => {
|
|
132
|
+
if (stage.panMode) return;
|
|
133
|
+
if (event.pointerType !== "touch" && event.button !== 0) return;
|
|
134
|
+
setDragging(true);
|
|
135
|
+
const follow = (p: { x: number; y: number }) => change(((vertical ? p.x : p.y) + PIXEL_CENTRE) / extent);
|
|
136
|
+
startDrag(event, {
|
|
137
|
+
claimsTouch: true,
|
|
138
|
+
onMove: follow,
|
|
139
|
+
onEnd: () => setDragging(false),
|
|
140
|
+
onCancel: () => setDragging(false),
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const onKeyDown = (event: KeyboardEvent<SVGElement>) => {
|
|
145
|
+
const next = splitForKey(current, event.key, event.shiftKey, orientation);
|
|
146
|
+
if (next === null) return;
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
event.stopPropagation();
|
|
149
|
+
change(next);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<div className={cn("pointer-events-none absolute inset-0", className)} data-mode={mode} data-pixelated={pixelated ? "" : undefined}>
|
|
154
|
+
<div role="img" aria-label={alt} className="absolute inset-0" style={styles.wrapper}>
|
|
155
|
+
<img src={a} alt="" draggable={false} data-image="a" className={imgClass} style={{ imageRendering: rendering }} />
|
|
156
|
+
<img src={b} alt="" draggable={false} data-image="b" className={imgClass} style={{ ...styles.b, imageRendering: rendering }} />
|
|
157
|
+
</div>
|
|
158
|
+
{mode === "wipe" && (
|
|
159
|
+
<svg viewBox={`0 0 ${image.width} ${image.height}`} className="absolute inset-0 h-full w-full overflow-visible" data-divider="">
|
|
160
|
+
<line {...line} stroke={HALO} strokeWidth={px(LINE_PX + 2)} />
|
|
161
|
+
<line {...line} stroke={DIVIDER} strokeWidth={px(LINE_PX)} />
|
|
162
|
+
<line
|
|
163
|
+
{...line}
|
|
164
|
+
data-divider-band=""
|
|
165
|
+
stroke="transparent"
|
|
166
|
+
strokeWidth={px(GRAB_PX)}
|
|
167
|
+
className="pointer-events-auto"
|
|
168
|
+
style={{ pointerEvents: "stroke", cursor: vertical ? "ew-resize" : "ns-resize" }}
|
|
169
|
+
aria-hidden
|
|
170
|
+
onPointerDown={grab}
|
|
171
|
+
/>
|
|
172
|
+
<circle
|
|
173
|
+
cx={knob.x}
|
|
174
|
+
cy={knob.y}
|
|
175
|
+
r={px(KNOB_PX)}
|
|
176
|
+
fill={DIVIDER}
|
|
177
|
+
stroke={HALO}
|
|
178
|
+
strokeWidth={px(1.5)}
|
|
179
|
+
role="slider"
|
|
180
|
+
tabIndex={0}
|
|
181
|
+
aria-label={`Split between ${labels[0]} and ${labels[1]}`}
|
|
182
|
+
aria-orientation={vertical ? "horizontal" : "vertical"}
|
|
183
|
+
aria-valuemin={0}
|
|
184
|
+
aria-valuemax={100}
|
|
185
|
+
aria-valuenow={Math.round(current * 100)}
|
|
186
|
+
aria-valuetext={splitText(current, labels[0])}
|
|
187
|
+
data-dragging={dragging ? "" : undefined}
|
|
188
|
+
className="pointer-events-auto outline-none focus-visible:stroke-signal"
|
|
189
|
+
style={{ cursor: vertical ? "ew-resize" : "ns-resize" }}
|
|
190
|
+
onPointerDown={grab}
|
|
191
|
+
onKeyDown={onKeyDown}
|
|
192
|
+
/>
|
|
193
|
+
{/* Which image is on which side, beside the knob. */}
|
|
194
|
+
<g
|
|
195
|
+
aria-hidden
|
|
196
|
+
fontSize={px(TAG_PX)}
|
|
197
|
+
className="font-mono select-none"
|
|
198
|
+
fill={DIVIDER}
|
|
199
|
+
stroke={HALO}
|
|
200
|
+
strokeWidth={px(3)}
|
|
201
|
+
strokeLinejoin="round"
|
|
202
|
+
paintOrder="stroke"
|
|
203
|
+
>
|
|
204
|
+
{vertical ? (
|
|
205
|
+
<>
|
|
206
|
+
<text data-tag="a" x={knob.x - px(TAG_GAP_PX)} y={knob.y} textAnchor="end" dominantBaseline="central">
|
|
207
|
+
{labels[0]}
|
|
208
|
+
</text>
|
|
209
|
+
<text data-tag="b" x={knob.x + px(TAG_GAP_PX)} y={knob.y} textAnchor="start" dominantBaseline="central">
|
|
210
|
+
{labels[1]}
|
|
211
|
+
</text>
|
|
212
|
+
</>
|
|
213
|
+
) : (
|
|
214
|
+
<>
|
|
215
|
+
<text data-tag="a" x={knob.x} y={knob.y - px(TAG_GAP_PX)} textAnchor="middle" dominantBaseline="text-after-edge">
|
|
216
|
+
{labels[0]}
|
|
217
|
+
</text>
|
|
218
|
+
<text data-tag="b" x={knob.x} y={knob.y + px(TAG_GAP_PX)} textAnchor="middle" dominantBaseline="text-before-edge">
|
|
219
|
+
{labels[1]}
|
|
220
|
+
</text>
|
|
221
|
+
</>
|
|
222
|
+
)}
|
|
223
|
+
</g>
|
|
224
|
+
</svg>
|
|
225
|
+
)}
|
|
226
|
+
</div>
|
|
227
|
+
);
|
|
228
|
+
}
|
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
* until it would be magnified — until the screen shows more pixels than it has. Past that
|
|
11
11
|
* point the full image is requested, and it stays once loaded, so zooming back out does
|
|
12
12
|
* not swap back. The preview stays underneath while the full image loads, so the frame
|
|
13
|
-
* never goes blank.
|
|
13
|
+
* never goes blank. When the full image is costly to produce, the app can leave its URL
|
|
14
|
+
* out and supply it when `onFullNeeded` says the same rule has tripped.
|
|
14
15
|
* - **Pixelated past a zoom.** Above about 4× the browser's smoothing paints detail the
|
|
15
16
|
* sensor never recorded; on a metrology bench the sensor's own samples are what is worth
|
|
16
17
|
* looking at.
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
|
-
import { useState } from "react";
|
|
20
|
+
import { useEffect, useRef, useState } from "react";
|
|
20
21
|
|
|
21
22
|
import { cn } from "@vitavision/ui";
|
|
22
23
|
import { useStage } from "./ImageStage";
|
|
@@ -29,16 +30,19 @@ export interface ImageTier {
|
|
|
29
30
|
width: number;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
/**
|
|
33
|
-
export interface
|
|
34
|
-
/** The full-resolution image's URL. */
|
|
35
|
-
src: string;
|
|
36
|
-
/** A smaller tier to show first; without one, `src` is shown from the start. */
|
|
37
|
-
preview?: ImageTier | undefined;
|
|
33
|
+
/** What every `ImageLayer` takes, whichever tiers it is given. */
|
|
34
|
+
export interface ImageLayerBaseProps {
|
|
38
35
|
/** The image's description, for assistive technology. `""` marks it decorative. */
|
|
39
36
|
alt: string;
|
|
40
37
|
/** The zoom (CSS pixels per image pixel) from which pixels are drawn as blocks. Defaults to 4. */
|
|
41
38
|
pixelatedAbove?: number | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Called once per `preview.src` when the full image is first wanted: the stage would magnify
|
|
41
|
+
* the preview. An app whose full image is costly to make or fetch leaves `src` out and
|
|
42
|
+
* passes it from here; the full image is shown as soon as `src` arrives. Not called without
|
|
43
|
+
* a `preview`.
|
|
44
|
+
*/
|
|
45
|
+
onFullNeeded?: (() => void) | undefined;
|
|
42
46
|
/** Called when the full image has loaded. */
|
|
43
47
|
onLoad?: (() => void) | undefined;
|
|
44
48
|
/** Called when the full image fails to load. */
|
|
@@ -47,19 +51,44 @@ export interface ImageLayerProps {
|
|
|
47
51
|
className?: string | undefined;
|
|
48
52
|
}
|
|
49
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Props of `ImageLayer`: the full image's `src`, a `preview` tier, or both. With a `preview`,
|
|
56
|
+
* `src` may be left out until `onFullNeeded` asks for it.
|
|
57
|
+
*/
|
|
58
|
+
export type ImageLayerProps = ImageLayerBaseProps &
|
|
59
|
+
(
|
|
60
|
+
| {
|
|
61
|
+
/** The full-resolution image's URL. */
|
|
62
|
+
src: string;
|
|
63
|
+
/** A smaller tier to show first; without one, `src` is shown from the start. */
|
|
64
|
+
preview?: ImageTier | undefined;
|
|
65
|
+
}
|
|
66
|
+
| {
|
|
67
|
+
/** The full-resolution image's URL, once known. Until then the preview stands in. */
|
|
68
|
+
src?: string | undefined;
|
|
69
|
+
/** A smaller tier to show first. */
|
|
70
|
+
preview: ImageTier;
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
|
|
50
74
|
/**
|
|
51
75
|
* The photograph at its natural size inside an `ImageStage`, with an optional preview tier
|
|
52
76
|
* and pixelated rendering past `pixelatedAbove`. It takes no pointer events, so presses reach
|
|
53
77
|
* the stage and the layers above.
|
|
54
78
|
*
|
|
79
|
+
* With a `preview`, the full image is wanted once the stage would magnify the preview, and
|
|
80
|
+
* `onFullNeeded` says so; `src` can be supplied then rather than up front.
|
|
81
|
+
*
|
|
55
82
|
* Each image carries `data-tier` (`preview` or `full`); the full image carries `data-loaded`
|
|
56
|
-
* once it has loaded,
|
|
83
|
+
* once it has loaded, the preview carries `data-wants-full` from the moment the full image is
|
|
84
|
+
* wanted until it has loaded, and both carry `data-pixelated` while pixelated.
|
|
57
85
|
*/
|
|
58
86
|
export function ImageLayer({
|
|
59
87
|
src,
|
|
60
88
|
preview,
|
|
61
89
|
alt,
|
|
62
90
|
pixelatedAbove = 4,
|
|
91
|
+
onFullNeeded,
|
|
63
92
|
onLoad,
|
|
64
93
|
onError,
|
|
65
94
|
className,
|
|
@@ -70,14 +99,25 @@ export function ImageLayer({
|
|
|
70
99
|
// per image pixel are `preview.width / image.width`. Not before the viewport is measured:
|
|
71
100
|
// the placeholder view then is 1:1, which would fetch the full image on every open.
|
|
72
101
|
const measured = stage.box.width > 0;
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
102
|
+
const previewSrc = preview?.src ?? null;
|
|
103
|
+
const magnified = preview !== undefined && measured && scale * stage.image.width > preview.width;
|
|
104
|
+
// Wanted once per preview, and kept: zooming back out should not drop the pixels already
|
|
105
|
+
// fetched.
|
|
106
|
+
const [wantedFor, setWantedFor] = useState<string | null>(magnified ? previewSrc : null);
|
|
107
|
+
if (magnified && wantedFor !== previewSrc) setWantedFor(previewSrc);
|
|
108
|
+
const wanted = previewSrc === null || wantedFor === previewSrc;
|
|
77
109
|
const [loaded, setLoaded] = useState<string | null>(null);
|
|
78
110
|
|
|
79
|
-
|
|
80
|
-
const
|
|
111
|
+
// Told once per preview: the guard holds through a new `onFullNeeded` and a re-run effect.
|
|
112
|
+
const notifiedRef = useRef<string | null>(null);
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
if (previewSrc === null || wantedFor !== previewSrc || notifiedRef.current === previewSrc) return;
|
|
115
|
+
notifiedRef.current = previewSrc;
|
|
116
|
+
onFullNeeded?.();
|
|
117
|
+
}, [previewSrc, wantedFor, onFullNeeded]);
|
|
118
|
+
|
|
119
|
+
const showFull = wanted && src !== undefined;
|
|
120
|
+
const fullReady = src !== undefined && loaded === src;
|
|
81
121
|
const pixelated = scale >= pixelatedAbove;
|
|
82
122
|
const shared = cn("pointer-events-none absolute inset-0 h-full w-full select-none", className);
|
|
83
123
|
const rendering = pixelated ? ("pixelated" as const) : undefined;
|
|
@@ -91,6 +131,7 @@ export function ImageLayer({
|
|
|
91
131
|
aria-hidden={showFull ? true : undefined}
|
|
92
132
|
draggable={false}
|
|
93
133
|
data-tier="preview"
|
|
134
|
+
data-wants-full={wanted ? "" : undefined}
|
|
94
135
|
data-pixelated={pixelated ? "" : undefined}
|
|
95
136
|
className={shared}
|
|
96
137
|
style={{ imageRendering: rendering }}
|