reflet-sdk 0.6.3 → 0.6.5
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/CHANGELOG.md +21 -0
- package/dist/{devtools-layer-DtO89RlJ.js → devtools-layer-CEjzYGBB.js} +18 -12
- package/dist/devtools-layer-CEjzYGBB.js.map +1 -0
- package/dist/devtools-next.js +1 -1
- package/dist/devtools-vite.js +1 -1
- package/dist/feedback.d.ts +1 -0
- package/dist/feedback.d.ts.map +1 -1
- package/dist/feedback.js +772 -779
- package/dist/feedback.js.map +1 -1
- package/dist/{handler-C9tdKcl0.js → handler-BSNmdHXv.js} +11 -11
- package/dist/handler-BSNmdHXv.js.map +1 -0
- package/dist/{z-index-CIb4-3Fy.js → react-context-Caq1fodf.js} +13 -13
- package/dist/react-context-Caq1fodf.js.map +1 -0
- package/dist/react.js +1 -1
- package/dist/{picker-Rh-hsxyX.js → submit-MvVjNdYc.js} +162 -109
- package/dist/submit-MvVjNdYc.js.map +1 -0
- package/package.json +1 -1
- package/dist/devtools-layer-DtO89RlJ.js.map +0 -1
- package/dist/handler-C9tdKcl0.js.map +0 -1
- package/dist/picker-Rh-hsxyX.js.map +0 -1
- package/dist/z-index-CIb4-3Fy.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ All notable changes to `reflet-sdk` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.6.5] - 2026-10-04
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Pressing Enter on an empty devtools picker note copies the element instead of saving an empty note. With text, Enter still saves the note; the arrow button always saves.
|
|
13
|
+
|
|
14
|
+
## [0.6.4] - 2026-10-04
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Click a screenshot thumbnail in the widget to open it full size, the same view the pencil opens.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Picked-element highlights and devtools close-ups land on the element on Windows and Linux. A classic scrollbar used to shift them left, by up to its own width near the right edge.
|
|
23
|
+
- Letter hotkeys work with macOS Option (⌥F types "ƒ") and on non-Latin keyboard layouts, for both the `hotkey` prop and the picker's ⌘C / Ctrl+C.
|
|
24
|
+
- Pressing Enter to confirm Japanese, Chinese or Korean input no longer submits the picker note, the devtools note or a text annotation. Pressing Escape to cancel the input no longer closes the picker note, a text annotation, the devtools panel or a note pin either.
|
|
25
|
+
- Right-click no longer picks an element, and the page's context menu no longer opens while picking.
|
|
26
|
+
- "Open in editor" links work for Windows paths (`vscode://file/C:/…`), and devtools resolves `file:///C:/…`, Vite `/@fs/C:/…` and `/C:/…` source frames.
|
|
27
|
+
- Devtools refuses Server Component chunks on another Windows drive as outside the repository.
|
|
28
|
+
|
|
8
29
|
## [0.6.3] - 2026-10-04
|
|
9
30
|
|
|
10
31
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as EDITORS, n as DEVTOOLS_REQUEST_HEADER, r as DEVTOOLS_ROUTE_BASE, t as DEVTOOLS_ENDPOINTS } from "./protocol-ClqTFzwR.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { B as collectPageContext, G as resolveComponentStack, H as buildElementSelection, J as captureViewport, K as shortenSourcePath, M as TargetIcon, R as DEFAULT_WIDGET_LABELS, T as GripIcon, U as describeElement, W as getFiberFromNode, X as capturedViewportSize, Y as capturedFromCanvas, Z as releaseCapture, a as uploadImageBlob, c as useFloatingPosition, d as SelectionOutline, g as isSubmitEnter, j as Svg, l as onViewportChange, m as listenToKeydown, o as ElementPicker, p as listenOnPageAndWidget, r as deriveTitle, s as isWidgetOwned, u as visibleViewport, w as CloseIcon, z as SDK_VERSION } from "./submit-MvVjNdYc.js";
|
|
3
|
+
import { a as REFLET_Z_INDEX } from "./react-context-Caq1fodf.js";
|
|
4
4
|
import * as G$1 from "react";
|
|
5
5
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -666,7 +666,12 @@ async function copyToClipboard(text) {
|
|
|
666
666
|
}
|
|
667
667
|
//#endregion
|
|
668
668
|
//#region src/devtools/client/code/editor-url.ts
|
|
669
|
-
|
|
669
|
+
/** VS Code-family links want `/c:/dir/file.tsx` on Windows, `/dir/file.tsx` elsewhere. */
|
|
670
|
+
const fileSchemeLink = (scheme) => (absolutePath, line, column) => {
|
|
671
|
+
const slashed = absolutePath.replaceAll("\\", "/");
|
|
672
|
+
const rooted = slashed.startsWith("/") ? slashed : `/${slashed}`;
|
|
673
|
+
return `${scheme}://file${encodeURI(rooted)}:${line}:${column}`;
|
|
674
|
+
};
|
|
670
675
|
const EDITOR_LINKS = {
|
|
671
676
|
cursor: fileSchemeLink("cursor"),
|
|
672
677
|
vscode: fileSchemeLink("vscode"),
|
|
@@ -985,7 +990,7 @@ function DevtoolsSheet({ children, onClose, onPick, onSelectTab, side, tab, tabs
|
|
|
985
990
|
const isMoved = floating.position !== null;
|
|
986
991
|
const { rootRef } = floating;
|
|
987
992
|
useEffect(() => listenToKeydown(rootRef.current, (event) => {
|
|
988
|
-
if (event.key === "Escape") onClose();
|
|
993
|
+
if (event.key === "Escape" && !event.isComposing) onClose();
|
|
989
994
|
}), [onClose, rootRef]);
|
|
990
995
|
return /* @__PURE__ */ jsxs("aside", {
|
|
991
996
|
"aria-label": "Reflet devtools",
|
|
@@ -3062,7 +3067,7 @@ const SNAPSHOT_MAX_WIDTH = 800;
|
|
|
3062
3067
|
const OUTLINE_COLOR = "#4f46e5";
|
|
3063
3068
|
const OUTLINE_WIDTH = 2;
|
|
3064
3069
|
/** The element plus some room around it, grown to a readable minimum, kept inside the window. */
|
|
3065
|
-
function cropAround(rect) {
|
|
3070
|
+
function cropAround(rect, viewport) {
|
|
3066
3071
|
const grow = (start, length, limit) => {
|
|
3067
3072
|
const padded = Math.max(length + 64, MIN_CROP_SIZE);
|
|
3068
3073
|
const from = Math.max(0, start + length / 2 - padded / 2);
|
|
@@ -3072,8 +3077,8 @@ function cropAround(rect) {
|
|
|
3072
3077
|
to
|
|
3073
3078
|
};
|
|
3074
3079
|
};
|
|
3075
|
-
const horizontal = grow(rect.left, rect.width,
|
|
3076
|
-
const vertical = grow(rect.top, rect.height,
|
|
3080
|
+
const horizontal = grow(rect.left, rect.width, viewport.width);
|
|
3081
|
+
const vertical = grow(rect.top, rect.height, viewport.height);
|
|
3077
3082
|
return {
|
|
3078
3083
|
height: vertical.to - vertical.from,
|
|
3079
3084
|
width: horizontal.to - horizontal.from,
|
|
@@ -3101,8 +3106,9 @@ async function captureElementSnapshot(element) {
|
|
|
3101
3106
|
try {
|
|
3102
3107
|
const rect = box.getBoundingClientRect();
|
|
3103
3108
|
if (rect.width === 0 || rect.height === 0) return null;
|
|
3104
|
-
const
|
|
3105
|
-
const
|
|
3109
|
+
const viewport = capturedViewportSize();
|
|
3110
|
+
const scale = page.width / viewport.width;
|
|
3111
|
+
const crop = cropAround(rect, viewport);
|
|
3106
3112
|
const canvas = document.createElement("canvas");
|
|
3107
3113
|
canvas.width = Math.round(crop.width * scale);
|
|
3108
3114
|
canvas.height = Math.round(crop.height * scale);
|
|
@@ -3457,7 +3463,7 @@ function NoteEditor({ initialText, noteId, onDone }) {
|
|
|
3457
3463
|
className: "dt-field",
|
|
3458
3464
|
onChange: (event) => setText(event.target.value),
|
|
3459
3465
|
onKeyDown: (event) => {
|
|
3460
|
-
if (event.
|
|
3466
|
+
if (isSubmitEnter(event.nativeEvent)) {
|
|
3461
3467
|
event.preventDefault();
|
|
3462
3468
|
save();
|
|
3463
3469
|
}
|
|
@@ -3904,7 +3910,7 @@ function NotePopover({ anchor, notes, onClose, onOpenCode }) {
|
|
|
3904
3910
|
};
|
|
3905
3911
|
const stopOutsidePress = listenOnPageAndWidget(popoverRef.current, "pointerdown", closeOnOutsidePress, true);
|
|
3906
3912
|
const stopKeys = listenToKeydown(popoverRef.current, (event) => {
|
|
3907
|
-
if (event.key === "Escape") onClose();
|
|
3913
|
+
if (event.key === "Escape" && !event.isComposing) onClose();
|
|
3908
3914
|
});
|
|
3909
3915
|
return () => {
|
|
3910
3916
|
stopOutsidePress();
|
|
@@ -4185,4 +4191,4 @@ function DevtoolsLayer({ isWidgetOpen, position, publicKey }) {
|
|
|
4185
4191
|
//#endregion
|
|
4186
4192
|
export { DevtoolsLayer };
|
|
4187
4193
|
|
|
4188
|
-
//# sourceMappingURL=devtools-layer-
|
|
4194
|
+
//# sourceMappingURL=devtools-layer-CEjzYGBB.js.map
|