Style.js 43 KB

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