@paulirish/trace_engine 0.0.67-beta.1 → 0.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.tmp/tsbuildinfo/analyze-inspector-issues.d.mts +13 -0
- package/.tmp/tsbuildinfo/analyze-inspector-issues.d.mts.map +1 -0
- package/.tmp/tsbuildinfo/analyze-trace.d.mts +17 -0
- package/.tmp/tsbuildinfo/analyze-trace.d.mts.map +1 -0
- package/.tmp/tsbuildinfo/test/test-trace-engine.d.mts +2 -0
- package/.tmp/tsbuildinfo/test/test-trace-engine.d.mts.map +1 -0
- package/.tmp/tsbuildinfo/third_party/third-party-web/third-party-web.d.ts +3 -0
- package/.tmp/tsbuildinfo/third_party/third-party-web/third-party-web.d.ts.map +1 -0
- package/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +1 -0
- package/README.md +22 -62
- package/analyze-inspector-issues.mjs +60 -0
- package/analyze-trace.mjs +144 -6
- package/core/common/ParsedURL.d.ts +8 -0
- package/core/common/ParsedURL.js +512 -0
- package/core/common/ParsedURL.js.map +1 -0
- package/core/common/common.d.ts +8 -33
- package/core/common/common.js +2 -0
- package/core/host/host.d.ts +1 -13
- package/core/host/host.js +1 -0
- package/core/i18n/i18n.d.ts +20 -8
- package/core/i18n/i18n.js +15 -0
- package/core/platform/ArrayUtilities.js +224 -0
- package/core/platform/ArrayUtilities.js.map +1 -0
- package/core/platform/Brand.js +5 -0
- package/core/platform/Brand.js.map +1 -0
- package/core/platform/Constructor.js +5 -0
- package/core/platform/Constructor.js.map +1 -0
- package/core/platform/DateUtilities.js +14 -0
- package/core/platform/DateUtilities.js.map +1 -0
- package/core/platform/DevToolsPath.js +28 -0
- package/core/platform/DevToolsPath.js.map +1 -0
- package/core/platform/HostRuntime.js +8 -0
- package/core/platform/HostRuntime.js.map +1 -0
- package/core/platform/KeyboardUtilities.js +34 -0
- package/core/platform/KeyboardUtilities.js.map +1 -0
- package/core/platform/MapUtilities.js +80 -0
- package/core/platform/MapUtilities.js.map +1 -0
- package/core/platform/MimeType.js +157 -0
- package/core/platform/MimeType.js.map +1 -0
- package/core/platform/NumberUtilities.js +73 -0
- package/core/platform/NumberUtilities.js.map +1 -0
- package/core/platform/Size.js +36 -0
- package/core/platform/Size.js.map +1 -0
- package/core/platform/StringUtilities.d.ts +21 -0
- package/core/platform/StringUtilities.js +731 -0
- package/core/platform/StringUtilities.js.map +1 -0
- package/core/platform/Timing.js +10 -0
- package/core/platform/Timing.js.map +1 -0
- package/core/platform/TypedArrayUtilities.js +158 -0
- package/core/platform/TypedArrayUtilities.js.map +1 -0
- package/core/platform/TypescriptUtilities.js +17 -0
- package/core/platform/TypescriptUtilities.js.map +1 -0
- package/core/platform/UIString.d.ts +5 -2
- package/core/platform/UIString.js +5 -0
- package/core/platform/UIString.js.map +1 -0
- package/core/platform/UserVisibleError.d.ts +1 -12
- package/core/platform/UserVisibleError.js +23 -0
- package/core/platform/UserVisibleError.js.map +1 -0
- package/core/platform/api/HostRuntime.d.ts +1 -0
- package/core/platform/api/HostRuntime.js +5 -0
- package/core/platform/api/HostRuntime.js.map +1 -0
- package/core/platform/api/api-tsconfig.json +58 -0
- package/core/platform/api/api-tsconfig.ref.json +26 -0
- package/core/platform/api/api.js +6 -0
- package/core/platform/api/api.js.map +1 -0
- package/core/platform/bundle-tsconfig.json +59 -0
- package/core/platform/bundle-tsconfig.ref.json +27 -0
- package/core/platform/foundation_unittests-tsconfig.json +73 -0
- package/core/platform/foundation_unittests-tsconfig.ref.json +40 -0
- package/core/platform/foundation_unittests_node_typecheck-tsconfig.json +69 -0
- package/core/platform/platform-tsconfig.json +81 -0
- package/core/platform/platform-tsconfig.ref.json +49 -0
- package/core/platform/platform.js +28 -0
- package/core/platform/platform.js.map +1 -0
- package/core/platform/platform_node_typecheck-tsconfig.json +78 -0
- package/core/platform/platform_node_typecheck.stamp +0 -0
- package/core/root/root.d.ts +1 -4
- package/core/root/root.js +1 -0
- package/core/sdk/sdk.d.ts +27 -97
- package/core/sdk/sdk.js +1 -0
- package/generated/protocol.d.ts +93 -30
- package/generated/protocol.js +3304 -0
- package/locales/af.json +173 -176
- package/locales/am.json +352 -355
- package/locales/ar.json +353 -356
- package/locales/as.json +351 -354
- package/locales/az.json +342 -345
- package/locales/be.json +352 -355
- package/locales/bg.json +352 -355
- package/locales/bn.json +352 -355
- package/locales/bs.json +254 -257
- package/locales/ca.json +284 -287
- package/locales/cs.json +337 -340
- package/locales/cy.json +147 -150
- package/locales/da.json +234 -237
- package/locales/de.json +253 -256
- package/locales/el.json +337 -340
- package/locales/en-GB.json +135 -138
- package/locales/en-US.json +300 -300
- package/locales/en-XL.json +1055 -0
- package/locales/es-419.json +283 -286
- package/locales/es.json +283 -286
- package/locales/et.json +239 -242
- package/locales/eu.json +134 -137
- package/locales/fa.json +352 -355
- package/locales/fi.json +284 -287
- package/locales/fil.json +131 -134
- package/locales/fr-CA.json +311 -314
- package/locales/fr.json +310 -313
- package/locales/gl.json +265 -268
- package/locales/gu.json +353 -356
- package/locales/he.json +353 -356
- package/locales/hi.json +337 -340
- package/locales/hr.json +258 -261
- package/locales/hu.json +343 -346
- package/locales/hy.json +352 -355
- package/locales/id.json +131 -134
- package/locales/is.json +305 -308
- package/locales/it.json +222 -225
- package/locales/ja.json +352 -355
- package/locales/ka.json +353 -356
- package/locales/kk.json +353 -356
- package/locales/km.json +352 -355
- package/locales/kn.json +353 -356
- package/locales/ko.json +352 -355
- package/locales/ky.json +351 -354
- package/locales/lo.json +353 -356
- package/locales/lt.json +324 -327
- package/locales/lv.json +318 -321
- package/locales/mk.json +353 -356
- package/locales/ml.json +352 -355
- package/locales/mn.json +352 -355
- package/locales/mr.json +352 -355
- package/locales/ms.json +131 -134
- package/locales/my.json +351 -354
- package/locales/ne.json +337 -340
- package/locales/nl.json +184 -187
- package/locales/no.json +240 -243
- package/locales/or.json +352 -355
- package/locales/pa.json +352 -355
- package/locales/pl.json +308 -311
- package/locales/pt-PT.json +275 -278
- package/locales/pt.json +271 -274
- package/locales/ro.json +310 -313
- package/locales/ru.json +352 -355
- package/locales/si.json +353 -356
- package/locales/sk.json +334 -337
- package/locales/sl.json +275 -278
- package/locales/sq.json +317 -320
- package/locales/sr-Latn.json +257 -260
- package/locales/sr.json +353 -356
- package/locales/sv.json +298 -301
- package/locales/sw.json +131 -134
- package/locales/ta.json +353 -356
- package/locales/te.json +351 -354
- package/locales/th.json +353 -356
- package/locales/tr.json +328 -331
- package/locales/uk.json +352 -355
- package/locales/ur.json +353 -356
- package/locales/uz.json +235 -238
- package/locales/vi.json +353 -356
- package/locales/zh-HK.json +353 -356
- package/locales/zh-TW.json +352 -355
- package/locales/zh.json +352 -355
- package/locales/zu.json +130 -133
- package/models/cpu_profile/CPUProfileDataModel.js +517 -0
- package/models/cpu_profile/CPUProfileDataModel.js.map +1 -0
- package/models/cpu_profile/ProfileTreeModel.js +90 -0
- package/models/cpu_profile/ProfileTreeModel.js.map +1 -0
- package/models/cpu_profile/bundle-tsconfig.json +59 -0
- package/models/cpu_profile/bundle-tsconfig.ref.json +27 -0
- package/models/cpu_profile/cpu_profile-tsconfig.json +63 -0
- package/models/cpu_profile/cpu_profile-tsconfig.ref.json +31 -0
- package/models/cpu_profile/cpu_profile.js +7 -0
- package/models/cpu_profile/cpu_profile.js.map +1 -0
- package/models/cpu_profile/cpu_profile_node_typecheck-tsconfig.json +60 -0
- package/models/cpu_profile/cpu_profile_node_typecheck.stamp +0 -0
- package/models/cpu_profile/foundation_unittests-tsconfig.json +63 -0
- package/models/cpu_profile/foundation_unittests-tsconfig.ref.json +30 -0
- package/models/cpu_profile/foundation_unittests_node_typecheck-tsconfig.json +59 -0
- package/models/crux-manager/crux-manager.d.ts +3 -1
- package/models/crux-manager/crux-manager.js +1 -0
- package/models/trace/EntityMapper.js +133 -0
- package/models/trace/EntityMapper.js.map +1 -0
- package/models/trace/EventsSerializer.d.ts +1 -0
- package/models/trace/EventsSerializer.js +118 -0
- package/models/trace/EventsSerializer.js.map +1 -0
- package/models/trace/LanternComputationData.js +368 -0
- package/models/trace/LanternComputationData.js.map +1 -0
- package/models/trace/ModelImpl.js +181 -0
- package/models/trace/ModelImpl.js.map +1 -0
- package/models/trace/Name.js +115 -0
- package/models/trace/Name.js.map +1 -0
- package/models/trace/Processor.js +616 -0
- package/models/trace/Processor.js.map +1 -0
- package/models/trace/Styles.d.ts +2 -2
- package/models/trace/Styles.js +836 -0
- package/models/trace/Styles.js.map +1 -0
- package/models/trace/bundle-tsconfig.json +77 -0
- package/models/trace/bundle-tsconfig.ref.json +45 -0
- package/models/trace/extras/FilmStrip.js +45 -0
- package/models/trace/extras/FilmStrip.js.map +1 -0
- package/models/trace/extras/Initiators.js +47 -0
- package/models/trace/extras/Initiators.js.map +1 -0
- package/models/trace/extras/MainThreadActivity.js +77 -0
- package/models/trace/extras/MainThreadActivity.js.map +1 -0
- package/models/trace/extras/ScriptDuplication.js +163 -0
- package/models/trace/extras/ScriptDuplication.js.map +1 -0
- package/models/trace/extras/StackTraceForEvent.d.ts +1 -1
- package/models/trace/extras/StackTraceForEvent.js +192 -0
- package/models/trace/extras/StackTraceForEvent.js.map +1 -0
- package/models/trace/extras/ThirdParties.js +119 -0
- package/models/trace/extras/ThirdParties.js.map +1 -0
- package/models/trace/extras/TraceFilter.js +51 -0
- package/models/trace/extras/TraceFilter.js.map +1 -0
- package/models/trace/extras/TraceTree.js +652 -0
- package/models/trace/extras/TraceTree.js.map +1 -0
- package/models/trace/extras/bundle-tsconfig.json +59 -0
- package/models/trace/extras/bundle-tsconfig.ref.json +27 -0
- package/models/trace/extras/extras-tsconfig.json +81 -0
- package/models/trace/extras/extras-tsconfig.ref.json +49 -0
- package/models/trace/extras/extras.js +12 -0
- package/models/trace/extras/extras.js.map +1 -0
- package/models/trace/extras/extras_node_typecheck-tsconfig.json +78 -0
- package/models/trace/extras/extras_node_typecheck.stamp +0 -0
- package/models/trace/extras/foundation_unittests-tsconfig.json +91 -0
- package/models/trace/extras/foundation_unittests-tsconfig.ref.json +58 -0
- package/models/trace/extras/foundation_unittests_node_typecheck-tsconfig.json +87 -0
- package/models/trace/foundation_unittests-tsconfig.json +70 -0
- package/models/trace/foundation_unittests-tsconfig.ref.json +37 -0
- package/models/trace/foundation_unittests_node_typecheck-tsconfig.json +66 -0
- package/models/trace/handlers/AnimationFramesHandler.d.ts +1 -1
- package/models/trace/handlers/AnimationFramesHandler.js +110 -0
- package/models/trace/handlers/AnimationFramesHandler.js.map +1 -0
- package/models/trace/handlers/AnimationHandler.js +27 -0
- package/models/trace/handlers/AnimationHandler.js.map +1 -0
- package/models/trace/handlers/AsyncJSCallsHandler.d.ts +2 -2
- package/models/trace/handlers/AsyncJSCallsHandler.js +188 -0
- package/models/trace/handlers/AsyncJSCallsHandler.js.map +1 -0
- package/models/trace/handlers/DOMStatsHandler.js +22 -0
- package/models/trace/handlers/DOMStatsHandler.js.map +1 -0
- package/models/trace/handlers/ExtensionTraceDataHandler.js +264 -0
- package/models/trace/handlers/ExtensionTraceDataHandler.js.map +1 -0
- package/models/trace/handlers/FlowsHandler.js +149 -0
- package/models/trace/handlers/FlowsHandler.js.map +1 -0
- package/models/trace/handlers/FramesHandler.js +491 -0
- package/models/trace/handlers/FramesHandler.js.map +1 -0
- package/models/trace/handlers/GPUHandler.js +36 -0
- package/models/trace/handlers/GPUHandler.js.map +1 -0
- package/models/trace/handlers/ImagePaintingHandler.d.ts +2 -2
- package/models/trace/handlers/ImagePaintingHandler.js +148 -0
- package/models/trace/handlers/ImagePaintingHandler.js.map +1 -0
- package/models/trace/handlers/InitiatorsHandler.d.ts +2 -2
- package/models/trace/handlers/InitiatorsHandler.js +181 -0
- package/models/trace/handlers/InitiatorsHandler.js.map +1 -0
- package/models/trace/handlers/InvalidationsHandler.js +125 -0
- package/models/trace/handlers/InvalidationsHandler.js.map +1 -0
- package/models/trace/handlers/LargestImagePaintHandler.js +86 -0
- package/models/trace/handlers/LargestImagePaintHandler.js.map +1 -0
- package/models/trace/handlers/LargestTextPaintHandler.js +28 -0
- package/models/trace/handlers/LargestTextPaintHandler.js.map +1 -0
- package/models/trace/handlers/LayerTreeHandler.d.ts +1 -1
- package/models/trace/handlers/LayerTreeHandler.js +104 -0
- package/models/trace/handlers/LayerTreeHandler.js.map +1 -0
- package/models/trace/handlers/LayoutShiftsHandler.js +453 -0
- package/models/trace/handlers/LayoutShiftsHandler.js.map +1 -0
- package/models/trace/handlers/MemoryHandler.js +22 -0
- package/models/trace/handlers/MemoryHandler.js.map +1 -0
- package/models/trace/handlers/MetaHandler.js +442 -0
- package/models/trace/handlers/MetaHandler.js.map +1 -0
- package/models/trace/handlers/ModelHandlers.js +33 -0
- package/models/trace/handlers/ModelHandlers.js.map +1 -0
- package/models/trace/handlers/NetworkRequestsHandler.d.ts +1 -1
- package/models/trace/handlers/NetworkRequestsHandler.js +578 -0
- package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -0
- package/models/trace/handlers/PageFramesHandler.js +43 -0
- package/models/trace/handlers/PageFramesHandler.js.map +1 -0
- package/models/trace/handlers/PageLoadMetricsHandler.d.ts +1 -1
- package/models/trace/handlers/PageLoadMetricsHandler.js +463 -0
- package/models/trace/handlers/PageLoadMetricsHandler.js.map +1 -0
- package/models/trace/handlers/RendererHandler.js +346 -0
- package/models/trace/handlers/RendererHandler.js.map +1 -0
- package/models/trace/handlers/SamplesHandler.js +261 -0
- package/models/trace/handlers/SamplesHandler.js.map +1 -0
- package/models/trace/handlers/ScreenshotsHandler.js +56 -0
- package/models/trace/handlers/ScreenshotsHandler.js.map +1 -0
- package/models/trace/handlers/ScriptsHandler.d.ts +1 -1
- package/models/trace/handlers/ScriptsHandler.js +277 -0
- package/models/trace/handlers/ScriptsHandler.js.map +1 -0
- package/models/trace/handlers/SelectorStatsHandler.js +72 -0
- package/models/trace/handlers/SelectorStatsHandler.js.map +1 -0
- package/models/trace/handlers/Threads.js +108 -0
- package/models/trace/handlers/Threads.js.map +1 -0
- package/models/trace/handlers/UserInteractionsHandler.js +319 -0
- package/models/trace/handlers/UserInteractionsHandler.js.map +1 -0
- package/models/trace/handlers/UserTimingsHandler.js +194 -0
- package/models/trace/handlers/UserTimingsHandler.js.map +1 -0
- package/models/trace/handlers/WarningsHandler.d.ts +1 -1
- package/models/trace/handlers/WarningsHandler.js +135 -0
- package/models/trace/handlers/WarningsHandler.js.map +1 -0
- package/models/trace/handlers/WorkersHandler.js +34 -0
- package/models/trace/handlers/WorkersHandler.js.map +1 -0
- package/models/trace/handlers/bundle-tsconfig.json +59 -0
- package/models/trace/handlers/bundle-tsconfig.ref.json +27 -0
- package/models/trace/handlers/foundation_unittests-tsconfig.json +102 -0
- package/models/trace/handlers/foundation_unittests-tsconfig.ref.json +69 -0
- package/models/trace/handlers/foundation_unittests_node_typecheck-tsconfig.json +98 -0
- package/models/trace/handlers/handlers-tsconfig.json +112 -0
- package/models/trace/handlers/handlers-tsconfig.ref.json +80 -0
- package/models/trace/handlers/handlers.js +8 -0
- package/models/trace/handlers/handlers.js.map +1 -0
- package/models/trace/handlers/handlers_node_typecheck-tsconfig.json +109 -0
- package/models/trace/handlers/handlers_node_typecheck.stamp +0 -0
- package/models/trace/handlers/helpers.js +167 -0
- package/models/trace/handlers/helpers.js.map +1 -0
- package/models/trace/handlers/types.js +2 -0
- package/models/trace/handlers/types.js.map +1 -0
- package/models/trace/helpers/Extensions.js +42 -0
- package/models/trace/helpers/Extensions.js.map +1 -0
- package/models/trace/helpers/Network.js +103 -0
- package/models/trace/helpers/Network.js.map +1 -0
- package/models/trace/helpers/SamplesIntegrator.d.ts +3 -1
- package/models/trace/helpers/SamplesIntegrator.js +527 -0
- package/models/trace/helpers/SamplesIntegrator.js.map +1 -0
- package/models/trace/helpers/SyntheticEvents.js +96 -0
- package/models/trace/helpers/SyntheticEvents.js.map +1 -0
- package/models/trace/helpers/Timing.js +200 -0
- package/models/trace/helpers/Timing.js.map +1 -0
- package/models/trace/helpers/Trace.d.ts +2 -0
- package/models/trace/helpers/Trace.js +844 -0
- package/models/trace/helpers/Trace.js.map +1 -0
- package/models/trace/helpers/TreeHelpers.js +255 -0
- package/models/trace/helpers/TreeHelpers.js.map +1 -0
- package/models/trace/helpers/bundle-tsconfig.json +59 -0
- package/models/trace/helpers/bundle-tsconfig.ref.json +27 -0
- package/models/trace/helpers/foundation_unittests-tsconfig.json +73 -0
- package/models/trace/helpers/foundation_unittests-tsconfig.ref.json +40 -0
- package/models/trace/helpers/foundation_unittests_node_typecheck-tsconfig.json +69 -0
- package/models/trace/helpers/helpers-tsconfig.json +77 -0
- package/models/trace/helpers/helpers-tsconfig.ref.json +45 -0
- package/models/trace/helpers/helpers.js +11 -0
- package/models/trace/helpers/helpers.js.map +1 -0
- package/models/trace/helpers/helpers_node_typecheck-tsconfig.json +74 -0
- package/models/trace/helpers/helpers_node_typecheck.stamp +0 -0
- package/models/trace/insights/CLSCulprits.d.ts +14 -14
- package/models/trace/insights/CLSCulprits.js +519 -0
- package/models/trace/insights/CLSCulprits.js.map +1 -0
- package/models/trace/insights/Cache.d.ts +6 -6
- package/models/trace/insights/Cache.js +210 -0
- package/models/trace/insights/Cache.js.map +1 -0
- package/models/trace/insights/CharacterSet.d.ts +8 -8
- package/models/trace/insights/CharacterSet.js +132 -0
- package/models/trace/insights/CharacterSet.js.map +1 -0
- package/models/trace/insights/Common.js +367 -0
- package/models/trace/insights/Common.js.map +1 -0
- package/models/trace/insights/DOMSize.d.ts +13 -13
- package/models/trace/insights/DOMSize.js +182 -0
- package/models/trace/insights/DOMSize.js.map +1 -0
- package/models/trace/insights/DocumentLatency.d.ts +11 -11
- package/models/trace/insights/DocumentLatency.js +259 -0
- package/models/trace/insights/DocumentLatency.js.map +1 -0
- package/models/trace/insights/DuplicatedJavaScript.d.ts +6 -6
- package/models/trace/insights/DuplicatedJavaScript.js +110 -0
- package/models/trace/insights/DuplicatedJavaScript.js.map +1 -0
- package/models/trace/insights/FontDisplay.d.ts +5 -5
- package/models/trace/insights/FontDisplay.js +93 -0
- package/models/trace/insights/FontDisplay.js.map +1 -0
- package/models/trace/insights/ForcedReflow.d.ts +7 -7
- package/models/trace/insights/ForcedReflow.js +162 -0
- package/models/trace/insights/ForcedReflow.js.map +1 -0
- package/models/trace/insights/INPBreakdown.d.ts +8 -8
- package/models/trace/insights/INPBreakdown.js +130 -0
- package/models/trace/insights/INPBreakdown.js.map +1 -0
- package/models/trace/insights/ImageDelivery.d.ts +13 -12
- package/models/trace/insights/ImageDelivery.js +264 -0
- package/models/trace/insights/ImageDelivery.js.map +1 -0
- package/models/trace/insights/LCPBreakdown.d.ts +11 -11
- package/models/trace/insights/LCPBreakdown.js +200 -0
- package/models/trace/insights/LCPBreakdown.js.map +1 -0
- package/models/trace/insights/LCPDiscovery.d.ts +10 -10
- package/models/trace/insights/LCPDiscovery.js +190 -0
- package/models/trace/insights/LCPDiscovery.js.map +1 -0
- package/models/trace/insights/LegacyJavaScript.d.ts +5 -5
- package/models/trace/insights/LegacyJavaScript.js +99 -0
- package/models/trace/insights/LegacyJavaScript.js.map +1 -0
- package/models/trace/insights/Models.js +23 -0
- package/models/trace/insights/Models.js.map +1 -0
- package/models/trace/insights/ModernHTTP.d.ts +5 -5
- package/models/trace/insights/ModernHTTP.js +205 -0
- package/models/trace/insights/ModernHTTP.js.map +1 -0
- package/models/trace/insights/NetworkDependencyTree.d.ts +19 -19
- package/models/trace/insights/NetworkDependencyTree.js +551 -0
- package/models/trace/insights/NetworkDependencyTree.js.map +1 -0
- package/models/trace/insights/RenderBlocking.d.ts +5 -5
- package/models/trace/insights/RenderBlocking.js +211 -0
- package/models/trace/insights/RenderBlocking.js.map +1 -0
- package/models/trace/insights/SlowCSSSelector.d.ts +10 -10
- package/models/trace/insights/SlowCSSSelector.js +140 -0
- package/models/trace/insights/SlowCSSSelector.js.map +1 -0
- package/models/trace/insights/Statistics.js +93 -0
- package/models/trace/insights/Statistics.js.map +1 -0
- package/models/trace/insights/ThirdParties.d.ts +6 -6
- package/models/trace/insights/ThirdParties.js +110 -0
- package/models/trace/insights/ThirdParties.js.map +1 -0
- package/models/trace/insights/Viewport.d.ts +3 -3
- package/models/trace/insights/Viewport.js +105 -0
- package/models/trace/insights/Viewport.js.map +1 -0
- package/models/trace/insights/bundle-tsconfig.json +59 -0
- package/models/trace/insights/bundle-tsconfig.ref.json +27 -0
- package/models/trace/insights/foundation_unittests-tsconfig.json +98 -0
- package/models/trace/insights/foundation_unittests-tsconfig.ref.json +65 -0
- package/models/trace/insights/foundation_unittests_node_typecheck-tsconfig.json +94 -0
- package/models/trace/insights/insights-tsconfig.json +114 -0
- package/models/trace/insights/insights-tsconfig.ref.json +82 -0
- package/models/trace/insights/insights.js +10 -0
- package/models/trace/insights/insights.js.map +1 -0
- package/models/trace/insights/insights_node_typecheck-tsconfig.json +111 -0
- package/models/trace/insights/insights_node_typecheck.stamp +0 -0
- package/models/trace/insights/types.d.ts +3 -3
- package/models/trace/insights/types.js +41 -0
- package/models/trace/insights/types.js.map +1 -0
- package/models/trace/lantern/bundle-tsconfig.json +71 -0
- package/models/trace/lantern/bundle-tsconfig.ref.json +39 -0
- package/models/trace/lantern/core/LanternError.js +7 -0
- package/models/trace/lantern/core/LanternError.js.map +1 -0
- package/models/trace/lantern/core/NetworkAnalyzer.d.ts +1 -0
- package/models/trace/lantern/core/NetworkAnalyzer.js +496 -0
- package/models/trace/lantern/core/NetworkAnalyzer.js.map +1 -0
- package/models/trace/lantern/core/bundle-tsconfig.json +59 -0
- package/models/trace/lantern/core/bundle-tsconfig.ref.json +27 -0
- package/models/trace/lantern/core/core-tsconfig.json +60 -0
- package/models/trace/lantern/core/core-tsconfig.ref.json +28 -0
- package/models/trace/lantern/core/core.js +6 -0
- package/models/trace/lantern/core/core.js.map +1 -0
- package/models/trace/lantern/core/core_node_typecheck-tsconfig.json +57 -0
- package/models/trace/lantern/core/core_node_typecheck.stamp +0 -0
- package/models/trace/lantern/core/foundation_unittests-tsconfig.json +69 -0
- package/models/trace/lantern/core/foundation_unittests-tsconfig.ref.json +36 -0
- package/models/trace/lantern/core/foundation_unittests_node_typecheck-tsconfig.json +65 -0
- package/models/trace/lantern/graph/BaseNode.d.ts +2 -2
- package/models/trace/lantern/graph/BaseNode.js +277 -0
- package/models/trace/lantern/graph/BaseNode.js.map +1 -0
- package/models/trace/lantern/graph/CPUNode.d.ts +4 -2
- package/models/trace/lantern/graph/CPUNode.js +80 -0
- package/models/trace/lantern/graph/CPUNode.js.map +1 -0
- package/models/trace/lantern/graph/NetworkNode.js +95 -0
- package/models/trace/lantern/graph/NetworkNode.js.map +1 -0
- package/models/trace/lantern/graph/PageDependencyGraph.js +574 -0
- package/models/trace/lantern/graph/PageDependencyGraph.js.map +1 -0
- package/models/trace/lantern/graph/bundle-tsconfig.json +59 -0
- package/models/trace/lantern/graph/bundle-tsconfig.ref.json +27 -0
- package/models/trace/lantern/graph/foundation_unittests-tsconfig.json +61 -0
- package/models/trace/lantern/graph/foundation_unittests-tsconfig.ref.json +28 -0
- package/models/trace/lantern/graph/foundation_unittests_node_typecheck-tsconfig.json +57 -0
- package/models/trace/lantern/graph/graph-tsconfig.json +65 -0
- package/models/trace/lantern/graph/graph-tsconfig.ref.json +33 -0
- package/models/trace/lantern/graph/graph.js +8 -0
- package/models/trace/lantern/graph/graph.js.map +1 -0
- package/models/trace/lantern/graph/graph_node_typecheck-tsconfig.json +62 -0
- package/models/trace/lantern/graph/graph_node_typecheck.stamp +0 -0
- package/models/trace/lantern/lantern.js +10 -0
- package/models/trace/lantern/lantern.js.map +1 -0
- package/models/trace/lantern/metrics/FirstContentfulPaint.js +137 -0
- package/models/trace/lantern/metrics/FirstContentfulPaint.js.map +1 -0
- package/models/trace/lantern/metrics/Interactive.js +68 -0
- package/models/trace/lantern/metrics/Interactive.js.map +1 -0
- package/models/trace/lantern/metrics/LargestContentfulPaint.js +75 -0
- package/models/trace/lantern/metrics/LargestContentfulPaint.js.map +1 -0
- package/models/trace/lantern/metrics/MaxPotentialFID.js +49 -0
- package/models/trace/lantern/metrics/MaxPotentialFID.js.map +1 -0
- package/models/trace/lantern/metrics/Metric.js +69 -0
- package/models/trace/lantern/metrics/Metric.js.map +1 -0
- package/models/trace/lantern/metrics/SpeedIndex.js +102 -0
- package/models/trace/lantern/metrics/SpeedIndex.js.map +1 -0
- package/models/trace/lantern/metrics/TBTUtils.js +65 -0
- package/models/trace/lantern/metrics/TBTUtils.js.map +1 -0
- package/models/trace/lantern/metrics/TotalBlockingTime.js +79 -0
- package/models/trace/lantern/metrics/TotalBlockingTime.js.map +1 -0
- package/models/trace/lantern/metrics/bundle-tsconfig.json +59 -0
- package/models/trace/lantern/metrics/bundle-tsconfig.ref.json +27 -0
- package/models/trace/lantern/metrics/foundation_unittests-tsconfig.json +76 -0
- package/models/trace/lantern/metrics/foundation_unittests-tsconfig.ref.json +43 -0
- package/models/trace/lantern/metrics/foundation_unittests_node_typecheck-tsconfig.json +72 -0
- package/models/trace/lantern/metrics/metrics-tsconfig.json +75 -0
- package/models/trace/lantern/metrics/metrics-tsconfig.ref.json +43 -0
- package/models/trace/lantern/metrics/metrics.js +12 -0
- package/models/trace/lantern/metrics/metrics.js.map +1 -0
- package/models/trace/lantern/metrics/metrics_node_typecheck-tsconfig.json +72 -0
- package/models/trace/lantern/metrics/metrics_node_typecheck.stamp +0 -0
- package/models/trace/lantern/simulation/ConnectionPool.js +116 -0
- package/models/trace/lantern/simulation/ConnectionPool.js.map +1 -0
- package/models/trace/lantern/simulation/Constants.js +45 -0
- package/models/trace/lantern/simulation/Constants.js.map +1 -0
- package/models/trace/lantern/simulation/DNSCache.js +48 -0
- package/models/trace/lantern/simulation/DNSCache.js.map +1 -0
- package/models/trace/lantern/simulation/SimulationTimingMap.js +135 -0
- package/models/trace/lantern/simulation/SimulationTimingMap.js.map +1 -0
- package/models/trace/lantern/simulation/Simulator.js +457 -0
- package/models/trace/lantern/simulation/Simulator.js.map +1 -0
- package/models/trace/lantern/simulation/TCPConnection.d.ts +4 -4
- package/models/trace/lantern/simulation/TCPConnection.js +155 -0
- package/models/trace/lantern/simulation/TCPConnection.js.map +1 -0
- package/models/trace/lantern/simulation/bundle-tsconfig.json +59 -0
- package/models/trace/lantern/simulation/bundle-tsconfig.ref.json +27 -0
- package/models/trace/lantern/simulation/foundation_unittests-tsconfig.json +75 -0
- package/models/trace/lantern/simulation/foundation_unittests-tsconfig.ref.json +42 -0
- package/models/trace/lantern/simulation/foundation_unittests_node_typecheck-tsconfig.json +71 -0
- package/models/trace/lantern/simulation/simulation-tsconfig.json +70 -0
- package/models/trace/lantern/simulation/simulation-tsconfig.ref.json +38 -0
- package/models/trace/lantern/simulation/simulation.js +10 -0
- package/models/trace/lantern/simulation/simulation.js.map +1 -0
- package/models/trace/lantern/simulation/simulation_node_typecheck-tsconfig.json +67 -0
- package/models/trace/lantern/simulation/simulation_node_typecheck.stamp +0 -0
- package/models/trace/lantern/testing/bundle-tsconfig.json +60 -0
- package/models/trace/lantern/testing/bundle-tsconfig.ref.json +27 -0
- package/models/trace/lantern/testing/testing-tsconfig.json +63 -0
- package/models/trace/lantern/testing/testing-tsconfig.ref.json +30 -0
- package/models/trace/lantern/types/Lantern.d.ts +34 -19
- package/models/trace/lantern/types/Lantern.js +25 -0
- package/models/trace/lantern/types/Lantern.js.map +1 -0
- package/models/trace/lantern/types/bundle-tsconfig.json +59 -0
- package/models/trace/lantern/types/bundle-tsconfig.ref.json +27 -0
- package/models/trace/lantern/types/types-tsconfig.json +59 -0
- package/models/trace/lantern/types/types-tsconfig.ref.json +27 -0
- package/models/trace/lantern/types/types.js +5 -0
- package/models/trace/lantern/types/types.js.map +1 -0
- package/models/trace/lantern/types/types_node_typecheck-tsconfig.json +56 -0
- package/models/trace/lantern/types/types_node_typecheck.stamp +0 -0
- package/models/trace/trace-tsconfig.json +89 -0
- package/models/trace/trace-tsconfig.ref.json +57 -0
- package/models/trace/trace.js +16 -544
- package/models/trace/trace.js.map +1 -0
- package/models/trace/trace_node_typecheck-tsconfig.json +86 -0
- package/models/trace/trace_node_typecheck.stamp +0 -0
- package/models/trace/types/Configuration.d.ts +2 -2
- package/models/trace/types/Configuration.js +19 -0
- package/models/trace/types/Configuration.js.map +1 -0
- package/models/trace/types/Extensions.d.ts +1 -1
- package/models/trace/types/Extensions.js +38 -0
- package/models/trace/types/Extensions.js.map +1 -0
- package/models/trace/types/File.d.ts +9 -3
- package/models/trace/types/File.js +92 -0
- package/models/trace/types/File.js.map +1 -0
- package/models/trace/types/Overlays.d.ts +4 -3
- package/models/trace/types/Overlays.js +5 -0
- package/models/trace/types/Overlays.js.map +1 -0
- package/models/trace/types/Timing.js +16 -0
- package/models/trace/types/Timing.js.map +1 -0
- package/models/trace/types/TraceEvents.d.ts +205 -140
- package/models/trace/types/TraceEvents.js +983 -0
- package/models/trace/types/TraceEvents.js.map +1 -0
- package/models/trace/types/bundle-tsconfig.json +59 -0
- package/models/trace/types/bundle-tsconfig.ref.json +27 -0
- package/models/trace/types/foundation_unittests-tsconfig.json +67 -0
- package/models/trace/types/foundation_unittests-tsconfig.ref.json +34 -0
- package/models/trace/types/foundation_unittests_node_typecheck-tsconfig.json +63 -0
- package/models/trace/types/types-tsconfig.json +76 -0
- package/models/trace/types/types-tsconfig.ref.json +44 -0
- package/models/trace/types/types.js +10 -0
- package/models/trace/types/types.js.map +1 -0
- package/models/trace/types/types_node_typecheck-tsconfig.json +73 -0
- package/models/trace/types/types_node_typecheck.stamp +0 -0
- package/package.json +8 -37
- package/test/invalid-animation-events.json.gz +0 -0
- package/test/test-trace-engine.mjs +191 -0
- package/third_party/legacy-javascript/bundle-tsconfig.json +59 -0
- package/third_party/legacy-javascript/bundle-tsconfig.ref.json +27 -0
- package/third_party/legacy-javascript/legacy-javascript-tsconfig.ref.json +15 -0
- package/third_party/legacy-javascript/legacy-javascript.js +3 -0
- package/third_party/legacy-javascript/legacy-javascript.js.map +1 -0
- package/third_party/legacy-javascript/lib/legacy-javascript.js +1119 -0
- package/third_party/marked/marked.d.ts +1 -0
- package/third_party/marked/marked.js +1 -0
- package/third_party/third-party-web/third-party-web.d.ts +1 -2
- package/third_party/third-party-web/third-party-web.js +1 -0
- package/tsconfig.json +29 -0
- package/core/common/Base64.d.ts +0 -12
- package/core/common/CharacterIdMap.d.ts +0 -5
- package/core/common/Color.d.ts +0 -357
- package/core/common/ColorConverter.d.ts +0 -26
- package/core/common/ColorUtils.d.ts +0 -45
- package/core/common/Console.d.ts +0 -54
- package/core/common/Debouncer.d.ts +0 -8
- package/core/common/EventTarget.d.ts +0 -22
- package/core/common/Gzip.d.ts +0 -23
- package/core/common/JavaScriptMetaData.d.ts +0 -20
- package/core/common/Lazy.d.ts +0 -4
- package/core/common/MapWithDefault.d.ts +0 -9
- package/core/common/Mutex.d.ts +0 -13
- package/core/common/Object.d.ts +0 -20
- package/core/common/Progress.d.ts +0 -47
- package/core/common/ResolverBase.d.ts +0 -29
- package/core/common/ResourceType.d.ts +0 -52
- package/core/common/ReturnToPanel.d.ts +0 -10
- package/core/common/Revealer.d.ts +0 -66
- package/core/common/Runnable.d.ts +0 -14
- package/core/common/SegmentedRange.d.ts +0 -14
- package/core/common/SettingRegistration.d.ts +0 -136
- package/core/common/Settings.d.ts +0 -226
- package/core/common/SimpleHistoryManager.d.ts +0 -20
- package/core/common/Srcset.d.ts +0 -16
- package/core/common/StringOutputStream.d.ts +0 -10
- package/core/common/TextDictionary.d.ts +0 -11
- package/core/common/Throttler.d.ts +0 -12
- package/core/common/Trie.d.ts +0 -24
- package/core/common/VersionController.d.ts +0 -85
- package/core/host/AidaClient.d.ts +0 -73
- package/core/host/AidaClientTypes.d.ts +0 -355
- package/core/host/AidaGcaTranslation.d.ts +0 -10
- package/core/host/DispatchHttpRequestClient.d.ts +0 -14
- package/core/host/GcaClient.d.ts +0 -14
- package/core/host/GcaTypes.d.ts +0 -411
- package/core/host/GdpClient.d.ts +0 -84
- package/core/host/InspectorFrontendHost.d.ts +0 -29
- package/core/host/InspectorFrontendHostAPI.d.ts +0 -425
- package/core/host/InspectorFrontendHostStub.d.ts +0 -151
- package/core/host/Platform.d.ts +0 -11
- package/core/host/ResourceLoader.d.ts +0 -15
- package/core/host/UserMetrics.d.ts +0 -116
- package/core/host/UserMetricsEnums.d.ts +0 -883
- package/core/i18n/ByteUtilities.d.ts +0 -11
- package/core/i18n/DevToolsLocale.d.ts +0 -41
- package/core/i18n/NumberFormatter.d.ts +0 -11
- package/core/i18n/i18nImpl.d.ts +0 -64
- package/core/i18n/i18nTypes.d.ts +0 -5
- package/core/i18n/locales.d.ts +0 -15
- package/core/i18n/time-utilities.d.ts +0 -16
- package/core/platform/browser/HostRuntime.d.ts +0 -2
- package/core/platform/browser/browser.d.ts +0 -2
- package/core/platform/node/HostRuntime.d.ts +0 -2
- package/core/platform/node/node.d.ts +0 -2
- package/core/protocol_client/CDPConnection.d.ts +0 -77
- package/core/protocol_client/ConnectionTransport.d.ts +0 -9
- package/core/protocol_client/DevToolsCDPConnection.d.ts +0 -16
- package/core/protocol_client/InspectorBackend.d.ts +0 -223
- package/core/protocol_client/protocol_client.d.ts +0 -5
- package/core/root/DevToolsContext.d.ts +0 -34
- package/core/root/ExperimentNames.d.ts +0 -8
- package/core/root/Runtime.d.ts +0 -351
- package/core/sdk/AccessibilityModel.d.ts +0 -76
- package/core/sdk/AnimationModel.d.ts +0 -161
- package/core/sdk/AutofillModel.d.ts +0 -23
- package/core/sdk/CPUProfilerModel.d.ts +0 -46
- package/core/sdk/CPUThrottlingManager.d.ts +0 -47
- package/core/sdk/CSSContainerQuery.d.ts +0 -42
- package/core/sdk/CSSFontFace.d.ts +0 -10
- package/core/sdk/CSSLayer.d.ts +0 -9
- package/core/sdk/CSSLocation.d.ts +0 -14
- package/core/sdk/CSSMatchedStyles.d.ts +0 -138
- package/core/sdk/CSSMedia.d.ts +0 -36
- package/core/sdk/CSSMetadata.d.ts +0 -87
- package/core/sdk/CSSModel.d.ts +0 -180
- package/core/sdk/CSSNavigation.d.ts +0 -10
- package/core/sdk/CSSProperty.d.ts +0 -53
- package/core/sdk/CSSPropertyParser.d.ts +0 -131
- package/core/sdk/CSSPropertyParserMatchers.d.ts +0 -442
- package/core/sdk/CSSQuery.d.ts +0 -22
- package/core/sdk/CSSRule.d.ts +0 -132
- package/core/sdk/CSSScope.d.ts +0 -9
- package/core/sdk/CSSStartingStyle.d.ts +0 -9
- package/core/sdk/CSSStyleDeclaration.d.ts +0 -38
- package/core/sdk/CSSStyleSheetHeader.d.ts +0 -53
- package/core/sdk/CSSSupports.d.ts +0 -10
- package/core/sdk/CategorizedBreakpoint.d.ts +0 -42
- package/core/sdk/ChildTargetManager.d.ts +0 -40
- package/core/sdk/CompilerSourceMappingContentProvider.d.ts +0 -12
- package/core/sdk/Connections.d.ts +0 -36
- package/core/sdk/ConsoleModel.d.ts +0 -127
- package/core/sdk/ConsoleModelTypes.d.ts +0 -6
- package/core/sdk/Cookie.d.ts +0 -68
- package/core/sdk/CookieModel.d.ts +0 -31
- package/core/sdk/CookieParser.d.ts +0 -14
- package/core/sdk/CrashReportContextModel.d.ts +0 -8
- package/core/sdk/DOMDebuggerModel.d.ts +0 -127
- package/core/sdk/DOMModel.d.ts +0 -436
- package/core/sdk/DOMStorageModel.d.ts +0 -79
- package/core/sdk/DebuggerModel.d.ts +0 -272
- package/core/sdk/EmulationModel.d.ts +0 -95
- package/core/sdk/EnhancedTracesParser.d.ts +0 -105
- package/core/sdk/EventBreakpointsModel.d.ts +0 -66
- package/core/sdk/FrameAssociated.d.ts +0 -6
- package/core/sdk/FrameManager.d.ts +0 -68
- package/core/sdk/HeapProfilerModel.d.ts +0 -75
- package/core/sdk/HttpReasonPhraseStrings.d.ts +0 -5
- package/core/sdk/IOModel.d.ts +0 -10
- package/core/sdk/IsolateManager.d.ts +0 -53
- package/core/sdk/IssuesModel.d.ts +0 -28
- package/core/sdk/LayerTreeBase.d.ts +0 -70
- package/core/sdk/LogModel.d.ts +0 -20
- package/core/sdk/NetworkManager.d.ts +0 -418
- package/core/sdk/NetworkRequest.d.ts +0 -469
- package/core/sdk/NetworkRequestAccess.d.ts +0 -91
- package/core/sdk/OverlayColorGenerator.d.ts +0 -14
- package/core/sdk/OverlayModel.d.ts +0 -186
- package/core/sdk/OverlayPersistentHighlighter.d.ts +0 -116
- package/core/sdk/PageFunctions.d.ts +0 -22
- package/core/sdk/PageLoad.d.ts +0 -14
- package/core/sdk/PageResourceLoader.d.ts +0 -111
- package/core/sdk/PaintProfiler.d.ts +0 -43
- package/core/sdk/PerformanceMetricsModel.d.ts +0 -12
- package/core/sdk/PreloadingModel.d.ts +0 -146
- package/core/sdk/RehydratingConnection.d.ts +0 -73
- package/core/sdk/RehydratingObject.d.ts +0 -59
- package/core/sdk/RemoteObject.d.ts +0 -210
- package/core/sdk/Resource.d.ts +0 -36
- package/core/sdk/ResourceTreeModel.d.ts +0 -278
- package/core/sdk/RuntimeModel.d.ts +0 -163
- package/core/sdk/SDKModel.d.ts +0 -30
- package/core/sdk/SDKSettings.d.ts +0 -53
- package/core/sdk/ScopeTreeCache.d.ts +0 -21
- package/core/sdk/ScreenCaptureModel.d.ts +0 -69
- package/core/sdk/Script.d.ts +0 -134
- package/core/sdk/SecurityOrigin.d.ts +0 -108
- package/core/sdk/SecurityOriginManager.d.ts +0 -23
- package/core/sdk/ServerSentEvents.d.ts +0 -18
- package/core/sdk/ServerSentEventsProtocol.d.ts +0 -18
- package/core/sdk/ServerTiming.d.ts +0 -24
- package/core/sdk/ServiceWorkerCacheModel.d.ts +0 -71
- package/core/sdk/ServiceWorkerManager.d.ts +0 -125
- package/core/sdk/SourceMap.d.ts +0 -197
- package/core/sdk/SourceMapCache.d.ts +0 -12
- package/core/sdk/SourceMapFunctionRanges.d.ts +0 -26
- package/core/sdk/SourceMapManager.d.ts +0 -46
- package/core/sdk/SourceMapRangeMappings.d.ts +0 -15
- package/core/sdk/SourceMapScopeChainEntry.d.ts +0 -23
- package/core/sdk/SourceMapScopesInfo.d.ts +0 -109
- package/core/sdk/StorageBucketsModel.d.ts +0 -48
- package/core/sdk/StorageKeyManager.d.ts +0 -38
- package/core/sdk/Target.d.ts +0 -79
- package/core/sdk/TargetManager.d.ts +0 -92
- package/core/sdk/TraceObject.d.ts +0 -43
- package/core/sdk/WebAuthnModel.d.ts +0 -29
- package/core/text_utils/CodeMirrorUtils.d.ts +0 -3
- package/core/text_utils/ContentData.d.ts +0 -94
- package/core/text_utils/ContentProvider.d.ts +0 -42
- package/core/text_utils/StaticContentProvider.d.ts +0 -13
- package/core/text_utils/StreamingContentData.d.ts +0 -49
- package/core/text_utils/Text.d.ts +0 -19
- package/core/text_utils/TextCursor.d.ts +0 -9
- package/core/text_utils/TextRange.d.ts +0 -81
- package/core/text_utils/TextUtils.d.ts +0 -97
- package/core/text_utils/WasmDisassembly.d.ts +0 -29
- package/core/text_utils/text_utils.d.ts +0 -11
- package/entrypoints/formatter_actions/formatter_actions.d.ts +0 -48
- package/generated/InspectorBackendCommands.d.ts +0 -14
- package/generated/SupportedCSSProperties.d.ts +0 -18
- package/generated/protocol-mapping.d.ts +0 -5930
- package/generated/protocol-proxy-api.d.ts +0 -5396
- package/index.d.ts +0 -2
- package/index.js +0 -6
- package/models/crux-manager/CrUXManager.d.ts +0 -107
- package/models/emulation/DeviceModeModel.d.ts +0 -156
- package/models/emulation/EmulatedDevices.d.ts +0 -148
- package/models/emulation/emulation.d.ts +0 -3
- package/models/formatter/FormatterWorkerPool.d.ts +0 -58
- package/models/formatter/ScriptFormatter.d.ts +0 -11
- package/models/formatter/formatter.d.ts +0 -3
- package/third_party/codemirror.next/codemirror.next.d.ts +0 -9196
- package/third_party/i18n/i18n-impl.d.ts +0 -25
- package/third_party/i18n/i18n.d.ts +0 -3
- package/third_party/i18n/localized-string-set.d.ts +0 -49
- package/third_party/intl-messageformat/intl-messageformat.d.ts +0 -1
- package/third_party/source-map-scopes-codec/package/src/builder/builder.d.ts +0 -67
- package/third_party/source-map-scopes-codec/package/src/builder/safe_builder.d.ts +0 -38
- package/third_party/source-map-scopes-codec/package/src/codec.d.ts +0 -48
- package/third_party/source-map-scopes-codec/package/src/decode/decode.d.ts +0 -31
- package/third_party/source-map-scopes-codec/package/src/encode/encode.d.ts +0 -8
- package/third_party/source-map-scopes-codec/package/src/encode/encoder.d.ts +0 -6
- package/third_party/source-map-scopes-codec/package/src/mod.d.ts +0 -5
- package/third_party/source-map-scopes-codec/package/src/scopes.d.ts +0 -168
- package/third_party/source-map-scopes-codec/package/src/util.d.ts +0 -5
- package/third_party/source-map-scopes-codec/package/src/vlq.d.ts +0 -14
- package/third_party/source-map-scopes-codec/source-map-scopes-codec.d.ts +0 -1
- package/third_party/third-party-web/lib/nostats-subset.d.ts +0 -2
- package/third_party/third-party-web/package/lib/index.d.ts +0 -34
- package/third_party/third-party-web/package/lib/subsets/nostats.d.ts +0 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// Copyright 2023 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
export var MimeType;
|
|
5
|
+
(function (MimeType) {
|
|
6
|
+
MimeType["HTML"] = "text/html";
|
|
7
|
+
MimeType["XML"] = "text/xml";
|
|
8
|
+
MimeType["PLAIN"] = "text/plain";
|
|
9
|
+
MimeType["XHTML"] = "application/xhtml+xml";
|
|
10
|
+
MimeType["SVG"] = "image/svg+xml";
|
|
11
|
+
MimeType["CSS"] = "text/css";
|
|
12
|
+
MimeType["XSL"] = "text/xsl";
|
|
13
|
+
MimeType["VTT"] = "text/vtt";
|
|
14
|
+
MimeType["PDF"] = "application/pdf";
|
|
15
|
+
MimeType["EVENTSTREAM"] = "text/event-stream";
|
|
16
|
+
})(MimeType || (MimeType = {}));
|
|
17
|
+
/**
|
|
18
|
+
* MIME types other than the ones with the "text" type that have text content.
|
|
19
|
+
*/
|
|
20
|
+
const ADDITIONAL_TEXT_MIME_TYPES = new Set([
|
|
21
|
+
'application/ecmascript',
|
|
22
|
+
'application/javascript',
|
|
23
|
+
'application/json',
|
|
24
|
+
'application/json+protobuf',
|
|
25
|
+
'application/mpegurl',
|
|
26
|
+
'application/vnd.apple.mpegurl',
|
|
27
|
+
'application/vnd.dart',
|
|
28
|
+
'application/xml',
|
|
29
|
+
'application/x-aspx',
|
|
30
|
+
'application/x-javascript',
|
|
31
|
+
'application/x-jsp',
|
|
32
|
+
'application/x-httpd-php',
|
|
33
|
+
'application/x-mpegurl',
|
|
34
|
+
'audio/mpegurl',
|
|
35
|
+
'audio/x-mpegurl',
|
|
36
|
+
]);
|
|
37
|
+
/**
|
|
38
|
+
* @returns true iff `mimeType` has textual content. Concretely we return true if:
|
|
39
|
+
* - `mimeType` starts with "text/" or "multipart/"
|
|
40
|
+
* - `mimeType` ends with "+xml"
|
|
41
|
+
* - `mimeType` contains "json"
|
|
42
|
+
* - if `mimeType` is one of a predefined list textual mime types.
|
|
43
|
+
*/
|
|
44
|
+
export function isTextType(mimeType) {
|
|
45
|
+
return mimeType.startsWith('text/') || mimeType.startsWith('multipart/') || mimeType.includes('json') ||
|
|
46
|
+
mimeType.endsWith('+xml') || ADDITIONAL_TEXT_MIME_TYPES.has(mimeType);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Port of net::HttpUtils::ParseContentType to extract mimeType and charset from
|
|
50
|
+
* the 'Content-Type' header.
|
|
51
|
+
*/
|
|
52
|
+
export function parseContentType(contentType) {
|
|
53
|
+
if (contentType === '*/*') {
|
|
54
|
+
return { mimeType: null, charset: null };
|
|
55
|
+
}
|
|
56
|
+
const { mimeType, params } = parseMimeType(contentType);
|
|
57
|
+
const charset = params.get('charset')?.toLowerCase().trim() ?? null;
|
|
58
|
+
return { mimeType, charset };
|
|
59
|
+
}
|
|
60
|
+
function parseMimeType(contentType) {
|
|
61
|
+
// Remove any leading and trailing whitespace. Note that String.prototype.trim removes a lot more
|
|
62
|
+
// than what the spec considers whitespace. We are fine with that.
|
|
63
|
+
contentType = contentType.trim();
|
|
64
|
+
// The mimetype is basically everything until the first ';' (but trimmed).
|
|
65
|
+
let mimeTypeEnd = findFirstIndexOf(contentType, ' \t;(');
|
|
66
|
+
if (mimeTypeEnd < 0) {
|
|
67
|
+
mimeTypeEnd = contentType.length;
|
|
68
|
+
}
|
|
69
|
+
const slashPos = contentType.indexOf('/');
|
|
70
|
+
if (slashPos < 0 || slashPos > mimeTypeEnd) {
|
|
71
|
+
return { mimeType: null, params: new Map() };
|
|
72
|
+
}
|
|
73
|
+
const mimeType = contentType.substring(0, mimeTypeEnd).toLowerCase();
|
|
74
|
+
// Iterate over parameters. We can't split the string around semicolons because quoted
|
|
75
|
+
// strings may include semicolons.
|
|
76
|
+
const params = new Map();
|
|
77
|
+
let offset = contentType.indexOf(';', mimeTypeEnd);
|
|
78
|
+
while (offset >= 0 && offset < contentType.length) {
|
|
79
|
+
// Trim off the semicolon.
|
|
80
|
+
++offset;
|
|
81
|
+
// Trim off whitespace
|
|
82
|
+
offset = findFirstIndexNotOf(contentType, ' \t', offset);
|
|
83
|
+
if (offset < 0) {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
const paramNameStart = offset;
|
|
87
|
+
// Extend parameter name until we run into semicolon or equals sign.
|
|
88
|
+
offset = findFirstIndexOf(contentType, ';=', offset);
|
|
89
|
+
if (offset < 0 || contentType[offset] === ';') {
|
|
90
|
+
// Nothing more to do if no more input or there is no parameter value.
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const paramName = contentType.substring(paramNameStart, offset).toLowerCase();
|
|
94
|
+
// Trim off the '='.
|
|
95
|
+
++offset;
|
|
96
|
+
// Trim off whitespace.
|
|
97
|
+
offset = findFirstIndexNotOf(contentType, ' \t', offset);
|
|
98
|
+
let paramValue = '';
|
|
99
|
+
if (offset < 0 || contentType[offset] === ';') {
|
|
100
|
+
// Nothing to do here: the value is an unquoted string of only whitespace.
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
else if (contentType[offset] !== '"') {
|
|
104
|
+
// Not a quote so we can copy the value as-is.
|
|
105
|
+
const valueStart = offset;
|
|
106
|
+
offset = contentType.indexOf(';', offset);
|
|
107
|
+
const valueEnd = offset >= 0 ? offset : contentType.length;
|
|
108
|
+
paramValue = contentType.substring(valueStart, valueEnd).trimEnd();
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
// Otherwise append data with special handling for backslashes, until a close quote.
|
|
112
|
+
// Don't trim whitespace for quoted strings.
|
|
113
|
+
// Trim off the opening quote '"'
|
|
114
|
+
++offset;
|
|
115
|
+
while (offset < contentType.length && contentType[offset] !== '"') {
|
|
116
|
+
// Skip over backslash and append the next character, when not at the end
|
|
117
|
+
// of the string. Otherwise, copy the next character (which may be a backslash).
|
|
118
|
+
if (contentType[offset] === '\\' && offset + 1 < contentType.length) {
|
|
119
|
+
++offset;
|
|
120
|
+
}
|
|
121
|
+
paramValue += contentType[offset];
|
|
122
|
+
++offset;
|
|
123
|
+
}
|
|
124
|
+
offset = contentType.indexOf(';', offset);
|
|
125
|
+
}
|
|
126
|
+
if (!params.has(paramName)) {
|
|
127
|
+
// The first one wins!
|
|
128
|
+
params.set(paramName, paramValue);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return { mimeType, params };
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* @returns the smallest index of any character in 'characters' or -1 if none of
|
|
135
|
+
* the characters occur in 'searchString'
|
|
136
|
+
*/
|
|
137
|
+
function findFirstIndexOf(searchString, characters, pos = 0) {
|
|
138
|
+
for (let i = pos; i < searchString.length; i++) {
|
|
139
|
+
if (characters.includes(searchString[i])) {
|
|
140
|
+
return i;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return -1;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* @returns the smallest index of any character not in 'characters' or -1 if only
|
|
147
|
+
* 'characters' occur in 'searchString'
|
|
148
|
+
*/
|
|
149
|
+
function findFirstIndexNotOf(searchString, characters, pos = 0) {
|
|
150
|
+
for (let i = pos; i < searchString.length; i++) {
|
|
151
|
+
if (!characters.includes(searchString[i])) {
|
|
152
|
+
return i;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return -1;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=MimeType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MimeType.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/MimeType.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAN,IAAkB,QAWjB;AAXD,WAAkB,QAAQ;IACxB,8BAAkB,CAAA;IAClB,4BAAgB,CAAA;IAChB,gCAAoB,CAAA;IACpB,2CAA+B,CAAA;IAC/B,iCAAqB,CAAA;IACrB,4BAAgB,CAAA;IAChB,4BAAgB,CAAA;IAChB,4BAAgB,CAAA;IAChB,mCAAuB,CAAA;IACvB,6CAAiC,CAAA;AACnC,CAAC,EAXiB,QAAQ,KAAR,QAAQ,QAWzB;AAED;;GAEG;AACH,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACzC,wBAAwB;IACxB,wBAAwB;IACxB,kBAAkB;IAClB,2BAA2B;IAC3B,qBAAqB;IACrB,+BAA+B;IAC/B,sBAAsB;IACtB,iBAAiB;IACjB,oBAAoB;IACpB,0BAA0B;IAC1B,mBAAmB;IACnB,yBAAyB;IACzB,uBAAuB;IACvB,eAAe;IACf,iBAAiB;CAClB,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;QACjG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,0BAA0B,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC5E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAmB;IAClD,IA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,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/C,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1C,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const enum MimeType {\n HTML = 'text/html',\n XML = 'text/xml',\n PLAIN = 'text/plain',\n XHTML = 'application/xhtml+xml',\n SVG = 'image/svg+xml',\n CSS = 'text/css',\n XSL = 'text/xsl',\n VTT = 'text/vtt',\n PDF = 'application/pdf',\n EVENTSTREAM = 'text/event-stream',\n}\n\n/**\n * MIME types other than the ones with the \"text\" type that have text content.\n */\nconst ADDITIONAL_TEXT_MIME_TYPES = new Set([\n 'application/ecmascript',\n 'application/javascript',\n 'application/json',\n 'application/json+protobuf',\n 'application/mpegurl',\n 'application/vnd.apple.mpegurl',\n 'application/vnd.dart',\n 'application/xml',\n 'application/x-aspx',\n 'application/x-javascript',\n 'application/x-jsp',\n 'application/x-httpd-php',\n 'application/x-mpegurl',\n 'audio/mpegurl',\n 'audio/x-mpegurl',\n]);\n\n/**\n * @returns true iff `mimeType` has textual content. Concretely we return true if:\n * - `mimeType` starts with \"text/\" or \"multipart/\"\n * - `mimeType` ends with \"+xml\"\n * - `mimeType` contains \"json\"\n * - if `mimeType` is one of a predefined list textual mime types.\n */\nexport function isTextType(mimeType: string): boolean {\n return mimeType.startsWith('text/') || mimeType.startsWith('multipart/') || mimeType.includes('json') ||\n mimeType.endsWith('+xml') || ADDITIONAL_TEXT_MIME_TYPES.has(mimeType);\n}\n\n/**\n * Port of net::HttpUtils::ParseContentType to extract mimeType and charset from\n * the 'Content-Type' header.\n */\nexport function parseContentType(contentType: string): {mimeType: string|null, charset: string|null} {\n if (contentType === '*/*') {\n return {mimeType: null, charset: null};\n }\n\n const {mimeType, params} = parseMimeType(contentType);\n const charset = params.get('charset')?.toLowerCase().trim() ?? null;\n return {mimeType, charset};\n}\n\nfunction parseMimeType(contentType: string): {mimeType: string|null, params: Map<string, string>} {\n // Remove any leading and trailing whitespace. Note that String.prototype.trim removes a lot more\n // than what the spec considers whitespace. We are fine with that.\n contentType = contentType.trim();\n\n // The mimetype is basically everything until the first ';' (but trimmed).\n let mimeTypeEnd = findFirstIndexOf(contentType, ' \\t;(');\n if (mimeTypeEnd < 0) {\n mimeTypeEnd = contentType.length;\n }\n\n const slashPos = contentType.indexOf('/');\n if (slashPos < 0 || slashPos > mimeTypeEnd) {\n return {mimeType: null, params: new Map()};\n }\n const mimeType = contentType.substring(0, mimeTypeEnd).toLowerCase();\n\n // Iterate over parameters. We can't split the string around semicolons because quoted\n // strings may include semicolons.\n const params = new Map<string, string>();\n let offset = contentType.indexOf(';', mimeTypeEnd);\n while (offset >= 0 && offset < contentType.length) {\n // Trim off the semicolon.\n ++offset;\n\n // Trim off whitespace\n offset = findFirstIndexNotOf(contentType, ' \\t', offset);\n if (offset < 0) {\n continue;\n }\n const paramNameStart = offset;\n\n // Extend parameter name until we run into semicolon or equals sign.\n offset = findFirstIndexOf(contentType, ';=', offset);\n if (offset < 0 || contentType[offset] === ';') {\n // Nothing more to do if no more input or there is no parameter value.\n continue;\n }\n\n const paramName = contentType.substring(paramNameStart, offset).toLowerCase();\n\n // Trim off the '='.\n ++offset;\n\n // Trim off whitespace.\n offset = findFirstIndexNotOf(contentType, ' \\t', offset);\n\n let paramValue = '';\n if (offset < 0 || contentType[offset] === ';') {\n // Nothing to do here: the value is an unquoted string of only whitespace.\n continue;\n } else if (contentType[offset] !== '\"') {\n // Not a quote so we can copy the value as-is.\n const valueStart = offset;\n offset = contentType.indexOf(';', offset);\n const valueEnd = offset >= 0 ? offset : contentType.length;\n\n paramValue = contentType.substring(valueStart, valueEnd).trimEnd();\n } else {\n // Otherwise append data with special handling for backslashes, until a close quote.\n // Don't trim whitespace for quoted strings.\n\n // Trim off the opening quote '\"'\n ++offset;\n\n while (offset < contentType.length && contentType[offset] !== '\"') {\n // Skip over backslash and append the next character, when not at the end\n // of the string. Otherwise, copy the next character (which may be a backslash).\n if (contentType[offset] === '\\\\' && offset + 1 < contentType.length) {\n ++offset;\n }\n paramValue += contentType[offset];\n ++offset;\n }\n\n offset = contentType.indexOf(';', offset);\n }\n if (!params.has(paramName)) {\n // The first one wins!\n params.set(paramName, paramValue);\n }\n }\n\n return {mimeType, params};\n}\n\n/**\n * @returns the smallest index of any character in 'characters' or -1 if none of\n * the characters occur in 'searchString'\n */\nfunction findFirstIndexOf(searchString: string, characters: string, pos = 0): number {\n for (let i = pos; i < searchString.length; i++) {\n if (characters.includes(searchString[i])) {\n return i;\n }\n }\n return -1;\n}\n\n/**\n * @returns the smallest index of any character not in 'characters' or -1 if only\n * 'characters' occur in 'searchString'\n */\nfunction findFirstIndexNotOf(searchString: string, characters: string, pos = 0): number {\n for (let i = pos; i < searchString.length; i++) {\n if (!characters.includes(searchString[i])) {\n return i;\n }\n }\n return -1;\n}\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Copyright 2020 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
export const clamp = (num, min, max) => {
|
|
5
|
+
let clampedNumber = num;
|
|
6
|
+
if (num < min) {
|
|
7
|
+
clampedNumber = min;
|
|
8
|
+
}
|
|
9
|
+
else if (num > max) {
|
|
10
|
+
clampedNumber = max;
|
|
11
|
+
}
|
|
12
|
+
return clampedNumber;
|
|
13
|
+
};
|
|
14
|
+
export const mod = (m, n) => {
|
|
15
|
+
return ((m % n) + n) % n;
|
|
16
|
+
};
|
|
17
|
+
export const toFixedIfFloating = (value) => {
|
|
18
|
+
if (!value || Number.isNaN(Number(value))) {
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
const number = Number(value);
|
|
22
|
+
return number % 1 ? number.toFixed(3) : String(number);
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Rounds a number (including float) down.
|
|
26
|
+
*/
|
|
27
|
+
export const floor = (value, precision = 0) => {
|
|
28
|
+
// Allows for rounding to the nearest whole number.
|
|
29
|
+
// Ex: 1 / 10 -> round down to nearest 10th place
|
|
30
|
+
// Ex: 1 / 5 -> round down to nearest 5
|
|
31
|
+
// Ex: 1 / 50 -> round down to nearest 50
|
|
32
|
+
if (precision > 0 && precision < 1) {
|
|
33
|
+
precision = 1 / precision;
|
|
34
|
+
return Math.floor(value / precision) * precision;
|
|
35
|
+
}
|
|
36
|
+
const mult = Math.pow(10, precision);
|
|
37
|
+
return Math.floor(value * mult) / mult;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Computes the great common divisor for two numbers.
|
|
41
|
+
* If the numbers are floats, they will be rounded to an integer.
|
|
42
|
+
*/
|
|
43
|
+
export const greatestCommonDivisor = (a, b) => {
|
|
44
|
+
a = Math.round(a);
|
|
45
|
+
b = Math.round(b);
|
|
46
|
+
while (b !== 0) {
|
|
47
|
+
const t = b;
|
|
48
|
+
b = a % b;
|
|
49
|
+
a = t;
|
|
50
|
+
}
|
|
51
|
+
return a;
|
|
52
|
+
};
|
|
53
|
+
const commonRatios = new Map([
|
|
54
|
+
['8∶5', '16∶10'],
|
|
55
|
+
]);
|
|
56
|
+
export const aspectRatio = (width, height) => {
|
|
57
|
+
const divisor = greatestCommonDivisor(width, height);
|
|
58
|
+
if (divisor !== 0) {
|
|
59
|
+
width /= divisor;
|
|
60
|
+
height /= divisor;
|
|
61
|
+
}
|
|
62
|
+
const result = `${width}∶${height}`;
|
|
63
|
+
return commonRatios.get(result) || result;
|
|
64
|
+
};
|
|
65
|
+
export const withThousandsSeparator = function (num) {
|
|
66
|
+
let str = String(num);
|
|
67
|
+
const re = /(\d+)(\d{3})/;
|
|
68
|
+
while (str.match(re)) {
|
|
69
|
+
str = str.replace(re, '$1\xA0$2');
|
|
70
|
+
} // \xa0 is a non-breaking space
|
|
71
|
+
return str;
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=NumberUtilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/NumberUtilities.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,GAAW,EAAU,EAAE;IACrE,IAAI,aAAa,GAAG,GAAG,CAAC;IACxB,IAAI,GAAG,GAAG,GAAG,EAAE,CAAC;QACd,aAAa,GAAG,GAAG,CAAC;IACtB,CAAC;SAAM,IAAI,GAAG,GAAG,GAAG,EAAE,CAAC;QACrB,aAAa,GAAG,GAAG,CAAC;IACtB,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE;IAClD,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAU,EAAE;IACzD,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAA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pB,CAAC;IACD,MAAM,MAAM,GAAG,GAAG,KAAK,IAAI,MAAM,EAAE,CAAC;IACpC,OAAO,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAS,GAAW;IACxD,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACtB,MAAM,EAAE,GAAG,cAAc,CAAC;IAC1B,OAAO,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;QACrB,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACpC,CAAC,CAAE,+BAA+B;IAClC,OAAO,GAAG,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const clamp = (num: number, min: number, max: number): number => {\n let clampedNumber = num;\n if (num < min) {\n clampedNumber = min;\n } else if (num > max) {\n clampedNumber = max;\n }\n return clampedNumber;\n};\n\nexport const mod = (m: number, n: number): number => {\n return ((m % n) + n) % n;\n};\n\nexport const toFixedIfFloating = (value: string): string => {\n if (!value || Number.isNaN(Number(value))) {\n return value;\n }\n const number = Number(value);\n return number % 1 ? number.toFixed(3) : String(number);\n};\n\n/**\n * Rounds a number (including float) down.\n */\nexport const floor = (value: number, precision = 0): number => {\n // Allows for rounding to the nearest whole number.\n // Ex: 1 / 10 -> round down to nearest 10th place\n // Ex: 1 / 5 -> round down to nearest 5\n // Ex: 1 / 50 -> round down to nearest 50\n if (precision > 0 && precision < 1) {\n precision = 1 / precision;\n return Math.floor(value / precision) * precision;\n }\n\n const mult = Math.pow(10, precision);\n return Math.floor(value * mult) / mult;\n};\n\n/**\n * Computes the great common divisor for two numbers.\n * If the numbers are floats, they will be rounded to an integer.\n */\nexport const greatestCommonDivisor = (a: number, b: number): number => {\n a = Math.round(a);\n b = Math.round(b);\n while (b !== 0) {\n const t = b;\n b = a % b;\n a = t;\n }\n return a;\n};\n\nconst commonRatios = new Map([\n ['8∶5', '16∶10'],\n]);\n\nexport const aspectRatio = (width: number, height: number): string => {\n const divisor = greatestCommonDivisor(width, height);\n if (divisor !== 0) {\n width /= divisor;\n height /= divisor;\n }\n const result = `${width}∶${height}`;\n return commonRatios.get(result) || result;\n};\n\nexport const withThousandsSeparator = function(num: number): string {\n let str = String(num);\n const re = /(\\d+)(\\d{3})/;\n while (str.match(re)) {\n str = str.replace(re, '$1\\xA0$2');\n } // \\xa0 is a non-breaking space\n return str;\n};\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
export class Size {
|
|
5
|
+
width;
|
|
6
|
+
height;
|
|
7
|
+
constructor(width, height) {
|
|
8
|
+
this.width = width;
|
|
9
|
+
this.height = height;
|
|
10
|
+
}
|
|
11
|
+
clipTo(size) {
|
|
12
|
+
if (!size) {
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
return new Size(Math.min(this.width, size.width), Math.min(this.height, size.height));
|
|
16
|
+
}
|
|
17
|
+
scale(scale) {
|
|
18
|
+
return new Size(this.width * scale, this.height * scale);
|
|
19
|
+
}
|
|
20
|
+
isEqual(size) {
|
|
21
|
+
return size !== null && this.width === size.width && this.height === size.height;
|
|
22
|
+
}
|
|
23
|
+
widthToMax(size) {
|
|
24
|
+
return new Size(Math.max(this.width, (typeof size === 'number' ? size : size.width)), this.height);
|
|
25
|
+
}
|
|
26
|
+
addWidth(size) {
|
|
27
|
+
return new Size(this.width + (typeof size === 'number' ? size : size.width), this.height);
|
|
28
|
+
}
|
|
29
|
+
heightToMax(size) {
|
|
30
|
+
return new Size(this.width, Math.max(this.height, (typeof size === 'number' ? size : size.height)));
|
|
31
|
+
}
|
|
32
|
+
addHeight(size) {
|
|
33
|
+
return new Size(this.width, this.height + (typeof size === 'number' ? size : size.height));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=Size.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Size.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/Size.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,OAAO,IAAI;IACf,KAAK,CAAS;IACd,MAAM,CAAS;IACf,YAAY,KAAa,EAAE,MAAc;QACvC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,IAAgB;QACrB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACxF,CAAC;IAED,KAAK,CAAC,KAAa;QACjB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,CAAC,IAAe;QACrB,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC;IACnF,CAAC;IAED,UAAU,CAAC,IAAiB;QAC1B,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACrG,CAAC;IAED,QAAQ,CAAC,IAAiB;QACxB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5F,CAAC;IAED,WAAW,CAAC,IAAiB;QAC3B,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC;IAED,SAAS,CAAC,IAAiB;QACzB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7F,CAAC;CACF","sourcesContent":["// Copyright 2026 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport class Size {\n width: number;\n height: number;\n constructor(width: number, height: number) {\n this.width = width;\n this.height = height;\n }\n\n clipTo(size?: Size|null): Size {\n if (!size) {\n return this;\n }\n return new Size(Math.min(this.width, size.width), Math.min(this.height, size.height));\n }\n\n scale(scale: number): Size {\n return new Size(this.width * scale, this.height * scale);\n }\n\n isEqual(size: Size|null): boolean {\n return size !== null && this.width === size.width && this.height === size.height;\n }\n\n widthToMax(size: number|Size): Size {\n return new Size(Math.max(this.width, (typeof size === 'number' ? size : size.width)), this.height);\n }\n\n addWidth(size: number|Size): Size {\n return new Size(this.width + (typeof size === 'number' ? size : size.width), this.height);\n }\n\n heightToMax(size: number|Size): Size {\n return new Size(this.width, Math.max(this.height, (typeof size === 'number' ? size : size.height)));\n }\n\n addHeight(size: number|Size): Size {\n return new Size(this.width, this.height + (typeof size === 'number' ? size : size.height));\n }\n}\n"]}
|
|
@@ -104,3 +104,24 @@ export declare const stringifyWithPrecision: (s: number, precision?: number) =>
|
|
|
104
104
|
* Somewhat efficiently concatenates 2 base64 encoded strings.
|
|
105
105
|
*/
|
|
106
106
|
export declare const concatBase64: (lhs: string, rhs: string) => string;
|
|
107
|
+
/**
|
|
108
|
+
* Formats and escapes `value` so it can be safely written as a single CSV cell.
|
|
109
|
+
*
|
|
110
|
+
* This handles two separate layers of escaping:
|
|
111
|
+
* 1. Spreadsheet formula escaping (CWE-1236 & viewer fidelity):
|
|
112
|
+
* RFC 4180 double-quoting (`"=1+1"` or `"- Loading..."`) only groups text
|
|
113
|
+
* into a single CSV column; spreadsheet apps strip the outer `"` and still
|
|
114
|
+
* evaluate cells starting with `=`, `+`, `-`, or `@` as formulas (often
|
|
115
|
+
* resulting in `#NAME?` errors or unintended formula execution). Prefixing
|
|
116
|
+
* the value with a single quote (`'`) tells spreadsheet apps to treat the
|
|
117
|
+
* cell as literal text (and they hide the leading `'` when displaying it).
|
|
118
|
+
* - Example without commas: `=SUM(A1:A2)` -> `'=SUM(A1:A2)`
|
|
119
|
+
* 2. RFC 4180 structural CSV quoting:
|
|
120
|
+
* If the cell also contains commas (`,`), double quotes (`"`), or newlines,
|
|
121
|
+
* it is wrapped in `"..."` (with inner `"` doubled to `""`) so CSV parsers
|
|
122
|
+
* do not split the cell across columns or rows.
|
|
123
|
+
* - Example with commas: `=SUM(1,2)` -> `"'=SUM(1,2)"`
|
|
124
|
+
* - Example starting with a literal quote: `"=SUM(1,2)"` -> `"""=SUM(1,2)"""`
|
|
125
|
+
* (not treated as a formula since the first character is `"`, not `=`).
|
|
126
|
+
*/
|
|
127
|
+
export declare const escapeCsvCell: (value: string) => string;
|