csstype-extra 0.1.17 β†’ 0.1.22

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 (3) hide show
  1. package/README.md +94 -3
  2. package/package.json +1 -1
  3. package/src/index.d.ts +121 -2
package/README.md CHANGED
@@ -1,4 +1,95 @@
1
- # csstypes
2
- Automatically generated, up-to-date TypeScript definitions for CSS based on Mozilla’s MDN data.
1
+ # csstype-extra
3
2
 
4
- https://github.com/mdn/data
3
+ [![npm version](https://img.shields.io/npm/v/csstype-extra.svg)](https://www.npmjs.com/package/csstype-extra)
4
+ [![License](https://img.shields.io/npm/l/csstype-extra.svg)](LICENSE)
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
6
+
7
+ Automatically generated, up-to-date TypeScript definitions for CSS based on Mozilla's MDN data.
8
+
9
+ > Inspired by [csstype](https://github.com/frenic/csstype)
10
+
11
+ ## πŸ“¦ Installation
12
+
13
+ ```bash
14
+ npm install csstype-extra
15
+ # or
16
+ bun add csstype-extra
17
+ # or
18
+ pnpm add csstype-extra
19
+ ```
20
+
21
+ ## πŸš€ Usage
22
+
23
+ ```typescript
24
+ import type { Properties, Property } from 'csstype-extra';
25
+
26
+ const style: Properties = {
27
+ color: 'red',
28
+ backgroundColor: 'blue',
29
+ width: '100px',
30
+ // TypeScript provides autocomplete for all CSS properties
31
+ };
32
+
33
+ // Use specific property types
34
+ type Color = Property.Color;
35
+ ```
36
+
37
+ ## ✨ Features
38
+
39
+ - **Auto-generated**: Types are automatically generated based on official MDN CSS data
40
+ - **Always up-to-date**: Automatically reflects CSS standard updates
41
+ - **Strict types**: Accurate type definitions leveraging TypeScript's type system
42
+ - **Complete support**: Full CSS feature support including standard properties, vendor-prefixed properties, at-rules, and pseudo-selectors
43
+
44
+ ## πŸ”„ Automatic Update System
45
+
46
+ This package **automatically checks once per day** for CSS standard updates and deploys a new version if changes are detected.
47
+
48
+ ### How It Works
49
+
50
+ 1. **Daily Check**: GitHub Actions runs every day at midnight (UTC)
51
+ 2. **Change Detection**: Fetches the latest CSS standards from the MDN data repository and compares with the current version
52
+ 3. **Automatic Deployment**: When changes are detected:
53
+ - Package version is automatically updated (patch version)
54
+ - Changes are committed and a PR is created
55
+ - PR is automatically merged and published to npm
56
+
57
+ This ensures you always have access to the latest CSS standards as types!
58
+
59
+ ## πŸ“š Type Structure
60
+
61
+ ```typescript
62
+ // Standard properties
63
+ StandardLonghandProperties
64
+ StandardShorthandProperties
65
+
66
+ // Vendor-prefixed properties
67
+ VendorLonghandProperties
68
+ VendorShorthandProperties
69
+
70
+ // All properties
71
+ Properties = StandardProperties & VendorProperties
72
+
73
+ // At-rules
74
+ AtRules
75
+
76
+ // Pseudo-selectors
77
+ Pseudos
78
+ AdvancedPseudos
79
+ SimplePseudos
80
+
81
+ // Individual property types
82
+ Property.Color
83
+ Property.Width
84
+ // ... and more
85
+ ```
86
+
87
+ ## πŸ”— Related Links
88
+
89
+ - [MDN CSS Data](https://github.com/mdn/data)
90
+ - [npm Package](https://www.npmjs.com/package/csstype-extra)
91
+ - [GitHub Repository](https://github.com/dev-five-git/csstypes)
92
+
93
+ ## πŸ“„ License
94
+
95
+ Apache-2.0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "csstype-extra",
3
3
  "type": "module",
4
- "version": "0.1.17",
4
+ "version": "0.1.22",
5
5
  "description": "Strict TypeScript types for style based on MDN data",
6
6
  "repository": "https://github.com/dev-five-git/csstypes",
7
7
  "author": "devfive",
package/src/index.d.ts CHANGED
@@ -38,6 +38,7 @@ export interface StandardLonghandProperties {
38
38
  backgroundRepeat?: Property.BackgroundRepeat | undefined
39
39
  backgroundSize?: Property.BackgroundSize | undefined
40
40
  baselineShift?: Property.BaselineShift | undefined
41
+ baselineSource?: Property.BaselineSource | undefined
41
42
  blockSize?: Property.BlockSize | undefined
42
43
  borderBlockColor?: Property.BorderBlockColor | undefined
43
44
  borderBlockEndColor?: Property.BorderBlockEndColor | undefined
@@ -116,6 +117,7 @@ export interface StandardLonghandProperties {
116
117
  breakBefore?: Property.BreakBefore | undefined
117
118
  breakInside?: Property.BreakInside | undefined
118
119
  captionSide?: Property.CaptionSide | undefined
120
+ caretAnimation?: Property.CaretAnimation | undefined
119
121
  caretColor?: Property.CaretColor | undefined
120
122
  caretShape?: Property.CaretShape | undefined
121
123
  clear?: Property.Clear | undefined
@@ -128,11 +130,13 @@ export interface StandardLonghandProperties {
128
130
  columnCount?: Property.ColumnCount | undefined
129
131
  columnFill?: Property.ColumnFill | undefined
130
132
  columnGap?: Property.ColumnGap | undefined
133
+ columnHeight?: Property.ColumnHeight | undefined
131
134
  columnRuleColor?: Property.ColumnRuleColor | undefined
132
135
  columnRuleStyle?: Property.ColumnRuleStyle | undefined
133
136
  columnRuleWidth?: Property.ColumnRuleWidth | undefined
134
137
  columnSpan?: Property.ColumnSpan | undefined
135
138
  columnWidth?: Property.ColumnWidth | undefined
139
+ columnWrap?: Property.ColumnWrap | undefined
136
140
  contain?: Property.Contain | undefined
137
141
  containIntrinsicBlockSize?: Property.ContainIntrinsicBlockSize | undefined
138
142
  containIntrinsicHeight?: Property.ContainIntrinsicHeight | undefined
@@ -142,6 +146,14 @@ export interface StandardLonghandProperties {
142
146
  containerType?: Property.ContainerType | undefined
143
147
  content?: Property.Content | undefined
144
148
  contentVisibility?: Property.ContentVisibility | undefined
149
+ cornerBottomLeftShape?: Property.CornerBottomLeftShape | undefined
150
+ cornerBottomRightShape?: Property.CornerBottomRightShape | undefined
151
+ cornerEndEndShape?: Property.CornerEndEndShape | undefined
152
+ cornerEndStartShape?: Property.CornerEndStartShape | undefined
153
+ cornerStartStartShape?: Property.CornerStartStartShape | undefined
154
+ cornerStartEndShape?: Property.CornerStartEndShape | undefined
155
+ cornerTopLeftShape?: Property.CornerTopLeftShape | undefined
156
+ cornerTopRightShape?: Property.CornerTopRightShape | undefined
145
157
  counterIncrement?: Property.CounterIncrement | undefined
146
158
  counterReset?: Property.CounterReset | undefined
147
159
  counterSet?: Property.CounterSet | undefined
@@ -152,6 +164,7 @@ export interface StandardLonghandProperties {
152
164
  direction?: Property.Direction | undefined
153
165
  display?: Property.Display | undefined
154
166
  dominantBaseline?: Property.DominantBaseline | undefined
167
+ dynamicRangeLimit?: Property.DynamicRangeLimit | undefined
155
168
  emptyCells?: Property.EmptyCells | undefined
156
169
  fieldSizing?: Property.FieldSizing | undefined
157
170
  fill?: Property.Fill | undefined
@@ -224,6 +237,9 @@ export interface StandardLonghandProperties {
224
237
  insetInlineStart?: Property.InsetInlineStart | undefined
225
238
  interpolateSize?: Property.InterpolateSize | undefined
226
239
  isolation?: Property.Isolation | undefined
240
+ interactivity?: Property.Interactivity | undefined
241
+ interestDelayEnd?: Property.InterestDelayEnd | undefined
242
+ interestDelayStart?: Property.InterestDelayStart | undefined
227
243
  justifyContent?: Property.JustifyContent | undefined
228
244
  justifyItems?: Property.JustifyItems | undefined
229
245
  justifySelf?: Property.JustifySelf | undefined
@@ -334,6 +350,8 @@ export interface StandardLonghandProperties {
334
350
  printColorAdjust?: Property.PrintColorAdjust | undefined
335
351
  quotes?: Property.Quotes | undefined
336
352
  r?: Property.R | undefined
353
+ readingFlow?: Property.ReadingFlow | undefined
354
+ readingOrder?: Property.ReadingOrder | undefined
337
355
  resize?: Property.Resize | undefined
338
356
  right?: Property.Right | undefined
339
357
  rotate?: Property.Rotate | undefined
@@ -355,6 +373,7 @@ export interface StandardLonghandProperties {
355
373
  scrollMarginLeft?: Property.ScrollMarginLeft | undefined
356
374
  scrollMarginRight?: Property.ScrollMarginRight | undefined
357
375
  scrollMarginTop?: Property.ScrollMarginTop | undefined
376
+ scrollMarkerGroup?: Property.ScrollMarkerGroup | undefined
358
377
  scrollPaddingBlockEnd?: Property.ScrollPaddingBlockEnd | undefined
359
378
  scrollPaddingBlockStart?: Property.ScrollPaddingBlockStart | undefined
360
379
  scrollPaddingBottom?: Property.ScrollPaddingBottom | undefined
@@ -372,6 +391,7 @@ export interface StandardLonghandProperties {
372
391
  scrollSnapType?: Property.ScrollSnapType | undefined
373
392
  scrollSnapTypeX?: Property.ScrollSnapTypeX | undefined
374
393
  scrollSnapTypeY?: Property.ScrollSnapTypeY | undefined
394
+ scrollTargetGroup?: Property.ScrollTargetGroup | undefined
375
395
  scrollTimelineAxis?: Property.ScrollTimelineAxis | undefined
376
396
  scrollTimelineName?: Property.ScrollTimelineName | undefined
377
397
  scrollbarColor?: Property.ScrollbarColor | undefined
@@ -404,6 +424,7 @@ export interface StandardLonghandProperties {
404
424
  textBoxTrim?: Property.TextBoxTrim | undefined
405
425
  textCombineUpright?: Property.TextCombineUpright | undefined
406
426
  textDecorationColor?: Property.TextDecorationColor | undefined
427
+ textDecorationInset?: Property.TextDecorationInset | undefined
407
428
  textDecorationLine?: Property.TextDecorationLine | undefined
408
429
  textDecorationSkip?: Property.TextDecorationSkip | undefined
409
430
  textDecorationSkipInk?: Property.TextDecorationSkipInk | undefined
@@ -488,6 +509,15 @@ export interface StandardShorthandProperties {
488
509
  columns?: Property.Columns | undefined
489
510
  containIntrinsicSize?: Property.ContainIntrinsicSize | undefined
490
511
  container?: Property.Container | undefined
512
+ cornerBlockEndShape?: Property.CornerBlockEndShape | undefined
513
+ cornerBlockStartShape?: Property.CornerBlockStartShape | undefined
514
+ cornerBottomShape?: Property.CornerBottomShape | undefined
515
+ cornerInlineEndShape?: Property.CornerInlineEndShape | undefined
516
+ cornerInlineStartShape?: Property.CornerInlineStartShape | undefined
517
+ cornerLeftShape?: Property.CornerLeftShape | undefined
518
+ cornerRightShape?: Property.CornerRightShape | undefined
519
+ cornerShape?: Property.CornerShape | undefined
520
+ cornerTopShape?: Property.CornerTopShape | undefined
491
521
  flex?: Property.Flex | undefined
492
522
  flexFlow?: Property.FlexFlow | undefined
493
523
  font?: Property.Font | undefined
@@ -501,6 +531,7 @@ export interface StandardShorthandProperties {
501
531
  inset?: Property.Inset | undefined
502
532
  insetBlock?: Property.InsetBlock | undefined
503
533
  insetInline?: Property.InsetInline | undefined
534
+ interestDelay?: Property.InterestDelay | undefined
504
535
  listStyle?: Property.ListStyle | undefined
505
536
  margin?: Property.Margin | undefined
506
537
  marginBlock?: Property.MarginBlock | undefined
@@ -969,6 +1000,12 @@ export namespace Property {
969
1000
  | 'baseline'
970
1001
  | Globals
971
1002
  | (string & {})
1003
+ export type BaselineSource =
1004
+ | 'auto'
1005
+ | 'first'
1006
+ | 'last'
1007
+ | Globals
1008
+ | (string & {})
972
1009
  export type BlockSize = Property.Width | Globals | (string & {})
973
1010
  export type BorderBlockColor =
974
1011
  | Property.BorderTopColor
@@ -1247,6 +1284,7 @@ export namespace Property {
1247
1284
  | Globals
1248
1285
  | (string & {})
1249
1286
  export type CaptionSide = 'top' | 'bottom' | Globals | (string & {})
1287
+ export type CaretAnimation = 'auto' | 'manual' | Globals | (string & {})
1250
1288
  export type CaretColor = 'auto' | TColor | Globals | (string & {})
1251
1289
  export type CaretShape =
1252
1290
  | 'auto'
@@ -1290,11 +1328,13 @@ export namespace Property {
1290
1328
  export type ColumnCount = number | 'auto' | Globals | (string & {})
1291
1329
  export type ColumnFill = 'auto' | 'balance' | Globals | (string & {})
1292
1330
  export type ColumnGap = 'normal' | TLengthPercentage | Globals | (string & {})
1331
+ export type ColumnHeight = 'auto' | number | Globals | (string & {})
1293
1332
  export type ColumnRuleColor = TColor | Globals | (string & {})
1294
1333
  export type ColumnRuleStyle = Property.BorderStyle | Globals | (string & {})
1295
1334
  export type ColumnRuleWidth = Property.BorderWidth | Globals | (string & {})
1296
1335
  export type ColumnSpan = 'none' | 'all' | Globals | (string & {})
1297
- export type ColumnWidth = number | 'auto' | Globals | (string & {})
1336
+ export type ColumnWidth = 'auto' | number | Globals | (string & {})
1337
+ export type ColumnWrap = 'auto' | 'nowrap' | 'wrap' | Globals | (string & {})
1298
1338
  export type Contain =
1299
1339
  | 'none'
1300
1340
  | 'strict'
@@ -1353,6 +1393,23 @@ export namespace Property {
1353
1393
  | 'hidden'
1354
1394
  | Globals
1355
1395
  | (string & {})
1396
+ export type CornerBottomLeftShape =
1397
+ | TCornerShapeValue
1398
+ | Globals
1399
+ | (string & {})
1400
+ export type CornerBottomRightShape =
1401
+ | TCornerShapeValue
1402
+ | Globals
1403
+ | (string & {})
1404
+ export type CornerEndEndShape = TCornerShapeValue | Globals | (string & {})
1405
+ export type CornerEndStartShape = TCornerShapeValue | Globals | (string & {})
1406
+ export type CornerStartStartShape =
1407
+ | TCornerShapeValue
1408
+ | Globals
1409
+ | (string & {})
1410
+ export type CornerStartEndShape = TCornerShapeValue | Globals | (string & {})
1411
+ export type CornerTopLeftShape = TCornerShapeValue | Globals | (string & {})
1412
+ export type CornerTopRightShape = TCornerShapeValue | Globals | (string & {})
1356
1413
  export type CounterIncrement =
1357
1414
  | TCounterName
1358
1415
  | number
@@ -1399,6 +1456,12 @@ export namespace Property {
1399
1456
  | 'text-top'
1400
1457
  | Globals
1401
1458
  | (string & {})
1459
+ export type DynamicRangeLimit =
1460
+ | 'standard'
1461
+ | 'no-limit'
1462
+ | 'constrained'
1463
+ | Globals
1464
+ | (string & {})
1402
1465
  export type EmptyCells = 'show' | 'hide' | Globals | (string & {})
1403
1466
  export type FieldSizing = 'content' | 'fixed' | Globals | (string & {})
1404
1467
  export type Fill = TPaint | Globals | (string & {})
@@ -1704,6 +1767,9 @@ export namespace Property {
1704
1767
  | Globals
1705
1768
  | (string & {})
1706
1769
  export type Isolation = 'auto' | 'isolate' | Globals | (string & {})
1770
+ export type Interactivity = 'auto' | 'inert' | Globals | (string & {})
1771
+ export type InterestDelayEnd = 'normal' | Globals | (string & {})
1772
+ export type InterestDelayStart = 'normal' | Globals | (string & {})
1707
1773
  export type JustifyContent =
1708
1774
  | 'normal'
1709
1775
  | TContentDistribution
@@ -2044,7 +2110,12 @@ export namespace Property {
2044
2110
  | 'fixed'
2045
2111
  | Globals
2046
2112
  | (string & {})
2047
- export type PositionAnchor = 'auto' | TAnchorName | Globals | (string & {})
2113
+ export type PositionAnchor =
2114
+ | 'auto'
2115
+ | 'none'
2116
+ | TAnchorName
2117
+ | Globals
2118
+ | (string & {})
2048
2119
  export type PositionArea = 'none' | TPositionArea | Globals | (string & {})
2049
2120
  export type PositionTryFallbacks =
2050
2121
  | 'none'
@@ -2063,6 +2134,17 @@ export namespace Property {
2063
2134
  export type PrintColorAdjust = 'economy' | 'exact' | Globals | (string & {})
2064
2135
  export type Quotes = 'none' | 'auto' | (string & {}) | Globals | (string & {})
2065
2136
  export type R = number | Globals | (string & {})
2137
+ export type ReadingFlow =
2138
+ | 'normal'
2139
+ | 'source-order'
2140
+ | 'flex-visual'
2141
+ | 'flex-flow'
2142
+ | 'grid-rows'
2143
+ | 'grid-columns'
2144
+ | 'grid-order'
2145
+ | Globals
2146
+ | (string & {})
2147
+ export type ReadingOrder = number | Globals | (string & {})
2066
2148
  export type Resize =
2067
2149
  | 'none'
2068
2150
  | 'both'
@@ -2116,6 +2198,12 @@ export namespace Property {
2116
2198
  export type ScrollMarginLeft = number | Globals | (string & {})
2117
2199
  export type ScrollMarginRight = number | Globals | (string & {})
2118
2200
  export type ScrollMarginTop = number | Globals | (string & {})
2201
+ export type ScrollMarkerGroup =
2202
+ | 'none'
2203
+ | 'before'
2204
+ | 'after'
2205
+ | Globals
2206
+ | (string & {})
2119
2207
  export type ScrollPaddingBlockEnd =
2120
2208
  | 'auto'
2121
2209
  | TLengthPercentage
@@ -2203,6 +2291,7 @@ export namespace Property {
2203
2291
  | 'proximity'
2204
2292
  | Globals
2205
2293
  | (string & {})
2294
+ export type ScrollTargetGroup = 'none' | 'auto' | Globals | (string & {})
2206
2295
  export type ScrollTimelineAxis =
2207
2296
  | 'block'
2208
2297
  | 'inline'
@@ -2321,6 +2410,7 @@ export namespace Property {
2321
2410
  | Globals
2322
2411
  | (string & {})
2323
2412
  export type TextDecorationColor = TColor | Globals | (string & {})
2413
+ export type TextDecorationInset = number | 'auto' | Globals | (string & {})
2324
2414
  export type TextDecorationLine =
2325
2415
  | 'none'
2326
2416
  | 'underline'
@@ -2713,6 +2803,7 @@ export namespace Property {
2713
2803
  export type BorderWidth = TLineWidth | Globals | (string & {})
2714
2804
  export type Caret =
2715
2805
  | Property.CaretColor
2806
+ | Property.CaretAnimation
2716
2807
  | Property.CaretShape
2717
2808
  | Globals
2718
2809
  | (string & {})
@@ -2725,6 +2816,7 @@ export namespace Property {
2725
2816
  export type Columns =
2726
2817
  | Property.ColumnWidth
2727
2818
  | Property.ColumnCount
2819
+ | Property.ColumnHeight
2728
2820
  | Globals
2729
2821
  | (string & {})
2730
2822
  export type ContainIntrinsicSize =
@@ -2738,6 +2830,21 @@ export namespace Property {
2738
2830
  | Property.ContainerType
2739
2831
  | Globals
2740
2832
  | (string & {})
2833
+ export type CornerBlockEndShape = TCornerShapeValue | Globals | (string & {})
2834
+ export type CornerBlockStartShape =
2835
+ | TCornerShapeValue
2836
+ | Globals
2837
+ | (string & {})
2838
+ export type CornerBottomShape = TCornerShapeValue | Globals | (string & {})
2839
+ export type CornerInlineEndShape = TCornerShapeValue | Globals | (string & {})
2840
+ export type CornerInlineStartShape =
2841
+ | TCornerShapeValue
2842
+ | Globals
2843
+ | (string & {})
2844
+ export type CornerLeftShape = TCornerShapeValue | Globals | (string & {})
2845
+ export type CornerRightShape = TCornerShapeValue | Globals | (string & {})
2846
+ export type CornerShape = TCornerShapeValue | Globals | (string & {})
2847
+ export type CornerTopShape = TCornerShapeValue | Globals | (string & {})
2741
2848
  export type Flex =
2742
2849
  | 'none'
2743
2850
  | Property.FlexGrow
@@ -2799,6 +2906,10 @@ export namespace Property {
2799
2906
  export type Inset = Property.Top | Globals | (string & {})
2800
2907
  export type InsetBlock = Property.Top | Globals | (string & {})
2801
2908
  export type InsetInline = Property.Top | Globals | (string & {})
2909
+ export type InterestDelay =
2910
+ | Property.InterestDelayStart
2911
+ | Globals
2912
+ | (string & {})
2802
2913
  export type ListStyle =
2803
2914
  | Property.ListStyleType
2804
2915
  | Property.ListStylePosition
@@ -3681,6 +3792,14 @@ export type TContentPosition =
3681
3792
  export type TContentReplacement = TImage | Globals
3682
3793
  export type TContextualAltValues = 'contextual' | 'no-contextual' | Globals
3683
3794
  export type TCoordBox = TPaintBox | 'view-box' | Globals
3795
+ export type TCornerShapeValue =
3796
+ | 'round'
3797
+ | 'scoop'
3798
+ | 'bevel'
3799
+ | 'notch'
3800
+ | 'square'
3801
+ | 'squircle'
3802
+ | Globals
3684
3803
  export type TCounter = Globals
3685
3804
  export type TCounterName = Globals
3686
3805
  export type TCounterStyle = TCounterStyleName | Globals