reflet-sdk 0.7.8 → 0.7.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/CHANGELOG.md +9 -0
- package/dist/{devtools-layer-B_b_3MH3.js → devtools-layer-Cj3yyqyM.js} +3 -3
- package/dist/{devtools-layer-B_b_3MH3.js.map → devtools-layer-Cj3yyqyM.js.map} +1 -1
- package/dist/feedback.js +4 -4
- package/dist/{submit-D_DrRBeB.js → submit-CQ5nAuwm.js} +2 -2
- package/dist/{submit-D_DrRBeB.js.map → submit-CQ5nAuwm.js.map} +1 -1
- package/dist/{team-layer-CxMBo9WN.js → team-layer-LbaaWsQP.js} +3 -3
- package/dist/{team-layer-CxMBo9WN.js.map → team-layer-LbaaWsQP.js.map} +1 -1
- package/dist/{use-sheet-tab-azUezLAq.js → use-sheet-tab-B-q4G0Hn.js} +185 -133
- package/dist/use-sheet-tab-B-q4G0Hn.js.map +1 -0
- package/package.json +1 -1
- package/dist/use-sheet-tab-azUezLAq.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as EDITORS, n as DEVTOOLS_REQUEST_HEADER, r as DEVTOOLS_ROUTE_BASE, t as DEVTOOLS_ENDPOINTS } from "./protocol-ClxYWmhu.js";
|
|
2
|
-
import { $ as inspectReactElement, A as PencilIcon, B as DEFAULT_WIDGET_LABELS, C as CheckIcon, D as GripIcon, E as CodeIcon, G as buildElementSelection, H as clip, I as TrashIcon, J as getElementRect, K as buildSelector, N as Svg, P as TargetIcon, Q as getFiberFromNode, T as CloseIcon, U as collectPageContext, V as SDK_VERSION, Y as REDACT_ATTRIBUTE, Z as redactUrl, _ as isSubmitEnter, a as uploadBlob, at as capturedViewportSize, c as useFloatingPosition, d as SelectionOutline, et as resolveComponentStack, h as startsInWidget, it as capturedFromCanvas, k as MoreIcon, l as onViewportChange, m as listenToKeydown, o as ElementPicker, ot as releaseCapture, p as listenOnPageAndWidget, q as describeElement, r as deriveTitle, rt as captureViewport, s as isWidgetOwned, tt as shortenSourcePath, u as visibleViewport, v as matchesHotkey } from "./submit-
|
|
2
|
+
import { $ as inspectReactElement, A as PencilIcon, B as DEFAULT_WIDGET_LABELS, C as CheckIcon, D as GripIcon, E as CodeIcon, G as buildElementSelection, H as clip, I as TrashIcon, J as getElementRect, K as buildSelector, N as Svg, P as TargetIcon, Q as getFiberFromNode, T as CloseIcon, U as collectPageContext, V as SDK_VERSION, Y as REDACT_ATTRIBUTE, Z as redactUrl, _ as isSubmitEnter, a as uploadBlob, at as capturedViewportSize, c as useFloatingPosition, d as SelectionOutline, et as resolveComponentStack, h as startsInWidget, it as capturedFromCanvas, k as MoreIcon, l as onViewportChange, m as listenToKeydown, o as ElementPicker, ot as releaseCapture, p as listenOnPageAndWidget, q as describeElement, r as deriveTitle, rt as captureViewport, s as isWidgetOwned, tt as shortenSourcePath, u as visibleViewport, v as matchesHotkey } from "./submit-CQ5nAuwm.js";
|
|
3
3
|
import { t as REFLET_Z_INDEX } from "./z-index-CwokqVq_.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import * as G$1 from "react";
|
|
@@ -3566,17 +3566,20 @@ function RemoveEvidence({ evidence, removal }) {
|
|
|
3566
3566
|
removal
|
|
3567
3567
|
});
|
|
3568
3568
|
const label = `Remove screenshot at ${formatClock(evidence.atMs)}`;
|
|
3569
|
-
return /* @__PURE__ */ jsx("
|
|
3570
|
-
"
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3569
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3570
|
+
className: "dt-hover-actions",
|
|
3571
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
3572
|
+
"aria-label": label,
|
|
3573
|
+
className: "icon-btn glass",
|
|
3574
|
+
onClick: () => {
|
|
3575
|
+
setIsConfirming(true);
|
|
3576
|
+
setHasCancelled(false);
|
|
3577
|
+
},
|
|
3578
|
+
ref: triggerRef,
|
|
3579
|
+
title: label,
|
|
3580
|
+
type: "button",
|
|
3581
|
+
children: /* @__PURE__ */ jsx(TrashIcon, {})
|
|
3582
|
+
})
|
|
3580
3583
|
});
|
|
3581
3584
|
}
|
|
3582
3585
|
//#endregion
|
|
@@ -4272,12 +4275,18 @@ function HistoryEntry({ context, entry }) {
|
|
|
4272
4275
|
const evidenceIds = new Set(entry.evidenceIds);
|
|
4273
4276
|
const evidence = context.detail.contributedEvidence.filter((item) => evidenceIds.has(item.id));
|
|
4274
4277
|
return /* @__PURE__ */ jsxs("li", {
|
|
4275
|
-
className: "dt-ses-history",
|
|
4278
|
+
className: "dt-ses-history dt-openable",
|
|
4276
4279
|
"data-removed": entry.detachedAt !== null,
|
|
4277
4280
|
children: [
|
|
4278
4281
|
/* @__PURE__ */ jsx("p", {
|
|
4279
4282
|
className: "dt-ses-subhead",
|
|
4280
|
-
children:
|
|
4283
|
+
children: entry.session.canOpen ? /* @__PURE__ */ jsx("button", {
|
|
4284
|
+
className: "dt-open",
|
|
4285
|
+
onClick: () => context.navigation.onOpenSession(entry.session.id),
|
|
4286
|
+
title: "Open session",
|
|
4287
|
+
type: "button",
|
|
4288
|
+
children: entryTitle(entry)
|
|
4289
|
+
}) : entryTitle(entry)
|
|
4281
4290
|
}),
|
|
4282
4291
|
entry.detachedAt !== null && /* @__PURE__ */ jsxs("p", {
|
|
4283
4292
|
className: "dt-meta",
|
|
@@ -4294,12 +4303,6 @@ function HistoryEntry({ context, entry }) {
|
|
|
4294
4303
|
}) : /* @__PURE__ */ jsx(HistoryExtracts, {
|
|
4295
4304
|
evidence,
|
|
4296
4305
|
quotes: entry.quotes
|
|
4297
|
-
}),
|
|
4298
|
-
entry.session.canOpen && /* @__PURE__ */ jsx("button", {
|
|
4299
|
-
className: "dt-ses-link",
|
|
4300
|
-
onClick: () => context.navigation.onOpenSession(entry.session.id),
|
|
4301
|
-
type: "button",
|
|
4302
|
-
children: "Open session"
|
|
4303
4306
|
})
|
|
4304
4307
|
]
|
|
4305
4308
|
});
|
|
@@ -8358,11 +8361,11 @@ function EvidenceItem({ evidence, onShowMoment, removal }) {
|
|
|
8358
8361
|
isJustRemoved: evidence.id === removal.removedId
|
|
8359
8362
|
});
|
|
8360
8363
|
return /* @__PURE__ */ jsxs("li", {
|
|
8361
|
-
className: "dt-card dt-
|
|
8364
|
+
className: "dt-card dt-openable",
|
|
8362
8365
|
children: [
|
|
8363
8366
|
onShowMoment ? /* @__PURE__ */ jsx("button", {
|
|
8364
8367
|
"aria-label": `Show the moment at ${caption}`,
|
|
8365
|
-
className: "dt-
|
|
8368
|
+
className: "dt-open dt-ses-shot-face",
|
|
8366
8369
|
onClick: (event) => onShowMoment(event.currentTarget),
|
|
8367
8370
|
type: "button",
|
|
8368
8371
|
children: /* @__PURE__ */ jsx(EvidenceFace, { evidence })
|
|
@@ -8547,19 +8550,42 @@ function MomentTime({ onShowMoment, time }) {
|
|
|
8547
8550
|
});
|
|
8548
8551
|
return /* @__PURE__ */ jsx("button", {
|
|
8549
8552
|
"aria-label": `Show the moment at ${time}`,
|
|
8550
|
-
className: "dt-ses-time dt-
|
|
8553
|
+
className: "dt-ses-time dt-open",
|
|
8551
8554
|
onClick: (event) => onShowMoment(event.currentTarget),
|
|
8552
8555
|
type: "button",
|
|
8553
8556
|
children: time
|
|
8554
8557
|
});
|
|
8555
8558
|
}
|
|
8559
|
+
const TEXT_DRAG_THRESHOLD_PX = 4;
|
|
8560
|
+
function useOpenMomentOnRowClick() {
|
|
8561
|
+
const pressedAt = useRef(null);
|
|
8562
|
+
return {
|
|
8563
|
+
onClick(event) {
|
|
8564
|
+
const start = pressedAt.current;
|
|
8565
|
+
const isTextDrag = start !== null && Math.hypot(event.clientX - start.x, event.clientY - start.y) > TEXT_DRAG_THRESHOLD_PX;
|
|
8566
|
+
const isOnControl = event.target instanceof Element && event.target.closest("a, button, input, select, textarea") !== null;
|
|
8567
|
+
if (isTextDrag || isOnControl) return;
|
|
8568
|
+
event.currentTarget.querySelector(":scope > .dt-open")?.click();
|
|
8569
|
+
},
|
|
8570
|
+
onMouseDown(event) {
|
|
8571
|
+
pressedAt.current = {
|
|
8572
|
+
x: event.clientX,
|
|
8573
|
+
y: event.clientY
|
|
8574
|
+
};
|
|
8575
|
+
}
|
|
8576
|
+
};
|
|
8577
|
+
}
|
|
8556
8578
|
function SegmentRow({ editing, onShowMoment, segment }) {
|
|
8557
8579
|
const { canEdit, review } = editing;
|
|
8558
8580
|
const [isEditing, setIsEditing] = useState(false);
|
|
8559
8581
|
const time = formatClock(segment.startMs);
|
|
8560
8582
|
const isSettled = ["done", "empty"].includes(segment.transcription.state);
|
|
8583
|
+
const canStartEditing = canEdit && isSettled && !isEditing;
|
|
8584
|
+
const rowClick = useOpenMomentOnRowClick();
|
|
8561
8585
|
return /* @__PURE__ */ jsxs("li", {
|
|
8562
|
-
className: "dt-ses-seg dt-
|
|
8586
|
+
className: "dt-ses-seg dt-openable",
|
|
8587
|
+
onClick: rowClick.onClick,
|
|
8588
|
+
onMouseDown: rowClick.onMouseDown,
|
|
8563
8589
|
children: [
|
|
8564
8590
|
/* @__PURE__ */ jsx(MomentTime, {
|
|
8565
8591
|
onShowMoment: isEditing ? null : onShowMoment,
|
|
@@ -8577,13 +8603,16 @@ function SegmentRow({ editing, onShowMoment, segment }) {
|
|
|
8577
8603
|
segment
|
|
8578
8604
|
}), /* @__PURE__ */ jsx(ContextChips, { segment })]
|
|
8579
8605
|
}),
|
|
8580
|
-
|
|
8581
|
-
"
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8606
|
+
canStartEditing && /* @__PURE__ */ jsx("div", {
|
|
8607
|
+
className: "dt-hover-actions",
|
|
8608
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
8609
|
+
"aria-label": `Edit passage at ${time}`,
|
|
8610
|
+
className: "icon-btn glass",
|
|
8611
|
+
onClick: () => setIsEditing(true),
|
|
8612
|
+
title: "Edit",
|
|
8613
|
+
type: "button",
|
|
8614
|
+
children: /* @__PURE__ */ jsx(PencilIcon, {})
|
|
8615
|
+
})
|
|
8587
8616
|
})
|
|
8588
8617
|
]
|
|
8589
8618
|
});
|
|
@@ -8667,9 +8696,12 @@ function transcriptForAgent(detail) {
|
|
|
8667
8696
|
//#endregion
|
|
8668
8697
|
//#region src/sessions/ui/review/transcript/transcript-tab.tsx
|
|
8669
8698
|
function TimelineNote({ atMs, children, onShowMoment }) {
|
|
8699
|
+
const rowClick = useOpenMomentOnRowClick();
|
|
8670
8700
|
return /* @__PURE__ */ jsxs("li", {
|
|
8671
|
-
className: "dt-ses-seg dt-
|
|
8701
|
+
className: "dt-ses-seg dt-openable",
|
|
8672
8702
|
"data-kind": "note",
|
|
8703
|
+
onClick: rowClick.onClick,
|
|
8704
|
+
onMouseDown: rowClick.onMouseDown,
|
|
8673
8705
|
children: [/* @__PURE__ */ jsx(MomentTime, {
|
|
8674
8706
|
onShowMoment,
|
|
8675
8707
|
time: formatClock(atMs)
|
|
@@ -9239,6 +9271,7 @@ const INTENTION_STYLES = `
|
|
|
9239
9271
|
.dt-ses-attached { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
|
|
9240
9272
|
.dt-ses-attached p { margin: 0; }
|
|
9241
9273
|
.dt-ses-history[data-removed="true"] > .dt-ses-subhead { color: var(--rf-text-muted); text-decoration: line-through; }
|
|
9274
|
+
.dt-ses-history:has(.dt-open) { margin-inline: -8px; padding: 6px 8px; border-radius: var(--dt-radius-field); }
|
|
9242
9275
|
.dt-ses-change { padding: 8px 10px; border-radius: var(--dt-radius-card); background: var(--rf-bg-subtle); list-style: none; }
|
|
9243
9276
|
.dt-ses-change[data-decision="rejected"] .dt-ses-diff { color: var(--rf-text-muted); text-decoration: line-through; }
|
|
9244
9277
|
.dt-ses-diff { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin: 0; overflow-wrap: anywhere; }
|
|
@@ -9348,23 +9381,9 @@ const SESSIONS_STYLES = `${`
|
|
|
9348
9381
|
.dt-ses-steps li::before { animation: none; }
|
|
9349
9382
|
.dt-ses-bar > span[data-indeterminate="true"] { width: 100%; opacity: .4; animation: none; }
|
|
9350
9383
|
}
|
|
9351
|
-
.dt-ses-
|
|
9352
|
-
.dt-ses-
|
|
9353
|
-
.dt-ses-
|
|
9354
|
-
.dt-ses-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
|
|
9355
|
-
.dt-ses-open:focus-visible { outline: none; }
|
|
9356
|
-
.dt-ses-open:focus-visible::after { outline: 2px solid var(--rf-accent); outline-offset: -2px; }
|
|
9357
|
-
.dt-ses-openable :is(a, button, input, select, textarea):not(.dt-ses-open, .dt-ses-hover-action) { position: relative; z-index: 1; }
|
|
9358
|
-
.dt-ses-openable > .dt-ses-hover-action {
|
|
9359
|
-
position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; opacity: 0;
|
|
9360
|
-
transition: opacity 120ms var(--rf-ease), background 160ms var(--rf-ease), color 160ms var(--rf-ease);
|
|
9361
|
-
}
|
|
9362
|
-
.dt-ses-hover-action svg { width: 14px; height: 14px; }
|
|
9363
|
-
.dt-ses-openable:hover > .dt-ses-hover-action, .dt-ses-openable > .dt-ses-hover-action:focus-visible { opacity: 1; }
|
|
9364
|
-
@media (hover: none) {
|
|
9365
|
-
.dt-ses-openable > .dt-ses-hover-action { opacity: 1; }
|
|
9366
|
-
.dt-ses-seg:has(> .dt-ses-hover-action) { padding-right: 40px; }
|
|
9367
|
-
}
|
|
9384
|
+
.dt-ses-seg:has(> .dt-open) { cursor: pointer; }
|
|
9385
|
+
.dt-ses-seg:has(> .dt-open) > .dt-ses-seg-body { position: relative; z-index: 1; }
|
|
9386
|
+
@media (hover: none) { .dt-ses-seg:has(> .dt-hover-actions) { padding-right: 40px; } }
|
|
9368
9387
|
.dt-ses-rows { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
|
|
9369
9388
|
.dt-ses-row {
|
|
9370
9389
|
display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
|
|
@@ -9712,55 +9731,59 @@ function SelectionRow({ onOpenCode, onShowSelector, selection }) {
|
|
|
9712
9731
|
request,
|
|
9713
9732
|
title: selection.label
|
|
9714
9733
|
}) : null;
|
|
9715
|
-
return /* @__PURE__ */ jsxs(
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
className: "dt-actions",
|
|
9736
|
-
children: [/* @__PURE__ */ jsx("button", {
|
|
9737
|
-
className: "dt-btn",
|
|
9738
|
-
onClick: () => setIsOffPage(!onShowSelector(selection.selector)),
|
|
9739
|
-
type: "button",
|
|
9740
|
-
children: "Show on page"
|
|
9741
|
-
}), onOpenCode && !(request || isSearching) && /* @__PURE__ */ jsx("button", {
|
|
9742
|
-
className: "dt-btn",
|
|
9743
|
-
onClick: () => setIsSearching(true),
|
|
9734
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
9735
|
+
className: "dt-selection dt-openable",
|
|
9736
|
+
children: [
|
|
9737
|
+
/* @__PURE__ */ jsx("p", {
|
|
9738
|
+
className: "dt-meta",
|
|
9739
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
9740
|
+
className: "dt-open",
|
|
9741
|
+
onClick: () => setIsOffPage(!onShowSelector(selection.selector)),
|
|
9742
|
+
title: "Show on page",
|
|
9743
|
+
type: "button",
|
|
9744
|
+
children: [/* @__PURE__ */ jsx("strong", { children: selection.label }), selection.region && ` · ${selection.region}`]
|
|
9745
|
+
})
|
|
9746
|
+
}),
|
|
9747
|
+
selection.comment && /* @__PURE__ */ jsx("p", {
|
|
9748
|
+
className: "dt-note-text",
|
|
9749
|
+
children: selection.comment
|
|
9750
|
+
}),
|
|
9751
|
+
selection.sourceLocation && openSource && /* @__PURE__ */ jsx("button", {
|
|
9752
|
+
className: "dt-source",
|
|
9753
|
+
onClick: openSource,
|
|
9744
9754
|
type: "button",
|
|
9745
|
-
children:
|
|
9746
|
-
})
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9755
|
+
children: selection.sourceLocation
|
|
9756
|
+
}),
|
|
9757
|
+
selection.sourceLocation && !onOpenCode && /* @__PURE__ */ jsx("p", {
|
|
9758
|
+
className: "dt-meta",
|
|
9759
|
+
children: selection.sourceLocation
|
|
9760
|
+
}),
|
|
9761
|
+
onOpenCode && !(request || isSearching) && /* @__PURE__ */ jsx("div", {
|
|
9762
|
+
className: "dt-actions",
|
|
9763
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
9764
|
+
className: "dt-btn",
|
|
9765
|
+
onClick: () => setIsSearching(true),
|
|
9766
|
+
type: "button",
|
|
9767
|
+
children: "Find in code"
|
|
9768
|
+
})
|
|
9769
|
+
}),
|
|
9770
|
+
isOffPage && /* @__PURE__ */ jsx("p", {
|
|
9771
|
+
className: "dt-meta",
|
|
9772
|
+
children: "This element is not on the page right now. Open the state the reporter was in, then try again."
|
|
9773
|
+
}),
|
|
9774
|
+
isSearching && onOpenCode && /* @__PURE__ */ jsx(CodeSearch, {
|
|
9775
|
+
initialQuery: suggestedSearch(selection),
|
|
9776
|
+
onOpenMatch: (match) => onOpenCode({
|
|
9777
|
+
request: {
|
|
9778
|
+
column: null,
|
|
9779
|
+
fileName: match.absolutePath,
|
|
9780
|
+
line: match.line
|
|
9781
|
+
},
|
|
9782
|
+
title: selection.label
|
|
9783
|
+
})
|
|
9761
9784
|
})
|
|
9762
|
-
|
|
9763
|
-
|
|
9785
|
+
]
|
|
9786
|
+
});
|
|
9764
9787
|
}
|
|
9765
9788
|
function FeedbackCard({ item, onOpenCode, onShowSelector }) {
|
|
9766
9789
|
const selections = item.context?.selections ?? [];
|
|
@@ -12415,6 +12438,25 @@ const DEVTOOLS_STYLES = `
|
|
|
12415
12438
|
.dt-source:hover { text-decoration: underline; }
|
|
12416
12439
|
.dt-thumb { display: block; align-self: flex-start; max-width: 100%; height: auto; max-height: 132px; object-fit: contain; border-radius: var(--dt-radius-field); box-shadow: var(--rf-shadow-inset); }
|
|
12417
12440
|
.dt-actions { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
12441
|
+
.dt-openable { position: relative; transition: background-color 120ms var(--rf-ease); }
|
|
12442
|
+
.dt-openable:has(.dt-open):hover { background: var(--rf-bg-hover); }
|
|
12443
|
+
.dt-open { padding: 0; text-align: left; }
|
|
12444
|
+
a.dt-open { color: inherit; text-decoration: none; }
|
|
12445
|
+
.dt-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
|
|
12446
|
+
.dt-open:focus-visible { outline: none; }
|
|
12447
|
+
.dt-open:focus-visible::after { outline: 2px solid var(--rf-accent); outline-offset: -2px; }
|
|
12448
|
+
.dt-card-title > .dt-open { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
12449
|
+
.dt-selection { display: flex; flex-direction: column; gap: 4px; margin-inline: -6px; padding: 6px; border-radius: var(--dt-radius-field); }
|
|
12450
|
+
.dt-openable :is(a, button, input, select, textarea):not(.dt-open) { position: relative; z-index: 1; }
|
|
12451
|
+
.dt-hover-actions {
|
|
12452
|
+
position: absolute; top: 6px; right: 6px; z-index: 2; display: flex; gap: 4px; opacity: 0;
|
|
12453
|
+
transition: opacity 120ms var(--rf-ease);
|
|
12454
|
+
}
|
|
12455
|
+
.dt-hover-actions > .icon-btn { width: 28px; height: 28px; }
|
|
12456
|
+
.dt-hover-actions svg { width: 14px; height: 14px; }
|
|
12457
|
+
.dt-openable:hover > .dt-hover-actions, .dt-hover-actions:focus-within { opacity: 1; }
|
|
12458
|
+
.dt-card:has(> .dt-hover-actions):not(:has(> .dt-thumb)) > .dt-card-head { padding-right: 66px; }
|
|
12459
|
+
@media (hover: none) { .dt-hover-actions { opacity: 1; } }
|
|
12418
12460
|
.dt-btn {
|
|
12419
12461
|
display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
|
|
12420
12462
|
border-radius: var(--rf-pill); background: var(--rf-bg-hover); color: var(--rf-text);
|
|
@@ -12972,9 +13014,26 @@ function NoteEditor({ initialText, noteId, onDone }) {
|
|
|
12972
13014
|
})]
|
|
12973
13015
|
})] });
|
|
12974
13016
|
}
|
|
12975
|
-
function
|
|
13017
|
+
function NoteTitle({ note, onShowOnPage, pageLink }) {
|
|
12976
13018
|
const { selection } = note;
|
|
12977
13019
|
const owner = selection.componentStack[0];
|
|
13020
|
+
const title = owner ? `<${owner}> ${selection.label}` : selection.label;
|
|
13021
|
+
if (onShowOnPage) return /* @__PURE__ */ jsx("button", {
|
|
13022
|
+
className: "dt-open",
|
|
13023
|
+
onClick: onShowOnPage,
|
|
13024
|
+
title: "Show on page",
|
|
13025
|
+
type: "button",
|
|
13026
|
+
children: title
|
|
13027
|
+
});
|
|
13028
|
+
if (pageLink) return /* @__PURE__ */ jsx("a", {
|
|
13029
|
+
className: "dt-open",
|
|
13030
|
+
href: note.capturedContext.url,
|
|
13031
|
+
title: "Open page",
|
|
13032
|
+
children: title
|
|
13033
|
+
});
|
|
13034
|
+
return title;
|
|
13035
|
+
}
|
|
13036
|
+
function NoteCardHead({ isSending, note, onShowOnPage, pageLink, pinNumber }) {
|
|
12978
13037
|
return /* @__PURE__ */ jsxs("div", {
|
|
12979
13038
|
className: "dt-card-head",
|
|
12980
13039
|
children: [
|
|
@@ -12985,7 +13044,11 @@ function NoteCardHead({ isSending, note, pinNumber }) {
|
|
|
12985
13044
|
}),
|
|
12986
13045
|
/* @__PURE__ */ jsx("h3", {
|
|
12987
13046
|
className: "dt-card-title",
|
|
12988
|
-
children:
|
|
13047
|
+
children: /* @__PURE__ */ jsx(NoteTitle, {
|
|
13048
|
+
note,
|
|
13049
|
+
onShowOnPage,
|
|
13050
|
+
pageLink
|
|
13051
|
+
})
|
|
12989
13052
|
}),
|
|
12990
13053
|
isSending && /* @__PURE__ */ jsx("span", {
|
|
12991
13054
|
className: "dt-chip",
|
|
@@ -13022,36 +13085,25 @@ function NoteSourceLine({ isLocating, note, onOpenCode }) {
|
|
|
13022
13085
|
children: selection.region ?? selection.selector
|
|
13023
13086
|
});
|
|
13024
13087
|
}
|
|
13025
|
-
function
|
|
13088
|
+
function NoteHoverActions({ isSending, note, onEdit }) {
|
|
13026
13089
|
return /* @__PURE__ */ jsxs("div", {
|
|
13027
|
-
className: "dt-actions",
|
|
13028
|
-
children: [
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
})
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
children: "Edit"
|
|
13045
|
-
}),
|
|
13046
|
-
/* @__PURE__ */ jsx("button", {
|
|
13047
|
-
className: "dt-btn",
|
|
13048
|
-
"data-variant": "danger",
|
|
13049
|
-
disabled: isSending,
|
|
13050
|
-
onClick: () => deleteNote(note),
|
|
13051
|
-
type: "button",
|
|
13052
|
-
children: "Delete"
|
|
13053
|
-
})
|
|
13054
|
-
]
|
|
13090
|
+
className: "dt-hover-actions",
|
|
13091
|
+
children: [!(note.sent || isSending) && /* @__PURE__ */ jsx("button", {
|
|
13092
|
+
"aria-label": "Edit note",
|
|
13093
|
+
className: "icon-btn glass",
|
|
13094
|
+
onClick: onEdit,
|
|
13095
|
+
title: "Edit note",
|
|
13096
|
+
type: "button",
|
|
13097
|
+
children: /* @__PURE__ */ jsx(PencilIcon, {})
|
|
13098
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
13099
|
+
"aria-label": "Delete note",
|
|
13100
|
+
className: "icon-btn glass",
|
|
13101
|
+
disabled: isSending,
|
|
13102
|
+
onClick: () => deleteNote(note),
|
|
13103
|
+
title: "Delete note",
|
|
13104
|
+
type: "button",
|
|
13105
|
+
children: /* @__PURE__ */ jsx(TrashIcon, {})
|
|
13106
|
+
})]
|
|
13055
13107
|
});
|
|
13056
13108
|
}
|
|
13057
13109
|
function NoteCard({ isLocating, isSending = false, note, onOpenCode, onShowSelector, pageLink, pinNumber }) {
|
|
@@ -13060,7 +13112,7 @@ function NoteCard({ isLocating, isSending = false, note, onOpenCode, onShowSelec
|
|
|
13060
13112
|
const closeUp = useCloseUpPreview(note.id, isLocating);
|
|
13061
13113
|
const showOnPage = onShowSelector ? () => setIsOffPage(!onShowSelector(note.selection.selector)) : void 0;
|
|
13062
13114
|
return /* @__PURE__ */ jsxs("article", {
|
|
13063
|
-
className: "dt-card",
|
|
13115
|
+
className: "dt-card dt-openable",
|
|
13064
13116
|
"data-sent": Boolean(note.sent),
|
|
13065
13117
|
children: [
|
|
13066
13118
|
closeUp && /* @__PURE__ */ jsx("img", {
|
|
@@ -13073,6 +13125,8 @@ function NoteCard({ isLocating, isSending = false, note, onOpenCode, onShowSelec
|
|
|
13073
13125
|
/* @__PURE__ */ jsx(NoteCardHead, {
|
|
13074
13126
|
isSending,
|
|
13075
13127
|
note,
|
|
13128
|
+
onShowOnPage: showOnPage,
|
|
13129
|
+
pageLink,
|
|
13076
13130
|
pinNumber
|
|
13077
13131
|
}),
|
|
13078
13132
|
/* @__PURE__ */ jsx(NoteSourceLine, {
|
|
@@ -13092,12 +13146,10 @@ function NoteCard({ isLocating, isSending = false, note, onOpenCode, onShowSelec
|
|
|
13092
13146
|
className: "dt-meta",
|
|
13093
13147
|
children: "The element is not on the page right now."
|
|
13094
13148
|
}),
|
|
13095
|
-
!isEditing && /* @__PURE__ */ jsx(
|
|
13149
|
+
!isEditing && /* @__PURE__ */ jsx(NoteHoverActions, {
|
|
13096
13150
|
isSending,
|
|
13097
13151
|
note,
|
|
13098
|
-
onEdit: () => setIsEditing(true)
|
|
13099
|
-
onShowSelector: showOnPage,
|
|
13100
|
-
pageLink
|
|
13152
|
+
onEdit: () => setIsEditing(true)
|
|
13101
13153
|
})
|
|
13102
13154
|
]
|
|
13103
13155
|
});
|
|
@@ -13543,4 +13595,4 @@ function useSheetTab() {
|
|
|
13543
13595
|
//#endregion
|
|
13544
13596
|
export { sessionSheetPlace as A, teamTransport as B, AccountFooter as C, MissingRouteHint as D, MISSING_SECRET_KEY_HINT as E, useWorkspaceLoader as F, SessionApiError as G, disconnectBoard as H, purgeAccount as I, reportFailure as J, sessionApiErrorSchema as K, bridgeBoardCall as L, RecordingLayer as M, SessionWorkspaceProvider as N, SESSIONS_STYLES as O, failureMessage as P, bridgeTransport as R, InboxPanel as S, CONNECT_REQUIREMENT as T, probeDevRoute as U, callReflet as V, startBoardConnect as W, DevtoolsBarButtons as _, NotePicker as a, CodeTab as b, isActiveNote as c, useNotes as d, findOnPage as f, DevtoolsBar as g, DevtoolsSheet as h, NotesPanel as i, useSessionNavigation as j, SessionsPanel as k, isNoteOnPage as l, DEVTOOLS_STYLES as m, useSheetTab as n, enrichNote as o, usePageHighlight as p, Notices as q, NotePins as r, hasTriedToLocate as s, FIRST_SHEET_TAB as t, unsentNoteCount as u, SHEET_TABS as v, AccountNote as w, useCodeLookup as x, SessionsBarButton as y, devtoolsTransport as z };
|
|
13545
13597
|
|
|
13546
|
-
//# sourceMappingURL=use-sheet-tab-
|
|
13598
|
+
//# sourceMappingURL=use-sheet-tab-B-q4G0Hn.js.map
|