csstype-extra 0.1.17 β†’ 0.1.21

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
@@ -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.21",
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
@@ -2044,7 +2044,12 @@ export namespace Property {
2044
2044
  | 'fixed'
2045
2045
  | Globals
2046
2046
  | (string & {})
2047
- export type PositionAnchor = 'auto' | TAnchorName | Globals | (string & {})
2047
+ export type PositionAnchor =
2048
+ | 'auto'
2049
+ | 'none'
2050
+ | TAnchorName
2051
+ | Globals
2052
+ | (string & {})
2048
2053
  export type PositionArea = 'none' | TPositionArea | Globals | (string & {})
2049
2054
  export type PositionTryFallbacks =
2050
2055
  | 'none'