diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 65f329b33..fedff2bb7 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -31943,7 +31943,7 @@ declare var StorageManager: { new(): StorageManager; }; -/** @deprecated */ +/** @deprecated Do not use */ interface StyleMedia { type: string; matchMedium(mediaquery: string): boolean; diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 60f0b03cf..9cc3496f0 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -31918,7 +31918,7 @@ declare var StorageManager: { new(): StorageManager; }; -/** @deprecated */ +/** @deprecated Do not use */ interface StyleMedia { type: string; matchMedium(mediaquery: string): boolean; diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index 491428154..0861d592c 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -31940,7 +31940,7 @@ declare var StorageManager: { new(): StorageManager; }; -/** @deprecated */ +/** @deprecated Do not use */ interface StyleMedia { type: string; matchMedium(mediaquery: string): boolean; diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index 96f357d66..460d98e67 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -31940,7 +31940,7 @@ declare var StorageManager: { new(): StorageManager; }; -/** @deprecated */ +/** @deprecated Do not use */ interface StyleMedia { type: string; matchMedium(mediaquery: string): boolean; diff --git a/inputfiles/addedTypes.jsonc b/inputfiles/addedTypes.jsonc index 7fe2c8824..6fd24534c 100644 --- a/inputfiles/addedTypes.jsonc +++ b/inputfiles/addedTypes.jsonc @@ -76,12 +76,6 @@ ] } }, - "DeviceMotionEventAcceleration": { - "noInterfaceObject": true - }, - "DeviceMotionEventRotationRate": { - "noInterfaceObject": true - }, "HTMLImageElement": { "name": "HTMLImageElement", "properties": { @@ -106,18 +100,7 @@ ] } }, - "CSSStyleProperties": { - "properties": { - "property": { - "imageOrientation": { - "deprecated": true - }, - "wordWrap": { - "deprecated": true - } - } - } - }, + "Window": { "name": "Window", "methods": { @@ -132,18 +115,6 @@ ], "events": { "event": [ - { - "name": "devicemotion", - "type": "DeviceMotionEvent" - }, - { - "name": "deviceorientation", - "type": "DeviceOrientationEvent" - }, - { - "name": "deviceorientationabsolute", - "type": "DeviceOrientationEvent" - }, { "name": "gamepadconnected", "type": "GamepadEvent" @@ -394,32 +365,6 @@ ] } }, - // This is used in the React d.ts files, and not including - // it would force an update for anyone using React. - "StyleMedia": { - "name": "StyleMedia", - "exposed": "Window", - "noInterfaceObject": true, - "deprecated": true, - "properties": { - "property": { - "type": { - "name": "type", - "type": "DOMString" - } - } - }, - "methods": { - "method": { - "matchMedium": { - "name": "matchMedium", - "overrideSignatures": [ - "matchMedium(mediaquery: string): boolean" - ] - } - } - } - }, "Navigator": { "name": "Navigator", "properties": { @@ -447,33 +392,6 @@ } } }, - "IDBDatabase": { - "name": "IDBDatabase", - "events": { - "event": [ - { - "name": "versionchange", - "type": "IDBVersionChangeEvent" - } - ] - } - }, - "IDBOpenDBRequest": { - "name": "IDBOpenDBRequest", - "extends": "IDBRequest", - "events": { - "event": [ - { - "name": "upgradeneeded", - "type": "IDBVersionChangeEvent" - }, - { - "name": "blocked", - "type": "IDBVersionChangeEvent" - } - ] - } - }, "UIEvent": { "properties": { "property": { diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 0cf4b399c..11fa8ddf3 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -1393,18 +1393,6 @@ } }, "IDBCursor": { - "properties": { - "property": { - "key": { - "name": "key", - "type": "IDBValidKey" - }, - "primaryKey": { - "name": "primaryKey", - "type": "IDBValidKey" - } - } - }, "methods": { "method": { "continue": { @@ -1453,18 +1441,6 @@ } }, "IDBRequest": { - "properties": { - "property": { - "source": { - "name": "source", - "nullable": false - }, - "result": { - "name": "result", - "overrideType": "T" - } - } - }, "typeParameters": [ { "name": "T", @@ -3297,30 +3273,6 @@ } } }, - "CSSFontFaceRule": { - "properties": { - "property": { - "style": { - // CSS Fonts Level 4 now says CSSFontFaceDescriptors but nobody implements it as of 2024-04 - // https://github.com/w3c/csswg-drafts/pull/9686 - "type": "CSSStyleProperties" - } - } - } - }, - "CSSStyleProperties": { - "properties": { - "property": { - "cssFloat": { - "mdnUrl": "https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat" - }, - "webkitLineClamp": { - // The corresponding standardized property is not supported by anyone as of 2024-10. - "deprecated": false - } - } - } - }, "ContactAddress": { "name": "PaymentAddress" }, @@ -3369,48 +3321,12 @@ "MediaSource": { "exposed": "Window" }, - - // Payment Request added shippingAddress with a different type - // https://github.com/w3c/payment-request/pull/996 - "PaymentRequest": { - "properties": { - "property": { - "shippingAddress": { - "type": "PaymentAddress" - } - } - } - }, - "PaymentResponse": { - "properties": { - "property": { - "shippingAddress": { - "type": "PaymentAddress" - } - } - } - }, - "SourceBuffer": { "exposed": "Window" }, "SourceBufferList": { "exposed": "Window" }, - "StylePropertyMapReadOnly": { - "methods": { - "method": { - "get": { - // https://github.com/w3c/css-houdini-drafts/pull/1087 - "signature": { - "0": { - "overrideType": "undefined | CSSStyleValue" - } - } - } - } - } - }, "HTMLImageElement": { "properties": { "property": { diff --git a/inputfiles/patches/IDB.kdl b/inputfiles/patches/IDB.kdl new file mode 100644 index 000000000..2b71150f8 --- /dev/null +++ b/inputfiles/patches/IDB.kdl @@ -0,0 +1,18 @@ +interface IDBDatabase { + event versionchange type=IDBVersionChangeEvent +} + +interface IDBOpenDBRequest extends=IDBRequest { + event upgradeneeded type=IDBVersionChangeEvent + event blocked type=IDBVersionChangeEvent +} + +interface IDBRequest { + property source nullable=#false + property result overrideType=T +} + +interface IDBCursor { + property key type=IDBValidKey + property primaryKey type=IDBValidKey +} diff --git a/inputfiles/patches/css-font.kdl b/inputfiles/patches/css-font.kdl index f7bcaa78f..d2223f042 100644 --- a/inputfiles/patches/css-font.kdl +++ b/inputfiles/patches/css-font.kdl @@ -6,3 +6,8 @@ enum FontDisplay { fallback optional } + +interface CSSFontFaceRule { + property style type=CSSStyleProperties +} + diff --git a/inputfiles/patches/cssom.kdl b/inputfiles/patches/cssom.kdl index a3baf2c5c..4b9973bd6 100644 --- a/inputfiles/patches/cssom.kdl +++ b/inputfiles/patches/cssom.kdl @@ -6,4 +6,21 @@ interface CSSStyleDeclaration \ forward=CSSStyleDeclarationBase \ forwardExtends=CSSStyleProperties -interface CSSStyleProperties replaceReference=CSSStyleDeclaration +interface CSSStyleProperties replaceReference=CSSStyleDeclaration { + property imageOrientation deprecated=#true + property wordWrap deprecated=#true + property cssFloat mdnUrl="https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat" + + // The corresponding standardized property is not supported by anyone as of 2024-10. + property webkitLineClamp deprecated=#false +} + +// This is used in the React d.ts files, and not including +// it would force an update for anyone using React. +interface StyleMedia exposed=Window noInterfaceObject=#true deprecated="Do not use" { + property type type=DOMString + + method matchMedium returns=boolean { + param mediaquery type=DOMString + } +} diff --git a/inputfiles/patches/device-motion.kdl b/inputfiles/patches/device-motion.kdl new file mode 100644 index 000000000..9f7a01ff4 --- /dev/null +++ b/inputfiles/patches/device-motion.kdl @@ -0,0 +1,8 @@ +interface DeviceMotionEventAcceleration noInterfaceObject=#true +interface DeviceMotionEventRotationRate noInterfaceObject=#true + +interface Window { + event devicemotion type=DeviceMotionEvent + event deviceorientation type=DeviceOrientationEvent + event deviceorientationabsolute type=DeviceOrientationEvent +} diff --git a/inputfiles/patches/payments.kdl b/inputfiles/patches/payments.kdl new file mode 100644 index 000000000..eb0bbd967 --- /dev/null +++ b/inputfiles/patches/payments.kdl @@ -0,0 +1,10 @@ +// Payment Request added shippingAddress with a different type +// https://github.com/w3c/payment-request/pull/996 + +interface PaymentRequest { + property shippingAddress type=PaymentAddress +} + +interface PaymentResponse { + property shippingAddress type=PaymentAddress +} diff --git a/src/build/patches.ts b/src/build/patches.ts index 6bf60fa05..bab0046ba 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -221,6 +221,9 @@ function handleProperty(child: Node): Partial { ...optionalMember("optional", "boolean", child.properties?.optional), ...optionalMember("overrideType", "string", child.properties?.overrideType), ...optionalMember("type", "string", child.properties?.type), + ...optionalMember("deprecated", "boolean", child.properties?.deprecated), + ...optionalMember("mdnUrl", "string", child.properties?.mdnUrl), + ...optionalMember("nullable", "boolean", child.properties?.nullable), }; }