Style.js 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949
  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 * {
  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% - 134px);
  605. height: 38px;
  606. user-select: none;
  607. -webkit-user-select: none;
  608. }
  609. /* Adjust header width based on panel position */
  610. .profiler-panel.position-right .profiler-header,
  611. .profiler-panel.position-left .profiler-header {
  612. width: calc(100% - 134px);
  613. }
  614. .profiler-panel.position-bottom .profiler-header,
  615. .profiler-panel.position-top .profiler-header {
  616. width: calc(100% - 134px);
  617. }
  618. /* Adjust header width when position toggle button is hidden (mobile) */
  619. .profiler-panel.hide-position-toggle .profiler-header {
  620. width: calc(100% - 90px);
  621. }
  622. /* Adjust header width when maximized (floating position toggle button is hidden) */
  623. .profiler-panel.maximized .profiler-header {
  624. width: calc(100% - 90px);
  625. }
  626. /* ===== RULES FOR WHEN THERE ARE NO TABS ===== */
  627. /* Horizontal mode (bottom/top) without tabs */
  628. .profiler-panel.position-bottom.no-tabs:not(.maximized),
  629. .profiler-panel.position-top.no-tabs:not(.maximized) {
  630. height: 38px !important;
  631. min-height: 38px !important;
  632. }
  633. .profiler-panel.position-bottom.no-tabs .profiler-header,
  634. .profiler-panel.position-top.no-tabs .profiler-header {
  635. width: 100%;
  636. height: 38px;
  637. border-bottom: none;
  638. }
  639. .profiler-panel.position-bottom.no-tabs .profiler-content-wrapper,
  640. .profiler-panel.position-top.no-tabs .profiler-content-wrapper {
  641. display: none;
  642. }
  643. .profiler-panel.position-bottom.no-tabs .panel-resizer,
  644. .profiler-panel.position-top.no-tabs .panel-resizer {
  645. display: none;
  646. }
  647. /* Vertical mode (right/left) without tabs */
  648. .profiler-panel.position-right.no-tabs:not(.maximized),
  649. .profiler-panel.position-left.no-tabs:not(.maximized) {
  650. width: 45px !important;
  651. min-width: 45px !important;
  652. }
  653. /* Vertical layout for header when no tabs */
  654. .profiler-panel.position-right.no-tabs .profiler-header,
  655. .profiler-panel.position-left.no-tabs .profiler-header {
  656. width: 100%;
  657. flex-direction: column;
  658. height: 100%;
  659. border-bottom: none;
  660. }
  661. /* Vertical layout for controls when no tabs */
  662. .profiler-panel.position-right.no-tabs .profiler-controls,
  663. .profiler-panel.position-left.no-tabs .profiler-controls {
  664. position: static;
  665. flex-direction: column-reverse;
  666. justify-content: flex-end;
  667. width: 100%;
  668. height: 100%;
  669. border-bottom: none;
  670. border-left: none;
  671. background: transparent;
  672. }
  673. .profiler-panel.position-right.no-tabs .profiler-controls button,
  674. .profiler-panel.position-left.no-tabs .profiler-controls button {
  675. width: 100%;
  676. height: 45px;
  677. border-left: none;
  678. border-top: none;
  679. border-bottom: 1px solid var(--profiler-border);
  680. }
  681. .profiler-panel.position-right.no-tabs .profiler-content-wrapper,
  682. .profiler-panel.position-left.no-tabs .profiler-content-wrapper {
  683. display: none;
  684. }
  685. .profiler-panel.position-right.no-tabs .profiler-tabs,
  686. .profiler-panel.position-left.no-tabs .profiler-tabs {
  687. display: none;
  688. }
  689. .profiler-panel.position-right.no-tabs .panel-resizer,
  690. .profiler-panel.position-left.no-tabs .panel-resizer {
  691. display: none;
  692. }
  693. /* Hide position toggle on mobile without tabs */
  694. .profiler-panel.hide-position-toggle.position-right.no-tabs:not(.maximized),
  695. .profiler-panel.hide-position-toggle.position-left.no-tabs:not(.maximized) {
  696. width: 45px !important;
  697. min-width: 45px !important;
  698. }
  699. /* Hide drag indicator on mobile devices */
  700. .profiler-panel.is-mobile .tab-btn.active::before {
  701. display: none;
  702. }
  703. .profiler-header::-webkit-scrollbar {
  704. width: 8px;
  705. height: 8px;
  706. }
  707. .profiler-header::-webkit-scrollbar-track {
  708. background: transparent;
  709. }
  710. .profiler-header::-webkit-scrollbar-thumb {
  711. background-color: rgba(0, 0, 0, 0.25);
  712. border-radius: 10px;
  713. transition: background 0.3s ease;
  714. }
  715. .profiler-header::-webkit-scrollbar-thumb:hover {
  716. background-color: rgba(0, 0, 0, 0.4);
  717. }
  718. .profiler-header::-webkit-scrollbar-corner {
  719. background: transparent;
  720. }
  721. .profiler-panel.dragging .profiler-header {
  722. cursor: grabbing !important;
  723. }
  724. .profiler-panel.dragging {
  725. opacity: 0.8;
  726. }
  727. .profiler-tabs {
  728. display: flex;
  729. cursor: grab;
  730. position: relative;
  731. }
  732. .profiler-tabs:active {
  733. cursor: grabbing;
  734. }
  735. .profiler-tabs::-webkit-scrollbar {
  736. width: 8px;
  737. height: 8px;
  738. }
  739. .profiler-tabs::-webkit-scrollbar-track {
  740. background: transparent;
  741. }
  742. .profiler-tabs::-webkit-scrollbar-thumb {
  743. background-color: rgba(0, 0, 0, 0.25);
  744. border-radius: 10px;
  745. transition: background 0.3s ease;
  746. }
  747. .profiler-tabs::-webkit-scrollbar-thumb:hover {
  748. background-color: rgba(0, 0, 0, 0.4);
  749. }
  750. .profiler-tabs::-webkit-scrollbar-corner {
  751. background: transparent;
  752. }
  753. .profiler-controls {
  754. display: flex;
  755. position: absolute;
  756. right: 0;
  757. top: 0;
  758. height: 38px;
  759. background: var(--profiler-header-background);
  760. border-bottom: 1px solid var(--profiler-border);
  761. }
  762. .tab-btn {
  763. position: relative;
  764. background: transparent;
  765. border: none;
  766. /*border-right: 1px solid var(--profiler-border);*/
  767. color: var(--text-secondary);
  768. padding: 8px 18px;
  769. cursor: default;
  770. display: flex;
  771. align-items: center;
  772. font-family: var(--font-family);
  773. font-weight: 600;
  774. font-size: 14px;
  775. user-select: none;
  776. transition: opacity 0.2s, transform 0.2s;
  777. touch-action: pan-x;
  778. white-space: nowrap;
  779. }
  780. .tab-btn.active {
  781. border-bottom: 2px solid var(--color-accent);
  782. color: white;
  783. }
  784. .tab-btn.active::before {
  785. content: '⋮⋮';
  786. position: absolute;
  787. left: 3px;
  788. top: calc(50% - .1rem);
  789. transform: translateY(-50%);
  790. color: var(--profiler-border);
  791. font-size: 18px;
  792. letter-spacing: -2px;
  793. opacity: 0.6;
  794. }
  795. .tab-btn.no-detach.active::before {
  796. display: none;
  797. }
  798. .floating-btn,
  799. .maximize-btn,
  800. .hide-panel-btn {
  801. background: transparent;
  802. border: none;
  803. border-left: 1px solid var(--profiler-border);
  804. color: var(--text-secondary);
  805. width: 45px;
  806. height: 100%;
  807. cursor: pointer;
  808. transition: all 0.2s;
  809. display: flex;
  810. align-items: center;
  811. justify-content: center;
  812. flex-shrink: 0;
  813. }
  814. /* Disable transitions in vertical mode to avoid broken animations */
  815. .profiler-panel.position-right .floating-btn,
  816. .profiler-panel.position-right .maximize-btn,
  817. .profiler-panel.position-right .hide-panel-btn,
  818. .profiler-panel.position-left .floating-btn,
  819. .profiler-panel.position-left .maximize-btn,
  820. .profiler-panel.position-left .hide-panel-btn {
  821. transition: background-color 0.2s, color 0.2s;
  822. }
  823. .floating-btn:hover,
  824. .maximize-btn:hover,
  825. .hide-panel-btn:hover {
  826. background-color: rgba(255, 255, 255, 0.1);
  827. color: var(--text-primary);
  828. }
  829. /* Hide maximize button when there are no tabs */
  830. .profiler-panel.position-right.no-tabs .maximize-btn,
  831. .profiler-panel.position-left.no-tabs .maximize-btn,
  832. .profiler-panel.position-bottom.no-tabs .maximize-btn,
  833. .profiler-panel.position-top.no-tabs .maximize-btn {
  834. display: none !important;
  835. }
  836. /* Hide floating button when maximized */
  837. .profiler-panel.maximized .floating-btn {
  838. display: none !important;
  839. }
  840. .profiler-content-wrapper {
  841. flex-grow: 1;
  842. overflow: hidden;
  843. position: relative;
  844. }
  845. .profiler-content {
  846. position: absolute;
  847. top: 0;
  848. left: 0;
  849. width: 100%;
  850. height: 100%;
  851. overflow-y: auto;
  852. font-size: 13px;
  853. visibility: hidden;
  854. opacity: 0;
  855. transition: opacity 0.2s, visibility 0.2s;
  856. box-sizing: border-box;
  857. display: flex;
  858. flex-direction: column;
  859. user-select: none;
  860. -webkit-user-select: none;
  861. }
  862. .profiler-content.active {
  863. visibility: visible;
  864. opacity: 1;
  865. }
  866. .profiler-content {
  867. overflow: auto; /* make sure scrollbars can appear */
  868. }
  869. .profiler-content::-webkit-scrollbar {
  870. width: 8px;
  871. height: 8px;
  872. }
  873. .profiler-content::-webkit-scrollbar-track {
  874. background: transparent;
  875. }
  876. .profiler-content::-webkit-scrollbar-thumb {
  877. background-color: rgba(0, 0, 0, 0.25);
  878. border-radius: 10px;
  879. transition: background 0.3s ease;
  880. }
  881. .profiler-content::-webkit-scrollbar-thumb:hover {
  882. background-color: rgba(0, 0, 0, 0.4);
  883. }
  884. .profiler-content::-webkit-scrollbar-corner {
  885. background: transparent;
  886. }
  887. .profiler-content {
  888. scrollbar-width: thin; /* "auto" | "thin" */
  889. scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
  890. }
  891. .list-item-row {
  892. display: grid;
  893. align-items: center;
  894. padding: 4px 8px;
  895. border-radius: 3px;
  896. transition: background-color 0.2s;
  897. gap: 10px;
  898. border-bottom: none;
  899. user-select: none;
  900. -webkit-user-select: none;
  901. }
  902. .parameters .list-item-row {
  903. min-height: 31px;
  904. }
  905. .mini-panel-content .parameters .list-item-row {
  906. min-height: 21px;
  907. }
  908. .list-item-wrapper {
  909. margin-top: 2px;
  910. margin-bottom: 2px;
  911. user-select: none;
  912. -webkit-user-select: none;
  913. }
  914. .list-item-wrapper:first-child {
  915. /*margin-top: 0;*/
  916. }
  917. .list-item-wrapper:not(.header-wrapper):nth-child(odd) > .list-item-row {
  918. background-color: rgba(0,0,0,0.1);
  919. }
  920. .list-item-wrapper.header-wrapper>.list-item-row {
  921. color: var(--color-accent);
  922. background-color: rgba(0, 170, 255, 0.1);
  923. }
  924. .list-item-wrapper.header-wrapper>.list-item-row>.list-item-cell:first-child {
  925. font-weight: 600;
  926. line-height: 1;
  927. }
  928. .list-item-row.collapsible,
  929. .list-item-row.actionable {
  930. cursor: pointer;
  931. }
  932. .list-item-row.collapsible {
  933. background-color: rgba(0, 170, 255, 0.15) !important;
  934. min-height: 23px;
  935. }
  936. .list-item-row.collapsible.alert,
  937. .list-item-row.alert {
  938. background-color: rgba(244, 67, 54, 0.1) !important;
  939. }
  940. @media (hover: hover) {
  941. .list-item-row:hover:not(.collapsible):not(.no-hover),
  942. .list-item-row:hover:not(.no-hover),
  943. .list-item-row.actionable:hover,
  944. .list-item-row.collapsible.actionable:hover {
  945. background-color: rgba(255, 255, 255, 0.05) !important;
  946. }
  947. .list-item-row.collapsible:hover {
  948. background-color: rgba(0, 170, 255, 0.25) !important;
  949. }
  950. }
  951. .list-item-cell {
  952. white-space: pre;
  953. display: flex;
  954. align-items: center;
  955. user-select: none;
  956. -webkit-user-select: none;
  957. }
  958. .list-item-cell:not(:first-child) {
  959. justify-content: flex-end;
  960. font-weight: 600;
  961. }
  962. .list-header {
  963. display: grid;
  964. align-items: center;
  965. padding: 4px 8px;
  966. font-weight: 600;
  967. color: var(--text-secondary);
  968. padding-bottom: 6px;
  969. border-bottom: 1px solid var(--profiler-border);
  970. margin-bottom: 5px;
  971. gap: 10px;
  972. user-select: none;
  973. -webkit-user-select: none;
  974. }
  975. .list-item-wrapper.section-start {
  976. margin-top: 5px;
  977. margin-bottom: 5px;
  978. }
  979. .list-header .list-header-cell:not(:first-child) {
  980. text-align: right;
  981. }
  982. .list-children-container {
  983. padding-left: 1.5em;
  984. overflow: hidden;
  985. transition: max-height 0.1s ease-out;
  986. margin-top: 2px;
  987. }
  988. .list-children-container.closed {
  989. max-height: 0;
  990. }
  991. .item-toggler {
  992. display: inline-block;
  993. margin-right: 0.8em;
  994. text-align: left;
  995. }
  996. .list-item-row.open .item-toggler::before {
  997. content: '-';
  998. }
  999. .list-item-row:not(.open) .item-toggler::before {
  1000. content: '+';
  1001. }
  1002. .list-item-cell .value.good {
  1003. color: var(--color-green);
  1004. }
  1005. .list-item-cell .value.warn {
  1006. color: var(--color-yellow);
  1007. }
  1008. .list-item-cell .value.bad {
  1009. color: var(--color-red);
  1010. }
  1011. .list-scroll-wrapper {
  1012. width: max-content;
  1013. min-width: 100%;
  1014. display: flex;
  1015. flex-direction: column;
  1016. min-height: 100%;
  1017. }
  1018. .list-container.parameters .list-item-row:not(.collapsible) {
  1019. }
  1020. .graph-container {
  1021. width: 100%;
  1022. box-sizing: border-box;
  1023. padding: 8px 0;
  1024. position: relative;
  1025. }
  1026. .graph-svg, .graph-canvas {
  1027. width: 0;
  1028. min-width: 100%;
  1029. height: 80px;
  1030. background-color: var(--profiler-header);
  1031. border: 1px solid var(--profiler-border);
  1032. border-radius: 4px;
  1033. display: block;
  1034. }
  1035. .graph-path {
  1036. stroke-width: 2;
  1037. fill-opacity: 0.4;
  1038. }
  1039. .console-buttons-group {
  1040. display: flex;
  1041. gap: 20px;
  1042. }
  1043. .console-filter-input {
  1044. background-color: var(--profiler-background);
  1045. border: 1px solid var(--profiler-border);
  1046. color: var(--text-primary);
  1047. border-radius: 4px;
  1048. padding: 4px 8px;
  1049. font-family: var(--font-mono);
  1050. flex-grow: 1;
  1051. max-width: 300px;
  1052. border-radius: 15px;
  1053. }
  1054. .console-filter-input:focus {
  1055. outline: none;
  1056. border-color: var(--text-secondary);
  1057. }
  1058. .console-copy-button {
  1059. background: transparent;
  1060. border: none;
  1061. color: var(--text-secondary);
  1062. cursor: pointer;
  1063. padding: 4px;
  1064. display: flex;
  1065. align-items: center;
  1066. justify-content: center;
  1067. border-radius: 4px;
  1068. transition: color 0.2s, background-color 0.2s;
  1069. }
  1070. .console-copy-button:hover {
  1071. color: var(--text-primary);
  1072. background-color: var(--profiler-hover);
  1073. }
  1074. .console-copy-button.copied {
  1075. color: var(--color-green);
  1076. }
  1077. .console-log {
  1078. display: flex;
  1079. flex-direction: column;
  1080. gap: 4px;
  1081. padding: 10px;
  1082. overflow-y: auto;
  1083. flex-grow: 1;
  1084. user-select: text;
  1085. -webkit-user-select: text;
  1086. }
  1087. .log-message {
  1088. padding: 2px 5px;
  1089. white-space: pre-wrap;
  1090. word-break: break-all;
  1091. border-radius: 3px;
  1092. line-height: 1.5 !important;
  1093. }
  1094. .log-message.hidden {
  1095. display: none;
  1096. }
  1097. .log-message.info {
  1098. color: var(--text-primary);
  1099. }
  1100. .log-message.warn {
  1101. color: var(--color-yellow);
  1102. }
  1103. .log-message.error {
  1104. color: #f9dedc;
  1105. background-color: rgba(244, 67, 54, 0.1);
  1106. }
  1107. .log-prefix {
  1108. color: var(--text-secondary);
  1109. margin-right: 8px;
  1110. }
  1111. .log-code {
  1112. background-color: rgba(255, 255, 255, 0.1);
  1113. border-radius: 3px;
  1114. padding: 1px 4px;
  1115. }
  1116. .thumbnail-container {
  1117. display: flex;
  1118. align-items: center;
  1119. }
  1120. .thumbnail-svg {
  1121. width: 40px;
  1122. height: 22.5px;
  1123. flex-shrink: 0;
  1124. margin-right: 8px;
  1125. }
  1126. .param-control {
  1127. display: flex;
  1128. align-items: center;
  1129. justify-content: flex-end;
  1130. gap: 10px;
  1131. width: 100%;
  1132. }
  1133. .param-control input,
  1134. .param-control select,
  1135. .param-control button {
  1136. background-color: var(--profiler-background);
  1137. border: 1px solid var(--profiler-border);
  1138. color: var(--text-primary);
  1139. border-radius: 4px;
  1140. padding: 4px 6px;
  1141. padding-bottom: 2px;
  1142. font-family: var(--font-mono);
  1143. width: 100%;
  1144. box-sizing: border-box;
  1145. }
  1146. .param-control input:focus {
  1147. outline: none;
  1148. border-color: var(--color-accent);
  1149. }
  1150. .param-control select {
  1151. padding-top: 3px;
  1152. padding-bottom: 1px;
  1153. }
  1154. .param-control input[type="number"] {
  1155. cursor: ns-resize;
  1156. }
  1157. .param-control input[type="color"] {
  1158. padding: 2px;
  1159. }
  1160. .param-control button {
  1161. cursor: pointer;
  1162. transition: background-color 0.2s;
  1163. }
  1164. .param-control button:hover {
  1165. background-color: var(--profiler-header);
  1166. }
  1167. .param-control-vector {
  1168. display: flex;
  1169. gap: 5px;
  1170. }
  1171. .custom-checkbox {
  1172. display: inline-flex;
  1173. align-items: center;
  1174. cursor: pointer;
  1175. gap: 8px;
  1176. will-change: transform;
  1177. }
  1178. .custom-checkbox input {
  1179. display: none;
  1180. }
  1181. .custom-checkbox .checkmark {
  1182. width: 14px;
  1183. height: 14px;
  1184. border: 1px solid var(--color-accent);
  1185. border-radius: 3px;
  1186. display: inline-flex;
  1187. justify-content: center;
  1188. align-items: center;
  1189. transition: background-color 0.2s, border-color 0.2s;
  1190. }
  1191. .custom-checkbox .checkmark::after {
  1192. content: '';
  1193. width: 6px;
  1194. height: 6px;
  1195. background-color: var(--color-accent);
  1196. border-radius: 1px;
  1197. display: block;
  1198. transform: scale(0);
  1199. transition: transform 0.2s;
  1200. }
  1201. .custom-checkbox input:checked+.checkmark {
  1202. border-color: var(--color-accent);
  1203. }
  1204. .custom-checkbox input:checked+.checkmark::after {
  1205. transform: scale(1);
  1206. }
  1207. .param-control input[type="range"] {
  1208. -webkit-appearance: none;
  1209. appearance: none;
  1210. width: 100%;
  1211. height: 16px;
  1212. background: var(--profiler-header);
  1213. border-radius: 5px;
  1214. border: 1px solid var(--profiler-border);
  1215. outline: none;
  1216. padding: 0px;
  1217. padding-top: 8px;
  1218. }
  1219. .param-control input[type="range"]::-webkit-slider-thumb {
  1220. -webkit-appearance: none;
  1221. appearance: none;
  1222. width: 18px;
  1223. height: 18px;
  1224. background: var(--profiler-background);
  1225. border: 1px solid var(--color-accent);
  1226. border-radius: 3px;
  1227. cursor: pointer;
  1228. margin-top: -8px;
  1229. }
  1230. .param-control input[type="range"]::-moz-range-thumb {
  1231. width: 18px;
  1232. height: 18px;
  1233. background: var(--profiler-background);
  1234. border: 2px solid var(--color-accent);
  1235. border-radius: 3px;
  1236. cursor: pointer;
  1237. }
  1238. .param-control input[type="range"]::-moz-range-track {
  1239. width: 100%;
  1240. height: 16px;
  1241. background: var(--profiler-header);
  1242. border-radius: 5px;
  1243. border: 1px solid var(--profiler-border);
  1244. }
  1245. /* Override .param-control styles for mini-panel-content */
  1246. .mini-panel-content input,
  1247. .mini-panel-content select,
  1248. .mini-panel-content button {
  1249. padding: 2px 4px;
  1250. height: 21px;
  1251. line-height: 1.4;
  1252. padding-top: 4px;
  1253. }
  1254. .mini-panel-content .param-control input,
  1255. .mini-panel-content .param-control select,
  1256. .mini-panel-content .param-control button {
  1257. background-color: #1e1e24c2;
  1258. line-height: 1.0;
  1259. }
  1260. .mini-panel-content .param-control select {
  1261. padding: 2px 2px;
  1262. padding-top: 3px;
  1263. }
  1264. .mini-panel-content .param-control input[type="number"]::-webkit-outer-spin-button,
  1265. .mini-panel-content .param-control input[type="number"]::-webkit-inner-spin-button {
  1266. -webkit-appearance: none;
  1267. margin: 0;
  1268. }
  1269. .mini-panel-content .param-control input[type="number"] {
  1270. -moz-appearance: textfield;
  1271. }
  1272. .mini-panel-content .list-item-cell span {
  1273. position: relative;
  1274. top: 1px;
  1275. margin-left: 2px;
  1276. }
  1277. .mini-panel-content .custom-checkbox .checkmark {
  1278. width: 12px;
  1279. height: 12px;
  1280. margin-bottom: 2px;
  1281. will-change: transform;
  1282. }
  1283. .mini-panel-content .list-container.parameters .list-item-row:not(.collapsible) {
  1284. margin-bottom: 2px;
  1285. }
  1286. .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:first-child:has(> .list-item-row:not(.collapsible)) {
  1287. margin-top: 2px;
  1288. }
  1289. .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:last-child:has(> .list-item-row:not(.collapsible)) {
  1290. margin-bottom: 4px;
  1291. }
  1292. @media screen and (max-width: 450px) and (orientation: portrait) {
  1293. .console-filter-input {
  1294. max-width: 100px;
  1295. }
  1296. }
  1297. /* Touch device optimizations */
  1298. @media (hover: none) and (pointer: coarse) {
  1299. .panel-resizer {
  1300. top: -10px !important;
  1301. height: 20px !important;
  1302. }
  1303. .profiler-panel.position-top .panel-resizer {
  1304. top: auto !important;
  1305. bottom: -10px !important;
  1306. height: 20px !important;
  1307. }
  1308. .profiler-panel.position-left .panel-resizer {
  1309. right: -10px !important;
  1310. width: 20px !important;
  1311. height: 100% !important;
  1312. }
  1313. .profiler-panel.position-right .panel-resizer {
  1314. left: -10px !important;
  1315. width: 20px !important;
  1316. height: 100% !important;
  1317. }
  1318. .detached-tab-resizer-top,
  1319. .detached-tab-resizer-bottom {
  1320. height: 10px !important;
  1321. }
  1322. .detached-tab-resizer-left,
  1323. .detached-tab-resizer-right {
  1324. width: 10px !important;
  1325. }
  1326. }
  1327. .drag-preview-indicator {
  1328. position: fixed;
  1329. background-color: rgba(0, 170, 255, 0.2);
  1330. border: 2px dashed var(--color-accent);
  1331. z-index: 999;
  1332. pointer-events: none;
  1333. transition: all 0.2s ease-out;
  1334. }
  1335. /* Detached Tab Windows */
  1336. .detached-tab-panel {
  1337. position: fixed;
  1338. width: 500px;
  1339. height: 400px;
  1340. background: var(--profiler-background);
  1341. border: 1px solid var(--profiler-border);
  1342. border-radius: 8px;
  1343. box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  1344. z-index: 1002;
  1345. display: flex;
  1346. flex-direction: column;
  1347. backdrop-filter: blur(10px);
  1348. overflow: hidden;
  1349. opacity: 1;
  1350. visibility: visible;
  1351. transition: opacity 0.2s, visibility 0.2s;
  1352. }
  1353. .profiler-panel:not(.visible) ~ * .detached-tab-panel,
  1354. body:has(.profiler-panel:not(.visible)) .detached-tab-panel {
  1355. opacity: 0;
  1356. visibility: hidden;
  1357. pointer-events: none;
  1358. }
  1359. .detached-tab-header {
  1360. background: var(--profiler-header-background);
  1361. padding: 0 7px 0 15px;
  1362. font-family: var(--font-family);
  1363. font-size: 14px;
  1364. color: var(--text-primary);
  1365. font-weight: 600;
  1366. display: flex;
  1367. justify-content: space-between;
  1368. align-items: center;
  1369. border-bottom: 1px solid var(--profiler-border);
  1370. cursor: grab;
  1371. user-select: none;
  1372. height: 38px;
  1373. flex-shrink: 0;
  1374. -webkit-font-smoothing: antialiased;
  1375. -moz-osx-font-smoothing: grayscale;
  1376. touch-action: none;
  1377. }
  1378. .detached-tab-header:active {
  1379. cursor: grabbing;
  1380. }
  1381. .detached-header-controls {
  1382. display: flex;
  1383. gap: 5px;
  1384. }
  1385. .detached-reattach-btn {
  1386. background: transparent;
  1387. border: none;
  1388. color: var(--text-secondary);
  1389. font-family: var(--font-family);
  1390. font-size: 18px;
  1391. line-height: 1;
  1392. cursor: pointer;
  1393. padding: 4px 8px;
  1394. border-radius: 4px;
  1395. transition: all 0.2s;
  1396. display: flex;
  1397. align-items: center;
  1398. justify-content: center;
  1399. -webkit-font-smoothing: antialiased;
  1400. -moz-osx-font-smoothing: grayscale;
  1401. }
  1402. .detached-reattach-btn:hover {
  1403. background: rgba(0, 170, 255, 0.2);
  1404. color: var(--color-accent);
  1405. }
  1406. .detached-tab-content {
  1407. flex: 1;
  1408. overflow: auto;
  1409. position: relative;
  1410. background: var(--profiler-background);
  1411. }
  1412. .detached-tab-content::-webkit-scrollbar {
  1413. width: 8px;
  1414. height: 8px;
  1415. }
  1416. .detached-tab-content::-webkit-scrollbar-track {
  1417. background: transparent;
  1418. }
  1419. .detached-tab-content::-webkit-scrollbar-thumb {
  1420. background-color: rgba(0, 0, 0, 0.25);
  1421. border-radius: 10px;
  1422. transition: background 0.3s ease;
  1423. }
  1424. .detached-tab-content::-webkit-scrollbar-thumb:hover {
  1425. background-color: rgba(0, 0, 0, 0.4);
  1426. }
  1427. .detached-tab-content::-webkit-scrollbar-corner {
  1428. background: transparent;
  1429. }
  1430. .detached-tab-content .profiler-content {
  1431. display: block !important;
  1432. height: 100%;
  1433. visibility: visible !important;
  1434. opacity: 1 !important;
  1435. position: relative !important;
  1436. }
  1437. .detached-tab-content .profiler-content > * {
  1438. font-family: var(--font-mono);
  1439. color: var(--text-primary);
  1440. }
  1441. .detached-tab-resizer {
  1442. position: absolute;
  1443. bottom: 0;
  1444. right: 0;
  1445. width: 20px;
  1446. height: 20px;
  1447. cursor: nwse-resize;
  1448. z-index: 10;
  1449. touch-action: none;
  1450. }
  1451. .detached-tab-resizer::after {
  1452. content: '';
  1453. position: absolute;
  1454. bottom: 2px;
  1455. right: 2px;
  1456. width: 12px;
  1457. height: 12px;
  1458. border-right: 2px solid var(--profiler-border);
  1459. border-bottom: 2px solid var(--profiler-border);
  1460. border-bottom-right-radius: 6px;
  1461. opacity: 0.5;
  1462. }
  1463. .detached-tab-resizer:hover::after {
  1464. opacity: 1;
  1465. border-color: var(--color-accent);
  1466. }
  1467. /* Edge resizers */
  1468. .detached-tab-resizer-top {
  1469. position: absolute;
  1470. top: 0;
  1471. left: 0;
  1472. right: 0;
  1473. height: 5px;
  1474. cursor: ns-resize;
  1475. z-index: 10;
  1476. touch-action: none;
  1477. }
  1478. .detached-tab-resizer-right {
  1479. position: absolute;
  1480. top: 0;
  1481. right: 0;
  1482. bottom: 0;
  1483. width: 5px;
  1484. cursor: ew-resize;
  1485. z-index: 10;
  1486. touch-action: none;
  1487. }
  1488. .detached-tab-resizer-bottom {
  1489. position: absolute;
  1490. bottom: 0;
  1491. left: 0;
  1492. right: 0;
  1493. height: 5px;
  1494. cursor: ns-resize;
  1495. z-index: 10;
  1496. touch-action: none;
  1497. }
  1498. .detached-tab-resizer-left {
  1499. position: absolute;
  1500. top: 0;
  1501. left: 0;
  1502. bottom: 0;
  1503. width: 5px;
  1504. cursor: ew-resize;
  1505. z-index: 10;
  1506. touch-action: none;
  1507. }
  1508. /* Input number spin buttons - hide arrows */
  1509. /* Chrome, Safari, Edge, Opera */
  1510. .profiler-panel input[type="number"]::-webkit-outer-spin-button,
  1511. .profiler-panel input[type="number"]::-webkit-inner-spin-button,
  1512. .detached-tab-content input[type="number"]::-webkit-outer-spin-button,
  1513. .detached-tab-content input[type="number"]::-webkit-inner-spin-button {
  1514. -webkit-appearance: none;
  1515. margin: 0;
  1516. }
  1517. /* Firefox */
  1518. .profiler-panel input[type="number"],
  1519. .detached-tab-content input[type="number"] {
  1520. -moz-appearance: textfield;
  1521. }
  1522. .panel-action-btn {
  1523. background: transparent;
  1524. color: var(--text-primary);
  1525. border: 1px solid var(--profiler-border);
  1526. border-radius: 4px;
  1527. padding: 6px 12px;
  1528. cursor: pointer;
  1529. font-family: var(--font-family);
  1530. font-size: 12px;
  1531. transition: background-color 0.2s;
  1532. display: flex;
  1533. align-items: center;
  1534. justify-content: center;
  1535. }
  1536. .panel-action-btn:hover {
  1537. background-color: rgba(255, 255, 255, 0.05);
  1538. }
  1539. .node-canvas-wrapper {
  1540. touch-action: none;
  1541. }
  1542. .node-canvas-wrapper .node-canvas-detach-btn {
  1543. position: absolute;
  1544. top: 5px;
  1545. right: 5px;
  1546. background: rgba(30, 30, 36, 0.85);
  1547. border: 1px solid var(--profiler-border);
  1548. color: var(--text-primary);
  1549. border-radius: 4px;
  1550. padding: 4px;
  1551. cursor: pointer;
  1552. opacity: 1;
  1553. transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  1554. display: flex;
  1555. align-items: center;
  1556. justify-content: center;
  1557. z-index: 10;
  1558. }
  1559. .node-canvas-wrapper .node-canvas-detach-btn:hover {
  1560. background-color: var(--color-accent);
  1561. border-color: var(--color-accent);
  1562. color: white;
  1563. }
  1564. .node-canvas-wrapper .node-canvas-fullscreen-btn {
  1565. position: absolute;
  1566. bottom: 5px;
  1567. right: 5px;
  1568. background: rgba(30, 30, 36, 0.85);
  1569. border: 1px solid var(--profiler-border);
  1570. color: var(--text-primary);
  1571. border-radius: 4px;
  1572. padding: 4px;
  1573. cursor: pointer;
  1574. opacity: 1;
  1575. transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  1576. display: flex;
  1577. align-items: center;
  1578. justify-content: center;
  1579. z-index: 10;
  1580. }
  1581. .node-canvas-wrapper .node-canvas-fullscreen-btn:hover {
  1582. background-color: var(--color-accent);
  1583. border-color: var(--color-accent);
  1584. color: white;
  1585. }
  1586. .profiler-panel.maximized .node-canvas-fullscreen-btn {
  1587. display: none;
  1588. }
  1589. .toolbar {
  1590. display: flex;
  1591. align-items: center;
  1592. justify-content: space-between;
  1593. padding: 6px 8px;
  1594. border-bottom: 1px solid var(--profiler-border);
  1595. background: var(--profiler-header-background);
  1596. flex-shrink: 0;
  1597. box-sizing: border-box;
  1598. gap: 16px;
  1599. }
  1600. .toolbar span {
  1601. margin-right: 8px;
  1602. color: var(--text-secondary);
  1603. font-size: 12px;
  1604. font-weight: 600;
  1605. }
  1606. .viewer-content .toolbar {
  1607. justify-content: flex-end;
  1608. }
  1609. .viewer-back-btn {
  1610. background: transparent;
  1611. border: none;
  1612. color: var(--text-secondary);
  1613. cursor: pointer;
  1614. font-size: 16px;
  1615. line-height: 1;
  1616. padding: 4px 8px;
  1617. border-radius: 4px;
  1618. margin-right: auto;
  1619. transition: color 0.2s, background-color 0.2s;
  1620. display: flex;
  1621. align-items: center;
  1622. justify-content: center;
  1623. }
  1624. .viewer-back-btn:hover {
  1625. color: var(--text-primary);
  1626. background-color: rgba(255, 255, 255, 0.05);
  1627. }
  1628. .select {
  1629. background: var(--profiler-background);
  1630. border: 1px solid var(--profiler-border);
  1631. color: var(--text-primary);
  1632. border-radius: 4px;
  1633. padding: 4px 16px 2px 6px;
  1634. font-family: var(--font-mono);
  1635. font-size: 12px;
  1636. outline: none;
  1637. cursor: pointer;
  1638. appearance: none;
  1639. -webkit-appearance: none;
  1640. -moz-appearance: none;
  1641. 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");
  1642. background-repeat: no-repeat;
  1643. background-position: right 5px center;
  1644. background-size: 10px;
  1645. }
  1646. .select:focus {
  1647. border-color: var(--color-accent);
  1648. }
  1649. .full-viewer-container {
  1650. display: none;
  1651. flex-grow: 1;
  1652. width: 100%;
  1653. height: 100%;
  1654. overflow: hidden;
  1655. position: relative;
  1656. touch-action: none;
  1657. }
  1658. }
  1659. `;
  1660. const styleElement = document.createElement( 'style' );
  1661. styleElement.textContent = css;
  1662. container.appendChild( styleElement );
  1663. }
  1664. }
粤ICP备19079148号