@paulirish/trace_engine 0.0.67-beta.0 → 0.0.67-beta.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 (147) hide show
  1. package/README.md +60 -22
  2. package/core/common/ParsedURL.d.ts +8 -0
  3. package/core/common/Settings.d.ts +2 -0
  4. package/core/host/Platform.d.ts +5 -0
  5. package/core/host/UserMetricsEnums.d.ts +8 -3
  6. package/core/platform/StringUtilities.d.ts +21 -0
  7. package/core/root/ExperimentNames.d.ts +2 -1
  8. package/core/root/Runtime.d.ts +4 -2
  9. package/core/sdk/CSSModel.d.ts +5 -0
  10. package/core/sdk/CSSPropertyParser.d.ts +0 -5
  11. package/core/sdk/DOMModel.d.ts +8 -4
  12. package/core/sdk/DebuggerModel.d.ts +37 -4
  13. package/core/sdk/NetworkRequest.d.ts +30 -2
  14. package/core/sdk/ResourceTreeModel.d.ts +3 -1
  15. package/core/sdk/RuntimeModel.d.ts +1 -0
  16. package/core/sdk/SDKSettings.d.ts +1 -0
  17. package/core/sdk/SourceMap.d.ts +20 -6
  18. package/core/sdk/SourceMapFunctionRanges.d.ts +3 -6
  19. package/core/sdk/SourceMapScopesInfo.d.ts +98 -23
  20. package/core/text_utils/Markdown.d.ts +13 -0
  21. package/core/text_utils/text_utils.d.ts +2 -1
  22. package/entrypoints/formatter_actions/formatter_actions.d.ts +17 -0
  23. package/generated/protocol-mapping.d.ts +64 -9
  24. package/generated/protocol-proxy-api.d.ts +58 -7
  25. package/generated/protocol.d.ts +93 -30
  26. package/index.d.ts +2 -0
  27. package/locales/af.json +129 -126
  28. package/locales/am.json +128 -125
  29. package/locales/ar.json +130 -127
  30. package/locales/as.json +130 -127
  31. package/locales/az.json +130 -127
  32. package/locales/be.json +128 -125
  33. package/locales/bg.json +130 -127
  34. package/locales/bn.json +130 -127
  35. package/locales/bs.json +130 -127
  36. package/locales/ca.json +130 -127
  37. package/locales/cs.json +128 -125
  38. package/locales/cy.json +130 -127
  39. package/locales/da.json +129 -126
  40. package/locales/de.json +130 -127
  41. package/locales/el.json +130 -127
  42. package/locales/en-GB.json +130 -127
  43. package/locales/en-US.json +1058 -0
  44. package/locales/es-419.json +129 -126
  45. package/locales/es.json +130 -127
  46. package/locales/et.json +95 -92
  47. package/locales/eu.json +130 -127
  48. package/locales/fa.json +130 -127
  49. package/locales/fi.json +129 -126
  50. package/locales/fil.json +130 -127
  51. package/locales/fr-CA.json +130 -127
  52. package/locales/fr.json +130 -127
  53. package/locales/gl.json +130 -127
  54. package/locales/gu.json +130 -127
  55. package/locales/he.json +130 -127
  56. package/locales/hi.json +130 -127
  57. package/locales/hr.json +128 -125
  58. package/locales/hu.json +90 -87
  59. package/locales/hy.json +127 -124
  60. package/locales/id.json +130 -127
  61. package/locales/is.json +129 -126
  62. package/locales/it.json +130 -127
  63. package/locales/ja.json +130 -127
  64. package/locales/ka.json +129 -126
  65. package/locales/kk.json +38 -35
  66. package/locales/km.json +130 -127
  67. package/locales/kn.json +130 -127
  68. package/locales/ko.json +22 -19
  69. package/locales/ky.json +130 -127
  70. package/locales/lo.json +130 -127
  71. package/locales/lt.json +130 -127
  72. package/locales/lv.json +66 -63
  73. package/locales/mk.json +130 -127
  74. package/locales/ml.json +129 -126
  75. package/locales/mn.json +129 -126
  76. package/locales/mr.json +130 -127
  77. package/locales/ms.json +130 -127
  78. package/locales/my.json +130 -127
  79. package/locales/ne.json +128 -125
  80. package/locales/nl.json +129 -126
  81. package/locales/no.json +130 -127
  82. package/locales/or.json +130 -127
  83. package/locales/pa.json +130 -127
  84. package/locales/pl.json +130 -127
  85. package/locales/pt-PT.json +129 -126
  86. package/locales/pt.json +130 -127
  87. package/locales/ro.json +129 -126
  88. package/locales/ru.json +50 -47
  89. package/locales/si.json +130 -127
  90. package/locales/sk.json +130 -127
  91. package/locales/sl.json +130 -127
  92. package/locales/sq.json +129 -126
  93. package/locales/sr-Latn.json +130 -127
  94. package/locales/sr.json +130 -127
  95. package/locales/sv.json +130 -127
  96. package/locales/sw.json +130 -127
  97. package/locales/ta.json +129 -126
  98. package/locales/te.json +130 -127
  99. package/locales/th.json +92 -89
  100. package/locales/tr.json +129 -126
  101. package/locales/uk.json +128 -125
  102. package/locales/ur.json +130 -127
  103. package/locales/uz.json +126 -123
  104. package/locales/vi.json +130 -127
  105. package/locales/zh-HK.json +130 -127
  106. package/locales/zh-TW.json +130 -127
  107. package/locales/zh.json +130 -127
  108. package/locales/zu.json +129 -126
  109. package/models/emulation/DeviceModeModel.d.ts +1 -0
  110. package/models/formatter/FormatterWorkerPool.d.ts +2 -2
  111. package/models/formatter/ScriptFormatter.d.ts +2 -2
  112. package/models/trace/extras/StackTraceForEvent.d.ts +1 -1
  113. package/models/trace/handlers/AnimationFramesHandler.d.ts +1 -1
  114. package/models/trace/handlers/AsyncJSCallsHandler.d.ts +2 -2
  115. package/models/trace/handlers/ImagePaintingHandler.d.ts +2 -2
  116. package/models/trace/handlers/InitiatorsHandler.d.ts +2 -2
  117. package/models/trace/handlers/LayerTreeHandler.d.ts +1 -1
  118. package/models/trace/handlers/NetworkRequestsHandler.d.ts +1 -1
  119. package/models/trace/handlers/PageLoadMetricsHandler.d.ts +1 -1
  120. package/models/trace/handlers/ScriptsHandler.d.ts +1 -1
  121. package/models/trace/handlers/WarningsHandler.d.ts +1 -1
  122. package/models/trace/helpers/SamplesIntegrator.d.ts +3 -1
  123. package/models/trace/helpers/Trace.d.ts +2 -0
  124. package/models/trace/insights/CLSCulprits.d.ts +1 -1
  125. package/models/trace/insights/DuplicatedJavaScript.d.ts +1 -1
  126. package/models/trace/insights/ImageDelivery.d.ts +1 -0
  127. package/models/trace/lantern/core/NetworkAnalyzer.d.ts +1 -0
  128. package/models/trace/lantern/graph/CPUNode.d.ts +4 -2
  129. package/models/trace/lantern/simulation/TCPConnection.d.ts +4 -4
  130. package/models/trace/lantern/types/Lantern.d.ts +15 -0
  131. package/models/trace/trace.js +21 -4
  132. package/models/trace/types/Overlays.d.ts +4 -3
  133. package/models/trace/types/TraceEvents.d.ts +184 -124
  134. package/package.json +14 -4
  135. package/third_party/marked/marked.d.ts +2 -0
  136. package/third_party/marked/package/lib/marked.esm.d.ts +760 -0
  137. package/third_party/source-map-scopes-codec/package/src/builder/builder.d.ts +4 -1
  138. package/third_party/source-map-scopes-codec/package/src/builder/safe_builder.d.ts +3 -1
  139. package/third_party/source-map-scopes-codec/package/src/codec.d.ts +6 -5
  140. package/third_party/source-map-scopes-codec/package/src/decode/decode.d.ts +2 -0
  141. package/third_party/source-map-scopes-codec/package/src/encode/encoder.d.ts +4 -1
  142. package/third_party/source-map-scopes-codec/package/src/scopes.d.ts +4 -3
  143. package/third_party/source-map-scopes-codec/package/src/vlq.d.ts +1 -1
  144. package/models/trace/lantern/lantern.js +0 -8
  145. package/models/trace/types/Timing.js +0 -8
  146. package/models/trace/types/TraceEvents.js +0 -189
  147. package/models/trace/types/types.js +0 -8
@@ -11,7 +11,9 @@ import type { Binding, GeneratedRange, OriginalPosition, OriginalScope, ScopeInf
11
11
  */
12
12
  export declare class ScopeInfoBuilder {
13
13
  #private;
14
- addNullScope(): this;
14
+ addNullSource(): this;
15
+ startSource(): this;
16
+ endSource(): this;
15
17
  startScope(line: number, column: number, options?: {
16
18
  name?: string;
17
19
  kind?: string;
@@ -52,6 +54,7 @@ export declare class ScopeInfoBuilder {
52
54
  setRangeCallSite(callSite: OriginalPosition): this;
53
55
  endRange(line: number, column: number): this;
54
56
  build(): ScopeInfo;
57
+ protected get currentSourceScopes(): ReadonlyArray<OriginalScope> | null;
55
58
  protected get scopeStack(): ReadonlyArray<OriginalScope>;
56
59
  protected get rangeStack(): ReadonlyArray<GeneratedRange>;
57
60
  protected isKnownScope(scope: OriginalScope): boolean;
@@ -6,7 +6,9 @@ import { ScopeInfoBuilder, type ScopeKey } from "./builder.js";
6
6
  */
7
7
  export declare class SafeScopeInfoBuilder extends ScopeInfoBuilder {
8
8
  #private;
9
- addNullScope(): this;
9
+ addNullSource(): this;
10
+ startSource(): this;
11
+ endSource(): this;
10
12
  startScope(line: number, column: number, options?: {
11
13
  name?: string;
12
14
  kind?: string;
@@ -1,5 +1,4 @@
1
1
  export declare const enum Tag {
2
- EMPTY = 0,
3
2
  ORIGINAL_SCOPE_START = 1,
4
3
  ORIGINAL_SCOPE_END = 2,
5
4
  ORIGINAL_SCOPE_VARIABLES = 3,
@@ -8,10 +7,9 @@ export declare const enum Tag {
8
7
  GENERATED_RANGE_BINDINGS = 6,
9
8
  GENERATED_RANGE_SUBRANGE_BINDING = 7,
10
9
  GENERATED_RANGE_CALL_SITE = 8,
11
- VENDOR_EXTENSION = 99
10
+ VENDOR_EXTENSION = 21
12
11
  }
13
12
  export declare const enum EncodedTag {
14
- EMPTY = "A",// 0x0
15
13
  ORIGINAL_SCOPE_START = "B",// 0x1
16
14
  ORIGINAL_SCOPE_END = "C",// 0x2
17
15
  ORIGINAL_SCOPE_VARIABLES = "D",// 0x3
@@ -20,7 +18,7 @@ export declare const enum EncodedTag {
20
18
  GENERATED_RANGE_BINDINGS = "G",// 0x6
21
19
  GENERATED_RANGE_SUBRANGE_BINDING = "H",// 0x7
22
20
  GENERATED_RANGE_CALL_SITE = "I",// 0x8
23
- VENDOR_EXTENSION = "/"
21
+ VENDOR_EXTENSION = "V"
24
22
  }
25
23
  export declare const enum OriginalScopeFlags {
26
24
  HAS_NAME = 1,
@@ -44,5 +42,8 @@ export interface GeneratedRangeStartItem {
44
42
  flags: number;
45
43
  line?: number;
46
44
  column: number;
47
- definitionIdx?: number;
45
+ definition?: {
46
+ sourceIdx: number;
47
+ scopeIdx: number;
48
+ };
48
49
  }
@@ -11,7 +11,9 @@ import type { DecodedScopeInfo, Position, SourceMap } from "../scopes.ts";
11
11
  * - Encountering ORIGINAL_SCOPE_VARIABLES items outside a surrounding scope START/END.
12
12
  * - Encountering GENERATED_RANGE_BINDINGS items outside a surrounding range START/END.
13
13
  * - Miss-matches between the number of variables in a scope vs the number of value expressions in the ranges.
14
+ * - GENERATED_RANGE_SUBRANGE_BINDING items whose variable index is out of bounds of the range's bindings.
14
15
  * - Out-of-bound indices into the "names" array.
16
+ * - Index source maps with sections that are index source maps themselves.
15
17
  */
16
18
  export declare const enum DecodeMode {
17
19
  STRICT = 1,
@@ -2,5 +2,8 @@ import type { ScopeInfo } from "../scopes.ts";
2
2
  export declare class Encoder {
3
3
  #private;
4
4
  constructor(info: ScopeInfo, names: string[]);
5
- encode(): string;
5
+ encode(): {
6
+ scopes: (string | null)[];
7
+ ranges: string[];
8
+ };
6
9
  }
@@ -3,9 +3,9 @@
3
3
  */
4
4
  export interface ScopeInfo {
5
5
  /**
6
- * The length of {@linkcode scopes} must match the length of "sources" in the source map JSON. Each entry describes the scope tree of the corresponding source file.
6
+ * The length of {@linkcode scopes} must match the length of "sources" in the source map JSON. Each entry describes the scope trees of the corresponding source file.
7
7
  */
8
- scopes: (OriginalScope | null)[];
8
+ scopes: (OriginalScope[] | null)[];
9
9
  /**
10
10
  * The range tree of the generated bundle. Multiple top-level ranges are allowed but must not overlap source position wise.
11
11
  */
@@ -164,5 +164,6 @@ export interface SourceMapJson {
164
164
  sources: (string | null)[];
165
165
  mappings: string;
166
166
  names?: string[];
167
- scopes?: string;
167
+ scopes?: (string | null)[];
168
+ ranges?: string[];
168
169
  }
@@ -2,7 +2,7 @@ export declare function encodeSigned(n: number): string;
2
2
  export declare function encodeUnsigned(n: number): string;
3
3
  export declare class TokenIterator {
4
4
  #private;
5
- constructor(string: string);
5
+ constructor(string: string, strict?: boolean);
6
6
  nextChar(): string;
7
7
  /** Returns the unicode value of the next character and advances the iterator */
8
8
  nextCharCode(): number;
@@ -1,8 +0,0 @@
1
- // Copyright 2026 The Chromium Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as Trace from '../trace.js';
6
-
7
- export const {Core, Graph, Metrics, Simulation, Types} = Trace.Lantern;
8
- export default Trace.Lantern;
@@ -1,8 +0,0 @@
1
- // Copyright 2026 The Chromium Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as Trace from '../trace.js';
6
-
7
- export const {Micro, Milli, Seconds} = Trace.Types.Timing;
8
- export default Trace.Types.Timing;
@@ -1,189 +0,0 @@
1
- // Copyright 2026 The Chromium Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as Trace from "../trace.js";
6
-
7
- export const {
8
- AuctionWorkletType,
9
- CallFrameID,
10
- Categories,
11
- DefaultCategories,
12
- InvalidationEventType,
13
- LayoutInvalidationReason,
14
- MarkerName,
15
- NO_NAVIGATION,
16
- Name,
17
- OptionalCategories,
18
- Phase,
19
- ProcessID,
20
- ProfileID,
21
- SampleIndex,
22
- Scope,
23
- SelectorTimingsKey,
24
- StyleRecalcInvalidationReason,
25
- ThreadID,
26
- VALID_PROFILE_SOURCES,
27
- WorkerId,
28
- eventIsPageLoadEvent,
29
- isAbortPostTaskCallback,
30
- isActivateLayerTree,
31
- isAnimation,
32
- isAnimationFrameAsyncEnd,
33
- isAnimationFrameAsyncStart,
34
- isAnimationFramePresentation,
35
- isAnyFirstContentfulPaint,
36
- isAnyLargestContentfulPaintCandidate,
37
- isAnyScriptSourceEvent,
38
- isAuctionWorkletDoneWithProcess,
39
- isAuctionWorkletRunningInProcess,
40
- isBegin,
41
- isBeginCommitCompositorFrame,
42
- isBeginFrame,
43
- isBeginMainThreadFrame,
44
- isBeginRemoteFontLoad,
45
- isCommit,
46
- isCommitLoad,
47
- isComplete,
48
- isCompositeLayers,
49
- isConsoleRunTask,
50
- isConsoleTime,
51
- isConsoleTimeStamp,
52
- isDOMStats,
53
- isDebuggerAsyncTaskRun,
54
- isDebuggerAsyncTaskScheduled,
55
- isDecodeImage,
56
- isDecodeLazyPixelRef,
57
- isDidCommitSameDocumentNavigation,
58
- isDispatch,
59
- isDisplayListItemListSnapshot,
60
- isDomLoading,
61
- isDrawFrame,
62
- isDrawLazyPixelRef,
63
- isDroppedFrame,
64
- isEnd,
65
- isEventTiming,
66
- isEventTimingEnd,
67
- isEventTimingStart,
68
- isFireAnimationFrame,
69
- isFireIdleCallback,
70
- isFirstContentfulPaint,
71
- isFirstPaint,
72
- isFlowPhase,
73
- isFlowPhaseEvent,
74
- isFrameCommittedInBrowser,
75
- isFunctionCall,
76
- isGPUTask,
77
- isHandlePostMessage,
78
- isInstant,
79
- isInteractiveTime,
80
- isInvalidateLayout,
81
- isInvalidationTracking,
82
- isJSInvocationEvent,
83
- isJSSample,
84
- isLargestImagePaintCandidate,
85
- isLargestTextPaintCandidate,
86
- isLayerTreeHostImplSnapshot,
87
- isLayout,
88
- isLayoutImageUnsized,
89
- isLayoutInvalidationTracking,
90
- isLayoutShift,
91
- isLegacyScreenshot,
92
- isLegacySyntheticScreenshot,
93
- isLegacyTimelineFrame,
94
- isLinkPreconnect,
95
- isMainFrameViewport,
96
- isMarkDOMContent,
97
- isMarkLoad,
98
- isMarkerEvent,
99
- isMetaCharsetCheck,
100
- isNavigationStart,
101
- isNeedsBeginFrameChanged,
102
- isNestableAsyncPhase,
103
- isNetworkTrackEntry,
104
- isPaint,
105
- isPaintImage,
106
- isPairableAsyncBegin,
107
- isPairableAsyncEnd,
108
- isPairableAsyncInstant,
109
- isParseAuthorStyleSheetEvent,
110
- isParseHTML,
111
- isParseMetaViewport,
112
- isPerformanceMark,
113
- isPerformanceMeasure,
114
- isPerformanceMeasureBegin,
115
- isPhaseAsync,
116
- isPipelineReporter,
117
- isPrePaint,
118
- isPreloadRenderBlockingStatusChangeEvent,
119
- isProcessName,
120
- isProfile,
121
- isProfileCall,
122
- isProfileChunk,
123
- isRasterTask,
124
- isRecalcStyle,
125
- isReceivedDataEvent,
126
- isRemoteFontLoaded,
127
- isRenderFrameImplCreateChildFrame,
128
- isRendererEvent,
129
- isRequestIdleCallback,
130
- isRequestMainThreadFrame,
131
- isResourceChangePriority,
132
- isResourceFinish,
133
- isResourceMarkAsCached,
134
- isResourceReceiveResponse,
135
- isResourceReceivedData,
136
- isResourceSendRequest,
137
- isResourceWillSendRequest,
138
- isRunPostTaskCallback,
139
- isRunTask,
140
- isRundownScript,
141
- isRundownScriptCompiled,
142
- isRundownScriptSource,
143
- isRundownScriptSourceLarge,
144
- isSchedulePostMessage,
145
- isSchedulePostTaskCallback,
146
- isScheduleStyleInvalidationTracking,
147
- isScheduleStyleRecalculation,
148
- isScreenshot,
149
- isScrollLayer,
150
- isSelectorStats,
151
- isSetLayerId,
152
- isSoftFirstContentfulPaint,
153
- isSoftLargestContentfulPaintCandidate,
154
- isSoftNavigationStart,
155
- isStyleInvalidatorInvalidationTracking,
156
- isStyleRecalcInvalidationTracking,
157
- isSyntheticAnimation,
158
- isSyntheticBased,
159
- isSyntheticConsoleTiming,
160
- isSyntheticCpuProfile,
161
- isSyntheticInteraction,
162
- isSyntheticLayoutShift,
163
- isSyntheticLayoutShiftCluster,
164
- isSyntheticNetworkRequest,
165
- isSyntheticUserTiming,
166
- isSyntheticWebSocketConnection,
167
- isThreadName,
168
- isTimerFire,
169
- isTimerInstall,
170
- isTracingSessionIdForWorker,
171
- isTracingStartedInBrowser,
172
- isUpdateCounters,
173
- isUpdateLayer,
174
- isUserTiming,
175
- isUserTimingMeasure,
176
- isV8Compile,
177
- isWebSocketCreate,
178
- isWebSocketDestroy,
179
- isWebSocketEvent,
180
- isWebSocketInfo,
181
- isWebSocketReceiveHandshakeResponse,
182
- isWebSocketSendHandshakeRequest,
183
- isWebSocketTraceEvent,
184
- isWebSocketTransfer,
185
- objectIsCallFrame,
186
- objectIsEvent,
187
- } = Trace.Types.Events;
188
-
189
- export default Trace.Types.Events;
@@ -1,8 +0,0 @@
1
- // Copyright 2026 The Chromium Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as Trace from '../trace.js';
6
-
7
- export const {Configuration, Extensions, File, Overlays, Timing, TraceEvents} = Trace.Types;
8
- export default Trace.Types;