@webstudio-is/css-engine 0.189.0 → 0.191.4
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/package.json +5 -7
- package/lib/index.js +0 -951
- package/lib/types/__generated__/types.d.ts +0 -2
- package/lib/types/core/atomic.d.ts +0 -14
- package/lib/types/core/atomic.test.d.ts +0 -1
- package/lib/types/core/compare-media.d.ts +0 -6
- package/lib/types/core/compare-media.test.d.ts +0 -1
- package/lib/types/core/create-style-sheet.d.ts +0 -4
- package/lib/types/core/css-engine.stories.d.ts +0 -5
- package/lib/types/core/equal-media.d.ts +0 -2
- package/lib/types/core/equal-media.test.d.ts +0 -1
- package/lib/types/core/find-applicable-media.d.ts +0 -2
- package/lib/types/core/find-applicable-media.test.d.ts +0 -1
- package/lib/types/core/index.d.ts +0 -13
- package/lib/types/core/match-media.d.ts +0 -2
- package/lib/types/core/match-media.test.d.ts +0 -1
- package/lib/types/core/merger.d.ts +0 -274
- package/lib/types/core/merger.test.d.ts +0 -1
- package/lib/types/core/prefixer.d.ts +0 -2
- package/lib/types/core/prefixer.test.d.ts +0 -1
- package/lib/types/core/rules.d.ts +0 -104
- package/lib/types/core/style-element.d.ts +0 -10
- package/lib/types/core/style-sheet-regular.d.ts +0 -3
- package/lib/types/core/style-sheet-regular.test.d.ts +0 -1
- package/lib/types/core/style-sheet.d.ts +0 -24
- package/lib/types/core/to-property.d.ts +0 -4
- package/lib/types/core/to-property.test.d.ts +0 -1
- package/lib/types/core/to-value.d.ts +0 -3
- package/lib/types/core/to-value.test.d.ts +0 -1
- package/lib/types/css.d.ts +0 -1
- package/lib/types/index.d.ts +0 -4
- package/lib/types/schema.d.ts +0 -3925
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export type Property = "WebkitFontSmoothing" | "MozOsxFontSmoothing" | "-webkit-box-orient" | "-webkit-line-clamp" | "-webkit-overflow-scrolling" | "-webkit-tap-highlight-color" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backdropFilter" | "backfaceVisibility" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "blockSize" | "borderBlockColor" | "borderBlockStyle" | "borderBlockWidth" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInlineColor" | "borderInlineStyle" | "borderInlineWidth" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "boxDecorationBreak" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "clip" | "clipPath" | "color" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "contain" | "containIntrinsicBlockSize" | "containIntrinsicHeight" | "containIntrinsicInlineSize" | "containIntrinsicWidth" | "containerName" | "containerType" | "content" | "contentVisibility" | "counterIncrement" | "counterReset" | "counterSet" | "cursor" | "direction" | "display" | "emptyCells" | "fieldSizing" | "filter" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontLanguageOverride" | "fontOpticalSizing" | "fontVariationSettings" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesisSmallCaps" | "fontSynthesisStyle" | "fontSynthesisWeight" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hangingPunctuation" | "height" | "hyphenateCharacter" | "hyphenateLimitChars" | "hyphens" | "imageOrientation" | "imageRendering" | "inlineSize" | "insetBlockEnd" | "insetBlockStart" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineBreak" | "lineHeight" | "listStyleImage" | "listStylePosition" | "listStyleType" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maskBorderMode" | "maskBorderOutset" | "maskBorderRepeat" | "maskBorderSlice" | "maskBorderSource" | "maskBorderWidth" | "maskClip" | "maskComposite" | "maskImage" | "maskMode" | "maskOrigin" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "mathDepth" | "mathShift" | "mathStyle" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetAnchor" | "offsetDistance" | "offsetPath" | "offsetPosition" | "offsetRotate" | "opacity" | "order" | "orphans" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "page" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "pointerEvents" | "position" | "printColorAdjust" | "quotes" | "resize" | "right" | "rotate" | "rowGap" | "scale" | "scrollbarColor" | "scrollbarGutter" | "scrollbarWidth" | "scrollBehavior" | "scrollMarginBlockStart" | "scrollMarginBlockEnd" | "scrollMarginBottom" | "scrollMarginInlineStart" | "scrollMarginInlineEnd" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPaddingBlockStart" | "scrollPaddingBlockEnd" | "scrollPaddingBottom" | "scrollPaddingInlineStart" | "scrollPaddingInlineEnd" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textCombineUpright" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textJustify" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textSizeAdjust" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "textWrapMode" | "textWrapStyle" | "top" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transitionBehavior" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpaceCollapse" | "widows" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "zoom";
|
|
2
|
-
export type Unit = "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { StyleSheet } from "./style-sheet";
|
|
2
|
-
import { NestingRule } from "./rules";
|
|
3
|
-
import { type TransformValue } from "./to-value";
|
|
4
|
-
type Options = {
|
|
5
|
-
/** in case of undefined the rule will not be split into atomics */
|
|
6
|
-
getKey: (rule: NestingRule) => string | undefined;
|
|
7
|
-
transformValue?: TransformValue;
|
|
8
|
-
classes?: Map<string, string[]>;
|
|
9
|
-
};
|
|
10
|
-
export declare const generateAtomic: (sheet: StyleSheet, options: Options) => {
|
|
11
|
-
cssText: string;
|
|
12
|
-
classes: Map<string, string[]>;
|
|
13
|
-
};
|
|
14
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { MediaRuleOptions } from "./rules";
|
|
2
|
-
/**
|
|
3
|
-
* Sort by minWidth descending or maxWidth ascending
|
|
4
|
-
* We want media querries with bigger minWidth to override the smaller once, but the smaller maxWidth to override the bigger once.
|
|
5
|
-
*/
|
|
6
|
-
export declare const compareMedia: (optionA: MediaRuleOptions, optionB: MediaRuleOptions) => number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type { StyleMap, NestingRule, MediaRule, PlaintextRule, FontFaceRule, } from "./rules";
|
|
2
|
-
export { prefixStyles } from "./prefixer";
|
|
3
|
-
export { mergeStyles } from "./merger";
|
|
4
|
-
export { generateStyleMap } from "./rules";
|
|
5
|
-
export type { StyleSheetRegular } from "./style-sheet-regular";
|
|
6
|
-
export * from "./create-style-sheet";
|
|
7
|
-
export * from "./to-value";
|
|
8
|
-
export { hyphenateProperty } from "./to-property";
|
|
9
|
-
export * from "./match-media";
|
|
10
|
-
export * from "./equal-media";
|
|
11
|
-
export * from "./compare-media";
|
|
12
|
-
export * from "./find-applicable-media";
|
|
13
|
-
export * from "./atomic";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
import { StyleValue } from "../schema";
|
|
2
|
-
import type { StyleMap } from "./rules";
|
|
3
|
-
export declare const mergeStyles: (styleMap: StyleMap) => Map<string, {
|
|
4
|
-
type: "unit";
|
|
5
|
-
value: number;
|
|
6
|
-
unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
|
|
7
|
-
hidden?: boolean | undefined;
|
|
8
|
-
} | {
|
|
9
|
-
type: "keyword";
|
|
10
|
-
value: string;
|
|
11
|
-
hidden?: boolean | undefined;
|
|
12
|
-
} | {
|
|
13
|
-
type: "unparsed";
|
|
14
|
-
value: string;
|
|
15
|
-
hidden?: boolean | undefined;
|
|
16
|
-
} | {
|
|
17
|
-
type: "fontFamily";
|
|
18
|
-
value: string[];
|
|
19
|
-
hidden?: boolean | undefined;
|
|
20
|
-
} | {
|
|
21
|
-
type: "rgb";
|
|
22
|
-
r: number;
|
|
23
|
-
g: number;
|
|
24
|
-
b: number;
|
|
25
|
-
alpha: number;
|
|
26
|
-
hidden?: boolean | undefined;
|
|
27
|
-
} | {
|
|
28
|
-
type: "function";
|
|
29
|
-
name: string;
|
|
30
|
-
args: StyleValue;
|
|
31
|
-
hidden?: boolean;
|
|
32
|
-
} | {
|
|
33
|
-
type: "image";
|
|
34
|
-
value: {
|
|
35
|
-
type: "asset";
|
|
36
|
-
value: string;
|
|
37
|
-
} | {
|
|
38
|
-
type: "url";
|
|
39
|
-
url: string;
|
|
40
|
-
};
|
|
41
|
-
hidden?: boolean | undefined;
|
|
42
|
-
} | {
|
|
43
|
-
type: "var";
|
|
44
|
-
value: string;
|
|
45
|
-
fallback?: {
|
|
46
|
-
type: "unit";
|
|
47
|
-
value: number;
|
|
48
|
-
unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
|
|
49
|
-
hidden?: boolean | undefined;
|
|
50
|
-
} | {
|
|
51
|
-
type: "keyword";
|
|
52
|
-
value: string;
|
|
53
|
-
hidden?: boolean | undefined;
|
|
54
|
-
} | {
|
|
55
|
-
type: "unparsed";
|
|
56
|
-
value: string;
|
|
57
|
-
hidden?: boolean | undefined;
|
|
58
|
-
} | {
|
|
59
|
-
type: "rgb";
|
|
60
|
-
r: number;
|
|
61
|
-
g: number;
|
|
62
|
-
b: number;
|
|
63
|
-
alpha: number;
|
|
64
|
-
hidden?: boolean | undefined;
|
|
65
|
-
} | undefined;
|
|
66
|
-
hidden?: boolean | undefined;
|
|
67
|
-
} | {
|
|
68
|
-
type: "tuple";
|
|
69
|
-
value: ({
|
|
70
|
-
type: "unit";
|
|
71
|
-
value: number;
|
|
72
|
-
unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
|
|
73
|
-
hidden?: boolean | undefined;
|
|
74
|
-
} | {
|
|
75
|
-
type: "keyword";
|
|
76
|
-
value: string;
|
|
77
|
-
hidden?: boolean | undefined;
|
|
78
|
-
} | {
|
|
79
|
-
type: "unparsed";
|
|
80
|
-
value: string;
|
|
81
|
-
hidden?: boolean | undefined;
|
|
82
|
-
} | {
|
|
83
|
-
type: "rgb";
|
|
84
|
-
r: number;
|
|
85
|
-
g: number;
|
|
86
|
-
b: number;
|
|
87
|
-
alpha: number;
|
|
88
|
-
hidden?: boolean | undefined;
|
|
89
|
-
} | {
|
|
90
|
-
type: "function";
|
|
91
|
-
name: string;
|
|
92
|
-
args: StyleValue;
|
|
93
|
-
hidden?: boolean;
|
|
94
|
-
} | {
|
|
95
|
-
type: "image";
|
|
96
|
-
value: {
|
|
97
|
-
type: "asset";
|
|
98
|
-
value: string;
|
|
99
|
-
} | {
|
|
100
|
-
type: "url";
|
|
101
|
-
url: string;
|
|
102
|
-
};
|
|
103
|
-
hidden?: boolean | undefined;
|
|
104
|
-
} | {
|
|
105
|
-
type: "var";
|
|
106
|
-
value: string;
|
|
107
|
-
fallback?: {
|
|
108
|
-
type: "unit";
|
|
109
|
-
value: number;
|
|
110
|
-
unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
|
|
111
|
-
hidden?: boolean | undefined;
|
|
112
|
-
} | {
|
|
113
|
-
type: "keyword";
|
|
114
|
-
value: string;
|
|
115
|
-
hidden?: boolean | undefined;
|
|
116
|
-
} | {
|
|
117
|
-
type: "unparsed";
|
|
118
|
-
value: string;
|
|
119
|
-
hidden?: boolean | undefined;
|
|
120
|
-
} | {
|
|
121
|
-
type: "rgb";
|
|
122
|
-
r: number;
|
|
123
|
-
g: number;
|
|
124
|
-
b: number;
|
|
125
|
-
alpha: number;
|
|
126
|
-
hidden?: boolean | undefined;
|
|
127
|
-
} | undefined;
|
|
128
|
-
hidden?: boolean | undefined;
|
|
129
|
-
})[];
|
|
130
|
-
hidden?: boolean | undefined;
|
|
131
|
-
} | {
|
|
132
|
-
type: "invalid";
|
|
133
|
-
value: string;
|
|
134
|
-
hidden?: boolean | undefined;
|
|
135
|
-
} | {
|
|
136
|
-
type: "layers";
|
|
137
|
-
value: ({
|
|
138
|
-
type: "unit";
|
|
139
|
-
value: number;
|
|
140
|
-
unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
|
|
141
|
-
hidden?: boolean | undefined;
|
|
142
|
-
} | {
|
|
143
|
-
type: "keyword";
|
|
144
|
-
value: string;
|
|
145
|
-
hidden?: boolean | undefined;
|
|
146
|
-
} | {
|
|
147
|
-
type: "unparsed";
|
|
148
|
-
value: string;
|
|
149
|
-
hidden?: boolean | undefined;
|
|
150
|
-
} | {
|
|
151
|
-
type: "rgb";
|
|
152
|
-
r: number;
|
|
153
|
-
g: number;
|
|
154
|
-
b: number;
|
|
155
|
-
alpha: number;
|
|
156
|
-
hidden?: boolean | undefined;
|
|
157
|
-
} | {
|
|
158
|
-
type: "function";
|
|
159
|
-
name: string;
|
|
160
|
-
args: StyleValue;
|
|
161
|
-
hidden?: boolean;
|
|
162
|
-
} | {
|
|
163
|
-
type: "image";
|
|
164
|
-
value: {
|
|
165
|
-
type: "asset";
|
|
166
|
-
value: string;
|
|
167
|
-
} | {
|
|
168
|
-
type: "url";
|
|
169
|
-
url: string;
|
|
170
|
-
};
|
|
171
|
-
hidden?: boolean | undefined;
|
|
172
|
-
} | {
|
|
173
|
-
type: "var";
|
|
174
|
-
value: string;
|
|
175
|
-
fallback?: {
|
|
176
|
-
type: "unit";
|
|
177
|
-
value: number;
|
|
178
|
-
unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
|
|
179
|
-
hidden?: boolean | undefined;
|
|
180
|
-
} | {
|
|
181
|
-
type: "keyword";
|
|
182
|
-
value: string;
|
|
183
|
-
hidden?: boolean | undefined;
|
|
184
|
-
} | {
|
|
185
|
-
type: "unparsed";
|
|
186
|
-
value: string;
|
|
187
|
-
hidden?: boolean | undefined;
|
|
188
|
-
} | {
|
|
189
|
-
type: "rgb";
|
|
190
|
-
r: number;
|
|
191
|
-
g: number;
|
|
192
|
-
b: number;
|
|
193
|
-
alpha: number;
|
|
194
|
-
hidden?: boolean | undefined;
|
|
195
|
-
} | undefined;
|
|
196
|
-
hidden?: boolean | undefined;
|
|
197
|
-
} | {
|
|
198
|
-
type: "tuple";
|
|
199
|
-
value: ({
|
|
200
|
-
type: "unit";
|
|
201
|
-
value: number;
|
|
202
|
-
unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
|
|
203
|
-
hidden?: boolean | undefined;
|
|
204
|
-
} | {
|
|
205
|
-
type: "keyword";
|
|
206
|
-
value: string;
|
|
207
|
-
hidden?: boolean | undefined;
|
|
208
|
-
} | {
|
|
209
|
-
type: "unparsed";
|
|
210
|
-
value: string;
|
|
211
|
-
hidden?: boolean | undefined;
|
|
212
|
-
} | {
|
|
213
|
-
type: "rgb";
|
|
214
|
-
r: number;
|
|
215
|
-
g: number;
|
|
216
|
-
b: number;
|
|
217
|
-
alpha: number;
|
|
218
|
-
hidden?: boolean | undefined;
|
|
219
|
-
} | {
|
|
220
|
-
type: "function";
|
|
221
|
-
name: string;
|
|
222
|
-
args: StyleValue;
|
|
223
|
-
hidden?: boolean;
|
|
224
|
-
} | {
|
|
225
|
-
type: "image";
|
|
226
|
-
value: {
|
|
227
|
-
type: "asset";
|
|
228
|
-
value: string;
|
|
229
|
-
} | {
|
|
230
|
-
type: "url";
|
|
231
|
-
url: string;
|
|
232
|
-
};
|
|
233
|
-
hidden?: boolean | undefined;
|
|
234
|
-
} | {
|
|
235
|
-
type: "var";
|
|
236
|
-
value: string;
|
|
237
|
-
fallback?: {
|
|
238
|
-
type: "unit";
|
|
239
|
-
value: number;
|
|
240
|
-
unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
|
|
241
|
-
hidden?: boolean | undefined;
|
|
242
|
-
} | {
|
|
243
|
-
type: "keyword";
|
|
244
|
-
value: string;
|
|
245
|
-
hidden?: boolean | undefined;
|
|
246
|
-
} | {
|
|
247
|
-
type: "unparsed";
|
|
248
|
-
value: string;
|
|
249
|
-
hidden?: boolean | undefined;
|
|
250
|
-
} | {
|
|
251
|
-
type: "rgb";
|
|
252
|
-
r: number;
|
|
253
|
-
g: number;
|
|
254
|
-
b: number;
|
|
255
|
-
alpha: number;
|
|
256
|
-
hidden?: boolean | undefined;
|
|
257
|
-
} | undefined;
|
|
258
|
-
hidden?: boolean | undefined;
|
|
259
|
-
})[];
|
|
260
|
-
hidden?: boolean | undefined;
|
|
261
|
-
} | {
|
|
262
|
-
type: "invalid";
|
|
263
|
-
value: string;
|
|
264
|
-
hidden?: boolean | undefined;
|
|
265
|
-
})[];
|
|
266
|
-
hidden?: boolean | undefined;
|
|
267
|
-
} | {
|
|
268
|
-
type: "guaranteedInvalid";
|
|
269
|
-
hidden?: boolean | undefined;
|
|
270
|
-
} | {
|
|
271
|
-
type: "unset";
|
|
272
|
-
value: "";
|
|
273
|
-
hidden?: boolean | undefined;
|
|
274
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import type { StyleValue } from "../schema";
|
|
2
|
-
import { type TransformValue } from "./to-value";
|
|
3
|
-
export type StyleMap = Map<string, StyleValue>;
|
|
4
|
-
export declare const generateStyleMap: ({ style, indent, transformValue, }: {
|
|
5
|
-
style: StyleMap;
|
|
6
|
-
indent?: number;
|
|
7
|
-
transformValue?: TransformValue;
|
|
8
|
-
}) => string;
|
|
9
|
-
export type Declaration = {
|
|
10
|
-
breakpoint: string;
|
|
11
|
-
selector: string;
|
|
12
|
-
property: string;
|
|
13
|
-
value: StyleValue;
|
|
14
|
-
};
|
|
15
|
-
type DeclarationKey = Omit<Declaration, "value">;
|
|
16
|
-
/**
|
|
17
|
-
* Reusable style rule in any nesting rule
|
|
18
|
-
*
|
|
19
|
-
* @mixin name {
|
|
20
|
-
* \@media breakpoint {
|
|
21
|
-
* &selector {
|
|
22
|
-
* property: value
|
|
23
|
-
* }
|
|
24
|
-
* }
|
|
25
|
-
* }
|
|
26
|
-
*/
|
|
27
|
-
export declare class MixinRule {
|
|
28
|
-
#private;
|
|
29
|
-
isDirtyBreakpoint(breakpoint: string): boolean;
|
|
30
|
-
/**
|
|
31
|
-
* reset breakpoints invalidation
|
|
32
|
-
*/
|
|
33
|
-
clearBreakpoints(): void;
|
|
34
|
-
setDeclaration(declaration: Declaration): void;
|
|
35
|
-
deleteDeclaration(declaration: DeclarationKey): void;
|
|
36
|
-
getDeclarations(): MapIterator<Declaration>;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Universal style rule with nested selectors and media queries support
|
|
40
|
-
* Rules are generated by each media query
|
|
41
|
-
* and heavily cached to avoid complex computation
|
|
42
|
-
*
|
|
43
|
-
* selector {
|
|
44
|
-
* \@media breakpoint {
|
|
45
|
-
* &selector {
|
|
46
|
-
* property: value
|
|
47
|
-
* }
|
|
48
|
-
* }
|
|
49
|
-
* }
|
|
50
|
-
*/
|
|
51
|
-
export declare class NestingRule {
|
|
52
|
-
#private;
|
|
53
|
-
constructor(mixinRules: Map<string, MixinRule>, selector: string, descendantSuffix: string);
|
|
54
|
-
getSelector(): string;
|
|
55
|
-
setSelector(selector: string): void;
|
|
56
|
-
getDescendantSuffix(): string;
|
|
57
|
-
addMixin(mixin: string): void;
|
|
58
|
-
applyMixins(mixins: string[]): void;
|
|
59
|
-
setDeclaration(declaration: Declaration): void;
|
|
60
|
-
deleteDeclaration(declaration: DeclarationKey): void;
|
|
61
|
-
getMergedDeclarations(): Declaration[];
|
|
62
|
-
toString({ breakpoint, indent, transformValue, }: {
|
|
63
|
-
breakpoint: string;
|
|
64
|
-
indent?: number;
|
|
65
|
-
transformValue?: TransformValue;
|
|
66
|
-
}): string;
|
|
67
|
-
}
|
|
68
|
-
export type MediaRuleOptions = {
|
|
69
|
-
minWidth?: number;
|
|
70
|
-
maxWidth?: number;
|
|
71
|
-
mediaType?: "all" | "screen" | "print";
|
|
72
|
-
};
|
|
73
|
-
export declare class MediaRule {
|
|
74
|
-
#private;
|
|
75
|
-
options: MediaRuleOptions;
|
|
76
|
-
rules: Map<string, PlaintextRule>;
|
|
77
|
-
constructor(name: string, options?: MediaRuleOptions);
|
|
78
|
-
insertRule(rule: PlaintextRule): PlaintextRule;
|
|
79
|
-
get cssText(): string;
|
|
80
|
-
toString(): string;
|
|
81
|
-
generateRule({ nestingRules, transformValue, }: {
|
|
82
|
-
nestingRules: NestingRule[];
|
|
83
|
-
transformValue?: TransformValue;
|
|
84
|
-
}): string;
|
|
85
|
-
}
|
|
86
|
-
export declare class PlaintextRule {
|
|
87
|
-
cssText: string;
|
|
88
|
-
constructor(cssText: string);
|
|
89
|
-
toString(): string;
|
|
90
|
-
}
|
|
91
|
-
export type FontFaceOptions = {
|
|
92
|
-
fontFamily: string;
|
|
93
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
94
|
-
fontWeight?: number | string;
|
|
95
|
-
fontDisplay: "swap" | "auto" | "block" | "fallback" | "optional";
|
|
96
|
-
src: string;
|
|
97
|
-
};
|
|
98
|
-
export declare class FontFaceRule {
|
|
99
|
-
#private;
|
|
100
|
-
constructor(options: FontFaceOptions);
|
|
101
|
-
get cssText(): string;
|
|
102
|
-
toString(): string;
|
|
103
|
-
}
|
|
104
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class StyleElement {
|
|
2
|
-
#private;
|
|
3
|
-
constructor(name?: string);
|
|
4
|
-
get isMounted(): boolean;
|
|
5
|
-
mount(): void;
|
|
6
|
-
unmount(): void;
|
|
7
|
-
render(cssText: string): void;
|
|
8
|
-
setAttribute(name: string, value: string): void;
|
|
9
|
-
getAttribute(name: string): string | null | undefined;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { MediaRule, MixinRule, NestingRule, PlaintextRule, type FontFaceOptions, type MediaRuleOptions } from "./rules";
|
|
2
|
-
import { StyleElement } from "./style-element";
|
|
3
|
-
import type { TransformValue } from "./to-value";
|
|
4
|
-
export declare class StyleSheet {
|
|
5
|
-
#private;
|
|
6
|
-
nestingRules: Map<string, NestingRule>;
|
|
7
|
-
constructor(element: StyleElement);
|
|
8
|
-
setTransformer(transformValue: TransformValue): void;
|
|
9
|
-
addMediaRule(id: string, options?: MediaRuleOptions): MediaRule;
|
|
10
|
-
addPlaintextRule(cssText: string): PlaintextRule | Map<string, PlaintextRule>;
|
|
11
|
-
addMixinRule(name: string): MixinRule;
|
|
12
|
-
addNestingRule(selector: string, descendantSuffix?: string): NestingRule;
|
|
13
|
-
addFontFaceRule(options: FontFaceOptions): number;
|
|
14
|
-
generateWith({ nestingRules, transformValue, }: {
|
|
15
|
-
nestingRules: NestingRule[];
|
|
16
|
-
transformValue?: TransformValue;
|
|
17
|
-
}): string;
|
|
18
|
-
get cssText(): string;
|
|
19
|
-
clear(): void;
|
|
20
|
-
render(): void;
|
|
21
|
-
unmount(): void;
|
|
22
|
-
setAttribute(name: string, value: string): void;
|
|
23
|
-
getAttribute(name: string): string | null | undefined;
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/types/css.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const cssWideKeywords: Set<string>;
|
package/lib/types/index.d.ts
DELETED