@paulirish/trace_engine 0.0.67-beta.2 → 0.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (759) hide show
  1. package/.tmp/tsbuildinfo/analyze-inspector-issues.d.mts +13 -0
  2. package/.tmp/tsbuildinfo/analyze-inspector-issues.d.mts.map +1 -0
  3. package/.tmp/tsbuildinfo/analyze-trace.d.mts +17 -0
  4. package/.tmp/tsbuildinfo/analyze-trace.d.mts.map +1 -0
  5. package/.tmp/tsbuildinfo/test/test-trace-engine.d.mts +2 -0
  6. package/.tmp/tsbuildinfo/test/test-trace-engine.d.mts.map +1 -0
  7. package/.tmp/tsbuildinfo/third_party/third-party-web/third-party-web.d.ts +3 -0
  8. package/.tmp/tsbuildinfo/third_party/third-party-web/third-party-web.d.ts.map +1 -0
  9. package/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +1 -0
  10. package/README.md +22 -62
  11. package/analyze-inspector-issues.mjs +60 -0
  12. package/analyze-trace.mjs +144 -6
  13. package/core/common/ParsedURL.js +512 -0
  14. package/core/common/ParsedURL.js.map +1 -0
  15. package/core/common/common.d.ts +8 -33
  16. package/core/common/common.js +2 -0
  17. package/core/host/host.d.ts +1 -13
  18. package/core/host/host.js +1 -0
  19. package/core/i18n/i18n.d.ts +20 -8
  20. package/core/i18n/i18n.js +15 -0
  21. package/core/platform/ArrayUtilities.js +224 -0
  22. package/core/platform/ArrayUtilities.js.map +1 -0
  23. package/core/platform/Brand.js +5 -0
  24. package/core/platform/Brand.js.map +1 -0
  25. package/core/platform/Constructor.js +5 -0
  26. package/core/platform/Constructor.js.map +1 -0
  27. package/core/platform/DateUtilities.js +14 -0
  28. package/core/platform/DateUtilities.js.map +1 -0
  29. package/core/platform/DevToolsPath.js +28 -0
  30. package/core/platform/DevToolsPath.js.map +1 -0
  31. package/core/platform/HostRuntime.js +8 -0
  32. package/core/platform/HostRuntime.js.map +1 -0
  33. package/core/platform/KeyboardUtilities.js +34 -0
  34. package/core/platform/KeyboardUtilities.js.map +1 -0
  35. package/core/platform/MapUtilities.js +80 -0
  36. package/core/platform/MapUtilities.js.map +1 -0
  37. package/core/platform/MimeType.js +157 -0
  38. package/core/platform/MimeType.js.map +1 -0
  39. package/core/platform/NumberUtilities.js +73 -0
  40. package/core/platform/NumberUtilities.js.map +1 -0
  41. package/core/platform/Size.js +36 -0
  42. package/core/platform/Size.js.map +1 -0
  43. package/core/platform/StringUtilities.js +731 -0
  44. package/core/platform/StringUtilities.js.map +1 -0
  45. package/core/platform/Timing.js +10 -0
  46. package/core/platform/Timing.js.map +1 -0
  47. package/core/platform/TypedArrayUtilities.js +158 -0
  48. package/core/platform/TypedArrayUtilities.js.map +1 -0
  49. package/core/platform/TypescriptUtilities.js +17 -0
  50. package/core/platform/TypescriptUtilities.js.map +1 -0
  51. package/core/platform/UIString.d.ts +5 -2
  52. package/core/platform/UIString.js +5 -0
  53. package/core/platform/UIString.js.map +1 -0
  54. package/core/platform/UserVisibleError.d.ts +1 -12
  55. package/core/platform/UserVisibleError.js +23 -0
  56. package/core/platform/UserVisibleError.js.map +1 -0
  57. package/core/platform/api/HostRuntime.d.ts +1 -0
  58. package/core/platform/api/HostRuntime.js +5 -0
  59. package/core/platform/api/HostRuntime.js.map +1 -0
  60. package/core/platform/api/api-tsconfig.json +58 -0
  61. package/core/platform/api/api-tsconfig.ref.json +26 -0
  62. package/core/platform/api/api.js +6 -0
  63. package/core/platform/api/api.js.map +1 -0
  64. package/core/platform/bundle-tsconfig.json +59 -0
  65. package/core/platform/bundle-tsconfig.ref.json +27 -0
  66. package/core/platform/foundation_unittests-tsconfig.json +73 -0
  67. package/core/platform/foundation_unittests-tsconfig.ref.json +40 -0
  68. package/core/platform/foundation_unittests_node_typecheck-tsconfig.json +69 -0
  69. package/core/platform/platform-tsconfig.json +81 -0
  70. package/core/platform/platform-tsconfig.ref.json +49 -0
  71. package/core/platform/platform.js +28 -0
  72. package/core/platform/platform.js.map +1 -0
  73. package/core/platform/platform_node_typecheck-tsconfig.json +78 -0
  74. package/core/platform/platform_node_typecheck.stamp +0 -0
  75. package/core/root/root.d.ts +1 -4
  76. package/core/root/root.js +1 -0
  77. package/core/sdk/sdk.d.ts +27 -97
  78. package/core/sdk/sdk.js +1 -0
  79. package/generated/protocol.js +3304 -0
  80. package/locales/af.json +86 -92
  81. package/locales/am.json +350 -356
  82. package/locales/ar.json +351 -357
  83. package/locales/as.json +349 -355
  84. package/locales/az.json +340 -346
  85. package/locales/be.json +350 -356
  86. package/locales/bg.json +350 -356
  87. package/locales/bn.json +350 -356
  88. package/locales/bs.json +243 -249
  89. package/locales/ca.json +279 -285
  90. package/locales/cs.json +335 -341
  91. package/locales/cy.json +114 -120
  92. package/locales/da.json +199 -205
  93. package/locales/de.json +219 -225
  94. package/locales/el.json +335 -341
  95. package/locales/en-GB.json +8 -14
  96. package/locales/en-US.json +249 -252
  97. package/locales/en-XL.json +1055 -0
  98. package/locales/es-419.json +275 -281
  99. package/locales/es.json +276 -282
  100. package/locales/et.json +231 -237
  101. package/locales/eu.json +119 -125
  102. package/locales/fa.json +350 -356
  103. package/locales/fi.json +280 -286
  104. package/locales/fil.json +1 -7
  105. package/locales/fr-CA.json +307 -313
  106. package/locales/fr.json +304 -310
  107. package/locales/gl.json +259 -265
  108. package/locales/gu.json +351 -357
  109. package/locales/he.json +351 -357
  110. package/locales/hi.json +335 -341
  111. package/locales/hr.json +234 -240
  112. package/locales/hu.json +341 -347
  113. package/locales/hy.json +350 -356
  114. package/locales/id.json +2 -8
  115. package/locales/is.json +302 -308
  116. package/locales/it.json +136 -142
  117. package/locales/ja.json +350 -356
  118. package/locales/ka.json +351 -357
  119. package/locales/kk.json +351 -357
  120. package/locales/km.json +350 -356
  121. package/locales/kn.json +351 -357
  122. package/locales/ko.json +350 -356
  123. package/locales/ky.json +349 -355
  124. package/locales/lo.json +351 -357
  125. package/locales/lt.json +319 -325
  126. package/locales/lv.json +316 -322
  127. package/locales/mk.json +351 -357
  128. package/locales/ml.json +350 -356
  129. package/locales/mn.json +350 -356
  130. package/locales/mr.json +350 -356
  131. package/locales/ms.json +2 -8
  132. package/locales/my.json +349 -355
  133. package/locales/ne.json +335 -341
  134. package/locales/nl.json +61 -67
  135. package/locales/no.json +169 -175
  136. package/locales/or.json +350 -356
  137. package/locales/pa.json +350 -356
  138. package/locales/pl.json +306 -312
  139. package/locales/pt-PT.json +271 -277
  140. package/locales/pt.json +265 -271
  141. package/locales/ro.json +305 -311
  142. package/locales/ru.json +350 -356
  143. package/locales/si.json +351 -357
  144. package/locales/sk.json +332 -338
  145. package/locales/sl.json +214 -220
  146. package/locales/sq.json +315 -321
  147. package/locales/sr-Latn.json +252 -258
  148. package/locales/sr.json +351 -357
  149. package/locales/sv.json +275 -281
  150. package/locales/sw.json +2 -8
  151. package/locales/ta.json +351 -357
  152. package/locales/te.json +349 -355
  153. package/locales/th.json +351 -357
  154. package/locales/tr.json +325 -331
  155. package/locales/uk.json +350 -356
  156. package/locales/ur.json +351 -357
  157. package/locales/uz.json +159 -165
  158. package/locales/vi.json +351 -357
  159. package/locales/zh-HK.json +351 -357
  160. package/locales/zh-TW.json +350 -356
  161. package/locales/zh.json +350 -356
  162. package/locales/zu.json +2 -8
  163. package/models/cpu_profile/CPUProfileDataModel.js +517 -0
  164. package/models/cpu_profile/CPUProfileDataModel.js.map +1 -0
  165. package/models/cpu_profile/ProfileTreeModel.js +90 -0
  166. package/models/cpu_profile/ProfileTreeModel.js.map +1 -0
  167. package/models/cpu_profile/bundle-tsconfig.json +59 -0
  168. package/models/cpu_profile/bundle-tsconfig.ref.json +27 -0
  169. package/models/cpu_profile/cpu_profile-tsconfig.json +63 -0
  170. package/models/cpu_profile/cpu_profile-tsconfig.ref.json +31 -0
  171. package/models/cpu_profile/cpu_profile.js +7 -0
  172. package/models/cpu_profile/cpu_profile.js.map +1 -0
  173. package/models/cpu_profile/cpu_profile_node_typecheck-tsconfig.json +60 -0
  174. package/models/cpu_profile/cpu_profile_node_typecheck.stamp +0 -0
  175. package/models/cpu_profile/foundation_unittests-tsconfig.json +63 -0
  176. package/models/cpu_profile/foundation_unittests-tsconfig.ref.json +30 -0
  177. package/models/cpu_profile/foundation_unittests_node_typecheck-tsconfig.json +59 -0
  178. package/models/crux-manager/crux-manager.d.ts +3 -1
  179. package/models/crux-manager/crux-manager.js +1 -0
  180. package/models/trace/EntityMapper.js +133 -0
  181. package/models/trace/EntityMapper.js.map +1 -0
  182. package/models/trace/EventsSerializer.d.ts +1 -0
  183. package/models/trace/EventsSerializer.js +118 -0
  184. package/models/trace/EventsSerializer.js.map +1 -0
  185. package/models/trace/LanternComputationData.js +368 -0
  186. package/models/trace/LanternComputationData.js.map +1 -0
  187. package/models/trace/ModelImpl.js +181 -0
  188. package/models/trace/ModelImpl.js.map +1 -0
  189. package/models/trace/Name.js +115 -0
  190. package/models/trace/Name.js.map +1 -0
  191. package/models/trace/Processor.js +616 -0
  192. package/models/trace/Processor.js.map +1 -0
  193. package/models/trace/Styles.d.ts +2 -2
  194. package/models/trace/Styles.js +836 -0
  195. package/models/trace/Styles.js.map +1 -0
  196. package/models/trace/bundle-tsconfig.json +77 -0
  197. package/models/trace/bundle-tsconfig.ref.json +45 -0
  198. package/models/trace/extras/FilmStrip.js +45 -0
  199. package/models/trace/extras/FilmStrip.js.map +1 -0
  200. package/models/trace/extras/Initiators.js +47 -0
  201. package/models/trace/extras/Initiators.js.map +1 -0
  202. package/models/trace/extras/MainThreadActivity.js +77 -0
  203. package/models/trace/extras/MainThreadActivity.js.map +1 -0
  204. package/models/trace/extras/ScriptDuplication.js +163 -0
  205. package/models/trace/extras/ScriptDuplication.js.map +1 -0
  206. package/models/trace/extras/StackTraceForEvent.js +192 -0
  207. package/models/trace/extras/StackTraceForEvent.js.map +1 -0
  208. package/models/trace/extras/ThirdParties.js +119 -0
  209. package/models/trace/extras/ThirdParties.js.map +1 -0
  210. package/models/trace/extras/TraceFilter.js +51 -0
  211. package/models/trace/extras/TraceFilter.js.map +1 -0
  212. package/models/trace/extras/TraceTree.js +652 -0
  213. package/models/trace/extras/TraceTree.js.map +1 -0
  214. package/models/trace/extras/bundle-tsconfig.json +59 -0
  215. package/models/trace/extras/bundle-tsconfig.ref.json +27 -0
  216. package/models/trace/extras/extras-tsconfig.json +81 -0
  217. package/models/trace/extras/extras-tsconfig.ref.json +49 -0
  218. package/models/trace/extras/extras.js +12 -0
  219. package/models/trace/extras/extras.js.map +1 -0
  220. package/models/trace/extras/extras_node_typecheck-tsconfig.json +78 -0
  221. package/models/trace/extras/extras_node_typecheck.stamp +0 -0
  222. package/models/trace/extras/foundation_unittests-tsconfig.json +91 -0
  223. package/models/trace/extras/foundation_unittests-tsconfig.ref.json +58 -0
  224. package/models/trace/extras/foundation_unittests_node_typecheck-tsconfig.json +87 -0
  225. package/models/trace/foundation_unittests-tsconfig.json +70 -0
  226. package/models/trace/foundation_unittests-tsconfig.ref.json +37 -0
  227. package/models/trace/foundation_unittests_node_typecheck-tsconfig.json +66 -0
  228. package/models/trace/handlers/AnimationFramesHandler.js +110 -0
  229. package/models/trace/handlers/AnimationFramesHandler.js.map +1 -0
  230. package/models/trace/handlers/AnimationHandler.js +27 -0
  231. package/models/trace/handlers/AnimationHandler.js.map +1 -0
  232. package/models/trace/handlers/AsyncJSCallsHandler.js +188 -0
  233. package/models/trace/handlers/AsyncJSCallsHandler.js.map +1 -0
  234. package/models/trace/handlers/DOMStatsHandler.js +22 -0
  235. package/models/trace/handlers/DOMStatsHandler.js.map +1 -0
  236. package/models/trace/handlers/ExtensionTraceDataHandler.js +264 -0
  237. package/models/trace/handlers/ExtensionTraceDataHandler.js.map +1 -0
  238. package/models/trace/handlers/FlowsHandler.js +149 -0
  239. package/models/trace/handlers/FlowsHandler.js.map +1 -0
  240. package/models/trace/handlers/FramesHandler.js +491 -0
  241. package/models/trace/handlers/FramesHandler.js.map +1 -0
  242. package/models/trace/handlers/GPUHandler.js +36 -0
  243. package/models/trace/handlers/GPUHandler.js.map +1 -0
  244. package/models/trace/handlers/ImagePaintingHandler.js +148 -0
  245. package/models/trace/handlers/ImagePaintingHandler.js.map +1 -0
  246. package/models/trace/handlers/InitiatorsHandler.js +181 -0
  247. package/models/trace/handlers/InitiatorsHandler.js.map +1 -0
  248. package/models/trace/handlers/InvalidationsHandler.js +125 -0
  249. package/models/trace/handlers/InvalidationsHandler.js.map +1 -0
  250. package/models/trace/handlers/LargestImagePaintHandler.js +86 -0
  251. package/models/trace/handlers/LargestImagePaintHandler.js.map +1 -0
  252. package/models/trace/handlers/LargestTextPaintHandler.js +28 -0
  253. package/models/trace/handlers/LargestTextPaintHandler.js.map +1 -0
  254. package/models/trace/handlers/LayerTreeHandler.js +104 -0
  255. package/models/trace/handlers/LayerTreeHandler.js.map +1 -0
  256. package/models/trace/handlers/LayoutShiftsHandler.js +453 -0
  257. package/models/trace/handlers/LayoutShiftsHandler.js.map +1 -0
  258. package/models/trace/handlers/MemoryHandler.js +22 -0
  259. package/models/trace/handlers/MemoryHandler.js.map +1 -0
  260. package/models/trace/handlers/MetaHandler.js +442 -0
  261. package/models/trace/handlers/MetaHandler.js.map +1 -0
  262. package/models/trace/handlers/ModelHandlers.js +33 -0
  263. package/models/trace/handlers/ModelHandlers.js.map +1 -0
  264. package/models/trace/handlers/NetworkRequestsHandler.js +578 -0
  265. package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -0
  266. package/models/trace/handlers/PageFramesHandler.js +43 -0
  267. package/models/trace/handlers/PageFramesHandler.js.map +1 -0
  268. package/models/trace/handlers/PageLoadMetricsHandler.js +463 -0
  269. package/models/trace/handlers/PageLoadMetricsHandler.js.map +1 -0
  270. package/models/trace/handlers/RendererHandler.js +346 -0
  271. package/models/trace/handlers/RendererHandler.js.map +1 -0
  272. package/models/trace/handlers/SamplesHandler.js +261 -0
  273. package/models/trace/handlers/SamplesHandler.js.map +1 -0
  274. package/models/trace/handlers/ScreenshotsHandler.js +56 -0
  275. package/models/trace/handlers/ScreenshotsHandler.js.map +1 -0
  276. package/models/trace/handlers/ScriptsHandler.js +277 -0
  277. package/models/trace/handlers/ScriptsHandler.js.map +1 -0
  278. package/models/trace/handlers/SelectorStatsHandler.js +72 -0
  279. package/models/trace/handlers/SelectorStatsHandler.js.map +1 -0
  280. package/models/trace/handlers/Threads.js +108 -0
  281. package/models/trace/handlers/Threads.js.map +1 -0
  282. package/models/trace/handlers/UserInteractionsHandler.js +319 -0
  283. package/models/trace/handlers/UserInteractionsHandler.js.map +1 -0
  284. package/models/trace/handlers/UserTimingsHandler.js +194 -0
  285. package/models/trace/handlers/UserTimingsHandler.js.map +1 -0
  286. package/models/trace/handlers/WarningsHandler.js +135 -0
  287. package/models/trace/handlers/WarningsHandler.js.map +1 -0
  288. package/models/trace/handlers/WorkersHandler.js +34 -0
  289. package/models/trace/handlers/WorkersHandler.js.map +1 -0
  290. package/models/trace/handlers/bundle-tsconfig.json +59 -0
  291. package/models/trace/handlers/bundle-tsconfig.ref.json +27 -0
  292. package/models/trace/handlers/foundation_unittests-tsconfig.json +102 -0
  293. package/models/trace/handlers/foundation_unittests-tsconfig.ref.json +69 -0
  294. package/models/trace/handlers/foundation_unittests_node_typecheck-tsconfig.json +98 -0
  295. package/models/trace/handlers/handlers-tsconfig.json +112 -0
  296. package/models/trace/handlers/handlers-tsconfig.ref.json +80 -0
  297. package/models/trace/handlers/handlers.js +8 -0
  298. package/models/trace/handlers/handlers.js.map +1 -0
  299. package/models/trace/handlers/handlers_node_typecheck-tsconfig.json +109 -0
  300. package/models/trace/handlers/handlers_node_typecheck.stamp +0 -0
  301. package/models/trace/handlers/helpers.js +167 -0
  302. package/models/trace/handlers/helpers.js.map +1 -0
  303. package/models/trace/handlers/types.js +2 -0
  304. package/models/trace/handlers/types.js.map +1 -0
  305. package/models/trace/helpers/Extensions.js +42 -0
  306. package/models/trace/helpers/Extensions.js.map +1 -0
  307. package/models/trace/helpers/Network.js +103 -0
  308. package/models/trace/helpers/Network.js.map +1 -0
  309. package/models/trace/helpers/SamplesIntegrator.js +527 -0
  310. package/models/trace/helpers/SamplesIntegrator.js.map +1 -0
  311. package/models/trace/helpers/SyntheticEvents.js +96 -0
  312. package/models/trace/helpers/SyntheticEvents.js.map +1 -0
  313. package/models/trace/helpers/Timing.js +200 -0
  314. package/models/trace/helpers/Timing.js.map +1 -0
  315. package/models/trace/helpers/Trace.js +844 -0
  316. package/models/trace/helpers/Trace.js.map +1 -0
  317. package/models/trace/helpers/TreeHelpers.js +255 -0
  318. package/models/trace/helpers/TreeHelpers.js.map +1 -0
  319. package/models/trace/helpers/bundle-tsconfig.json +59 -0
  320. package/models/trace/helpers/bundle-tsconfig.ref.json +27 -0
  321. package/models/trace/helpers/foundation_unittests-tsconfig.json +73 -0
  322. package/models/trace/helpers/foundation_unittests-tsconfig.ref.json +40 -0
  323. package/models/trace/helpers/foundation_unittests_node_typecheck-tsconfig.json +69 -0
  324. package/models/trace/helpers/helpers-tsconfig.json +77 -0
  325. package/models/trace/helpers/helpers-tsconfig.ref.json +45 -0
  326. package/models/trace/helpers/helpers.js +11 -0
  327. package/models/trace/helpers/helpers.js.map +1 -0
  328. package/models/trace/helpers/helpers_node_typecheck-tsconfig.json +74 -0
  329. package/models/trace/helpers/helpers_node_typecheck.stamp +0 -0
  330. package/models/trace/insights/CLSCulprits.d.ts +14 -14
  331. package/models/trace/insights/CLSCulprits.js +519 -0
  332. package/models/trace/insights/CLSCulprits.js.map +1 -0
  333. package/models/trace/insights/Cache.d.ts +6 -6
  334. package/models/trace/insights/Cache.js +210 -0
  335. package/models/trace/insights/Cache.js.map +1 -0
  336. package/models/trace/insights/CharacterSet.d.ts +8 -8
  337. package/models/trace/insights/CharacterSet.js +132 -0
  338. package/models/trace/insights/CharacterSet.js.map +1 -0
  339. package/models/trace/insights/Common.js +367 -0
  340. package/models/trace/insights/Common.js.map +1 -0
  341. package/models/trace/insights/DOMSize.d.ts +13 -13
  342. package/models/trace/insights/DOMSize.js +182 -0
  343. package/models/trace/insights/DOMSize.js.map +1 -0
  344. package/models/trace/insights/DocumentLatency.d.ts +11 -11
  345. package/models/trace/insights/DocumentLatency.js +259 -0
  346. package/models/trace/insights/DocumentLatency.js.map +1 -0
  347. package/models/trace/insights/DuplicatedJavaScript.d.ts +5 -5
  348. package/models/trace/insights/DuplicatedJavaScript.js +110 -0
  349. package/models/trace/insights/DuplicatedJavaScript.js.map +1 -0
  350. package/models/trace/insights/FontDisplay.d.ts +5 -5
  351. package/models/trace/insights/FontDisplay.js +93 -0
  352. package/models/trace/insights/FontDisplay.js.map +1 -0
  353. package/models/trace/insights/ForcedReflow.d.ts +7 -7
  354. package/models/trace/insights/ForcedReflow.js +162 -0
  355. package/models/trace/insights/ForcedReflow.js.map +1 -0
  356. package/models/trace/insights/INPBreakdown.d.ts +8 -8
  357. package/models/trace/insights/INPBreakdown.js +130 -0
  358. package/models/trace/insights/INPBreakdown.js.map +1 -0
  359. package/models/trace/insights/ImageDelivery.d.ts +12 -12
  360. package/models/trace/insights/ImageDelivery.js +264 -0
  361. package/models/trace/insights/ImageDelivery.js.map +1 -0
  362. package/models/trace/insights/LCPBreakdown.d.ts +11 -11
  363. package/models/trace/insights/LCPBreakdown.js +200 -0
  364. package/models/trace/insights/LCPBreakdown.js.map +1 -0
  365. package/models/trace/insights/LCPDiscovery.d.ts +10 -10
  366. package/models/trace/insights/LCPDiscovery.js +190 -0
  367. package/models/trace/insights/LCPDiscovery.js.map +1 -0
  368. package/models/trace/insights/LegacyJavaScript.d.ts +5 -5
  369. package/models/trace/insights/LegacyJavaScript.js +99 -0
  370. package/models/trace/insights/LegacyJavaScript.js.map +1 -0
  371. package/models/trace/insights/Models.js +23 -0
  372. package/models/trace/insights/Models.js.map +1 -0
  373. package/models/trace/insights/ModernHTTP.d.ts +5 -5
  374. package/models/trace/insights/ModernHTTP.js +205 -0
  375. package/models/trace/insights/ModernHTTP.js.map +1 -0
  376. package/models/trace/insights/NetworkDependencyTree.d.ts +19 -19
  377. package/models/trace/insights/NetworkDependencyTree.js +551 -0
  378. package/models/trace/insights/NetworkDependencyTree.js.map +1 -0
  379. package/models/trace/insights/RenderBlocking.d.ts +5 -5
  380. package/models/trace/insights/RenderBlocking.js +211 -0
  381. package/models/trace/insights/RenderBlocking.js.map +1 -0
  382. package/models/trace/insights/SlowCSSSelector.d.ts +10 -10
  383. package/models/trace/insights/SlowCSSSelector.js +140 -0
  384. package/models/trace/insights/SlowCSSSelector.js.map +1 -0
  385. package/models/trace/insights/Statistics.js +93 -0
  386. package/models/trace/insights/Statistics.js.map +1 -0
  387. package/models/trace/insights/ThirdParties.d.ts +6 -6
  388. package/models/trace/insights/ThirdParties.js +110 -0
  389. package/models/trace/insights/ThirdParties.js.map +1 -0
  390. package/models/trace/insights/Viewport.d.ts +3 -3
  391. package/models/trace/insights/Viewport.js +105 -0
  392. package/models/trace/insights/Viewport.js.map +1 -0
  393. package/models/trace/insights/bundle-tsconfig.json +59 -0
  394. package/models/trace/insights/bundle-tsconfig.ref.json +27 -0
  395. package/models/trace/insights/foundation_unittests-tsconfig.json +98 -0
  396. package/models/trace/insights/foundation_unittests-tsconfig.ref.json +65 -0
  397. package/models/trace/insights/foundation_unittests_node_typecheck-tsconfig.json +94 -0
  398. package/models/trace/insights/insights-tsconfig.json +114 -0
  399. package/models/trace/insights/insights-tsconfig.ref.json +82 -0
  400. package/models/trace/insights/insights.js +10 -0
  401. package/models/trace/insights/insights.js.map +1 -0
  402. package/models/trace/insights/insights_node_typecheck-tsconfig.json +111 -0
  403. package/models/trace/insights/insights_node_typecheck.stamp +0 -0
  404. package/models/trace/insights/types.d.ts +3 -3
  405. package/models/trace/insights/types.js +41 -0
  406. package/models/trace/insights/types.js.map +1 -0
  407. package/models/trace/lantern/bundle-tsconfig.json +71 -0
  408. package/models/trace/lantern/bundle-tsconfig.ref.json +39 -0
  409. package/models/trace/lantern/core/LanternError.js +7 -0
  410. package/models/trace/lantern/core/LanternError.js.map +1 -0
  411. package/models/trace/lantern/core/NetworkAnalyzer.js +496 -0
  412. package/models/trace/lantern/core/NetworkAnalyzer.js.map +1 -0
  413. package/models/trace/lantern/core/bundle-tsconfig.json +59 -0
  414. package/models/trace/lantern/core/bundle-tsconfig.ref.json +27 -0
  415. package/models/trace/lantern/core/core-tsconfig.json +60 -0
  416. package/models/trace/lantern/core/core-tsconfig.ref.json +28 -0
  417. package/models/trace/lantern/core/core.js +6 -0
  418. package/models/trace/lantern/core/core.js.map +1 -0
  419. package/models/trace/lantern/core/core_node_typecheck-tsconfig.json +57 -0
  420. package/models/trace/lantern/core/core_node_typecheck.stamp +0 -0
  421. package/models/trace/lantern/core/foundation_unittests-tsconfig.json +69 -0
  422. package/models/trace/lantern/core/foundation_unittests-tsconfig.ref.json +36 -0
  423. package/models/trace/lantern/core/foundation_unittests_node_typecheck-tsconfig.json +65 -0
  424. package/models/trace/lantern/graph/BaseNode.d.ts +2 -2
  425. package/models/trace/lantern/graph/BaseNode.js +277 -0
  426. package/models/trace/lantern/graph/BaseNode.js.map +1 -0
  427. package/models/trace/lantern/graph/CPUNode.js +80 -0
  428. package/models/trace/lantern/graph/CPUNode.js.map +1 -0
  429. package/models/trace/lantern/graph/NetworkNode.js +95 -0
  430. package/models/trace/lantern/graph/NetworkNode.js.map +1 -0
  431. package/models/trace/lantern/graph/PageDependencyGraph.js +574 -0
  432. package/models/trace/lantern/graph/PageDependencyGraph.js.map +1 -0
  433. package/models/trace/lantern/graph/bundle-tsconfig.json +59 -0
  434. package/models/trace/lantern/graph/bundle-tsconfig.ref.json +27 -0
  435. package/models/trace/lantern/graph/foundation_unittests-tsconfig.json +61 -0
  436. package/models/trace/lantern/graph/foundation_unittests-tsconfig.ref.json +28 -0
  437. package/models/trace/lantern/graph/foundation_unittests_node_typecheck-tsconfig.json +57 -0
  438. package/models/trace/lantern/graph/graph-tsconfig.json +65 -0
  439. package/models/trace/lantern/graph/graph-tsconfig.ref.json +33 -0
  440. package/models/trace/lantern/graph/graph.js +8 -0
  441. package/models/trace/lantern/graph/graph.js.map +1 -0
  442. package/models/trace/lantern/graph/graph_node_typecheck-tsconfig.json +62 -0
  443. package/models/trace/lantern/graph/graph_node_typecheck.stamp +0 -0
  444. package/models/trace/lantern/lantern.js +10 -0
  445. package/models/trace/lantern/lantern.js.map +1 -0
  446. package/models/trace/lantern/metrics/FirstContentfulPaint.js +137 -0
  447. package/models/trace/lantern/metrics/FirstContentfulPaint.js.map +1 -0
  448. package/models/trace/lantern/metrics/Interactive.js +68 -0
  449. package/models/trace/lantern/metrics/Interactive.js.map +1 -0
  450. package/models/trace/lantern/metrics/LargestContentfulPaint.js +75 -0
  451. package/models/trace/lantern/metrics/LargestContentfulPaint.js.map +1 -0
  452. package/models/trace/lantern/metrics/MaxPotentialFID.js +49 -0
  453. package/models/trace/lantern/metrics/MaxPotentialFID.js.map +1 -0
  454. package/models/trace/lantern/metrics/Metric.js +69 -0
  455. package/models/trace/lantern/metrics/Metric.js.map +1 -0
  456. package/models/trace/lantern/metrics/SpeedIndex.js +102 -0
  457. package/models/trace/lantern/metrics/SpeedIndex.js.map +1 -0
  458. package/models/trace/lantern/metrics/TBTUtils.js +65 -0
  459. package/models/trace/lantern/metrics/TBTUtils.js.map +1 -0
  460. package/models/trace/lantern/metrics/TotalBlockingTime.js +79 -0
  461. package/models/trace/lantern/metrics/TotalBlockingTime.js.map +1 -0
  462. package/models/trace/lantern/metrics/bundle-tsconfig.json +59 -0
  463. package/models/trace/lantern/metrics/bundle-tsconfig.ref.json +27 -0
  464. package/models/trace/lantern/metrics/foundation_unittests-tsconfig.json +76 -0
  465. package/models/trace/lantern/metrics/foundation_unittests-tsconfig.ref.json +43 -0
  466. package/models/trace/lantern/metrics/foundation_unittests_node_typecheck-tsconfig.json +72 -0
  467. package/models/trace/lantern/metrics/metrics-tsconfig.json +75 -0
  468. package/models/trace/lantern/metrics/metrics-tsconfig.ref.json +43 -0
  469. package/models/trace/lantern/metrics/metrics.js +12 -0
  470. package/models/trace/lantern/metrics/metrics.js.map +1 -0
  471. package/models/trace/lantern/metrics/metrics_node_typecheck-tsconfig.json +72 -0
  472. package/models/trace/lantern/metrics/metrics_node_typecheck.stamp +0 -0
  473. package/models/trace/lantern/simulation/ConnectionPool.js +116 -0
  474. package/models/trace/lantern/simulation/ConnectionPool.js.map +1 -0
  475. package/models/trace/lantern/simulation/Constants.js +45 -0
  476. package/models/trace/lantern/simulation/Constants.js.map +1 -0
  477. package/models/trace/lantern/simulation/DNSCache.js +48 -0
  478. package/models/trace/lantern/simulation/DNSCache.js.map +1 -0
  479. package/models/trace/lantern/simulation/SimulationTimingMap.js +135 -0
  480. package/models/trace/lantern/simulation/SimulationTimingMap.js.map +1 -0
  481. package/models/trace/lantern/simulation/Simulator.js +457 -0
  482. package/models/trace/lantern/simulation/Simulator.js.map +1 -0
  483. package/models/trace/lantern/simulation/TCPConnection.js +155 -0
  484. package/models/trace/lantern/simulation/TCPConnection.js.map +1 -0
  485. package/models/trace/lantern/simulation/bundle-tsconfig.json +59 -0
  486. package/models/trace/lantern/simulation/bundle-tsconfig.ref.json +27 -0
  487. package/models/trace/lantern/simulation/foundation_unittests-tsconfig.json +75 -0
  488. package/models/trace/lantern/simulation/foundation_unittests-tsconfig.ref.json +42 -0
  489. package/models/trace/lantern/simulation/foundation_unittests_node_typecheck-tsconfig.json +71 -0
  490. package/models/trace/lantern/simulation/simulation-tsconfig.json +70 -0
  491. package/models/trace/lantern/simulation/simulation-tsconfig.ref.json +38 -0
  492. package/models/trace/lantern/simulation/simulation.js +10 -0
  493. package/models/trace/lantern/simulation/simulation.js.map +1 -0
  494. package/models/trace/lantern/simulation/simulation_node_typecheck-tsconfig.json +67 -0
  495. package/models/trace/lantern/simulation/simulation_node_typecheck.stamp +0 -0
  496. package/models/trace/lantern/testing/bundle-tsconfig.json +60 -0
  497. package/models/trace/lantern/testing/bundle-tsconfig.ref.json +27 -0
  498. package/models/trace/lantern/testing/testing-tsconfig.json +63 -0
  499. package/models/trace/lantern/testing/testing-tsconfig.ref.json +30 -0
  500. package/models/trace/lantern/types/Lantern.d.ts +19 -19
  501. package/models/trace/lantern/types/Lantern.js +25 -0
  502. package/models/trace/lantern/types/Lantern.js.map +1 -0
  503. package/models/trace/lantern/types/bundle-tsconfig.json +59 -0
  504. package/models/trace/lantern/types/bundle-tsconfig.ref.json +27 -0
  505. package/models/trace/lantern/types/types-tsconfig.json +59 -0
  506. package/models/trace/lantern/types/types-tsconfig.ref.json +27 -0
  507. package/models/trace/lantern/types/types.js +5 -0
  508. package/models/trace/lantern/types/types.js.map +1 -0
  509. package/models/trace/lantern/types/types_node_typecheck-tsconfig.json +56 -0
  510. package/models/trace/lantern/types/types_node_typecheck.stamp +0 -0
  511. package/models/trace/trace-tsconfig.json +89 -0
  512. package/models/trace/trace-tsconfig.ref.json +57 -0
  513. package/models/trace/trace.js +16 -544
  514. package/models/trace/trace.js.map +1 -0
  515. package/models/trace/trace_node_typecheck-tsconfig.json +86 -0
  516. package/models/trace/trace_node_typecheck.stamp +0 -0
  517. package/models/trace/types/Configuration.d.ts +2 -2
  518. package/models/trace/types/Configuration.js +19 -0
  519. package/models/trace/types/Configuration.js.map +1 -0
  520. package/models/trace/types/Extensions.d.ts +1 -1
  521. package/models/trace/types/Extensions.js +38 -0
  522. package/models/trace/types/Extensions.js.map +1 -0
  523. package/models/trace/types/File.d.ts +9 -3
  524. package/models/trace/types/File.js +92 -0
  525. package/models/trace/types/File.js.map +1 -0
  526. package/models/trace/types/Overlays.js +5 -0
  527. package/models/trace/types/Overlays.js.map +1 -0
  528. package/models/trace/types/Timing.js +16 -0
  529. package/models/trace/types/Timing.js.map +1 -0
  530. package/models/trace/types/TraceEvents.d.ts +21 -16
  531. package/models/trace/types/TraceEvents.js +983 -0
  532. package/models/trace/types/TraceEvents.js.map +1 -0
  533. package/models/trace/types/bundle-tsconfig.json +59 -0
  534. package/models/trace/types/bundle-tsconfig.ref.json +27 -0
  535. package/models/trace/types/foundation_unittests-tsconfig.json +67 -0
  536. package/models/trace/types/foundation_unittests-tsconfig.ref.json +34 -0
  537. package/models/trace/types/foundation_unittests_node_typecheck-tsconfig.json +63 -0
  538. package/models/trace/types/types-tsconfig.json +76 -0
  539. package/models/trace/types/types-tsconfig.ref.json +44 -0
  540. package/models/trace/types/types.js +10 -0
  541. package/models/trace/types/types.js.map +1 -0
  542. package/models/trace/types/types_node_typecheck-tsconfig.json +73 -0
  543. package/models/trace/types/types_node_typecheck.stamp +0 -0
  544. package/package.json +8 -40
  545. package/test/invalid-animation-events.json.gz +0 -0
  546. package/test/test-trace-engine.mjs +191 -0
  547. package/third_party/legacy-javascript/bundle-tsconfig.json +59 -0
  548. package/third_party/legacy-javascript/bundle-tsconfig.ref.json +27 -0
  549. package/third_party/legacy-javascript/legacy-javascript-tsconfig.ref.json +15 -0
  550. package/third_party/legacy-javascript/legacy-javascript.js +3 -0
  551. package/third_party/legacy-javascript/legacy-javascript.js.map +1 -0
  552. package/third_party/legacy-javascript/lib/legacy-javascript.js +1119 -0
  553. package/third_party/marked/marked.d.ts +1 -2
  554. package/third_party/marked/marked.js +1 -0
  555. package/third_party/third-party-web/third-party-web.d.ts +1 -2
  556. package/third_party/third-party-web/third-party-web.js +1 -0
  557. package/tsconfig.json +29 -0
  558. package/core/common/Base64.d.ts +0 -12
  559. package/core/common/CharacterIdMap.d.ts +0 -5
  560. package/core/common/Color.d.ts +0 -357
  561. package/core/common/ColorConverter.d.ts +0 -26
  562. package/core/common/ColorUtils.d.ts +0 -45
  563. package/core/common/Console.d.ts +0 -54
  564. package/core/common/Debouncer.d.ts +0 -8
  565. package/core/common/EventTarget.d.ts +0 -22
  566. package/core/common/Gzip.d.ts +0 -23
  567. package/core/common/JavaScriptMetaData.d.ts +0 -20
  568. package/core/common/Lazy.d.ts +0 -4
  569. package/core/common/MapWithDefault.d.ts +0 -9
  570. package/core/common/Mutex.d.ts +0 -13
  571. package/core/common/Object.d.ts +0 -20
  572. package/core/common/Progress.d.ts +0 -47
  573. package/core/common/ResolverBase.d.ts +0 -29
  574. package/core/common/ResourceType.d.ts +0 -52
  575. package/core/common/ReturnToPanel.d.ts +0 -10
  576. package/core/common/Revealer.d.ts +0 -66
  577. package/core/common/Runnable.d.ts +0 -14
  578. package/core/common/SegmentedRange.d.ts +0 -14
  579. package/core/common/SettingRegistration.d.ts +0 -136
  580. package/core/common/Settings.d.ts +0 -228
  581. package/core/common/SimpleHistoryManager.d.ts +0 -20
  582. package/core/common/Srcset.d.ts +0 -16
  583. package/core/common/StringOutputStream.d.ts +0 -10
  584. package/core/common/TextDictionary.d.ts +0 -11
  585. package/core/common/Throttler.d.ts +0 -12
  586. package/core/common/Trie.d.ts +0 -24
  587. package/core/common/VersionController.d.ts +0 -85
  588. package/core/host/AidaClient.d.ts +0 -73
  589. package/core/host/AidaClientTypes.d.ts +0 -355
  590. package/core/host/AidaGcaTranslation.d.ts +0 -10
  591. package/core/host/DispatchHttpRequestClient.d.ts +0 -14
  592. package/core/host/GcaClient.d.ts +0 -14
  593. package/core/host/GcaTypes.d.ts +0 -411
  594. package/core/host/GdpClient.d.ts +0 -84
  595. package/core/host/InspectorFrontendHost.d.ts +0 -29
  596. package/core/host/InspectorFrontendHostAPI.d.ts +0 -425
  597. package/core/host/InspectorFrontendHostStub.d.ts +0 -151
  598. package/core/host/Platform.d.ts +0 -16
  599. package/core/host/ResourceLoader.d.ts +0 -15
  600. package/core/host/UserMetrics.d.ts +0 -116
  601. package/core/host/UserMetricsEnums.d.ts +0 -888
  602. package/core/i18n/ByteUtilities.d.ts +0 -11
  603. package/core/i18n/DevToolsLocale.d.ts +0 -41
  604. package/core/i18n/NumberFormatter.d.ts +0 -11
  605. package/core/i18n/i18nImpl.d.ts +0 -64
  606. package/core/i18n/i18nTypes.d.ts +0 -5
  607. package/core/i18n/locales.d.ts +0 -15
  608. package/core/i18n/time-utilities.d.ts +0 -16
  609. package/core/platform/browser/HostRuntime.d.ts +0 -2
  610. package/core/platform/browser/browser.d.ts +0 -2
  611. package/core/platform/node/HostRuntime.d.ts +0 -2
  612. package/core/platform/node/node.d.ts +0 -2
  613. package/core/protocol_client/CDPConnection.d.ts +0 -77
  614. package/core/protocol_client/ConnectionTransport.d.ts +0 -9
  615. package/core/protocol_client/DevToolsCDPConnection.d.ts +0 -16
  616. package/core/protocol_client/InspectorBackend.d.ts +0 -223
  617. package/core/protocol_client/protocol_client.d.ts +0 -5
  618. package/core/root/DevToolsContext.d.ts +0 -34
  619. package/core/root/ExperimentNames.d.ts +0 -9
  620. package/core/root/Runtime.d.ts +0 -353
  621. package/core/sdk/AccessibilityModel.d.ts +0 -76
  622. package/core/sdk/AnimationModel.d.ts +0 -161
  623. package/core/sdk/AutofillModel.d.ts +0 -23
  624. package/core/sdk/CPUProfilerModel.d.ts +0 -46
  625. package/core/sdk/CPUThrottlingManager.d.ts +0 -47
  626. package/core/sdk/CSSContainerQuery.d.ts +0 -42
  627. package/core/sdk/CSSFontFace.d.ts +0 -10
  628. package/core/sdk/CSSLayer.d.ts +0 -9
  629. package/core/sdk/CSSLocation.d.ts +0 -14
  630. package/core/sdk/CSSMatchedStyles.d.ts +0 -138
  631. package/core/sdk/CSSMedia.d.ts +0 -36
  632. package/core/sdk/CSSMetadata.d.ts +0 -87
  633. package/core/sdk/CSSModel.d.ts +0 -185
  634. package/core/sdk/CSSNavigation.d.ts +0 -10
  635. package/core/sdk/CSSProperty.d.ts +0 -53
  636. package/core/sdk/CSSPropertyParser.d.ts +0 -126
  637. package/core/sdk/CSSPropertyParserMatchers.d.ts +0 -442
  638. package/core/sdk/CSSQuery.d.ts +0 -22
  639. package/core/sdk/CSSRule.d.ts +0 -132
  640. package/core/sdk/CSSScope.d.ts +0 -9
  641. package/core/sdk/CSSStartingStyle.d.ts +0 -9
  642. package/core/sdk/CSSStyleDeclaration.d.ts +0 -38
  643. package/core/sdk/CSSStyleSheetHeader.d.ts +0 -53
  644. package/core/sdk/CSSSupports.d.ts +0 -10
  645. package/core/sdk/CategorizedBreakpoint.d.ts +0 -42
  646. package/core/sdk/ChildTargetManager.d.ts +0 -40
  647. package/core/sdk/CompilerSourceMappingContentProvider.d.ts +0 -12
  648. package/core/sdk/Connections.d.ts +0 -36
  649. package/core/sdk/ConsoleModel.d.ts +0 -127
  650. package/core/sdk/ConsoleModelTypes.d.ts +0 -6
  651. package/core/sdk/Cookie.d.ts +0 -68
  652. package/core/sdk/CookieModel.d.ts +0 -31
  653. package/core/sdk/CookieParser.d.ts +0 -14
  654. package/core/sdk/CrashReportContextModel.d.ts +0 -8
  655. package/core/sdk/DOMDebuggerModel.d.ts +0 -127
  656. package/core/sdk/DOMModel.d.ts +0 -440
  657. package/core/sdk/DOMStorageModel.d.ts +0 -79
  658. package/core/sdk/DebuggerModel.d.ts +0 -305
  659. package/core/sdk/EmulationModel.d.ts +0 -95
  660. package/core/sdk/EnhancedTracesParser.d.ts +0 -105
  661. package/core/sdk/EventBreakpointsModel.d.ts +0 -66
  662. package/core/sdk/FrameAssociated.d.ts +0 -6
  663. package/core/sdk/FrameManager.d.ts +0 -68
  664. package/core/sdk/HeapProfilerModel.d.ts +0 -75
  665. package/core/sdk/HttpReasonPhraseStrings.d.ts +0 -5
  666. package/core/sdk/IOModel.d.ts +0 -10
  667. package/core/sdk/IsolateManager.d.ts +0 -53
  668. package/core/sdk/IssuesModel.d.ts +0 -28
  669. package/core/sdk/LayerTreeBase.d.ts +0 -70
  670. package/core/sdk/LogModel.d.ts +0 -20
  671. package/core/sdk/NetworkManager.d.ts +0 -418
  672. package/core/sdk/NetworkRequest.d.ts +0 -497
  673. package/core/sdk/NetworkRequestAccess.d.ts +0 -91
  674. package/core/sdk/OverlayColorGenerator.d.ts +0 -14
  675. package/core/sdk/OverlayModel.d.ts +0 -186
  676. package/core/sdk/OverlayPersistentHighlighter.d.ts +0 -116
  677. package/core/sdk/PageFunctions.d.ts +0 -22
  678. package/core/sdk/PageLoad.d.ts +0 -14
  679. package/core/sdk/PageResourceLoader.d.ts +0 -111
  680. package/core/sdk/PaintProfiler.d.ts +0 -43
  681. package/core/sdk/PerformanceMetricsModel.d.ts +0 -12
  682. package/core/sdk/PreloadingModel.d.ts +0 -146
  683. package/core/sdk/RehydratingConnection.d.ts +0 -73
  684. package/core/sdk/RehydratingObject.d.ts +0 -59
  685. package/core/sdk/RemoteObject.d.ts +0 -210
  686. package/core/sdk/Resource.d.ts +0 -36
  687. package/core/sdk/ResourceTreeModel.d.ts +0 -280
  688. package/core/sdk/RuntimeModel.d.ts +0 -164
  689. package/core/sdk/SDKModel.d.ts +0 -30
  690. package/core/sdk/SDKSettings.d.ts +0 -54
  691. package/core/sdk/ScopeTreeCache.d.ts +0 -21
  692. package/core/sdk/ScreenCaptureModel.d.ts +0 -69
  693. package/core/sdk/Script.d.ts +0 -134
  694. package/core/sdk/SecurityOrigin.d.ts +0 -108
  695. package/core/sdk/SecurityOriginManager.d.ts +0 -23
  696. package/core/sdk/ServerSentEvents.d.ts +0 -18
  697. package/core/sdk/ServerSentEventsProtocol.d.ts +0 -18
  698. package/core/sdk/ServerTiming.d.ts +0 -24
  699. package/core/sdk/ServiceWorkerCacheModel.d.ts +0 -71
  700. package/core/sdk/ServiceWorkerManager.d.ts +0 -125
  701. package/core/sdk/SourceMap.d.ts +0 -211
  702. package/core/sdk/SourceMapCache.d.ts +0 -12
  703. package/core/sdk/SourceMapFunctionRanges.d.ts +0 -23
  704. package/core/sdk/SourceMapManager.d.ts +0 -46
  705. package/core/sdk/SourceMapRangeMappings.d.ts +0 -15
  706. package/core/sdk/SourceMapScopeChainEntry.d.ts +0 -23
  707. package/core/sdk/SourceMapScopesInfo.d.ts +0 -184
  708. package/core/sdk/StorageBucketsModel.d.ts +0 -48
  709. package/core/sdk/StorageKeyManager.d.ts +0 -38
  710. package/core/sdk/Target.d.ts +0 -79
  711. package/core/sdk/TargetManager.d.ts +0 -92
  712. package/core/sdk/TraceObject.d.ts +0 -43
  713. package/core/sdk/WebAuthnModel.d.ts +0 -29
  714. package/core/text_utils/CodeMirrorUtils.d.ts +0 -3
  715. package/core/text_utils/ContentData.d.ts +0 -94
  716. package/core/text_utils/ContentProvider.d.ts +0 -42
  717. package/core/text_utils/Markdown.d.ts +0 -13
  718. package/core/text_utils/StaticContentProvider.d.ts +0 -13
  719. package/core/text_utils/StreamingContentData.d.ts +0 -49
  720. package/core/text_utils/Text.d.ts +0 -19
  721. package/core/text_utils/TextCursor.d.ts +0 -9
  722. package/core/text_utils/TextRange.d.ts +0 -81
  723. package/core/text_utils/TextUtils.d.ts +0 -97
  724. package/core/text_utils/WasmDisassembly.d.ts +0 -29
  725. package/core/text_utils/text_utils.d.ts +0 -12
  726. package/entrypoints/formatter_actions/formatter_actions.d.ts +0 -65
  727. package/generated/InspectorBackendCommands.d.ts +0 -14
  728. package/generated/SupportedCSSProperties.d.ts +0 -18
  729. package/generated/protocol-mapping.d.ts +0 -5985
  730. package/generated/protocol-proxy-api.d.ts +0 -5447
  731. package/index.d.ts +0 -2
  732. package/index.js +0 -6
  733. package/models/crux-manager/CrUXManager.d.ts +0 -107
  734. package/models/emulation/DeviceModeModel.d.ts +0 -157
  735. package/models/emulation/EmulatedDevices.d.ts +0 -148
  736. package/models/emulation/emulation.d.ts +0 -3
  737. package/models/formatter/FormatterWorkerPool.d.ts +0 -58
  738. package/models/formatter/ScriptFormatter.d.ts +0 -11
  739. package/models/formatter/formatter.d.ts +0 -3
  740. package/third_party/codemirror.next/codemirror.next.d.ts +0 -9196
  741. package/third_party/i18n/i18n-impl.d.ts +0 -25
  742. package/third_party/i18n/i18n.d.ts +0 -3
  743. package/third_party/i18n/localized-string-set.d.ts +0 -49
  744. package/third_party/intl-messageformat/intl-messageformat.d.ts +0 -1
  745. package/third_party/marked/package/lib/marked.esm.d.ts +0 -760
  746. package/third_party/source-map-scopes-codec/package/src/builder/builder.d.ts +0 -70
  747. package/third_party/source-map-scopes-codec/package/src/builder/safe_builder.d.ts +0 -40
  748. package/third_party/source-map-scopes-codec/package/src/codec.d.ts +0 -49
  749. package/third_party/source-map-scopes-codec/package/src/decode/decode.d.ts +0 -33
  750. package/third_party/source-map-scopes-codec/package/src/encode/encode.d.ts +0 -8
  751. package/third_party/source-map-scopes-codec/package/src/encode/encoder.d.ts +0 -9
  752. package/third_party/source-map-scopes-codec/package/src/mod.d.ts +0 -5
  753. package/third_party/source-map-scopes-codec/package/src/scopes.d.ts +0 -169
  754. package/third_party/source-map-scopes-codec/package/src/util.d.ts +0 -5
  755. package/third_party/source-map-scopes-codec/package/src/vlq.d.ts +0 -14
  756. package/third_party/source-map-scopes-codec/source-map-scopes-codec.d.ts +0 -1
  757. package/third_party/third-party-web/lib/nostats-subset.d.ts +0 -2
  758. package/third_party/third-party-web/package/lib/index.d.ts +0 -34
  759. package/third_party/third-party-web/package/lib/subsets/nostats.d.ts +0 -1
@@ -0,0 +1,86 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": false,
4
+ "allowSyntheticDefaultImports": true,
5
+ "checkJs": false,
6
+ "composite": false,
7
+ "declaration": false,
8
+ "disableSourceOfProjectReferenceRedirect": true,
9
+ "experimentalDecorators": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "incremental": false,
12
+ "inlineSources": true,
13
+ "lib": [
14
+ "ES2023",
15
+ "ES2024.Promise",
16
+ "ESNext.Iterator",
17
+ "ESNext.Collection",
18
+ "ESNext.Array"
19
+ ],
20
+ "module": "esnext",
21
+ "moduleResolution": "bundler",
22
+ "noEmit": true,
23
+ "noEmitOnError": true,
24
+ "noFallthroughCasesInSwitch": true,
25
+ "noImplicitOverride": true,
26
+ "noImplicitReturns": true,
27
+ "outDir": ".",
28
+ "preserveConstEnums": true,
29
+ "rootDir": "../../../../../../front_end/models/trace",
30
+ "rootDirs": [
31
+ "../../../../../../",
32
+ "../../../"
33
+ ],
34
+ "skipLibCheck": true,
35
+ "sourceMap": true,
36
+ "strict": true,
37
+ "target": "es2023",
38
+ "typeRoots": [
39
+ "../../../../../../node_modules/@types",
40
+ "../../../../../../node_modules"
41
+ ],
42
+ "types": [
43
+ "node",
44
+ "undici-types"
45
+ ],
46
+ "useUnknownInCatchVariables": false
47
+ },
48
+ "files": [
49
+ "../../../../../../front_end/models/trace/EntityMapper.ts",
50
+ "../../../../../../front_end/models/trace/EventsSerializer.ts",
51
+ "../../../../../../front_end/models/trace/LanternComputationData.ts",
52
+ "../../../../../../front_end/models/trace/ModelImpl.ts",
53
+ "../../../../../../front_end/models/trace/Name.ts",
54
+ "../../../../../../front_end/models/trace/Processor.ts",
55
+ "../../../../../../front_end/models/trace/Styles.ts"
56
+ ],
57
+ "references": [
58
+ {
59
+ "path": "../../core/common/bundle-tsconfig.ref.json"
60
+ },
61
+ {
62
+ "path": "../../core/i18n/bundle-tsconfig.ref.json"
63
+ },
64
+ {
65
+ "path": "../../core/platform/bundle-tsconfig.ref.json"
66
+ },
67
+ {
68
+ "path": "../../generated/generated-tsconfig.ref.json"
69
+ },
70
+ {
71
+ "path": "handlers/bundle-tsconfig.ref.json"
72
+ },
73
+ {
74
+ "path": "helpers/bundle-tsconfig.ref.json"
75
+ },
76
+ {
77
+ "path": "insights/bundle-tsconfig.ref.json"
78
+ },
79
+ {
80
+ "path": "lantern/bundle-tsconfig.ref.json"
81
+ },
82
+ {
83
+ "path": "types/bundle-tsconfig.ref.json"
84
+ }
85
+ ]
86
+ }
File without changes
@@ -69,7 +69,7 @@ export interface ParseOptions {
69
69
  */
70
70
  isCPUProfile?: boolean;
71
71
  metadata?: File.MetaData;
72
- resolveSourceMap?: (params: ResolveSourceMapParams) => Promise<any | null>;
72
+ resolveSourceMap?: (params: ResolveSourceMapParams) => Promise<SDK.SourceMap.SourceMap | null>;
73
73
  logger?: {
74
74
  start: (id: string) => void;
75
75
  end: (id: string) => void;
@@ -94,5 +94,5 @@ export interface ResolveSourceMapParams {
94
94
  sourceMapUrl: Platform.DevToolsPath.UrlString;
95
95
  frame: Protocol.Page.FrameId;
96
96
  /** Set only if the raw source map was found on the provided metadata. Never set for source maps from data urls. */
97
- cachedRawSourceMap?: any;
97
+ cachedRawSourceMap?: SDK.SourceMap.SourceMapV3;
98
98
  }
@@ -0,0 +1,19 @@
1
+ // Copyright 2023 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ export const defaults = () => ({
5
+ showAllEvents: false,
6
+ debugMode: false,
7
+ maxInvalidationEventsPerEvent: 20,
8
+ enableAnimationsFrameHandler: false,
9
+ enableSoftNavigation: true,
10
+ });
11
+ /**
12
+ * Generates a key that can be used to represent this config in a cache. This is
13
+ * used mainly in tests, where we want to avoid re-parsing a file if we have
14
+ * already processed it with the same configuration.
15
+ */
16
+ export function configToCacheKey(config) {
17
+ return JSON.stringify(config);
18
+ }
19
+ //# sourceMappingURL=Configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Configuration.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAgD7B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAkB,EAAE,CAAC,CAAC;IAC5C,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,KAAK;IAChB,6BAA6B,EAAE,EAAE;IACjC,4BAA4B,EAAE,KAAK;IACnC,oBAAoB,EAAE,IAAI;CAC3B,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAqB;IACpD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Platform from '../../../core/platform/platform.js';\nimport type * as SDK from '../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport type * as Lantern from '../lantern/lantern.js';\n\nimport type * as File from './File.js';\nimport type {Milli} from './Timing.js';\n\nexport interface Configuration {\n /**\n * Show all events: disable the default filtering which hides and excludes some events.\n */\n showAllEvents: boolean;\n /**\n * Extra detail for RPP developers (eg Trace Event json in Summary, and individual JS Sample events)\n */\n debugMode: boolean;\n /**\n * How many invalidation events will be stored for a layout (or similar) event.\n * On large sites with a lot of DOM there can be thousands of invalidations\n * associated with any given event. It is not useful to show the user 1000s of\n * invalidations in the UI, but it is also expensive for us to hold onto them\n * all, and it helps prevents OOM issues when running in NodeJS\n * [https://github.com/GoogleChrome/lighthouse/issues/16111].\n * Therefore, instead, we store only the latest 20 per event. We do also store\n * the total count, so we can show that, but we'll only ever hold on to the\n * last 20 invalidations (in DESC trace order - so the latest 20 in the trace file)\n *\n * If you set this to 0, we will skip the Invalidations processing entirely.\n * 0 effectively disables the InvalidationsHandler and it will not even\n * attempt to gather or track invalidations.\n */\n maxInvalidationEventsPerEvent: number;\n /**\n * Determines if the AnimationFramesHandler should be enabled. Currently in\n * DevTools we do not use it, so we disable it by default to avoid work that\n * we do not use. If you disable it, you will still see `data.AnimationFrames`\n * from the model, but the contents will be empty.\n */\n enableAnimationsFrameHandler: boolean;\n /**\n * Whether soft-navs are used in the model/insights.\n */\n enableSoftNavigation: boolean;\n}\n\nexport const defaults = (): Configuration => ({\n showAllEvents: false,\n debugMode: false,\n maxInvalidationEventsPerEvent: 20,\n enableAnimationsFrameHandler: false,\n enableSoftNavigation: true,\n});\n\n/**\n * Generates a key that can be used to represent this config in a cache. This is\n * used mainly in tests, where we want to avoid re-parsing a file if we have\n * already processed it with the same configuration.\n */\nexport function configToCacheKey(config: Configuration): string {\n return JSON.stringify(config);\n}\n\nexport interface ParseOptions {\n showAllEvents?: boolean;\n /**\n * If the trace was just recorded on the current page, rather than an imported file.\n * TODO(paulirish): Maybe remove. This is currently unused by the Processor and Handlers\n * @default false\n */\n isFreshRecording?: boolean;\n /**\n * Whether the processor should yield to the main thread during parsing to keep the UI responsive.\n * This should always remain enabled in production to prevent blocking the UI, but can be disabled\n * in unit tests to speed up test execution.\n * @default true\n */\n yieldToMain?: boolean;\n /**\n * If the trace is a CPU Profile rather than a Chrome tracing trace.\n * @default false\n */\n isCPUProfile?: boolean;\n metadata?: File.MetaData;\n resolveSourceMap?: (params: ResolveSourceMapParams) => Promise<SDK.SourceMap.SourceMap|null>;\n logger?: {\n start: (id: string) => void,\n end: (id: string) => void,\n };\n lanternSettings?: Omit<Lantern.Types.Simulation.Settings, 'networkAnalysis'>;\n /**\n * Used when an Insight needs to format a time to string as part of its\n * output. By default we use the i18n.TimeUtilities in DevTools but this\n * enables it to be overridden, which is useful if you are consuming the trace\n * engine outside of DevTools.\n */\n insightTimeFormatters?: InsightTimeFormatters;\n}\n\nexport interface InsightTimeFormatters {\n milli: (x: Milli) => string;\n}\n\nexport interface ResolveSourceMapParams {\n scriptId: string;\n scriptUrl: Platform.DevToolsPath.UrlString;\n /** The url as resolved by any sourceUrl comment. */\n sourceUrl: Platform.DevToolsPath.UrlString;\n sourceMapUrl: Platform.DevToolsPath.UrlString;\n frame: Protocol.Page.FrameId;\n /** Set only if the raw source map was found on the provided metadata. Never set for source maps from data urls. */\n cachedRawSourceMap?: SDK.SourceMap.SourceMapV3;\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import type * as Platform from '../../../core/platform/platform.js';
2
2
  import type { ConsoleTimeStamp, Event, PerformanceMark, PerformanceMeasureBegin, Phase, SyntheticBased } from './TraceEvents.js';
3
3
  export type ExtensionEntryType = 'track-entry' | 'marker';
4
- export declare const extensionPalette: readonly ["primary", "primary-light", "primary-dark", "secondary", "secondary-light", "secondary-dark", "tertiary", "tertiary-light", "tertiary-dark", "error", "warning"];
4
+ export declare const extensionPalette: readonly ['primary', 'primary-light', 'primary-dark', 'secondary', 'secondary-light', 'secondary-dark', 'tertiary', 'tertiary-light', 'tertiary-dark', 'error', 'warning'];
5
5
  export type ExtensionColorFromPalette = typeof extensionPalette[number];
6
6
  /**
7
7
  * Represents any valid value that can be produced by JSON.parse()
@@ -0,0 +1,38 @@
1
+ // Copyright 2024 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ export const extensionPalette = [
5
+ 'primary',
6
+ 'primary-light',
7
+ 'primary-dark',
8
+ 'secondary',
9
+ 'secondary-light',
10
+ 'secondary-dark',
11
+ 'tertiary',
12
+ 'tertiary-light',
13
+ 'tertiary-dark',
14
+ 'error',
15
+ 'warning',
16
+ ];
17
+ /** Returns true if this is a devtoolsObj for a marker */
18
+ export function isExtensionPayloadMarker(payload) {
19
+ return payload.dataType === 'marker';
20
+ }
21
+ /** Returns true if this is a devtoolsObj for an entry (non-instant) */
22
+ export function isExtensionEntryObj(payload) {
23
+ const hasTrack = 'track' in payload && Boolean(payload.track);
24
+ const validEntryType = payload.dataType === 'track-entry' || payload.dataType === undefined;
25
+ return validEntryType && hasTrack;
26
+ }
27
+ /** Returns true if this is a devtoolsObj for a console.timeStamp */
28
+ export function isConsoleTimestampPayloadTrackEntry(payload) {
29
+ return payload.url !== undefined && payload.description !== undefined;
30
+ }
31
+ export function isValidExtensionPayload(payload) {
32
+ return isExtensionPayloadMarker(payload) || isExtensionEntryObj(payload) ||
33
+ isConsoleTimestampPayloadTrackEntry(payload);
34
+ }
35
+ export function isSyntheticExtensionEntry(entry) {
36
+ return entry.cat === 'devtools.extension';
37
+ }
38
+ //# sourceMappingURL=Extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Extensions.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Extensions.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAS7B,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,SAAS;IACT,eAAe;IACf,cAAc;IACd,WAAW;IACX,iBAAiB;IACjB,gBAAgB;IAChB,UAAU;IACV,gBAAgB;IAChB,eAAe;IACf,OAAO;IACP,SAAS;CACD,CAAC;AA0EX,yDAAyD;AACzD,MAAM,UAAU,wBAAwB,CAAC,OAA4B;IACnE,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACvC,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,mBAAmB,CAAC,OAA4C;IAC9E,MAAM,QAAQ,GAAG,OAAO,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,KAAK,aAAa,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC;IAC5F,OAAO,cAAc,IAAI,QAAQ,CAAC;AACpC,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,mCAAmC,CAAC,OAA6C;IAE/F,OAAO,OAAO,CAAC,GAAG,KAAK,SAAS,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,uBAAuB,CACnC,OAAgF;IAElF,OAAO,wBAAwB,CAAC,OAAO,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC;QACpE,mCAAmC,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,KAAY;IACpD,OAAO,KAAK,CAAC,GAAG,KAAK,oBAAoB,CAAC;AAC5C,CAAC","sourcesContent":["// Copyright 2024 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Platform from '../../../core/platform/platform.js';\n\nimport type {\n ConsoleTimeStamp, Event, PerformanceMark, PerformanceMeasureBegin, Phase, SyntheticBased} from './TraceEvents.js';\n\nexport type ExtensionEntryType = 'track-entry'|'marker';\n\nexport const extensionPalette = [\n 'primary',\n 'primary-light',\n 'primary-dark',\n 'secondary',\n 'secondary-light',\n 'secondary-dark',\n 'tertiary',\n 'tertiary-light',\n 'tertiary-dark',\n 'error',\n 'warning',\n] as const;\n\nexport type ExtensionColorFromPalette = typeof extensionPalette[number];\n\n/**\n * Represents any valid value that can be produced by JSON.parse()\n * without a reviver.\n */\nexport type JsonValue = string|number|boolean|null|JsonValue[]|{[key: string]: JsonValue};\n\nexport interface DevToolsObjBase {\n color?: ExtensionColorFromPalette;\n /**\n * We document to users that we support only string values here, but because\n * this is coming from user code the values could be anything, so we ensure we\n * deal with bad data by typing this as unknown.\n */\n properties?: Array<[string, JsonValue]>;\n tooltipText?: string;\n}\n\nexport type DevToolsObj = DevToolsObjEntry|DevToolsObjMarker;\n\nexport interface ExtensionTrackEntryPayloadDeeplink {\n // The URL (deep-link) to show in the summary for the track.\n url: Platform.DevToolsPath.UrlString;\n // The label to show in front of the URL when the deep-link is shown in the\n // graph.\n description: string;\n}\n\nexport interface DevToolsObjEntry extends DevToolsObjBase {\n // Typed as possibly undefined since when no data type is provided\n // the entry is defaulted to a track entry\n dataType?: 'track-entry';\n // The name of the track the entry will be displayed in.\n // Entries intended to be displayed in the same track must contain the\n // same value in this property.\n // If undefined, measurement is added to the Timings track\n track: string;\n // The track group an entry’s track belongs to.\n // Entries intended to be displayed in the same track must contain the\n // same value in this property as well as the same value in the track\n // property.\n trackGroup?: string;\n // Additional data (e.g. deep-link URL) that can be shown in the summary\n // In perf.mark/measure, it's anything in the `detail` object that's not the `devtools` object\n // In console.timestamp, it's the 7th argument to console.timeStamp().\n userDetail?: JsonValue;\n}\n\nexport interface DevToolsObjMarker extends DevToolsObjBase {\n dataType: 'marker';\n}\n\n/**\n * Synthetic events created for extension tracks.\n */\nexport interface SyntheticExtensionTrackEntry extends\n SyntheticBased<Phase.COMPLETE, PerformanceMeasureBegin|PerformanceMark|ConsoleTimeStamp> {\n devtoolsObj: DevToolsObjEntry;\n userDetail: JsonValue|null;\n}\n\n/**\n * Synthetic events created for extension marks.\n */\nexport interface SyntheticExtensionMarker extends SyntheticBased<Phase.INSTANT, PerformanceMark> {\n devtoolsObj: DevToolsObjMarker;\n userDetail: JsonValue|null;\n}\n\nexport type SyntheticExtensionEntry = SyntheticExtensionTrackEntry|SyntheticExtensionMarker;\n\n/** Returns true if this is a devtoolsObj for a marker */\nexport function isExtensionPayloadMarker(payload: {dataType?: string}): payload is DevToolsObjMarker {\n return payload.dataType === 'marker';\n}\n\n/** Returns true if this is a devtoolsObj for an entry (non-instant) */\nexport function isExtensionEntryObj(payload: {track?: string, dataType?: string}): payload is DevToolsObjEntry {\n const hasTrack = 'track' in payload && Boolean(payload.track);\n const validEntryType = payload.dataType === 'track-entry' || payload.dataType === undefined;\n return validEntryType && hasTrack;\n}\n\n/** Returns true if this is a devtoolsObj for a console.timeStamp */\nexport function isConsoleTimestampPayloadTrackEntry(payload: {description?: string, url?: string}):\n payload is ExtensionTrackEntryPayloadDeeplink {\n return payload.url !== undefined && payload.description !== undefined;\n}\n\nexport function isValidExtensionPayload(\n payload: {track?: string, dataType?: string, description?: string, url?: string}): payload is DevToolsObj|\n ExtensionTrackEntryPayloadDeeplink {\n return isExtensionPayloadMarker(payload) || isExtensionEntryObj(payload) ||\n isConsoleTimestampPayloadTrackEntry(payload);\n}\n\nexport function isSyntheticExtensionEntry(entry: Event): entry is SyntheticExtensionEntry {\n return entry.cat === 'devtools.extension';\n}\n\nexport interface ExtensionTrackData {\n // Name of the top level track. If it's a track group then this value\n // has the name of the group, otherwise it has the name of the track.\n name: string;\n isTrackGroup: boolean;\n // If this contains the data of a track group, this property contains\n // the entries of each of the tracks in the the group. If this is a\n // standalone track, then this contains that track's entries only.\n entriesByTrack: Record<string, SyntheticExtensionTrackEntry[]>;\n}\n"]}
@@ -34,7 +34,8 @@ export declare enum EventKeyType {
34
34
  RAW_EVENT = "r",
35
35
  SYNTHETIC_EVENT = "s",
36
36
  PROFILE_CALL = "p",
37
- LEGACY_TIMELINE_FRAME = "l"
37
+ LEGACY_TIMELINE_FRAME = "l",
38
+ LAYOUT_SHIFT_CLUSTER = "c"
38
39
  }
39
40
  /**
40
41
  * Represents an object that is saved in the file when user created annotations in the timeline.
@@ -110,7 +111,8 @@ export type RawEventKey = `${EventKeyType.RAW_EVENT}-${number}`;
110
111
  export type SyntheticEventKey = `${EventKeyType.SYNTHETIC_EVENT}-${number}`;
111
112
  export type ProfileCallKey = `${EventKeyType.PROFILE_CALL}-${ProcessID}-${ThreadID}-${SampleIndex}-${Protocol.integer}`;
112
113
  export type LegacyTimelineFrameKey = `${EventKeyType.LEGACY_TIMELINE_FRAME}-${number}`;
113
- export type SerializableKey = RawEventKey | ProfileCallKey | SyntheticEventKey | LegacyTimelineFrameKey;
114
+ export type LayoutShiftClusterKey = `${EventKeyType.LAYOUT_SHIFT_CLUSTER}-${number}`;
115
+ export type SerializableKey = RawEventKey | ProfileCallKey | SyntheticEventKey | LegacyTimelineFrameKey | LayoutShiftClusterKey;
114
116
  /** Serializable keys values objects contain data that maps the keys to original Trace Events **/
115
117
  export interface RawEventKeyValues {
116
118
  type: EventKeyType.RAW_EVENT;
@@ -131,7 +133,11 @@ export interface LegacyTimelineFrameKeyValues {
131
133
  type: EventKeyType.LEGACY_TIMELINE_FRAME;
132
134
  rawIndex: number;
133
135
  }
134
- export type SerializableKeyValues = RawEventKeyValues | ProfileCallKeyValues | SyntheticEventKeyValues | LegacyTimelineFrameKeyValues;
136
+ export interface LayoutShiftClusterKeyValues {
137
+ type: EventKeyType.LAYOUT_SHIFT_CLUSTER;
138
+ rawIndex: number;
139
+ }
140
+ export type SerializableKeyValues = RawEventKeyValues | ProfileCallKeyValues | SyntheticEventKeyValues | LegacyTimelineFrameKeyValues | LayoutShiftClusterKeyValues;
135
141
  export interface Modifications {
136
142
  entriesModifications: {
137
143
  hiddenEntries: SerializableKey[];
@@ -0,0 +1,92 @@
1
+ // Copyright 2023 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ export var DataOrigin;
5
+ (function (DataOrigin) {
6
+ DataOrigin["CPU_PROFILE"] = "CPUProfile";
7
+ DataOrigin["TRACE_EVENTS"] = "TraceEvents";
8
+ })(DataOrigin || (DataOrigin = {}));
9
+ /**
10
+ * The Entries link can have 3 stated:
11
+ * 1. The Link creation is not started yet, meaning only the button that needs to be clicked to start creating the link is visible.
12
+ * 2. Pending to event - the creation is started, but the entry that the link points to has not been chosen yet
13
+ * 3. Link connected - final state, both entries present
14
+ */
15
+ export var EntriesLinkState;
16
+ (function (EntriesLinkState) {
17
+ EntriesLinkState["CREATION_NOT_STARTED"] = "creation_not_started";
18
+ EntriesLinkState["PENDING_TO_EVENT"] = "pending_to_event";
19
+ EntriesLinkState["CONNECTED"] = "connected";
20
+ })(EntriesLinkState || (EntriesLinkState = {}));
21
+ export var EventKeyType;
22
+ (function (EventKeyType) {
23
+ EventKeyType["RAW_EVENT"] = "r";
24
+ EventKeyType["SYNTHETIC_EVENT"] = "s";
25
+ EventKeyType["PROFILE_CALL"] = "p";
26
+ EventKeyType["LEGACY_TIMELINE_FRAME"] = "l";
27
+ EventKeyType["LAYOUT_SHIFT_CLUSTER"] = "c";
28
+ })(EventKeyType || (EventKeyType = {}));
29
+ export function isTimeRangeAnnotation(annotation) {
30
+ return annotation.type === 'TIME_RANGE';
31
+ }
32
+ export function isEntryLabelAnnotation(annotation) {
33
+ return annotation.type === 'ENTRY_LABEL';
34
+ }
35
+ export function isEntriesLinkAnnotation(annotation) {
36
+ return annotation.type === 'ENTRIES_LINK';
37
+ }
38
+ export function traceEventKeyToValues(key) {
39
+ const parts = key.split('-');
40
+ const type = parts[0];
41
+ switch (type) {
42
+ case EventKeyType.PROFILE_CALL:
43
+ if (parts.length !== 5 ||
44
+ !(parts.every((part, i) => i === 0 || typeof part === 'number' || !isNaN(parseInt(part, 10))))) {
45
+ throw new Error(`Invalid ProfileCallKey: ${key}`);
46
+ }
47
+ return {
48
+ type: parts[0],
49
+ processID: parseInt(parts[1], 10),
50
+ threadID: parseInt(parts[2], 10),
51
+ sampleIndex: parseInt(parts[3], 10),
52
+ protocol: parseInt(parts[4], 10),
53
+ };
54
+ case EventKeyType.RAW_EVENT:
55
+ if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {
56
+ throw new Error(`Invalid RawEvent Key: ${key}`);
57
+ }
58
+ return {
59
+ type: parts[0],
60
+ rawIndex: parseInt(parts[1], 10),
61
+ };
62
+ case EventKeyType.SYNTHETIC_EVENT:
63
+ if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {
64
+ throw new Error(`Invalid SyntheticEvent Key: ${key}`);
65
+ }
66
+ return {
67
+ type: parts[0],
68
+ rawIndex: parseInt(parts[1], 10),
69
+ };
70
+ case EventKeyType.LEGACY_TIMELINE_FRAME: {
71
+ if (parts.length !== 2 || Number.isNaN(parseInt(parts[1], 10))) {
72
+ throw new Error(`Invalid LegacyTimelineFrame Key: ${key}`);
73
+ }
74
+ return {
75
+ type,
76
+ rawIndex: parseInt(parts[1], 10),
77
+ };
78
+ }
79
+ case EventKeyType.LAYOUT_SHIFT_CLUSTER: {
80
+ if (parts.length !== 2 || Number.isNaN(parseInt(parts[1], 10))) {
81
+ throw new Error(`Invalid LayoutShiftCluster Key: ${key}`);
82
+ }
83
+ return {
84
+ type,
85
+ rawIndex: parseInt(parts[1], 10),
86
+ };
87
+ }
88
+ default:
89
+ throw new Error(`Unknown trace event key: ${key}`);
90
+ }
91
+ }
92
+ //# sourceMappingURL=File.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/File.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AA0B7B,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,wCAA0B,CAAA;IAC1B,0CAA4B,CAAA;AAC9B,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,iEAA6C,CAAA;IAC7C,yDAAqC,CAAA;IACrC,2CAAuB,CAAA;AACzB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAED,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,qCAAqB,CAAA;IACrB,kCAAkB,CAAA;IAClB,2CAA2B,CAAA;IAC3B,0CAA0B,CAAA;AAC5B,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB;AAuED,MAAM,UAAU,qBAAqB,CAAC,UAAsB;IAC1D,OAAO,UAAU,CAAC,IAAI,KAAK,YAAY,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,UAAsB;IAC3D,OAAO,UAAU,CAAC,IAAI,KAAK,aAAa,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,UAAsB;IAC5D,OAAO,UAAU,CAAC,IAAI,KAAK,cAAc,CAAC;AAC5C,CAAC;AA+HD,MAAM,UAAU,qBAAqB,CAAC,GAAoB;IACxD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAEtB,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,YAAY,CAAC,YAAY;YAC5B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;gBAClB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACnG,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC,CAAC;YACpD,CAAC;YACD,OAAO;gBACL,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;gBACd,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBACjC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBAChC,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBACnC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;aACT,CAAC;QAC5B,KAAK,YAAY,CAAC,SAAS;YACzB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5F,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,EAAE,CAAC,CAAC;YAClD,CAAC;YACD,OAAO;gBACL,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;gBACd,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;aACZ,CAAC;QACzB,KAAK,YAAY,CAAC,eAAe;YAC/B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5F,MAAM,IAAI,KAAK,CAAC,+BAA+B,GAAG,EAAE,CAAC,CAAC;YACxD,CAAC;YACD,OAAO;gBACL,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;gBACd,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;aACN,CAAC;QAC/B,KAAK,YAAY,CAAC,qBAAqB,EAAE,CAAC;YACxC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC;gBAC/D,MAAM,IAAI,KAAK,CAAC,oCAAoC,GAAG,EAAE,CAAC,CAAC;YAC7D,CAAC;YACD,OAAO;gBACL,IAAI;gBACJ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;aACjC,CAAC;QACJ,CAAC;QACD,KAAK,YAAY,CAAC,oBAAoB,EAAE,CAAC;YACvC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC;gBAC/D,MAAM,IAAI,KAAK,CAAC,mCAAmC,GAAG,EAAE,CAAC,CAAC;YAC5D,CAAC;YACD,OAAO;gBACL,IAAI;gBACJ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;aACjC,CAAC;QACJ,CAAC;QAED;YACE,MAAM,IAAI,KAAK,CAAC,4BAA4B,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as SDK from '../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport type * as CrUXManager from '../../../models/crux-manager/crux-manager.js';\n\nimport type {TraceWindowMicro} from './Timing.js';\nimport type {Event, LegacyTimelineFrame, ProcessID, SampleIndex, ThreadID} from './TraceEvents.js';\n\nexport interface TraceFile {\n traceEvents: readonly Event[];\n metadata: MetaData;\n}\n\n// When a file is imported, it could have come from another tool which does not\n// define metadata.\ninterface TraceFileWithUnknownMetadata {\n traceEvents: readonly Event[];\n metadata?: MetaData;\n}\n\nexport interface Breadcrumb {\n window: TraceWindowMicro;\n child: Breadcrumb|null;\n}\n\nexport enum DataOrigin {\n CPU_PROFILE = 'CPUProfile',\n TRACE_EVENTS = 'TraceEvents',\n}\n\n/**\n * The Entries link can have 3 stated:\n * 1. The Link creation is not started yet, meaning only the button that needs to be clicked to start creating the link is visible.\n * 2. Pending to event - the creation is started, but the entry that the link points to has not been chosen yet\n * 3. Link connected - final state, both entries present\n */\nexport enum EntriesLinkState {\n CREATION_NOT_STARTED = 'creation_not_started',\n PENDING_TO_EVENT = 'pending_to_event',\n CONNECTED = 'connected',\n}\n\nexport enum EventKeyType {\n RAW_EVENT = 'r',\n SYNTHETIC_EVENT = 's',\n PROFILE_CALL = 'p',\n LEGACY_TIMELINE_FRAME = 'l',\n LAYOUT_SHIFT_CLUSTER = 'c',\n}\n\n/**\n * Represents an object that is saved in the file when user created annotations in the timeline.\n *\n * Expected to add more annotations.\n */\nexport interface SerializedAnnotations {\n entryLabels: EntryLabelAnnotationSerialized[];\n labelledTimeRanges: TimeRangeAnnotationSerialized[];\n linksBetweenEntries: EntriesLinkAnnotationSerialized[];\n}\n\n/**\n * Represents an object that is used to store the Entry Label annotation that is created when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabelAnnotation {\n type: 'ENTRY_LABEL';\n entry: Event|LegacyTimelineFrame;\n label: string;\n}\n\n/**\n * Represents an object that is used to store the Labelled Time Range Annotation that is created when a user creates a Time Range Selection in the timeline.\n */\nexport interface TimeRangeAnnotation {\n type: 'TIME_RANGE';\n label: string;\n bounds: TraceWindowMicro;\n}\n\nexport interface EntriesLinkAnnotation {\n type: 'ENTRIES_LINK';\n state: EntriesLinkState;\n entryFrom: Event;\n entryTo?: Event;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabelAnnotationSerialized {\n entry: SerializableKey;\n label: string;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a time range with a label in the timeline.\n */\nexport interface TimeRangeAnnotationSerialized {\n bounds: TraceWindowMicro;\n label: string;\n}\n\n/**\n * Represents an object that is saved in the file when a user creates a link between entries in the timeline.\n */\nexport interface EntriesLinkAnnotationSerialized {\n entryFrom: SerializableKey;\n entryTo: SerializableKey;\n}\n\n/**\n * `Annotation` are the user-created annotations that are saved into the metadata.\n * Those annotations are rendered on the timeline by `Overlays.ts`\n *\n * TODO: Implement other OverlayAnnotations (annotated time ranges, links between entries).\n * TODO: Save/load overlay annotations to/from the trace file.\n */\nexport type Annotation = EntryLabelAnnotation|TimeRangeAnnotation|EntriesLinkAnnotation;\n\nexport function isTimeRangeAnnotation(annotation: Annotation): annotation is TimeRangeAnnotation {\n return annotation.type === 'TIME_RANGE';\n}\n\nexport function isEntryLabelAnnotation(annotation: Annotation): annotation is EntryLabelAnnotation {\n return annotation.type === 'ENTRY_LABEL';\n}\n\nexport function isEntriesLinkAnnotation(annotation: Annotation): annotation is EntriesLinkAnnotation {\n return annotation.type === 'ENTRIES_LINK';\n}\n\n/**\n * Serializable keys are created for trace events to be able to save\n * references to timeline events in a trace file. These keys enable\n * user modifications that can be saved. See go/cpq:event-data-json for\n * more details on the key format.\n **/\nexport type RawEventKey = `${EventKeyType.RAW_EVENT}-${number}`;\nexport type SyntheticEventKey = `${EventKeyType.SYNTHETIC_EVENT}-${number}`;\nexport type ProfileCallKey = `${EventKeyType.PROFILE_CALL}-${ProcessID}-${ThreadID}-${SampleIndex}-${Protocol.integer}`;\nexport type LegacyTimelineFrameKey = `${EventKeyType.LEGACY_TIMELINE_FRAME}-${number}`;\nexport type LayoutShiftClusterKey = `${EventKeyType.LAYOUT_SHIFT_CLUSTER}-${number}`;\nexport type SerializableKey = RawEventKey|ProfileCallKey|SyntheticEventKey|LegacyTimelineFrameKey|LayoutShiftClusterKey;\n\n/** Serializable keys values objects contain data that maps the keys to original Trace Events **/\nexport interface RawEventKeyValues {\n type: EventKeyType.RAW_EVENT;\n rawIndex: number;\n}\n\nexport interface SyntheticEventKeyValues {\n type: EventKeyType.SYNTHETIC_EVENT;\n rawIndex: number;\n}\n\nexport interface ProfileCallKeyValues {\n type: EventKeyType.PROFILE_CALL;\n processID: ProcessID;\n threadID: ThreadID;\n sampleIndex: SampleIndex;\n protocol: Protocol.integer;\n}\n\nexport interface LegacyTimelineFrameKeyValues {\n type: EventKeyType.LEGACY_TIMELINE_FRAME;\n rawIndex: number;\n}\n\nexport interface LayoutShiftClusterKeyValues {\n type: EventKeyType.LAYOUT_SHIFT_CLUSTER;\n // The raw event index of the first layout shift in the cluster.\n rawIndex: number;\n}\n\nexport type SerializableKeyValues = RawEventKeyValues|ProfileCallKeyValues|SyntheticEventKeyValues|\n LegacyTimelineFrameKeyValues|LayoutShiftClusterKeyValues;\n\nexport interface Modifications {\n entriesModifications: {\n // Entries hidden by the user\n hiddenEntries: SerializableKey[],\n // Entries that parent a hiddenEntry\n expandableEntries: SerializableKey[],\n };\n initialBreadcrumb: Breadcrumb;\n annotations: SerializedAnnotations;\n}\n\n/**\n * IMPORTANT: this is the same as PerfUI.FlameChart.PersistedGroupConfig\n * However, the PerfUI code should not depend on the model/trace, and similarly\n * this model cannot depend on that code, so we duplicate it.\n **/\nexport interface TrackVisualConfig {\n hidden: boolean;\n expanded: boolean;\n originalIndex: number;\n visualIndex: number;\n trackName: string;\n}\n\n/**\n * Stores the visual config if the user has modified it. Split into \"main\" and\n * \"network\" so we can pass the relevant config into the right data provider.\n * NOTE: as of August 2025 (M141) we currently do not export this in new\n * traces, or use it if an existing trace is imported with it.\n */\nexport interface PersistedTraceVisualConfig {\n main: TrackVisualConfig[]|null;\n network: TrackVisualConfig[]|null;\n}\n\n/**\n * Trace metadata that we persist to the file. This will allow us to\n * store specifics for the trace, e.g., which tracks should be visible\n * on load.\n */\nexport interface MetaData {\n title?: string;\n source?: 'DevTools';\n startTime?: string;\n emulatedDeviceTitle?: string;\n // Only set if network throttling is active.\n networkThrottling?: string;\n // Only set if network throttling is active.\n networkThrottlingConditions?: Omit<SDK.NetworkManager.Conditions, 'title'>;\n // Only set if CPU throttling is active.\n cpuThrottling?: number;\n dataOrigin?: DataOrigin;\n enhancedTraceVersion?: number;\n modifications?: Modifications;\n cruxFieldData?: CrUXManager.PageResult[];\n /** Currently only stores JS maps, not CSS. This never stores data url source maps. */\n sourceMaps?: MetadataSourceMap[];\n /** Currently only stores HTML and CSS resources. */\n resources?: MetadataResource[];\n visualTrackConfig?: PersistedTraceVisualConfig;\n hostDPR?: number;\n}\n\nexport interface MetadataSourceMap {\n url: string;\n /** If not defined, then this was a data url. */\n sourceMapUrl?: string;\n sourceMap: SDK.SourceMap.SourceMapV3;\n}\n\nexport interface MetadataResource {\n url: string;\n frame: string;\n content: string;\n mimeType: string;\n}\n\nexport type Contents = TraceFileWithUnknownMetadata|Event[];\n\nexport function traceEventKeyToValues(key: SerializableKey): SerializableKeyValues {\n const parts = key.split('-');\n const type = parts[0];\n\n switch (type) {\n case EventKeyType.PROFILE_CALL:\n if (parts.length !== 5 ||\n !(parts.every((part, i) => i === 0 || typeof part === 'number' || !isNaN(parseInt(part, 10))))) {\n throw new Error(`Invalid ProfileCallKey: ${key}`);\n }\n return {\n type: parts[0],\n processID: parseInt(parts[1], 10),\n threadID: parseInt(parts[2], 10),\n sampleIndex: parseInt(parts[3], 10),\n protocol: parseInt(parts[4], 10),\n } as ProfileCallKeyValues;\n case EventKeyType.RAW_EVENT:\n if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {\n throw new Error(`Invalid RawEvent Key: ${key}`);\n }\n return {\n type: parts[0],\n rawIndex: parseInt(parts[1], 10),\n } as RawEventKeyValues;\n case EventKeyType.SYNTHETIC_EVENT:\n if (parts.length !== 2 || !(typeof parts[1] === 'number' || !isNaN(parseInt(parts[1], 10)))) {\n throw new Error(`Invalid SyntheticEvent Key: ${key}`);\n }\n return {\n type: parts[0],\n rawIndex: parseInt(parts[1], 10),\n } as SyntheticEventKeyValues;\n case EventKeyType.LEGACY_TIMELINE_FRAME: {\n if (parts.length !== 2 || Number.isNaN(parseInt(parts[1], 10))) {\n throw new Error(`Invalid LegacyTimelineFrame Key: ${key}`);\n }\n return {\n type,\n rawIndex: parseInt(parts[1], 10),\n };\n }\n case EventKeyType.LAYOUT_SHIFT_CLUSTER: {\n if (parts.length !== 2 || Number.isNaN(parseInt(parts[1], 10))) {\n throw new Error(`Invalid LayoutShiftCluster Key: ${key}`);\n }\n return {\n type,\n rawIndex: parseInt(parts[1], 10),\n };\n }\n\n default:\n throw new Error(`Unknown trace event key: ${key}`);\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ // Copyright 2025 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ export {};
5
+ //# sourceMappingURL=Overlays.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Overlays.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Overlays.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B","sourcesContent":["// Copyright 2025 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type {EntriesLinkState} from './File.js';\nimport type {Micro, TraceWindowMicro} from './Timing.js';\nimport type {Event, LegacyTimelineFrame, PageLoadEvent} from './TraceEvents.js';\n\n/**\n * Represents which flamechart an entry is rendered in.\n * We need to know this because when we place an overlay for an entry we need\n * to adjust its Y value if it's in the main chart which is drawn below the\n * network chart\n */\nexport type EntryChartLocation = 'main'|'network';\n\n/**\n * You can add overlays to trace events, but also right now frames are drawn on\n * the timeline but they are not trace events, so we need to allow for that.\n * In the future when the frames track has been migrated to be powered by\n * animation frames (crbug.com/345144583), we can remove the requirement to\n * support TimelineFrame instances (which themselves will be removed from the\n * codebase.)\n */\nexport type OverlayEntry = Event|LegacyTimelineFrame;\n\n/**\n * Represents when a user has selected an entry in the timeline\n */\nexport interface EntrySelected {\n type: 'ENTRY_SELECTED';\n entry: OverlayEntry;\n}\n\n/**\n * Drawn around an entry when we want to highlight it to the user.\n */\nexport interface EntryOutline {\n type: 'ENTRY_OUTLINE';\n entry: OverlayEntry;\n outlineReason: 'ERROR'|'INFO';\n}\n\n/**\n * Represents an object created when a user creates a label for an entry in the timeline.\n */\nexport interface EntryLabel {\n type: 'ENTRY_LABEL';\n entry: OverlayEntry;\n label: string;\n}\n\nexport interface EntriesLink {\n type: 'ENTRIES_LINK';\n state: EntriesLinkState;\n entryFrom: OverlayEntry;\n entryTo?: OverlayEntry;\n}\n\n/**\n * Represents a time range on the trace. Also used when the user shift+clicks\n * and drags to create a time range.\n */\nexport interface TimeRangeLabel {\n type: 'TIME_RANGE';\n bounds: TraceWindowMicro;\n label: string;\n showDuration: boolean;\n}\n\n/**\n * Used to highlight with a red-candy stripe a time range. It takes an entry\n * because this entry is the row that will be used to place the candy stripe,\n * and its height will be set to the height of that row.\n */\nexport interface CandyStripedTimeRange {\n type: 'CANDY_STRIPED_TIME_RANGE';\n bounds: TraceWindowMicro;\n entry: Event;\n}\n\n/**\n * An EntryBreakdown, or section, that makes up a TimespanBreakdown.\n */\nexport interface TimespanBreakdownEntryBreakdown {\n bounds: TraceWindowMicro;\n label: string|object;\n showDuration: boolean;\n}\n\n/**\n * Represents a timespan on a trace broken down into parts. Each part has a label to it.\n * If an entry is defined, the breakdown will be vertically positioned based on it.\n */\nexport interface TimespanBreakdown {\n type: 'TIMESPAN_BREAKDOWN';\n sections: TimespanBreakdownEntryBreakdown[];\n entry?: Event;\n renderLocation?: 'BOTTOM_OF_TIMELINE'|'BELOW_EVENT'|'ABOVE_EVENT';\n}\n\nexport interface TimestampMarker {\n type: 'TIMESTAMP_MARKER';\n timestamp: Micro;\n}\n\n/**\n * Represents a timings marker. This has a line that runs up the whole canvas.\n * We can hold an array of entries, in the case we want to hold more than one with the same timestamp.\n * The adjusted timestamp being the timestamp for the event adjusted by closest navigation.\n */\nexport interface TimingsMarker {\n type: 'TIMINGS_MARKER';\n entries: PageLoadEvent[];\n entryToFieldResult: Map<PageLoadEvent, TimingsMarkerFieldResult>;\n adjustedTimestamp: Micro;\n}\n\nexport interface TimingsMarkerFieldResult {\n value: Micro;\n pageScope: 'url'|'origin';\n}\n\nexport interface BottomInfoBar {\n type: 'BOTTOM_INFO_BAR';\n // In DevTools, this infobar is a UI.Infobar.Infobar but we can't refer to\n // the type here.\n infobar: {\n element: object,\n dispose: () => void,\n };\n}\n\n/**\n * Marks a flame chart entry that has a comment thread, linked by ID to a\n * CommentThread in CommentManager. The overlay renders an invisible box sized\n * to the entry. The shared comments overlay draws the pin, highlight and popup\n * relative to that box.\n */\nexport interface CommentPin {\n type: 'COMMENT_PIN';\n entry: OverlayEntry;\n commentThreadId: string;\n}\n\n/**\n * All supported overlay types.\n */\nexport type Overlay = EntrySelected|EntryOutline|TimeRangeLabel|EntryLabel|EntriesLink|TimespanBreakdown|\n TimestampMarker|CandyStripedTimeRange|TimingsMarker|BottomInfoBar|CommentPin;\n"]}
@@ -0,0 +1,16 @@
1
+ // Copyright 2022 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ // eslint-disable-next-line @typescript-eslint/naming-convention
5
+ export function Micro(value) {
6
+ return value;
7
+ }
8
+ // eslint-disable-next-line @typescript-eslint/naming-convention
9
+ export function Milli(value) {
10
+ return value;
11
+ }
12
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
+ export function Seconds(value) {
14
+ return value;
15
+ }
16
+ //# sourceMappingURL=Timing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timing.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/types/Timing.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAG7B,gEAAgE;AAChE,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,KAAc,CAAC;AACxB,CAAC;AAGD,gEAAgE;AAChE,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,KAAc,CAAC;AACxB,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,OAAO,KAAgB,CAAC;AAC1B,CAAC","sourcesContent":["// Copyright 2022 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport type Micro = number&{_tag: 'MicroSeconds'};\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function Micro(value: number): Micro {\n return value as Micro;\n}\n\nexport type Milli = number&{_tag: 'MilliSeconds'};\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function Milli(value: number): Milli {\n return value as Milli;\n}\nexport type Seconds = number&{_tag: 'Seconds'};\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function Seconds(value: number): Seconds {\n return value as Seconds;\n}\n\nexport interface TraceWindow<TimeFormat extends Micro|Milli> {\n min: TimeFormat;\n max: TimeFormat;\n range: TimeFormat;\n}\n\n/** See front_end/models/trace/helpers/Timing.ts for helpful utility functions like traceWindowFromMicroSeconds **/\nexport type TraceWindowMicro = TraceWindow<Micro>;\nexport type TraceWindowMilli = TraceWindow<Milli>;\n"]}
@@ -840,10 +840,15 @@ export declare const NO_NAVIGATION = "NO_NAVIGATION";
840
840
  */
841
841
  export type NavigationId = string;
842
842
  /**
843
- * This is a synthetic Layout shift cluster. The rawSourceEvent is the worst layout shift event
844
- * in the cluster.
843
+ * This is a synthetic Layout shift cluster: a session window of layout shifts.
844
+ *
845
+ * Do not extend the SyntheticBased interface because a cluster is built from
846
+ * many layout shifts and doesn't have a raw trace event of its own. For the
847
+ * same reason, clusters are not registered with SyntheticEventsManager. Use
848
+ * `worstShiftEvent` to find the layout shift with the highest score in the
849
+ * cluster.
845
850
  */
846
- export interface SyntheticLayoutShiftCluster extends SyntheticBased<Phase.COMPLETE> {
851
+ export interface SyntheticLayoutShiftCluster extends Event {
847
852
  name: 'SyntheticLayoutShiftCluster';
848
853
  clusterWindow: TraceWindowMicro;
849
854
  clusterCumulativeScore: number;
@@ -1343,7 +1348,7 @@ interface ChromeFrameReporter {
1343
1348
  */
1344
1349
  high_latency_contribution_stage: string[];
1345
1350
  }
1346
- declare enum State {
1351
+ declare const enum State {
1347
1352
  /** The frame did not have any updates to present. **/
1348
1353
  STATE_NO_UPDATE_DESIRED = "STATE_NO_UPDATE_DESIRED",
1349
1354
  /**
@@ -1363,7 +1368,7 @@ declare enum State {
1363
1368
  */
1364
1369
  STATE_DROPPED = "STATE_DROPPED"
1365
1370
  }
1366
- declare enum FrameDropReason {
1371
+ declare const enum FrameDropReason {
1367
1372
  REASON_UNSPECIFIED = "REASON_UNSPECIFIED",
1368
1373
  /**
1369
1374
  * Frame was dropped by the display-compositor.
@@ -1384,14 +1389,14 @@ declare enum FrameDropReason {
1384
1389
  */
1385
1390
  REASON_CLIENT_COMPOSITOR = "REASON_CLIENT_COMPOSITOR"
1386
1391
  }
1387
- declare enum ScrollState {
1392
+ declare const enum ScrollState {
1388
1393
  SCROLL_NONE = "SCROLL_NONE",
1389
1394
  SCROLL_MAIN_THREAD = "SCROLL_MAIN_THREAD",
1390
1395
  SCROLL_COMPOSITOR_THREAD = "SCROLL_COMPOSITOR_THREAD",
1391
1396
  /** Used when it can't be determined whether a scroll is in progress or not. */
1392
1397
  SCROLL_UNKNOWN = "SCROLL_UNKNOWN"
1393
1398
  }
1394
- declare enum FrameType {
1399
+ declare const enum FrameType {
1395
1400
  FORKED = "FORKED",
1396
1401
  BACKFILL = "BACKFILL"
1397
1402
  }
@@ -2421,17 +2426,17 @@ export interface MarkerEvent extends Event {
2421
2426
  * to in multiple places.
2422
2427
  **/
2423
2428
  export declare const Categories: {
2424
- readonly Console: "blink.console";
2425
- readonly UserTiming: "blink.user_timing";
2426
- readonly Loading: "loading";
2429
+ readonly Console: 'blink.console';
2430
+ readonly UserTiming: 'blink.user_timing';
2431
+ readonly Loading: 'loading';
2427
2432
  };
2428
- export declare const DefaultCategories: readonly ["blink.console", "blink.user_timing", "loading", "devtools.timeline", "disabled-by-default-devtools.target-rundown", "disabled-by-default-devtools.timeline.frame", "disabled-by-default-devtools.timeline.stack", "disabled-by-default-devtools.timeline", "disabled-by-default-devtools.v8-source-rundown-sources", "disabled-by-default-devtools.v8-source-rundown", "disabled-by-default-layout_shift.debug", "disabled-by-default-v8.inspector", "disabled-by-default-v8.cpu_profiler.hires", "disabled-by-default-lighthouse", "v8.execute", "v8", "cppgc", "navigation,rail"];
2433
+ export declare const DefaultCategories: readonly ['blink.console', 'blink.user_timing', 'loading', 'devtools.timeline', 'disabled-by-default-devtools.target-rundown', 'disabled-by-default-devtools.timeline.frame', 'disabled-by-default-devtools.timeline.stack', 'disabled-by-default-devtools.timeline', 'disabled-by-default-devtools.v8-source-rundown-sources', 'disabled-by-default-devtools.v8-source-rundown', 'disabled-by-default-layout_shift.debug', 'disabled-by-default-v8.inspector', 'disabled-by-default-v8.cpu_profiler.hires', 'disabled-by-default-lighthouse', 'v8.execute', 'v8', 'cppgc', 'navigation,rail'];
2429
2434
  export declare const OptionalCategories: {
2430
- readonly JsSampling: readonly ["disabled-by-default-v8.cpu_profiler"];
2431
- readonly InvalidationTracking: readonly ["disabled-by-default-devtools.timeline.invalidationTracking"];
2432
- readonly AdvancedPaint: readonly ["disabled-by-default-devtools.timeline.layers", "disabled-by-default-devtools.timeline.picture", "disabled-by-default-blink.graphics_context_annotations"];
2433
- readonly Screenshot: readonly ["disabled-by-default-devtools.screenshot"];
2434
- readonly CssSelectorStats: readonly ["disabled-by-default-blink.debug", "disabled-by-default-devtools.timeline.invalidationTracking"];
2435
+ readonly JsSampling: readonly ['disabled-by-default-v8.cpu_profiler'];
2436
+ readonly InvalidationTracking: readonly ['disabled-by-default-devtools.timeline.invalidationTracking'];
2437
+ readonly AdvancedPaint: readonly ['disabled-by-default-devtools.timeline.layers', 'disabled-by-default-devtools.timeline.picture', 'disabled-by-default-blink.graphics_context_annotations'];
2438
+ readonly Screenshot: readonly ['disabled-by-default-devtools.screenshot'];
2439
+ readonly CssSelectorStats: readonly ['disabled-by-default-blink.debug', 'disabled-by-default-devtools.timeline.invalidationTracking'];
2435
2440
  };
2436
2441
  /**
2437
2442
  * The frames implementation in handlers/FramesHandler is considered "legacy"