@nimbus21.ai/chrome-devtools-mcp 0.6.3 → 0.12.2

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 (621) hide show
  1. package/README.md +311 -26
  2. package/build/src/DevToolsConnectionAdapter.js +69 -0
  3. package/build/src/DevtoolsUtils.js +208 -0
  4. package/build/src/McpContext.js +247 -50
  5. package/build/src/McpResponse.js +211 -48
  6. package/build/src/PageCollector.js +247 -33
  7. package/build/src/WaitForHelper.js +5 -0
  8. package/build/src/browser.js +97 -33
  9. package/build/src/cli.js +139 -16
  10. package/build/src/formatters/consoleFormatter.js +108 -60
  11. package/build/src/formatters/networkFormatter.js +45 -2
  12. package/build/src/formatters/snapshotFormatter.js +57 -59
  13. package/build/src/issue-descriptions.js +39 -0
  14. package/build/src/logger.js +1 -1
  15. package/build/src/main.js +68 -68
  16. package/build/src/polyfill.js +2 -2
  17. package/build/src/third_party/THIRD_PARTY_NOTICES +2010 -0
  18. package/build/src/third_party/devtools.js +6 -0
  19. package/build/src/third_party/index.js +171065 -0
  20. package/build/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  21. package/build/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +8 -0
  22. package/build/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  23. package/build/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +7 -0
  24. package/build/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  25. package/build/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +5 -0
  26. package/build/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  27. package/build/src/third_party/issue-descriptions/LowTextContrast.md +5 -0
  28. package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
  29. package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
  30. package/build/src/third_party/issue-descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
  31. package/build/src/third_party/issue-descriptions/SameSiteInvalidSameParty.md +8 -0
  32. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  33. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  34. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  35. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  36. package/build/src/third_party/issue-descriptions/SameSiteSamePartyCrossPartyContextSet.md +10 -0
  37. package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  38. package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  39. package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
  40. package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
  41. package/build/src/third_party/issue-descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
  42. package/build/src/third_party/issue-descriptions/arInsecureContext.md +7 -0
  43. package/build/src/third_party/issue-descriptions/arInvalidInfoHeader.md +5 -0
  44. package/build/src/third_party/issue-descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
  45. package/build/src/third_party/issue-descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
  46. package/build/src/third_party/issue-descriptions/arInvalidRegisterSourceHeader.md +5 -0
  47. package/build/src/third_party/issue-descriptions/arInvalidRegisterTriggerHeader.md +5 -0
  48. package/build/src/third_party/issue-descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +5 -0
  49. package/build/src/third_party/issue-descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +6 -0
  50. package/build/src/third_party/issue-descriptions/arNoRegisterOsSourceHeader.md +5 -0
  51. package/build/src/third_party/issue-descriptions/arNoRegisterOsTriggerHeader.md +5 -0
  52. package/build/src/third_party/issue-descriptions/arNoRegisterSourceHeader.md +5 -0
  53. package/build/src/third_party/issue-descriptions/arNoRegisterTriggerHeader.md +5 -0
  54. package/build/src/third_party/issue-descriptions/arNoWebOrOsSupport.md +4 -0
  55. package/build/src/third_party/issue-descriptions/arOsSourceIgnored.md +18 -0
  56. package/build/src/third_party/issue-descriptions/arOsTriggerIgnored.md +19 -0
  57. package/build/src/third_party/issue-descriptions/arPermissionPolicyDisabled.md +8 -0
  58. package/build/src/third_party/issue-descriptions/arSourceAndTriggerHeaders.md +9 -0
  59. package/build/src/third_party/issue-descriptions/arSourceIgnored.md +13 -0
  60. package/build/src/third_party/issue-descriptions/arTriggerIgnored.md +12 -0
  61. package/build/src/third_party/issue-descriptions/arUntrustworthyReportingOrigin.md +10 -0
  62. package/build/src/third_party/issue-descriptions/arWebAndOsHeaders.md +11 -0
  63. package/build/src/third_party/issue-descriptions/bounceTrackingMitigations.md +3 -0
  64. package/build/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  65. package/build/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  66. package/build/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
  67. package/build/src/third_party/issue-descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +4 -0
  68. package/build/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +11 -0
  69. package/build/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +8 -0
  70. package/build/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +7 -0
  71. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
  72. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
  73. package/build/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +11 -0
  74. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +4 -0
  75. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +4 -0
  76. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
  77. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
  78. package/build/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +6 -0
  79. package/build/src/third_party/issue-descriptions/corsDisabledScheme.md +7 -0
  80. package/build/src/third_party/issue-descriptions/corsDisallowedByMode.md +7 -0
  81. package/build/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  82. package/build/src/third_party/issue-descriptions/corsInsecurePrivateNetwork.md +10 -0
  83. package/build/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +7 -0
  84. package/build/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
  85. package/build/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  86. package/build/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  87. package/build/src/third_party/issue-descriptions/corsOriginMismatch.md +6 -0
  88. package/build/src/third_party/issue-descriptions/corsPreflightAllowPrivateNetworkError.md +10 -0
  89. package/build/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +5 -0
  90. package/build/src/third_party/issue-descriptions/corsPrivateNetworkPermissionDenied.md +10 -0
  91. package/build/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +5 -0
  92. package/build/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +8 -0
  93. package/build/src/third_party/issue-descriptions/cspEvalViolation.md +9 -0
  94. package/build/src/third_party/issue-descriptions/cspInlineViolation.md +10 -0
  95. package/build/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  96. package/build/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +8 -0
  97. package/build/src/third_party/issue-descriptions/cspURLViolation.md +10 -0
  98. package/build/src/third_party/issue-descriptions/deprecation.md +3 -0
  99. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  100. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  101. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  102. package/build/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  103. package/build/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +1 -0
  104. package/build/src/third_party/issue-descriptions/federatedAuthRequestClientMetadataHttpNotFound.md +1 -0
  105. package/build/src/third_party/issue-descriptions/federatedAuthRequestClientMetadataInvalidResponse.md +1 -0
  106. package/build/src/third_party/issue-descriptions/federatedAuthRequestClientMetadataNoResponse.md +1 -0
  107. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  108. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  109. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  110. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  111. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  112. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  113. package/build/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  114. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  115. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  116. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  117. package/build/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  118. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  119. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  120. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  121. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  122. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  123. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  124. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  125. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  126. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  127. package/build/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +7 -0
  128. package/build/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +8 -0
  129. package/build/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  130. package/build/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +5 -0
  131. package/build/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  132. package/build/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  133. package/build/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  134. package/build/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +5 -0
  135. package/build/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  136. package/build/src/third_party/issue-descriptions/genericFormLabelForNameError.md +5 -0
  137. package/build/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +5 -0
  138. package/build/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
  139. package/build/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +4 -0
  140. package/build/src/third_party/issue-descriptions/heavyAd.md +10 -0
  141. package/build/src/third_party/issue-descriptions/mixedContent.md +5 -0
  142. package/build/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +5 -0
  143. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +7 -0
  144. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
  145. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
  146. package/build/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
  147. package/build/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +5 -0
  148. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +5 -0
  149. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +5 -0
  150. package/build/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +5 -0
  151. package/build/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
  152. package/build/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +5 -0
  153. package/build/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +5 -0
  154. package/build/src/third_party/issue-descriptions/permissionElementInvalidType.md +5 -0
  155. package/build/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +5 -0
  156. package/build/src/third_party/issue-descriptions/permissionElementLowContrast.md +5 -0
  157. package/build/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +5 -0
  158. package/build/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
  159. package/build/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +6 -0
  160. package/build/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
  161. package/build/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +5 -0
  162. package/build/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +5 -0
  163. package/build/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +5 -0
  164. package/build/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +5 -0
  165. package/build/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +7 -0
  166. package/build/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
  167. package/build/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +3 -0
  168. package/build/src/third_party/issue-descriptions/propertyRuleIssue.md +7 -0
  169. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
  170. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
  171. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
  172. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
  173. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
  174. package/build/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
  175. package/build/src/third_party/issue-descriptions/sharedArrayBuffer.md +7 -0
  176. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
  177. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
  178. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
  179. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
  180. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
  181. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
  182. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
  183. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
  184. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
  185. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
  186. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
  187. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  188. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
  189. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
  190. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  191. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
  192. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
  193. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
  194. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
  195. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
  196. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
  197. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
  198. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
  199. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
  200. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
  201. package/build/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +14 -0
  202. package/build/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +15 -0
  203. package/build/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +8 -0
  204. package/build/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +7 -0
  205. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
  206. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
  207. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
  208. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
  209. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
  210. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
  211. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
  212. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
  213. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
  214. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
  215. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
  216. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
  217. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
  218. package/build/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +10 -0
  219. package/build/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +5 -0
  220. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +6 -0
  221. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +11 -0
  222. package/build/src/third_party/issue-descriptions/stylesheetLateImport.md +4 -0
  223. package/build/src/third_party/issue-descriptions/stylesheetRequestFailed.md +3 -0
  224. package/build/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
  225. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
  226. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +17 -0
  227. package/build/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +14 -0
  228. package/build/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
  229. package/build/src/tools/ToolDefinition.js +2 -2
  230. package/build/src/tools/categories.js +17 -9
  231. package/build/src/tools/console.js +73 -7
  232. package/build/src/tools/emulation.js +64 -38
  233. package/build/src/tools/input.js +113 -46
  234. package/build/src/tools/network.js +44 -14
  235. package/build/src/tools/pages.js +84 -52
  236. package/build/src/tools/performance.js +14 -12
  237. package/build/src/tools/screenshot.js +14 -11
  238. package/build/src/tools/script.js +29 -15
  239. package/build/src/tools/snapshot.js +27 -23
  240. package/build/src/tools/tools.js +29 -0
  241. package/build/src/trace-processing/parse.js +17 -26
  242. package/build/src/utils/keyboard.js +296 -0
  243. package/build/src/utils/types.js +6 -0
  244. package/package.json +34 -25
  245. package/build/node_modules/chrome-devtools-frontend/LICENSE +0 -27
  246. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/App.js +0 -4
  247. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/AppProvider.js +0 -17
  248. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Base64.js +0 -43
  249. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/CharacterIdMap.js +0 -27
  250. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Color.js +0 -2029
  251. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ColorConverter.js +0 -330
  252. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ColorUtils.js +0 -221
  253. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Console.js +0 -86
  254. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Debouncer.js +0 -14
  255. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/EventTarget.js +0 -14
  256. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Gzip.js +0 -64
  257. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/JavaScriptMetaData.js +0 -4
  258. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Lazy.js +0 -29
  259. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Linkifier.js +0 -34
  260. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/MapWithDefault.js +0 -20
  261. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Mutex.js +0 -49
  262. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Object.js +0 -86
  263. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ParsedURL.js +0 -459
  264. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Progress.js +0 -144
  265. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/QueryParamHandler.js +0 -4
  266. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ResolverBase.js +0 -69
  267. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ResourceType.js +0 -506
  268. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ReturnToPanel.js +0 -13
  269. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Revealer.js +0 -159
  270. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Runnable.js +0 -24
  271. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/SegmentedRange.js +0 -79
  272. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/SettingRegistration.js +0 -164
  273. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Settings.js +0 -1252
  274. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/SimpleHistoryManager.js +0 -97
  275. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/StringOutputStream.js +0 -17
  276. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/TextDictionary.js +0 -40
  277. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Throttler.js +0 -71
  278. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Trie.js +0 -127
  279. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Worker.js +0 -44
  280. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/common.js +0 -44
  281. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/AidaClient.js +0 -415
  282. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/GdpClient.js +0 -186
  283. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/InspectorFrontendHost.js +0 -513
  284. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/InspectorFrontendHostAPI.js +0 -66
  285. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/Platform.js +0 -59
  286. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/ResourceLoader.js +0 -232
  287. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/UserMetrics.js +0 -957
  288. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/host.js +0 -12
  289. package/build/node_modules/chrome-devtools-frontend/front_end/core/i18n/i18n.js +0 -60
  290. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/ArrayUtilities.js +0 -199
  291. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/Brand.js +0 -4
  292. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/Constructor.js +0 -4
  293. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/DOMUtilities.js +0 -122
  294. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/DateUtilities.js +0 -13
  295. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/DevToolsPath.js +0 -27
  296. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/KeyboardUtilities.js +0 -21
  297. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/MapUtilities.js +0 -79
  298. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/MimeType.js +0 -143
  299. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/NumberUtilities.js +0 -72
  300. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/StringUtilities.js +0 -536
  301. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/Timing.js +0 -9
  302. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/TypedArrayUtilities.js +0 -157
  303. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/TypescriptUtilities.js +0 -24
  304. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/UIString.js +0 -4
  305. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/UserVisibleError.js +0 -22
  306. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/platform.js +0 -26
  307. package/build/node_modules/chrome-devtools-frontend/front_end/core/protocol_client/InspectorBackend.js +0 -802
  308. package/build/node_modules/chrome-devtools-frontend/front_end/core/protocol_client/NodeURL.js +0 -31
  309. package/build/node_modules/chrome-devtools-frontend/front_end/core/protocol_client/protocol_client.js +0 -13
  310. package/build/node_modules/chrome-devtools-frontend/front_end/core/root/Runtime.js +0 -4
  311. package/build/node_modules/chrome-devtools-frontend/front_end/core/root/root.js +0 -5
  312. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/AccessibilityModel.js +0 -281
  313. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/AnimationModel.js +0 -846
  314. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/AutofillModel.js +0 -155
  315. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CPUProfilerModel.js +0 -99
  316. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CPUThrottlingManager.js +0 -220
  317. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSContainerQuery.js +0 -98
  318. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSFontFace.js +0 -31
  319. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSLayer.js +0 -22
  320. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSMatchedStyles.js +0 -1284
  321. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSMedia.js +0 -100
  322. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSMetadata.js +0 -1518
  323. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSModel.js +0 -908
  324. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSProperty.js +0 -315
  325. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSPropertyParser.js +0 -572
  326. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSPropertyParserMatchers.js +0 -1336
  327. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSQuery.js +0 -53
  328. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSRule.js +0 -365
  329. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSScope.js +0 -22
  330. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSStartingStyle.js +0 -21
  331. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSStyleDeclaration.js +0 -275
  332. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSStyleSheetHeader.js +0 -166
  333. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSSupports.js +0 -24
  334. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CategorizedBreakpoint.js +0 -29
  335. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ChildTargetManager.js +0 -232
  336. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CompilerSourceMappingContentProvider.js +0 -47
  337. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Connections.js +0 -242
  338. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ConsoleModel.js +0 -629
  339. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ConsoleModelTypes.js +0 -14
  340. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Cookie.js +0 -241
  341. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CookieModel.js +0 -198
  342. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CookieParser.js +0 -163
  343. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/DOMDebuggerModel.js +0 -597
  344. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/DOMModel.js +0 -1628
  345. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/DebuggerModel.js +0 -1231
  346. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/EmulationModel.js +0 -527
  347. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/EnhancedTracesParser.js +0 -350
  348. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/EventBreakpointsModel.js +0 -125
  349. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/FrameAssociated.js +0 -4
  350. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/FrameManager.js +0 -199
  351. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/HeapProfilerModel.js +0 -130
  352. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/HttpReasonPhraseStrings.js +0 -73
  353. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/IOModel.js +0 -83
  354. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/IsolateManager.js +0 -208
  355. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/IssuesModel.js +0 -41
  356. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/LayerTreeBase.js +0 -95
  357. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/LogModel.js +0 -34
  358. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/NetworkManager.js +0 -1916
  359. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/NetworkRequest.js +0 -1668
  360. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/OverlayColorGenerator.js +0 -48
  361. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/OverlayModel.js +0 -765
  362. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/OverlayPersistentHighlighter.js +0 -384
  363. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PageLoad.js +0 -25
  364. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PageResourceLoader.js +0 -300
  365. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PaintProfiler.js +0 -67
  366. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PerformanceMetricsModel.js +0 -62
  367. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PreloadingModel.js +0 -563
  368. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/RehydratingConnection.js +0 -290
  369. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/RehydratingObject.js +0 -4
  370. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/RemoteObject.js +0 -905
  371. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Resource.js +0 -163
  372. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ResourceTreeModel.js +0 -922
  373. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/RuntimeModel.js +0 -535
  374. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SDKModel.js +0 -45
  375. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ScreenCaptureModel.js +0 -174
  376. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Script.js +0 -395
  377. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SecurityOriginManager.js +0 -54
  378. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ServerSentEvents.js +0 -67
  379. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ServerSentEventsProtocol.js +0 -110
  380. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ServerTiming.js +0 -216
  381. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ServiceWorkerCacheModel.js +0 -271
  382. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ServiceWorkerManager.js +0 -511
  383. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMap.js +0 -651
  384. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapCache.js +0 -41
  385. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapFunctionRanges.js +0 -132
  386. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapManager.js +0 -189
  387. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapScopeChainEntry.js +0 -156
  388. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapScopesInfo.js +0 -276
  389. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/StorageBucketsModel.js +0 -143
  390. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/StorageKeyManager.js +0 -53
  391. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Target.js +0 -262
  392. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/TargetManager.js +0 -386
  393. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/TraceObject.js +0 -52
  394. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/WebAuthnModel.js +0 -66
  395. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/sdk-meta.js +0 -1117
  396. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/sdk.js +0 -90
  397. package/build/node_modules/chrome-devtools-frontend/front_end/generated/ARIAProperties.js +0 -1513
  398. package/build/node_modules/chrome-devtools-frontend/front_end/generated/Deprecation.js +0 -339
  399. package/build/node_modules/chrome-devtools-frontend/front_end/generated/InspectorBackendCommands.js +0 -1562
  400. package/build/node_modules/chrome-devtools-frontend/front_end/generated/SupportedCSSProperties.js +0 -7514
  401. package/build/node_modules/chrome-devtools-frontend/front_end/generated/protocol.js +0 -4
  402. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.js +0 -262
  403. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.js +0 -979
  404. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.js +0 -613
  405. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/data_formatters/UnitFormatters.js +0 -139
  406. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/performance/AICallTree.js +0 -372
  407. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/performance/AIContext.js +0 -132
  408. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/performance/AIQueries.js +0 -105
  409. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/CSSWorkspaceBinding.js +0 -243
  410. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/CompilerScriptMapping.js +0 -407
  411. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/ContentProviderBasedProject.js +0 -130
  412. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/DebuggerLanguagePlugins.js +0 -992
  413. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/DebuggerWorkspaceBinding.js +0 -574
  414. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/DefaultScriptMapping.js +0 -112
  415. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/FileUtils.js +0 -186
  416. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/LiveLocation.js +0 -60
  417. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/NetworkProject.js +0 -107
  418. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/PresentationConsoleMessageHelper.js +0 -244
  419. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/ResourceMapping.js +0 -473
  420. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/ResourceScriptMapping.js +0 -399
  421. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/ResourceUtils.js +0 -87
  422. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/SASSSourceMapping.js +0 -181
  423. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/StylesSourceMapping.js +0 -268
  424. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/TempFile.js +0 -55
  425. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/bindings.js +0 -20
  426. package/build/node_modules/chrome-devtools-frontend/front_end/models/cpu_profile/CPUProfileDataModel.js +0 -514
  427. package/build/node_modules/chrome-devtools-frontend/front_end/models/cpu_profile/ProfileTreeModel.js +0 -90
  428. package/build/node_modules/chrome-devtools-frontend/front_end/models/cpu_profile/cpu_profile.js +0 -6
  429. package/build/node_modules/chrome-devtools-frontend/front_end/models/crux-manager/CrUXManager.js +0 -283
  430. package/build/node_modules/chrome-devtools-frontend/front_end/models/crux-manager/crux-manager.js +0 -4
  431. package/build/node_modules/chrome-devtools-frontend/front_end/models/emulation/DeviceModeModel.js +0 -775
  432. package/build/node_modules/chrome-devtools-frontend/front_end/models/emulation/EmulatedDevices.js +0 -1706
  433. package/build/node_modules/chrome-devtools-frontend/front_end/models/emulation/emulation.js +0 -6
  434. package/build/node_modules/chrome-devtools-frontend/front_end/models/formatter/FormatterWorkerPool.js +0 -131
  435. package/build/node_modules/chrome-devtools-frontend/front_end/models/formatter/ScriptFormatter.js +0 -77
  436. package/build/node_modules/chrome-devtools-frontend/front_end/models/formatter/formatter.js +0 -6
  437. package/build/node_modules/chrome-devtools-frontend/front_end/models/geometry/GeometryImpl.js +0 -347
  438. package/build/node_modules/chrome-devtools-frontend/front_end/models/geometry/geometry.js +0 -4
  439. package/build/node_modules/chrome-devtools-frontend/front_end/models/logs/LogManager.js +0 -67
  440. package/build/node_modules/chrome-devtools-frontend/front_end/models/logs/NetworkLog.js +0 -494
  441. package/build/node_modules/chrome-devtools-frontend/front_end/models/logs/RequestResolver.js +0 -49
  442. package/build/node_modules/chrome-devtools-frontend/front_end/models/logs/logs-meta.js +0 -73
  443. package/build/node_modules/chrome-devtools-frontend/front_end/models/logs/logs.js +0 -7
  444. package/build/node_modules/chrome-devtools-frontend/front_end/models/network_time_calculator/Calculator.js +0 -4
  445. package/build/node_modules/chrome-devtools-frontend/front_end/models/network_time_calculator/NetworkTimeCalculator.js +0 -256
  446. package/build/node_modules/chrome-devtools-frontend/front_end/models/network_time_calculator/RequestTimeRanges.js +0 -120
  447. package/build/node_modules/chrome-devtools-frontend/front_end/models/network_time_calculator/network_time_calculator.js +0 -6
  448. package/build/node_modules/chrome-devtools-frontend/front_end/models/source_map_scopes/NamesResolver.js +0 -626
  449. package/build/node_modules/chrome-devtools-frontend/front_end/models/source_map_scopes/ScopeChainModel.js +0 -59
  450. package/build/node_modules/chrome-devtools-frontend/front_end/models/source_map_scopes/ScopeTreeCache.js +0 -32
  451. package/build/node_modules/chrome-devtools-frontend/front_end/models/source_map_scopes/source_map_scopes.js +0 -7
  452. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/StackTrace.js +0 -4
  453. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/StackTraceImpl.js +0 -67
  454. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/StackTraceModel.js +0 -97
  455. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/Trie.js +0 -113
  456. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/stack_trace.js +0 -5
  457. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/stack_trace_impl.js +0 -7
  458. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/CodeMirrorUtils.js +0 -32
  459. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/ContentData.js +0 -173
  460. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/ContentProvider.js +0 -30
  461. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/StaticContentProvider.js +0 -32
  462. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/StreamingContentData.js +0 -79
  463. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/Text.js +0 -69
  464. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/TextCursor.js +0 -35
  465. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/TextRange.js +0 -231
  466. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/TextUtils.js +0 -355
  467. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/WasmDisassembly.js +0 -68
  468. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/text_utils.js +0 -14
  469. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/EntityMapper.js +0 -122
  470. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/EventsSerializer.js +0 -81
  471. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/LanternComputationData.js +0 -370
  472. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/ModelImpl.js +0 -166
  473. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/Name.js +0 -114
  474. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/Processor.js +0 -555
  475. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/Styles.js +0 -815
  476. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/FilmStrip.js +0 -44
  477. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/MainThreadActivity.js +0 -76
  478. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/ScriptDuplication.js +0 -162
  479. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/StackTraceForEvent.js +0 -191
  480. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/ThirdParties.js +0 -118
  481. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/TraceFilter.js +0 -50
  482. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/TraceTree.js +0 -592
  483. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/extras.js +0 -10
  484. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/AnimationFramesHandler.js +0 -109
  485. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/AnimationHandler.js +0 -26
  486. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/AsyncJSCallsHandler.js +0 -187
  487. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/AuctionWorkletsHandler.js +0 -162
  488. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/DOMStatsHandler.js +0 -21
  489. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/ExtensionTraceDataHandler.js +0 -263
  490. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/FlowsHandler.js +0 -148
  491. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/FramesHandler.js +0 -483
  492. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/GPUHandler.js +0 -35
  493. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/ImagePaintingHandler.js +0 -147
  494. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/InitiatorsHandler.js +0 -180
  495. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/InvalidationsHandler.js +0 -126
  496. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/LargestImagePaintHandler.js +0 -85
  497. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/LargestTextPaintHandler.js +0 -27
  498. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/LayerTreeHandler.js +0 -103
  499. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/LayoutShiftsHandler.js +0 -445
  500. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/MemoryHandler.js +0 -21
  501. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/MetaHandler.js +0 -401
  502. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/ModelHandlers.js +0 -33
  503. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/NetworkRequestsHandler.js +0 -540
  504. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/PageFramesHandler.js +0 -42
  505. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/PageLoadMetricsHandler.js +0 -349
  506. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/RendererHandler.js +0 -346
  507. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/SamplesHandler.js +0 -207
  508. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/ScreenshotsHandler.js +0 -97
  509. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/ScriptsHandler.js +0 -252
  510. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/SelectorStatsHandler.js +0 -71
  511. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/Threads.js +0 -101
  512. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/UserInteractionsHandler.js +0 -317
  513. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/UserTimingsHandler.js +0 -183
  514. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/WarningsHandler.js +0 -134
  515. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/WorkersHandler.js +0 -33
  516. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/handlers.js +0 -7
  517. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/helpers.js +0 -163
  518. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/types.js +0 -1
  519. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/Extensions.js +0 -41
  520. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/Network.js +0 -102
  521. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/SamplesIntegrator.js +0 -495
  522. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/SyntheticEvents.js +0 -74
  523. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/Timing.js +0 -184
  524. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/Trace.js +0 -806
  525. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/TreeHelpers.js +0 -254
  526. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/helpers.js +0 -10
  527. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/CLSCulprits.js +0 -488
  528. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/Cache.js +0 -208
  529. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/Common.js +0 -340
  530. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/DOMSize.js +0 -180
  531. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/DocumentLatency.js +0 -257
  532. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/DuplicatedJavaScript.js +0 -89
  533. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/FontDisplay.js +0 -81
  534. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/ForcedReflow.js +0 -160
  535. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/INPBreakdown.js +0 -117
  536. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/ImageDelivery.js +0 -262
  537. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/LCPBreakdown.js +0 -188
  538. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/LCPDiscovery.js +0 -182
  539. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/LegacyJavaScript.js +0 -89
  540. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/Models.js +0 -21
  541. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/ModernHTTP.js +0 -199
  542. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/NetworkDependencyTree.js +0 -544
  543. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/RenderBlocking.js +0 -191
  544. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/SlowCSSSelector.js +0 -135
  545. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/Statistics.js +0 -92
  546. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/ThirdParties.js +0 -97
  547. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/Viewport.js +0 -101
  548. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/insights.js +0 -9
  549. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/types.js +0 -18
  550. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/core/LanternError.js +0 -6
  551. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/core/NetworkAnalyzer.js +0 -488
  552. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/core/core.js +0 -5
  553. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/graph/BaseNode.js +0 -276
  554. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/graph/CPUNode.js +0 -63
  555. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/graph/NetworkNode.js +0 -82
  556. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/graph/PageDependencyGraph.js +0 -551
  557. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/graph/graph.js +0 -7
  558. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/lantern.js +0 -9
  559. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/FirstContentfulPaint.js +0 -136
  560. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/Interactive.js +0 -67
  561. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/LargestContentfulPaint.js +0 -68
  562. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/MaxPotentialFID.js +0 -48
  563. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/Metric.js +0 -68
  564. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/SpeedIndex.js +0 -101
  565. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/TBTUtils.js +0 -64
  566. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/TotalBlockingTime.js +0 -78
  567. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/metrics.js +0 -11
  568. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/ConnectionPool.js +0 -115
  569. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/Constants.js +0 -42
  570. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/DNSCache.js +0 -47
  571. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/SimulationTimingMap.js +0 -134
  572. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/Simulator.js +0 -450
  573. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/TCPConnection.js +0 -154
  574. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/simulation.js +0 -9
  575. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/types/Lantern.js +0 -24
  576. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/types/types.js +0 -4
  577. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/trace.js +0 -17
  578. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/Configuration.js +0 -18
  579. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/Extensions.js +0 -37
  580. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/File.js +0 -57
  581. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/Overlays.js +0 -4
  582. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/Timing.js +0 -15
  583. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/TraceEvents.js +0 -574
  584. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/types.js +0 -9
  585. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace_source_maps_resolver/SourceMapsResolver.js +0 -201
  586. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.js +0 -4
  587. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/FileManager.js +0 -64
  588. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/IgnoreListManager.js +0 -511
  589. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/SearchConfig.js +0 -113
  590. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/UISourceCode.js +0 -563
  591. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/WorkspaceImpl.js +0 -204
  592. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/workspace.js +0 -9
  593. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/codemirror.next/codemirror.next.js +0 -1
  594. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/legacy-javascript/LICENSE +0 -202
  595. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/legacy-javascript/legacy-javascript.js +0 -2
  596. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +0 -940
  597. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/LICENSE +0 -26
  598. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +0 -196
  599. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +0 -226
  600. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/codec.js +0 -4
  601. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +0 -394
  602. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +0 -24
  603. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +0 -283
  604. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/mod.js +0 -7
  605. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/util.js +0 -9
  606. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +0 -84
  607. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/source-map-scopes-codec.js +0 -4
  608. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/LICENSE +0 -20
  609. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/lib/nostats-subset.js +0 -146
  610. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/httparchive-nostats-subset.js +0 -2
  611. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/httparchive-subset.js +0 -2
  612. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +0 -118
  613. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +0 -40
  614. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/entities.test.js +0 -26
  615. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/index.js +0 -4
  616. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/index.test.js +0 -215
  617. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.js +0 -4
  618. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/subsets/httparchive.js +0 -4
  619. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/subsets/nostats.js +0 -4
  620. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/nostats-subset.js +0 -2
  621. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/third-party-web.js +0 -2
@@ -1,846 +0,0 @@
1
- // Copyright 2014 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
- import * as Common from '../../core/common/common.js';
5
- import { DeferredDOMNode } from './DOMModel.js';
6
- import { RemoteObject } from './RemoteObject.js';
7
- import { Events as ResourceTreeModelEvents, ResourceTreeModel } from './ResourceTreeModel.js';
8
- import { Events as RuntimeModelEvents, RuntimeModel } from './RuntimeModel.js';
9
- import { SDKModel } from './SDKModel.js';
10
- const DEVTOOLS_ANIMATIONS_WORLD_NAME = 'devtools_animations';
11
- const REPORT_SCROLL_POSITION_BINDING_NAME = '__devtools_report_scroll_position__';
12
- const getScrollListenerNameInPage = (id) => `__devtools_scroll_listener_${id}__`;
13
- async function resolveToObjectInWorld(domNode, worldName) {
14
- const resourceTreeModel = domNode.domModel().target().model(ResourceTreeModel);
15
- const pageAgent = domNode.domModel().target().pageAgent();
16
- for (const frame of resourceTreeModel.frames()) {
17
- // This returns previously created world if it exists for the frame.
18
- const { executionContextId } = await pageAgent.invoke_createIsolatedWorld({ frameId: frame.id, worldName });
19
- const object = await domNode.resolveToObject(undefined, executionContextId);
20
- if (object) {
21
- return object;
22
- }
23
- }
24
- return null;
25
- }
26
- /**
27
- * Provides an extension over `DOMNode` that gives it additional
28
- * capabilities for animation debugging, mainly:
29
- * - getting a node's scroll information (scroll offsets and scroll range).
30
- * - updating a node's scroll offset.
31
- * - tracking the node's scroll offsets with event listeners.
32
- *
33
- * It works by running functions on the target page, see `DOMNode`s `callFunction` method
34
- * for more details on how a function is called on the target page.
35
- *
36
- * For listening to events on the target page and getting notified on the devtools frontend
37
- * side, we're adding a binding to the page `__devtools_report_scroll_position__` in a world `devtools_animation`
38
- * we've created. Then, we're setting scroll listeners of the `node` in the same world which calls the binding
39
- * itself with the scroll offsets.
40
- */
41
- export class AnimationDOMNode {
42
- #domNode;
43
- #scrollListenersById = new Map();
44
- #scrollBindingListener;
45
- static lastAddedListenerId = 0;
46
- constructor(domNode) {
47
- this.#domNode = domNode;
48
- }
49
- async #addReportScrollPositionBinding() {
50
- // The binding is already added so we don't need to add it again.
51
- if (this.#scrollBindingListener) {
52
- return;
53
- }
54
- this.#scrollBindingListener = ev => {
55
- const { name, payload } = ev.data;
56
- if (name !== REPORT_SCROLL_POSITION_BINDING_NAME) {
57
- return;
58
- }
59
- const { scrollTop, scrollLeft, id } = JSON.parse(payload);
60
- const scrollListener = this.#scrollListenersById.get(id);
61
- if (!scrollListener) {
62
- return;
63
- }
64
- scrollListener({ scrollTop, scrollLeft });
65
- };
66
- const runtimeModel = this.#domNode.domModel().target().model(RuntimeModel);
67
- await runtimeModel.addBinding({
68
- name: REPORT_SCROLL_POSITION_BINDING_NAME,
69
- executionContextName: DEVTOOLS_ANIMATIONS_WORLD_NAME,
70
- });
71
- runtimeModel.addEventListener(RuntimeModelEvents.BindingCalled, this.#scrollBindingListener);
72
- }
73
- async #removeReportScrollPositionBinding() {
74
- // There isn't any binding added yet.
75
- if (!this.#scrollBindingListener) {
76
- return;
77
- }
78
- const runtimeModel = this.#domNode.domModel().target().model(RuntimeModel);
79
- await runtimeModel.removeBinding({
80
- name: REPORT_SCROLL_POSITION_BINDING_NAME,
81
- });
82
- runtimeModel.removeEventListener(RuntimeModelEvents.BindingCalled, this.#scrollBindingListener);
83
- this.#scrollBindingListener = undefined;
84
- }
85
- async addScrollEventListener(onScroll) {
86
- AnimationDOMNode.lastAddedListenerId++;
87
- const id = AnimationDOMNode.lastAddedListenerId;
88
- this.#scrollListenersById.set(id, onScroll);
89
- // Add the binding for reporting scroll events from the page if it doesn't exist.
90
- if (!this.#scrollBindingListener) {
91
- await this.#addReportScrollPositionBinding();
92
- }
93
- const object = await resolveToObjectInWorld(this.#domNode, DEVTOOLS_ANIMATIONS_WORLD_NAME);
94
- if (!object) {
95
- return null;
96
- }
97
- await object.callFunction(scrollListenerInPage, [
98
- id,
99
- REPORT_SCROLL_POSITION_BINDING_NAME,
100
- getScrollListenerNameInPage(id),
101
- ].map(arg => RemoteObject.toCallArgument(arg)));
102
- object.release();
103
- return id;
104
- function scrollListenerInPage(id, reportScrollPositionBindingName, scrollListenerNameInPage) {
105
- if ('scrollingElement' in this && !this.scrollingElement) {
106
- return;
107
- }
108
- const scrollingElement = ('scrollingElement' in this ? this.scrollingElement : this);
109
- // @ts-expect-error We're setting a custom field on `Element` or `Document` for retaining the function on the page.
110
- this[scrollListenerNameInPage] = () => {
111
- // @ts-expect-error `reportScrollPosition` binding is injected to the page before calling the function.
112
- globalThis[reportScrollPositionBindingName](JSON.stringify({ scrollTop: scrollingElement.scrollTop, scrollLeft: scrollingElement.scrollLeft, id }));
113
- };
114
- // @ts-expect-error We've already defined the function used below.
115
- this.addEventListener('scroll', this[scrollListenerNameInPage], true);
116
- }
117
- }
118
- async removeScrollEventListener(id) {
119
- const object = await resolveToObjectInWorld(this.#domNode, DEVTOOLS_ANIMATIONS_WORLD_NAME);
120
- if (!object) {
121
- return;
122
- }
123
- await object.callFunction(removeScrollListenerInPage, [getScrollListenerNameInPage(id)].map(arg => RemoteObject.toCallArgument(arg)));
124
- object.release();
125
- this.#scrollListenersById.delete(id);
126
- // There aren't any scroll listeners remained on the page
127
- // so we remove the binding.
128
- if (this.#scrollListenersById.size === 0) {
129
- await this.#removeReportScrollPositionBinding();
130
- }
131
- function removeScrollListenerInPage(scrollListenerNameInPage) {
132
- // @ts-expect-error We've already set this custom field while adding scroll listener.
133
- this.removeEventListener('scroll', this[scrollListenerNameInPage]);
134
- // @ts-expect-error We've already set this custom field while adding scroll listener.
135
- delete this[scrollListenerNameInPage];
136
- }
137
- }
138
- async scrollTop() {
139
- return await this.#domNode.callFunction(scrollTopInPage).then(res => res?.value ?? null);
140
- function scrollTopInPage() {
141
- if ('scrollingElement' in this) {
142
- if (!this.scrollingElement) {
143
- return 0;
144
- }
145
- return this.scrollingElement.scrollTop;
146
- }
147
- return this.scrollTop;
148
- }
149
- }
150
- async scrollLeft() {
151
- return await this.#domNode.callFunction(scrollLeftInPage).then(res => res?.value ?? null);
152
- function scrollLeftInPage() {
153
- if ('scrollingElement' in this) {
154
- if (!this.scrollingElement) {
155
- return 0;
156
- }
157
- return this.scrollingElement.scrollLeft;
158
- }
159
- return this.scrollLeft;
160
- }
161
- }
162
- async setScrollTop(offset) {
163
- await this.#domNode.callFunction(setScrollTopInPage, [offset]);
164
- function setScrollTopInPage(offsetInPage) {
165
- if ('scrollingElement' in this) {
166
- if (!this.scrollingElement) {
167
- return;
168
- }
169
- this.scrollingElement.scrollTop = offsetInPage;
170
- }
171
- else {
172
- this.scrollTop = offsetInPage;
173
- }
174
- }
175
- }
176
- async setScrollLeft(offset) {
177
- await this.#domNode.callFunction(setScrollLeftInPage, [offset]);
178
- function setScrollLeftInPage(offsetInPage) {
179
- if ('scrollingElement' in this) {
180
- if (!this.scrollingElement) {
181
- return;
182
- }
183
- this.scrollingElement.scrollLeft = offsetInPage;
184
- }
185
- else {
186
- this.scrollLeft = offsetInPage;
187
- }
188
- }
189
- }
190
- async verticalScrollRange() {
191
- return await this.#domNode.callFunction(verticalScrollRangeInPage).then(res => res?.value ?? null);
192
- function verticalScrollRangeInPage() {
193
- if ('scrollingElement' in this) {
194
- if (!this.scrollingElement) {
195
- return 0;
196
- }
197
- return this.scrollingElement.scrollHeight - this.scrollingElement.clientHeight;
198
- }
199
- return this.scrollHeight - this.clientHeight;
200
- }
201
- }
202
- async horizontalScrollRange() {
203
- return await this.#domNode.callFunction(horizontalScrollRangeInPage).then(res => res?.value ?? null);
204
- function horizontalScrollRangeInPage() {
205
- if ('scrollingElement' in this) {
206
- if (!this.scrollingElement) {
207
- return 0;
208
- }
209
- return this.scrollingElement.scrollWidth - this.scrollingElement.clientWidth;
210
- }
211
- return this.scrollWidth - this.clientWidth;
212
- }
213
- }
214
- }
215
- function shouldGroupAnimations(firstAnimation, anim) {
216
- const firstAnimationTimeline = firstAnimation.viewOrScrollTimeline();
217
- const animationTimeline = anim.viewOrScrollTimeline();
218
- if (firstAnimationTimeline) {
219
- // This is a SDA group so check whether the animation's
220
- // scroll container and scroll axis is the same with the first animation.
221
- return Boolean(animationTimeline && firstAnimationTimeline.sourceNodeId === animationTimeline.sourceNodeId &&
222
- firstAnimationTimeline.axis === animationTimeline.axis);
223
- }
224
- // This is a non-SDA group so check whether the coming animation
225
- // is a time based one too and if so, compare their start times.
226
- return !animationTimeline && firstAnimation.startTime() === anim.startTime();
227
- }
228
- export class AnimationModel extends SDKModel {
229
- runtimeModel;
230
- agent;
231
- #animationsById = new Map();
232
- animationGroups = new Map();
233
- #pendingAnimations = new Set();
234
- playbackRate = 1;
235
- #flushPendingAnimations;
236
- constructor(target) {
237
- super(target);
238
- this.runtimeModel = target.model(RuntimeModel);
239
- this.agent = target.animationAgent();
240
- target.registerAnimationDispatcher(new AnimationDispatcher(this));
241
- if (!target.suspended()) {
242
- void this.agent.invoke_enable();
243
- }
244
- const resourceTreeModel = target.model(ResourceTreeModel);
245
- resourceTreeModel.addEventListener(ResourceTreeModelEvents.PrimaryPageChanged, this.reset, this);
246
- this.#flushPendingAnimations = Common.Debouncer.debounce(() => {
247
- while (this.#pendingAnimations.size) {
248
- this.matchExistingGroups(this.createGroupFromPendingAnimations());
249
- }
250
- }, 100);
251
- }
252
- reset() {
253
- this.#animationsById.clear();
254
- this.animationGroups.clear();
255
- this.#pendingAnimations.clear();
256
- this.dispatchEventToListeners(Events.ModelReset);
257
- }
258
- async devicePixelRatio() {
259
- const evaluateResult = await this.target().runtimeAgent().invoke_evaluate({ expression: 'window.devicePixelRatio' });
260
- if (evaluateResult?.result.type === 'number') {
261
- return evaluateResult?.result.value ?? 1;
262
- }
263
- return 1;
264
- }
265
- async getAnimationGroupForAnimation(name, nodeId) {
266
- for (const animationGroup of this.animationGroups.values()) {
267
- for (const animation of animationGroup.animations()) {
268
- if (animation.name() === name) {
269
- const animationNode = await animation.source().node();
270
- if (animationNode?.id === nodeId) {
271
- return animationGroup;
272
- }
273
- }
274
- }
275
- }
276
- return null;
277
- }
278
- animationCanceled(id) {
279
- this.#pendingAnimations.delete(id);
280
- }
281
- async animationUpdated(payload) {
282
- let foundAnimationGroup;
283
- let foundAnimation;
284
- for (const animationGroup of this.animationGroups.values()) {
285
- foundAnimation = animationGroup.animations().find(animation => animation.id() === payload.id);
286
- if (foundAnimation) {
287
- foundAnimationGroup = animationGroup;
288
- break;
289
- }
290
- }
291
- if (!foundAnimation || !foundAnimationGroup) {
292
- return;
293
- }
294
- await foundAnimation.setPayload(payload);
295
- this.dispatchEventToListeners(Events.AnimationGroupUpdated, foundAnimationGroup);
296
- }
297
- async animationStarted(payload) {
298
- // We are not interested in animations without effect or target.
299
- if (!payload.source?.backendNodeId) {
300
- return;
301
- }
302
- const animation = await AnimationImpl.parsePayload(this, payload);
303
- // Ignore Web Animations custom effects & groups.
304
- const keyframesRule = animation.source().keyframesRule();
305
- if (animation.type() === 'WebAnimation' && keyframesRule && keyframesRule.keyframes().length === 0) {
306
- this.#pendingAnimations.delete(animation.id());
307
- }
308
- else {
309
- this.#animationsById.set(animation.id(), animation);
310
- this.#pendingAnimations.add(animation.id());
311
- }
312
- this.#flushPendingAnimations();
313
- }
314
- matchExistingGroups(incomingGroup) {
315
- let matchedGroup = null;
316
- for (const group of this.animationGroups.values()) {
317
- if (group.matches(incomingGroup)) {
318
- matchedGroup = group;
319
- group.rebaseTo(incomingGroup);
320
- break;
321
- }
322
- if (group.shouldInclude(incomingGroup)) {
323
- matchedGroup = group;
324
- group.appendAnimations(incomingGroup.animations());
325
- break;
326
- }
327
- }
328
- if (!matchedGroup) {
329
- this.animationGroups.set(incomingGroup.id(), incomingGroup);
330
- this.dispatchEventToListeners(Events.AnimationGroupStarted, incomingGroup);
331
- }
332
- else {
333
- this.dispatchEventToListeners(Events.AnimationGroupUpdated, matchedGroup);
334
- }
335
- return Boolean(matchedGroup);
336
- }
337
- createGroupFromPendingAnimations() {
338
- console.assert(this.#pendingAnimations.size > 0);
339
- const firstAnimationId = this.#pendingAnimations.values().next().value;
340
- this.#pendingAnimations.delete(firstAnimationId);
341
- const firstAnimation = this.#animationsById.get(firstAnimationId);
342
- if (!firstAnimation) {
343
- throw new Error('Unable to locate first animation');
344
- }
345
- const groupedAnimations = [firstAnimation];
346
- const remainingAnimations = new Set();
347
- for (const id of this.#pendingAnimations) {
348
- const anim = this.#animationsById.get(id);
349
- if (shouldGroupAnimations(firstAnimation, anim)) {
350
- groupedAnimations.push(anim);
351
- }
352
- else {
353
- remainingAnimations.add(id);
354
- }
355
- }
356
- this.#pendingAnimations = remainingAnimations;
357
- // Show the first starting animation at the top of the animations of the animation group.
358
- groupedAnimations.sort((anim1, anim2) => anim1.startTime() - anim2.startTime());
359
- return new AnimationGroup(this, firstAnimationId, groupedAnimations);
360
- }
361
- setPlaybackRate(playbackRate) {
362
- this.playbackRate = playbackRate;
363
- void this.agent.invoke_setPlaybackRate({ playbackRate });
364
- }
365
- async releaseAllAnimations() {
366
- const animationIds = [...this.animationGroups.values()].flatMap(animationGroup => animationGroup.animations().map(animation => animation.id()));
367
- await this.agent.invoke_releaseAnimations({ animations: animationIds });
368
- }
369
- releaseAnimations(animations) {
370
- void this.agent.invoke_releaseAnimations({ animations });
371
- }
372
- async suspendModel() {
373
- await this.agent.invoke_disable().then(() => this.reset());
374
- }
375
- async resumeModel() {
376
- await this.agent.invoke_enable();
377
- }
378
- }
379
- export var Events;
380
- (function (Events) {
381
- /* eslint-disable @typescript-eslint/naming-convention -- Used by web_tests. */
382
- Events["AnimationGroupStarted"] = "AnimationGroupStarted";
383
- Events["AnimationGroupUpdated"] = "AnimationGroupUpdated";
384
- Events["ModelReset"] = "ModelReset";
385
- /* eslint-enable @typescript-eslint/naming-convention */
386
- })(Events || (Events = {}));
387
- export class AnimationImpl {
388
- #animationModel;
389
- #payload; // Assertion is safe because only way to create `AnimationImpl` is to use `parsePayload` which calls `setPayload` and sets the value.
390
- #source; // Assertion is safe because only way to create `AnimationImpl` is to use `parsePayload` which calls `setPayload` and sets the value.
391
- #playState;
392
- constructor(animationModel) {
393
- this.#animationModel = animationModel;
394
- }
395
- static async parsePayload(animationModel, payload) {
396
- const animation = new AnimationImpl(animationModel);
397
- await animation.setPayload(payload);
398
- return animation;
399
- }
400
- async setPayload(payload) {
401
- // TODO(b/40929569): Remove normalizing by devicePixelRatio after the attached bug is resolved.
402
- if (payload.viewOrScrollTimeline) {
403
- const devicePixelRatio = await this.#animationModel.devicePixelRatio();
404
- if (payload.viewOrScrollTimeline.startOffset) {
405
- payload.viewOrScrollTimeline.startOffset /= devicePixelRatio;
406
- }
407
- if (payload.viewOrScrollTimeline.endOffset) {
408
- payload.viewOrScrollTimeline.endOffset /= devicePixelRatio;
409
- }
410
- }
411
- this.#payload = payload;
412
- if (this.#source && payload.source) {
413
- this.#source.setPayload(payload.source);
414
- }
415
- else if (!this.#source && payload.source) {
416
- this.#source = new AnimationEffect(this.#animationModel, payload.source);
417
- }
418
- }
419
- // `startTime` and `duration` is represented as the
420
- // percentage of the view timeline range that starts at `startOffset`px
421
- // from the scroll container and ends at `endOffset`px of the scroll container.
422
- // This takes a percentage of the timeline range and returns the absolute
423
- // pixels values as a scroll offset of the scroll container.
424
- percentageToPixels(percentage, viewOrScrollTimeline) {
425
- const { startOffset, endOffset } = viewOrScrollTimeline;
426
- if (startOffset === undefined || endOffset === undefined) {
427
- // We don't expect this situation to occur since after an animation is started
428
- // we expect the scroll offsets to be resolved and provided correctly. If `startOffset`
429
- // or `endOffset` is not provided in a viewOrScrollTimeline; we can assume that there is a bug here
430
- // so it's fine to throw an error.
431
- throw new Error('startOffset or endOffset does not exist in viewOrScrollTimeline');
432
- }
433
- return (endOffset - startOffset) * (percentage / 100);
434
- }
435
- viewOrScrollTimeline() {
436
- return this.#payload.viewOrScrollTimeline;
437
- }
438
- id() {
439
- return this.#payload.id;
440
- }
441
- name() {
442
- return this.#payload.name;
443
- }
444
- paused() {
445
- return this.#payload.pausedState;
446
- }
447
- playState() {
448
- return this.#playState || this.#payload.playState;
449
- }
450
- playbackRate() {
451
- return this.#payload.playbackRate;
452
- }
453
- // For scroll driven animations, it returns the pixel offset in the scroll container
454
- // For time animations, it returns milliseconds.
455
- startTime() {
456
- const viewOrScrollTimeline = this.viewOrScrollTimeline();
457
- if (viewOrScrollTimeline) {
458
- return this.percentageToPixels(this.playbackRate() > 0 ? this.#payload.startTime : 100 - this.#payload.startTime, viewOrScrollTimeline) +
459
- (this.viewOrScrollTimeline()?.startOffset ?? 0);
460
- }
461
- return this.#payload.startTime;
462
- }
463
- // For scroll driven animations, it returns the duration in pixels (i.e. after how many pixels of scroll the animation is going to end)
464
- // For time animations, it returns milliseconds.
465
- iterationDuration() {
466
- const viewOrScrollTimeline = this.viewOrScrollTimeline();
467
- if (viewOrScrollTimeline) {
468
- return this.percentageToPixels(this.source().duration(), viewOrScrollTimeline);
469
- }
470
- return this.source().duration();
471
- }
472
- // For scroll driven animations, it returns the duration in pixels (i.e. after how many pixels of scroll the animation is going to end)
473
- // For time animations, it returns milliseconds.
474
- endTime() {
475
- if (!this.source().iterations) {
476
- return Infinity;
477
- }
478
- if (this.viewOrScrollTimeline()) {
479
- return this.startTime() + this.iterationDuration() * this.source().iterations();
480
- }
481
- return this.startTime() + this.source().delay() + this.source().duration() * this.source().iterations() +
482
- this.source().endDelay();
483
- }
484
- // For scroll driven animations, it returns the duration in pixels (i.e. after how many pixels of scroll the animation is going to end)
485
- // For time animations, it returns milliseconds.
486
- finiteDuration() {
487
- const iterations = Math.min(this.source().iterations(), 3);
488
- if (this.viewOrScrollTimeline()) {
489
- return this.iterationDuration() * iterations;
490
- }
491
- return this.source().delay() + this.source().duration() * iterations;
492
- }
493
- // For scroll driven animations, it returns the duration in pixels (i.e. after how many pixels of scroll the animation is going to end)
494
- // For time animations, it returns milliseconds.
495
- currentTime() {
496
- const viewOrScrollTimeline = this.viewOrScrollTimeline();
497
- if (viewOrScrollTimeline) {
498
- return this.percentageToPixels(this.#payload.currentTime, viewOrScrollTimeline);
499
- }
500
- return this.#payload.currentTime;
501
- }
502
- source() {
503
- return this.#source;
504
- }
505
- type() {
506
- return this.#payload.type;
507
- }
508
- overlaps(animation) {
509
- // Infinite animations
510
- if (!this.source().iterations() || !animation.source().iterations()) {
511
- return true;
512
- }
513
- const firstAnimation = this.startTime() < animation.startTime() ? this : animation;
514
- const secondAnimation = firstAnimation === this ? animation : this;
515
- return firstAnimation.endTime() >= secondAnimation.startTime();
516
- }
517
- // Utility method for returning `delay` for time based animations
518
- // and `startTime` in pixels for scroll driven animations. It is used to
519
- // find the exact starting time of the first keyframe for both cases.
520
- delayOrStartTime() {
521
- if (this.viewOrScrollTimeline()) {
522
- return this.startTime();
523
- }
524
- return this.source().delay();
525
- }
526
- setTiming(duration, delay) {
527
- void this.#source.node().then(node => {
528
- if (!node) {
529
- throw new Error('Unable to find node');
530
- }
531
- this.updateNodeStyle(duration, delay, node);
532
- });
533
- this.#source.durationInternal = duration;
534
- this.#source.delayInternal = delay;
535
- void this.#animationModel.agent.invoke_setTiming({ animationId: this.id(), duration, delay });
536
- }
537
- updateNodeStyle(duration, delay, node) {
538
- let animationPrefix;
539
- if (this.type() === "CSSTransition" /* Protocol.Animation.AnimationType.CSSTransition */) {
540
- animationPrefix = 'transition-';
541
- }
542
- else if (this.type() === "CSSAnimation" /* Protocol.Animation.AnimationType.CSSAnimation */) {
543
- animationPrefix = 'animation-';
544
- }
545
- else {
546
- return;
547
- }
548
- if (!node.id) {
549
- throw new Error('Node has no id');
550
- }
551
- const cssModel = node.domModel().cssModel();
552
- cssModel.setEffectivePropertyValueForNode(node.id, animationPrefix + 'duration', duration + 'ms');
553
- cssModel.setEffectivePropertyValueForNode(node.id, animationPrefix + 'delay', delay + 'ms');
554
- }
555
- async remoteObjectPromise() {
556
- const payload = await this.#animationModel.agent.invoke_resolveAnimation({ animationId: this.id() });
557
- if (!payload) {
558
- return null;
559
- }
560
- return this.#animationModel.runtimeModel.createRemoteObject(payload.remoteObject);
561
- }
562
- cssId() {
563
- return this.#payload.cssId || '';
564
- }
565
- }
566
- export class AnimationEffect {
567
- #animationModel;
568
- #payload; // Assertion is safe because `setPayload` call in `constructor` sets the value.
569
- delayInternal; // Assertion is safe because `setPayload` call in `constructor` sets the value.
570
- durationInternal; // Assertion is safe because `setPayload` call in `constructor` sets the value.
571
- #keyframesRule;
572
- #deferredNode;
573
- constructor(animationModel, payload) {
574
- this.#animationModel = animationModel;
575
- this.setPayload(payload);
576
- }
577
- setPayload(payload) {
578
- this.#payload = payload;
579
- if (!this.#keyframesRule && payload.keyframesRule) {
580
- this.#keyframesRule = new KeyframesRule(payload.keyframesRule);
581
- }
582
- else if (this.#keyframesRule && payload.keyframesRule) {
583
- this.#keyframesRule.setPayload(payload.keyframesRule);
584
- }
585
- this.delayInternal = payload.delay;
586
- this.durationInternal = payload.duration;
587
- }
588
- delay() {
589
- return this.delayInternal;
590
- }
591
- endDelay() {
592
- return this.#payload.endDelay;
593
- }
594
- iterations() {
595
- // Animations with zero duration, zero delays and infinite iterations can't be shown.
596
- if (!this.delay() && !this.endDelay() && !this.duration()) {
597
- return 0;
598
- }
599
- return this.#payload.iterations || Infinity;
600
- }
601
- duration() {
602
- return this.durationInternal;
603
- }
604
- direction() {
605
- return this.#payload.direction;
606
- }
607
- fill() {
608
- return this.#payload.fill;
609
- }
610
- node() {
611
- if (!this.#deferredNode) {
612
- this.#deferredNode = new DeferredDOMNode(this.#animationModel.target(), this.backendNodeId());
613
- }
614
- return this.#deferredNode.resolvePromise();
615
- }
616
- deferredNode() {
617
- return new DeferredDOMNode(this.#animationModel.target(), this.backendNodeId());
618
- }
619
- backendNodeId() {
620
- return this.#payload.backendNodeId;
621
- }
622
- keyframesRule() {
623
- return this.#keyframesRule || null;
624
- }
625
- easing() {
626
- return this.#payload.easing;
627
- }
628
- }
629
- export class KeyframesRule {
630
- #payload; // Assertion is safe because `setPayload` call in `constructor` sets the value.;
631
- #keyframes; // Assertion is safe because `setPayload` call in `constructor` sets the value.;
632
- constructor(payload) {
633
- this.setPayload(payload);
634
- }
635
- setPayload(payload) {
636
- this.#payload = payload;
637
- if (!this.#keyframes) {
638
- this.#keyframes = this.#payload.keyframes.map(keyframeStyle => new KeyframeStyle(keyframeStyle));
639
- }
640
- else {
641
- this.#payload.keyframes.forEach((keyframeStyle, index) => {
642
- this.#keyframes[index]?.setPayload(keyframeStyle);
643
- });
644
- }
645
- }
646
- name() {
647
- return this.#payload.name;
648
- }
649
- keyframes() {
650
- return this.#keyframes;
651
- }
652
- }
653
- export class KeyframeStyle {
654
- #payload; // Assertion is safe because `setPayload` call in `constructor` sets the value.
655
- #offset; // Assertion is safe because `setPayload` call in `constructor` sets the value.
656
- constructor(payload) {
657
- this.setPayload(payload);
658
- }
659
- setPayload(payload) {
660
- this.#payload = payload;
661
- this.#offset = payload.offset;
662
- }
663
- offset() {
664
- return this.#offset;
665
- }
666
- setOffset(offset) {
667
- this.#offset = offset * 100 + '%';
668
- }
669
- offsetAsNumber() {
670
- return parseFloat(this.#offset) / 100;
671
- }
672
- easing() {
673
- return this.#payload.easing;
674
- }
675
- }
676
- export class AnimationGroup {
677
- #animationModel;
678
- #id;
679
- #scrollNode;
680
- #animations;
681
- #paused;
682
- constructor(animationModel, id, animations) {
683
- this.#animationModel = animationModel;
684
- this.#id = id;
685
- this.#animations = animations;
686
- this.#paused = false;
687
- }
688
- isScrollDriven() {
689
- return Boolean(this.#animations[0]?.viewOrScrollTimeline());
690
- }
691
- id() {
692
- return this.#id;
693
- }
694
- animations() {
695
- return this.#animations;
696
- }
697
- release() {
698
- this.#animationModel.animationGroups.delete(this.id());
699
- this.#animationModel.releaseAnimations(this.animationIds());
700
- }
701
- animationIds() {
702
- function extractId(animation) {
703
- return animation.id();
704
- }
705
- return this.#animations.map(extractId);
706
- }
707
- startTime() {
708
- return this.#animations[0].startTime();
709
- }
710
- // For scroll driven animations, it returns the duration in pixels (i.e. after how many pixels of scroll the animation is going to end)
711
- // For time animations, it returns milliseconds.
712
- groupDuration() {
713
- let duration = 0;
714
- for (const anim of this.#animations) {
715
- duration = Math.max(duration, anim.delayOrStartTime() + anim.iterationDuration());
716
- }
717
- return duration;
718
- }
719
- // For scroll driven animations, it returns the duration in pixels (i.e. after how many pixels of scroll the animation is going to end)
720
- // For time animations, it returns milliseconds.
721
- finiteDuration() {
722
- let maxDuration = 0;
723
- for (let i = 0; i < this.#animations.length; ++i) {
724
- maxDuration = Math.max(maxDuration, this.#animations[i].finiteDuration());
725
- }
726
- return maxDuration;
727
- }
728
- scrollOrientation() {
729
- const timeline = this.#animations[0]?.viewOrScrollTimeline();
730
- if (!timeline) {
731
- return null;
732
- }
733
- return timeline.axis;
734
- }
735
- async scrollNode() {
736
- if (this.#scrollNode) {
737
- return this.#scrollNode;
738
- }
739
- if (!this.isScrollDriven()) {
740
- return null;
741
- }
742
- const sourceNodeId = this.#animations[0]?.viewOrScrollTimeline()?.sourceNodeId;
743
- if (!sourceNodeId) {
744
- return null;
745
- }
746
- const deferredScrollNode = new DeferredDOMNode(this.#animationModel.target(), sourceNodeId);
747
- const scrollNode = await deferredScrollNode.resolvePromise();
748
- if (!scrollNode) {
749
- return null;
750
- }
751
- this.#scrollNode = new AnimationDOMNode(scrollNode);
752
- return this.#scrollNode;
753
- }
754
- seekTo(currentTime) {
755
- void this.#animationModel.agent.invoke_seekAnimations({ animations: this.animationIds(), currentTime });
756
- }
757
- paused() {
758
- return this.#paused;
759
- }
760
- togglePause(paused) {
761
- if (paused === this.#paused) {
762
- return;
763
- }
764
- this.#paused = paused;
765
- void this.#animationModel.agent.invoke_setPaused({ animations: this.animationIds(), paused });
766
- }
767
- currentTimePromise() {
768
- let longestAnim = null;
769
- for (const anim of this.#animations) {
770
- if (!longestAnim || anim.endTime() > longestAnim.endTime()) {
771
- longestAnim = anim;
772
- }
773
- }
774
- if (!longestAnim) {
775
- throw new Error('No longest animation found');
776
- }
777
- return this.#animationModel.agent.invoke_getCurrentTime({ id: longestAnim.id() })
778
- .then(({ currentTime }) => currentTime || 0);
779
- }
780
- matches(group) {
781
- function extractId(anim) {
782
- const timelineId = (anim.viewOrScrollTimeline()?.sourceNodeId ?? '') + (anim.viewOrScrollTimeline()?.axis ?? '');
783
- const regularId = anim.type() === "WebAnimation" /* Protocol.Animation.AnimationType.WebAnimation */ ? anim.type() + anim.id() : anim.cssId();
784
- return regularId + timelineId;
785
- }
786
- if (this.#animations.length !== group.#animations.length) {
787
- return false;
788
- }
789
- const left = this.#animations.map(extractId).sort();
790
- const right = group.#animations.map(extractId).sort();
791
- for (let i = 0; i < left.length; i++) {
792
- if (left[i] !== right[i]) {
793
- return false;
794
- }
795
- }
796
- return true;
797
- }
798
- shouldInclude(group) {
799
- // We want to include the animations coming from the incoming group
800
- // inside this group if they were to be grouped if the events came at the same time.
801
- const [firstIncomingAnimation] = group.#animations;
802
- const [firstAnimation] = this.#animations;
803
- return shouldGroupAnimations(firstAnimation, firstIncomingAnimation);
804
- }
805
- appendAnimations(animations) {
806
- this.#animations.push(...animations);
807
- }
808
- rebaseTo(group) {
809
- this.#animationModel.releaseAnimations(this.animationIds());
810
- this.#animations = group.#animations;
811
- this.#scrollNode = undefined;
812
- }
813
- }
814
- export class AnimationDispatcher {
815
- #animationModel;
816
- constructor(animationModel) {
817
- this.#animationModel = animationModel;
818
- }
819
- animationCreated(_event) {
820
- // Previously this event was used to batch the animations into groups
821
- // and we were waiting for animationStarted events to be sent for
822
- // all the created animations and until then we weren't creating any
823
- // groups. This was allowing us to not miss any animations that were
824
- // going to be in the same group. However, now we're not using this event
825
- // to do batching and instead:
826
- // * We debounce the flush calls so that if the animationStarted events
827
- // for the same animation group come in different times; we create one
828
- // group for them.
829
- // * Even though an animation group is created and rendered for some animations
830
- // that have the same startTime (or same timeline & scroll axis for SDAs), now
831
- // whenever an `animationStarted` event comes we check whether there is a group
832
- // we can add the related animation. If so, we add it and emit `animationGroupUpdated`
833
- // event. So that, all the animations that were supposed to be in the same group
834
- // will be in the same group.
835
- }
836
- animationCanceled({ id }) {
837
- this.#animationModel.animationCanceled(id);
838
- }
839
- animationStarted({ animation }) {
840
- void this.#animationModel.animationStarted(animation);
841
- }
842
- animationUpdated({ animation }) {
843
- void this.#animationModel.animationUpdated(animation);
844
- }
845
- }
846
- SDKModel.register(AnimationModel, { capabilities: 2 /* Capability.DOM */, autostart: true });