Style.js 36 KB

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