diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index eed90019a..6a4613824 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -119,12 +119,29 @@ interface AuthenticationExtensionsClientInputs { credProps?: boolean; hmacCreateSecret?: boolean; minPinLength?: boolean; + prf?: AuthenticationExtensionsPRFInputs; } interface AuthenticationExtensionsClientOutputs { appid?: boolean; credProps?: CredentialPropertiesOutput; hmacCreateSecret?: boolean; + prf?: AuthenticationExtensionsPRFOutputs; +} + +interface AuthenticationExtensionsPRFInputs { + eval?: AuthenticationExtensionsPRFValues; + evalByCredential?: Record; +} + +interface AuthenticationExtensionsPRFOutputs { + enabled?: boolean; + results?: AuthenticationExtensionsPRFValues; +} + +interface AuthenticationExtensionsPRFValues { + first: BufferSource; + second?: BufferSource; } interface AuthenticatorSelectionCriteria { @@ -684,16 +701,6 @@ interface InputEventInit extends UIEventInit { targetRanges?: StaticRange[]; } -interface IntersectionObserverEntryInit { - boundingClientRect: DOMRectInit; - intersectionRatio: number; - intersectionRect: DOMRectInit; - isIntersecting: boolean; - rootBounds: DOMRectInit | null; - target: Element; - time: DOMHighResTimeStamp; -} - interface IntersectionObserverInit { root?: Element | Document | null; rootMargin?: string; @@ -903,6 +910,7 @@ interface MediaStreamTrackEventInit extends EventInit { interface MediaTrackCapabilities { aspectRatio?: DoubleRange; autoGainControl?: boolean[]; + backgroundBlur?: boolean[]; channelCount?: ULongRange; deviceId?: string; displaySurface?: string; @@ -920,6 +928,7 @@ interface MediaTrackCapabilities { interface MediaTrackConstraintSet { aspectRatio?: ConstrainDouble; autoGainControl?: ConstrainBoolean; + backgroundBlur?: ConstrainBoolean; channelCount?: ConstrainULong; deviceId?: ConstrainDOMString; displaySurface?: ConstrainDOMString; @@ -941,6 +950,7 @@ interface MediaTrackConstraints extends MediaTrackConstraintSet { interface MediaTrackSettings { aspectRatio?: number; autoGainControl?: boolean; + backgroundBlur?: boolean; channelCount?: number; deviceId?: string; displaySurface?: string; @@ -958,6 +968,7 @@ interface MediaTrackSettings { interface MediaTrackSupportedConstraints { aspectRatio?: boolean; autoGainControl?: boolean; + backgroundBlur?: boolean; channelCount?: boolean; deviceId?: boolean; displaySurface?: boolean; @@ -8732,7 +8743,7 @@ interface FontFaceSet extends EventTarget { declare var FontFaceSet: { prototype: FontFaceSet; - new(initialFaces: FontFace[]): FontFaceSet; + new(): FontFaceSet; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */ @@ -14205,7 +14216,7 @@ interface IntersectionObserverEntry { declare var IntersectionObserverEntry: { prototype: IntersectionObserverEntry; - new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry; + new(): IntersectionObserverEntry; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/KHR_parallel_shader_compile) */ @@ -21709,7 +21720,7 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */ - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length?: number | null): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */ diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index c053b4fdc..95bad8279 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -2746,7 +2746,7 @@ interface FontFaceSet extends EventTarget { declare var FontFaceSet: { prototype: FontFaceSet; - new(initialFaces: FontFace[]): FontFaceSet; + new(): FontFaceSet; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */ @@ -5028,7 +5028,7 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */ - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length?: number | null): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */ diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index eab328c05..0a9e497a4 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -2635,7 +2635,7 @@ interface FontFaceSet extends EventTarget { declare var FontFaceSet: { prototype: FontFaceSet; - new(initialFaces: FontFace[]): FontFaceSet; + new(): FontFaceSet; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */ @@ -4835,7 +4835,7 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */ - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length?: number | null): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */ diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 696db64e6..fd05ab80f 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -3012,7 +3012,7 @@ interface FontFaceSet extends EventTarget { declare var FontFaceSet: { prototype: FontFaceSet; - new(initialFaces: FontFace[]): FontFaceSet; + new(): FontFaceSet; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */ @@ -5407,7 +5407,7 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */ - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length?: number | null): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */ diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 94d38d862..04a2a85da 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -3214,7 +3214,15 @@ } } }, + "MIDIAccess": { + "exposed": "Window", // Window only on Gecko/Blink as of 2024-07 + "transferable": false // Not transferable on Gecko/Blink as of 2024-07 + }, + "MIDIConnectionEvent": { + "exposed": "Window" // Window only on Gecko/Blink as of 2024-07 + }, "MIDIInput": { + "exposed": "Window", // Window only on Gecko/Blink as of 2024-07 "events": { "event": [ { @@ -3224,7 +3232,20 @@ ] } }, + "MIDIInputMap": { + "exposed": "Window" // Window only on Gecko/Blink as of 2024-07 + }, + "MIDIMessageEvent": { + "exposed": "Window" // Window only on Gecko/Blink as of 2024-07 + }, + "MIDIOutput": { + "exposed": "Window" // Window only on Gecko/Blink as of 2024-07 + }, + "MIDIOutputMap": { + "exposed": "Window" // Window only on Gecko/Blink as of 2024-07 + }, "MIDIPort": { + "exposed": "Window", // Window only on Gecko/Blink as of 2024-07 "events": { "event": [ { diff --git a/inputfiles/removedTypes.jsonc b/inputfiles/removedTypes.jsonc index edddfeeec..345f38e6b 100644 --- a/inputfiles/removedTypes.jsonc +++ b/inputfiles/removedTypes.jsonc @@ -21,13 +21,14 @@ }, "MediaSessionAction": { "value": [ - "enterpictureinpicture", // Blink only as of 2023-10 - "hangup", // Blink only as of 2022-09 - "nextslide", // Blink only as of as of 2024-06 - "previousslide", // Blink only as of as of 2024-06 - "togglecamera", // Blink only as of 2022-09 - "togglemicrophone", // Blink only as of 2022-09 - "togglescreenshare" // No implementation as of 2022-09 + "enterpictureinpicture", // Blink only as of 2024-07 + "hangup", // Blink only as of 2024-07 + "nextslide", // Blink only as of as of 2024-07 + "previousslide", // Blink only as of as of 2024-07 + "togglecamera", // Blink only as of 2024-07 + "togglemicrophone", // Blink only as of 2024-07 + "togglescreenshare", // No implementation as of 2024-07 + "voiceactivity" // No implementation as of 2024-07 ] }, "RequestDestination": { @@ -93,8 +94,7 @@ "CSSRule": { "constants": { "constant": { - "MARGIN_RULE": null, // WebKit only as of 2023-10 - "VIEW_TRANSITION_RULE": null // No implementation as of 2023-10 + "MARGIN_RULE": null // WebKit only as of 2023-10 } } }, @@ -108,6 +108,9 @@ } } }, + "IntersectionObserverEntry": { + "constructor": null // WebKit-only as of 2024-07 + }, "PaymentResponse": { "methods": { "method": { @@ -213,9 +216,7 @@ "hmacGetSecret": null, // No implementation as of 2023-11 "largeBlob": null, "payment": null, - "prf": null, - "supplementalPubKeys": null, // No implementation as of 2023-11 - "uvm": null + "supplementalPubKeys": null // No implementation as of 2023-11 } } }, @@ -226,9 +227,7 @@ "appidExclude": null, // No implementation as of 2023-11 "hmacGetSecret": null, // No implementation as of 2023-11 "largeBlob": null, - "prf": null, - "supplementalPubKeys": null, // No implementation as of 2023-11 - "uvm": null + "supplementalPubKeys": null // No implementation as of 2023-11 } } }, @@ -309,7 +308,9 @@ "IntersectionObserverInit": { "members": { "member": { - "scrollMargin": null // Blink only as of 2023-10 + "delay": null, // Blink only as of 2024-07 + "scrollMargin": null, // Blink only as of 2024-07 + "trackVisibility": null // Blink only as of 2024-07 } } }, diff --git a/package-lock.json b/package-lock.json index 1f7a0911a..71209e84d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -837,10 +837,11 @@ "dev": true }, "node_modules/@webref/css": { - "version": "6.12.15", - "resolved": "https://registry.npmjs.org/@webref/css/-/css-6.12.15.tgz", - "integrity": "sha512-OMq64wmRzvxQL+2ohfHIZ4mFY4HXzM3UrcXQTTfVU6h1T9luHyjoMqe4vO7vTw31WbvcPLU3dt8LC/OAz82mfg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@webref/css/-/css-6.14.0.tgz", + "integrity": "sha512-TINJdJXcq/TpGD78Qosjzt9Un0Hw6giqJgq1PkCvNpvS5D16UeMrKeR/nS8lt+xBPkAylusXdYt390YiBgUMXA==", "dev": true, + "license": "MIT", "peerDependencies": { "css-tree": "^2.3.1" } @@ -852,10 +853,11 @@ "dev": true }, "node_modules/@webref/idl": { - "version": "3.49.0", - "resolved": "https://registry.npmjs.org/@webref/idl/-/idl-3.49.0.tgz", - "integrity": "sha512-KWLG4p2njOYsAcuImD6tCpf+71dAfGNziSsbt1inVjdh2YOR6/rtPxL0Bmd6NFoUwaRD28zoCnN/vrPHe5+eDg==", + "version": "3.52.0", + "resolved": "https://registry.npmjs.org/@webref/idl/-/idl-3.52.0.tgz", + "integrity": "sha512-sFo11HDgDowucHWn37fJn/m4MfH/TQknlZc7zZoH6KCRfRzmYndGFKvb4Toy4ywbhU79LqbexZFp/v8/AFi9TA==", "dev": true, + "license": "MIT", "peerDependencies": { "webidl2": "^24.4.1" } diff --git a/src/build.ts b/src/build.ts index faf5772d4..d32de1254 100644 --- a/src/build.ts +++ b/src/build.ts @@ -116,20 +116,6 @@ async function emitDom() { await Promise.all([...(await getWebidls()).entries()].map(convertWidl)) ).filter((i) => i) as ReturnType[]; - const transferables = widlStandardTypes.flatMap((st) => { - return Object.values(st.browser.interfaces?.interface ?? {}).filter( - (i) => i.transferable, - ); - }); - - addedItems.typedefs.typedef.push({ - name: "Transferable", - type: [ - ...transferables.map((v) => ({ type: v.name })), - { type: "ArrayBuffer" }, - ], - }); - async function convertWidl([shortName, idl]: string[]) { let commentsMap: Record; try { @@ -271,6 +257,24 @@ async function emitDom() { } } + const transferables = Object.values( + webidl.interfaces?.interface ?? {}, + ).filter((i) => i.transferable); + + webidl = merge(webidl, { + typedefs: { + typedef: [ + { + name: "Transferable", + type: [ + ...transferables.map((v) => ({ type: v.name })), + { type: "ArrayBuffer" }, + ], + }, + ], + }, + }); + const knownTypes = await readInputJSON("knownTypes.json"); emitFlavor(webidl, new Set(knownTypes.Window), {