@tanstack/router-devtools-core 1.133.1 → 1.133.8
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-Cbvcs84k.js → BaseTanStackRouterDevtoolsPanel-KIEU40vQ.js} +53 -55
- package/dist/{BaseTanStackRouterDevtoolsPanel-Cbvcs84k.js.map → BaseTanStackRouterDevtoolsPanel-KIEU40vQ.js.map} +1 -1
- package/dist/{BaseTanStackRouterDevtoolsPanel-CiObEXSM.cjs → BaseTanStackRouterDevtoolsPanel-z0YMII09.cjs} +228 -230
- package/dist/{BaseTanStackRouterDevtoolsPanel-CiObEXSM.cjs.map → BaseTanStackRouterDevtoolsPanel-z0YMII09.cjs.map} +1 -1
- package/dist/FloatingTanStackRouterDevtools-7aOMOekg.cjs +281 -0
- package/dist/{FloatingTanStackRouterDevtools-BMhRQRk5.cjs.map → FloatingTanStackRouterDevtools-7aOMOekg.cjs.map} +1 -1
- package/dist/{FloatingTanStackRouterDevtools-KvPiI7YB.js → FloatingTanStackRouterDevtools-kcMbkHXI.js} +4 -6
- package/dist/{FloatingTanStackRouterDevtools-KvPiI7YB.js.map → FloatingTanStackRouterDevtools-kcMbkHXI.js.map} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/index-CC1CXbDA.cjs +1792 -0
- package/dist/index-CC1CXbDA.cjs.map +1 -0
- package/dist/index-DX7UIGS3.js +1793 -0
- package/dist/index-DX7UIGS3.js.map +1 -0
- package/package.json +15 -3
- package/dist/FloatingTanStackRouterDevtools-BMhRQRk5.cjs +0 -283
- package/dist/index-Bz4rofgr.js +0 -222
- package/dist/index-Bz4rofgr.js.map +0 -1
- package/dist/index-sVJ8jjbP.cjs +0 -221
- package/dist/index-sVJ8jjbP.cjs.map +0 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
2
|
+
const index = require("./index-CC1CXbDA.cjs");
|
|
3
3
|
const clsx = require("clsx");
|
|
4
4
|
const invariant = require("tiny-invariant");
|
|
5
5
|
const routerCore = require("@tanstack/router-core");
|
|
6
|
-
const solidJs = require("solid-js");
|
|
7
|
-
const index = require("./index-sVJ8jjbP.cjs");
|
|
8
6
|
const goober = require("goober");
|
|
9
7
|
function _interopNamespaceDefault(e) {
|
|
10
8
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -40,8 +38,8 @@ function getRouteStatusColor(matches, route) {
|
|
|
40
38
|
return getStatusColor(found);
|
|
41
39
|
}
|
|
42
40
|
function useIsMounted() {
|
|
43
|
-
const [isMounted, setIsMounted] =
|
|
44
|
-
const effect = isServer ?
|
|
41
|
+
const [isMounted, setIsMounted] = index.createSignal(false);
|
|
42
|
+
const effect = isServer ? index.createEffect : index.createRenderEffect;
|
|
45
43
|
effect(() => {
|
|
46
44
|
setIsMounted(true);
|
|
47
45
|
});
|
|
@@ -860,8 +858,8 @@ const stylesFactory$1 = (shadowDOMTarget) => {
|
|
|
860
858
|
};
|
|
861
859
|
};
|
|
862
860
|
function useStyles$1() {
|
|
863
|
-
const shadowDomTarget =
|
|
864
|
-
const [_styles] =
|
|
861
|
+
const shadowDomTarget = index.useContext(index.ShadowDomTargetContext);
|
|
862
|
+
const [_styles] = index.createSignal(stylesFactory$1(shadowDomTarget));
|
|
865
863
|
return _styles;
|
|
866
864
|
}
|
|
867
865
|
const getItem = (key) => {
|
|
@@ -876,8 +874,8 @@ const getItem = (key) => {
|
|
|
876
874
|
}
|
|
877
875
|
};
|
|
878
876
|
function useLocalStorage(key, defaultValue) {
|
|
879
|
-
const [value, setValue] =
|
|
880
|
-
|
|
877
|
+
const [value, setValue] = index.createSignal();
|
|
878
|
+
index.createEffect(() => {
|
|
881
879
|
const initialValue = getItem(key);
|
|
882
880
|
if (typeof initialValue === "undefined" || initialValue === null) {
|
|
883
881
|
setValue(
|
|
@@ -902,7 +900,7 @@ function useLocalStorage(key, defaultValue) {
|
|
|
902
900
|
};
|
|
903
901
|
return [value, setter];
|
|
904
902
|
}
|
|
905
|
-
var _tmpl$$3 = /* @__PURE__ */
|
|
903
|
+
var _tmpl$$3 = /* @__PURE__ */ index.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__ */ index.template(`<div>`), _tmpl$3$1 = /* @__PURE__ */ index.template(`<button><span> `), _tmpl$4$1 = /* @__PURE__ */ index.template(`<div><div><button> [<!> ... <!>]`), _tmpl$5$1 = /* @__PURE__ */ index.template(`<button><span></span> 🔄 `), _tmpl$6$1 = /* @__PURE__ */ index.template(`<span>:`), _tmpl$7$1 = /* @__PURE__ */ index.template(`<span>`);
|
|
906
904
|
const Expander = ({
|
|
907
905
|
expanded,
|
|
908
906
|
style = {}
|
|
@@ -910,10 +908,10 @@ const Expander = ({
|
|
|
910
908
|
const styles = useStyles();
|
|
911
909
|
return (() => {
|
|
912
910
|
var _el$ = _tmpl$$3(), _el$2 = _el$.firstChild;
|
|
913
|
-
|
|
911
|
+
index.createRenderEffect((_p$) => {
|
|
914
912
|
var _v$ = styles().expander, _v$2 = clsx.clsx(styles().expanderIcon(expanded));
|
|
915
|
-
_v$ !== _p$.e &&
|
|
916
|
-
_v$2 !== _p$.t &&
|
|
913
|
+
_v$ !== _p$.e && index.className(_el$, _p$.e = _v$);
|
|
914
|
+
_v$2 !== _p$.t && index.setAttribute(_el$2, "class", _p$.t = _v$2);
|
|
917
915
|
return _p$;
|
|
918
916
|
}, {
|
|
919
917
|
e: void 0,
|
|
@@ -942,10 +940,10 @@ function Explorer({
|
|
|
942
940
|
filterSubEntries,
|
|
943
941
|
...rest
|
|
944
942
|
}) {
|
|
945
|
-
const [expanded, setExpanded] =
|
|
943
|
+
const [expanded, setExpanded] = index.createSignal(Boolean(defaultExpanded));
|
|
946
944
|
const toggleExpanded = () => setExpanded((old) => !old);
|
|
947
|
-
const type =
|
|
948
|
-
const subEntries =
|
|
945
|
+
const type = index.createMemo(() => typeof value());
|
|
946
|
+
const subEntries = index.createMemo(() => {
|
|
949
947
|
let entries = [];
|
|
950
948
|
const makeProperty = (sub) => {
|
|
951
949
|
const subDefaultExpanded = defaultExpanded === true ? {
|
|
@@ -975,75 +973,75 @@ function Explorer({
|
|
|
975
973
|
}
|
|
976
974
|
return filterSubEntries ? filterSubEntries(entries) : entries;
|
|
977
975
|
});
|
|
978
|
-
const subEntryPages =
|
|
979
|
-
const [expandedPages, setExpandedPages] =
|
|
980
|
-
const [valueSnapshot, setValueSnapshot] =
|
|
976
|
+
const subEntryPages = index.createMemo(() => chunkArray(subEntries(), pageSize));
|
|
977
|
+
const [expandedPages, setExpandedPages] = index.createSignal([]);
|
|
978
|
+
const [valueSnapshot, setValueSnapshot] = index.createSignal(void 0);
|
|
981
979
|
const styles = useStyles();
|
|
982
980
|
const refreshValueSnapshot = () => {
|
|
983
981
|
setValueSnapshot(value()());
|
|
984
982
|
};
|
|
985
|
-
const handleEntry = (entry) =>
|
|
983
|
+
const handleEntry = (entry) => index.createComponent(Explorer, index.mergeProps({
|
|
986
984
|
value,
|
|
987
985
|
filterSubEntries
|
|
988
986
|
}, rest, entry));
|
|
989
987
|
return (() => {
|
|
990
988
|
var _el$3 = _tmpl$2$1();
|
|
991
|
-
|
|
992
|
-
var _c$ =
|
|
989
|
+
index.insert(_el$3, (() => {
|
|
990
|
+
var _c$ = index.createMemo(() => !!subEntryPages().length);
|
|
993
991
|
return () => _c$() ? [(() => {
|
|
994
992
|
var _el$4 = _tmpl$3$1(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild;
|
|
995
993
|
_el$4.$$click = () => toggleExpanded();
|
|
996
|
-
|
|
994
|
+
index.insert(_el$4, index.createComponent(Expander, {
|
|
997
995
|
get expanded() {
|
|
998
996
|
return expanded() ?? false;
|
|
999
997
|
}
|
|
1000
998
|
}), _el$5);
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
999
|
+
index.insert(_el$4, () => rest.label, _el$5);
|
|
1000
|
+
index.insert(_el$5, () => String(type).toLowerCase() === "iterable" ? "(Iterable) " : "", _el$6);
|
|
1001
|
+
index.insert(_el$5, () => subEntries().length, _el$6);
|
|
1002
|
+
index.insert(_el$5, () => subEntries().length > 1 ? `items` : `item`, null);
|
|
1003
|
+
index.createRenderEffect((_p$) => {
|
|
1006
1004
|
var _v$3 = styles().expandButton, _v$4 = styles().info;
|
|
1007
|
-
_v$3 !== _p$.e &&
|
|
1008
|
-
_v$4 !== _p$.t &&
|
|
1005
|
+
_v$3 !== _p$.e && index.className(_el$4, _p$.e = _v$3);
|
|
1006
|
+
_v$4 !== _p$.t && index.className(_el$5, _p$.t = _v$4);
|
|
1009
1007
|
return _p$;
|
|
1010
1008
|
}, {
|
|
1011
1009
|
e: void 0,
|
|
1012
1010
|
t: void 0
|
|
1013
1011
|
});
|
|
1014
1012
|
return _el$4;
|
|
1015
|
-
})(),
|
|
1013
|
+
})(), index.createMemo(() => index.createMemo(() => !!(expanded() ?? false))() ? index.createMemo(() => subEntryPages().length === 1)() ? (() => {
|
|
1016
1014
|
var _el$7 = _tmpl$2$1();
|
|
1017
|
-
|
|
1018
|
-
|
|
1015
|
+
index.insert(_el$7, () => subEntries().map((entry, index2) => handleEntry(entry)));
|
|
1016
|
+
index.createRenderEffect(() => index.className(_el$7, styles().subEntries));
|
|
1019
1017
|
return _el$7;
|
|
1020
1018
|
})() : (() => {
|
|
1021
1019
|
var _el$8 = _tmpl$2$1();
|
|
1022
|
-
|
|
1020
|
+
index.insert(_el$8, () => subEntryPages().map((entries, index$1) => {
|
|
1023
1021
|
return (() => {
|
|
1024
1022
|
var _el$9 = _tmpl$4$1(), _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$15 = _el$10.nextSibling, _el$12 = _el$15.nextSibling, _el$16 = _el$12.nextSibling;
|
|
1025
1023
|
_el$16.nextSibling;
|
|
1026
|
-
_el$1.$$click = () => setExpandedPages((old) => old.includes(
|
|
1027
|
-
|
|
1024
|
+
_el$1.$$click = () => setExpandedPages((old) => old.includes(index$1) ? old.filter((d) => d !== index$1) : [...old, index$1]);
|
|
1025
|
+
index.insert(_el$1, index.createComponent(Expander, {
|
|
1028
1026
|
get expanded() {
|
|
1029
|
-
return expandedPages().includes(
|
|
1027
|
+
return expandedPages().includes(index$1);
|
|
1030
1028
|
}
|
|
1031
1029
|
}), _el$10);
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
var _c$3 =
|
|
1030
|
+
index.insert(_el$1, index$1 * pageSize, _el$15);
|
|
1031
|
+
index.insert(_el$1, index$1 * pageSize + pageSize - 1, _el$16);
|
|
1032
|
+
index.insert(_el$0, (() => {
|
|
1033
|
+
var _c$3 = index.createMemo(() => !!expandedPages().includes(index$1));
|
|
1036
1034
|
return () => _c$3() ? (() => {
|
|
1037
1035
|
var _el$17 = _tmpl$2$1();
|
|
1038
|
-
|
|
1039
|
-
|
|
1036
|
+
index.insert(_el$17, () => entries.map((entry) => handleEntry(entry)));
|
|
1037
|
+
index.createRenderEffect(() => index.className(_el$17, styles().subEntries));
|
|
1040
1038
|
return _el$17;
|
|
1041
1039
|
})() : null;
|
|
1042
1040
|
})(), null);
|
|
1043
|
-
|
|
1041
|
+
index.createRenderEffect((_p$) => {
|
|
1044
1042
|
var _v$5 = styles().entry, _v$6 = clsx.clsx(styles().labelButton, "labelButton");
|
|
1045
|
-
_v$5 !== _p$.e &&
|
|
1046
|
-
_v$6 !== _p$.t &&
|
|
1043
|
+
_v$5 !== _p$.e && index.className(_el$0, _p$.e = _v$5);
|
|
1044
|
+
_v$6 !== _p$.t && index.className(_el$1, _p$.t = _v$6);
|
|
1047
1045
|
return _p$;
|
|
1048
1046
|
}, {
|
|
1049
1047
|
e: void 0,
|
|
@@ -1052,17 +1050,17 @@ function Explorer({
|
|
|
1052
1050
|
return _el$9;
|
|
1053
1051
|
})();
|
|
1054
1052
|
}));
|
|
1055
|
-
|
|
1053
|
+
index.createRenderEffect(() => index.className(_el$8, styles().subEntries));
|
|
1056
1054
|
return _el$8;
|
|
1057
1055
|
})() : null)] : (() => {
|
|
1058
|
-
var _c$2 =
|
|
1059
|
-
return () => _c$2() ?
|
|
1056
|
+
var _c$2 = index.createMemo(() => type() === "function");
|
|
1057
|
+
return () => _c$2() ? index.createComponent(Explorer, {
|
|
1060
1058
|
get label() {
|
|
1061
1059
|
return (() => {
|
|
1062
1060
|
var _el$18 = _tmpl$5$1(), _el$19 = _el$18.firstChild;
|
|
1063
1061
|
_el$18.$$click = refreshValueSnapshot;
|
|
1064
|
-
|
|
1065
|
-
|
|
1062
|
+
index.insert(_el$19, () => rest.label);
|
|
1063
|
+
index.createRenderEffect(() => index.className(_el$18, styles().refreshValueBtn));
|
|
1066
1064
|
return _el$18;
|
|
1067
1065
|
})();
|
|
1068
1066
|
},
|
|
@@ -1070,17 +1068,17 @@ function Explorer({
|
|
|
1070
1068
|
defaultExpanded: {}
|
|
1071
1069
|
}) : [(() => {
|
|
1072
1070
|
var _el$20 = _tmpl$6$1(), _el$21 = _el$20.firstChild;
|
|
1073
|
-
|
|
1071
|
+
index.insert(_el$20, () => rest.label, _el$21);
|
|
1074
1072
|
return _el$20;
|
|
1075
1073
|
})(), " ", (() => {
|
|
1076
1074
|
var _el$22 = _tmpl$7$1();
|
|
1077
|
-
|
|
1078
|
-
|
|
1075
|
+
index.insert(_el$22, () => displayValue(value()));
|
|
1076
|
+
index.createRenderEffect(() => index.className(_el$22, styles().value));
|
|
1079
1077
|
return _el$22;
|
|
1080
1078
|
})()];
|
|
1081
1079
|
})();
|
|
1082
1080
|
})());
|
|
1083
|
-
|
|
1081
|
+
index.createRenderEffect(() => index.className(_el$3, styles().entry));
|
|
1084
1082
|
return _el$3;
|
|
1085
1083
|
})();
|
|
1086
1084
|
}
|
|
@@ -1174,12 +1172,12 @@ const stylesFactory = (shadowDOMTarget) => {
|
|
|
1174
1172
|
};
|
|
1175
1173
|
};
|
|
1176
1174
|
function useStyles() {
|
|
1177
|
-
const shadowDomTarget =
|
|
1178
|
-
const [_styles] =
|
|
1175
|
+
const shadowDomTarget = index.useContext(index.ShadowDomTargetContext);
|
|
1176
|
+
const [_styles] = index.createSignal(stylesFactory(shadowDomTarget));
|
|
1179
1177
|
return _styles;
|
|
1180
1178
|
}
|
|
1181
|
-
|
|
1182
|
-
var _tmpl$$2 = /* @__PURE__ */
|
|
1179
|
+
index.delegateEvents(["click"]);
|
|
1180
|
+
var _tmpl$$2 = /* @__PURE__ */ index.template(`<div><div></div><div>/</div><div></div><div>/</div><div>`);
|
|
1183
1181
|
function formatTime(ms) {
|
|
1184
1182
|
const units = ["s", "min", "h", "d"];
|
|
1185
1183
|
const values = [ms / 1e3, ms / 6e4, ms / 36e5, ms / 864e5];
|
|
@@ -1212,14 +1210,14 @@ function AgeTicker({
|
|
|
1212
1210
|
const gcTime = route.options.gcTime ?? router().options.defaultGcTime ?? 30 * 60 * 1e3;
|
|
1213
1211
|
return (() => {
|
|
1214
1212
|
var _el$ = _tmpl$$2(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1213
|
+
index.insert(_el$2, () => formatTime(age));
|
|
1214
|
+
index.insert(_el$4, () => formatTime(staleTime));
|
|
1215
|
+
index.insert(_el$6, () => formatTime(gcTime));
|
|
1216
|
+
index.createRenderEffect(() => index.className(_el$, clsx.clsx(styles().ageTicker(age > staleTime))));
|
|
1219
1217
|
return _el$;
|
|
1220
1218
|
})();
|
|
1221
1219
|
}
|
|
1222
|
-
var _tmpl$$1 = /* @__PURE__ */
|
|
1220
|
+
var _tmpl$$1 = /* @__PURE__ */ index.template(`<button type=button>➔`);
|
|
1223
1221
|
function NavigateButton({
|
|
1224
1222
|
to,
|
|
1225
1223
|
params,
|
|
@@ -1237,13 +1235,13 @@ function NavigateButton({
|
|
|
1237
1235
|
search
|
|
1238
1236
|
});
|
|
1239
1237
|
};
|
|
1240
|
-
|
|
1241
|
-
|
|
1238
|
+
index.setAttribute(_el$, "title", `Navigate to ${to}`);
|
|
1239
|
+
index.createRenderEffect(() => index.className(_el$, styles().navigateButton));
|
|
1242
1240
|
return _el$;
|
|
1243
1241
|
})();
|
|
1244
1242
|
}
|
|
1245
|
-
|
|
1246
|
-
var _tmpl$ = /* @__PURE__ */
|
|
1243
|
+
index.delegateEvents(["click"]);
|
|
1244
|
+
var _tmpl$ = /* @__PURE__ */ index.template(`<button><div>TANSTACK</div><div>TanStack Router v1`), _tmpl$2 = /* @__PURE__ */ index.template(`<div><div>`), _tmpl$3 = /* @__PURE__ */ index.template(`<code> `), _tmpl$4 = /* @__PURE__ */ index.template(`<code>`), _tmpl$5 = /* @__PURE__ */ index.template(`<div><div role=button><div>`), _tmpl$6 = /* @__PURE__ */ index.template(`<div>`), _tmpl$7 = /* @__PURE__ */ index.template(`<div><ul>`), _tmpl$8 = /* @__PURE__ */ index.template(`<div><button><svg xmlns=http://www.w3.org/2000/svg width=10 height=6 fill=none viewBox="0 0 10 6"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=1.667 d="M1 1l4 4 4-4"></path></svg></button><div><div></div><div><div></div></div></div><div><div><div><span>Pathname</span></div><div><code></code></div><div><div><button type=button>Routes</button><button type=button>Matches</button><button type=button>History</button></div><div><div>age / staleTime / gcTime</div></div></div><div>`), _tmpl$9 = /* @__PURE__ */ index.template(`<div><span>masked`), _tmpl$0 = /* @__PURE__ */ index.template(`<div role=button><div>`), _tmpl$1 = /* @__PURE__ */ index.template(`<li><div>`), _tmpl$10 = /* @__PURE__ */ index.template(`<li>This panel displays the most recent 15 navigations.`), _tmpl$11 = /* @__PURE__ */ index.template(`<div><div><div>Cached Matches</div><div>age / staleTime / gcTime</div></div><div>`), _tmpl$12 = /* @__PURE__ */ index.template(`<div><div>Match Details</div><div><div><div><div></div></div><div><div>ID:</div><div><code></code></div></div><div><div>State:</div><div></div></div><div><div>Last Updated:</div><div></div></div></div></div><div>Explorer</div><div>`), _tmpl$13 = /* @__PURE__ */ index.template(`<div>Loader Data`), _tmpl$14 = /* @__PURE__ */ index.template(`<div><div><span>Search Params</span></div><div>`), _tmpl$15 = /* @__PURE__ */ index.template(`<span style=margin-left:0.5rem;>`), _tmpl$16 = /* @__PURE__ */ index.template(`<button type=button style=cursor:pointer; aria-label="Copy value to clipboard">`);
|
|
1247
1245
|
const HISTORY_LIMIT = 15;
|
|
1248
1246
|
function Logo(props) {
|
|
1249
1247
|
const {
|
|
@@ -1253,15 +1251,15 @@ function Logo(props) {
|
|
|
1253
1251
|
const styles = useStyles$1();
|
|
1254
1252
|
return (() => {
|
|
1255
1253
|
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
1256
|
-
|
|
1254
|
+
index.spread(_el$, index.mergeProps(rest, {
|
|
1257
1255
|
get ["class"]() {
|
|
1258
1256
|
return clsx.clsx(styles().logo, className ? className() : "");
|
|
1259
1257
|
}
|
|
1260
1258
|
}), false, true);
|
|
1261
|
-
|
|
1259
|
+
index.createRenderEffect((_p$) => {
|
|
1262
1260
|
var _v$ = styles().tanstackLogo, _v$2 = styles().routerLogo;
|
|
1263
|
-
_v$ !== _p$.e &&
|
|
1264
|
-
_v$2 !== _p$.t &&
|
|
1261
|
+
_v$ !== _p$.e && index.className(_el$2, _p$.e = _v$);
|
|
1262
|
+
_v$2 !== _p$.t && index.className(_el$3, _p$.t = _v$2);
|
|
1265
1263
|
return _p$;
|
|
1266
1264
|
}, {
|
|
1267
1265
|
e: void 0,
|
|
@@ -1276,12 +1274,12 @@ function NavigateLink(props) {
|
|
|
1276
1274
|
_el$4.style.setProperty("display", "flex");
|
|
1277
1275
|
_el$4.style.setProperty("align-items", "center");
|
|
1278
1276
|
_el$4.style.setProperty("width", "100%");
|
|
1279
|
-
|
|
1277
|
+
index.insert(_el$4, () => props.left, _el$5);
|
|
1280
1278
|
_el$5.style.setProperty("flex-grow", "1");
|
|
1281
1279
|
_el$5.style.setProperty("min-width", "0");
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1280
|
+
index.insert(_el$5, () => props.children);
|
|
1281
|
+
index.insert(_el$4, () => props.right, null);
|
|
1282
|
+
index.createRenderEffect(() => index.className(_el$4, props.class));
|
|
1285
1283
|
return _el$4;
|
|
1286
1284
|
})();
|
|
1287
1285
|
}
|
|
@@ -1294,9 +1292,9 @@ function RouteComp({
|
|
|
1294
1292
|
setActiveId
|
|
1295
1293
|
}) {
|
|
1296
1294
|
const styles = useStyles$1();
|
|
1297
|
-
const matches =
|
|
1298
|
-
const match =
|
|
1299
|
-
const param =
|
|
1295
|
+
const matches = index.createMemo(() => routerState().pendingMatches || routerState().matches);
|
|
1296
|
+
const match = index.createMemo(() => routerState().matches.find((d) => d.routeId === route.id));
|
|
1297
|
+
const param = index.createMemo(() => {
|
|
1300
1298
|
try {
|
|
1301
1299
|
if (match()?.params) {
|
|
1302
1300
|
const p = match()?.params;
|
|
@@ -1313,7 +1311,7 @@ function RouteComp({
|
|
|
1313
1311
|
return "";
|
|
1314
1312
|
}
|
|
1315
1313
|
});
|
|
1316
|
-
const navigationTarget =
|
|
1314
|
+
const navigationTarget = index.createMemo(() => {
|
|
1317
1315
|
if (isRoot) return void 0;
|
|
1318
1316
|
if (!route.path) return void 0;
|
|
1319
1317
|
const allParams = Object.assign({}, ...matches().map((m) => m.params));
|
|
@@ -1333,16 +1331,16 @@ function RouteComp({
|
|
|
1333
1331
|
setActiveId(activeId() === route.id ? "" : route.id);
|
|
1334
1332
|
}
|
|
1335
1333
|
};
|
|
1336
|
-
|
|
1334
|
+
index.insert(_el$7, index.createComponent(NavigateLink, {
|
|
1337
1335
|
get ["class"]() {
|
|
1338
1336
|
return clsx.clsx(styles().routesRow(!!match()));
|
|
1339
1337
|
},
|
|
1340
1338
|
get left() {
|
|
1341
|
-
return
|
|
1339
|
+
return index.createComponent(index.Show, {
|
|
1342
1340
|
get when() {
|
|
1343
1341
|
return navigationTarget();
|
|
1344
1342
|
},
|
|
1345
|
-
children: (navigate) =>
|
|
1343
|
+
children: (navigate) => index.createComponent(NavigateButton, {
|
|
1346
1344
|
get to() {
|
|
1347
1345
|
return navigate();
|
|
1348
1346
|
},
|
|
@@ -1351,7 +1349,7 @@ function RouteComp({
|
|
|
1351
1349
|
});
|
|
1352
1350
|
},
|
|
1353
1351
|
get right() {
|
|
1354
|
-
return
|
|
1352
|
+
return index.createComponent(AgeTicker, {
|
|
1355
1353
|
get match() {
|
|
1356
1354
|
return match();
|
|
1357
1355
|
},
|
|
@@ -1361,39 +1359,39 @@ function RouteComp({
|
|
|
1361
1359
|
get children() {
|
|
1362
1360
|
return [(() => {
|
|
1363
1361
|
var _el$9 = _tmpl$3(), _el$0 = _el$9.firstChild;
|
|
1364
|
-
|
|
1365
|
-
|
|
1362
|
+
index.insert(_el$9, () => isRoot ? routerCore.rootRouteId : route.path || routerCore.trimPath(route.id), _el$0);
|
|
1363
|
+
index.createRenderEffect(() => index.className(_el$9, styles().code));
|
|
1366
1364
|
return _el$9;
|
|
1367
1365
|
})(), (() => {
|
|
1368
1366
|
var _el$1 = _tmpl$4();
|
|
1369
|
-
|
|
1370
|
-
|
|
1367
|
+
index.insert(_el$1, param);
|
|
1368
|
+
index.createRenderEffect(() => index.className(_el$1, styles().routeParamInfo));
|
|
1371
1369
|
return _el$1;
|
|
1372
1370
|
})()];
|
|
1373
1371
|
}
|
|
1374
1372
|
}), null);
|
|
1375
|
-
|
|
1376
|
-
var _c$ =
|
|
1373
|
+
index.insert(_el$6, (() => {
|
|
1374
|
+
var _c$ = index.createMemo(() => !!route.children?.length);
|
|
1377
1375
|
return () => _c$() ? (() => {
|
|
1378
1376
|
var _el$10 = _tmpl$6();
|
|
1379
|
-
|
|
1377
|
+
index.insert(_el$10, () => [...route.children].sort((a, b) => {
|
|
1380
1378
|
return a.rank - b.rank;
|
|
1381
|
-
}).map((r) =>
|
|
1379
|
+
}).map((r) => index.createComponent(RouteComp, {
|
|
1382
1380
|
routerState,
|
|
1383
1381
|
router,
|
|
1384
1382
|
route: r,
|
|
1385
1383
|
activeId,
|
|
1386
1384
|
setActiveId
|
|
1387
1385
|
})));
|
|
1388
|
-
|
|
1386
|
+
index.createRenderEffect(() => index.className(_el$10, styles().nestedRouteRow(!!isRoot)));
|
|
1389
1387
|
return _el$10;
|
|
1390
1388
|
})() : null;
|
|
1391
1389
|
})(), null);
|
|
1392
|
-
|
|
1390
|
+
index.createRenderEffect((_p$) => {
|
|
1393
1391
|
var _v$3 = `Open match details for ${route.id}`, _v$4 = clsx.clsx(styles().routesRowContainer(route.id === activeId(), !!match())), _v$5 = clsx.clsx(styles().matchIndicator(getRouteStatusColor(matches(), route)));
|
|
1394
|
-
_v$3 !== _p$.e &&
|
|
1395
|
-
_v$4 !== _p$.t &&
|
|
1396
|
-
_v$5 !== _p$.a &&
|
|
1392
|
+
_v$3 !== _p$.e && index.setAttribute(_el$7, "aria-label", _p$.e = _v$3);
|
|
1393
|
+
_v$4 !== _p$.t && index.className(_el$7, _p$.t = _v$4);
|
|
1394
|
+
_v$5 !== _p$.a && index.className(_el$8, _p$.a = _v$5);
|
|
1397
1395
|
return _p$;
|
|
1398
1396
|
}, {
|
|
1399
1397
|
e: void 0,
|
|
@@ -1427,15 +1425,15 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1427
1425
|
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.");
|
|
1428
1426
|
const [currentTab, setCurrentTab] = useLocalStorage("tanstackRouterDevtoolsActiveTab", "routes");
|
|
1429
1427
|
const [activeId, setActiveId] = useLocalStorage("tanstackRouterDevtoolsActiveRouteId", "");
|
|
1430
|
-
const [history, setHistory] =
|
|
1431
|
-
const [hasHistoryOverflowed, setHasHistoryOverflowed] =
|
|
1432
|
-
|
|
1428
|
+
const [history, setHistory] = index.createSignal([]);
|
|
1429
|
+
const [hasHistoryOverflowed, setHasHistoryOverflowed] = index.createSignal(false);
|
|
1430
|
+
index.createEffect(() => {
|
|
1433
1431
|
const matches = routerState().matches;
|
|
1434
1432
|
const currentMatch = matches[matches.length - 1];
|
|
1435
1433
|
if (!currentMatch) {
|
|
1436
1434
|
return;
|
|
1437
1435
|
}
|
|
1438
|
-
const historyUntracked =
|
|
1436
|
+
const historyUntracked = index.untrack(() => history());
|
|
1439
1437
|
const lastMatch = historyUntracked[0];
|
|
1440
1438
|
const sameLocation = lastMatch && lastMatch.pathname === currentMatch.pathname && JSON.stringify(lastMatch.search ?? {}) === JSON.stringify(currentMatch.search ?? {});
|
|
1441
1439
|
if (!lastMatch || !sameLocation) {
|
|
@@ -1449,26 +1447,26 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1449
1447
|
});
|
|
1450
1448
|
}
|
|
1451
1449
|
});
|
|
1452
|
-
const activeMatch =
|
|
1450
|
+
const activeMatch = index.createMemo(() => {
|
|
1453
1451
|
const matches = [...routerState().pendingMatches ?? [], ...routerState().matches, ...routerState().cachedMatches];
|
|
1454
1452
|
return matches.find((d) => d.routeId === activeId() || d.id === activeId());
|
|
1455
1453
|
});
|
|
1456
|
-
const hasSearch =
|
|
1457
|
-
const explorerState =
|
|
1454
|
+
const hasSearch = index.createMemo(() => Object.keys(routerState().location.search).length);
|
|
1455
|
+
const explorerState = index.createMemo(() => {
|
|
1458
1456
|
return {
|
|
1459
1457
|
...router(),
|
|
1460
1458
|
state: routerState()
|
|
1461
1459
|
};
|
|
1462
1460
|
});
|
|
1463
|
-
const routerExplorerValue =
|
|
1464
|
-
const activeMatchLoaderData =
|
|
1465
|
-
const activeMatchValue =
|
|
1466
|
-
const locationSearchValue =
|
|
1461
|
+
const routerExplorerValue = index.createMemo(() => Object.fromEntries(multiSortBy(Object.keys(explorerState()), ["state", "routesById", "routesByPath", "flatRoutes", "options", "manifest"].map((d) => (dd) => dd !== d)).map((key) => [key, explorerState()[key]]).filter((d) => typeof d[1] !== "function" && !["__store", "basepath", "injectedHtml", "subscribers", "latestLoadPromise", "navigateTimeout", "resetNextScroll", "tempLocationKey", "latestLocation", "routeTree", "history"].includes(d[0]))));
|
|
1462
|
+
const activeMatchLoaderData = index.createMemo(() => activeMatch()?.loaderData);
|
|
1463
|
+
const activeMatchValue = index.createMemo(() => activeMatch());
|
|
1464
|
+
const locationSearchValue = index.createMemo(() => routerState().location.search);
|
|
1467
1465
|
return (() => {
|
|
1468
1466
|
var _el$11 = _tmpl$8(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$12.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$16.firstChild, _el$18 = _el$14.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild;
|
|
1469
1467
|
_el$20.firstChild;
|
|
1470
1468
|
var _el$22 = _el$20.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$22.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling, _el$28 = _el$27.nextSibling, _el$29 = _el$25.nextSibling, _el$30 = _el$24.nextSibling;
|
|
1471
|
-
|
|
1469
|
+
index.spread(_el$11, index.mergeProps({
|
|
1472
1470
|
get ["class"]() {
|
|
1473
1471
|
return clsx.clsx(styles().devtoolsPanel, "TanStackRouterDevtoolsPanel", className ? className() : "");
|
|
1474
1472
|
},
|
|
@@ -1476,10 +1474,10 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1476
1474
|
return style ? style() : "";
|
|
1477
1475
|
}
|
|
1478
1476
|
}, otherPanelProps), false, true);
|
|
1479
|
-
|
|
1477
|
+
index.insert(_el$11, handleDragStart ? (() => {
|
|
1480
1478
|
var _el$34 = _tmpl$6();
|
|
1481
|
-
|
|
1482
|
-
|
|
1479
|
+
index.addEventListener(_el$34, "mousedown", handleDragStart, true);
|
|
1480
|
+
index.createRenderEffect(() => index.className(_el$34, styles().dragHandle));
|
|
1483
1481
|
return _el$34;
|
|
1484
1482
|
})() : null, _el$12);
|
|
1485
1483
|
_el$12.$$click = (e) => {
|
|
@@ -1488,7 +1486,7 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1488
1486
|
}
|
|
1489
1487
|
onCloseClick(e);
|
|
1490
1488
|
};
|
|
1491
|
-
|
|
1489
|
+
index.insert(_el$15, index.createComponent(Logo, {
|
|
1492
1490
|
"aria-hidden": true,
|
|
1493
1491
|
onClick: (e) => {
|
|
1494
1492
|
if (setIsOpen) {
|
|
@@ -1497,7 +1495,7 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1497
1495
|
onCloseClick(e);
|
|
1498
1496
|
}
|
|
1499
1497
|
}));
|
|
1500
|
-
|
|
1498
|
+
index.insert(_el$17, index.createComponent(Explorer, {
|
|
1501
1499
|
label: "Router",
|
|
1502
1500
|
value: routerExplorerValue,
|
|
1503
1501
|
defaultExpanded: {
|
|
@@ -1509,14 +1507,14 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1509
1507
|
return subEntries.filter((d) => typeof d.value() !== "function");
|
|
1510
1508
|
}
|
|
1511
1509
|
}));
|
|
1512
|
-
|
|
1513
|
-
var _c$2 =
|
|
1510
|
+
index.insert(_el$20, (() => {
|
|
1511
|
+
var _c$2 = index.createMemo(() => !!routerState().location.maskedLocation);
|
|
1514
1512
|
return () => _c$2() ? (() => {
|
|
1515
1513
|
var _el$35 = _tmpl$9(), _el$36 = _el$35.firstChild;
|
|
1516
|
-
|
|
1514
|
+
index.createRenderEffect((_p$) => {
|
|
1517
1515
|
var _v$24 = styles().maskedBadgeContainer, _v$25 = styles().maskedBadge;
|
|
1518
|
-
_v$24 !== _p$.e &&
|
|
1519
|
-
_v$25 !== _p$.t &&
|
|
1516
|
+
_v$24 !== _p$.e && index.className(_el$35, _p$.e = _v$24);
|
|
1517
|
+
_v$25 !== _p$.t && index.className(_el$36, _p$.t = _v$25);
|
|
1520
1518
|
return _p$;
|
|
1521
1519
|
}, {
|
|
1522
1520
|
e: void 0,
|
|
@@ -1525,13 +1523,13 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1525
1523
|
return _el$35;
|
|
1526
1524
|
})() : null;
|
|
1527
1525
|
})(), null);
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
var _c$3 =
|
|
1526
|
+
index.insert(_el$23, () => routerState().location.pathname);
|
|
1527
|
+
index.insert(_el$22, (() => {
|
|
1528
|
+
var _c$3 = index.createMemo(() => !!routerState().location.maskedLocation);
|
|
1531
1529
|
return () => _c$3() ? (() => {
|
|
1532
1530
|
var _el$37 = _tmpl$4();
|
|
1533
|
-
|
|
1534
|
-
|
|
1531
|
+
index.insert(_el$37, () => routerState().location.maskedLocation?.pathname);
|
|
1532
|
+
index.createRenderEffect(() => index.className(_el$37, styles().maskedLocation));
|
|
1535
1533
|
return _el$37;
|
|
1536
1534
|
})() : null;
|
|
1537
1535
|
})(), null);
|
|
@@ -1544,14 +1542,14 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1544
1542
|
_el$28.$$click = () => {
|
|
1545
1543
|
setCurrentTab("history");
|
|
1546
1544
|
};
|
|
1547
|
-
|
|
1545
|
+
index.insert(_el$30, index.createComponent(index.Switch, {
|
|
1548
1546
|
get children() {
|
|
1549
|
-
return [
|
|
1547
|
+
return [index.createComponent(index.Match, {
|
|
1550
1548
|
get when() {
|
|
1551
1549
|
return currentTab() === "routes";
|
|
1552
1550
|
},
|
|
1553
1551
|
get children() {
|
|
1554
|
-
return
|
|
1552
|
+
return index.createComponent(RouteComp, {
|
|
1555
1553
|
routerState,
|
|
1556
1554
|
router,
|
|
1557
1555
|
get route() {
|
|
@@ -1562,19 +1560,19 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1562
1560
|
setActiveId
|
|
1563
1561
|
});
|
|
1564
1562
|
}
|
|
1565
|
-
}),
|
|
1563
|
+
}), index.createComponent(index.Match, {
|
|
1566
1564
|
get when() {
|
|
1567
1565
|
return currentTab() === "matches";
|
|
1568
1566
|
},
|
|
1569
1567
|
get children() {
|
|
1570
1568
|
var _el$31 = _tmpl$6();
|
|
1571
|
-
|
|
1569
|
+
index.insert(_el$31, () => (routerState().pendingMatches?.length ? routerState().pendingMatches : routerState().matches)?.map((match, _i) => {
|
|
1572
1570
|
return (() => {
|
|
1573
1571
|
var _el$38 = _tmpl$0(), _el$39 = _el$38.firstChild;
|
|
1574
1572
|
_el$38.$$click = () => setActiveId(activeId() === match.id ? "" : match.id);
|
|
1575
|
-
|
|
1573
|
+
index.insert(_el$38, index.createComponent(NavigateLink, {
|
|
1576
1574
|
get left() {
|
|
1577
|
-
return
|
|
1575
|
+
return index.createComponent(NavigateButton, {
|
|
1578
1576
|
get to() {
|
|
1579
1577
|
return match.pathname;
|
|
1580
1578
|
},
|
|
@@ -1588,23 +1586,23 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1588
1586
|
});
|
|
1589
1587
|
},
|
|
1590
1588
|
get right() {
|
|
1591
|
-
return
|
|
1589
|
+
return index.createComponent(AgeTicker, {
|
|
1592
1590
|
match,
|
|
1593
1591
|
router
|
|
1594
1592
|
});
|
|
1595
1593
|
},
|
|
1596
1594
|
get children() {
|
|
1597
1595
|
var _el$40 = _tmpl$4();
|
|
1598
|
-
|
|
1599
|
-
|
|
1596
|
+
index.insert(_el$40, () => `${match.routeId === routerCore.rootRouteId ? routerCore.rootRouteId : match.pathname}`);
|
|
1597
|
+
index.createRenderEffect(() => index.className(_el$40, styles().matchID));
|
|
1600
1598
|
return _el$40;
|
|
1601
1599
|
}
|
|
1602
1600
|
}), null);
|
|
1603
|
-
|
|
1601
|
+
index.createRenderEffect((_p$) => {
|
|
1604
1602
|
var _v$26 = `Open match details for ${match.id}`, _v$27 = clsx.clsx(styles().matchRow(match === activeMatch())), _v$28 = clsx.clsx(styles().matchIndicator(getStatusColor(match)));
|
|
1605
|
-
_v$26 !== _p$.e &&
|
|
1606
|
-
_v$27 !== _p$.t &&
|
|
1607
|
-
_v$28 !== _p$.a &&
|
|
1603
|
+
_v$26 !== _p$.e && index.setAttribute(_el$38, "aria-label", _p$.e = _v$26);
|
|
1604
|
+
_v$27 !== _p$.t && index.className(_el$38, _p$.t = _v$27);
|
|
1605
|
+
_v$28 !== _p$.a && index.className(_el$39, _p$.a = _v$28);
|
|
1608
1606
|
return _p$;
|
|
1609
1607
|
}, {
|
|
1610
1608
|
e: void 0,
|
|
@@ -1616,21 +1614,21 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1616
1614
|
}));
|
|
1617
1615
|
return _el$31;
|
|
1618
1616
|
}
|
|
1619
|
-
}),
|
|
1617
|
+
}), index.createComponent(index.Match, {
|
|
1620
1618
|
get when() {
|
|
1621
1619
|
return currentTab() === "history";
|
|
1622
1620
|
},
|
|
1623
1621
|
get children() {
|
|
1624
1622
|
var _el$32 = _tmpl$7(), _el$33 = _el$32.firstChild;
|
|
1625
|
-
|
|
1623
|
+
index.insert(_el$33, index.createComponent(index.For, {
|
|
1626
1624
|
get each() {
|
|
1627
1625
|
return history();
|
|
1628
1626
|
},
|
|
1629
|
-
children: (match,
|
|
1627
|
+
children: (match, index$1) => (() => {
|
|
1630
1628
|
var _el$41 = _tmpl$1(), _el$42 = _el$41.firstChild;
|
|
1631
|
-
|
|
1629
|
+
index.insert(_el$41, index.createComponent(NavigateLink, {
|
|
1632
1630
|
get left() {
|
|
1633
|
-
return
|
|
1631
|
+
return index.createComponent(NavigateButton, {
|
|
1634
1632
|
get to() {
|
|
1635
1633
|
return match.pathname;
|
|
1636
1634
|
},
|
|
@@ -1644,22 +1642,22 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1644
1642
|
});
|
|
1645
1643
|
},
|
|
1646
1644
|
get right() {
|
|
1647
|
-
return
|
|
1645
|
+
return index.createComponent(AgeTicker, {
|
|
1648
1646
|
match,
|
|
1649
1647
|
router
|
|
1650
1648
|
});
|
|
1651
1649
|
},
|
|
1652
1650
|
get children() {
|
|
1653
1651
|
var _el$43 = _tmpl$4();
|
|
1654
|
-
|
|
1655
|
-
|
|
1652
|
+
index.insert(_el$43, () => `${match.routeId === routerCore.rootRouteId ? routerCore.rootRouteId : match.pathname}`);
|
|
1653
|
+
index.createRenderEffect(() => index.className(_el$43, styles().matchID));
|
|
1656
1654
|
return _el$43;
|
|
1657
1655
|
}
|
|
1658
1656
|
}), null);
|
|
1659
|
-
|
|
1660
|
-
var _v$29 = clsx.clsx(styles().matchRow(match === activeMatch())), _v$30 = clsx.clsx(styles().matchIndicator(
|
|
1661
|
-
_v$29 !== _p$.e &&
|
|
1662
|
-
_v$30 !== _p$.t &&
|
|
1657
|
+
index.createRenderEffect((_p$) => {
|
|
1658
|
+
var _v$29 = clsx.clsx(styles().matchRow(match === activeMatch())), _v$30 = clsx.clsx(styles().matchIndicator(index$1() === 0 ? "green" : "gray"));
|
|
1659
|
+
_v$29 !== _p$.e && index.className(_el$41, _p$.e = _v$29);
|
|
1660
|
+
_v$30 !== _p$.t && index.className(_el$42, _p$.t = _v$30);
|
|
1663
1661
|
return _p$;
|
|
1664
1662
|
}, {
|
|
1665
1663
|
e: void 0,
|
|
@@ -1668,11 +1666,11 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1668
1666
|
return _el$41;
|
|
1669
1667
|
})()
|
|
1670
1668
|
}), null);
|
|
1671
|
-
|
|
1672
|
-
var _c$4 =
|
|
1669
|
+
index.insert(_el$33, (() => {
|
|
1670
|
+
var _c$4 = index.createMemo(() => !!hasHistoryOverflowed());
|
|
1673
1671
|
return () => _c$4() ? (() => {
|
|
1674
1672
|
var _el$44 = _tmpl$10();
|
|
1675
|
-
|
|
1673
|
+
index.createRenderEffect(() => index.className(_el$44, styles().historyOverflowContainer));
|
|
1676
1674
|
return _el$44;
|
|
1677
1675
|
})() : null;
|
|
1678
1676
|
})(), null);
|
|
@@ -1681,17 +1679,17 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1681
1679
|
})];
|
|
1682
1680
|
}
|
|
1683
1681
|
}));
|
|
1684
|
-
|
|
1685
|
-
var _c$5 =
|
|
1682
|
+
index.insert(_el$18, (() => {
|
|
1683
|
+
var _c$5 = index.createMemo(() => !!routerState().cachedMatches.length);
|
|
1686
1684
|
return () => _c$5() ? (() => {
|
|
1687
1685
|
var _el$45 = _tmpl$11(), _el$46 = _el$45.firstChild, _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$46.nextSibling;
|
|
1688
|
-
|
|
1686
|
+
index.insert(_el$49, () => routerState().cachedMatches.map((match) => {
|
|
1689
1687
|
return (() => {
|
|
1690
1688
|
var _el$50 = _tmpl$0(), _el$51 = _el$50.firstChild;
|
|
1691
1689
|
_el$50.$$click = () => setActiveId(activeId() === match.id ? "" : match.id);
|
|
1692
|
-
|
|
1690
|
+
index.insert(_el$50, index.createComponent(NavigateLink, {
|
|
1693
1691
|
get left() {
|
|
1694
|
-
return
|
|
1692
|
+
return index.createComponent(NavigateButton, {
|
|
1695
1693
|
get to() {
|
|
1696
1694
|
return match.pathname;
|
|
1697
1695
|
},
|
|
@@ -1705,23 +1703,23 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1705
1703
|
});
|
|
1706
1704
|
},
|
|
1707
1705
|
get right() {
|
|
1708
|
-
return
|
|
1706
|
+
return index.createComponent(AgeTicker, {
|
|
1709
1707
|
match,
|
|
1710
1708
|
router
|
|
1711
1709
|
});
|
|
1712
1710
|
},
|
|
1713
1711
|
get children() {
|
|
1714
1712
|
var _el$52 = _tmpl$4();
|
|
1715
|
-
|
|
1716
|
-
|
|
1713
|
+
index.insert(_el$52, () => `${match.id}`);
|
|
1714
|
+
index.createRenderEffect(() => index.className(_el$52, styles().matchID));
|
|
1717
1715
|
return _el$52;
|
|
1718
1716
|
}
|
|
1719
1717
|
}), null);
|
|
1720
|
-
|
|
1718
|
+
index.createRenderEffect((_p$) => {
|
|
1721
1719
|
var _v$34 = `Open match details for ${match.id}`, _v$35 = clsx.clsx(styles().matchRow(match === activeMatch())), _v$36 = clsx.clsx(styles().matchIndicator(getStatusColor(match)));
|
|
1722
|
-
_v$34 !== _p$.e &&
|
|
1723
|
-
_v$35 !== _p$.t &&
|
|
1724
|
-
_v$36 !== _p$.a &&
|
|
1720
|
+
_v$34 !== _p$.e && index.setAttribute(_el$50, "aria-label", _p$.e = _v$34);
|
|
1721
|
+
_v$35 !== _p$.t && index.className(_el$50, _p$.t = _v$35);
|
|
1722
|
+
_v$36 !== _p$.a && index.className(_el$51, _p$.a = _v$36);
|
|
1725
1723
|
return _p$;
|
|
1726
1724
|
}, {
|
|
1727
1725
|
e: void 0,
|
|
@@ -1731,11 +1729,11 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1731
1729
|
return _el$50;
|
|
1732
1730
|
})();
|
|
1733
1731
|
}));
|
|
1734
|
-
|
|
1732
|
+
index.createRenderEffect((_p$) => {
|
|
1735
1733
|
var _v$31 = styles().cachedMatchesContainer, _v$32 = styles().detailsHeader, _v$33 = styles().detailsHeaderInfo;
|
|
1736
|
-
_v$31 !== _p$.e &&
|
|
1737
|
-
_v$32 !== _p$.t &&
|
|
1738
|
-
_v$33 !== _p$.a &&
|
|
1734
|
+
_v$31 !== _p$.e && index.className(_el$45, _p$.e = _v$31);
|
|
1735
|
+
_v$32 !== _p$.t && index.className(_el$46, _p$.t = _v$32);
|
|
1736
|
+
_v$33 !== _p$.a && index.className(_el$48, _p$.a = _v$33);
|
|
1739
1737
|
return _p$;
|
|
1740
1738
|
}, {
|
|
1741
1739
|
e: void 0,
|
|
@@ -1745,59 +1743,59 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1745
1743
|
return _el$45;
|
|
1746
1744
|
})() : null;
|
|
1747
1745
|
})(), null);
|
|
1748
|
-
|
|
1749
|
-
var _c$6 =
|
|
1746
|
+
index.insert(_el$11, (() => {
|
|
1747
|
+
var _c$6 = index.createMemo(() => !!(activeMatch() && activeMatch()?.status));
|
|
1750
1748
|
return () => _c$6() ? (() => {
|
|
1751
1749
|
var _el$53 = _tmpl$12(), _el$54 = _el$53.firstChild, _el$55 = _el$54.nextSibling, _el$56 = _el$55.firstChild, _el$57 = _el$56.firstChild, _el$58 = _el$57.firstChild, _el$59 = _el$57.nextSibling, _el$60 = _el$59.firstChild, _el$61 = _el$60.nextSibling, _el$62 = _el$61.firstChild, _el$63 = _el$59.nextSibling, _el$64 = _el$63.firstChild, _el$65 = _el$64.nextSibling, _el$66 = _el$63.nextSibling, _el$67 = _el$66.firstChild, _el$68 = _el$67.nextSibling, _el$69 = _el$55.nextSibling, _el$70 = _el$69.nextSibling;
|
|
1752
|
-
|
|
1753
|
-
var _c$8 =
|
|
1750
|
+
index.insert(_el$58, (() => {
|
|
1751
|
+
var _c$8 = index.createMemo(() => !!(activeMatch()?.status === "success" && activeMatch()?.isFetching));
|
|
1754
1752
|
return () => _c$8() ? "fetching" : activeMatch()?.status;
|
|
1755
1753
|
})());
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
var _c$9 =
|
|
1754
|
+
index.insert(_el$62, () => activeMatch()?.id);
|
|
1755
|
+
index.insert(_el$65, (() => {
|
|
1756
|
+
var _c$9 = index.createMemo(() => !!routerState().pendingMatches?.find((d) => d.id === activeMatch()?.id));
|
|
1759
1757
|
return () => _c$9() ? "Pending" : routerState().matches.find((d) => d.id === activeMatch()?.id) ? "Active" : "Cached";
|
|
1760
1758
|
})());
|
|
1761
|
-
|
|
1762
|
-
var _c$0 =
|
|
1759
|
+
index.insert(_el$68, (() => {
|
|
1760
|
+
var _c$0 = index.createMemo(() => !!activeMatch()?.updatedAt);
|
|
1763
1761
|
return () => _c$0() ? new Date(activeMatch()?.updatedAt).toLocaleTimeString() : "N/A";
|
|
1764
1762
|
})());
|
|
1765
|
-
|
|
1766
|
-
var _c$1 =
|
|
1763
|
+
index.insert(_el$53, (() => {
|
|
1764
|
+
var _c$1 = index.createMemo(() => !!activeMatchLoaderData());
|
|
1767
1765
|
return () => _c$1() ? [(() => {
|
|
1768
1766
|
var _el$71 = _tmpl$13();
|
|
1769
|
-
|
|
1767
|
+
index.createRenderEffect(() => index.className(_el$71, styles().detailsHeader));
|
|
1770
1768
|
return _el$71;
|
|
1771
1769
|
})(), (() => {
|
|
1772
1770
|
var _el$72 = _tmpl$6();
|
|
1773
|
-
|
|
1771
|
+
index.insert(_el$72, index.createComponent(Explorer, {
|
|
1774
1772
|
label: "loaderData",
|
|
1775
1773
|
value: activeMatchLoaderData,
|
|
1776
1774
|
defaultExpanded: {}
|
|
1777
1775
|
}));
|
|
1778
|
-
|
|
1776
|
+
index.createRenderEffect(() => index.className(_el$72, styles().detailsContent));
|
|
1779
1777
|
return _el$72;
|
|
1780
1778
|
})()] : null;
|
|
1781
1779
|
})(), _el$69);
|
|
1782
|
-
|
|
1780
|
+
index.insert(_el$70, index.createComponent(Explorer, {
|
|
1783
1781
|
label: "Match",
|
|
1784
1782
|
value: activeMatchValue,
|
|
1785
1783
|
defaultExpanded: {}
|
|
1786
1784
|
}));
|
|
1787
|
-
|
|
1785
|
+
index.createRenderEffect((_p$) => {
|
|
1788
1786
|
var _v$37 = styles().thirdContainer, _v$38 = styles().detailsHeader, _v$39 = styles().matchDetails, _v$40 = styles().matchStatus(activeMatch()?.status, activeMatch()?.isFetching), _v$41 = styles().matchDetailsInfoLabel, _v$42 = styles().matchDetailsInfo, _v$43 = styles().matchDetailsInfoLabel, _v$44 = styles().matchDetailsInfo, _v$45 = styles().matchDetailsInfoLabel, _v$46 = styles().matchDetailsInfo, _v$47 = styles().detailsHeader, _v$48 = styles().detailsContent;
|
|
1789
|
-
_v$37 !== _p$.e &&
|
|
1790
|
-
_v$38 !== _p$.t &&
|
|
1791
|
-
_v$39 !== _p$.a &&
|
|
1792
|
-
_v$40 !== _p$.o &&
|
|
1793
|
-
_v$41 !== _p$.i &&
|
|
1794
|
-
_v$42 !== _p$.n &&
|
|
1795
|
-
_v$43 !== _p$.s &&
|
|
1796
|
-
_v$44 !== _p$.h &&
|
|
1797
|
-
_v$45 !== _p$.r &&
|
|
1798
|
-
_v$46 !== _p$.d &&
|
|
1799
|
-
_v$47 !== _p$.l &&
|
|
1800
|
-
_v$48 !== _p$.u &&
|
|
1787
|
+
_v$37 !== _p$.e && index.className(_el$53, _p$.e = _v$37);
|
|
1788
|
+
_v$38 !== _p$.t && index.className(_el$54, _p$.t = _v$38);
|
|
1789
|
+
_v$39 !== _p$.a && index.className(_el$56, _p$.a = _v$39);
|
|
1790
|
+
_v$40 !== _p$.o && index.className(_el$57, _p$.o = _v$40);
|
|
1791
|
+
_v$41 !== _p$.i && index.className(_el$59, _p$.i = _v$41);
|
|
1792
|
+
_v$42 !== _p$.n && index.className(_el$61, _p$.n = _v$42);
|
|
1793
|
+
_v$43 !== _p$.s && index.className(_el$63, _p$.s = _v$43);
|
|
1794
|
+
_v$44 !== _p$.h && index.className(_el$65, _p$.h = _v$44);
|
|
1795
|
+
_v$45 !== _p$.r && index.className(_el$66, _p$.r = _v$45);
|
|
1796
|
+
_v$46 !== _p$.d && index.className(_el$68, _p$.d = _v$46);
|
|
1797
|
+
_v$47 !== _p$.l && index.className(_el$69, _p$.l = _v$47);
|
|
1798
|
+
_v$48 !== _p$.u && index.className(_el$70, _p$.u = _v$48);
|
|
1801
1799
|
return _p$;
|
|
1802
1800
|
}, {
|
|
1803
1801
|
e: void 0,
|
|
@@ -1816,15 +1814,15 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1816
1814
|
return _el$53;
|
|
1817
1815
|
})() : null;
|
|
1818
1816
|
})(), null);
|
|
1819
|
-
|
|
1820
|
-
var _c$7 =
|
|
1817
|
+
index.insert(_el$11, (() => {
|
|
1818
|
+
var _c$7 = index.createMemo(() => !!hasSearch());
|
|
1821
1819
|
return () => _c$7() ? (() => {
|
|
1822
1820
|
var _el$73 = _tmpl$14(), _el$74 = _el$73.firstChild;
|
|
1823
1821
|
_el$74.firstChild;
|
|
1824
1822
|
var _el$76 = _el$74.nextSibling;
|
|
1825
|
-
|
|
1823
|
+
index.insert(_el$74, typeof navigator !== "undefined" ? (() => {
|
|
1826
1824
|
var _el$77 = _tmpl$15();
|
|
1827
|
-
|
|
1825
|
+
index.insert(_el$77, index.createComponent(CopyButton, {
|
|
1828
1826
|
getValue: () => {
|
|
1829
1827
|
const search = routerState().location.search;
|
|
1830
1828
|
return JSON.stringify(search);
|
|
@@ -1832,7 +1830,7 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1832
1830
|
}));
|
|
1833
1831
|
return _el$77;
|
|
1834
1832
|
})() : null, null);
|
|
1835
|
-
|
|
1833
|
+
index.insert(_el$76, index.createComponent(Explorer, {
|
|
1836
1834
|
value: locationSearchValue,
|
|
1837
1835
|
get defaultExpanded() {
|
|
1838
1836
|
return Object.keys(routerState().location.search).reduce((obj, next) => {
|
|
@@ -1841,11 +1839,11 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1841
1839
|
}, {});
|
|
1842
1840
|
}
|
|
1843
1841
|
}));
|
|
1844
|
-
|
|
1842
|
+
index.createRenderEffect((_p$) => {
|
|
1845
1843
|
var _v$49 = styles().fourthContainer, _v$50 = styles().detailsHeader, _v$51 = styles().detailsContent;
|
|
1846
|
-
_v$49 !== _p$.e &&
|
|
1847
|
-
_v$50 !== _p$.t &&
|
|
1848
|
-
_v$51 !== _p$.a &&
|
|
1844
|
+
_v$49 !== _p$.e && index.className(_el$73, _p$.e = _v$49);
|
|
1845
|
+
_v$50 !== _p$.t && index.className(_el$74, _p$.t = _v$50);
|
|
1846
|
+
_v$51 !== _p$.a && index.className(_el$76, _p$.a = _v$51);
|
|
1849
1847
|
return _p$;
|
|
1850
1848
|
}, {
|
|
1851
1849
|
e: void 0,
|
|
@@ -1855,28 +1853,28 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1855
1853
|
return _el$73;
|
|
1856
1854
|
})() : null;
|
|
1857
1855
|
})(), null);
|
|
1858
|
-
|
|
1856
|
+
index.createRenderEffect((_p$) => {
|
|
1859
1857
|
var _v$6 = styles().panelCloseBtn, _v$7 = styles().panelCloseBtnIcon, _v$8 = styles().firstContainer, _v$9 = styles().row, _v$0 = styles().routerExplorerContainer, _v$1 = styles().routerExplorer, _v$10 = styles().secondContainer, _v$11 = styles().matchesContainer, _v$12 = styles().detailsHeader, _v$13 = styles().detailsContent, _v$14 = styles().detailsHeader, _v$15 = styles().routeMatchesToggle, _v$16 = currentTab() === "routes", _v$17 = clsx.clsx(styles().routeMatchesToggleBtn(currentTab() === "routes", true)), _v$18 = currentTab() === "matches", _v$19 = clsx.clsx(styles().routeMatchesToggleBtn(currentTab() === "matches", true)), _v$20 = currentTab() === "history", _v$21 = clsx.clsx(styles().routeMatchesToggleBtn(currentTab() === "history", false)), _v$22 = styles().detailsHeaderInfo, _v$23 = clsx.clsx(styles().routesContainer);
|
|
1860
|
-
_v$6 !== _p$.e &&
|
|
1861
|
-
_v$7 !== _p$.t &&
|
|
1862
|
-
_v$8 !== _p$.a &&
|
|
1863
|
-
_v$9 !== _p$.o &&
|
|
1864
|
-
_v$0 !== _p$.i &&
|
|
1865
|
-
_v$1 !== _p$.n &&
|
|
1866
|
-
_v$10 !== _p$.s &&
|
|
1867
|
-
_v$11 !== _p$.h &&
|
|
1868
|
-
_v$12 !== _p$.r &&
|
|
1869
|
-
_v$13 !== _p$.d &&
|
|
1870
|
-
_v$14 !== _p$.l &&
|
|
1871
|
-
_v$15 !== _p$.u &&
|
|
1858
|
+
_v$6 !== _p$.e && index.className(_el$12, _p$.e = _v$6);
|
|
1859
|
+
_v$7 !== _p$.t && index.setAttribute(_el$13, "class", _p$.t = _v$7);
|
|
1860
|
+
_v$8 !== _p$.a && index.className(_el$14, _p$.a = _v$8);
|
|
1861
|
+
_v$9 !== _p$.o && index.className(_el$15, _p$.o = _v$9);
|
|
1862
|
+
_v$0 !== _p$.i && index.className(_el$16, _p$.i = _v$0);
|
|
1863
|
+
_v$1 !== _p$.n && index.className(_el$17, _p$.n = _v$1);
|
|
1864
|
+
_v$10 !== _p$.s && index.className(_el$18, _p$.s = _v$10);
|
|
1865
|
+
_v$11 !== _p$.h && index.className(_el$19, _p$.h = _v$11);
|
|
1866
|
+
_v$12 !== _p$.r && index.className(_el$20, _p$.r = _v$12);
|
|
1867
|
+
_v$13 !== _p$.d && index.className(_el$22, _p$.d = _v$13);
|
|
1868
|
+
_v$14 !== _p$.l && index.className(_el$24, _p$.l = _v$14);
|
|
1869
|
+
_v$15 !== _p$.u && index.className(_el$25, _p$.u = _v$15);
|
|
1872
1870
|
_v$16 !== _p$.c && (_el$26.disabled = _p$.c = _v$16);
|
|
1873
|
-
_v$17 !== _p$.w &&
|
|
1871
|
+
_v$17 !== _p$.w && index.className(_el$26, _p$.w = _v$17);
|
|
1874
1872
|
_v$18 !== _p$.m && (_el$27.disabled = _p$.m = _v$18);
|
|
1875
|
-
_v$19 !== _p$.f &&
|
|
1873
|
+
_v$19 !== _p$.f && index.className(_el$27, _p$.f = _v$19);
|
|
1876
1874
|
_v$20 !== _p$.y && (_el$28.disabled = _p$.y = _v$20);
|
|
1877
|
-
_v$21 !== _p$.g &&
|
|
1878
|
-
_v$22 !== _p$.p &&
|
|
1879
|
-
_v$23 !== _p$.b &&
|
|
1875
|
+
_v$21 !== _p$.g && index.className(_el$28, _p$.g = _v$21);
|
|
1876
|
+
_v$22 !== _p$.p && index.className(_el$29, _p$.p = _v$22);
|
|
1877
|
+
_v$23 !== _p$.b && index.className(_el$30, _p$.b = _v$23);
|
|
1880
1878
|
return _p$;
|
|
1881
1879
|
}, {
|
|
1882
1880
|
e: void 0,
|
|
@@ -1906,7 +1904,7 @@ const BaseTanStackRouterDevtoolsPanel = function BaseTanStackRouterDevtoolsPanel
|
|
|
1906
1904
|
function CopyButton({
|
|
1907
1905
|
getValue
|
|
1908
1906
|
}) {
|
|
1909
|
-
const [copied, setCopied] =
|
|
1907
|
+
const [copied, setCopied] = index.createSignal(false);
|
|
1910
1908
|
let timeoutId = null;
|
|
1911
1909
|
const handleCopy = async () => {
|
|
1912
1910
|
if (typeof navigator === "undefined" || !navigator.clipboard?.writeText) {
|
|
@@ -1923,18 +1921,18 @@ function CopyButton({
|
|
|
1923
1921
|
console.error("TanStack Router Devtools: Failed to copy", e);
|
|
1924
1922
|
}
|
|
1925
1923
|
};
|
|
1926
|
-
|
|
1924
|
+
index.onCleanup(() => {
|
|
1927
1925
|
if (timeoutId) clearTimeout(timeoutId);
|
|
1928
1926
|
});
|
|
1929
1927
|
return (() => {
|
|
1930
1928
|
var _el$78 = _tmpl$16();
|
|
1931
1929
|
_el$78.$$click = handleCopy;
|
|
1932
|
-
|
|
1933
|
-
|
|
1930
|
+
index.insert(_el$78, () => copied() ? "✅" : "📋");
|
|
1931
|
+
index.createRenderEffect(() => index.setAttribute(_el$78, "title", copied() ? "Copied!" : "Copy"));
|
|
1934
1932
|
return _el$78;
|
|
1935
1933
|
})();
|
|
1936
1934
|
}
|
|
1937
|
-
|
|
1935
|
+
index.delegateEvents(["click", "mousedown"]);
|
|
1938
1936
|
const BaseTanStackRouterDevtoolsPanel$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1939
1937
|
__proto__: null,
|
|
1940
1938
|
BaseTanStackRouterDevtoolsPanel,
|
|
@@ -1945,4 +1943,4 @@ exports.BaseTanStackRouterDevtoolsPanel$1 = BaseTanStackRouterDevtoolsPanel$1;
|
|
|
1945
1943
|
exports.useIsMounted = useIsMounted;
|
|
1946
1944
|
exports.useLocalStorage = useLocalStorage;
|
|
1947
1945
|
exports.useStyles = useStyles$1;
|
|
1948
|
-
//# sourceMappingURL=BaseTanStackRouterDevtoolsPanel-
|
|
1946
|
+
//# sourceMappingURL=BaseTanStackRouterDevtoolsPanel-z0YMII09.cjs.map
|