@paulirish/trace_engine 0.0.17 → 0.0.19

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 (175) hide show
  1. package/README.md +2 -17
  2. package/core/platform/ArrayUtilities.js.map +1 -1
  3. package/core/platform/DOMUtilities.js.map +1 -1
  4. package/core/platform/MapUtilities.d.ts +1 -0
  5. package/core/platform/MapUtilities.js +3 -0
  6. package/core/platform/MapUtilities.js.map +1 -1
  7. package/core/platform/MimeType.js +1 -0
  8. package/core/platform/MimeType.js.map +1 -1
  9. package/core/platform/NumberUtilities.js.map +1 -1
  10. package/core/platform/SetUtilities.js.map +1 -1
  11. package/core/platform/StringUtilities.js +3 -3
  12. package/core/platform/StringUtilities.js.map +1 -1
  13. package/core/platform/TypedArrayUtilities.d.ts +26 -0
  14. package/core/platform/TypedArrayUtilities.js +111 -0
  15. package/core/platform/TypedArrayUtilities.js.map +1 -0
  16. package/core/platform/TypescriptUtilities.js.map +1 -1
  17. package/core/platform/UserVisibleError.js.map +1 -1
  18. package/core/platform/platform-tsconfig.json +1 -0
  19. package/core/platform/platform.d.ts +2 -1
  20. package/core/platform/platform.js +2 -1
  21. package/core/platform/platform.js.map +1 -1
  22. package/generated/protocol.d.ts +163 -35
  23. package/models/cpu_profile/CPUProfileDataModel.js.map +1 -1
  24. package/models/cpu_profile/ProfileTreeModel.js.map +1 -1
  25. package/models/trace/EntriesFilter.d.ts +7 -1
  26. package/models/trace/EntriesFilter.js +13 -2
  27. package/models/trace/EntriesFilter.js.map +1 -1
  28. package/models/trace/LegacyTracingModel.js.map +1 -1
  29. package/models/trace/ModelImpl.js.map +1 -1
  30. package/models/trace/Processor.js +45 -33
  31. package/models/trace/Processor.js.map +1 -1
  32. package/models/trace/TracingManager.js.map +1 -1
  33. package/models/trace/extras/FetchNodes.d.ts +1 -1
  34. package/models/trace/extras/FetchNodes.js +1 -2
  35. package/models/trace/extras/FetchNodes.js.map +1 -1
  36. package/models/trace/extras/FilmStrip.js.map +1 -1
  37. package/models/trace/extras/MainThreadActivity.js.map +1 -1
  38. package/models/trace/extras/Metadata.d.ts +2 -2
  39. package/models/trace/extras/Metadata.js +10 -2
  40. package/models/trace/extras/Metadata.js.map +1 -1
  41. package/models/trace/handlers/AnimationHandler.js +1 -1
  42. package/models/trace/handlers/AnimationHandler.js.map +1 -1
  43. package/models/trace/handlers/AuctionWorkletsHandler.js.map +1 -1
  44. package/models/trace/handlers/ExtensionTraceDataHandler.d.ts +13 -0
  45. package/models/trace/handlers/ExtensionTraceDataHandler.js +93 -0
  46. package/models/trace/handlers/ExtensionTraceDataHandler.js.map +1 -0
  47. package/models/trace/handlers/FramesHandler.js.map +1 -1
  48. package/models/trace/handlers/GPUHandler.js +1 -1
  49. package/models/trace/handlers/GPUHandler.js.map +1 -1
  50. package/models/trace/handlers/InitiatorsHandler.js +32 -3
  51. package/models/trace/handlers/InitiatorsHandler.js.map +1 -1
  52. package/models/trace/handlers/InvalidationsHandler.js +10 -1
  53. package/models/trace/handlers/InvalidationsHandler.js.map +1 -1
  54. package/models/trace/handlers/LargestImagePaintHandler.js +1 -1
  55. package/models/trace/handlers/LargestImagePaintHandler.js.map +1 -1
  56. package/models/trace/handlers/LargestTextPaintHandler.js +1 -1
  57. package/models/trace/handlers/LargestTextPaintHandler.js.map +1 -1
  58. package/models/trace/handlers/LayerTreeHandler.js +3 -3
  59. package/models/trace/handlers/LayerTreeHandler.js.map +1 -1
  60. package/models/trace/handlers/LayoutShiftsHandler.d.ts +5 -5
  61. package/models/trace/handlers/LayoutShiftsHandler.js +6 -5
  62. package/models/trace/handlers/LayoutShiftsHandler.js.map +1 -1
  63. package/models/trace/handlers/MemoryHandler.js +1 -1
  64. package/models/trace/handlers/MemoryHandler.js.map +1 -1
  65. package/models/trace/handlers/MetaHandler.js +12 -10
  66. package/models/trace/handlers/MetaHandler.js.map +1 -1
  67. package/models/trace/handlers/ModelHandlers.d.ts +1 -0
  68. package/models/trace/handlers/ModelHandlers.js +1 -0
  69. package/models/trace/handlers/ModelHandlers.js.map +1 -1
  70. package/models/trace/handlers/NetworkRequestsHandler.js +2 -2
  71. package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
  72. package/models/trace/handlers/PageLoadMetricsHandler.d.ts +11 -7
  73. package/models/trace/handlers/PageLoadMetricsHandler.js +11 -35
  74. package/models/trace/handlers/PageLoadMetricsHandler.js.map +1 -1
  75. package/models/trace/handlers/RendererHandler.js.map +1 -1
  76. package/models/trace/handlers/SamplesHandler.js +2 -2
  77. package/models/trace/handlers/SamplesHandler.js.map +1 -1
  78. package/models/trace/handlers/ScreenshotsHandler.js +2 -1
  79. package/models/trace/handlers/ScreenshotsHandler.js.map +1 -1
  80. package/models/trace/handlers/Threads.js.map +1 -1
  81. package/models/trace/handlers/UserInteractionsHandler.d.ts +2 -0
  82. package/models/trace/handlers/UserInteractionsHandler.js +21 -11
  83. package/models/trace/handlers/UserInteractionsHandler.js.map +1 -1
  84. package/models/trace/handlers/UserTimingsHandler.js +1 -0
  85. package/models/trace/handlers/UserTimingsHandler.js.map +1 -1
  86. package/models/trace/handlers/WarningsHandler.js +2 -2
  87. package/models/trace/handlers/WarningsHandler.js.map +1 -1
  88. package/models/trace/handlers/WorkersHandler.js +3 -3
  89. package/models/trace/handlers/WorkersHandler.js.map +1 -1
  90. package/models/trace/handlers/handlers-tsconfig.json +1 -0
  91. package/models/trace/handlers/types.js.map +1 -1
  92. package/models/trace/helpers/Extensions.d.ts +2 -0
  93. package/models/trace/helpers/Extensions.js +22 -0
  94. package/models/trace/helpers/Extensions.js.map +1 -0
  95. package/models/trace/helpers/SamplesIntegrator.js.map +1 -1
  96. package/models/trace/helpers/Timing.js.map +1 -1
  97. package/models/trace/helpers/Trace.d.ts +4 -3
  98. package/models/trace/helpers/Trace.js +17 -3
  99. package/models/trace/helpers/Trace.js.map +1 -1
  100. package/models/trace/helpers/TreeHelpers.js.map +1 -1
  101. package/models/trace/helpers/helpers-tsconfig.json +1 -0
  102. package/models/trace/helpers/helpers.d.ts +1 -0
  103. package/models/trace/helpers/helpers.js +1 -0
  104. package/models/trace/helpers/helpers.js.map +1 -1
  105. package/models/trace/insights/InsightRunners.d.ts +2 -0
  106. package/models/trace/insights/InsightRunners.js +2 -0
  107. package/models/trace/insights/InsightRunners.js.map +1 -1
  108. package/models/trace/insights/InteractionToNextPaint.d.ts +9 -0
  109. package/models/trace/insights/InteractionToNextPaint.js +35 -0
  110. package/models/trace/insights/InteractionToNextPaint.js.map +1 -0
  111. package/models/trace/insights/LargestContentfulPaint.d.ts +31 -0
  112. package/models/trace/insights/LargestContentfulPaint.js +104 -0
  113. package/models/trace/insights/LargestContentfulPaint.js.map +1 -0
  114. package/models/trace/insights/RenderBlocking.js.map +1 -1
  115. package/models/trace/insights/insights-tsconfig.json +2 -0
  116. package/models/trace/insights/types.d.ts +3 -1
  117. package/models/trace/insights/types.js +3 -0
  118. package/models/trace/insights/types.js.map +1 -1
  119. package/models/trace/root-causes/LayoutShift.d.ts +9 -3
  120. package/models/trace/root-causes/LayoutShift.js +35 -15
  121. package/models/trace/root-causes/LayoutShift.js.map +1 -1
  122. package/models/trace/root-causes/RootCauses.d.ts +2 -1
  123. package/models/trace/root-causes/RootCauses.js +1 -0
  124. package/models/trace/root-causes/RootCauses.js.map +1 -1
  125. package/models/trace/types/Configuration.js +10 -2
  126. package/models/trace/types/Configuration.js.map +1 -1
  127. package/models/trace/types/Extensions.d.ts +62 -0
  128. package/models/trace/types/Extensions.js +38 -0
  129. package/models/trace/types/Extensions.js.map +1 -0
  130. package/models/trace/types/File.d.ts +13 -0
  131. package/models/trace/types/File.js.map +1 -1
  132. package/models/trace/types/TraceEvents.d.ts +55 -14
  133. package/models/trace/types/TraceEvents.js +37 -9
  134. package/models/trace/types/TraceEvents.js.map +1 -1
  135. package/models/trace/types/types-tsconfig.json +1 -0
  136. package/models/trace/types/types.d.ts +1 -0
  137. package/models/trace/types/types.js +1 -0
  138. package/models/trace/types/types.js.map +1 -1
  139. package/package.json +1 -1
  140. package/core/platform/array-utilities.d.ts +0 -66
  141. package/core/platform/array-utilities.js +0 -199
  142. package/core/platform/array-utilities.js.map +0 -1
  143. package/core/platform/date-utilities.d.ts +0 -2
  144. package/core/platform/date-utilities.js +0 -14
  145. package/core/platform/date-utilities.js.map +0 -1
  146. package/core/platform/dcheck-tsconfig.json +0 -8
  147. package/core/platform/dcheck.d.ts +0 -4
  148. package/core/platform/dcheck.js +0 -5
  149. package/core/platform/dom-utilities.d.ts +0 -8
  150. package/core/platform/dom-utilities.js +0 -109
  151. package/core/platform/dom-utilities.js.map +0 -1
  152. package/core/platform/keyboard-utilities.d.ts +0 -17
  153. package/core/platform/keyboard-utilities.js +0 -22
  154. package/core/platform/keyboard-utilities.js.map +0 -1
  155. package/core/platform/map-utilities.d.ts +0 -18
  156. package/core/platform/map-utilities.js +0 -76
  157. package/core/platform/map-utilities.js.map +0 -1
  158. package/core/platform/number-utilities.d.ts +0 -15
  159. package/core/platform/number-utilities.js +0 -82
  160. package/core/platform/number-utilities.js.map +0 -1
  161. package/core/platform/promise-utilities.d.ts +0 -10
  162. package/core/platform/promise-utilities.js +0 -18
  163. package/core/platform/promise-utilities.js.map +0 -1
  164. package/core/platform/set-utilities.d.ts +0 -2
  165. package/core/platform/set-utilities.js +0 -23
  166. package/core/platform/set-utilities.js.map +0 -1
  167. package/core/platform/string-utilities.d.ts +0 -71
  168. package/core/platform/string-utilities.js +0 -513
  169. package/core/platform/string-utilities.js.map +0 -1
  170. package/core/platform/typescript-utilities.d.ts +0 -56
  171. package/core/platform/typescript-utilities.js +0 -25
  172. package/core/platform/typescript-utilities.js.map +0 -1
  173. /package/core/platform/{brand.d.ts → Brand.d.ts} +0 -0
  174. /package/core/platform/{brand.js → Brand.js} +0 -0
  175. /package/core/platform/{brand.js.map → Brand.js.map} +0 -0
@@ -0,0 +1,111 @@
1
+ // Copyright 2024 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
+ * @returns A BigUint32Array implementation which is based on Array.
6
+ * This means that its length automatically expands to include the highest index
7
+ * used, and asArrayOrFail will succeed.
8
+ */
9
+ export function createExpandableBigUint32Array() {
10
+ return new ExpandableBigUint32ArrayImpl();
11
+ }
12
+ /**
13
+ * @returns A BigUint32Array implementation which is based on Uint32Array.
14
+ * If the length is small enough to fit in a single Uint32Array, then
15
+ * asUint32ArrayOrFail will succeed. Otherwise, it will throw an exception.
16
+ */
17
+ export function createFixedBigUint32Array(length, maxLengthForTesting) {
18
+ try {
19
+ if (maxLengthForTesting !== undefined && length > maxLengthForTesting) {
20
+ // Simulate allocation failure.
21
+ throw new RangeError();
22
+ }
23
+ return new BasicBigUint32ArrayImpl(length);
24
+ }
25
+ catch {
26
+ // We couldn't allocate a big enough ArrayBuffer.
27
+ return new SplitBigUint32ArrayImpl(length, maxLengthForTesting);
28
+ }
29
+ }
30
+ class BasicBigUint32ArrayImpl extends Uint32Array {
31
+ getValue(index) {
32
+ return this[index];
33
+ }
34
+ setValue(index, value) {
35
+ this[index] = value;
36
+ }
37
+ asUint32ArrayOrFail() {
38
+ return this;
39
+ }
40
+ asArrayOrFail() {
41
+ throw new Error('Not an array');
42
+ }
43
+ }
44
+ class SplitBigUint32ArrayImpl {
45
+ #data;
46
+ #partLength;
47
+ length;
48
+ constructor(length, maxLengthForTesting) {
49
+ this.#data = [];
50
+ this.length = length;
51
+ let partCount = 1;
52
+ while (true) {
53
+ partCount *= 2;
54
+ this.#partLength = Math.ceil(length / partCount);
55
+ try {
56
+ if (maxLengthForTesting !== undefined && this.#partLength > maxLengthForTesting) {
57
+ // Simulate allocation failure.
58
+ throw new RangeError();
59
+ }
60
+ for (let i = 0; i < partCount; ++i) {
61
+ this.#data[i] = new Uint32Array(this.#partLength);
62
+ }
63
+ return;
64
+ }
65
+ catch (e) {
66
+ if (this.#partLength < 1e6) {
67
+ // The length per part is already small, so continuing to subdivide it
68
+ // will probably not help.
69
+ throw e;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ getValue(index) {
75
+ if (index >= 0 && index < this.length) {
76
+ const partLength = this.#partLength;
77
+ return this.#data[Math.floor(index / partLength)][index % partLength];
78
+ }
79
+ // On out-of-bounds accesses, match the behavior of Uint32Array: return an
80
+ // undefined value that's incorrectly typed as number.
81
+ return this.#data[0][-1];
82
+ }
83
+ setValue(index, value) {
84
+ if (index >= 0 && index < this.length) {
85
+ const partLength = this.#partLength;
86
+ this.#data[Math.floor(index / partLength)][index % partLength] = value;
87
+ }
88
+ // Attempting to set a value out of bounds does nothing, like Uint32Array.
89
+ }
90
+ asUint32ArrayOrFail() {
91
+ throw new Error('Not a Uint32Array');
92
+ }
93
+ asArrayOrFail() {
94
+ throw new Error('Not an array');
95
+ }
96
+ }
97
+ class ExpandableBigUint32ArrayImpl extends Array {
98
+ getValue(index) {
99
+ return this[index];
100
+ }
101
+ setValue(index, value) {
102
+ this[index] = value;
103
+ }
104
+ asUint32ArrayOrFail() {
105
+ throw new Error('Not a Uint32Array');
106
+ }
107
+ asArrayOrFail() {
108
+ return this;
109
+ }
110
+ }
111
+ //# sourceMappingURL=TypedArrayUtilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedArrayUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/TypedArrayUtilities.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2024 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * An object which provides functionality similar to Uint32Array. It may be\n * implemented as:\n * 1. A Uint32Array,\n * 2. An array of Uint32Arrays, to support more data than Uint32Array, or\n * 3. A plain array, in which case the length may change by setting values.\n */\nexport interface BigUint32Array {\n get length(): number;\n getValue(index: number): number;\n setValue(index: number, value: number): void;\n asUint32ArrayOrFail(): Uint32Array;\n asArrayOrFail(): number[];\n}\n\n/**\n * @returns A BigUint32Array implementation which is based on Array.\n * This means that its length automatically expands to include the highest index\n * used, and asArrayOrFail will succeed.\n */\nexport function createExpandableBigUint32Array(): BigUint32Array {\n return new ExpandableBigUint32ArrayImpl();\n}\n\n/**\n * @returns A BigUint32Array implementation which is based on Uint32Array.\n * If the length is small enough to fit in a single Uint32Array, then\n * asUint32ArrayOrFail will succeed. Otherwise, it will throw an exception.\n */\nexport function createFixedBigUint32Array(length: number, maxLengthForTesting?: number): BigUint32Array {\n try {\n if (maxLengthForTesting !== undefined && length > maxLengthForTesting) {\n // Simulate allocation failure.\n throw new RangeError();\n }\n return new BasicBigUint32ArrayImpl(length);\n } catch {\n // We couldn't allocate a big enough ArrayBuffer.\n return new SplitBigUint32ArrayImpl(length, maxLengthForTesting);\n }\n}\n\nclass BasicBigUint32ArrayImpl extends Uint32Array implements BigUint32Array {\n getValue(index: number): number {\n return this[index];\n }\n setValue(index: number, value: number): void {\n this[index] = value;\n }\n asUint32ArrayOrFail(): Uint32Array {\n return this;\n }\n asArrayOrFail(): number[] {\n throw new Error('Not an array');\n }\n}\n\nclass SplitBigUint32ArrayImpl implements BigUint32Array {\n #data: Uint32Array[];\n #partLength: number;\n length: number;\n\n constructor(length: number, maxLengthForTesting?: number) {\n this.#data = [];\n this.length = length;\n let partCount = 1;\n while (true) {\n partCount *= 2;\n this.#partLength = Math.ceil(length / partCount);\n try {\n if (maxLengthForTesting !== undefined && this.#partLength > maxLengthForTesting) {\n // Simulate allocation failure.\n throw new RangeError();\n }\n for (let i = 0; i < partCount; ++i) {\n this.#data[i] = new Uint32Array(this.#partLength);\n }\n return;\n } catch (e) {\n if (this.#partLength < 1e6) {\n // The length per part is already small, so continuing to subdivide it\n // will probably not help.\n throw e;\n }\n }\n }\n }\n\n getValue(index: number): number {\n if (index >= 0 && index < this.length) {\n const partLength = this.#partLength;\n return this.#data[Math.floor(index / partLength)][index % partLength];\n }\n // On out-of-bounds accesses, match the behavior of Uint32Array: return an\n // undefined value that's incorrectly typed as number.\n return this.#data[0][-1];\n }\n\n setValue(index: number, value: number): void {\n if (index >= 0 && index < this.length) {\n const partLength = this.#partLength;\n this.#data[Math.floor(index / partLength)][index % partLength] = value;\n }\n // Attempting to set a value out of bounds does nothing, like Uint32Array.\n }\n\n asUint32ArrayOrFail(): Uint32Array {\n throw new Error('Not a Uint32Array');\n }\n asArrayOrFail(): number[] {\n throw new Error('Not an array');\n }\n}\n\nclass ExpandableBigUint32ArrayImpl extends Array<number> implements BigUint32Array {\n getValue(index: number): number {\n return this[index];\n }\n setValue(index: number, value: number): void {\n this[index] = value;\n }\n asUint32ArrayOrFail(): Uint32Array {\n throw new Error('Not a Uint32Array');\n }\n asArrayOrFail(): number[] {\n return this;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TypescriptUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/TypescriptUtilities.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAI,GAAM,EAAE,OAAgB;IAClE,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE;QACrC,MAAM,IAAI,KAAK,CAAC,6DAA6D,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;KACrH;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAW,EAAE,OAAe;IACtD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAI,aAAgB;IACjD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * This is useful to keep TypeScript happy in a test - if you have a value\n * that's potentially `null` you can use this function to assert that it isn't,\n * and satisfy TypeScript that the value is present.\n */\nexport function assertNotNullOrUndefined<T>(val: T, message?: string): asserts val is NonNullable<T> {\n if (val === null || val === undefined) {\n throw new Error(`Expected given value to not be null/undefined but it was: ${val}${message ? `\\n${message}` : ''}`);\n }\n}\n\nexport function assertNever(type: never, message: string): never {\n throw new Error(message);\n}\n\n/**\n * This is useful to check on the type-level that the unhandled cases of\n * a switch are exactly `T` (where T is usually a union type of enum values).\n * @param caseVariable\n */\nexport function assertUnhandled<T>(_caseVariable: T): T {\n return _caseVariable;\n}\n\nexport type FieldsThatExtend<Type, Selector> = {\n [Key in keyof Type]: Type[Key] extends Selector ? Key : never;\n}[keyof Type];\n\nexport type PickFieldsThatExtend<Type, Selector> = Pick<Type, FieldsThatExtend<Type, Selector>>;\n\n/**\n * Turns a Union type (a | b) into an Intersection type (a & b).\n * This is a helper type to implement the \"NoUnion\" guard.\n *\n * Adapted from https://stackoverflow.com/a/50375286.\n *\n * The tautological `T extends any` is necessary to trigger distributivity for\n * plain unions, e.g. in IntersectionFromUnion<'a'|'b'> TypeScript expands it\n * to ('a' extends any ? (arg: 'a') => void : never)\n * | ('b' extends any ? (arg: 'b') => void : never)\n *\n * The second extends clause then asks TypeScript to find a type of the form\n * `(arg: infer U) => void` that upper-bounds the union, i.e., intuitively,\n * a type that converts to each of the union members. This forces U to be the\n * intersection of 'a' and 'b' in the example.\n *\n * Please note that some intersection types are simply impossible, e.g.\n * `string & number`. There is no type that fulfills both at the same time. A\n * union of this kind is reduced to `never`.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype IntersectionFromUnion<T> = (T extends any ? (arg: T) => void : never) extends((arg: infer U) => void) ? U : never;\n\n/**\n * When writing generic code it may be desired to disallow Union types from\n * being passed. This type can be used in those cases.\n *\n * function foo<T>(argument: NoUnion<T>) {...}\n *\n * Would result in a compile error for foo<a|b>(...); invocations as `argument`\n * would be typed as `never`.\n *\n * Adapted from https://stackoverflow.com/a/50641073.\n *\n * Conditional types become distributive when receiving a union type. To\n * prevent this from happening, we use `[T] extends [IntersectionFromUnion<T>]`\n * instead of `T extends IntersectionFromUnion<T>`.\n * See: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html\n */\nexport type NoUnion<T> = [T] extends [IntersectionFromUnion<T>] ? T : never;\n"]}
1
+ {"version":3,"file":"TypescriptUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/TypescriptUtilities.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAI,GAAM,EAAE,OAAgB;IAClE,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,6DAA6D,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACtH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAW,EAAE,OAAe;IACtD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAI,aAAgB;IACjD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * This is useful to keep TypeScript happy in a test - if you have a value\n * that's potentially `null` you can use this function to assert that it isn't,\n * and satisfy TypeScript that the value is present.\n */\nexport function assertNotNullOrUndefined<T>(val: T, message?: string): asserts val is NonNullable<T> {\n if (val === null || val === undefined) {\n throw new Error(`Expected given value to not be null/undefined but it was: ${val}${message ? `\\n${message}` : ''}`);\n }\n}\n\nexport function assertNever(type: never, message: string): never {\n throw new Error(message);\n}\n\n/**\n * This is useful to check on the type-level that the unhandled cases of\n * a switch are exactly `T` (where T is usually a union type of enum values).\n * @param caseVariable\n */\nexport function assertUnhandled<T>(_caseVariable: T): T {\n return _caseVariable;\n}\n\nexport type FieldsThatExtend<Type, Selector> = {\n [Key in keyof Type]: Type[Key] extends Selector ? Key : never;\n}[keyof Type];\n\nexport type PickFieldsThatExtend<Type, Selector> = Pick<Type, FieldsThatExtend<Type, Selector>>;\n\n/**\n * Turns a Union type (a | b) into an Intersection type (a & b).\n * This is a helper type to implement the \"NoUnion\" guard.\n *\n * Adapted from https://stackoverflow.com/a/50375286.\n *\n * The tautological `T extends any` is necessary to trigger distributivity for\n * plain unions, e.g. in IntersectionFromUnion<'a'|'b'> TypeScript expands it\n * to ('a' extends any ? (arg: 'a') => void : never)\n * | ('b' extends any ? (arg: 'b') => void : never)\n *\n * The second extends clause then asks TypeScript to find a type of the form\n * `(arg: infer U) => void` that upper-bounds the union, i.e., intuitively,\n * a type that converts to each of the union members. This forces U to be the\n * intersection of 'a' and 'b' in the example.\n *\n * Please note that some intersection types are simply impossible, e.g.\n * `string & number`. There is no type that fulfills both at the same time. A\n * union of this kind is reduced to `never`.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype IntersectionFromUnion<T> = (T extends any ? (arg: T) => void : never) extends((arg: infer U) => void) ? U : never;\n\n/**\n * When writing generic code it may be desired to disallow Union types from\n * being passed. This type can be used in those cases.\n *\n * function foo<T>(argument: NoUnion<T>) {...}\n *\n * Would result in a compile error for foo<a|b>(...); invocations as `argument`\n * would be typed as `never`.\n *\n * Adapted from https://stackoverflow.com/a/50641073.\n *\n * Conditional types become distributive when receiving a union type. To\n * prevent this from happening, we use `[T] extends [IntersectionFromUnion<T>]`\n * instead of `T extends IntersectionFromUnion<T>`.\n * See: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html\n */\nexport type NoUnion<T> = [T] extends [IntersectionFromUnion<T>] ? T : never;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UserVisibleError.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/UserVisibleError.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAI7B;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACvB,OAAO,CAAkB;IAE3C,YAAY,OAAwB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;QAC/C,OAAO,KAAK,YAAY,gBAAgB,CAAC;KAC1C;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport {type LocalizedString} from './UIString.js';\n\n/**\n * Represents an error that might become visible to the user. Where errors\n * might be surfaced to the user (such as by displaying the message to the\n * console), this class should be used to enforce that the message is\n * localized on the way in.\n */\nexport class UserVisibleError extends Error {\n override readonly message: LocalizedString;\n\n constructor(message: LocalizedString) {\n super(message);\n this.message = message;\n }\n}\n\nexport function isUserVisibleError(error: unknown): error is UserVisibleError {\n if (typeof error === 'object' && error !== null) {\n return error instanceof UserVisibleError;\n }\n\n return false;\n}\n"]}
1
+ {"version":3,"file":"UserVisibleError.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/UserVisibleError.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAI7B;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACvB,OAAO,CAAkB;IAE3C,YAAY,OAAwB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,YAAY,gBAAgB,CAAC;IAC3C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport {type LocalizedString} from './UIString.js';\n\n/**\n * Represents an error that might become visible to the user. Where errors\n * might be surfaced to the user (such as by displaying the message to the\n * console), this class should be used to enforce that the message is\n * localized on the way in.\n */\nexport class UserVisibleError extends Error {\n override readonly message: LocalizedString;\n\n constructor(message: LocalizedString) {\n super(message);\n this.message = message;\n }\n}\n\nexport function isUserVisibleError(error: unknown): error is UserVisibleError {\n if (typeof error === 'object' && error !== null) {\n return error instanceof UserVisibleError;\n }\n\n return false;\n}\n"]}
@@ -42,6 +42,7 @@
42
42
  "../../../../../../front_end/core/platform/SetUtilities.ts",
43
43
  "../../../../../../front_end/core/platform/StringUtilities.ts",
44
44
  "../../../../../../front_end/core/platform/Timing.ts",
45
+ "../../../../../../front_end/core/platform/TypedArrayUtilities.ts",
45
46
  "../../../../../../front_end/core/platform/TypescriptUtilities.ts",
46
47
  "../../../../../../front_end/core/platform/UIString.ts",
47
48
  "../../../../../../front_end/core/platform/UserVisibleError.ts",
@@ -11,8 +11,9 @@ import * as PromiseUtilities from './PromiseUtilities.js';
11
11
  import * as SetUtilities from './SetUtilities.js';
12
12
  import * as StringUtilities from './StringUtilities.js';
13
13
  import * as Timing from './Timing.js';
14
+ import * as TypedArrayUtilities from './TypedArrayUtilities.js';
14
15
  import * as TypeScriptUtilities from './TypescriptUtilities.js';
15
16
  import * as UIString from './UIString.js';
16
17
  import * as UserVisibleError from './UserVisibleError.js';
17
18
  export { assertNever, assertNotNullOrUndefined, assertUnhandled } from './TypescriptUtilities.js';
18
- export { ArrayUtilities, Brand, DateUtilities, DevToolsPath, DOMUtilities, KeyboardUtilities, MapUtilities, MimeType, NumberUtilities, PromiseUtilities, SetUtilities, StringUtilities, Timing, TypeScriptUtilities, UIString, UserVisibleError, };
19
+ export { ArrayUtilities, Brand, DateUtilities, DevToolsPath, DOMUtilities, KeyboardUtilities, MapUtilities, MimeType, NumberUtilities, PromiseUtilities, SetUtilities, StringUtilities, Timing, TypedArrayUtilities, TypeScriptUtilities, UIString, UserVisibleError, };
@@ -40,6 +40,7 @@ import * as PromiseUtilities from './PromiseUtilities.js';
40
40
  import * as SetUtilities from './SetUtilities.js';
41
41
  import * as StringUtilities from './StringUtilities.js';
42
42
  import * as Timing from './Timing.js';
43
+ import * as TypedArrayUtilities from './TypedArrayUtilities.js';
43
44
  import * as TypeScriptUtilities from './TypescriptUtilities.js';
44
45
  import * as UIString from './UIString.js';
45
46
  import * as UserVisibleError from './UserVisibleError.js';
@@ -49,5 +50,5 @@ import * as UserVisibleError from './UserVisibleError.js';
49
50
  * error).
50
51
  */
51
52
  export { assertNever, assertNotNullOrUndefined, assertUnhandled } from './TypescriptUtilities.js';
52
- export { ArrayUtilities, Brand, DateUtilities, DevToolsPath, DOMUtilities, KeyboardUtilities, MapUtilities, MimeType, NumberUtilities, PromiseUtilities, SetUtilities, StringUtilities, Timing, TypeScriptUtilities, UIString, UserVisibleError, };
53
+ export { ArrayUtilities, Brand, DateUtilities, DevToolsPath, DOMUtilities, KeyboardUtilities, MapUtilities, MimeType, NumberUtilities, PromiseUtilities, SetUtilities, StringUtilities, Timing, TypedArrayUtilities, TypeScriptUtilities, UIString, UserVisibleError, };
53
54
  //# sourceMappingURL=platform.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,mBAAmB,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAE1D;;;;GAIG;AACH,OAAO,EAAC,WAAW,EAAE,wBAAwB,EAAE,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAChG,OAAO,EACL,cAAc,EACd,KAAK,EACL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,MAAM,EACN,mBAAmB,EACnB,QAAQ,EACR,gBAAgB,GACjB,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as ArrayUtilities from './ArrayUtilities.js';\nimport * as Brand from './Brand.js';\nimport * as DateUtilities from './DateUtilities.js';\nimport * as DevToolsPath from './DevToolsPath.js';\nimport * as DOMUtilities from './DOMUtilities.js';\nimport * as KeyboardUtilities from './KeyboardUtilities.js';\nimport * as MapUtilities from './MapUtilities.js';\nimport * as MimeType from './MimeType.js';\nimport * as NumberUtilities from './NumberUtilities.js';\nimport * as PromiseUtilities from './PromiseUtilities.js';\nimport * as SetUtilities from './SetUtilities.js';\nimport * as StringUtilities from './StringUtilities.js';\nimport * as Timing from './Timing.js';\nimport * as TypeScriptUtilities from './TypescriptUtilities.js';\nimport * as UIString from './UIString.js';\nimport * as UserVisibleError from './UserVisibleError.js';\n\n/* `assertNotNullOrUndefined` also need to be exposed, as TypeScript does\n * not allow `asserts` functions to be used with qualified access (e.g.\n * `Platform.TypeScriptUtilities.assertNotNullOrUndefined` causes a compile\n * error).\n */\nexport {assertNever, assertNotNullOrUndefined, assertUnhandled} from './TypescriptUtilities.js';\nexport {\n ArrayUtilities,\n Brand,\n DateUtilities,\n DevToolsPath,\n DOMUtilities,\n KeyboardUtilities,\n MapUtilities,\n MimeType,\n NumberUtilities,\n PromiseUtilities,\n SetUtilities,\n StringUtilities,\n Timing,\n TypeScriptUtilities,\n UIString,\n UserVisibleError,\n};\n"]}
1
+ {"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,mBAAmB,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,mBAAmB,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAE1D;;;;GAIG;AACH,OAAO,EAAC,WAAW,EAAE,wBAAwB,EAAE,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAChG,OAAO,EACL,cAAc,EACd,KAAK,EACL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,MAAM,EACN,mBAAmB,EACnB,mBAAmB,EACnB,QAAQ,EACR,gBAAgB,GACjB,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as ArrayUtilities from './ArrayUtilities.js';\nimport * as Brand from './Brand.js';\nimport * as DateUtilities from './DateUtilities.js';\nimport * as DevToolsPath from './DevToolsPath.js';\nimport * as DOMUtilities from './DOMUtilities.js';\nimport * as KeyboardUtilities from './KeyboardUtilities.js';\nimport * as MapUtilities from './MapUtilities.js';\nimport * as MimeType from './MimeType.js';\nimport * as NumberUtilities from './NumberUtilities.js';\nimport * as PromiseUtilities from './PromiseUtilities.js';\nimport * as SetUtilities from './SetUtilities.js';\nimport * as StringUtilities from './StringUtilities.js';\nimport * as Timing from './Timing.js';\nimport * as TypedArrayUtilities from './TypedArrayUtilities.js';\nimport * as TypeScriptUtilities from './TypescriptUtilities.js';\nimport * as UIString from './UIString.js';\nimport * as UserVisibleError from './UserVisibleError.js';\n\n/* `assertNotNullOrUndefined` also need to be exposed, as TypeScript does\n * not allow `asserts` functions to be used with qualified access (e.g.\n * `Platform.TypeScriptUtilities.assertNotNullOrUndefined` causes a compile\n * error).\n */\nexport {assertNever, assertNotNullOrUndefined, assertUnhandled} from './TypescriptUtilities.js';\nexport {\n ArrayUtilities,\n Brand,\n DateUtilities,\n DevToolsPath,\n DOMUtilities,\n KeyboardUtilities,\n MapUtilities,\n MimeType,\n NumberUtilities,\n PromiseUtilities,\n SetUtilities,\n StringUtilities,\n Timing,\n TypedArrayUtilities,\n TypeScriptUtilities,\n UIString,\n UserVisibleError,\n};\n"]}
@@ -2598,6 +2598,28 @@ export declare namespace CSS {
2598
2598
  */
2599
2599
  tryRules: CSSTryRule[];
2600
2600
  }
2601
+ /**
2602
+ * CSS @position-try rule representation.
2603
+ */
2604
+ interface CSSPositionTryRule {
2605
+ /**
2606
+ * The prelude dashed-ident name
2607
+ */
2608
+ name: Value;
2609
+ /**
2610
+ * The css style sheet identifier (absent for user agent stylesheet and user-specified
2611
+ * stylesheet rules) this rule came from.
2612
+ */
2613
+ styleSheetId?: StyleSheetId;
2614
+ /**
2615
+ * Parent stylesheet's origin.
2616
+ */
2617
+ origin: StyleSheetOrigin;
2618
+ /**
2619
+ * Associated style declaration.
2620
+ */
2621
+ style: CSSStyle;
2622
+ }
2601
2623
  /**
2602
2624
  * CSS keyframes rule representation.
2603
2625
  */
@@ -2843,6 +2865,10 @@ export declare namespace CSS {
2843
2865
  * A list of CSS position fallbacks matching this node.
2844
2866
  */
2845
2867
  cssPositionFallbackRules?: CSSPositionFallbackRule[];
2868
+ /**
2869
+ * A list of CSS @position-try rules matching this node, based on the position-try-options property.
2870
+ */
2871
+ cssPositionTryRules?: CSSPositionTryRule[];
2846
2872
  /**
2847
2873
  * A list of CSS at-property rules matching this node.
2848
2874
  */
@@ -2887,6 +2913,13 @@ export declare namespace CSS {
2887
2913
  interface GetLayersForNodeResponse extends ProtocolResponseWithError {
2888
2914
  rootLayer: CSSLayerData;
2889
2915
  }
2916
+ interface GetLocationForSelectorRequest {
2917
+ styleSheetId: StyleSheetId;
2918
+ selectorText: string;
2919
+ }
2920
+ interface GetLocationForSelectorResponse extends ProtocolResponseWithError {
2921
+ ranges: SourceRange[];
2922
+ }
2890
2923
  interface TrackComputedStyleUpdatesRequest {
2891
2924
  propertiesToTrack: CSSComputedStyleProperty[];
2892
2925
  }
@@ -5480,9 +5513,13 @@ export declare namespace Emulation {
5480
5513
  /**
5481
5514
  * If set, the posture of a foldable device. If not set the posture is set
5482
5515
  * to continuous.
5516
+ * Deprecated, use Emulation.setDevicePostureOverride.
5483
5517
  */
5484
5518
  devicePosture?: DevicePosture;
5485
5519
  }
5520
+ interface SetDevicePostureOverrideRequest {
5521
+ posture: DevicePosture;
5522
+ }
5486
5523
  interface SetScrollbarsHiddenRequest {
5487
5524
  /**
5488
5525
  * Whether scrollbars should be always hidden.
@@ -7367,6 +7404,7 @@ export declare namespace Network {
7367
7404
  headers: Headers;
7368
7405
  /**
7369
7406
  * HTTP POST request data.
7407
+ * Use postDataEntries instead.
7370
7408
  */
7371
7409
  postData?: string;
7372
7410
  /**
@@ -7374,7 +7412,7 @@ export declare namespace Network {
7374
7412
  */
7375
7413
  hasPostData?: boolean;
7376
7414
  /**
7377
- * Request body elements. This will be converted from base64 to binary
7415
+ * Request body elements (post data broken into individual entries).
7378
7416
  */
7379
7417
  postDataEntries?: PostDataEntry[];
7380
7418
  /**
@@ -7707,6 +7745,10 @@ export declare namespace Network {
7707
7745
  * Specifies that the request was served from the prefetch cache.
7708
7746
  */
7709
7747
  fromPrefetchCache?: boolean;
7748
+ /**
7749
+ * Specifies that the request was served from the prefetch cache.
7750
+ */
7751
+ fromEarlyHints?: boolean;
7710
7752
  /**
7711
7753
  * Information about how Service Worker Static Router was used.
7712
7754
  */
@@ -8028,6 +8070,10 @@ export declare namespace Network {
8028
8070
  * The reason the cookie was exempted.
8029
8071
  */
8030
8072
  exemptionReason: CookieExemptionReason;
8073
+ /**
8074
+ * The string representing this individual cookie as it would appear in the header.
8075
+ */
8076
+ cookieLine: string;
8031
8077
  /**
8032
8078
  * The cookie object representing the cookie.
8033
8079
  */
@@ -8572,6 +8618,18 @@ export declare namespace Network {
8572
8618
  * Connection type if known.
8573
8619
  */
8574
8620
  connectionType?: ConnectionType;
8621
+ /**
8622
+ * WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
8623
+ */
8624
+ packetLoss?: number;
8625
+ /**
8626
+ * WebRTC packet queue length (packet). 0 removes any queue length limitations.
8627
+ */
8628
+ packetQueueLength?: integer;
8629
+ /**
8630
+ * WebRTC packetReordering feature.
8631
+ */
8632
+ packetReordering?: boolean;
8575
8633
  }
8576
8634
  interface EnableRequest {
8577
8635
  /**
@@ -9409,6 +9467,21 @@ export declare namespace Network {
9409
9467
  */
9410
9468
  exemptedCookies?: ExemptedSetCookieWithReason[];
9411
9469
  }
9470
+ /**
9471
+ * Fired when 103 Early Hints headers is received in addition to the common response.
9472
+ * Not every responseReceived event will have an responseReceivedEarlyHints fired.
9473
+ * Only one responseReceivedEarlyHints may be fired for eached responseReceived event.
9474
+ */
9475
+ interface ResponseReceivedEarlyHintsEvent {
9476
+ /**
9477
+ * Request identifier. Used to match this information to another responseReceived event.
9478
+ */
9479
+ requestId: RequestId;
9480
+ /**
9481
+ * Raw response headers as they were received over the wire.
9482
+ */
9483
+ headers: Headers;
9484
+ }
9412
9485
  const enum TrustTokenOperationDoneEventStatus {
9413
9486
  Ok = "Ok",
9414
9487
  InvalidArgument = "InvalidArgument",
@@ -10330,7 +10403,7 @@ export declare namespace Page {
10330
10403
  ChUaPlatform = "ch-ua-platform",
10331
10404
  ChUaModel = "ch-ua-model",
10332
10405
  ChUaMobile = "ch-ua-mobile",
10333
- ChUaFormFactor = "ch-ua-form-factor",
10406
+ ChUaFormFactors = "ch-ua-form-factors",
10334
10407
  ChUaFullVersion = "ch-ua-full-version",
10335
10408
  ChUaFullVersionList = "ch-ua-full-version-list",
10336
10409
  ChUaPlatformVersion = "ch-ua-platform-version",
@@ -10994,6 +11067,7 @@ export declare namespace Page {
10994
11067
  CookieDisabled = "CookieDisabled",
10995
11068
  HTTPAuthRequired = "HTTPAuthRequired",
10996
11069
  CookieFlushed = "CookieFlushed",
11070
+ BroadcastChannelOnMessage = "BroadcastChannelOnMessage",
10997
11071
  WebSocket = "WebSocket",
10998
11072
  WebTransport = "WebTransport",
10999
11073
  WebRTC = "WebRTC",
@@ -12755,30 +12829,6 @@ export declare namespace Storage {
12755
12829
  BidderTrustedSignals = "bidderTrustedSignals",
12756
12830
  SellerTrustedSignals = "sellerTrustedSignals"
12757
12831
  }
12758
- /**
12759
- * Ad advertising element inside an interest group.
12760
- */
12761
- interface InterestGroupAd {
12762
- renderURL: string;
12763
- metadata?: string;
12764
- }
12765
- /**
12766
- * The full details of an interest group.
12767
- */
12768
- interface InterestGroupDetails {
12769
- ownerOrigin: string;
12770
- name: string;
12771
- expirationTime: Network.TimeSinceEpoch;
12772
- joiningOrigin: string;
12773
- biddingLogicURL?: string;
12774
- biddingWasmHelperURL?: string;
12775
- updateURL?: string;
12776
- trustedBiddingSignalsURL?: string;
12777
- trustedBiddingSignalsKeys: string[];
12778
- userBiddingSignals?: string;
12779
- ads: InterestGroupAd[];
12780
- adComponents: InterestGroupAd[];
12781
- }
12782
12832
  /**
12783
12833
  * Enum of shared storage access types.
12784
12834
  */
@@ -12790,6 +12840,7 @@ export declare namespace Storage {
12790
12840
  DocumentAppend = "documentAppend",
12791
12841
  DocumentDelete = "documentDelete",
12792
12842
  DocumentClear = "documentClear",
12843
+ DocumentGet = "documentGet",
12793
12844
  WorkletSet = "workletSet",
12794
12845
  WorkletAppend = "workletAppend",
12795
12846
  WorkletDelete = "workletDelete",
@@ -12798,7 +12849,11 @@ export declare namespace Storage {
12798
12849
  WorkletKeys = "workletKeys",
12799
12850
  WorkletEntries = "workletEntries",
12800
12851
  WorkletLength = "workletLength",
12801
- WorkletRemainingBudget = "workletRemainingBudget"
12852
+ WorkletRemainingBudget = "workletRemainingBudget",
12853
+ HeaderSet = "headerSet",
12854
+ HeaderAppend = "headerAppend",
12855
+ HeaderDelete = "headerDelete",
12856
+ HeaderClear = "headerClear"
12802
12857
  }
12803
12858
  /**
12804
12859
  * Struct for a single key-value pair in an origin's shared storage.
@@ -12883,22 +12938,28 @@ export declare namespace Storage {
12883
12938
  * SharedStorageAccessType.documentDelete,
12884
12939
  * SharedStorageAccessType.workletSet,
12885
12940
  * SharedStorageAccessType.workletAppend,
12886
- * SharedStorageAccessType.workletDelete, and
12887
- * SharedStorageAccessType.workletGet.
12941
+ * SharedStorageAccessType.workletDelete,
12942
+ * SharedStorageAccessType.workletGet,
12943
+ * SharedStorageAccessType.headerSet,
12944
+ * SharedStorageAccessType.headerAppend, and
12945
+ * SharedStorageAccessType.headerDelete.
12888
12946
  */
12889
12947
  key?: string;
12890
12948
  /**
12891
12949
  * Value for a specific entry in an origin's shared storage.
12892
12950
  * Present only for SharedStorageAccessType.documentSet,
12893
12951
  * SharedStorageAccessType.documentAppend,
12894
- * SharedStorageAccessType.workletSet, and
12895
- * SharedStorageAccessType.workletAppend.
12952
+ * SharedStorageAccessType.workletSet,
12953
+ * SharedStorageAccessType.workletAppend,
12954
+ * SharedStorageAccessType.headerSet, and
12955
+ * SharedStorageAccessType.headerAppend.
12896
12956
  */
12897
12957
  value?: string;
12898
12958
  /**
12899
12959
  * Whether or not to set an entry for a key if that key is already present.
12900
- * Present only for SharedStorageAccessType.documentSet and
12901
- * SharedStorageAccessType.workletSet.
12960
+ * Present only for SharedStorageAccessType.documentSet,
12961
+ * SharedStorageAccessType.workletSet, and
12962
+ * SharedStorageAccessType.headerSet.
12902
12963
  */
12903
12964
  ignoreIfPresent?: boolean;
12904
12965
  }
@@ -13006,7 +13067,8 @@ export declare namespace Storage {
13006
13067
  DestinationGlobalLimitReached = "destinationGlobalLimitReached",
13007
13068
  DestinationBothLimitsReached = "destinationBothLimitsReached",
13008
13069
  ReportingOriginsPerSiteLimitReached = "reportingOriginsPerSiteLimitReached",
13009
- ExceedsMaxChannelCapacity = "exceedsMaxChannelCapacity"
13070
+ ExceedsMaxChannelCapacity = "exceedsMaxChannelCapacity",
13071
+ ExceedsMaxTriggerStateCardinality = "exceedsMaxTriggerStateCardinality"
13010
13072
  }
13011
13073
  const enum AttributionReportingSourceRegistrationTimeConfig {
13012
13074
  Include = "include",
@@ -13088,6 +13150,23 @@ export declare namespace Storage {
13088
13150
  ReportWindowPassed = "reportWindowPassed",
13089
13151
  ExcessiveReports = "excessiveReports"
13090
13152
  }
13153
+ /**
13154
+ * A single Related Website Set object.
13155
+ */
13156
+ interface RelatedWebsiteSet {
13157
+ /**
13158
+ * The primary site of this set, along with the ccTLDs if there is any.
13159
+ */
13160
+ primarySites: string[];
13161
+ /**
13162
+ * The associated sites of this set, along with the ccTLDs if there is any.
13163
+ */
13164
+ associatedSites: string[];
13165
+ /**
13166
+ * The service sites of this set, along with the ccTLDs if there is any.
13167
+ */
13168
+ serviceSites: string[];
13169
+ }
13091
13170
  interface GetStorageKeyForFrameRequest {
13092
13171
  frameId: Page.FrameId;
13093
13172
  }
@@ -13247,7 +13326,13 @@ export declare namespace Storage {
13247
13326
  name: string;
13248
13327
  }
13249
13328
  interface GetInterestGroupDetailsResponse extends ProtocolResponseWithError {
13250
- details: InterestGroupDetails;
13329
+ /**
13330
+ * This largely corresponds to:
13331
+ * https://wicg.github.io/turtledove/#dictdef-generatebidinterestgroup
13332
+ * but has absolute expirationTime instead of relative lifetimeMs and
13333
+ * also adds joiningOrigin.
13334
+ */
13335
+ details: any;
13251
13336
  }
13252
13337
  interface SetInterestGroupTrackingRequest {
13253
13338
  enable: boolean;
@@ -13309,6 +13394,15 @@ export declare namespace Storage {
13309
13394
  interface SetAttributionReportingTrackingRequest {
13310
13395
  enable: boolean;
13311
13396
  }
13397
+ interface SendPendingAttributionReportsResponse extends ProtocolResponseWithError {
13398
+ /**
13399
+ * The number of reports that were sent.
13400
+ */
13401
+ numSent: integer;
13402
+ }
13403
+ interface GetRelatedWebsiteSetsResponse extends ProtocolResponseWithError {
13404
+ sets: RelatedWebsiteSet[];
13405
+ }
13312
13406
  /**
13313
13407
  * A cache's contents have been modified.
13314
13408
  */
@@ -15589,6 +15683,40 @@ export declare namespace FedCm {
15589
15683
  dialogId: string;
15590
15684
  }
15591
15685
  }
15686
+ /**
15687
+ * This domain allows interacting with the browser to control PWAs.
15688
+ */
15689
+ export declare namespace PWA {
15690
+ /**
15691
+ * The following types are the replica of
15692
+ * https://crsrc.org/c/chrome/browser/web_applications/proto/web_app_os_integration_state.proto;drc=9910d3be894c8f142c977ba1023f30a656bc13fc;l=67
15693
+ */
15694
+ interface FileHandlerAccept {
15695
+ /**
15696
+ * New name of the mimetype according to
15697
+ * https://www.iana.org/assignments/media-types/media-types.xhtml
15698
+ */
15699
+ mediaType: string;
15700
+ fileExtensions: string[];
15701
+ }
15702
+ interface FileHandler {
15703
+ action: string;
15704
+ accepts: FileHandlerAccept[];
15705
+ displayName: string;
15706
+ }
15707
+ interface GetOsAppStateRequest {
15708
+ /**
15709
+ * The id from the webapp's manifest file, commonly it's the url of the
15710
+ * site installing the webapp. See
15711
+ * https://web.dev/learn/pwa/web-app-manifest.
15712
+ */
15713
+ manifestId: string;
15714
+ }
15715
+ interface GetOsAppStateResponse extends ProtocolResponseWithError {
15716
+ badgeCount: integer;
15717
+ fileHandlers: FileHandler[];
15718
+ }
15719
+ }
15592
15720
  /**
15593
15721
  * Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
15594
15722
  * breakpoints, stepping through execution, exploring stack traces, etc.