@tanstack/router-devtools-core 1.167.0 → 1.167.2
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/{BaseTanStackRouterDevtoolsPanel-DwUaC87U.js → BaseTanStackRouterDevtoolsPanel-BYamTwOT.js} +263 -59
- package/dist/BaseTanStackRouterDevtoolsPanel-BYamTwOT.js.map +1 -0
- package/dist/{BaseTanStackRouterDevtoolsPanel-BlI6Kawa.cjs → BaseTanStackRouterDevtoolsPanel-CKR5l6C5.cjs} +263 -60
- package/dist/BaseTanStackRouterDevtoolsPanel-CKR5l6C5.cjs.map +1 -0
- package/dist/{FloatingTanStackRouterDevtools-U4pxMObm.js → FloatingTanStackRouterDevtools-5lmIMjR6.js} +2 -2
- package/dist/{FloatingTanStackRouterDevtools-U4pxMObm.js.map → FloatingTanStackRouterDevtools-5lmIMjR6.js.map} +1 -1
- package/dist/{FloatingTanStackRouterDevtools-M-UhaKLc.cjs → FloatingTanStackRouterDevtools-eF_9_NhU.cjs} +2 -2
- package/dist/{FloatingTanStackRouterDevtools-M-UhaKLc.cjs.map → FloatingTanStackRouterDevtools-eF_9_NhU.cjs.map} +1 -1
- package/dist/cjs/Explorer.d.cts +1 -1
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/utils.d.cts +24 -0
- package/dist/esm/Explorer.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/utils.d.ts +24 -0
- package/package.json +5 -6
- package/src/BaseTanStackRouterDevtoolsPanel.tsx +6 -12
- package/src/Explorer.tsx +155 -5
- package/src/utils.tsx +129 -1
- package/dist/BaseTanStackRouterDevtoolsPanel-BlI6Kawa.cjs.map +0 -1
- package/dist/BaseTanStackRouterDevtoolsPanel-DwUaC87U.js.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { D as untrack, E as onCleanup, O as useContext, S as createSignal, T as mergeProps, _ as Switch, a as addEventListener, b as createMemo, c as insert, d as setAttribute, f as spread, g as Show, h as Match, l as memo, m as For, n as ShadowDomTargetContext, o as className, p as template, r as useDevtoolsOnClose, s as delegateEvents, v as createComponent, x as createRenderEffect, y as createEffect } from "./context-D56_tqst.js";
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
|
-
import invariant from "tiny-invariant";
|
|
4
3
|
import { interpolatePath, rootRouteId, trimPath } from "@tanstack/router-core";
|
|
5
4
|
import * as goober from "goober";
|
|
6
5
|
//#region src/tokens.ts
|
|
@@ -918,16 +917,90 @@ function useIsMounted() {
|
|
|
918
917
|
});
|
|
919
918
|
return isMounted;
|
|
920
919
|
}
|
|
920
|
+
var SERVER_COMPONENT_STREAM = Symbol.for("tanstack.rsc.stream");
|
|
921
|
+
var RENDERABLE_RSC = Symbol.for("tanstack.rsc.renderable");
|
|
922
|
+
var RSC_SLOT_USAGES = Symbol.for("tanstack.rsc.slotUsages");
|
|
923
|
+
function trimTrailingUndefined(arr) {
|
|
924
|
+
let end = arr.length;
|
|
925
|
+
while (end > 0 && arr[end - 1] === void 0) end--;
|
|
926
|
+
if (end === 0) return arr;
|
|
927
|
+
return end === arr.length ? arr : arr.slice(0, end);
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Checks if a value is any kind of server component
|
|
931
|
+
*/
|
|
932
|
+
var isServerComponent = (value) => {
|
|
933
|
+
return (typeof value === "object" || typeof value === "function") && value !== null && SERVER_COMPONENT_STREAM in value;
|
|
934
|
+
};
|
|
935
|
+
/**
|
|
936
|
+
* Gets the type of server component.
|
|
937
|
+
* - RENDERABLE_RSC === true → renderable (from renderServerComponent)
|
|
938
|
+
* - RENDERABLE_RSC === false or not present → composite (from createCompositeComponent)
|
|
939
|
+
*/
|
|
940
|
+
var getServerComponentType = (value) => {
|
|
941
|
+
if (!isServerComponent(value)) return null;
|
|
942
|
+
const v = value;
|
|
943
|
+
if (RENDERABLE_RSC in v && v[RENDERABLE_RSC] === true) return "renderableValue";
|
|
944
|
+
return "compositeSource";
|
|
945
|
+
};
|
|
946
|
+
/**
|
|
947
|
+
* Gets the slot names from a composite server component (dev only)
|
|
948
|
+
*/
|
|
949
|
+
var getServerComponentSlots = (value) => {
|
|
950
|
+
if (!isServerComponent(value)) return [];
|
|
951
|
+
const v = value;
|
|
952
|
+
const out = [];
|
|
953
|
+
if (RSC_SLOT_USAGES in v) {
|
|
954
|
+
const usages = v[RSC_SLOT_USAGES];
|
|
955
|
+
if (Array.isArray(usages)) for (const evt of usages) {
|
|
956
|
+
const name = evt?.slot;
|
|
957
|
+
if (typeof name === "string" && !out.includes(name)) out.push(name);
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
return out;
|
|
961
|
+
};
|
|
962
|
+
var getServerComponentSlotUsages = (value) => {
|
|
963
|
+
if (!isServerComponent(value)) return [];
|
|
964
|
+
const v = value;
|
|
965
|
+
if (!(RSC_SLOT_USAGES in v)) return [];
|
|
966
|
+
const usages = v[RSC_SLOT_USAGES];
|
|
967
|
+
if (!Array.isArray(usages)) return [];
|
|
968
|
+
return usages.filter((d) => {
|
|
969
|
+
return d && typeof d === "object" && typeof d.slot === "string" && (d.args === void 0 || Array.isArray(d.args));
|
|
970
|
+
});
|
|
971
|
+
};
|
|
972
|
+
var getServerComponentSlotUsageSummary = (value) => {
|
|
973
|
+
const usages = getServerComponentSlotUsages(value);
|
|
974
|
+
const out = {};
|
|
975
|
+
for (const evt of usages) {
|
|
976
|
+
const args = trimTrailingUndefined(evt.args ?? []);
|
|
977
|
+
const prev = out[evt.slot] ?? (out[evt.slot] = {
|
|
978
|
+
count: 0,
|
|
979
|
+
invocations: []
|
|
980
|
+
});
|
|
981
|
+
prev.count++;
|
|
982
|
+
prev.invocations.push(args);
|
|
983
|
+
}
|
|
984
|
+
return out;
|
|
985
|
+
};
|
|
921
986
|
/**
|
|
922
987
|
* Displays a string regardless the type of the data
|
|
923
988
|
* @param {unknown} value Value to be stringified
|
|
924
989
|
*/
|
|
925
990
|
var displayValue = (value) => {
|
|
991
|
+
if (value === "React element") return "React element";
|
|
992
|
+
const componentType = getServerComponentType(value);
|
|
993
|
+
if (componentType === "compositeSource") {
|
|
994
|
+
const slots = getServerComponentSlots(value);
|
|
995
|
+
if (slots.length > 0) return `RSC composite source (${slots.length} ${slots.length === 1 ? "slot" : "slots"})`;
|
|
996
|
+
return "RSC composite source";
|
|
997
|
+
}
|
|
998
|
+
if (componentType === "renderableValue") return "RSC renderable value";
|
|
926
999
|
const name = Object.getOwnPropertyNames(Object(value));
|
|
927
1000
|
const newValue = typeof value === "bigint" ? `${value.toString()}n` : value;
|
|
928
1001
|
try {
|
|
929
1002
|
return JSON.stringify(newValue, name);
|
|
930
|
-
} catch
|
|
1003
|
+
} catch {
|
|
931
1004
|
return `unable to stringify`;
|
|
932
1005
|
}
|
|
933
1006
|
};
|
|
@@ -948,8 +1021,8 @@ function multiSortBy(arr, accessors = [(d) => d]) {
|
|
|
948
1021
|
}
|
|
949
1022
|
//#endregion
|
|
950
1023
|
//#region src/Explorer.tsx
|
|
951
|
-
var _tmpl$$3 = /* @__PURE__ */ template(`<span><svg xmlns=http://www.w3.org/2000/svg width=12 height=12 fill=none viewBox="0 0 24 24"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 18l6-6-6-6">`), _tmpl$2$1 = /* @__PURE__ */ template(`<div>`), _tmpl$3$1 = /* @__PURE__ */ template(`<button><span
|
|
952
|
-
var Expander = ({ expanded, style = {} }) => {
|
|
1024
|
+
var _tmpl$$3 = /* @__PURE__ */ template(`<span><svg xmlns=http://www.w3.org/2000/svg width=12 height=12 fill=none viewBox="0 0 24 24"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 18l6-6-6-6">`), _tmpl$2$1 = /* @__PURE__ */ template(`<div>`), _tmpl$3$1 = /* @__PURE__ */ template(`<button><span>:</span><span>`), _tmpl$4$1 = /* @__PURE__ */ template(`<div><span>slots</span><div>`), _tmpl$5$1 = /* @__PURE__ */ template(`<span>:`), _tmpl$6$1 = /* @__PURE__ */ template(`<span>`), _tmpl$7$1 = /* @__PURE__ */ template(`<button><span> `), _tmpl$8$1 = /* @__PURE__ */ template(`<div><div><button> [<!> ... <!>]`), _tmpl$9$1 = /* @__PURE__ */ template(`<button><span></span> 🔄 `);
|
|
1025
|
+
var Expander = ({ expanded, style: _style = {} }) => {
|
|
953
1026
|
const styles = useStyles();
|
|
954
1027
|
return (() => {
|
|
955
1028
|
var _el$ = _tmpl$$3(), _el$2 = _el$.firstChild;
|
|
@@ -987,6 +1060,11 @@ function chunkArray(array, size) {
|
|
|
987
1060
|
function isIterable(x) {
|
|
988
1061
|
return Symbol.iterator in x;
|
|
989
1062
|
}
|
|
1063
|
+
function isPlainObject(value) {
|
|
1064
|
+
if (!value || typeof value !== "object") return false;
|
|
1065
|
+
const proto = Object.getPrototypeOf(value);
|
|
1066
|
+
return proto === Object.prototype || proto === null;
|
|
1067
|
+
}
|
|
990
1068
|
function Explorer({ value, defaultExpanded, pageSize = 100, filterSubEntries, ...rest }) {
|
|
991
1069
|
const [expanded, setExpanded] = createSignal(Boolean(defaultExpanded));
|
|
992
1070
|
const toggleExpanded = () => setExpanded((old) => !old);
|
|
@@ -1001,7 +1079,16 @@ function Explorer({ value, defaultExpanded, pageSize = 100, filterSubEntries, ..
|
|
|
1001
1079
|
defaultExpanded: subDefaultExpanded
|
|
1002
1080
|
};
|
|
1003
1081
|
};
|
|
1004
|
-
if (Array.isArray(value()))
|
|
1082
|
+
if (Array.isArray(value()) && value().length === 2 && value()[0] === "React element" && isPlainObject(value()[1])) {
|
|
1083
|
+
const v = value();
|
|
1084
|
+
entries = [makeProperty({
|
|
1085
|
+
label: "0",
|
|
1086
|
+
value: v[0]
|
|
1087
|
+
}), ...Object.entries(v[1]).map(([key, val]) => makeProperty({
|
|
1088
|
+
label: key,
|
|
1089
|
+
value: val
|
|
1090
|
+
}))];
|
|
1091
|
+
} else if (Array.isArray(value())) entries = value().map((d, i) => makeProperty({
|
|
1005
1092
|
label: i.toString(),
|
|
1006
1093
|
value: d
|
|
1007
1094
|
}));
|
|
@@ -1026,94 +1113,151 @@ function Explorer({ value, defaultExpanded, pageSize = 100, filterSubEntries, ..
|
|
|
1026
1113
|
value,
|
|
1027
1114
|
filterSubEntries
|
|
1028
1115
|
}, rest, entry));
|
|
1116
|
+
const serverComponentType = createMemo(() => getServerComponentType(value()));
|
|
1117
|
+
const serverComponentSlots = createMemo(() => getServerComponentSlots(value()));
|
|
1118
|
+
const serverComponentSlotUsageSummary = createMemo(() => getServerComponentSlotUsageSummary(value()));
|
|
1119
|
+
const isCompositeWithSlots = createMemo(() => serverComponentType() === "compositeSource" && serverComponentSlots().length > 0);
|
|
1029
1120
|
return (() => {
|
|
1030
1121
|
var _el$3 = _tmpl$2$1();
|
|
1031
1122
|
insert(_el$3, (() => {
|
|
1032
|
-
var _c$ = memo(() =>
|
|
1033
|
-
return () => _c$() ? [(() => {
|
|
1034
|
-
var _el$4 = _tmpl$3$1(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild;
|
|
1123
|
+
var _c$ = memo(() => serverComponentType() !== null);
|
|
1124
|
+
return () => _c$() ? memo(() => !!isCompositeWithSlots())() ? [(() => {
|
|
1125
|
+
var _el$4 = _tmpl$3$1(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling;
|
|
1035
1126
|
_el$4.$$click = () => toggleExpanded();
|
|
1036
1127
|
insert(_el$4, createComponent(Expander, { get expanded() {
|
|
1037
1128
|
return expanded() ?? false;
|
|
1038
1129
|
} }), _el$5);
|
|
1039
|
-
insert(_el$
|
|
1040
|
-
insert(_el$
|
|
1041
|
-
insert(_el$5, () => subEntries().length, _el$6);
|
|
1042
|
-
insert(_el$5, () => subEntries().length > 1 ? `items` : `item`, null);
|
|
1130
|
+
insert(_el$5, () => rest.label, _el$6);
|
|
1131
|
+
insert(_el$7, () => displayValue(value()));
|
|
1043
1132
|
createRenderEffect((_p$) => {
|
|
1044
|
-
var _v$3 = styles().expandButton, _v$4 = styles().
|
|
1133
|
+
var _v$3 = styles().expandButton, _v$4 = styles().compositeComponent;
|
|
1045
1134
|
_v$3 !== _p$.e && className(_el$4, _p$.e = _v$3);
|
|
1046
|
-
_v$4 !== _p$.t && className(_el$
|
|
1135
|
+
_v$4 !== _p$.t && className(_el$7, _p$.t = _v$4);
|
|
1047
1136
|
return _p$;
|
|
1048
1137
|
}, {
|
|
1049
1138
|
e: void 0,
|
|
1050
1139
|
t: void 0
|
|
1051
1140
|
});
|
|
1052
1141
|
return _el$4;
|
|
1142
|
+
})(), memo(() => memo(() => !!(expanded() ?? false))() ? (() => {
|
|
1143
|
+
var _el$8 = _tmpl$4$1(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
|
|
1144
|
+
insert(_el$0, () => serverComponentSlots().map((name) => {
|
|
1145
|
+
const usage = serverComponentSlotUsageSummary()[name];
|
|
1146
|
+
if (!usage) return null;
|
|
1147
|
+
return createComponent(Explorer, {
|
|
1148
|
+
label: `${name}:`,
|
|
1149
|
+
value: () => usage.invocations.map((args) => args.length === 1 ? args[0] : args)
|
|
1150
|
+
});
|
|
1151
|
+
}));
|
|
1152
|
+
createRenderEffect((_p$) => {
|
|
1153
|
+
var _v$5 = styles().rscMetaRow, _v$6 = styles().rscMetaLabel, _v$7 = styles().subEntries;
|
|
1154
|
+
_v$5 !== _p$.e && className(_el$8, _p$.e = _v$5);
|
|
1155
|
+
_v$6 !== _p$.t && className(_el$9, _p$.t = _v$6);
|
|
1156
|
+
_v$7 !== _p$.a && className(_el$0, _p$.a = _v$7);
|
|
1157
|
+
return _p$;
|
|
1158
|
+
}, {
|
|
1159
|
+
e: void 0,
|
|
1160
|
+
t: void 0,
|
|
1161
|
+
a: void 0
|
|
1162
|
+
});
|
|
1163
|
+
return _el$8;
|
|
1164
|
+
})() : null)] : [
|
|
1165
|
+
(() => {
|
|
1166
|
+
var _el$1 = _tmpl$5$1(), _el$10 = _el$1.firstChild;
|
|
1167
|
+
insert(_el$1, () => rest.label, _el$10);
|
|
1168
|
+
return _el$1;
|
|
1169
|
+
})(),
|
|
1170
|
+
" ",
|
|
1171
|
+
(() => {
|
|
1172
|
+
var _el$11 = _tmpl$6$1();
|
|
1173
|
+
insert(_el$11, () => displayValue(value()));
|
|
1174
|
+
createRenderEffect(() => className(_el$11, serverComponentType() === "compositeSource" ? styles().compositeComponent : styles().renderableComponent));
|
|
1175
|
+
return _el$11;
|
|
1176
|
+
})()
|
|
1177
|
+
] : memo(() => !!subEntryPages().length)() ? [(() => {
|
|
1178
|
+
var _el$12 = _tmpl$7$1(), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild;
|
|
1179
|
+
_el$12.$$click = () => toggleExpanded();
|
|
1180
|
+
insert(_el$12, createComponent(Expander, { get expanded() {
|
|
1181
|
+
return expanded() ?? false;
|
|
1182
|
+
} }), _el$13);
|
|
1183
|
+
insert(_el$12, () => rest.label, _el$13);
|
|
1184
|
+
insert(_el$13, () => String(type).toLowerCase() === "iterable" ? "(Iterable) " : "", _el$14);
|
|
1185
|
+
insert(_el$13, () => subEntries().length, _el$14);
|
|
1186
|
+
insert(_el$13, () => subEntries().length > 1 ? `items` : `item`, null);
|
|
1187
|
+
createRenderEffect((_p$) => {
|
|
1188
|
+
var _v$8 = styles().expandButton, _v$9 = styles().info;
|
|
1189
|
+
_v$8 !== _p$.e && className(_el$12, _p$.e = _v$8);
|
|
1190
|
+
_v$9 !== _p$.t && className(_el$13, _p$.t = _v$9);
|
|
1191
|
+
return _p$;
|
|
1192
|
+
}, {
|
|
1193
|
+
e: void 0,
|
|
1194
|
+
t: void 0
|
|
1195
|
+
});
|
|
1196
|
+
return _el$12;
|
|
1053
1197
|
})(), memo(() => memo(() => !!(expanded() ?? false))() ? memo(() => subEntryPages().length === 1)() ? (() => {
|
|
1054
|
-
var _el$
|
|
1055
|
-
insert(_el$
|
|
1056
|
-
createRenderEffect(() => className(_el$
|
|
1057
|
-
return _el$
|
|
1198
|
+
var _el$15 = _tmpl$2$1();
|
|
1199
|
+
insert(_el$15, () => subEntries().map((entry, index) => handleEntry(entry)));
|
|
1200
|
+
createRenderEffect(() => className(_el$15, styles().subEntries));
|
|
1201
|
+
return _el$15;
|
|
1058
1202
|
})() : (() => {
|
|
1059
|
-
var _el$
|
|
1060
|
-
insert(_el$
|
|
1203
|
+
var _el$16 = _tmpl$2$1();
|
|
1204
|
+
insert(_el$16, () => subEntryPages().map((entries, index) => {
|
|
1061
1205
|
return (() => {
|
|
1062
|
-
var _el$
|
|
1063
|
-
_el$
|
|
1064
|
-
_el$
|
|
1065
|
-
insert(_el$
|
|
1206
|
+
var _el$17 = _tmpl$8$1(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$25 = _el$20.nextSibling, _el$26 = _el$25.nextSibling.nextSibling;
|
|
1207
|
+
_el$26.nextSibling;
|
|
1208
|
+
_el$19.$$click = () => setExpandedPages((old) => old.includes(index) ? old.filter((d) => d !== index) : [...old, index]);
|
|
1209
|
+
insert(_el$19, createComponent(Expander, { get expanded() {
|
|
1066
1210
|
return expandedPages().includes(index);
|
|
1067
|
-
} }), _el$
|
|
1068
|
-
insert(_el$
|
|
1069
|
-
insert(_el$
|
|
1070
|
-
insert(_el$
|
|
1211
|
+
} }), _el$20);
|
|
1212
|
+
insert(_el$19, index * pageSize, _el$25);
|
|
1213
|
+
insert(_el$19, index * pageSize + pageSize - 1, _el$26);
|
|
1214
|
+
insert(_el$18, (() => {
|
|
1071
1215
|
var _c$2 = memo(() => !!expandedPages().includes(index));
|
|
1072
1216
|
return () => _c$2() ? (() => {
|
|
1073
|
-
var _el$
|
|
1074
|
-
insert(_el$
|
|
1075
|
-
createRenderEffect(() => className(_el$
|
|
1076
|
-
return _el$
|
|
1217
|
+
var _el$27 = _tmpl$2$1();
|
|
1218
|
+
insert(_el$27, () => entries.map((entry) => handleEntry(entry)));
|
|
1219
|
+
createRenderEffect(() => className(_el$27, styles().subEntries));
|
|
1220
|
+
return _el$27;
|
|
1077
1221
|
})() : null;
|
|
1078
1222
|
})(), null);
|
|
1079
1223
|
createRenderEffect((_p$) => {
|
|
1080
|
-
var _v$
|
|
1081
|
-
_v$
|
|
1082
|
-
_v$
|
|
1224
|
+
var _v$0 = styles().entry, _v$1 = clsx(styles().labelButton, "labelButton");
|
|
1225
|
+
_v$0 !== _p$.e && className(_el$18, _p$.e = _v$0);
|
|
1226
|
+
_v$1 !== _p$.t && className(_el$19, _p$.t = _v$1);
|
|
1083
1227
|
return _p$;
|
|
1084
1228
|
}, {
|
|
1085
1229
|
e: void 0,
|
|
1086
1230
|
t: void 0
|
|
1087
1231
|
});
|
|
1088
|
-
return _el$
|
|
1232
|
+
return _el$17;
|
|
1089
1233
|
})();
|
|
1090
1234
|
}));
|
|
1091
|
-
createRenderEffect(() => className(_el$
|
|
1092
|
-
return _el$
|
|
1235
|
+
createRenderEffect(() => className(_el$16, styles().subEntries));
|
|
1236
|
+
return _el$16;
|
|
1093
1237
|
})() : null)] : memo(() => type() === "function")() ? createComponent(Explorer, {
|
|
1094
1238
|
get label() {
|
|
1095
1239
|
return (() => {
|
|
1096
|
-
var _el$
|
|
1097
|
-
_el$
|
|
1098
|
-
insert(_el$
|
|
1099
|
-
createRenderEffect(() => className(_el$
|
|
1100
|
-
return _el$
|
|
1240
|
+
var _el$28 = _tmpl$9$1(), _el$29 = _el$28.firstChild;
|
|
1241
|
+
_el$28.$$click = refreshValueSnapshot;
|
|
1242
|
+
insert(_el$29, () => rest.label);
|
|
1243
|
+
createRenderEffect(() => className(_el$28, styles().refreshValueBtn));
|
|
1244
|
+
return _el$28;
|
|
1101
1245
|
})();
|
|
1102
1246
|
},
|
|
1103
1247
|
value: valueSnapshot,
|
|
1104
1248
|
defaultExpanded: {}
|
|
1105
1249
|
}) : [
|
|
1106
1250
|
(() => {
|
|
1107
|
-
var _el$
|
|
1108
|
-
insert(_el$
|
|
1109
|
-
return _el$
|
|
1251
|
+
var _el$30 = _tmpl$5$1(), _el$31 = _el$30.firstChild;
|
|
1252
|
+
insert(_el$30, () => rest.label, _el$31);
|
|
1253
|
+
return _el$30;
|
|
1110
1254
|
})(),
|
|
1111
1255
|
" ",
|
|
1112
1256
|
(() => {
|
|
1113
|
-
var _el$
|
|
1114
|
-
insert(_el$
|
|
1115
|
-
createRenderEffect(() => className(_el$
|
|
1116
|
-
return _el$
|
|
1257
|
+
var _el$32 = _tmpl$6$1();
|
|
1258
|
+
insert(_el$32, () => displayValue(value()));
|
|
1259
|
+
createRenderEffect(() => className(_el$32, styles().value));
|
|
1260
|
+
return _el$32;
|
|
1117
1261
|
})()
|
|
1118
1262
|
];
|
|
1119
1263
|
})());
|
|
@@ -1122,7 +1266,7 @@ function Explorer({ value, defaultExpanded, pageSize = 100, filterSubEntries, ..
|
|
|
1122
1266
|
})();
|
|
1123
1267
|
}
|
|
1124
1268
|
var stylesFactory = (shadowDOMTarget) => {
|
|
1125
|
-
const { colors, font, size,
|
|
1269
|
+
const { colors, font, size, border } = tokens;
|
|
1126
1270
|
const { fontFamily, lineHeight, size: fontSize } = font;
|
|
1127
1271
|
const css = shadowDOMTarget ? goober.css.bind({ target: shadowDOMTarget }) : goober.css;
|
|
1128
1272
|
return {
|
|
@@ -1175,6 +1319,67 @@ var stylesFactory = (shadowDOMTarget) => {
|
|
|
1175
1319
|
`,
|
|
1176
1320
|
value: css`
|
|
1177
1321
|
color: ${colors.purple[400]};
|
|
1322
|
+
`,
|
|
1323
|
+
compositeComponent: css`
|
|
1324
|
+
display: inline-flex;
|
|
1325
|
+
align-items: center;
|
|
1326
|
+
padding: 1px ${size[1]};
|
|
1327
|
+
border-radius: ${border.radius.full};
|
|
1328
|
+
border: 1px solid ${colors.darkGray[500]};
|
|
1329
|
+
background: ${colors.darkGray[700]};
|
|
1330
|
+
color: ${colors.cyan[300]};
|
|
1331
|
+
font-style: normal;
|
|
1332
|
+
font-weight: ${font.weight.medium};
|
|
1333
|
+
`,
|
|
1334
|
+
renderableComponent: css`
|
|
1335
|
+
display: inline-flex;
|
|
1336
|
+
align-items: center;
|
|
1337
|
+
padding: 1px ${size[1]};
|
|
1338
|
+
border-radius: ${border.radius.full};
|
|
1339
|
+
border: 1px solid ${colors.darkGray[500]};
|
|
1340
|
+
background: ${colors.darkGray[700]};
|
|
1341
|
+
color: ${colors.teal[300]};
|
|
1342
|
+
font-style: normal;
|
|
1343
|
+
font-weight: ${font.weight.medium};
|
|
1344
|
+
`,
|
|
1345
|
+
rscMetaRow: css`
|
|
1346
|
+
display: flex;
|
|
1347
|
+
gap: ${size[1]};
|
|
1348
|
+
align-items: flex-start;
|
|
1349
|
+
margin-left: calc(${size[3]} + ${size[1]});
|
|
1350
|
+
margin-top: ${size[.5]};
|
|
1351
|
+
flex-wrap: wrap;
|
|
1352
|
+
`,
|
|
1353
|
+
rscMetaLabel: css`
|
|
1354
|
+
color: ${colors.gray[500]};
|
|
1355
|
+
font-size: ${fontSize["2xs"]};
|
|
1356
|
+
text-transform: uppercase;
|
|
1357
|
+
letter-spacing: 0.06em;
|
|
1358
|
+
padding-top: 2px;
|
|
1359
|
+
`,
|
|
1360
|
+
rscChipRow: css`
|
|
1361
|
+
display: flex;
|
|
1362
|
+
gap: ${size[1]};
|
|
1363
|
+
flex-wrap: wrap;
|
|
1364
|
+
`,
|
|
1365
|
+
rscChip: css`
|
|
1366
|
+
display: inline-flex;
|
|
1367
|
+
align-items: center;
|
|
1368
|
+
gap: ${size[.5]};
|
|
1369
|
+
padding: 1px ${size[1]};
|
|
1370
|
+
border-radius: ${border.radius.full};
|
|
1371
|
+
border: 1px solid ${colors.darkGray[500]};
|
|
1372
|
+
background: ${colors.darkGray[800]};
|
|
1373
|
+
color: ${colors.gray[200]};
|
|
1374
|
+
font-size: ${fontSize["2xs"]};
|
|
1375
|
+
line-height: ${lineHeight.xs};
|
|
1376
|
+
`,
|
|
1377
|
+
rscChipName: css`
|
|
1378
|
+
color: ${colors.gray[100]};
|
|
1379
|
+
`,
|
|
1380
|
+
rscChipMeta: css`
|
|
1381
|
+
color: ${colors.gray[400]};
|
|
1382
|
+
font-size: ${fontSize["2xs"]};
|
|
1178
1383
|
`,
|
|
1179
1384
|
subEntries: css`
|
|
1180
1385
|
margin-left: ${size[2]};
|
|
@@ -1413,7 +1618,6 @@ var BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel({
|
|
|
1413
1618
|
const { onCloseClick } = useDevtoolsOnClose();
|
|
1414
1619
|
const styles = useStyles$1();
|
|
1415
1620
|
const { className: className$2, style, ...otherPanelProps } = panelProps;
|
|
1416
|
-
invariant(router, "No router was found for the TanStack Router Devtools. Please place the devtools in the <RouterProvider> component tree or pass the router instance to the devtools manually.");
|
|
1417
1621
|
const [currentTab, setCurrentTab] = useLocalStorage("tanstackRouterDevtoolsActiveTab", "routes");
|
|
1418
1622
|
const [activeId, setActiveId] = useLocalStorage("tanstackRouterDevtoolsActiveRouteId", "");
|
|
1419
1623
|
const [history, setHistory] = createSignal([]);
|
|
@@ -1427,23 +1631,23 @@ var BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel({
|
|
|
1427
1631
|
cachedMatches = _cachedMatches;
|
|
1428
1632
|
createEffect(() => {
|
|
1429
1633
|
const pendingMatchesStore = router().stores.pendingMatchesSnapshot;
|
|
1430
|
-
setPendingMatches(pendingMatchesStore.
|
|
1634
|
+
setPendingMatches(pendingMatchesStore.get());
|
|
1431
1635
|
const subscription = pendingMatchesStore.subscribe(() => {
|
|
1432
|
-
setPendingMatches(pendingMatchesStore.
|
|
1636
|
+
setPendingMatches(pendingMatchesStore.get());
|
|
1433
1637
|
});
|
|
1434
1638
|
onCleanup(() => subscription.unsubscribe());
|
|
1435
1639
|
});
|
|
1436
1640
|
createEffect(() => {
|
|
1437
1641
|
const cachedMatchesStore = router().stores.cachedMatchesSnapshot;
|
|
1438
|
-
setCachedMatches(cachedMatchesStore.
|
|
1642
|
+
setCachedMatches(cachedMatchesStore.get());
|
|
1439
1643
|
const subscription = cachedMatchesStore.subscribe(() => {
|
|
1440
|
-
setCachedMatches(cachedMatchesStore.
|
|
1644
|
+
setCachedMatches(cachedMatchesStore.get());
|
|
1441
1645
|
});
|
|
1442
1646
|
onCleanup(() => subscription.unsubscribe());
|
|
1443
1647
|
});
|
|
1444
1648
|
} else {
|
|
1445
|
-
pendingMatches = () => router().stores.pendingMatchesSnapshot.
|
|
1446
|
-
cachedMatches = () => router().stores.cachedMatchesSnapshot.
|
|
1649
|
+
pendingMatches = () => router().stores.pendingMatchesSnapshot.get();
|
|
1650
|
+
cachedMatches = () => router().stores.cachedMatchesSnapshot.get();
|
|
1447
1651
|
}
|
|
1448
1652
|
createEffect(() => {
|
|
1449
1653
|
const matches = routerState().matches;
|
|
@@ -1966,4 +2170,4 @@ delegateEvents(["click", "mousedown"]);
|
|
|
1966
2170
|
//#endregion
|
|
1967
2171
|
export { BaseTanStackRouterDevtoolsPanel, BaseTanStackRouterDevtoolsPanel as default, useLocalStorage as n, useStyles$1 as r, useIsMounted as t };
|
|
1968
2172
|
|
|
1969
|
-
//# sourceMappingURL=BaseTanStackRouterDevtoolsPanel-
|
|
2173
|
+
//# sourceMappingURL=BaseTanStackRouterDevtoolsPanel-BYamTwOT.js.map
|