zyzz 0.0.16 → 0.0.17
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/dist/Style.d.ts +4 -3
- package/dist/Style.d.ts.map +1 -1
- package/dist/internal/Cascade.d.ts +29 -0
- package/dist/internal/Cascade.d.ts.map +1 -1
- package/dist/internal/Cascade.js +45 -0
- package/dist/internal/Cascade.js.map +1 -1
- package/dist/internal/Compound.d.ts +12 -0
- package/dist/internal/Compound.d.ts.map +1 -1
- package/dist/internal/Literal.d.ts +1063 -27
- package/dist/internal/Literal.d.ts.map +1 -1
- package/dist/internal/Literal.js +739 -3
- package/dist/internal/Literal.js.map +1 -1
- package/dist/next/loader.js +43 -17
- package/dist/next/loader.js.map +1 -1
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +19 -7
- package/dist/vite/index.js.map +1 -1
- package/dist/web/Css.d.ts.map +1 -1
- package/dist/web/Css.js +2 -1
- package/dist/web/Css.js.map +1 -1
- package/dist/web/internal/Themes.d.ts +1 -8
- package/dist/web/internal/Themes.d.ts.map +1 -1
- package/dist/web/internal/Themes.js +55 -16
- package/dist/web/internal/Themes.js.map +1 -1
- package/package.json +1 -1
- package/src/Style.ts +23 -14
- package/src/internal/Cascade.ts +45 -0
- package/src/internal/Compound.ts +56 -0
- package/src/internal/Literal.ts +746 -3
- package/src/next/loader.ts +49 -17
- package/src/vite/index.ts +24 -5
- package/src/web/Css.ts +2 -1
- package/src/web/internal/Themes.ts +70 -17
package/package.json
CHANGED
package/src/Style.ts
CHANGED
|
@@ -839,23 +839,32 @@ export type NamedStyle<name extends string = string> = {
|
|
|
839
839
|
|
|
840
840
|
/** Supported literal and token declarations. Unknown properties and undefined values are rejected. */
|
|
841
841
|
export type DeclarationProperties<tokens extends Theme.Tokens = {}> = {
|
|
842
|
-
readonly [property in keyof Literal.Properties]:
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
: [Token.Names<tokens, property>] extends [never]
|
|
846
|
-
? LiteralAtoms[property]
|
|
847
|
-
:
|
|
848
|
-
| Value.Atom<`${string} !custom`>
|
|
849
|
-
| Extract<LiteralAtoms[property], Binding.Reference>)
|
|
850
|
-
| Value.Atom<Token.Names<tokens, property>>
|
|
851
|
-
| {
|
|
852
|
-
[group in Token.Group]: property extends Token.Properties<group>
|
|
853
|
-
? Value.Atom<Token.Reference<group> | Token.Variable<group>>
|
|
854
|
-
: never
|
|
855
|
-
}[Token.Group]
|
|
842
|
+
readonly [property in keyof Literal.Properties]: DeclarationValue<
|
|
843
|
+
tokens,
|
|
844
|
+
property
|
|
856
845
|
>
|
|
857
846
|
}
|
|
858
847
|
|
|
848
|
+
// A named alias caches each property domain without expanding the full declaration map.
|
|
849
|
+
type DeclarationValue<
|
|
850
|
+
tokens extends Theme.Tokens,
|
|
851
|
+
property extends keyof Literal.Properties,
|
|
852
|
+
> = Value.Fallbacks<
|
|
853
|
+
| (property extends `--${string}`
|
|
854
|
+
? LiteralAtoms[property]
|
|
855
|
+
: [Token.Names<tokens, property>] extends [never]
|
|
856
|
+
? LiteralAtoms[property]
|
|
857
|
+
:
|
|
858
|
+
| Value.Atom<`${string} !custom`>
|
|
859
|
+
| Extract<LiteralAtoms[property], Binding.Reference>)
|
|
860
|
+
| Value.Atom<Token.Names<tokens, property>>
|
|
861
|
+
| {
|
|
862
|
+
[group in Token.Group]: property extends Token.Properties<group>
|
|
863
|
+
? Value.Atom<Token.Reference<group> | Token.Variable<group>>
|
|
864
|
+
: never
|
|
865
|
+
}[Token.Group]
|
|
866
|
+
>
|
|
867
|
+
|
|
859
868
|
/** Recursive theme-aware declaration and condition authoring. */
|
|
860
869
|
export type Properties<
|
|
861
870
|
tokens extends Theme.Tokens = {},
|
package/src/internal/Cascade.ts
CHANGED
|
@@ -26,6 +26,7 @@ export const shorthands = {
|
|
|
26
26
|
'backgroundAttachment',
|
|
27
27
|
'backgroundColor',
|
|
28
28
|
],
|
|
29
|
+
backgroundRepeat: ['backgroundRepeatX', 'backgroundRepeatY'],
|
|
29
30
|
border: ['borderWidth', 'borderStyle', 'borderColor', 'borderImage'],
|
|
30
31
|
borderImage: [
|
|
31
32
|
'borderImageSource',
|
|
@@ -34,7 +35,23 @@ export const shorthands = {
|
|
|
34
35
|
'borderImageOutset',
|
|
35
36
|
'borderImageRepeat',
|
|
36
37
|
],
|
|
38
|
+
borderSpacing: [
|
|
39
|
+
'WebkitBorderHorizontalSpacing',
|
|
40
|
+
'WebkitBorderVerticalSpacing',
|
|
41
|
+
],
|
|
37
42
|
caret: ['caretColor', 'caretAnimation', 'caretShape'],
|
|
43
|
+
columnRule: ['columnRuleWidth', 'columnRuleStyle', 'columnRuleColor'],
|
|
44
|
+
columnRuleInset: ['columnRuleInsetCap', 'columnRuleInsetJunction'],
|
|
45
|
+
columnRuleInsetCap: ['columnRuleInsetCapStart', 'columnRuleInsetCapEnd'],
|
|
46
|
+
columnRuleInsetEnd: ['columnRuleInsetCapEnd', 'columnRuleInsetJunctionEnd'],
|
|
47
|
+
columnRuleInsetJunction: [
|
|
48
|
+
'columnRuleInsetJunctionStart',
|
|
49
|
+
'columnRuleInsetJunctionEnd',
|
|
50
|
+
],
|
|
51
|
+
columnRuleInsetStart: [
|
|
52
|
+
'columnRuleInsetCapStart',
|
|
53
|
+
'columnRuleInsetJunctionStart',
|
|
54
|
+
],
|
|
38
55
|
columns: ['columnWidth', 'columnCount', 'columnHeight'],
|
|
39
56
|
container: ['containerName', 'containerType'],
|
|
40
57
|
flex: ['flexGrow', 'flexShrink', 'flexBasis'],
|
|
@@ -80,6 +97,7 @@ export const shorthands = {
|
|
|
80
97
|
'gridTemplateAreas',
|
|
81
98
|
],
|
|
82
99
|
listStyle: ['listStyleType', 'listStylePosition', 'listStyleImage'],
|
|
100
|
+
lineClamp: ['maxLines', 'blockEllipsis', 'continue'],
|
|
83
101
|
mask: [
|
|
84
102
|
'maskImage',
|
|
85
103
|
'maskMode',
|
|
@@ -116,10 +134,31 @@ export const shorthands = {
|
|
|
116
134
|
'offsetAnchor',
|
|
117
135
|
'offsetRotate',
|
|
118
136
|
],
|
|
137
|
+
perspectiveOrigin: ['WebkitPerspectiveOriginX', 'WebkitPerspectiveOriginY'],
|
|
119
138
|
placeContent: ['alignContent', 'justifyContent'],
|
|
120
139
|
placeItems: ['alignItems', 'justifyItems'],
|
|
121
140
|
placeSelf: ['alignSelf', 'justifySelf'],
|
|
122
141
|
positionTry: ['positionTryFallbacks', 'positionTryOrder'],
|
|
142
|
+
rowRule: ['rowRuleWidth', 'rowRuleStyle', 'rowRuleColor'],
|
|
143
|
+
rowRuleInset: ['rowRuleInsetCap', 'rowRuleInsetJunction'],
|
|
144
|
+
rowRuleInsetCap: ['rowRuleInsetCapStart', 'rowRuleInsetCapEnd'],
|
|
145
|
+
rowRuleInsetEnd: ['rowRuleInsetCapEnd', 'rowRuleInsetJunctionEnd'],
|
|
146
|
+
rowRuleInsetJunction: [
|
|
147
|
+
'rowRuleInsetJunctionStart',
|
|
148
|
+
'rowRuleInsetJunctionEnd',
|
|
149
|
+
],
|
|
150
|
+
rowRuleInsetStart: ['rowRuleInsetCapStart', 'rowRuleInsetJunctionStart'],
|
|
151
|
+
rule: ['columnRule', 'rowRule'],
|
|
152
|
+
ruleBreak: ['columnRuleBreak', 'rowRuleBreak'],
|
|
153
|
+
ruleColor: ['columnRuleColor', 'rowRuleColor'],
|
|
154
|
+
ruleInset: ['columnRuleInset', 'rowRuleInset'],
|
|
155
|
+
ruleInsetCap: ['columnRuleInsetCap', 'rowRuleInsetCap'],
|
|
156
|
+
ruleInsetEnd: ['columnRuleInsetEnd', 'rowRuleInsetEnd'],
|
|
157
|
+
ruleInsetJunction: ['columnRuleInsetJunction', 'rowRuleInsetJunction'],
|
|
158
|
+
ruleInsetStart: ['columnRuleInsetStart', 'rowRuleInsetStart'],
|
|
159
|
+
ruleStyle: ['columnRuleStyle', 'rowRuleStyle'],
|
|
160
|
+
ruleVisibilityItems: ['columnRuleVisibilityItems', 'rowRuleVisibilityItems'],
|
|
161
|
+
ruleWidth: ['columnRuleWidth', 'rowRuleWidth'],
|
|
123
162
|
scrollTimeline: ['scrollTimelineName', 'scrollTimelineAxis'],
|
|
124
163
|
textBox: ['textBoxTrim', 'textBoxEdge'],
|
|
125
164
|
textDecoration: [
|
|
@@ -128,6 +167,7 @@ export const shorthands = {
|
|
|
128
167
|
'textDecorationLine',
|
|
129
168
|
'textDecorationThickness',
|
|
130
169
|
],
|
|
170
|
+
textDecorationSkip: ['textDecorationSkipInk', 'textDecorationSkipSpaces'],
|
|
131
171
|
textEmphasis: ['textEmphasisStyle', 'textEmphasisColor'],
|
|
132
172
|
timelineTrigger: [
|
|
133
173
|
'timelineTriggerName',
|
|
@@ -143,6 +183,11 @@ export const shorthands = {
|
|
|
143
183
|
'timelineTriggerActiveRangeStart',
|
|
144
184
|
'timelineTriggerActiveRangeEnd',
|
|
145
185
|
],
|
|
186
|
+
transformOrigin: [
|
|
187
|
+
'WebkitTransformOriginX',
|
|
188
|
+
'WebkitTransformOriginY',
|
|
189
|
+
'WebkitTransformOriginZ',
|
|
190
|
+
],
|
|
146
191
|
transition: [
|
|
147
192
|
'transitionDelay',
|
|
148
193
|
'transitionDuration',
|
package/src/internal/Compound.ts
CHANGED
|
@@ -241,6 +241,15 @@ export type Properties = {
|
|
|
241
241
|
readonly fontVariationSettings:
|
|
242
242
|
| 'normal'
|
|
243
243
|
| List<`${Quoted}${'' | ' '}${number}`>
|
|
244
|
+
/** Legacy vertical glyph orientation accepts only quarter-turn values. */
|
|
245
|
+
readonly glyphOrientationVertical:
|
|
246
|
+
| 'auto'
|
|
247
|
+
| '0deg'
|
|
248
|
+
| '90deg'
|
|
249
|
+
| '0'
|
|
250
|
+
| '90'
|
|
251
|
+
| 0
|
|
252
|
+
| 90
|
|
244
253
|
readonly grid:
|
|
245
254
|
| 'none'
|
|
246
255
|
| Chain<Track | Quoted | 'auto-flow' | 'dense'>
|
|
@@ -400,6 +409,53 @@ export type Properties = {
|
|
|
400
409
|
| 'none'
|
|
401
410
|
| `${Quoted}${'' | ' '}${Quoted}`
|
|
402
411
|
| `${Quoted}${'' | ' '}${Quoted}${string}`
|
|
412
|
+
/** Gap decoration shorthand with optional repetition. */
|
|
413
|
+
readonly rowRule: List<
|
|
414
|
+
| Chain<
|
|
415
|
+
| Exclude<Dimension, `${number}%`>
|
|
416
|
+
| Literal.Color
|
|
417
|
+
| 'thin'
|
|
418
|
+
| 'medium'
|
|
419
|
+
| 'thick'
|
|
420
|
+
| 'none'
|
|
421
|
+
| 'hidden'
|
|
422
|
+
| 'dotted'
|
|
423
|
+
| 'dashed'
|
|
424
|
+
| 'solid'
|
|
425
|
+
| 'double'
|
|
426
|
+
| 'groove'
|
|
427
|
+
| 'ridge'
|
|
428
|
+
| 'inset'
|
|
429
|
+
| 'outset'
|
|
430
|
+
>
|
|
431
|
+
| `repeat(${string})`
|
|
432
|
+
>
|
|
433
|
+
/** Gap decoration colors with optional repetition. */
|
|
434
|
+
readonly rowRuleColor: List<Literal.Color | `repeat(${string})`>
|
|
435
|
+
/** Gap decoration styles with optional repetition. */
|
|
436
|
+
readonly rowRuleStyle: List<
|
|
437
|
+
| 'none'
|
|
438
|
+
| 'hidden'
|
|
439
|
+
| 'dotted'
|
|
440
|
+
| 'dashed'
|
|
441
|
+
| 'solid'
|
|
442
|
+
| 'double'
|
|
443
|
+
| 'groove'
|
|
444
|
+
| 'ridge'
|
|
445
|
+
| 'inset'
|
|
446
|
+
| 'outset'
|
|
447
|
+
| `repeat(${string})`
|
|
448
|
+
>
|
|
449
|
+
/** Gap decoration widths with optional repetition. */
|
|
450
|
+
readonly rowRuleWidth: List<
|
|
451
|
+
| Exclude<Dimension, `${number}%`>
|
|
452
|
+
| 'thin'
|
|
453
|
+
| 'medium'
|
|
454
|
+
| 'thick'
|
|
455
|
+
| `repeat(${string})`
|
|
456
|
+
>
|
|
457
|
+
/** Cap and junction insets separated by an optional slash. */
|
|
458
|
+
readonly ruleInset: Chain<Dimension | Percentage | 'overlap-join'>
|
|
403
459
|
readonly scrollSnapCoordinate: 'none' | List<Position>
|
|
404
460
|
readonly scrollSnapDestination: Position
|
|
405
461
|
readonly scrollSnapPointsX: 'none' | `repeat(${string})`
|