@types/serviceworker 0.0.184 → 0.0.185

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/README.md CHANGED
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
28
28
 
29
29
  ## Deploy Metadata
30
30
 
31
- You can read what changed in version 0.0.184 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.184.
31
+ You can read what changed in version 0.0.185 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.185.
package/index.d.ts CHANGED
@@ -275,6 +275,20 @@ interface FontFaceSetLoadEventInit extends EventInit {
275
275
  fontfaces?: FontFace[];
276
276
  }
277
277
 
278
+ interface GPUCanvasConfiguration {
279
+ alphaMode?: GPUCanvasAlphaMode;
280
+ colorSpace?: PredefinedColorSpace;
281
+ device: GPUDevice;
282
+ format: GPUTextureFormat;
283
+ toneMapping?: GPUCanvasToneMapping;
284
+ usage?: GPUTextureUsageFlags;
285
+ viewFormats?: GPUTextureFormat[];
286
+ }
287
+
288
+ interface GPUCanvasToneMapping {
289
+ mode?: GPUCanvasToneMappingMode;
290
+ }
291
+
278
292
  interface GPUColorDict {
279
293
  a: number;
280
294
  b: number;
@@ -282,6 +296,19 @@ interface GPUColorDict {
282
296
  r: number;
283
297
  }
284
298
 
299
+ interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
300
+ }
301
+
302
+ interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
303
+ timestampWrites?: GPUComputePassTimestampWrites;
304
+ }
305
+
306
+ interface GPUComputePassTimestampWrites {
307
+ beginningOfPassWriteIndex?: GPUSize32;
308
+ endOfPassWriteIndex?: GPUSize32;
309
+ querySet: GPUQuerySet;
310
+ }
311
+
285
312
  interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
286
313
  colorSpace?: PredefinedColorSpace;
287
314
  premultipliedAlpha?: boolean;
@@ -321,6 +348,45 @@ interface GPUPipelineErrorInit {
321
348
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
322
349
  }
323
350
 
351
+ interface GPURenderPassColorAttachment {
352
+ clearValue?: GPUColor;
353
+ depthSlice?: GPUIntegerCoordinate;
354
+ loadOp: GPULoadOp;
355
+ resolveTarget?: GPUTexture | GPUTextureView;
356
+ storeOp: GPUStoreOp;
357
+ view: GPUTexture | GPUTextureView;
358
+ }
359
+
360
+ interface GPURenderPassDepthStencilAttachment {
361
+ depthClearValue?: number;
362
+ depthLoadOp?: GPULoadOp;
363
+ depthReadOnly?: boolean;
364
+ depthStoreOp?: GPUStoreOp;
365
+ stencilClearValue?: GPUStencilValue;
366
+ stencilLoadOp?: GPULoadOp;
367
+ stencilReadOnly?: boolean;
368
+ stencilStoreOp?: GPUStoreOp;
369
+ view: GPUTexture | GPUTextureView;
370
+ }
371
+
372
+ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
373
+ colorAttachments: (GPURenderPassColorAttachment | null)[];
374
+ depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
375
+ maxDrawCount?: GPUSize64;
376
+ occlusionQuerySet?: GPUQuerySet;
377
+ timestampWrites?: GPURenderPassTimestampWrites;
378
+ }
379
+
380
+ interface GPURenderPassTimestampWrites {
381
+ beginningOfPassWriteIndex?: GPUSize32;
382
+ endOfPassWriteIndex?: GPUSize32;
383
+ querySet: GPUQuerySet;
384
+ }
385
+
386
+ interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
387
+ buffer: GPUBuffer;
388
+ }
389
+
324
390
  interface GPUTexelCopyBufferLayout {
325
391
  bytesPerRow?: GPUSize32;
326
392
  offset?: GPUSize64;
@@ -4397,6 +4463,50 @@ declare var GPUBuffer: {
4397
4463
  new(): GPUBuffer;
4398
4464
  };
4399
4465
 
4466
+ /**
4467
+ * The **`GPUCanvasContext`** interface of the WebGPU API represents the WebGPU rendering context of a <canvas> element, returned via an HTMLCanvasElement.getContext() call with a contextType of "webgpu".
4468
+ * Available only in secure contexts.
4469
+ *
4470
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
4471
+ */
4472
+ interface GPUCanvasContext {
4473
+ /**
4474
+ * The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
4475
+ *
4476
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
4477
+ */
4478
+ readonly canvas: OffscreenCanvas;
4479
+ /**
4480
+ * The **`configure()`** method of the GPUCanvasContext interface configures the context to use for rendering with a given GPUDevice. When called the canvas will initially be cleared to transparent black.
4481
+ *
4482
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
4483
+ */
4484
+ configure(configuration: GPUCanvasConfiguration): void;
4485
+ /**
4486
+ * The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
4487
+ *
4488
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
4489
+ */
4490
+ getConfiguration(): GPUCanvasConfiguration | null;
4491
+ /**
4492
+ * The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
4493
+ *
4494
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
4495
+ */
4496
+ getCurrentTexture(): GPUTexture;
4497
+ /**
4498
+ * The **`unconfigure()`** method of the GPUCanvasContext interface removes any previously-set context configuration, and destroys any textures returned via getCurrentTexture() while the canvas context was configured.
4499
+ *
4500
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
4501
+ */
4502
+ unconfigure(): void;
4503
+ }
4504
+
4505
+ declare var GPUCanvasContext: {
4506
+ prototype: GPUCanvasContext;
4507
+ new(): GPUCanvasContext;
4508
+ };
4509
+
4400
4510
  /**
4401
4511
  * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
4402
4512
  * Available only in secure contexts.
@@ -4411,6 +4521,75 @@ declare var GPUCommandBuffer: {
4411
4521
  new(): GPUCommandBuffer;
4412
4522
  };
4413
4523
 
4524
+ /**
4525
+ * The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
4526
+ * Available only in secure contexts.
4527
+ *
4528
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
4529
+ */
4530
+ interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
4531
+ /**
4532
+ * The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
4533
+ *
4534
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
4535
+ */
4536
+ beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
4537
+ /**
4538
+ * The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
4539
+ *
4540
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
4541
+ */
4542
+ beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
4543
+ /**
4544
+ * The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
4545
+ *
4546
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
4547
+ */
4548
+ clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
4549
+ /**
4550
+ * The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
4551
+ *
4552
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
4553
+ */
4554
+ copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
4555
+ copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
4556
+ /**
4557
+ * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
4558
+ *
4559
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
4560
+ */
4561
+ copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
4562
+ /**
4563
+ * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
4564
+ *
4565
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
4566
+ */
4567
+ copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
4568
+ /**
4569
+ * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
4570
+ *
4571
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
4572
+ */
4573
+ copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
4574
+ /**
4575
+ * The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
4576
+ *
4577
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
4578
+ */
4579
+ finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
4580
+ /**
4581
+ * The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
4582
+ *
4583
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
4584
+ */
4585
+ resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
4586
+ }
4587
+
4588
+ declare var GPUCommandEncoder: {
4589
+ prototype: GPUCommandEncoder;
4590
+ new(): GPUCommandEncoder;
4591
+ };
4592
+
4414
4593
  /**
4415
4594
  * The **`GPUCompilationInfo`** interface of the WebGPU API represents an array of GPUCompilationMessage objects generated by the GPU shader module compiler to help diagnose problems with shader code.
4416
4595
  * Available only in secure contexts.
@@ -4542,6 +4721,60 @@ interface GPUDebugCommandsMixin {
4542
4721
  pushDebugGroup(groupLabel: string): void;
4543
4722
  }
4544
4723
 
4724
+ interface GPUDeviceEventMap {
4725
+ "uncapturederror": GPUUncapturedErrorEvent;
4726
+ }
4727
+
4728
+ /**
4729
+ * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed.
4730
+ * Available only in secure contexts.
4731
+ *
4732
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
4733
+ */
4734
+ interface GPUDevice extends EventTarget, GPUObjectBase {
4735
+ /**
4736
+ * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
4737
+ *
4738
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
4739
+ */
4740
+ readonly adapterInfo: GPUAdapterInfo;
4741
+ /**
4742
+ * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included.
4743
+ *
4744
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
4745
+ */
4746
+ readonly features: GPUSupportedFeatures;
4747
+ /**
4748
+ * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values.
4749
+ *
4750
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
4751
+ */
4752
+ readonly limits: GPUSupportedLimits;
4753
+ /**
4754
+ * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost.
4755
+ *
4756
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
4757
+ */
4758
+ readonly lost: Promise<GPUDeviceLostInfo>;
4759
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
4760
+ onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
4761
+ /**
4762
+ * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
4763
+ *
4764
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
4765
+ */
4766
+ readonly queue: GPUQueue;
4767
+ addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
4768
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
4769
+ removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
4770
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
4771
+ }
4772
+
4773
+ declare var GPUDevice: {
4774
+ prototype: GPUDevice;
4775
+ new(): GPUDevice;
4776
+ };
4777
+
4545
4778
  /**
4546
4779
  * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost.
4547
4780
  * Available only in secure contexts.
@@ -12721,7 +12954,7 @@ type ImageDataArray = Uint8ClampedArray<ArrayBuffer>;
12721
12954
  type Int32List = Int32Array<ArrayBufferLike> | GLint[];
12722
12955
  type MessageEventSource = MessagePort | ServiceWorker;
12723
12956
  type NamedCurve = string;
12724
- type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
12957
+ type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
12725
12958
  type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
12726
12959
  type PerformanceEntryList = PerformanceEntry[];
12727
12960
  type PushMessageDataInit = BufferSource | string;
@@ -12762,11 +12995,15 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
12762
12995
  type FontFaceSetLoadStatus = "loaded" | "loading";
12763
12996
  type FrameType = "auxiliary" | "nested" | "none" | "top-level";
12764
12997
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
12998
+ type GPUCanvasAlphaMode = "opaque" | "premultiplied";
12999
+ type GPUCanvasToneMappingMode = "extended" | "standard";
12765
13000
  type GPUCompilationMessageType = "error" | "info" | "warning";
12766
13001
  type GPUDeviceLostReason = "destroyed" | "unknown";
12767
13002
  type GPUIndexFormat = "uint16" | "uint32";
13003
+ type GPULoadOp = "clear" | "load";
12768
13004
  type GPUPipelineErrorReason = "internal" | "validation";
12769
13005
  type GPUQueryType = "occlusion" | "timestamp";
13006
+ type GPUStoreOp = "discard" | "store";
12770
13007
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
12771
13008
  type GPUTextureDimension = "1d" | "2d" | "3d";
12772
13009
  type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8";
@@ -12907,6 +13144,27 @@ interface GPUBindingCommandsMixin {
12907
13144
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
12908
13145
  }
12909
13146
 
13147
+ interface GPUCommandEncoder {
13148
+ /**
13149
+ * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
13150
+ *
13151
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
13152
+ */
13153
+ copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
13154
+ /**
13155
+ * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
13156
+ *
13157
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
13158
+ */
13159
+ copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
13160
+ /**
13161
+ * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
13162
+ *
13163
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
13164
+ */
13165
+ copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
13166
+ }
13167
+
12910
13168
  interface GPUQueue {
12911
13169
  /**
12912
13170
  * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/serviceworker",
3
- "version": "0.0.184",
3
+ "version": "0.0.185",
4
4
  "description": "Types for the global scope of Service Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -272,6 +272,20 @@ interface FontFaceSetLoadEventInit extends EventInit {
272
272
  fontfaces?: FontFace[];
273
273
  }
274
274
 
275
+ interface GPUCanvasConfiguration {
276
+ alphaMode?: GPUCanvasAlphaMode;
277
+ colorSpace?: PredefinedColorSpace;
278
+ device: GPUDevice;
279
+ format: GPUTextureFormat;
280
+ toneMapping?: GPUCanvasToneMapping;
281
+ usage?: GPUTextureUsageFlags;
282
+ viewFormats?: GPUTextureFormat[];
283
+ }
284
+
285
+ interface GPUCanvasToneMapping {
286
+ mode?: GPUCanvasToneMappingMode;
287
+ }
288
+
275
289
  interface GPUColorDict {
276
290
  a: number;
277
291
  b: number;
@@ -279,6 +293,19 @@ interface GPUColorDict {
279
293
  r: number;
280
294
  }
281
295
 
296
+ interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
297
+ }
298
+
299
+ interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
300
+ timestampWrites?: GPUComputePassTimestampWrites;
301
+ }
302
+
303
+ interface GPUComputePassTimestampWrites {
304
+ beginningOfPassWriteIndex?: GPUSize32;
305
+ endOfPassWriteIndex?: GPUSize32;
306
+ querySet: GPUQuerySet;
307
+ }
308
+
282
309
  interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
283
310
  colorSpace?: PredefinedColorSpace;
284
311
  premultipliedAlpha?: boolean;
@@ -318,6 +345,45 @@ interface GPUPipelineErrorInit {
318
345
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
319
346
  }
320
347
 
348
+ interface GPURenderPassColorAttachment {
349
+ clearValue?: GPUColor;
350
+ depthSlice?: GPUIntegerCoordinate;
351
+ loadOp: GPULoadOp;
352
+ resolveTarget?: GPUTexture | GPUTextureView;
353
+ storeOp: GPUStoreOp;
354
+ view: GPUTexture | GPUTextureView;
355
+ }
356
+
357
+ interface GPURenderPassDepthStencilAttachment {
358
+ depthClearValue?: number;
359
+ depthLoadOp?: GPULoadOp;
360
+ depthReadOnly?: boolean;
361
+ depthStoreOp?: GPUStoreOp;
362
+ stencilClearValue?: GPUStencilValue;
363
+ stencilLoadOp?: GPULoadOp;
364
+ stencilReadOnly?: boolean;
365
+ stencilStoreOp?: GPUStoreOp;
366
+ view: GPUTexture | GPUTextureView;
367
+ }
368
+
369
+ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
370
+ colorAttachments: (GPURenderPassColorAttachment | null)[];
371
+ depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
372
+ maxDrawCount?: GPUSize64;
373
+ occlusionQuerySet?: GPUQuerySet;
374
+ timestampWrites?: GPURenderPassTimestampWrites;
375
+ }
376
+
377
+ interface GPURenderPassTimestampWrites {
378
+ beginningOfPassWriteIndex?: GPUSize32;
379
+ endOfPassWriteIndex?: GPUSize32;
380
+ querySet: GPUQuerySet;
381
+ }
382
+
383
+ interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
384
+ buffer: GPUBuffer;
385
+ }
386
+
321
387
  interface GPUTexelCopyBufferLayout {
322
388
  bytesPerRow?: GPUSize32;
323
389
  offset?: GPUSize64;
@@ -4394,6 +4460,50 @@ declare var GPUBuffer: {
4394
4460
  new(): GPUBuffer;
4395
4461
  };
4396
4462
 
4463
+ /**
4464
+ * The **`GPUCanvasContext`** interface of the WebGPU API represents the WebGPU rendering context of a <canvas> element, returned via an HTMLCanvasElement.getContext() call with a contextType of "webgpu".
4465
+ * Available only in secure contexts.
4466
+ *
4467
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
4468
+ */
4469
+ interface GPUCanvasContext {
4470
+ /**
4471
+ * The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
4472
+ *
4473
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
4474
+ */
4475
+ readonly canvas: OffscreenCanvas;
4476
+ /**
4477
+ * The **`configure()`** method of the GPUCanvasContext interface configures the context to use for rendering with a given GPUDevice. When called the canvas will initially be cleared to transparent black.
4478
+ *
4479
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
4480
+ */
4481
+ configure(configuration: GPUCanvasConfiguration): void;
4482
+ /**
4483
+ * The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
4484
+ *
4485
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
4486
+ */
4487
+ getConfiguration(): GPUCanvasConfiguration | null;
4488
+ /**
4489
+ * The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
4490
+ *
4491
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
4492
+ */
4493
+ getCurrentTexture(): GPUTexture;
4494
+ /**
4495
+ * The **`unconfigure()`** method of the GPUCanvasContext interface removes any previously-set context configuration, and destroys any textures returned via getCurrentTexture() while the canvas context was configured.
4496
+ *
4497
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
4498
+ */
4499
+ unconfigure(): void;
4500
+ }
4501
+
4502
+ declare var GPUCanvasContext: {
4503
+ prototype: GPUCanvasContext;
4504
+ new(): GPUCanvasContext;
4505
+ };
4506
+
4397
4507
  /**
4398
4508
  * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
4399
4509
  * Available only in secure contexts.
@@ -4408,6 +4518,75 @@ declare var GPUCommandBuffer: {
4408
4518
  new(): GPUCommandBuffer;
4409
4519
  };
4410
4520
 
4521
+ /**
4522
+ * The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
4523
+ * Available only in secure contexts.
4524
+ *
4525
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
4526
+ */
4527
+ interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
4528
+ /**
4529
+ * The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
4530
+ *
4531
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
4532
+ */
4533
+ beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
4534
+ /**
4535
+ * The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
4536
+ *
4537
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
4538
+ */
4539
+ beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
4540
+ /**
4541
+ * The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
4542
+ *
4543
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
4544
+ */
4545
+ clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
4546
+ /**
4547
+ * The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
4548
+ *
4549
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
4550
+ */
4551
+ copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
4552
+ copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
4553
+ /**
4554
+ * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
4555
+ *
4556
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
4557
+ */
4558
+ copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
4559
+ /**
4560
+ * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
4561
+ *
4562
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
4563
+ */
4564
+ copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
4565
+ /**
4566
+ * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
4567
+ *
4568
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
4569
+ */
4570
+ copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
4571
+ /**
4572
+ * The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
4573
+ *
4574
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
4575
+ */
4576
+ finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
4577
+ /**
4578
+ * The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
4579
+ *
4580
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
4581
+ */
4582
+ resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
4583
+ }
4584
+
4585
+ declare var GPUCommandEncoder: {
4586
+ prototype: GPUCommandEncoder;
4587
+ new(): GPUCommandEncoder;
4588
+ };
4589
+
4411
4590
  /**
4412
4591
  * The **`GPUCompilationInfo`** interface of the WebGPU API represents an array of GPUCompilationMessage objects generated by the GPU shader module compiler to help diagnose problems with shader code.
4413
4592
  * Available only in secure contexts.
@@ -4539,6 +4718,60 @@ interface GPUDebugCommandsMixin {
4539
4718
  pushDebugGroup(groupLabel: string): void;
4540
4719
  }
4541
4720
 
4721
+ interface GPUDeviceEventMap {
4722
+ "uncapturederror": GPUUncapturedErrorEvent;
4723
+ }
4724
+
4725
+ /**
4726
+ * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed.
4727
+ * Available only in secure contexts.
4728
+ *
4729
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
4730
+ */
4731
+ interface GPUDevice extends EventTarget, GPUObjectBase {
4732
+ /**
4733
+ * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
4734
+ *
4735
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
4736
+ */
4737
+ readonly adapterInfo: GPUAdapterInfo;
4738
+ /**
4739
+ * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included.
4740
+ *
4741
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
4742
+ */
4743
+ readonly features: GPUSupportedFeatures;
4744
+ /**
4745
+ * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values.
4746
+ *
4747
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
4748
+ */
4749
+ readonly limits: GPUSupportedLimits;
4750
+ /**
4751
+ * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost.
4752
+ *
4753
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
4754
+ */
4755
+ readonly lost: Promise<GPUDeviceLostInfo>;
4756
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
4757
+ onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
4758
+ /**
4759
+ * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
4760
+ *
4761
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
4762
+ */
4763
+ readonly queue: GPUQueue;
4764
+ addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
4765
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
4766
+ removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
4767
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
4768
+ }
4769
+
4770
+ declare var GPUDevice: {
4771
+ prototype: GPUDevice;
4772
+ new(): GPUDevice;
4773
+ };
4774
+
4542
4775
  /**
4543
4776
  * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost.
4544
4777
  * Available only in secure contexts.
@@ -12718,7 +12951,7 @@ type ImageDataArray = Uint8ClampedArray;
12718
12951
  type Int32List = Int32Array | GLint[];
12719
12952
  type MessageEventSource = MessagePort | ServiceWorker;
12720
12953
  type NamedCurve = string;
12721
- type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
12954
+ type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
12722
12955
  type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
12723
12956
  type PerformanceEntryList = PerformanceEntry[];
12724
12957
  type PushMessageDataInit = BufferSource | string;
@@ -12759,11 +12992,15 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
12759
12992
  type FontFaceSetLoadStatus = "loaded" | "loading";
12760
12993
  type FrameType = "auxiliary" | "nested" | "none" | "top-level";
12761
12994
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
12995
+ type GPUCanvasAlphaMode = "opaque" | "premultiplied";
12996
+ type GPUCanvasToneMappingMode = "extended" | "standard";
12762
12997
  type GPUCompilationMessageType = "error" | "info" | "warning";
12763
12998
  type GPUDeviceLostReason = "destroyed" | "unknown";
12764
12999
  type GPUIndexFormat = "uint16" | "uint32";
13000
+ type GPULoadOp = "clear" | "load";
12765
13001
  type GPUPipelineErrorReason = "internal" | "validation";
12766
13002
  type GPUQueryType = "occlusion" | "timestamp";
13003
+ type GPUStoreOp = "discard" | "store";
12767
13004
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
12768
13005
  type GPUTextureDimension = "1d" | "2d" | "3d";
12769
13006
  type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8";