Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changepacks/changepack_log_sxhI41g8_4YUVxCXCQ8JA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"changes":{"package.json":"Patch"},"note":"Add vendor by groups","date":"2025-11-17T12:41:17.276264400Z"}
2 changes: 1 addition & 1 deletion __tests__/convert-type.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import { convertType } from '../convert-type'
test.each([['string', '"string" | Globals']])(
'convertType',
(type, expected) => {
expect(convertType(type)).toEqual(expected)
expect(convertType(type, {})).toEqual(expected)
},
)
11 changes: 11 additions & 0 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const properties = (await fetch(
syntax: string
status: string
computed?: string[] | string
groups?: string[]
}
>

Expand Down Expand Up @@ -98,6 +99,16 @@ for (const [property, value] of Object.entries(properties)) {
else vendorLonghandProperties.push([property, value])
continue
}
for (const gr of [
['WebKit Extensions', '-webkit-'],
['Microsoft Extensions', '-ms-'],
['Mozilla Extensions', '-moz-'],
] as const)
if (value.groups?.includes(gr[0])) {
if (Array.isArray(value.computed))
standardShorthandProperties.push([`${gr[1]}${property}`, value])
else standardLonghandProperties.push([`${gr[1]}${property}`, value])
}
if (Array.isArray(value.computed))
standardShorthandProperties.push([property, value])
else standardLonghandProperties.push([property, value])
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
"scripts": {
"lint": "biome check .",
"lint:fix": "biome check --write .",
"build": "bun build.ts",
"prepare": "husky"
"build": "bun build.ts && biome check src --write",
"prepare": "husky",
"changepacks": "bunx @changepacks/cli"
},
"files": [
"src"
Expand Down
88 changes: 88 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,30 @@ export interface StandardLonghandProperties {
borderTopStyle?: Property.BorderTopStyle | undefined
borderTopWidth?: Property.BorderTopWidth | undefined
bottom?: Property.Bottom | undefined
WebkitBoxAlign?: Property.WebkitBoxAlign | undefined
MozBoxAlign?: Property.MozBoxAlign | undefined
boxAlign?: Property.BoxAlign | undefined
boxDecorationBreak?: Property.BoxDecorationBreak | undefined
WebkitBoxDirection?: Property.WebkitBoxDirection | undefined
MozBoxDirection?: Property.MozBoxDirection | undefined
boxDirection?: Property.BoxDirection | undefined
WebkitBoxFlex?: Property.WebkitBoxFlex | undefined
MozBoxFlex?: Property.MozBoxFlex | undefined
boxFlex?: Property.BoxFlex | undefined
WebkitBoxFlexGroup?: Property.WebkitBoxFlexGroup | undefined
MozBoxFlexGroup?: Property.MozBoxFlexGroup | undefined
boxFlexGroup?: Property.BoxFlexGroup | undefined
WebkitBoxLines?: Property.WebkitBoxLines | undefined
MozBoxLines?: Property.MozBoxLines | undefined
boxLines?: Property.BoxLines | undefined
WebkitBoxOrdinalGroup?: Property.WebkitBoxOrdinalGroup | undefined
MozBoxOrdinalGroup?: Property.MozBoxOrdinalGroup | undefined
boxOrdinalGroup?: Property.BoxOrdinalGroup | undefined
WebkitBoxOrient?: Property.WebkitBoxOrient | undefined
MozBoxOrient?: Property.MozBoxOrient | undefined
boxOrient?: Property.BoxOrient | undefined
WebkitBoxPack?: Property.WebkitBoxPack | undefined
MozBoxPack?: Property.MozBoxPack | undefined
boxPack?: Property.BoxPack | undefined
boxShadow?: Property.BoxShadow | undefined
boxSizing?: Property.BoxSizing | undefined
Expand Down Expand Up @@ -281,6 +297,7 @@ export interface StandardLonghandProperties {
outlineWidth?: Property.OutlineWidth | undefined
overflowAnchor?: Property.OverflowAnchor | undefined
overflowBlock?: Property.OverflowBlock | undefined
MozOverflowClipBox?: Property.MozOverflowClipBox | undefined
overflowClipBox?: Property.OverflowClipBox | undefined
overflowClipMargin?: Property.OverflowClipMargin | undefined
overflowInline?: Property.OverflowInline | undefined
Expand Down Expand Up @@ -1085,6 +1102,22 @@ export namespace Property {
export type BorderTopStyle = TLineStyle | Globals | (string & {})
export type BorderTopWidth = TLineWidth | Globals | (string & {})
export type Bottom = 'auto' | TLengthPercentage | Globals | (string & {})
export type WebkitBoxAlign =
| 'start'
| 'center'
| 'end'
| 'baseline'
| 'stretch'
| Globals
| (string & {})
export type MozBoxAlign =
| 'start'
| 'center'
| 'end'
| 'baseline'
| 'stretch'
| Globals
| (string & {})
export type BoxAlign =
| 'start'
| 'center'
Expand All @@ -1094,16 +1127,52 @@ export namespace Property {
| Globals
| (string & {})
export type BoxDecorationBreak = 'slice' | 'clone' | Globals | (string & {})
export type WebkitBoxDirection =
| 'normal'
| 'reverse'
| 'inherit'
| Globals
| (string & {})
export type MozBoxDirection =
| 'normal'
| 'reverse'
| 'inherit'
| Globals
| (string & {})
export type BoxDirection =
| 'normal'
| 'reverse'
| 'inherit'
| Globals
| (string & {})
export type WebkitBoxFlex = number | Globals | (string & {})
export type MozBoxFlex = number | Globals | (string & {})
export type BoxFlex = number | Globals | (string & {})
export type WebkitBoxFlexGroup = number | Globals | (string & {})
export type MozBoxFlexGroup = number | Globals | (string & {})
export type BoxFlexGroup = number | Globals | (string & {})
export type WebkitBoxLines = 'single' | 'multiple' | Globals | (string & {})
export type MozBoxLines = 'single' | 'multiple' | Globals | (string & {})
export type BoxLines = 'single' | 'multiple' | Globals | (string & {})
export type WebkitBoxOrdinalGroup = number | Globals | (string & {})
export type MozBoxOrdinalGroup = number | Globals | (string & {})
export type BoxOrdinalGroup = number | Globals | (string & {})
export type WebkitBoxOrient =
| 'horizontal'
| 'vertical'
| 'inline-axis'
| 'block-axis'
| 'inherit'
| Globals
| (string & {})
export type MozBoxOrient =
| 'horizontal'
| 'vertical'
| 'inline-axis'
| 'block-axis'
| 'inherit'
| Globals
| (string & {})
export type BoxOrient =
| 'horizontal'
| 'vertical'
Expand All @@ -1112,6 +1181,20 @@ export namespace Property {
| 'inherit'
| Globals
| (string & {})
export type WebkitBoxPack =
| 'start'
| 'center'
| 'end'
| 'justify'
| Globals
| (string & {})
export type MozBoxPack =
| 'start'
| 'center'
| 'end'
| 'justify'
| Globals
| (string & {})
export type BoxPack =
| 'start'
| 'center'
Expand Down Expand Up @@ -1834,6 +1917,11 @@ export namespace Property {
| 'auto'
| Globals
| (string & {})
export type MozOverflowClipBox =
| 'padding-box'
| 'content-box'
| Globals
| (string & {})
export type OverflowClipBox =
| 'padding-box'
| 'content-box'
Expand Down