Style.js 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931
  1. export class Style {
  2. static init( container ) {
  3. const css = /* css */`
  4. @scope (.three-inspector) {
  5. :scope {
  6. --profiler-background: #1e1e24f5;
  7. --profiler-header-background: #2a2a33aa;
  8. --profiler-header: #2a2a33;
  9. --profiler-border: #4a4a5a;
  10. --text-primary: #e0e0e0;
  11. --text-secondary: #9a9aab;
  12. --color-accent: #00aaff;
  13. --color-green: #4caf50;
  14. --color-yellow: #ffc107;
  15. --color-red: #f44336;
  16. --color-fps: rgb(63, 81, 181);
  17. --color-call: rgba(255, 185, 34, 1);
  18. --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  19. --font-mono: 'Courier New', Courier, monospace;
  20. }
  21. .profiler-panel *, .profiler-toggle *, .detached-tab-panel * {
  22. text-transform: initial;
  23. line-height: normal;
  24. box-sizing: border-box;
  25. -webkit-font-smoothing: antialiased;
  26. -moz-osx-font-smoothing: grayscale;
  27. }
  28. .profiler-toggle {
  29. position: fixed;
  30. top: 15px;
  31. right: 15px;
  32. background-color: rgba(30, 30, 36, 0.85);
  33. border: 1px solid #4a4a5a54;
  34. border-radius: 12px 6px 6px 12px;
  35. color: var(--text-primary);
  36. cursor: pointer;
  37. z-index: 1001;
  38. transition: all 0.2s ease-in-out;
  39. /*font-size: 14px;*/
  40. font-size: 15px;
  41. backdrop-filter: blur(8px);
  42. box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  43. display: flex;
  44. align-items: stretch;
  45. padding: 0;
  46. overflow: hidden;
  47. font-family: var(--font-family);
  48. }
  49. .profiler-toggle-graph {
  50. position: absolute;
  51. bottom: 0;
  52. left: 0;
  53. width: 100%;
  54. height: 100%;
  55. z-index: 0;
  56. pointer-events: none;
  57. background: transparent;
  58. border: none;
  59. border-radius: inherit;
  60. opacity: 0.5;
  61. }
  62. .profiler-toggle.position-right.panel-open {
  63. right: auto;
  64. left: 15px;
  65. border-radius: 6px 12px 12px 6px;
  66. flex-direction: row-reverse;
  67. }
  68. .profiler-toggle.position-right.panel-open .builtin-tabs-container {
  69. border-right: none;
  70. border-left: 1px solid #262636;
  71. }
  72. .profiler-toggle:hover {
  73. border-color: var(--color-accent);
  74. }
  75. .profiler-toggle.panel-open .toggle-icon {
  76. background-color: rgba(0, 170, 255, 0.2);
  77. color: var(--color-accent);
  78. }
  79. .toggle-icon {
  80. position: relative;
  81. z-index: 1;
  82. display: flex;
  83. align-items: center;
  84. justify-content: center;
  85. width: 40px;
  86. font-size: 20px;
  87. transition: background-color 0.2s;
  88. }
  89. .console-badge-container {
  90. position: absolute;
  91. top: 2px;
  92. right: 2px;
  93. display: flex;
  94. gap: 2px;
  95. pointer-events: none;
  96. }
  97. .console-badge,
  98. .tab-badge {
  99. display: inline-flex;
  100. align-items: center;
  101. justify-content: center;
  102. min-width: 14px;
  103. height: 14px;
  104. padding: 0 4px;
  105. border-radius: 7px;
  106. font-size: 9px;
  107. font-weight: bold;
  108. color: #ffffff;
  109. line-height: 1;
  110. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  111. border: 1px solid rgba(0, 0, 0, 0.2);
  112. }
  113. .tab-badge-container {
  114. position: absolute;
  115. top: 2px;
  116. right: 3px;
  117. display: flex;
  118. gap: 2px;
  119. pointer-events: none;
  120. }
  121. .console-badge.error,
  122. .tab-badge.error {
  123. background-color: var(--color-red);
  124. }
  125. .console-badge.warn,
  126. .tab-badge.warn {
  127. background-color: var(--color-yellow);
  128. color: #111111;
  129. }
  130. .profiler-toggle:hover .toggle-icon {
  131. background-color: rgba(255, 255, 255, 0.05);
  132. }
  133. .profiler-toggle.panel-open:hover .toggle-icon {
  134. background-color: rgba(0, 170, 255, 0.3);
  135. }
  136. .toggle-separator {
  137. width: 1px;
  138. background-color: var(--profiler-border);
  139. }
  140. .toggle-text {
  141. position: relative;
  142. z-index: 1;
  143. display: flex;
  144. align-items: baseline;
  145. padding: 8px 14px;
  146. min-width: 80px;
  147. justify-content: right;
  148. }
  149. .toggle-text .fps-label {
  150. font-size: 0.7em;
  151. margin-left: 10px;
  152. color: #999;
  153. }
  154. .builtin-tabs-container {
  155. position: relative;
  156. z-index: 1;
  157. display: flex;
  158. align-items: stretch;
  159. gap: 0;
  160. border-right: 1px solid #262636;
  161. order: -1;
  162. }
  163. .builtin-tab-btn {
  164. background: transparent;
  165. border: none;
  166. color: var(--text-secondary);
  167. cursor: pointer;
  168. padding: 8px 14px;
  169. font-family: var(--font-family);
  170. font-size: 13px;
  171. font-weight: 600;
  172. transition: all 0.2s;
  173. display: flex;
  174. align-items: center;
  175. justify-content: center;
  176. min-width: 32px;
  177. position: relative;
  178. }
  179. .builtin-tab-btn svg {
  180. width: 20px;
  181. height: 20px;
  182. stroke: currentColor;
  183. }
  184. .builtin-tab-btn:hover {
  185. background-color: rgba(255, 255, 255, 0.08);
  186. color: var(--color-accent);
  187. }
  188. .builtin-tab-btn:active {
  189. background-color: rgba(255, 255, 255, 0.12);
  190. }
  191. .builtin-tab-btn.active {
  192. background-color: rgba(0, 170, 255, 0.2);
  193. color: var(--color-accent);
  194. }
  195. .builtin-tab-btn.active:hover {
  196. background-color: rgba(0, 170, 255, 0.3);
  197. }
  198. .profiler-mini-panel {
  199. position: fixed;
  200. top: 60px;
  201. right: 15px;
  202. background-color: rgba(30, 30, 36, 0.85);
  203. border: 1px solid #4a4a5a54;
  204. border-radius: 8px;
  205. color: var(--text-primary);
  206. z-index: 9999;
  207. backdrop-filter: blur(8px);
  208. box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  209. font-family: var(--font-family);
  210. font-size: 11px;
  211. width: 350px;
  212. max-height: calc(100vh - 100px);
  213. overflow-y: auto;
  214. overflow-x: hidden;
  215. display: none;
  216. opacity: 0;
  217. transform: translateY(-10px) scale(0.98);
  218. transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
  219. transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  220. }
  221. .profiler-mini-panel.position-right.panel-open {
  222. right: auto;
  223. left: 15px;
  224. }
  225. .profiler-mini-panel.visible {
  226. display: block;
  227. opacity: 1;
  228. transform: translateY(0) scale(1);
  229. }
  230. /* Position toggle and mini-panel at the bottom when maximized */
  231. :scope:has(.profiler-panel.maximized) .profiler-toggle,
  232. :scope.maximized .profiler-toggle {
  233. top: auto !important;
  234. bottom: 15px !important;
  235. z-index: 10005 !important;
  236. }
  237. :scope:has(.profiler-panel.maximized) .profiler-mini-panel,
  238. :scope.maximized .profiler-mini-panel {
  239. top: auto !important;
  240. bottom: 60px !important;
  241. max-height: calc(100vh - 120px) !important;
  242. z-index: 10006 !important;
  243. }
  244. .profiler-mini-panel::-webkit-scrollbar {
  245. width: 6px;
  246. }
  247. .profiler-mini-panel::-webkit-scrollbar-track {
  248. background: transparent;
  249. }
  250. .profiler-mini-panel::-webkit-scrollbar-thumb {
  251. background: rgba(255, 255, 255, 0.15);
  252. border-radius: 3px;
  253. transition: background 0.2s;
  254. }
  255. .profiler-mini-panel::-webkit-scrollbar-thumb:hover {
  256. background: rgba(255, 255, 255, 0.25);
  257. }
  258. .mini-panel-content {
  259. padding: 0;
  260. font-size: 11px;
  261. line-height: 1.5;
  262. font-family: var(--font-mono);
  263. letter-spacing: 0.3px;
  264. user-select: none;
  265. -webkit-user-select: none;
  266. }
  267. .mini-panel-content .profiler-content {
  268. display: block !important;
  269. background: transparent;
  270. }
  271. .mini-panel-content .list-scroll-wrapper {
  272. max-height: calc(100vh - 120px);
  273. overflow-y: auto;
  274. overflow-x: hidden;
  275. width: 100%;
  276. }
  277. .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar {
  278. width: 4px;
  279. }
  280. .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-track {
  281. background: transparent;
  282. }
  283. .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb {
  284. background: rgba(255, 255, 255, 0.1);
  285. border-radius: 2px;
  286. }
  287. .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  288. background: rgba(255, 255, 255, 0.2);
  289. }
  290. .mini-panel-content .parameters {
  291. background: transparent;
  292. border: none;
  293. box-shadow: none;
  294. padding: 4px;
  295. }
  296. .mini-panel-content .list-container.parameters {
  297. padding: 2px 6px 0px 6px !important;
  298. }
  299. .mini-panel-content .list-header {
  300. display: none;
  301. padding: 2px 4px;
  302. font-size: 11px;
  303. font-weight: 600;
  304. text-transform: uppercase;
  305. letter-spacing: 0.5px;
  306. }
  307. .mini-panel-content .list-item {
  308. border-bottom: 1px solid rgba(74, 74, 90, 0.2);
  309. transition: background-color 0.15s;
  310. }
  311. .mini-panel-content .list-item:last-child {
  312. border-bottom: none;
  313. }
  314. .mini-panel-content .list-item:hover {
  315. background-color: rgba(255, 255, 255, 0.04);
  316. }
  317. .mini-panel-content .list-item.actionable:hover {
  318. background-color: rgba(255, 255, 255, 0.06);
  319. cursor: pointer;
  320. }
  321. .info-icon {
  322. display: inline-flex;
  323. align-items: center;
  324. justify-content: center;
  325. width: 14px;
  326. height: 14px;
  327. border-radius: 50%;
  328. background-color: rgba(255, 255, 255, 0.1);
  329. color: var(--text-secondary);
  330. font-size: 10px;
  331. font-style: italic;
  332. margin-left: 6px;
  333. cursor: help;
  334. position: relative;
  335. }
  336. .info-icon:hover {
  337. background-color: var(--color-accent);
  338. color: white;
  339. }
  340. .info-tooltip {
  341. position: fixed;
  342. transform: translate(-50%, -100%);
  343. background-color: rgba(30, 30, 36, 0.95);
  344. border: 1px solid var(--profiler-border);
  345. border-radius: 6px;
  346. padding: 10px 14px;
  347. color: var(--text-primary);
  348. font-size: 12px;
  349. width: max-content;
  350. max-width: 250px;
  351. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  352. pointer-events: none;
  353. opacity: 0;
  354. visibility: hidden;
  355. transition: opacity 0.2s, visibility 0.2s;
  356. z-index: 999999;
  357. font-style: normal;
  358. font-family: var(--font-family);
  359. text-align: left;
  360. white-space: normal;
  361. }
  362. .info-tooltip h3 {
  363. margin: 0 0 6px 0;
  364. font-size: 13px;
  365. color: var(--color-accent);
  366. }
  367. .info-tooltip strong {
  368. font-weight: 600;
  369. color: white;
  370. }
  371. /* Style adjustments for lil-gui look */
  372. .mini-panel-content .item-row {
  373. padding: 3px 8px;
  374. min-height: 24px;
  375. }
  376. .mini-panel-content .list-item-row {
  377. padding: 1px 4px;
  378. gap: 8px;
  379. min-height: 21px;
  380. align-items: center;
  381. }
  382. .mini-panel-content input[type="checkbox"] {
  383. width: 12px;
  384. height: 12px;
  385. }
  386. .mini-panel-content input[type="range"] {
  387. height: 18px;
  388. }
  389. .mini-panel-content .value-number input,
  390. .mini-panel-content .value-slider input {
  391. background-color: rgba(0, 0, 0, 0.3);
  392. border: 1px solid rgba(74, 74, 90, 0.5);
  393. font-size: 10px;
  394. }
  395. .mini-panel-content .value-number input:focus,
  396. .mini-panel-content .value-slider input:focus {
  397. border-color: var(--color-accent);
  398. }
  399. .mini-panel-content .value-slider {
  400. gap: 6px;
  401. }
  402. /* Compact nested items */
  403. .mini-panel-content .list-item .list-item {
  404. margin-left: 8px;
  405. }
  406. .mini-panel-content .list-item .list-item .item-row,
  407. .mini-panel-content .list-item .list-item .list-item-row {
  408. padding: 2px 6px;
  409. min-height: 22px;
  410. }
  411. /* Compact collapsible headers */
  412. .mini-panel-content .collapsible .item-row,
  413. .mini-panel-content .list-item-row.collapsible {
  414. padding: 2px 8px;
  415. font-weight: 600;
  416. min-height: 16px;
  417. display: flex;
  418. align-items: center;
  419. }
  420. .mini-panel-content .collapsible-icon {
  421. font-size: 10px;
  422. width: 14px;
  423. height: 14px;
  424. }
  425. .mini-panel-content .param-control input[type="range"] {
  426. height: 12px;
  427. margin-top: 1px;
  428. padding-top: 5px;
  429. user-select: none;
  430. -webkit-user-select: none;
  431. outline: none;
  432. }
  433. .mini-panel-content .param-control input[type="range"]::-webkit-slider-thumb {
  434. width: 14px;
  435. height: 14px;
  436. margin-top: -5px;
  437. user-select: none;
  438. -webkit-user-select: none;
  439. }
  440. .mini-panel-content .param-control input[type="range"]::-moz-range-thumb {
  441. width: 14px;
  442. height: 14px;
  443. user-select: none;
  444. -moz-user-select: none;
  445. }
  446. .mini-panel-content .list-children-container {
  447. padding-left: 0;
  448. }
  449. .mini-panel-content .param-control input[type="number"] {
  450. flex-basis: 60px !important;
  451. }
  452. .mini-panel-content .param-control {
  453. align-items: center;
  454. }
  455. .mini-panel-content .param-control select {
  456. font-size: 11px;
  457. }
  458. .mini-panel-content .list-item-wrapper {
  459. margin-top: 0;
  460. margin-bottom: 0;
  461. }
  462. .profiler-panel {
  463. position: fixed;
  464. z-index: 1001 !important;
  465. bottom: 0;
  466. left: 0;
  467. right: 0;
  468. height: 350px;
  469. background-color: var(--profiler-background);
  470. backdrop-filter: blur(8px);
  471. border-top: 2px solid var(--profiler-border);
  472. color: var(--text-primary);
  473. display: flex;
  474. flex-direction: column;
  475. z-index: 1000;
  476. /*box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);*/
  477. transform: translateY(100%);
  478. transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.3s ease-out, width 0.3s ease-out;
  479. font-family: var(--font-mono);
  480. }
  481. .profiler-panel.resizing,
  482. .profiler-panel.dragging {
  483. transition: none;
  484. }
  485. .profiler-panel.visible {
  486. transform: translateY(0);
  487. }
  488. .profiler-panel.maximized {
  489. height: 100vh;
  490. }
  491. /* Position-specific styles */
  492. .profiler-panel.position-top {
  493. bottom: auto;
  494. top: 0;
  495. border-top: none;
  496. border-bottom: 2px solid var(--profiler-border);
  497. transform: translateY(-100%);
  498. }
  499. .profiler-panel.position-top.visible {
  500. transform: translateY(0);
  501. }
  502. .profiler-panel.position-bottom {
  503. /* Default position - already defined above */
  504. }
  505. .profiler-panel.position-left {
  506. top: 0;
  507. bottom: 0;
  508. left: 0;
  509. right: auto;
  510. width: 350px;
  511. height: 100%;
  512. border-top: none;
  513. border-right: 2px solid var(--profiler-border);
  514. transform: translateX(-100%);
  515. }
  516. .profiler-panel.position-left.visible {
  517. transform: translateX(0);
  518. }
  519. .profiler-panel.position-right {
  520. top: 0;
  521. bottom: 0;
  522. left: auto;
  523. right: 0;
  524. width: 350px;
  525. height: 100%;
  526. border-top: none;
  527. border-left: 2px solid var(--profiler-border);
  528. transform: translateX(100%);
  529. }
  530. .profiler-panel.position-right.visible {
  531. transform: translateX(0);
  532. }
  533. .profiler-panel.position-floating {
  534. border: 2px solid var(--profiler-border);
  535. border-radius: 8px;
  536. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  537. transform: none !important;
  538. overflow: hidden;
  539. }
  540. .profiler-panel.position-floating.visible {
  541. transform: none !important;
  542. }
  543. .profiler-panel.position-floating .profiler-header {
  544. border-radius: 6px 6px 0 0;
  545. }
  546. .profiler-panel.position-floating .panel-resizer {
  547. bottom: 0;
  548. right: 0;
  549. top: auto;
  550. left: auto;
  551. width: 16px;
  552. height: 16px;
  553. cursor: nwse-resize;
  554. border-radius: 0 0 6px 0;
  555. }
  556. .profiler-panel.position-floating .panel-resizer::after {
  557. content: '';
  558. position: absolute;
  559. right: 2px;
  560. bottom: 2px;
  561. width: 10px;
  562. height: 10px;
  563. background: linear-gradient(135deg, transparent 0%, transparent 45%, var(--profiler-border) 45%, var(--profiler-border) 55%, transparent 55%);
  564. }
  565. .panel-resizer {
  566. position: absolute;
  567. top: -2px;
  568. left: 0;
  569. width: 100%;
  570. height: 5px;
  571. cursor: ns-resize;
  572. z-index: 1001;
  573. touch-action: none;
  574. }
  575. .profiler-panel.position-top .panel-resizer {
  576. top: auto;
  577. bottom: -2px;
  578. }
  579. .profiler-panel.position-left .panel-resizer {
  580. top: 0;
  581. left: auto;
  582. right: -2px;
  583. width: 5px;
  584. height: 100%;
  585. cursor: ew-resize;
  586. }
  587. .profiler-panel.position-right .panel-resizer {
  588. top: 0;
  589. left: -2px;
  590. right: auto;
  591. width: 5px;
  592. height: 100%;
  593. cursor: ew-resize;
  594. }
  595. .profiler-header {
  596. display: flex;
  597. background-color: var(--profiler-header-background);
  598. border-bottom: 1px solid var(--profiler-border);
  599. flex-shrink: 0;
  600. justify-content: space-between;
  601. align-items: stretch;
  602. overflow-x: auto;
  603. overflow-y: hidden;
  604. width: calc(100% - 120px);
  605. height: 32px;
  606. user-select: none;
  607. -webkit-user-select: none;
  608. }
  609. .profiler-panel.has-horizontal-scroll .profiler-header {
  610. height: 38px;
  611. }
  612. /* Adjust header width based on panel position */
  613. .profiler-panel.position-right .profiler-header,
  614. .profiler-panel.position-left .profiler-header {
  615. width: calc(100% - 120px);
  616. }
  617. .profiler-panel.position-bottom .profiler-header,
  618. .profiler-panel.position-top .profiler-header {
  619. width: calc(100% - 120px);
  620. }
  621. /* Adjust header width when position toggle button is hidden (mobile) */
  622. .profiler-panel.hide-position-toggle .profiler-header {
  623. width: calc(100% - 80px);
  624. }
  625. /* Adjust header width when maximized (floating position toggle button is hidden) */
  626. .profiler-panel.maximized .profiler-header {
  627. width: calc(100% - 80px);
  628. }
  629. /* ===== RULES FOR WHEN THERE ARE NO TABS ===== */
  630. /* Horizontal mode (bottom/top) without tabs */
  631. .profiler-panel.position-bottom.no-tabs:not(.maximized),
  632. .profiler-panel.position-top.no-tabs:not(.maximized) {
  633. height: 32px !important;
  634. min-height: 32px !important;
  635. }
  636. .profiler-panel.position-bottom.no-tabs .profiler-header,
  637. .profiler-panel.position-top.no-tabs .profiler-header {
  638. width: 100%;
  639. height: 32px;
  640. border-bottom: none;
  641. }
  642. .profiler-panel.position-bottom.no-tabs .profiler-content-wrapper,
  643. .profiler-panel.position-top.no-tabs .profiler-content-wrapper {
  644. display: none;
  645. }
  646. .profiler-panel.position-bottom.no-tabs .panel-resizer,
  647. .profiler-panel.position-top.no-tabs .panel-resizer {
  648. display: none;
  649. }
  650. /* Vertical mode (right/left) without tabs */
  651. .profiler-panel.position-right.no-tabs:not(.maximized),
  652. .profiler-panel.position-left.no-tabs:not(.maximized) {
  653. width: 40px !important;
  654. min-width: 40px !important;
  655. }
  656. /* Vertical layout for header when no tabs */
  657. .profiler-panel.position-right.no-tabs .profiler-header,
  658. .profiler-panel.position-left.no-tabs .profiler-header {
  659. width: 100%;
  660. flex-direction: column;
  661. height: 100%;
  662. border-bottom: none;
  663. }
  664. /* Vertical layout for controls when no tabs */
  665. .profiler-panel.position-right.no-tabs .profiler-controls,
  666. .profiler-panel.position-left.no-tabs .profiler-controls {
  667. position: static;
  668. flex-direction: column-reverse;
  669. justify-content: flex-end;
  670. width: 100%;
  671. height: 100%;
  672. border-bottom: none;
  673. border-left: none;
  674. background: transparent;
  675. }
  676. .profiler-panel.position-right.no-tabs .profiler-controls button,
  677. .profiler-panel.position-left.no-tabs .profiler-controls button {
  678. width: 100%;
  679. height: 40px;
  680. border-left: none;
  681. border-top: none;
  682. border-bottom: 1px solid var(--profiler-border);
  683. }
  684. .profiler-panel.position-right.no-tabs .profiler-content-wrapper,
  685. .profiler-panel.position-left.no-tabs .profiler-content-wrapper {
  686. display: none;
  687. }
  688. .profiler-panel.position-right.no-tabs .profiler-tabs,
  689. .profiler-panel.position-left.no-tabs .profiler-tabs {
  690. display: none;
  691. }
  692. .profiler-panel.position-right.no-tabs .panel-resizer,
  693. .profiler-panel.position-left.no-tabs .panel-resizer {
  694. display: none;
  695. }
  696. /* Hide position toggle on mobile without tabs */
  697. .profiler-panel.hide-position-toggle.position-right.no-tabs:not(.maximized),
  698. .profiler-panel.hide-position-toggle.position-left.no-tabs:not(.maximized) {
  699. width: 40px !important;
  700. min-width: 40px !important;
  701. }
  702. /* Hide drag indicator on mobile devices */
  703. .profiler-panel.is-mobile .tab-btn.active::before {
  704. display: none;
  705. }
  706. .profiler-header::-webkit-scrollbar,
  707. .profiler-tabs::-webkit-scrollbar,
  708. .profiler-content::-webkit-scrollbar,
  709. .detached-tab-content::-webkit-scrollbar,
  710. .console-log::-webkit-scrollbar,
  711. .timelineTrack::-webkit-scrollbar,
  712. .list-scroll-wrapper::-webkit-scrollbar {
  713. width: 4px;
  714. height: 4px;
  715. }
  716. .profiler-header::-webkit-scrollbar-track,
  717. .profiler-tabs::-webkit-scrollbar-track,
  718. .profiler-content::-webkit-scrollbar-track,
  719. .detached-tab-content::-webkit-scrollbar-track,
  720. .console-log::-webkit-scrollbar-track,
  721. .timelineTrack::-webkit-scrollbar-track,
  722. .list-scroll-wrapper::-webkit-scrollbar-track {
  723. background: transparent;
  724. }
  725. .profiler-header::-webkit-scrollbar-thumb,
  726. .profiler-tabs::-webkit-scrollbar-thumb,
  727. .profiler-content::-webkit-scrollbar-thumb,
  728. .detached-tab-content::-webkit-scrollbar-thumb,
  729. .console-log::-webkit-scrollbar-thumb,
  730. .timelineTrack::-webkit-scrollbar-thumb,
  731. .list-scroll-wrapper::-webkit-scrollbar-thumb {
  732. background-color: rgba(255, 255, 255, 0.15);
  733. border-radius: 2px;
  734. }
  735. .profiler-header::-webkit-scrollbar-thumb:hover,
  736. .profiler-tabs::-webkit-scrollbar-thumb:hover,
  737. .profiler-content::-webkit-scrollbar-thumb:hover,
  738. .detached-tab-content::-webkit-scrollbar-thumb:hover,
  739. .console-log::-webkit-scrollbar-thumb:hover,
  740. .timelineTrack::-webkit-scrollbar-thumb:hover,
  741. .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  742. background-color: rgba(255, 255, 255, 0.3);
  743. }
  744. .profiler-header::-webkit-scrollbar-corner,
  745. .profiler-tabs::-webkit-scrollbar-corner,
  746. .profiler-content::-webkit-scrollbar-corner,
  747. .detached-tab-content::-webkit-scrollbar-corner,
  748. .console-log::-webkit-scrollbar-corner,
  749. .timelineTrack::-webkit-scrollbar-corner,
  750. .list-scroll-wrapper::-webkit-scrollbar-corner {
  751. background: transparent;
  752. }
  753. .profiler-header,
  754. .profiler-tabs,
  755. .profiler-content,
  756. .detached-tab-content,
  757. .console-log,
  758. .timelineTrack,
  759. .list-scroll-wrapper {
  760. scrollbar-width: thin;
  761. scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  762. }
  763. .profiler-panel.dragging .profiler-header {
  764. cursor: grabbing !important;
  765. }
  766. .profiler-panel.dragging {
  767. opacity: 0.8;
  768. }
  769. .profiler-tabs {
  770. display: flex;
  771. cursor: grab;
  772. position: relative;
  773. }
  774. .profiler-tabs:active {
  775. cursor: grabbing;
  776. }
  777. .profiler-controls {
  778. display: flex;
  779. position: absolute;
  780. right: 0;
  781. top: 0;
  782. height: 32px;
  783. background: var(--profiler-header-background);
  784. border-bottom: 1px solid var(--profiler-border);
  785. }
  786. .profiler-panel.has-horizontal-scroll .profiler-controls {
  787. height: 38px;
  788. }
  789. .tab-btn {
  790. position: relative;
  791. background: transparent;
  792. border: none;
  793. /*border-right: 1px solid var(--profiler-border);*/
  794. color: var(--text-secondary);
  795. padding: 0 15px 2px 15px;
  796. height: 100%;
  797. box-sizing: border-box;
  798. cursor: default;
  799. display: flex;
  800. align-items: center;
  801. font-family: var(--font-family);
  802. font-weight: 600;
  803. font-size: 13px;
  804. user-select: none;
  805. transition: opacity 0.2s, transform 0.2s;
  806. touch-action: pan-x;
  807. white-space: nowrap;
  808. }
  809. .tab-btn.active {
  810. border-bottom: 2px solid var(--color-accent);
  811. color: white;
  812. }
  813. .tab-btn.active::before {
  814. content: '⋮⋮';
  815. position: absolute;
  816. left: 2px;
  817. top: calc(50% - .1rem);
  818. transform: translateY(-50%);
  819. color: var(--profiler-border);
  820. font-size: 18px;
  821. letter-spacing: -2px;
  822. opacity: 0.6;
  823. }
  824. .tab-btn.no-detach.active::before {
  825. display: none;
  826. }
  827. .floating-btn,
  828. .maximize-btn,
  829. .hide-panel-btn {
  830. background: transparent;
  831. border: none;
  832. border-left: 1px solid var(--profiler-border);
  833. color: var(--text-secondary);
  834. width: 40px;
  835. height: 100%;
  836. cursor: pointer;
  837. transition: all 0.2s;
  838. display: flex;
  839. align-items: center;
  840. justify-content: center;
  841. flex-shrink: 0;
  842. }
  843. /* Disable transitions in vertical mode to avoid broken animations */
  844. .profiler-panel.position-right .floating-btn,
  845. .profiler-panel.position-right .maximize-btn,
  846. .profiler-panel.position-right .hide-panel-btn,
  847. .profiler-panel.position-left .floating-btn,
  848. .profiler-panel.position-left .maximize-btn,
  849. .profiler-panel.position-left .hide-panel-btn {
  850. transition: background-color 0.2s, color 0.2s;
  851. }
  852. .floating-btn:hover,
  853. .maximize-btn:hover,
  854. .hide-panel-btn:hover {
  855. background-color: rgba(255, 255, 255, 0.1);
  856. color: var(--text-primary);
  857. }
  858. /* Hide maximize button when there are no tabs */
  859. .profiler-panel.position-right.no-tabs .maximize-btn,
  860. .profiler-panel.position-left.no-tabs .maximize-btn,
  861. .profiler-panel.position-bottom.no-tabs .maximize-btn,
  862. .profiler-panel.position-top.no-tabs .maximize-btn {
  863. display: none !important;
  864. }
  865. /* Hide floating button when maximized */
  866. .profiler-panel.maximized .floating-btn {
  867. display: none !important;
  868. }
  869. .profiler-content-wrapper {
  870. flex-grow: 1;
  871. overflow: hidden;
  872. position: relative;
  873. }
  874. .profiler-content {
  875. position: absolute;
  876. top: 0;
  877. left: 0;
  878. width: 100%;
  879. height: 100%;
  880. overflow-y: auto;
  881. font-size: 13px;
  882. visibility: hidden;
  883. opacity: 0;
  884. transition: opacity 0.2s, visibility 0.2s;
  885. box-sizing: border-box;
  886. display: flex;
  887. flex-direction: column;
  888. user-select: none;
  889. -webkit-user-select: none;
  890. }
  891. .profiler-content.active {
  892. visibility: visible;
  893. opacity: 1;
  894. }
  895. .profiler-content {
  896. overflow: auto; /* make sure scrollbars can appear */
  897. }
  898. .list-item-row {
  899. display: grid;
  900. align-items: center;
  901. padding: 4px 8px;
  902. border-radius: 3px;
  903. transition: background-color 0.2s;
  904. gap: 10px;
  905. border-bottom: none;
  906. user-select: none;
  907. -webkit-user-select: none;
  908. }
  909. .parameters .list-item-row {
  910. min-height: 31px;
  911. }
  912. .mini-panel-content .parameters .list-item-row {
  913. min-height: 21px;
  914. }
  915. .list-item-wrapper {
  916. margin-top: 2px;
  917. margin-bottom: 2px;
  918. user-select: none;
  919. -webkit-user-select: none;
  920. }
  921. .list-item-wrapper:first-child {
  922. /*margin-top: 0;*/
  923. }
  924. .list-item-wrapper:not(.header-wrapper):nth-child(odd) > .list-item-row {
  925. background-color: rgba(0,0,0,0.1);
  926. }
  927. .list-item-wrapper.header-wrapper>.list-item-row {
  928. color: var(--color-accent);
  929. background-color: rgba(0, 170, 255, 0.1);
  930. }
  931. .list-item-wrapper.header-wrapper>.list-item-row>.list-item-cell:first-child {
  932. font-weight: 600;
  933. line-height: 1;
  934. }
  935. .list-item-row.collapsible,
  936. .list-item-row.actionable {
  937. cursor: pointer;
  938. }
  939. .list-item-row.collapsible {
  940. background-color: rgba(0, 170, 255, 0.15) !important;
  941. min-height: 23px;
  942. }
  943. .list-item-row.collapsible.alert,
  944. .list-item-row.alert {
  945. background-color: rgba(244, 67, 54, 0.1) !important;
  946. }
  947. @media (hover: hover) {
  948. .list-item-row:hover:not(.collapsible):not(.no-hover),
  949. .list-item-row:hover:not(.no-hover),
  950. .list-item-row.actionable:hover,
  951. .list-item-row.collapsible.actionable:hover {
  952. background-color: rgba(255, 255, 255, 0.05) !important;
  953. }
  954. .list-item-row.collapsible:hover {
  955. background-color: rgba(0, 170, 255, 0.25) !important;
  956. }
  957. }
  958. .list-item-cell {
  959. white-space: pre;
  960. display: flex;
  961. align-items: center;
  962. user-select: none;
  963. -webkit-user-select: none;
  964. }
  965. .list-item-cell:not(:first-child) {
  966. justify-content: flex-end;
  967. font-weight: 600;
  968. }
  969. .list-header {
  970. display: grid;
  971. align-items: center;
  972. padding: 4px 8px;
  973. font-weight: 600;
  974. color: var(--text-secondary);
  975. padding-bottom: 6px;
  976. border-bottom: 1px solid var(--profiler-border);
  977. margin-bottom: 5px;
  978. gap: 10px;
  979. user-select: none;
  980. -webkit-user-select: none;
  981. }
  982. .list-item-wrapper.section-start {
  983. margin-top: 5px;
  984. margin-bottom: 5px;
  985. }
  986. .list-header .list-header-cell:not(:first-child) {
  987. text-align: right;
  988. }
  989. .list-children-container {
  990. padding-left: 1.5em;
  991. overflow: hidden;
  992. transition: max-height 0.1s ease-out;
  993. margin-top: 2px;
  994. }
  995. .list-children-container.closed {
  996. max-height: 0;
  997. }
  998. .item-toggler {
  999. display: inline-block;
  1000. margin-right: 0.8em;
  1001. text-align: left;
  1002. }
  1003. .list-item-row.open .item-toggler::before {
  1004. content: '-';
  1005. }
  1006. .list-item-row:not(.open) .item-toggler::before {
  1007. content: '+';
  1008. }
  1009. .list-item-cell .value.good {
  1010. color: var(--color-green);
  1011. }
  1012. .list-item-cell .value.warn {
  1013. color: var(--color-yellow);
  1014. }
  1015. .list-item-cell .value.bad {
  1016. color: var(--color-red);
  1017. }
  1018. .list-scroll-wrapper {
  1019. width: max-content;
  1020. min-width: 100%;
  1021. display: flex;
  1022. flex-direction: column;
  1023. min-height: 100%;
  1024. }
  1025. .list-container.parameters .list-item-row:not(.collapsible) {
  1026. }
  1027. .graph-container {
  1028. width: 100%;
  1029. box-sizing: border-box;
  1030. padding: 8px 0;
  1031. position: relative;
  1032. }
  1033. .graph-svg, .graph-canvas {
  1034. width: 0;
  1035. min-width: 100%;
  1036. height: 80px;
  1037. background-color: var(--profiler-header);
  1038. border: 1px solid var(--profiler-border);
  1039. border-radius: 4px;
  1040. display: block;
  1041. }
  1042. .graph-path {
  1043. stroke-width: 2;
  1044. fill-opacity: 0.4;
  1045. }
  1046. .console-buttons-group {
  1047. display: flex;
  1048. gap: 20px;
  1049. }
  1050. .console-filter-input {
  1051. background-color: var(--profiler-background);
  1052. border: 1px solid var(--profiler-border);
  1053. color: var(--text-primary);
  1054. border-radius: 4px;
  1055. padding: 4px 8px;
  1056. font-family: var(--font-mono);
  1057. flex-grow: 1;
  1058. max-width: 300px;
  1059. border-radius: 15px;
  1060. }
  1061. .console-filter-input:focus {
  1062. outline: none;
  1063. border-color: var(--text-secondary);
  1064. }
  1065. .console-copy-button {
  1066. background: transparent;
  1067. border: none;
  1068. color: var(--text-secondary);
  1069. cursor: pointer;
  1070. padding: 4px;
  1071. display: flex;
  1072. align-items: center;
  1073. justify-content: center;
  1074. border-radius: 4px;
  1075. transition: color 0.2s, background-color 0.2s;
  1076. }
  1077. .console-copy-button:hover {
  1078. color: var(--text-primary);
  1079. background-color: var(--profiler-hover);
  1080. }
  1081. .console-copy-button.copied {
  1082. color: var(--color-green);
  1083. }
  1084. .console-log {
  1085. display: flex;
  1086. flex-direction: column;
  1087. gap: 4px;
  1088. padding: 10px;
  1089. overflow-y: auto;
  1090. flex-grow: 1;
  1091. user-select: text;
  1092. -webkit-user-select: text;
  1093. }
  1094. .log-message {
  1095. padding: 2px 5px;
  1096. white-space: pre-wrap;
  1097. word-break: break-all;
  1098. border-radius: 3px;
  1099. line-height: 1.5 !important;
  1100. }
  1101. .log-message.hidden {
  1102. display: none;
  1103. }
  1104. .log-message.info {
  1105. color: var(--text-primary);
  1106. }
  1107. .log-message.warn {
  1108. color: var(--color-yellow);
  1109. }
  1110. .log-message.error {
  1111. color: #f9dedc;
  1112. background-color: rgba(244, 67, 54, 0.1);
  1113. }
  1114. .log-prefix {
  1115. color: var(--text-secondary);
  1116. margin-right: 8px;
  1117. }
  1118. .log-code {
  1119. background-color: rgba(255, 255, 255, 0.1);
  1120. border-radius: 3px;
  1121. padding: 1px 4px;
  1122. }
  1123. .thumbnail-container {
  1124. display: flex;
  1125. align-items: center;
  1126. }
  1127. .thumbnail-svg {
  1128. width: 40px;
  1129. height: 22.5px;
  1130. flex-shrink: 0;
  1131. margin-right: 8px;
  1132. }
  1133. .param-control {
  1134. display: flex;
  1135. align-items: center;
  1136. justify-content: flex-end;
  1137. gap: 10px;
  1138. width: 100%;
  1139. }
  1140. .param-control input,
  1141. .param-control select,
  1142. .param-control button {
  1143. background-color: var(--profiler-background);
  1144. border: 1px solid var(--profiler-border);
  1145. color: var(--text-primary);
  1146. border-radius: 4px;
  1147. padding: 4px 6px;
  1148. padding-bottom: 2px;
  1149. font-family: var(--font-mono);
  1150. width: 100%;
  1151. box-sizing: border-box;
  1152. }
  1153. .param-control input:focus {
  1154. outline: none;
  1155. border-color: var(--color-accent);
  1156. }
  1157. .param-control select {
  1158. padding-top: 3px;
  1159. padding-bottom: 1px;
  1160. }
  1161. .param-control input[type="number"] {
  1162. cursor: ns-resize;
  1163. }
  1164. .param-control input[type="color"] {
  1165. padding: 2px;
  1166. }
  1167. .param-control button {
  1168. cursor: pointer;
  1169. transition: background-color 0.2s;
  1170. }
  1171. .param-control button:hover {
  1172. background-color: var(--profiler-header);
  1173. }
  1174. .param-control-vector {
  1175. display: flex;
  1176. gap: 5px;
  1177. }
  1178. .custom-checkbox {
  1179. display: inline-flex;
  1180. align-items: center;
  1181. cursor: pointer;
  1182. gap: 8px;
  1183. will-change: transform;
  1184. }
  1185. .custom-checkbox input {
  1186. display: none;
  1187. }
  1188. .custom-checkbox .checkmark {
  1189. width: 14px;
  1190. height: 14px;
  1191. border: 1px solid var(--color-accent);
  1192. border-radius: 3px;
  1193. display: inline-flex;
  1194. justify-content: center;
  1195. align-items: center;
  1196. transition: background-color 0.2s, border-color 0.2s;
  1197. }
  1198. .custom-checkbox .checkmark::after {
  1199. content: '';
  1200. width: 6px;
  1201. height: 6px;
  1202. background-color: var(--color-accent);
  1203. border-radius: 1px;
  1204. display: block;
  1205. transform: scale(0);
  1206. transition: transform 0.2s;
  1207. }
  1208. .custom-checkbox input:checked+.checkmark {
  1209. border-color: var(--color-accent);
  1210. }
  1211. .custom-checkbox input:checked+.checkmark::after {
  1212. transform: scale(1);
  1213. }
  1214. .param-control input[type="range"] {
  1215. -webkit-appearance: none;
  1216. appearance: none;
  1217. width: 100%;
  1218. height: 16px;
  1219. background: var(--profiler-header);
  1220. border-radius: 5px;
  1221. border: 1px solid var(--profiler-border);
  1222. outline: none;
  1223. padding: 0px;
  1224. padding-top: 8px;
  1225. }
  1226. .param-control input[type="range"]::-webkit-slider-thumb {
  1227. -webkit-appearance: none;
  1228. appearance: none;
  1229. width: 18px;
  1230. height: 18px;
  1231. background: var(--profiler-background);
  1232. border: 1px solid var(--color-accent);
  1233. border-radius: 3px;
  1234. cursor: pointer;
  1235. margin-top: -8px;
  1236. }
  1237. .param-control input[type="range"]::-moz-range-thumb {
  1238. width: 18px;
  1239. height: 18px;
  1240. background: var(--profiler-background);
  1241. border: 2px solid var(--color-accent);
  1242. border-radius: 3px;
  1243. cursor: pointer;
  1244. }
  1245. .param-control input[type="range"]::-moz-range-track {
  1246. width: 100%;
  1247. height: 16px;
  1248. background: var(--profiler-header);
  1249. border-radius: 5px;
  1250. border: 1px solid var(--profiler-border);
  1251. }
  1252. /* Override .param-control styles for mini-panel-content */
  1253. .mini-panel-content input,
  1254. .mini-panel-content select,
  1255. .mini-panel-content button {
  1256. padding: 2px 4px;
  1257. height: 21px;
  1258. line-height: 1.4;
  1259. padding-top: 4px;
  1260. }
  1261. .mini-panel-content .param-control input,
  1262. .mini-panel-content .param-control select,
  1263. .mini-panel-content .param-control button {
  1264. background-color: #1e1e24c2;
  1265. line-height: 1.0;
  1266. }
  1267. .mini-panel-content .param-control select {
  1268. padding: 2px 2px;
  1269. padding-top: 3px;
  1270. }
  1271. .mini-panel-content .param-control input[type="number"]::-webkit-outer-spin-button,
  1272. .mini-panel-content .param-control input[type="number"]::-webkit-inner-spin-button {
  1273. -webkit-appearance: none;
  1274. margin: 0;
  1275. }
  1276. .mini-panel-content .param-control input[type="number"] {
  1277. -moz-appearance: textfield;
  1278. }
  1279. .mini-panel-content .list-item-cell span {
  1280. position: relative;
  1281. top: 1px;
  1282. margin-left: 2px;
  1283. }
  1284. .mini-panel-content .custom-checkbox .checkmark {
  1285. width: 12px;
  1286. height: 12px;
  1287. margin-bottom: 2px;
  1288. will-change: transform;
  1289. }
  1290. .mini-panel-content .list-container.parameters .list-item-row:not(.collapsible) {
  1291. margin-bottom: 2px;
  1292. }
  1293. .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:first-child:has(> .list-item-row:not(.collapsible)) {
  1294. margin-top: 2px;
  1295. }
  1296. .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:last-child:has(> .list-item-row:not(.collapsible)) {
  1297. margin-bottom: 4px;
  1298. }
  1299. @media screen and (max-width: 450px) and (orientation: portrait) {
  1300. .console-filter-input {
  1301. max-width: 100px;
  1302. }
  1303. }
  1304. /* Touch device optimizations */
  1305. @media (hover: none) and (pointer: coarse) {
  1306. .panel-resizer {
  1307. top: -10px !important;
  1308. height: 20px !important;
  1309. }
  1310. .profiler-panel.position-top .panel-resizer {
  1311. top: auto !important;
  1312. bottom: -10px !important;
  1313. height: 20px !important;
  1314. }
  1315. .profiler-panel.position-left .panel-resizer {
  1316. right: -10px !important;
  1317. width: 20px !important;
  1318. height: 100% !important;
  1319. }
  1320. .profiler-panel.position-right .panel-resizer {
  1321. left: -10px !important;
  1322. width: 20px !important;
  1323. height: 100% !important;
  1324. }
  1325. .detached-tab-resizer-top,
  1326. .detached-tab-resizer-bottom {
  1327. height: 10px !important;
  1328. }
  1329. .detached-tab-resizer-left,
  1330. .detached-tab-resizer-right {
  1331. width: 10px !important;
  1332. }
  1333. }
  1334. .drag-preview-indicator {
  1335. position: fixed;
  1336. background-color: rgba(0, 170, 255, 0.2);
  1337. border: 2px dashed var(--color-accent);
  1338. z-index: 999;
  1339. pointer-events: none;
  1340. transition: all 0.2s ease-out;
  1341. }
  1342. /* Detached Tab Windows */
  1343. .detached-tab-panel {
  1344. position: fixed;
  1345. width: 500px;
  1346. height: 400px;
  1347. background: var(--profiler-background);
  1348. border: 1px solid var(--profiler-border);
  1349. border-radius: 8px;
  1350. box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  1351. z-index: 1002;
  1352. display: flex;
  1353. flex-direction: column;
  1354. backdrop-filter: blur(10px);
  1355. overflow: hidden;
  1356. opacity: 1;
  1357. visibility: visible;
  1358. transition: opacity 0.2s, visibility 0.2s;
  1359. font-family: var(--font-mono);
  1360. font-size: 13px;
  1361. }
  1362. .profiler-panel:not(.visible) ~ * .detached-tab-panel,
  1363. body:has(.profiler-panel:not(.visible)) .detached-tab-panel {
  1364. opacity: 0;
  1365. visibility: hidden;
  1366. pointer-events: none;
  1367. }
  1368. .detached-tab-header {
  1369. background: var(--profiler-header-background);
  1370. padding: 0 3px 0 10px;
  1371. font-family: var(--font-family);
  1372. font-size: 13px;
  1373. color: var(--text-primary);
  1374. font-weight: 600;
  1375. display: flex;
  1376. justify-content: space-between;
  1377. align-items: center;
  1378. border-bottom: 1px solid var(--profiler-border);
  1379. cursor: grab;
  1380. user-select: none;
  1381. height: 32px;
  1382. flex-shrink: 0;
  1383. -webkit-font-smoothing: antialiased;
  1384. -moz-osx-font-smoothing: grayscale;
  1385. touch-action: none;
  1386. }
  1387. .detached-tab-header:active {
  1388. cursor: grabbing;
  1389. }
  1390. .detached-header-controls {
  1391. display: flex;
  1392. gap: 5px;
  1393. }
  1394. .detached-reattach-btn {
  1395. background: transparent;
  1396. border: none;
  1397. color: var(--text-secondary);
  1398. font-family: var(--font-family);
  1399. font-size: 18px;
  1400. line-height: 1;
  1401. cursor: pointer;
  1402. padding: 4px 8px;
  1403. border-radius: 4px;
  1404. transition: all 0.2s;
  1405. display: flex;
  1406. align-items: center;
  1407. justify-content: center;
  1408. -webkit-font-smoothing: antialiased;
  1409. -moz-osx-font-smoothing: grayscale;
  1410. }
  1411. .detached-reattach-btn:hover {
  1412. background: rgba(0, 170, 255, 0.2);
  1413. color: var(--color-accent);
  1414. }
  1415. .detached-tab-content {
  1416. flex: 1;
  1417. overflow: hidden;
  1418. position: relative;
  1419. background: var(--profiler-background);
  1420. }
  1421. .detached-tab-content .profiler-content {
  1422. display: flex !important;
  1423. flex-direction: column !important;
  1424. height: 100%;
  1425. visibility: visible !important;
  1426. opacity: 1 !important;
  1427. position: relative !important;
  1428. }
  1429. .detached-tab-content .profiler-content > * {
  1430. font-family: var(--font-mono);
  1431. color: var(--text-primary);
  1432. }
  1433. .detached-tab-resizer {
  1434. position: absolute;
  1435. bottom: 0;
  1436. right: 0;
  1437. width: 20px;
  1438. height: 20px;
  1439. cursor: nwse-resize;
  1440. z-index: 10;
  1441. touch-action: none;
  1442. }
  1443. .detached-tab-resizer::after {
  1444. content: '';
  1445. position: absolute;
  1446. bottom: 2px;
  1447. right: 2px;
  1448. width: 12px;
  1449. height: 12px;
  1450. border-right: 2px solid var(--profiler-border);
  1451. border-bottom: 2px solid var(--profiler-border);
  1452. border-bottom-right-radius: 6px;
  1453. opacity: 0.5;
  1454. }
  1455. .detached-tab-resizer:hover::after {
  1456. opacity: 1;
  1457. border-color: var(--color-accent);
  1458. }
  1459. /* Edge resizers */
  1460. .detached-tab-resizer-top {
  1461. position: absolute;
  1462. top: 0;
  1463. left: 0;
  1464. right: 0;
  1465. height: 5px;
  1466. cursor: ns-resize;
  1467. z-index: 10;
  1468. touch-action: none;
  1469. }
  1470. .detached-tab-resizer-right {
  1471. position: absolute;
  1472. top: 0;
  1473. right: 0;
  1474. bottom: 0;
  1475. width: 5px;
  1476. cursor: ew-resize;
  1477. z-index: 10;
  1478. touch-action: none;
  1479. }
  1480. .detached-tab-resizer-bottom {
  1481. position: absolute;
  1482. bottom: 0;
  1483. left: 0;
  1484. right: 0;
  1485. height: 5px;
  1486. cursor: ns-resize;
  1487. z-index: 10;
  1488. touch-action: none;
  1489. }
  1490. .detached-tab-resizer-left {
  1491. position: absolute;
  1492. top: 0;
  1493. left: 0;
  1494. bottom: 0;
  1495. width: 5px;
  1496. cursor: ew-resize;
  1497. z-index: 10;
  1498. touch-action: none;
  1499. }
  1500. /* Input number spin buttons - hide arrows */
  1501. /* Chrome, Safari, Edge, Opera */
  1502. .profiler-panel input[type="number"]::-webkit-outer-spin-button,
  1503. .profiler-panel input[type="number"]::-webkit-inner-spin-button,
  1504. .detached-tab-content input[type="number"]::-webkit-outer-spin-button,
  1505. .detached-tab-content input[type="number"]::-webkit-inner-spin-button {
  1506. -webkit-appearance: none;
  1507. margin: 0;
  1508. }
  1509. /* Firefox */
  1510. .profiler-panel input[type="number"],
  1511. .detached-tab-content input[type="number"] {
  1512. -moz-appearance: textfield;
  1513. }
  1514. .panel-action-btn {
  1515. background: transparent;
  1516. color: var(--text-primary);
  1517. border: 1px solid var(--profiler-border);
  1518. border-radius: 4px;
  1519. padding: 6px 12px;
  1520. cursor: pointer;
  1521. font-family: var(--font-family);
  1522. font-size: 12px;
  1523. transition: background-color 0.2s;
  1524. display: flex;
  1525. align-items: center;
  1526. justify-content: center;
  1527. }
  1528. .panel-action-btn:hover {
  1529. background-color: rgba(255, 255, 255, 0.05);
  1530. }
  1531. .node-canvas-wrapper {
  1532. touch-action: none;
  1533. }
  1534. .node-canvas-wrapper .node-canvas-detach-btn {
  1535. position: absolute;
  1536. top: 5px;
  1537. right: 5px;
  1538. background: rgba(30, 30, 36, 0.85);
  1539. border: 1px solid var(--profiler-border);
  1540. color: var(--text-primary);
  1541. border-radius: 4px;
  1542. padding: 4px;
  1543. cursor: pointer;
  1544. opacity: 1;
  1545. transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  1546. display: flex;
  1547. align-items: center;
  1548. justify-content: center;
  1549. z-index: 10;
  1550. }
  1551. .node-canvas-wrapper .node-canvas-detach-btn:hover {
  1552. background-color: var(--color-accent);
  1553. border-color: var(--color-accent);
  1554. color: white;
  1555. }
  1556. .node-canvas-wrapper .node-canvas-fullscreen-btn {
  1557. position: absolute;
  1558. bottom: 5px;
  1559. right: 5px;
  1560. background: rgba(30, 30, 36, 0.85);
  1561. border: 1px solid var(--profiler-border);
  1562. color: var(--text-primary);
  1563. border-radius: 4px;
  1564. padding: 4px;
  1565. cursor: pointer;
  1566. opacity: 1;
  1567. transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  1568. display: flex;
  1569. align-items: center;
  1570. justify-content: center;
  1571. z-index: 10;
  1572. }
  1573. .node-canvas-wrapper .node-canvas-fullscreen-btn:hover {
  1574. background-color: var(--color-accent);
  1575. border-color: var(--color-accent);
  1576. color: white;
  1577. }
  1578. .profiler-panel.maximized .node-canvas-fullscreen-btn {
  1579. display: none;
  1580. }
  1581. .toolbar {
  1582. display: flex;
  1583. align-items: center;
  1584. justify-content: space-between;
  1585. padding: 6px 8px;
  1586. border-bottom: 1px solid var(--profiler-border);
  1587. background: var(--profiler-header-background);
  1588. flex-shrink: 0;
  1589. box-sizing: border-box;
  1590. gap: 16px;
  1591. }
  1592. .toolbar span {
  1593. margin-right: 8px;
  1594. color: var(--text-secondary);
  1595. font-size: 12px;
  1596. font-weight: 600;
  1597. }
  1598. .viewer-content .toolbar {
  1599. justify-content: flex-end;
  1600. }
  1601. .viewer-back-btn {
  1602. background: transparent;
  1603. border: none;
  1604. color: var(--text-secondary);
  1605. cursor: pointer;
  1606. font-size: 16px;
  1607. line-height: 1;
  1608. padding: 4px 8px;
  1609. border-radius: 4px;
  1610. margin-right: auto;
  1611. transition: color 0.2s, background-color 0.2s;
  1612. display: flex;
  1613. align-items: center;
  1614. justify-content: center;
  1615. }
  1616. .viewer-back-btn:hover {
  1617. color: var(--text-primary);
  1618. background-color: rgba(255, 255, 255, 0.05);
  1619. }
  1620. .select {
  1621. background: var(--profiler-background);
  1622. border: 1px solid var(--profiler-border);
  1623. color: var(--text-primary);
  1624. border-radius: 4px;
  1625. padding: 4px 16px 2px 6px;
  1626. font-family: var(--font-mono);
  1627. font-size: 12px;
  1628. outline: none;
  1629. cursor: pointer;
  1630. appearance: none;
  1631. -webkit-appearance: none;
  1632. -moz-appearance: none;
  1633. background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0e0e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  1634. background-repeat: no-repeat;
  1635. background-position: right 5px center;
  1636. background-size: 10px;
  1637. }
  1638. .select:focus {
  1639. border-color: var(--color-accent);
  1640. }
  1641. .full-viewer-container {
  1642. display: none;
  1643. flex-grow: 1;
  1644. width: 100%;
  1645. height: 100%;
  1646. overflow: hidden;
  1647. position: relative;
  1648. touch-action: none;
  1649. }
  1650. }
  1651. `;
  1652. const styleElement = document.createElement( 'style' );
  1653. styleElement.textContent = css;
  1654. container.appendChild( styleElement );
  1655. }
  1656. }
粤ICP备19079148号