@spotlightjs/overlay 2.4.0-next.2 → 2.4.0-next.4
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/{index-dcda5286.js → index-019c1b35.js} +46 -43
- package/dist/index-019c1b35.js.map +1 -0
- package/dist/{main-3ec58c54.js → main-fcd9d91e.js} +2 -2
- package/dist/{main-3ec58c54.js.map → main-fcd9d91e.js.map} +1 -1
- package/dist/sentry-spotlight.iife.js +7 -7
- package/dist/sentry-spotlight.iife.js.map +1 -1
- package/dist/sentry-spotlight.js +1 -1
- package/dist/src/integrations/sentry/data/sentryDataCache.d.ts +1 -1
- package/package.json +1 -1
- package/dist/index-dcda5286.js.map +0 -1
|
@@ -2206,7 +2206,10 @@ class Np {
|
|
|
2206
2206
|
t.forEach((n) => this.pushEvent(n));
|
|
2207
2207
|
}
|
|
2208
2208
|
setSidecarUrl(t) {
|
|
2209
|
-
|
|
2209
|
+
if (!t) {
|
|
2210
|
+
this.contextLinesProvider = null;
|
|
2211
|
+
return;
|
|
2212
|
+
}
|
|
2210
2213
|
const { origin: n } = new URL(t);
|
|
2211
2214
|
this.contextLinesProvider = n + bu;
|
|
2212
2215
|
}
|
|
@@ -2371,7 +2374,7 @@ class Np {
|
|
|
2371
2374
|
);
|
|
2372
2375
|
}
|
|
2373
2376
|
}
|
|
2374
|
-
const
|
|
2377
|
+
const se = new Np();
|
|
2375
2378
|
function pp(e) {
|
|
2376
2379
|
return e.type != "transaction";
|
|
2377
2380
|
}
|
|
@@ -2648,7 +2651,7 @@ const Bp = (e) => {
|
|
|
2648
2651
|
if (Yp(n))
|
|
2649
2652
|
return null;
|
|
2650
2653
|
const r = (s = (i = n.contexts) == null ? void 0 : i.trace) == null ? void 0 : s.trace_id;
|
|
2651
|
-
return r &&
|
|
2654
|
+
return r && se.trackLocalTrace(r), n;
|
|
2652
2655
|
},
|
|
2653
2656
|
afterAllSetup: (n) => {
|
|
2654
2657
|
Fp(n, t);
|
|
@@ -3059,9 +3062,9 @@ function Jp(e, t) {
|
|
|
3059
3062
|
return e;
|
|
3060
3063
|
}
|
|
3061
3064
|
const bi = ({ children: e }) => {
|
|
3062
|
-
const [t, n] = P.useReducer(Jp,
|
|
3065
|
+
const [t, n] = P.useReducer(Jp, se.getEvents());
|
|
3063
3066
|
P.useEffect(
|
|
3064
|
-
() =>
|
|
3067
|
+
() => se.subscribe("event", (i) => {
|
|
3065
3068
|
n({ action: "APPEND", e: i });
|
|
3066
3069
|
}),
|
|
3067
3070
|
[]
|
|
@@ -3072,10 +3075,10 @@ const bi = ({ children: e }) => {
|
|
|
3072
3075
|
};
|
|
3073
3076
|
return /* @__PURE__ */ T.jsx(jn.Provider, { value: r, children: e });
|
|
3074
3077
|
}, Hi = () => (P.useContext(jn), {
|
|
3075
|
-
isLocalToSession: (e) =>
|
|
3078
|
+
isLocalToSession: (e) => se.isTraceLocal(e)
|
|
3076
3079
|
}), Zp = () => {
|
|
3077
3080
|
P.useContext(jn);
|
|
3078
|
-
const e = Hi(), t =
|
|
3081
|
+
const e = Hi(), t = se.getEnvelopes(), n = t.filter(({ envelope: r }) => {
|
|
3079
3082
|
var s;
|
|
3080
3083
|
const { trace_id: i } = ((s = r[0]) == null ? void 0 : s.trace) || {};
|
|
3081
3084
|
return i ? e.isLocalToSession(i) !== !1 : !1;
|
|
@@ -3221,7 +3224,7 @@ function hl(e) {
|
|
|
3221
3224
|
}
|
|
3222
3225
|
);
|
|
3223
3226
|
}
|
|
3224
|
-
const oO = P.lazy(() => import("./main-
|
|
3227
|
+
const oO = P.lazy(() => import("./main-fcd9d91e.js").then((e) => e.m)), EO = () => {
|
|
3225
3228
|
};
|
|
3226
3229
|
function Eo({
|
|
3227
3230
|
data: e,
|
|
@@ -3307,7 +3310,7 @@ function lO({ data: e }) {
|
|
|
3307
3310
|
] });
|
|
3308
3311
|
}
|
|
3309
3312
|
function Zu() {
|
|
3310
|
-
const { eventId: e } = Mr(), t = Pa(), n = Hi(), [r, i] = Zp(), s = r.length - i.length, [a, o] = P.useState(!t.experiments["sentry:focus-local-events"]), E = e &&
|
|
3313
|
+
const { eventId: e } = Mr(), t = Pa(), n = Hi(), [r, i] = Zp(), s = r.length - i.length, [a, o] = P.useState(!t.experiments["sentry:focus-local-events"]), E = e && se.getEnvelopes().find(({ envelope: l }) => l[0].event_id === e) || null;
|
|
3311
3314
|
return r != null && r.length ? /* @__PURE__ */ T.jsxs(T.Fragment, { children: [
|
|
3312
3315
|
s > 0 && !a && /* @__PURE__ */ T.jsx(
|
|
3313
3316
|
Da,
|
|
@@ -3364,7 +3367,7 @@ function uO() {
|
|
|
3364
3367
|
function Cl(e) {
|
|
3365
3368
|
return /* @__PURE__ */ T.jsx("div", { className: "divide-primary-900 border-primary-900 bg-primary-950 divide-y border-y", ...e });
|
|
3366
3369
|
}
|
|
3367
|
-
const Ll = () => (P.useContext(jn),
|
|
3370
|
+
const Ll = () => (P.useContext(jn), se.getEvents()), TO = ({
|
|
3368
3371
|
title: e,
|
|
3369
3372
|
titleId: t,
|
|
3370
3373
|
...n
|
|
@@ -3684,7 +3687,7 @@ function xO() {
|
|
|
3684
3687
|
const { eventId: e } = Mr(), [t, n] = P.useState("details");
|
|
3685
3688
|
if (!e)
|
|
3686
3689
|
return /* @__PURE__ */ T.jsx("p", { className: "text-primary-300 p-6", children: "Unknown event id" });
|
|
3687
|
-
const r =
|
|
3690
|
+
const r = se.getEventById(e);
|
|
3688
3691
|
if (!r)
|
|
3689
3692
|
return /* @__PURE__ */ T.jsx("p", { className: "text-primary-300 p-6", children: "Event not found." });
|
|
3690
3693
|
const i = [
|
|
@@ -3743,7 +3746,7 @@ function wO() {
|
|
|
3743
3746
|
}
|
|
3744
3747
|
const ga = () => {
|
|
3745
3748
|
P.useContext(jn);
|
|
3746
|
-
const e = Hi(), t =
|
|
3749
|
+
const e = Hi(), t = se.getTraces(), n = t.filter((s) => e.isLocalToSession(s.trace_id) !== !1), r = t.reduce((s, a) => [...s, ...a.spans], []), i = n.reduce((s, a) => [...s, ...a.spans], []);
|
|
3747
3750
|
return [r, i];
|
|
3748
3751
|
}, Ma = ({
|
|
3749
3752
|
title: e,
|
|
@@ -4887,7 +4890,7 @@ function uI() {
|
|
|
4887
4890
|
function TI() {
|
|
4888
4891
|
return /* @__PURE__ */ T.jsx(bi, { children: /* @__PURE__ */ T.jsx(pn, { children: /* @__PURE__ */ T.jsx(fe, { path: "/*", element: /* @__PURE__ */ T.jsx(uI, {}) }) }) });
|
|
4889
4892
|
}
|
|
4890
|
-
const AI = () => (P.useContext(jn),
|
|
4893
|
+
const AI = () => (P.useContext(jn), se.getSdks());
|
|
4891
4894
|
function cI() {
|
|
4892
4895
|
const e = AI();
|
|
4893
4896
|
return /* @__PURE__ */ T.jsx(T.Fragment, { children: e.length !== 0 ? /* @__PURE__ */ T.jsx(Cl, { children: e.map((t) => /* @__PURE__ */ T.jsxs("div", { className: "flex items-center gap-x-4 px-6 py-2", children: [
|
|
@@ -4902,7 +4905,7 @@ function cI() {
|
|
|
4902
4905
|
function RI() {
|
|
4903
4906
|
return /* @__PURE__ */ T.jsx(bi, { children: /* @__PURE__ */ T.jsx(pn, { children: /* @__PURE__ */ T.jsx(fe, { path: "/", element: /* @__PURE__ */ T.jsx(cI, {}) }) }) });
|
|
4904
4907
|
}
|
|
4905
|
-
const SI = () => (P.useContext(jn),
|
|
4908
|
+
const SI = () => (P.useContext(jn), se.getTraces());
|
|
4906
4909
|
function fI(e) {
|
|
4907
4910
|
return [...new Set((e.transactions || []).map((t) => {
|
|
4908
4911
|
var n;
|
|
@@ -15850,7 +15853,7 @@ function s1({
|
|
|
15850
15853
|
totalTransactions: i
|
|
15851
15854
|
}) {
|
|
15852
15855
|
var l, u;
|
|
15853
|
-
const [s, a] = P.useState(50), o = Or(t.start_timestamp, t.timestamp), E =
|
|
15856
|
+
const [s, a] = P.useState(50), o = Or(t.start_timestamp, t.timestamp), E = se.getEventsByTrace(t.trace_id).filter((c) => c.type !== "transaction" && "exception" in c);
|
|
15854
15857
|
return /* @__PURE__ */ T.jsxs(hl, { backto: `/traces/${t.trace_id}`, children: [
|
|
15855
15858
|
/* @__PURE__ */ T.jsx(
|
|
15856
15859
|
_l,
|
|
@@ -15999,7 +16002,7 @@ function o1({ trace: e }) {
|
|
|
15999
16002
|
] });
|
|
16000
16003
|
}
|
|
16001
16004
|
function E1({ traceContext: e }) {
|
|
16002
|
-
const t = e.trace_id, n =
|
|
16005
|
+
const t = e.trace_id, n = se.getTraceById(t);
|
|
16003
16006
|
return /* @__PURE__ */ T.jsxs(hl, { backto: `/traces/${t}`, children: [
|
|
16004
16007
|
/* @__PURE__ */ T.jsx(
|
|
16005
16008
|
_l,
|
|
@@ -16042,14 +16045,14 @@ function co() {
|
|
|
16042
16045
|
const { traceId: e, spanId: t } = Mr(), { pathname: n } = Xn(), [r, i] = P.useState(50);
|
|
16043
16046
|
if (!e)
|
|
16044
16047
|
return /* @__PURE__ */ T.jsx("p", { className: "text-primary-300 p-6", children: "Unknown trace id" });
|
|
16045
|
-
const s =
|
|
16048
|
+
const s = se.getTraceById(e);
|
|
16046
16049
|
if (!s)
|
|
16047
16050
|
return /* @__PURE__ */ T.jsxs("p", { className: "text-primary-300 p-6", children: [
|
|
16048
16051
|
"Trace not found. Check for more",
|
|
16049
16052
|
" ",
|
|
16050
16053
|
/* @__PURE__ */ T.jsx(me, { to: "/traces", className: "underline", children: "traces" })
|
|
16051
16054
|
] });
|
|
16052
|
-
const a = t ?
|
|
16055
|
+
const a = t ? se.getSpanById(s.trace_id, t) : void 0, o = n === `/traces/${e}/info`, E = s.start_timestamp, l = s.timestamp - E;
|
|
16053
16056
|
return /* @__PURE__ */ T.jsxs(T.Fragment, { children: [
|
|
16054
16057
|
/* @__PURE__ */ T.jsx(l1, { trace: s }),
|
|
16055
16058
|
/* @__PURE__ */ T.jsx("div", { className: "px-6 py-4", children: /* @__PURE__ */ T.jsxs("div", { className: "text-primary-300 flex flex-1 items-center gap-x-1", children: [
|
|
@@ -16108,12 +16111,12 @@ function T1(e = {}) {
|
|
|
16108
16111
|
name: "sentry",
|
|
16109
16112
|
forwardedContentType: [xT],
|
|
16110
16113
|
setup: ({ open: t }) => {
|
|
16111
|
-
e.retries == null && (e.retries = 3), e.sidecarUrl
|
|
16114
|
+
e.retries == null && (e.retries = 3), e.sidecarUrl ? se.setSidecarUrl(e.sidecarUrl) : "sidecarUrl" in e && se.setSidecarUrl(null), jR(e), e.openLastError && se.subscribe("event", (i) => {
|
|
16112
16115
|
i.exception && setTimeout(() => t(`/errors/${i.event_id}`), 0);
|
|
16113
16116
|
});
|
|
16114
16117
|
const n = (i) => {
|
|
16115
16118
|
const { event_id: s, event: a } = i.detail;
|
|
16116
|
-
ee("Sentry Event", s), a &&
|
|
16119
|
+
ee("Sentry Event", s), a && se.pushEvent(a).then(() => t(`/errors/${a.event_id}`));
|
|
16117
16120
|
};
|
|
16118
16121
|
Ai("sentry:showError", n);
|
|
16119
16122
|
const r = (i) => {
|
|
@@ -16128,12 +16131,12 @@ function T1(e = {}) {
|
|
|
16128
16131
|
},
|
|
16129
16132
|
processEvent: (t) => wT(t),
|
|
16130
16133
|
tabs: () => {
|
|
16131
|
-
const t =
|
|
16134
|
+
const t = se.getEvents().filter(
|
|
16132
16135
|
(r) => {
|
|
16133
16136
|
var i, s, a, o;
|
|
16134
|
-
return r.type != "transaction" && ((s = (i = r.contexts) == null ? void 0 : i.trace) != null && s.trace_id ?
|
|
16137
|
+
return r.type != "transaction" && ((s = (i = r.contexts) == null ? void 0 : i.trace) != null && s.trace_id ? se.isTraceLocal((o = (a = r.contexts) == null ? void 0 : a.trace) == null ? void 0 : o.trace_id) : null) !== !1;
|
|
16135
16138
|
}
|
|
16136
|
-
).length, n =
|
|
16139
|
+
).length, n = se.getTraces().filter((r) => se.isTraceLocal(r.trace_id) !== !1);
|
|
16137
16140
|
return [
|
|
16138
16141
|
{
|
|
16139
16142
|
id: "errors",
|
|
@@ -16170,7 +16173,7 @@ function T1(e = {}) {
|
|
|
16170
16173
|
];
|
|
16171
16174
|
},
|
|
16172
16175
|
reset: () => {
|
|
16173
|
-
|
|
16176
|
+
se.resetData();
|
|
16174
16177
|
}
|
|
16175
16178
|
};
|
|
16176
16179
|
}
|
|
@@ -16200,7 +16203,7 @@ function wT(e) {
|
|
|
16200
16203
|
o.type && typeof l == "object" && (l.type = o.type), s.push([o, l]);
|
|
16201
16204
|
}
|
|
16202
16205
|
const a = [i, s];
|
|
16203
|
-
return
|
|
16206
|
+
return se.pushEnvelope({ envelope: a, rawEnvelope: e }), {
|
|
16204
16207
|
event: a,
|
|
16205
16208
|
rawEvent: e
|
|
16206
16209
|
};
|
|
@@ -18468,7 +18471,7 @@ var YE = [], ar = -1;
|
|
|
18468
18471
|
function In(e) {
|
|
18469
18472
|
return { current: e };
|
|
18470
18473
|
}
|
|
18471
|
-
function
|
|
18474
|
+
function ae(e) {
|
|
18472
18475
|
0 > ar || (e.current = YE[ar], YE[ar] = null, ar--);
|
|
18473
18476
|
}
|
|
18474
18477
|
function ne(e, t) {
|
|
@@ -18491,7 +18494,7 @@ function ze(e) {
|
|
|
18491
18494
|
return e = e.childContextTypes, e != null;
|
|
18492
18495
|
}
|
|
18493
18496
|
function $s() {
|
|
18494
|
-
|
|
18497
|
+
ae(Ze), ae(He);
|
|
18495
18498
|
}
|
|
18496
18499
|
function AA(e, t, n) {
|
|
18497
18500
|
if (He.current !== dn)
|
|
@@ -18515,7 +18518,7 @@ function cA(e, t, n) {
|
|
|
18515
18518
|
var r = e.stateNode;
|
|
18516
18519
|
if (!r)
|
|
18517
18520
|
throw Error(H(169));
|
|
18518
|
-
n ? (e = XS(e, t, bn), r.__reactInternalMemoizedMergedChildContext = e,
|
|
18521
|
+
n ? (e = XS(e, t, bn), r.__reactInternalMemoizedMergedChildContext = e, ae(Ze), ae(He), ne(He, e)) : ae(Ze), ne(Ze, n);
|
|
18519
18522
|
}
|
|
18520
18523
|
var vt = null, Ha = !1, vo = !1;
|
|
18521
18524
|
function jS(e) {
|
|
@@ -18678,7 +18681,7 @@ function zl() {
|
|
|
18678
18681
|
}
|
|
18679
18682
|
function Ql(e) {
|
|
18680
18683
|
var t = ra.current;
|
|
18681
|
-
|
|
18684
|
+
ae(ra), e._currentValue = t;
|
|
18682
18685
|
}
|
|
18683
18686
|
function WE(e, t, n) {
|
|
18684
18687
|
for (; e !== null; ) {
|
|
@@ -19129,10 +19132,10 @@ function eu(e, t) {
|
|
|
19129
19132
|
default:
|
|
19130
19133
|
e = e === 8 ? t.parentNode : t, t = e.namespaceURI || null, e = e.tagName, t = CE(t, e);
|
|
19131
19134
|
}
|
|
19132
|
-
|
|
19135
|
+
ae(gt), ne(gt, t);
|
|
19133
19136
|
}
|
|
19134
19137
|
function Lr() {
|
|
19135
|
-
|
|
19138
|
+
ae(gt), ae(Ci), ae(Li);
|
|
19136
19139
|
}
|
|
19137
19140
|
function nf(e) {
|
|
19138
19141
|
yn(Li.current);
|
|
@@ -19140,7 +19143,7 @@ function nf(e) {
|
|
|
19140
19143
|
t !== n && (ne(Ci, e), ne(gt, n));
|
|
19141
19144
|
}
|
|
19142
19145
|
function tu(e) {
|
|
19143
|
-
Ci.current === e && (
|
|
19146
|
+
Ci.current === e && (ae(gt), ae(Ci));
|
|
19144
19147
|
}
|
|
19145
19148
|
var le = In(0);
|
|
19146
19149
|
function aa(e) {
|
|
@@ -20019,7 +20022,7 @@ function zL(e, t, n) {
|
|
|
20019
20022
|
case 1:
|
|
20020
20023
|
return ze(t.type) && $s(), xe(t), null;
|
|
20021
20024
|
case 3:
|
|
20022
|
-
return r = t.stateNode, Lr(),
|
|
20025
|
+
return r = t.stateNode, Lr(), ae(Ze), ae(He), nu(), r.pendingContext && (r.context = r.pendingContext, r.pendingContext = null), (e === null || e.child === null) && (ls(t) ? t.flags |= 4 : e === null || e.memoizedState.isDehydrated && !(t.flags & 256) || (t.flags |= 1024, St !== null && (al(St), St = null))), qE(e, t), xe(t), null;
|
|
20023
20026
|
case 5:
|
|
20024
20027
|
tu(t);
|
|
20025
20028
|
var i = yn(Li.current);
|
|
@@ -20209,7 +20212,7 @@ function zL(e, t, n) {
|
|
|
20209
20212
|
}
|
|
20210
20213
|
return xe(t), null;
|
|
20211
20214
|
case 13:
|
|
20212
|
-
if (
|
|
20215
|
+
if (ae(le), r = t.memoizedState, e === null || e.memoizedState !== null && e.memoizedState.dehydrated !== null) {
|
|
20213
20216
|
if (oe && et !== null && t.mode & 1 && !(t.flags & 128))
|
|
20214
20217
|
ZS(), hr(), t.flags |= 98560, s = !1;
|
|
20215
20218
|
else if (s = ls(t), r !== null && r.dehydrated !== null) {
|
|
@@ -20235,7 +20238,7 @@ function zL(e, t, n) {
|
|
|
20235
20238
|
case 17:
|
|
20236
20239
|
return ze(t.type) && $s(), xe(t), null;
|
|
20237
20240
|
case 19:
|
|
20238
|
-
if (
|
|
20241
|
+
if (ae(le), s = t.memoizedState, s === null)
|
|
20239
20242
|
return xe(t), null;
|
|
20240
20243
|
if (r = (t.flags & 128) !== 0, a = s.rendering, a === null)
|
|
20241
20244
|
if (r)
|
|
@@ -20277,18 +20280,18 @@ function QL(e, t) {
|
|
|
20277
20280
|
case 1:
|
|
20278
20281
|
return ze(t.type) && $s(), e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
|
|
20279
20282
|
case 3:
|
|
20280
|
-
return Lr(),
|
|
20283
|
+
return Lr(), ae(Ze), ae(He), nu(), e = t.flags, e & 65536 && !(e & 128) ? (t.flags = e & -65537 | 128, t) : null;
|
|
20281
20284
|
case 5:
|
|
20282
20285
|
return tu(t), null;
|
|
20283
20286
|
case 13:
|
|
20284
|
-
if (
|
|
20287
|
+
if (ae(le), e = t.memoizedState, e !== null && e.dehydrated !== null) {
|
|
20285
20288
|
if (t.alternate === null)
|
|
20286
20289
|
throw Error(H(340));
|
|
20287
20290
|
hr();
|
|
20288
20291
|
}
|
|
20289
20292
|
return e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
|
|
20290
20293
|
case 19:
|
|
20291
|
-
return
|
|
20294
|
+
return ae(le), null;
|
|
20292
20295
|
case 4:
|
|
20293
20296
|
return Lr(), null;
|
|
20294
20297
|
case 10:
|
|
@@ -21190,7 +21193,7 @@ function Yn(e) {
|
|
|
21190
21193
|
}
|
|
21191
21194
|
}
|
|
21192
21195
|
function cu() {
|
|
21193
|
-
$e = Tr.current,
|
|
21196
|
+
$e = Tr.current, ae(Tr);
|
|
21194
21197
|
}
|
|
21195
21198
|
function Un(e, t) {
|
|
21196
21199
|
e.finishedWork = null, e.finishedLanes = 0;
|
|
@@ -21203,7 +21206,7 @@ function Un(e, t) {
|
|
|
21203
21206
|
r = r.type.childContextTypes, r != null && $s();
|
|
21204
21207
|
break;
|
|
21205
21208
|
case 3:
|
|
21206
|
-
Lr(),
|
|
21209
|
+
Lr(), ae(Ze), ae(He), nu();
|
|
21207
21210
|
break;
|
|
21208
21211
|
case 5:
|
|
21209
21212
|
tu(r);
|
|
@@ -21212,10 +21215,10 @@ function Un(e, t) {
|
|
|
21212
21215
|
Lr();
|
|
21213
21216
|
break;
|
|
21214
21217
|
case 13:
|
|
21215
|
-
|
|
21218
|
+
ae(le);
|
|
21216
21219
|
break;
|
|
21217
21220
|
case 19:
|
|
21218
|
-
|
|
21221
|
+
ae(le);
|
|
21219
21222
|
break;
|
|
21220
21223
|
case 10:
|
|
21221
21224
|
Ql(r.type._context);
|
|
@@ -27249,4 +27252,4 @@ export {
|
|
|
27249
27252
|
lR as t,
|
|
27250
27253
|
zP as v
|
|
27251
27254
|
};
|
|
27252
|
-
//# sourceMappingURL=index-
|
|
27255
|
+
//# sourceMappingURL=index-019c1b35.js.map
|