@industry-theme/file-city-panel 0.5.68 → 0.5.70
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/panels/FileCityTrailExplorerPanel/FileCityTrailExplorerPanel.d.ts.map +1 -1
- package/dist/panels/FileCityTrailExplorerPanel/overlays/TrailFilePath.d.ts +12 -0
- package/dist/panels/FileCityTrailExplorerPanel/overlays/TrailFilePath.d.ts.map +1 -1
- package/dist/panels.bundle.js +232 -112
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileCityTrailExplorerPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/FileCityTrailExplorerPanel/FileCityTrailExplorerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,8BAA8B,CAAC;AAiBtC,OAAO,KAAK,EAEV,oCAAoC,EAErC,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"FileCityTrailExplorerPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/FileCityTrailExplorerPanel/FileCityTrailExplorerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,8BAA8B,CAAC;AAiBtC,OAAO,KAAK,EAEV,oCAAoC,EAErC,MAAM,wCAAwC,CAAC;AA2BhD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,oCAAoC,CA+ErC,CAAC"}
|
|
@@ -23,6 +23,18 @@ export interface TrailFilePathProps {
|
|
|
23
23
|
x: number;
|
|
24
24
|
z: number;
|
|
25
25
|
} | null;
|
|
26
|
+
/**
|
|
27
|
+
* Reveal markers progressively in order — dashed path draws out one
|
|
28
|
+
* step at a time and the active marker's filename floats above its
|
|
29
|
+
* dot. Loops with a brief pause at the end. Defaults to true.
|
|
30
|
+
*/
|
|
31
|
+
animate?: boolean;
|
|
32
|
+
/** Milliseconds spent walking the dashed line between consecutive dots. */
|
|
33
|
+
stepMs?: number;
|
|
34
|
+
/** Time the reveal lingers on each dot before walking to the next. */
|
|
35
|
+
dwellMs?: number;
|
|
36
|
+
/** Extra hold on the final dot at the end of a loop before resetting. */
|
|
37
|
+
endHoldMs?: number;
|
|
26
38
|
}
|
|
27
39
|
/**
|
|
28
40
|
* Sequential-path overlay: connects every marker's building in order
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrailFilePath.d.ts","sourceRoot":"","sources":["../../../../src/panels/FileCityTrailExplorerPanel/overlays/TrailFilePath.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD;;;;OAIG;IACH,SAAS,EAAE,SAAS,YAAY,EAAE,CAAC;IACnC;;;;OAIG;IACH,UAAU,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"TrailFilePath.d.ts","sourceRoot":"","sources":["../../../../src/panels/FileCityTrailExplorerPanel/overlays/TrailFilePath.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD;;;;OAIG;IACH,SAAS,EAAE,SAAS,YAAY,EAAE,CAAC;IACnC;;;;OAIG;IACH,UAAU,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC5C;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,gGA0ZxB,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -257806,11 +257806,40 @@ const TrailLeaderLine = React.forwardRef(function TrailLeaderLine2({ containerRe
|
|
|
257806
257806
|
)
|
|
257807
257807
|
] });
|
|
257808
257808
|
});
|
|
257809
|
-
const
|
|
257809
|
+
const fileBasename = (path2) => {
|
|
257810
|
+
const i = path2.lastIndexOf("/");
|
|
257811
|
+
return i >= 0 ? path2.slice(i + 1) : path2;
|
|
257812
|
+
};
|
|
257813
|
+
const fileDirname = (path2) => {
|
|
257814
|
+
const i = path2.lastIndexOf("/");
|
|
257815
|
+
return i > 0 ? path2.slice(0, i) : "";
|
|
257816
|
+
};
|
|
257817
|
+
const TrailFilePath = React.forwardRef(function TrailFilePath2({
|
|
257818
|
+
containerRef,
|
|
257819
|
+
buildings,
|
|
257820
|
+
cityCenter,
|
|
257821
|
+
animate: animate2 = true,
|
|
257822
|
+
stepMs = 1100,
|
|
257823
|
+
dwellMs = 1400,
|
|
257824
|
+
endHoldMs = 2200
|
|
257825
|
+
}, ref) {
|
|
257810
257826
|
const { theme: theme2 } = useTheme();
|
|
257811
257827
|
const color2 = theme2.colors.accent ?? "#22d3ee";
|
|
257828
|
+
const fontFamily = theme2.fonts.body;
|
|
257829
|
+
const calloutFontSize = String(theme2.fontSizes[1] ?? 14);
|
|
257830
|
+
const calloutFontWeight = String(theme2.fontWeights.semibold ?? 600);
|
|
257831
|
+
const calloutLineDy = String(Math.round((theme2.fontSizes[1] ?? 14) * 1.45));
|
|
257832
|
+
const surfaceColor = theme2.colors.backgroundSecondary ?? "#0f1419";
|
|
257833
|
+
const filenameColor = theme2.colors.text ?? "#f8fafc";
|
|
257834
|
+
const dirColor = theme2.colors.textMuted ?? "#94a3b8";
|
|
257812
257835
|
const groupRef = React.useRef(null);
|
|
257836
|
+
const calloutTextRef = React.useRef(null);
|
|
257837
|
+
const calloutBgRef = React.useRef(null);
|
|
257838
|
+
const leadDotRef = React.useRef(null);
|
|
257813
257839
|
const projectScratch = React.useRef(new THREE.Vector3());
|
|
257840
|
+
const animStartTsRef = React.useRef(
|
|
257841
|
+
typeof performance !== "undefined" ? performance.now() : 0
|
|
257842
|
+
);
|
|
257814
257843
|
const buildingsRef = React.useRef(buildings);
|
|
257815
257844
|
const cityCenterRef = React.useRef(cityCenter);
|
|
257816
257845
|
React.useEffect(() => {
|
|
@@ -257827,6 +257856,9 @@ const TrailFilePath = React.forwardRef(function TrailFilePath2({ containerRef, b
|
|
|
257827
257856
|
React.useEffect(() => {
|
|
257828
257857
|
if (buildings.length < 2) hideAll();
|
|
257829
257858
|
}, [buildings, hideAll]);
|
|
257859
|
+
React.useEffect(() => {
|
|
257860
|
+
animStartTsRef.current = typeof performance !== "undefined" ? performance.now() : 0;
|
|
257861
|
+
}, [animate2, buildings, dwellMs, stepMs, endHoldMs]);
|
|
257830
257862
|
const onCameraFrame = React.useCallback(
|
|
257831
257863
|
(camera, size) => {
|
|
257832
257864
|
const targets = buildingsRef.current;
|
|
@@ -257857,31 +257889,75 @@ const TrailFilePath = React.forwardRef(function TrailFilePath2({ containerRef, b
|
|
|
257857
257889
|
const y2 = canvasTop + (v.y * -0.5 + 0.5) * size.height;
|
|
257858
257890
|
points.push({ x: x2, y: y2, visible });
|
|
257859
257891
|
}
|
|
257892
|
+
const N = points.length;
|
|
257893
|
+
const slotMs = dwellMs + stepMs;
|
|
257894
|
+
const period = N >= 2 ? (N - 1) * slotMs + dwellMs + endHoldMs : 0;
|
|
257895
|
+
let revealedCount = animate2 ? 0 : N;
|
|
257896
|
+
let leadingTip = null;
|
|
257897
|
+
let traverseFrac = null;
|
|
257898
|
+
let dwellElapsed = 0;
|
|
257899
|
+
if (animate2 && period > 0) {
|
|
257900
|
+
const elapsed = ((typeof performance !== "undefined" ? performance.now() : Date.now()) - animStartTsRef.current) % period;
|
|
257901
|
+
const traversalsEnd = (N - 1) * slotMs;
|
|
257902
|
+
if (elapsed >= traversalsEnd) {
|
|
257903
|
+
revealedCount = N;
|
|
257904
|
+
dwellElapsed = elapsed - traversalsEnd;
|
|
257905
|
+
} else {
|
|
257906
|
+
const slot = Math.floor(elapsed / slotMs);
|
|
257907
|
+
const tInSlot = elapsed - slot * slotMs;
|
|
257908
|
+
revealedCount = slot + 1;
|
|
257909
|
+
if (tInSlot >= dwellMs) {
|
|
257910
|
+
const t = tInSlot - dwellMs;
|
|
257911
|
+
const frac2 = stepMs > 0 ? t / stepMs : 1;
|
|
257912
|
+
traverseFrac = frac2;
|
|
257913
|
+
const eased = frac2 * frac2 * (3 - 2 * frac2);
|
|
257914
|
+
const a = points[slot];
|
|
257915
|
+
const b = points[slot + 1];
|
|
257916
|
+
leadingTip = {
|
|
257917
|
+
x: a.x + (b.x - a.x) * eased,
|
|
257918
|
+
y: a.y + (b.y - a.y) * eased,
|
|
257919
|
+
visible: a.visible && b.visible
|
|
257920
|
+
};
|
|
257921
|
+
} else {
|
|
257922
|
+
dwellElapsed = tInSlot;
|
|
257923
|
+
}
|
|
257924
|
+
}
|
|
257925
|
+
}
|
|
257926
|
+
const lastIndex = revealedCount - 1;
|
|
257860
257927
|
let d = "";
|
|
257861
|
-
|
|
257928
|
+
let started = false;
|
|
257929
|
+
for (let i = 0; i <= lastIndex; i++) {
|
|
257862
257930
|
const p2 = points[i];
|
|
257863
257931
|
if (!p2.visible) {
|
|
257864
|
-
|
|
257932
|
+
started = false;
|
|
257865
257933
|
continue;
|
|
257866
257934
|
}
|
|
257867
|
-
if (
|
|
257935
|
+
if (!started) {
|
|
257868
257936
|
d += `M ${p2.x} ${p2.y} `;
|
|
257937
|
+
started = true;
|
|
257869
257938
|
} else {
|
|
257870
257939
|
d += `L ${p2.x} ${p2.y} `;
|
|
257871
257940
|
}
|
|
257872
257941
|
}
|
|
257873
|
-
|
|
257942
|
+
if (leadingTip && leadingTip.visible && started) {
|
|
257943
|
+
d += `L ${leadingTip.x} ${leadingTip.y} `;
|
|
257944
|
+
}
|
|
257945
|
+
const needed = 1 + targets.length * 2;
|
|
257946
|
+
if (g2.children.length === 0) {
|
|
257874
257947
|
g2.appendChild(
|
|
257875
257948
|
document.createElementNS("http://www.w3.org/2000/svg", "path")
|
|
257876
257949
|
);
|
|
257950
|
+
}
|
|
257951
|
+
while (g2.children.length < needed) {
|
|
257952
|
+
const isCircleSlot = g2.children.length % 2 === 1;
|
|
257877
257953
|
g2.appendChild(
|
|
257878
|
-
document.createElementNS(
|
|
257879
|
-
|
|
257880
|
-
|
|
257881
|
-
|
|
257954
|
+
document.createElementNS(
|
|
257955
|
+
"http://www.w3.org/2000/svg",
|
|
257956
|
+
isCircleSlot ? "circle" : "text"
|
|
257957
|
+
)
|
|
257882
257958
|
);
|
|
257883
257959
|
}
|
|
257884
|
-
while (g2.children.length >
|
|
257960
|
+
while (g2.children.length > needed) {
|
|
257885
257961
|
g2.removeChild(g2.children[g2.children.length - 1]);
|
|
257886
257962
|
}
|
|
257887
257963
|
const pathEl = g2.children[0];
|
|
@@ -257895,33 +257971,132 @@ const TrailFilePath = React.forwardRef(function TrailFilePath2({ containerRef, b
|
|
|
257895
257971
|
const dot = g2.children[1 + i * 2];
|
|
257896
257972
|
const label = g2.children[1 + i * 2 + 1];
|
|
257897
257973
|
const p2 = points[i];
|
|
257898
|
-
|
|
257974
|
+
const revealed = !animate2 || i <= lastIndex;
|
|
257975
|
+
const isCurrent = animate2 && i === lastIndex;
|
|
257976
|
+
if (!p2.visible || !revealed) {
|
|
257899
257977
|
dot.setAttribute("opacity", "0");
|
|
257900
257978
|
label.setAttribute("opacity", "0");
|
|
257901
257979
|
continue;
|
|
257902
257980
|
}
|
|
257903
257981
|
dot.setAttribute("cx", String(p2.x));
|
|
257904
257982
|
dot.setAttribute("cy", String(p2.y));
|
|
257905
|
-
dot.setAttribute("r", "6");
|
|
257983
|
+
dot.setAttribute("r", isCurrent ? "8" : "6");
|
|
257906
257984
|
dot.setAttribute("fill", color2);
|
|
257907
|
-
dot.setAttribute("stroke",
|
|
257985
|
+
dot.setAttribute("stroke", surfaceColor);
|
|
257908
257986
|
dot.setAttribute("stroke-width", "1.5");
|
|
257909
257987
|
dot.setAttribute("opacity", "1");
|
|
257910
|
-
|
|
257911
|
-
|
|
257912
|
-
|
|
257913
|
-
|
|
257914
|
-
|
|
257915
|
-
|
|
257916
|
-
|
|
257917
|
-
|
|
257988
|
+
if (animate2) {
|
|
257989
|
+
label.setAttribute("opacity", "0");
|
|
257990
|
+
} else {
|
|
257991
|
+
label.setAttribute("x", String(p2.x));
|
|
257992
|
+
label.setAttribute("y", String(p2.y - 10));
|
|
257993
|
+
label.setAttribute("text-anchor", "middle");
|
|
257994
|
+
label.setAttribute("fill", color2);
|
|
257995
|
+
label.setAttribute("font-size", "11");
|
|
257996
|
+
label.setAttribute("font-weight", "600");
|
|
257997
|
+
label.setAttribute("opacity", "1");
|
|
257998
|
+
label.textContent = String(i + 1);
|
|
257999
|
+
}
|
|
258000
|
+
}
|
|
258001
|
+
const leadDot = leadDotRef.current;
|
|
258002
|
+
if (leadDot) {
|
|
258003
|
+
if (leadingTip && leadingTip.visible) {
|
|
258004
|
+
leadDot.setAttribute("cx", String(leadingTip.x));
|
|
258005
|
+
leadDot.setAttribute("cy", String(leadingTip.y));
|
|
258006
|
+
leadDot.setAttribute("r", "4");
|
|
258007
|
+
leadDot.setAttribute("fill", color2);
|
|
258008
|
+
leadDot.setAttribute("opacity", "0.85");
|
|
258009
|
+
} else {
|
|
258010
|
+
leadDot.setAttribute("opacity", "0");
|
|
258011
|
+
}
|
|
257918
258012
|
}
|
|
258013
|
+
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
258014
|
+
const paintCallout = (textEl, bgEl, point2, path2, opacity) => {
|
|
258015
|
+
if (!textEl || !bgEl) return;
|
|
258016
|
+
if (!point2 || !point2.visible || opacity <= 1e-3 || !path2) {
|
|
258017
|
+
textEl.setAttribute("opacity", "0");
|
|
258018
|
+
bgEl.setAttribute("opacity", "0");
|
|
258019
|
+
return;
|
|
258020
|
+
}
|
|
258021
|
+
if (textEl.children.length < 2) {
|
|
258022
|
+
while (textEl.firstChild) textEl.removeChild(textEl.firstChild);
|
|
258023
|
+
textEl.appendChild(document.createElementNS(SVG_NS, "tspan"));
|
|
258024
|
+
textEl.appendChild(document.createElementNS(SVG_NS, "tspan"));
|
|
258025
|
+
}
|
|
258026
|
+
const nameTspan = textEl.children[0];
|
|
258027
|
+
const pathTspan = textEl.children[1];
|
|
258028
|
+
const name2 = fileBasename(path2);
|
|
258029
|
+
const dir = fileDirname(path2);
|
|
258030
|
+
const nameLineY = point2.y - 44;
|
|
258031
|
+
textEl.setAttribute("text-anchor", "middle");
|
|
258032
|
+
textEl.setAttribute("font-family", fontFamily);
|
|
258033
|
+
textEl.setAttribute("opacity", String(opacity));
|
|
258034
|
+
nameTspan.textContent = name2;
|
|
258035
|
+
nameTspan.setAttribute("x", String(point2.x));
|
|
258036
|
+
nameTspan.setAttribute("y", String(nameLineY));
|
|
258037
|
+
nameTspan.setAttribute("fill", filenameColor);
|
|
258038
|
+
nameTspan.setAttribute("font-size", calloutFontSize);
|
|
258039
|
+
nameTspan.setAttribute("font-weight", calloutFontWeight);
|
|
258040
|
+
pathTspan.textContent = dir;
|
|
258041
|
+
pathTspan.setAttribute("x", String(point2.x));
|
|
258042
|
+
pathTspan.setAttribute("dy", dir ? calloutLineDy : "0");
|
|
258043
|
+
pathTspan.setAttribute("fill", dirColor);
|
|
258044
|
+
pathTspan.setAttribute("font-size", calloutFontSize);
|
|
258045
|
+
pathTspan.setAttribute("font-weight", calloutFontWeight);
|
|
258046
|
+
const bbox = textEl.getBBox();
|
|
258047
|
+
const padX = 14;
|
|
258048
|
+
const padY = 10;
|
|
258049
|
+
bgEl.setAttribute("x", String(bbox.x - padX));
|
|
258050
|
+
bgEl.setAttribute("y", String(bbox.y - padY));
|
|
258051
|
+
bgEl.setAttribute("width", String(bbox.width + padX * 2));
|
|
258052
|
+
bgEl.setAttribute("height", String(bbox.height + padY * 2));
|
|
258053
|
+
bgEl.setAttribute("rx", "8");
|
|
258054
|
+
bgEl.setAttribute("fill", surfaceColor);
|
|
258055
|
+
bgEl.setAttribute("stroke", color2);
|
|
258056
|
+
bgEl.setAttribute("stroke-width", "1.5");
|
|
258057
|
+
bgEl.setAttribute("opacity", String(0.94 * opacity));
|
|
258058
|
+
};
|
|
258059
|
+
const fadeInMs = 350;
|
|
258060
|
+
let calloutOpacity = 0;
|
|
258061
|
+
if (animate2 && lastIndex >= 0 && lastIndex < targets.length) {
|
|
258062
|
+
if (traverseFrac !== null) {
|
|
258063
|
+
const eased = traverseFrac * traverseFrac * (3 - 2 * traverseFrac);
|
|
258064
|
+
calloutOpacity = 1 - eased;
|
|
258065
|
+
} else {
|
|
258066
|
+
const t = Math.min(1, dwellElapsed / fadeInMs);
|
|
258067
|
+
calloutOpacity = t * t * (3 - 2 * t);
|
|
258068
|
+
}
|
|
258069
|
+
} else if (!animate2 && lastIndex >= 0) {
|
|
258070
|
+
calloutOpacity = 1;
|
|
258071
|
+
}
|
|
258072
|
+
paintCallout(
|
|
258073
|
+
calloutTextRef.current,
|
|
258074
|
+
calloutBgRef.current,
|
|
258075
|
+
lastIndex >= 0 ? points[lastIndex] : null,
|
|
258076
|
+
lastIndex >= 0 ? targets[lastIndex].path : null,
|
|
258077
|
+
calloutOpacity
|
|
258078
|
+
);
|
|
257919
258079
|
g2.setAttribute("opacity", "1");
|
|
257920
258080
|
},
|
|
257921
|
-
[
|
|
258081
|
+
[
|
|
258082
|
+
animate2,
|
|
258083
|
+
containerRef,
|
|
258084
|
+
hideAll,
|
|
258085
|
+
color2,
|
|
258086
|
+
stepMs,
|
|
258087
|
+
dwellMs,
|
|
258088
|
+
endHoldMs,
|
|
258089
|
+
fontFamily,
|
|
258090
|
+
calloutFontSize,
|
|
258091
|
+
calloutFontWeight,
|
|
258092
|
+
calloutLineDy,
|
|
258093
|
+
surfaceColor,
|
|
258094
|
+
filenameColor,
|
|
258095
|
+
dirColor
|
|
258096
|
+
]
|
|
257922
258097
|
);
|
|
257923
258098
|
React.useImperativeHandle(ref, () => ({ onCameraFrame }), [onCameraFrame]);
|
|
257924
|
-
return /* @__PURE__ */
|
|
258099
|
+
return /* @__PURE__ */ jsxs(
|
|
257925
258100
|
"svg",
|
|
257926
258101
|
{
|
|
257927
258102
|
width: "100%",
|
|
@@ -257935,7 +258110,12 @@ const TrailFilePath = React.forwardRef(function TrailFilePath2({ containerRef, b
|
|
|
257935
258110
|
// overlays (z 1900) so the path only paints over the city.
|
|
257936
258111
|
zIndex: 26
|
|
257937
258112
|
},
|
|
257938
|
-
children:
|
|
258113
|
+
children: [
|
|
258114
|
+
/* @__PURE__ */ jsx("g", { ref: groupRef, opacity: 0 }),
|
|
258115
|
+
/* @__PURE__ */ jsx("circle", { ref: leadDotRef, opacity: 0, pointerEvents: "none" }),
|
|
258116
|
+
/* @__PURE__ */ jsx("rect", { ref: calloutBgRef, opacity: 0, pointerEvents: "none" }),
|
|
258117
|
+
/* @__PURE__ */ jsx("text", { ref: calloutTextRef, opacity: 0, pointerEvents: "none" })
|
|
258118
|
+
]
|
|
257939
258119
|
}
|
|
257940
258120
|
);
|
|
257941
258121
|
});
|
|
@@ -258686,43 +258866,6 @@ const pierreOptionsBase = {
|
|
|
258686
258866
|
const pierreStyle = {
|
|
258687
258867
|
display: "block"
|
|
258688
258868
|
};
|
|
258689
|
-
function useRenderTracer(name2, watch) {
|
|
258690
|
-
const renderCount = React.useRef(0);
|
|
258691
|
-
renderCount.current += 1;
|
|
258692
|
-
const prevWatch = React.useRef(
|
|
258693
|
-
void 0
|
|
258694
|
-
);
|
|
258695
|
-
const changed = [];
|
|
258696
|
-
if (watch && prevWatch.current) {
|
|
258697
|
-
for (const k of Object.keys(watch)) {
|
|
258698
|
-
if (watch[k] !== prevWatch.current[k]) changed.push(k);
|
|
258699
|
-
}
|
|
258700
|
-
}
|
|
258701
|
-
prevWatch.current = watch;
|
|
258702
|
-
console.log(
|
|
258703
|
-
`[trail-trace] render ${name2} #${renderCount.current}` + (changed.length ? ` changed=[${changed.join(",")}]` : "")
|
|
258704
|
-
);
|
|
258705
|
-
React.useEffect(() => {
|
|
258706
|
-
console.log(`[trail-trace] mount ${name2}`);
|
|
258707
|
-
return () => {
|
|
258708
|
-
console.log(`[trail-trace] unmount ${name2}`);
|
|
258709
|
-
};
|
|
258710
|
-
}, [name2]);
|
|
258711
|
-
}
|
|
258712
|
-
let __fc3dInstanceCounter = 0;
|
|
258713
|
-
function FileCity3DLifecycleTracer({ tag }) {
|
|
258714
|
-
const id2 = React.useRef(null);
|
|
258715
|
-
if (id2.current === null) {
|
|
258716
|
-
id2.current = ++__fc3dInstanceCounter;
|
|
258717
|
-
}
|
|
258718
|
-
React.useEffect(() => {
|
|
258719
|
-
console.log(`[trail-trace] FC3D mount id=${id2.current} site=${tag}`);
|
|
258720
|
-
return () => {
|
|
258721
|
-
console.log(`[trail-trace] FC3D unmount id=${id2.current} site=${tag}`);
|
|
258722
|
-
};
|
|
258723
|
-
}, [tag]);
|
|
258724
|
-
return null;
|
|
258725
|
-
}
|
|
258726
258869
|
const SEQUENCE_DRAWER_HEIGHT_PCT = 45;
|
|
258727
258870
|
const SNIPPET_PANE_WIDTH_PX = 460;
|
|
258728
258871
|
const PANEL_TRANSITION_MS = 280;
|
|
@@ -258733,14 +258876,6 @@ const FileCityTrailExplorerPanel = ({ context, actions }) => {
|
|
|
258733
258876
|
const lineCounts = ((_a = context.lineCounts.data) == null ? void 0 : _a.lineCounts) ?? null;
|
|
258734
258877
|
const trail2 = context.trail.data;
|
|
258735
258878
|
const repository = context.repository;
|
|
258736
|
-
useRenderTracer("FileCityTrailExplorerPanel", {
|
|
258737
|
-
context,
|
|
258738
|
-
actions,
|
|
258739
|
-
tree,
|
|
258740
|
-
lineCounts,
|
|
258741
|
-
trail: trail2,
|
|
258742
|
-
repository
|
|
258743
|
-
});
|
|
258744
258879
|
const cityData = React.useMemo(
|
|
258745
258880
|
() => tree ? buildCityDataFromContext({ fileTree: tree, lineCounts }) : null,
|
|
258746
258881
|
[tree, lineCounts]
|
|
@@ -258807,15 +258942,6 @@ const FileCityTrailSequenceLayout = ({
|
|
|
258807
258942
|
}) => {
|
|
258808
258943
|
var _a, _b;
|
|
258809
258944
|
const { theme: theme2 } = useTheme();
|
|
258810
|
-
useRenderTracer("FileCityTrailSequenceLayout", {
|
|
258811
|
-
trail: trail2,
|
|
258812
|
-
view,
|
|
258813
|
-
markersForThisRepo,
|
|
258814
|
-
selectedMarkerId,
|
|
258815
|
-
cityData,
|
|
258816
|
-
hasLineCounts,
|
|
258817
|
-
readFile
|
|
258818
|
-
});
|
|
258819
258945
|
const [show3D, setShow3D] = React.useState(
|
|
258820
258946
|
false
|
|
258821
258947
|
);
|
|
@@ -259180,26 +259306,23 @@ const FileCityTrailSequenceLayout = ({
|
|
|
259180
259306
|
overflow: "hidden"
|
|
259181
259307
|
},
|
|
259182
259308
|
children: [
|
|
259183
|
-
cityData ? /* @__PURE__ */
|
|
259184
|
-
|
|
259185
|
-
|
|
259186
|
-
|
|
259187
|
-
|
|
259188
|
-
|
|
259189
|
-
|
|
259190
|
-
|
|
259191
|
-
|
|
259192
|
-
|
|
259193
|
-
|
|
259194
|
-
|
|
259195
|
-
|
|
259196
|
-
|
|
259197
|
-
|
|
259198
|
-
|
|
259199
|
-
|
|
259200
|
-
}
|
|
259201
|
-
)
|
|
259202
|
-
] }) : /* @__PURE__ */ jsx(CityLoadingPlaceholder, {}),
|
|
259309
|
+
cityData ? /* @__PURE__ */ jsx(
|
|
259310
|
+
FileCity3D,
|
|
259311
|
+
{
|
|
259312
|
+
cityData,
|
|
259313
|
+
width: "100%",
|
|
259314
|
+
height: "100%",
|
|
259315
|
+
selectedPath: (selectedMarker == null ? void 0 : selectedMarker.sourcePath) ?? null,
|
|
259316
|
+
onBuildingClick: handleBuildingClick,
|
|
259317
|
+
onCameraFrame,
|
|
259318
|
+
showControls: false,
|
|
259319
|
+
backgroundColor: theme2.colors.background,
|
|
259320
|
+
textColor: theme2.colors.textMuted,
|
|
259321
|
+
isGrown: effectiveShow3D,
|
|
259322
|
+
highlightLayers: cityHighlightLayers,
|
|
259323
|
+
defaultBuildingColor: trailFilesActive ? theme2.colors.textTertiary : void 0
|
|
259324
|
+
}
|
|
259325
|
+
) : /* @__PURE__ */ jsx(CityLoadingPlaceholder, {}),
|
|
259203
259326
|
/* @__PURE__ */ jsx(
|
|
259204
259327
|
TrailFilePath,
|
|
259205
259328
|
{
|
|
@@ -260159,20 +260282,17 @@ const FileCityTrailExplorerEmptyState = ({
|
|
|
260159
260282
|
color: theme2.colors.text
|
|
260160
260283
|
},
|
|
260161
260284
|
children: [
|
|
260162
|
-
cityData ? /* @__PURE__ */
|
|
260163
|
-
|
|
260164
|
-
|
|
260165
|
-
|
|
260166
|
-
|
|
260167
|
-
|
|
260168
|
-
|
|
260169
|
-
|
|
260170
|
-
|
|
260171
|
-
|
|
260172
|
-
|
|
260173
|
-
}
|
|
260174
|
-
)
|
|
260175
|
-
] }) : null,
|
|
260285
|
+
cityData ? /* @__PURE__ */ jsx(
|
|
260286
|
+
FileCity3D,
|
|
260287
|
+
{
|
|
260288
|
+
cityData,
|
|
260289
|
+
width: "100%",
|
|
260290
|
+
height: "100%",
|
|
260291
|
+
showControls: false,
|
|
260292
|
+
backgroundColor: theme2.colors.background,
|
|
260293
|
+
textColor: theme2.colors.textMuted
|
|
260294
|
+
}
|
|
260295
|
+
) : null,
|
|
260176
260296
|
/* @__PURE__ */ jsx(
|
|
260177
260297
|
"div",
|
|
260178
260298
|
{
|