@paulirish/trace_engine 0.0.67-beta.1 → 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 (140) hide show
  1. package/core/common/ParsedURL.d.ts +8 -0
  2. package/core/common/Settings.d.ts +2 -0
  3. package/core/host/Platform.d.ts +5 -0
  4. package/core/host/UserMetricsEnums.d.ts +8 -3
  5. package/core/platform/StringUtilities.d.ts +21 -0
  6. package/core/root/ExperimentNames.d.ts +2 -1
  7. package/core/root/Runtime.d.ts +4 -2
  8. package/core/sdk/CSSModel.d.ts +5 -0
  9. package/core/sdk/CSSPropertyParser.d.ts +0 -5
  10. package/core/sdk/DOMModel.d.ts +8 -4
  11. package/core/sdk/DebuggerModel.d.ts +37 -4
  12. package/core/sdk/NetworkRequest.d.ts +30 -2
  13. package/core/sdk/ResourceTreeModel.d.ts +3 -1
  14. package/core/sdk/RuntimeModel.d.ts +1 -0
  15. package/core/sdk/SDKSettings.d.ts +1 -0
  16. package/core/sdk/SourceMap.d.ts +20 -6
  17. package/core/sdk/SourceMapFunctionRanges.d.ts +3 -6
  18. package/core/sdk/SourceMapScopesInfo.d.ts +98 -23
  19. package/core/text_utils/Markdown.d.ts +13 -0
  20. package/core/text_utils/text_utils.d.ts +2 -1
  21. package/entrypoints/formatter_actions/formatter_actions.d.ts +17 -0
  22. package/generated/protocol-mapping.d.ts +64 -9
  23. package/generated/protocol-proxy-api.d.ts +58 -7
  24. package/generated/protocol.d.ts +93 -30
  25. package/locales/af.json +129 -126
  26. package/locales/am.json +128 -125
  27. package/locales/ar.json +130 -127
  28. package/locales/as.json +130 -127
  29. package/locales/az.json +130 -127
  30. package/locales/be.json +128 -125
  31. package/locales/bg.json +130 -127
  32. package/locales/bn.json +130 -127
  33. package/locales/bs.json +130 -127
  34. package/locales/ca.json +130 -127
  35. package/locales/cs.json +128 -125
  36. package/locales/cy.json +130 -127
  37. package/locales/da.json +129 -126
  38. package/locales/de.json +130 -127
  39. package/locales/el.json +130 -127
  40. package/locales/en-GB.json +130 -127
  41. package/locales/en-US.json +130 -127
  42. package/locales/es-419.json +129 -126
  43. package/locales/es.json +130 -127
  44. package/locales/et.json +95 -92
  45. package/locales/eu.json +130 -127
  46. package/locales/fa.json +130 -127
  47. package/locales/fi.json +129 -126
  48. package/locales/fil.json +130 -127
  49. package/locales/fr-CA.json +130 -127
  50. package/locales/fr.json +130 -127
  51. package/locales/gl.json +130 -127
  52. package/locales/gu.json +130 -127
  53. package/locales/he.json +130 -127
  54. package/locales/hi.json +130 -127
  55. package/locales/hr.json +128 -125
  56. package/locales/hu.json +90 -87
  57. package/locales/hy.json +127 -124
  58. package/locales/id.json +130 -127
  59. package/locales/is.json +129 -126
  60. package/locales/it.json +130 -127
  61. package/locales/ja.json +130 -127
  62. package/locales/ka.json +129 -126
  63. package/locales/kk.json +38 -35
  64. package/locales/km.json +130 -127
  65. package/locales/kn.json +130 -127
  66. package/locales/ko.json +22 -19
  67. package/locales/ky.json +130 -127
  68. package/locales/lo.json +130 -127
  69. package/locales/lt.json +130 -127
  70. package/locales/lv.json +66 -63
  71. package/locales/mk.json +130 -127
  72. package/locales/ml.json +129 -126
  73. package/locales/mn.json +129 -126
  74. package/locales/mr.json +130 -127
  75. package/locales/ms.json +130 -127
  76. package/locales/my.json +130 -127
  77. package/locales/ne.json +128 -125
  78. package/locales/nl.json +129 -126
  79. package/locales/no.json +130 -127
  80. package/locales/or.json +130 -127
  81. package/locales/pa.json +130 -127
  82. package/locales/pl.json +130 -127
  83. package/locales/pt-PT.json +129 -126
  84. package/locales/pt.json +130 -127
  85. package/locales/ro.json +129 -126
  86. package/locales/ru.json +50 -47
  87. package/locales/si.json +130 -127
  88. package/locales/sk.json +130 -127
  89. package/locales/sl.json +130 -127
  90. package/locales/sq.json +129 -126
  91. package/locales/sr-Latn.json +130 -127
  92. package/locales/sr.json +130 -127
  93. package/locales/sv.json +130 -127
  94. package/locales/sw.json +130 -127
  95. package/locales/ta.json +129 -126
  96. package/locales/te.json +130 -127
  97. package/locales/th.json +92 -89
  98. package/locales/tr.json +129 -126
  99. package/locales/uk.json +128 -125
  100. package/locales/ur.json +130 -127
  101. package/locales/uz.json +126 -123
  102. package/locales/vi.json +130 -127
  103. package/locales/zh-HK.json +130 -127
  104. package/locales/zh-TW.json +130 -127
  105. package/locales/zh.json +130 -127
  106. package/locales/zu.json +129 -126
  107. package/models/emulation/DeviceModeModel.d.ts +1 -0
  108. package/models/formatter/FormatterWorkerPool.d.ts +2 -2
  109. package/models/formatter/ScriptFormatter.d.ts +2 -2
  110. package/models/trace/extras/StackTraceForEvent.d.ts +1 -1
  111. package/models/trace/handlers/AnimationFramesHandler.d.ts +1 -1
  112. package/models/trace/handlers/AsyncJSCallsHandler.d.ts +2 -2
  113. package/models/trace/handlers/ImagePaintingHandler.d.ts +2 -2
  114. package/models/trace/handlers/InitiatorsHandler.d.ts +2 -2
  115. package/models/trace/handlers/LayerTreeHandler.d.ts +1 -1
  116. package/models/trace/handlers/NetworkRequestsHandler.d.ts +1 -1
  117. package/models/trace/handlers/PageLoadMetricsHandler.d.ts +1 -1
  118. package/models/trace/handlers/ScriptsHandler.d.ts +1 -1
  119. package/models/trace/handlers/WarningsHandler.d.ts +1 -1
  120. package/models/trace/helpers/SamplesIntegrator.d.ts +3 -1
  121. package/models/trace/helpers/Trace.d.ts +2 -0
  122. package/models/trace/insights/CLSCulprits.d.ts +1 -1
  123. package/models/trace/insights/DuplicatedJavaScript.d.ts +1 -1
  124. package/models/trace/insights/ImageDelivery.d.ts +1 -0
  125. package/models/trace/lantern/core/NetworkAnalyzer.d.ts +1 -0
  126. package/models/trace/lantern/graph/CPUNode.d.ts +4 -2
  127. package/models/trace/lantern/simulation/TCPConnection.d.ts +4 -4
  128. package/models/trace/lantern/types/Lantern.d.ts +15 -0
  129. package/models/trace/types/Overlays.d.ts +4 -3
  130. package/models/trace/types/TraceEvents.d.ts +184 -124
  131. package/package.json +5 -2
  132. package/third_party/marked/marked.d.ts +2 -0
  133. package/third_party/marked/package/lib/marked.esm.d.ts +760 -0
  134. package/third_party/source-map-scopes-codec/package/src/builder/builder.d.ts +4 -1
  135. package/third_party/source-map-scopes-codec/package/src/builder/safe_builder.d.ts +3 -1
  136. package/third_party/source-map-scopes-codec/package/src/codec.d.ts +6 -5
  137. package/third_party/source-map-scopes-codec/package/src/decode/decode.d.ts +2 -0
  138. package/third_party/source-map-scopes-codec/package/src/encode/encoder.d.ts +4 -1
  139. package/third_party/source-map-scopes-codec/package/src/scopes.d.ts +4 -3
  140. package/third_party/source-map-scopes-codec/package/src/vlq.d.ts +1 -1
@@ -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;