reflet-sdk 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +5 -3
- package/dist/{devtools-layer-BI_hut0i.js → devtools-layer-CsIcpepI.js} +54 -50
- package/dist/devtools-layer-CsIcpepI.js.map +1 -0
- package/dist/devtools-next.js +1 -1
- package/dist/devtools-vite.js +1 -1
- package/dist/feedback.js +8 -8
- package/dist/feedback.js.map +1 -1
- package/dist/{handler-B4Z6jkYX.js → handler-17FmwoSX.js} +3 -3
- package/dist/handler-17FmwoSX.js.map +1 -0
- package/dist/{sessions-panel-CDrnOEwi.js → sessions-panel-BYM0UUgT.js} +1787 -1006
- package/dist/sessions-panel-BYM0UUgT.js.map +1 -0
- package/dist/{submit-DBy9TCSq.js → submit-Dl0rm6TV.js} +2 -2
- package/dist/{submit-DBy9TCSq.js.map → submit-Dl0rm6TV.js.map} +1 -1
- package/dist/{team-activation-DCqh71bl.js → team-activation-Cv5U7OF1.js} +3 -3
- package/dist/team-activation-Cv5U7OF1.js.map +1 -0
- package/dist/{team-layer-D-6Il66z.js → team-layer-Dvjkh-_y.js} +106 -80
- package/dist/team-layer-Dvjkh-_y.js.map +1 -0
- package/package.json +1 -1
- package/dist/devtools-layer-BI_hut0i.js.map +0 -1
- package/dist/handler-B4Z6jkYX.js.map +0 -1
- package/dist/sessions-panel-CDrnOEwi.js.map +0 -1
- package/dist/team-activation-DCqh71bl.js.map +0 -1
- package/dist/team-layer-D-6Il66z.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ 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.7.3] - 2026-10-14
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Sessions: the Intentions tab opens On screen. Each intention is pinned on the screenshot of the moment it's about: a frame around the element, a line, a number, and a short label the AI writes (at most 6 words, in your language), with Confirm and Dismiss right on the label. A choice already made stays focusable but inactive, like on the cards; Undo in the notice reverts it. Click the label to open the full intention under Details. Intentions with no screenshot are listed below with the same buttons. Your own wording replaces the AI label: once you, an accepted change or a removed contribution rewrites the need, the label shows the need itself. Requires the matching Reflet backend.
|
|
13
|
+
- Sessions: the frame goes around the element you talk about, not the one under your pointer. Each screenshot now records the names and positions of the buttons, links, headings and images it shows (masked elements and anything in or around typed text left out, at most 80), and the AI picks among them. When nothing matches, or for sessions analyzed before, the label sits on the screenshot without a frame. Removing a screenshot or correcting a passage's context moves the pin at once. The session disclosure lists this.
|
|
14
|
+
|
|
15
|
+
## [0.7.2] - 2026-10-13
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Team tools: Sign in with Reflet failed on every app that sends `Cross-Origin-Opener-Policy: same-origin` (a common security header, Helmet's default), reporting "Sign-in was cancelled." a second after the popup opened. With `same-origin-allow-popups` it still failed in Safari. Sign-in now moves the tab to reflet.app and back to the same page instead of using a popup, so it works whatever that header says, and pop-up blockers no longer get in the way.
|
|
20
|
+
|
|
8
21
|
## [0.7.1] - 2026-10-13
|
|
9
22
|
|
|
10
23
|
### Fixed
|
package/README.md
CHANGED
|
@@ -274,9 +274,11 @@ forwards the feedback and session endpoints the devtools use.
|
|
|
274
274
|
|
|
275
275
|
Members of your Reflet organization can record sessions on your deployed app
|
|
276
276
|
too; your users never see it. Open any page with `?reflet-team` once, click
|
|
277
|
-
**Sign in with Reflet**, and approve the app
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
**Sign in with Reflet**, and approve the app on reflet.app: the tab comes back
|
|
278
|
+
to the same page, signed in. Sign-in needs no popup, so it works whatever
|
|
279
|
+
`Cross-Origin-Opener-Policy` your app sends. The browser keeps a token for that
|
|
280
|
+
origin for 7 days; revoke it from Account → Team tools in your apps on
|
|
281
|
+
reflet.app.
|
|
280
282
|
|
|
281
283
|
Two things on your side:
|
|
282
284
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as shortenSourcePath, G as describeElement, Q as resolveComponentStack, R as DEFAULT_WIDGET_LABELS, U as buildElementSelection, V as collectPageContext, X as getFiberFromNode, a as uploadBlob, f as listenOnPageAndWidget, g as isSubmitEnter, it as releaseCapture, nt as capturedFromCanvas, o as ElementPicker, p as listenToKeydown, r as deriveTitle, rt as capturedViewportSize, s as isWidgetOwned, tt as captureViewport, z as SDK_VERSION } from "./submit-
|
|
1
|
+
import { $ as shortenSourcePath, G as describeElement, Q as resolveComponentStack, R as DEFAULT_WIDGET_LABELS, U as buildElementSelection, V as collectPageContext, X as getFiberFromNode, a as uploadBlob, f as listenOnPageAndWidget, g as isSubmitEnter, it as releaseCapture, nt as capturedFromCanvas, o as ElementPicker, p as listenToKeydown, r as deriveTitle, rt as capturedViewportSize, s as isWidgetOwned, tt as captureViewport, z as SDK_VERSION } from "./submit-Dl0rm6TV.js";
|
|
2
2
|
import { t as SelectionOutline } from "./selection-outline-NzAAAZXR.js";
|
|
3
|
-
import { A as Notices, C as searchCode, D as openDatabase, E as describeStorageFailure, M as reportFailure, O as settle, S as probeDevRoute, T as committed, a as DevtoolsBar, b as fetchBoardFeedback, c as copyToClipboard, f as SessionWorkspaceProvider, g as devtoolsTransport, j as announce, l as SESSIONS_STYLES, m as useWorkspaceLoader, n as DEVTOOLS_STYLES, o as DevtoolsBarButtons, r as DevtoolsSheet, t as SessionsPanel, u as RecordingLayer, v as callReflet, w as startBoardConnect, x as fetchSourceFile, y as disconnectBoard } from "./sessions-panel-
|
|
3
|
+
import { A as Notices, C as searchCode, D as openDatabase, E as describeStorageFailure, M as reportFailure, O as settle, S as probeDevRoute, T as committed, a as DevtoolsBar, b as fetchBoardFeedback, c as copyToClipboard, f as SessionWorkspaceProvider, g as devtoolsTransport, j as announce, l as SESSIONS_STYLES, m as useWorkspaceLoader, n as DEVTOOLS_STYLES, o as DevtoolsBarButtons, r as DevtoolsSheet, t as SessionsPanel, u as RecordingLayer, v as callReflet, w as startBoardConnect, x as fetchSourceFile, y as disconnectBoard } from "./sessions-panel-BYM0UUgT.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";
|
|
@@ -371,40 +371,8 @@ function InboxPanel({ onOpenCode, onShowSelector }) {
|
|
|
371
371
|
}, scope)] });
|
|
372
372
|
}
|
|
373
373
|
//#endregion
|
|
374
|
-
//#region src/devtools/client/route/
|
|
375
|
-
function
|
|
376
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
377
|
-
className: "dt-empty",
|
|
378
|
-
children: [
|
|
379
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
380
|
-
"Add the Reflet dev route to ",
|
|
381
|
-
purpose,
|
|
382
|
-
"."
|
|
383
|
-
] }),
|
|
384
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
385
|
-
"Next.js: ",
|
|
386
|
-
/* @__PURE__ */ jsx("code", { children: "app/api/reflet-devtools/[...path]/route.ts" }),
|
|
387
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
388
|
-
/* @__PURE__ */ jsxs("code", { children: [
|
|
389
|
-
"export ",
|
|
390
|
-
"{ GET, POST }",
|
|
391
|
-
" from \"reflet-sdk/devtools/next\";"
|
|
392
|
-
] })
|
|
393
|
-
] }),
|
|
394
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
395
|
-
"Vite: ",
|
|
396
|
-
/* @__PURE__ */ jsx("code", { children: "plugins: [refletDevtools()]" }),
|
|
397
|
-
" from",
|
|
398
|
-
" ",
|
|
399
|
-
/* @__PURE__ */ jsx("code", { children: "reflet-sdk/devtools/vite" })
|
|
400
|
-
] })
|
|
401
|
-
]
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
const MISSING_SECRET_KEY_HINT = "Set REFLET_SECRET_KEY (your fb_sec_ key) in the dev server environment to reach your board.";
|
|
405
|
-
//#endregion
|
|
406
|
-
//#region src/devtools/client/board/board-tab.tsx
|
|
407
|
-
function ConnectPrompt({ publicKey }) {
|
|
374
|
+
//#region src/devtools/client/route/connect-prompt.tsx
|
|
375
|
+
function ConnectPrompt({ publicKey, purpose }) {
|
|
408
376
|
const [prompt, setPrompt] = useState({ kind: "idle" });
|
|
409
377
|
const connect = async () => {
|
|
410
378
|
const tab = window.open("", "_blank");
|
|
@@ -445,7 +413,7 @@ function ConnectPrompt({ publicKey }) {
|
|
|
445
413
|
});
|
|
446
414
|
return /* @__PURE__ */ jsxs("div", {
|
|
447
415
|
className: "dt-empty",
|
|
448
|
-
children: [/* @__PURE__ */ jsx("p", { children:
|
|
416
|
+
children: [/* @__PURE__ */ jsx("p", { children: purpose }), /* @__PURE__ */ jsx("button", {
|
|
449
417
|
className: "dt-btn",
|
|
450
418
|
"data-variant": "primary",
|
|
451
419
|
disabled: prompt.kind === "starting",
|
|
@@ -455,6 +423,40 @@ function ConnectPrompt({ publicKey }) {
|
|
|
455
423
|
})]
|
|
456
424
|
});
|
|
457
425
|
}
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/devtools/client/route/route-hint.tsx
|
|
428
|
+
function MissingRouteHint({ purpose }) {
|
|
429
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
430
|
+
className: "dt-empty",
|
|
431
|
+
children: [
|
|
432
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
433
|
+
"Add the Reflet dev route to ",
|
|
434
|
+
purpose,
|
|
435
|
+
"."
|
|
436
|
+
] }),
|
|
437
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
438
|
+
"Next.js: ",
|
|
439
|
+
/* @__PURE__ */ jsx("code", { children: "app/api/reflet-devtools/[...path]/route.ts" }),
|
|
440
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
441
|
+
/* @__PURE__ */ jsxs("code", { children: [
|
|
442
|
+
"export ",
|
|
443
|
+
"{ GET, POST }",
|
|
444
|
+
" from \"reflet-sdk/devtools/next\";"
|
|
445
|
+
] })
|
|
446
|
+
] }),
|
|
447
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
448
|
+
"Vite: ",
|
|
449
|
+
/* @__PURE__ */ jsx("code", { children: "plugins: [refletDevtools()]" }),
|
|
450
|
+
" from",
|
|
451
|
+
" ",
|
|
452
|
+
/* @__PURE__ */ jsx("code", { children: "reflet-sdk/devtools/vite" })
|
|
453
|
+
] })
|
|
454
|
+
]
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
const MISSING_SECRET_KEY_HINT = "Set REFLET_SECRET_KEY (your fb_sec_ key) in the dev server environment to reach your board.";
|
|
458
|
+
//#endregion
|
|
459
|
+
//#region src/devtools/client/board/board-tab.tsx
|
|
458
460
|
function ConnectionBar({ organizationName, refresh }) {
|
|
459
461
|
const [isDisconnecting, setIsDisconnecting] = useState(false);
|
|
460
462
|
const disconnect = async () => {
|
|
@@ -487,7 +489,10 @@ function BoardTab({ canConnect, onOpenCode, onShowSelector, publicKey, refresh,
|
|
|
487
489
|
if (route.kind === "missing") return /* @__PURE__ */ jsx(MissingRouteHint, { purpose: "see your board's feedback for this page" });
|
|
488
490
|
if (route.kind === "checking") return null;
|
|
489
491
|
const { board } = route.status;
|
|
490
|
-
if (board.kind === "disconnected") return canConnect && publicKey !== null ? /* @__PURE__ */ jsx(ConnectPrompt, {
|
|
492
|
+
if (board.kind === "disconnected") return canConnect && publicKey !== null ? /* @__PURE__ */ jsx(ConnectPrompt, {
|
|
493
|
+
publicKey,
|
|
494
|
+
purpose: "See this page's feedback and send notes to your board."
|
|
495
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
491
496
|
className: "dt-hint",
|
|
492
497
|
children: MISSING_SECRET_KEY_HINT
|
|
493
498
|
});
|
|
@@ -3452,15 +3457,14 @@ function SessionsScope({ children, sessions }) {
|
|
|
3452
3457
|
children
|
|
3453
3458
|
});
|
|
3454
3459
|
}
|
|
3455
|
-
function
|
|
3456
|
-
return /* @__PURE__ */
|
|
3460
|
+
function SessionsConnect({ connectKey }) {
|
|
3461
|
+
if (connectKey === null) return /* @__PURE__ */ jsx("p", {
|
|
3457
3462
|
className: "dt-empty",
|
|
3458
|
-
children:
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
})]
|
|
3463
|
+
children: "Sessions are recorded under your Reflet account. Connecting needs this app on localhost with a Reflet public key."
|
|
3464
|
+
});
|
|
3465
|
+
return /* @__PURE__ */ jsx(ConnectPrompt, {
|
|
3466
|
+
publicKey: connectKey,
|
|
3467
|
+
purpose: "Sessions are recorded under your Reflet account."
|
|
3464
3468
|
});
|
|
3465
3469
|
}
|
|
3466
3470
|
function WorkspaceGate({ actions, sessions }) {
|
|
@@ -3485,14 +3489,14 @@ function WorkspaceGate({ actions, sessions }) {
|
|
|
3485
3489
|
children: "Opening your sessions…"
|
|
3486
3490
|
});
|
|
3487
3491
|
}
|
|
3488
|
-
function SessionsTab({ actions, route, sessions }) {
|
|
3492
|
+
function SessionsTab({ actions, connectKey, route, sessions }) {
|
|
3489
3493
|
if (route.kind === "checking") return /* @__PURE__ */ jsx("p", {
|
|
3490
3494
|
className: "dt-status",
|
|
3491
3495
|
children: "Connecting to the Reflet dev route…"
|
|
3492
3496
|
});
|
|
3493
3497
|
if (route.kind === "missing") return /* @__PURE__ */ jsx(MissingRouteHint, { purpose: "record sessions under your Reflet account" });
|
|
3494
3498
|
const { board } = route.status;
|
|
3495
|
-
if (board.kind === "disconnected") return /* @__PURE__ */ jsx(
|
|
3499
|
+
if (board.kind === "disconnected") return /* @__PURE__ */ jsx(SessionsConnect, { connectKey });
|
|
3496
3500
|
if (board.kind === "secretKey") return /* @__PURE__ */ jsx("p", {
|
|
3497
3501
|
className: "dt-empty",
|
|
3498
3502
|
children: "Sessions are recorded under your own name, so they need Connect in the Board tab rather than REFLET_SECRET_KEY."
|
|
@@ -3649,10 +3653,10 @@ function DevtoolsLayer({ isWidgetOpen, position, publicKey }) {
|
|
|
3649
3653
|
}),
|
|
3650
3654
|
openTab === "sessions" && /* @__PURE__ */ jsx(SessionsTab, {
|
|
3651
3655
|
actions: {
|
|
3652
|
-
onConnect: () => setOpenTab("inbox"),
|
|
3653
3656
|
onStarted: closeSheet,
|
|
3654
3657
|
onWriteNote: writeNoteInstead
|
|
3655
3658
|
},
|
|
3659
|
+
connectKey: canConnect ? publicKey : null,
|
|
3656
3660
|
route,
|
|
3657
3661
|
sessions
|
|
3658
3662
|
}),
|
|
@@ -3692,4 +3696,4 @@ function DevtoolsLayer({ isWidgetOpen, position, publicKey }) {
|
|
|
3692
3696
|
//#endregion
|
|
3693
3697
|
export { DevtoolsLayer };
|
|
3694
3698
|
|
|
3695
|
-
//# sourceMappingURL=devtools-layer-
|
|
3699
|
+
//# sourceMappingURL=devtools-layer-CsIcpepI.js.map
|