@master/css 2.0.0-beta.99 → 2.0.0-rc.2
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 +38 -20
- package/dist/bin/index.bundle.js +36 -0
- package/dist/bin/index.d.ts +2 -0
- package/dist/config/animations.d.ts +110 -0
- package/dist/config/functions.d.ts +3 -0
- package/dist/config/index.d.ts +57 -38
- package/dist/config/media-queries.d.ts +1 -0
- package/dist/config/rules.d.ts +279 -199
- package/dist/config/selectors.d.ts +1 -0
- package/dist/config/semantics.d.ts +187 -78
- package/dist/config/styles.d.ts +3 -0
- package/dist/config/variables.d.ts +551 -0
- package/dist/constants/base-unit-regex.d.ts +1 -0
- package/dist/constants/config-esm-text.d.ts +1 -0
- package/dist/constants/config-text.d.ts +1 -0
- package/dist/constants/config-ts-text.d.ts +1 -0
- package/dist/constants/start-symbol.d.ts +1 -1
- package/dist/core.d.ts +96 -0
- package/dist/functions/reorder-for-readable-classes.d.ts +12 -0
- package/dist/functions/transform-color-with-opacity.d.ts +1 -0
- package/dist/index.bundle.js +35 -0
- package/dist/index.bundle.mjs +35 -0
- package/dist/index.d.ts +10 -21
- package/dist/layer.d.ts +11 -0
- package/dist/polyfills/css-escape.d.ts +0 -1
- package/dist/rule.d.ts +101 -55
- package/dist/{config/breakpoints.d.ts → tokens/screen-sizes.d.ts} +3 -2
- package/dist/types/global.d.ts +5 -0
- package/dist/utils/extend-config.d.ts +2 -0
- package/dist/utils/flatten-object.d.ts +1 -0
- package/dist/utils/hex-to-rgb.d.ts +1 -1
- package/dist/utils/rgb-to-hex.d.ts +1 -1
- package/package.json +1 -1
- package/dist/apis/fill-color-scale.d.ts +0 -1
- package/dist/apis/render-from-html.d.ts +0 -3
- package/dist/apis/render-into-html.d.ts +0 -3
- package/dist/apis/render.d.ts +0 -3
- package/dist/config/colors.d.ts +0 -25
- package/dist/config/root-size.d.ts +0 -2
- package/dist/config/scheme.d.ts +0 -7
- package/dist/config/themes.d.ts +0 -2
- package/dist/config/values.d.ts +0 -126
- package/dist/css.d.ts +0 -96
- package/dist/index.browser.d.ts +0 -1
- package/dist/index.browser.js +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.mjs +0 -1
- package/dist/rules/accent-color.d.ts +0 -6
- package/dist/rules/align-content.d.ts +0 -5
- package/dist/rules/align-items.d.ts +0 -5
- package/dist/rules/align-self.d.ts +0 -5
- package/dist/rules/animation-delay.d.ts +0 -6
- package/dist/rules/animation-direction.d.ts +0 -5
- package/dist/rules/animation-duration.d.ts +0 -6
- package/dist/rules/animation-fill-mode.d.ts +0 -5
- package/dist/rules/animation-iteration-count.d.ts +0 -6
- package/dist/rules/animation-name.d.ts +0 -5
- package/dist/rules/animation-play-state.d.ts +0 -5
- package/dist/rules/animation-timing-function.d.ts +0 -5
- package/dist/rules/animation.d.ts +0 -7
- package/dist/rules/appearance.d.ts +0 -4
- package/dist/rules/aspect-ratio.d.ts +0 -6
- package/dist/rules/backdrop-filter.d.ts +0 -11
- package/dist/rules/background-attachment.d.ts +0 -5
- package/dist/rules/background-blend-mode.d.ts +0 -4
- package/dist/rules/background-clip.d.ts +0 -8
- package/dist/rules/background-color.d.ts +0 -7
- package/dist/rules/background-image.d.ts +0 -6
- package/dist/rules/background-origin.d.ts +0 -5
- package/dist/rules/background-position.d.ts +0 -6
- package/dist/rules/background-repeat.d.ts +0 -5
- package/dist/rules/background-size.d.ts +0 -5
- package/dist/rules/background.d.ts +0 -7
- package/dist/rules/border-collapse.d.ts +0 -5
- package/dist/rules/border-color.d.ts +0 -12
- package/dist/rules/border-image-outset.d.ts +0 -4
- package/dist/rules/border-image-repeat.d.ts +0 -5
- package/dist/rules/border-image-slice.d.ts +0 -5
- package/dist/rules/border-image-source.d.ts +0 -5
- package/dist/rules/border-image-width.d.ts +0 -5
- package/dist/rules/border-image.d.ts +0 -5
- package/dist/rules/border-radius.d.ts +0 -10
- package/dist/rules/border-spacing.d.ts +0 -4
- package/dist/rules/border-style.d.ts +0 -10
- package/dist/rules/border-width.d.ts +0 -10
- package/dist/rules/border.d.ts +0 -11
- package/dist/rules/box-decoration-break.d.ts +0 -8
- package/dist/rules/box-shadow.d.ts +0 -6
- package/dist/rules/box-sizing.d.ts +0 -5
- package/dist/rules/break-after.d.ts +0 -4
- package/dist/rules/break-before.d.ts +0 -4
- package/dist/rules/break-inside.d.ts +0 -4
- package/dist/rules/caret-color.d.ts +0 -6
- package/dist/rules/clear.d.ts +0 -4
- package/dist/rules/clip-path.d.ts +0 -5
- package/dist/rules/color.d.ts +0 -7
- package/dist/rules/column-span.d.ts +0 -5
- package/dist/rules/columns.d.ts +0 -7
- package/dist/rules/contain.d.ts +0 -4
- package/dist/rules/content.d.ts +0 -4
- package/dist/rules/counter-increment.d.ts +0 -5
- package/dist/rules/counter-reset.d.ts +0 -5
- package/dist/rules/cursor.d.ts +0 -4
- package/dist/rules/cx.d.ts +0 -5
- package/dist/rules/cy.d.ts +0 -5
- package/dist/rules/direction.d.ts +0 -4
- package/dist/rules/display.d.ts +0 -5
- package/dist/rules/fill.d.ts +0 -6
- package/dist/rules/filter.d.ts +0 -8
- package/dist/rules/flex-basis.d.ts +0 -4
- package/dist/rules/flex-direction.d.ts +0 -5
- package/dist/rules/flex-grow.d.ts +0 -5
- package/dist/rules/flex-shrink.d.ts +0 -5
- package/dist/rules/flex-wrap.d.ts +0 -5
- package/dist/rules/flex.d.ts +0 -6
- package/dist/rules/float.d.ts +0 -4
- package/dist/rules/font-family.d.ts +0 -5
- package/dist/rules/font-feature-settings.d.ts +0 -5
- package/dist/rules/font-size.d.ts +0 -5
- package/dist/rules/font-smoothing.d.ts +0 -10
- package/dist/rules/font-style.d.ts +0 -6
- package/dist/rules/font-variant-numeric.d.ts +0 -5
- package/dist/rules/font-weight.d.ts +0 -6
- package/dist/rules/font.d.ts +0 -7
- package/dist/rules/gap.d.ts +0 -10
- package/dist/rules/grid-area.d.ts +0 -6
- package/dist/rules/grid-auto-columns.d.ts +0 -5
- package/dist/rules/grid-auto-flow.d.ts +0 -5
- package/dist/rules/grid-auto-rows.d.ts +0 -4
- package/dist/rules/grid-column-end.d.ts +0 -6
- package/dist/rules/grid-column-start.d.ts +0 -6
- package/dist/rules/grid-column.d.ts +0 -8
- package/dist/rules/grid-columns.d.ts +0 -9
- package/dist/rules/grid-row-end.d.ts +0 -5
- package/dist/rules/grid-row-start.d.ts +0 -5
- package/dist/rules/grid-row.d.ts +0 -8
- package/dist/rules/grid-rows.d.ts +0 -8
- package/dist/rules/grid-template-areas.d.ts +0 -4
- package/dist/rules/grid-template-columns.d.ts +0 -5
- package/dist/rules/grid-template-rows.d.ts +0 -4
- package/dist/rules/grid-template.d.ts +0 -5
- package/dist/rules/grid.d.ts +0 -5
- package/dist/rules/group.d.ts +0 -13
- package/dist/rules/height.d.ts +0 -5
- package/dist/rules/inset.d.ts +0 -8
- package/dist/rules/isolation.d.ts +0 -4
- package/dist/rules/justify-content.d.ts +0 -5
- package/dist/rules/justify-items.d.ts +0 -5
- package/dist/rules/justify-self.d.ts +0 -5
- package/dist/rules/letter-spacing.d.ts +0 -6
- package/dist/rules/line-clamp.d.ts +0 -8
- package/dist/rules/line-height.d.ts +0 -6
- package/dist/rules/lines.d.ts +0 -10
- package/dist/rules/list-style-image.d.ts +0 -5
- package/dist/rules/list-style-position.d.ts +0 -5
- package/dist/rules/list-style-type.d.ts +0 -5
- package/dist/rules/list-style.d.ts +0 -5
- package/dist/rules/margin.d.ts +0 -10
- package/dist/rules/mask-image.d.ts +0 -7
- package/dist/rules/max-height.d.ts +0 -5
- package/dist/rules/max-wh.d.ts +0 -12
- package/dist/rules/max-width.d.ts +0 -5
- package/dist/rules/min-height.d.ts +0 -5
- package/dist/rules/min-wh.d.ts +0 -12
- package/dist/rules/min-width.d.ts +0 -5
- package/dist/rules/mix-blend-mode.d.ts +0 -5
- package/dist/rules/object-fit.d.ts +0 -5
- package/dist/rules/object-position.d.ts +0 -5
- package/dist/rules/opacity.d.ts +0 -5
- package/dist/rules/order.d.ts +0 -6
- package/dist/rules/outline-color.d.ts +0 -6
- package/dist/rules/outline-offset.d.ts +0 -4
- package/dist/rules/outline-style.d.ts +0 -5
- package/dist/rules/outline-width.d.ts +0 -5
- package/dist/rules/outline.d.ts +0 -6
- package/dist/rules/overflow.d.ts +0 -10
- package/dist/rules/overscroll-behavior.d.ts +0 -9
- package/dist/rules/padding.d.ts +0 -10
- package/dist/rules/place-content.d.ts +0 -5
- package/dist/rules/place-items.d.ts +0 -5
- package/dist/rules/place-self.d.ts +0 -5
- package/dist/rules/pointer-events.d.ts +0 -4
- package/dist/rules/position.d.ts +0 -4
- package/dist/rules/quotes.d.ts +0 -4
- package/dist/rules/resize.d.ts +0 -4
- package/dist/rules/rx.d.ts +0 -5
- package/dist/rules/ry.d.ts +0 -5
- package/dist/rules/scroll-behavior.d.ts +0 -4
- package/dist/rules/scroll-margin.d.ts +0 -10
- package/dist/rules/scroll-padding.d.ts +0 -10
- package/dist/rules/scroll-snap-align.d.ts +0 -5
- package/dist/rules/scroll-snap-stop.d.ts +0 -5
- package/dist/rules/scroll-snap-type.d.ts +0 -5
- package/dist/rules/shape-image-threshold.d.ts +0 -5
- package/dist/rules/shape-margin.d.ts +0 -5
- package/dist/rules/shape-outside.d.ts +0 -5
- package/dist/rules/spacing.d.ts +0 -10
- package/dist/rules/stroke-dasharray.d.ts +0 -4
- package/dist/rules/stroke-dashoffset.d.ts +0 -4
- package/dist/rules/stroke-width.d.ts +0 -5
- package/dist/rules/stroke.d.ts +0 -5
- package/dist/rules/table-layout.d.ts +0 -4
- package/dist/rules/text-align.d.ts +0 -5
- package/dist/rules/text-decoration-color.d.ts +0 -6
- package/dist/rules/text-decoration-line.d.ts +0 -5
- package/dist/rules/text-decoration-style.d.ts +0 -5
- package/dist/rules/text-decoration-thickness.d.ts +0 -6
- package/dist/rules/text-decoration.d.ts +0 -7
- package/dist/rules/text-fill-color.d.ts +0 -11
- package/dist/rules/text-indent.d.ts +0 -4
- package/dist/rules/text-orientation.d.ts +0 -5
- package/dist/rules/text-overflow.d.ts +0 -5
- package/dist/rules/text-rendering.d.ts +0 -5
- package/dist/rules/text-shadow.d.ts +0 -5
- package/dist/rules/text-size.d.ts +0 -9
- package/dist/rules/text-stroke-color.d.ts +0 -11
- package/dist/rules/text-stroke-width.d.ts +0 -9
- package/dist/rules/text-stroke.d.ts +0 -9
- package/dist/rules/text-transform.d.ts +0 -5
- package/dist/rules/text-underline-offset.d.ts +0 -4
- package/dist/rules/touch-action.d.ts +0 -4
- package/dist/rules/transform-box.d.ts +0 -5
- package/dist/rules/transform-origin.d.ts +0 -6
- package/dist/rules/transform-style.d.ts +0 -5
- package/dist/rules/transform.d.ts +0 -8
- package/dist/rules/transition-delay.d.ts +0 -6
- package/dist/rules/transition-duration.d.ts +0 -6
- package/dist/rules/transition-property.d.ts +0 -5
- package/dist/rules/transition-timing-function.d.ts +0 -5
- package/dist/rules/transition.d.ts +0 -6
- package/dist/rules/user-drag.d.ts +0 -7
- package/dist/rules/user-select.d.ts +0 -7
- package/dist/rules/variable.d.ts +0 -10
- package/dist/rules/vertical-align.d.ts +0 -5
- package/dist/rules/visibility.d.ts +0 -4
- package/dist/rules/wh.d.ts +0 -12
- package/dist/rules/white-space.d.ts +0 -5
- package/dist/rules/width.d.ts +0 -5
- package/dist/rules/will-change.d.ts +0 -4
- package/dist/rules/word-break.d.ts +0 -5
- package/dist/rules/word-spacing.d.ts +0 -5
- package/dist/rules/writing-mode.d.ts +0 -5
- package/dist/rules/x.d.ts +0 -5
- package/dist/rules/y.d.ts +0 -5
- package/dist/rules/z-index.d.ts +0 -6
- package/dist/utils/analyze-unit-value.d.ts +0 -4
- package/dist/utils/analyze-value-token.d.ts +0 -3
- package/dist/utils/delay.d.ts +0 -2
- package/dist/utils/get-border-props.d.ts +0 -3
- package/dist/utils/get-css-property-text.d.ts +0 -5
- package/dist/utils/normalize-css-calc-text.d.ts +0 -5
- package/dist/utils/parse-value-unit.d.ts +0 -2
- package/dist/utils/parse-value.d.ts +0 -5
- package/dist/utils/test-css.d.ts +0 -3
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
declare const variables: {
|
|
2
|
+
full: string;
|
|
3
|
+
fit: string;
|
|
4
|
+
max: string;
|
|
5
|
+
min: string;
|
|
6
|
+
'font-family': {
|
|
7
|
+
mono: string[];
|
|
8
|
+
sans: string[];
|
|
9
|
+
serif: string[];
|
|
10
|
+
};
|
|
11
|
+
screen: {
|
|
12
|
+
'4xs': number;
|
|
13
|
+
'3xs': number;
|
|
14
|
+
'2xs': number;
|
|
15
|
+
xs: number;
|
|
16
|
+
sm: number;
|
|
17
|
+
md: number;
|
|
18
|
+
lg: number;
|
|
19
|
+
xl: number;
|
|
20
|
+
'2xl': number;
|
|
21
|
+
'3xl': number;
|
|
22
|
+
'4xl': number;
|
|
23
|
+
};
|
|
24
|
+
'font-weight': {
|
|
25
|
+
thin: number;
|
|
26
|
+
extralight: number;
|
|
27
|
+
light: number;
|
|
28
|
+
regular: number;
|
|
29
|
+
medium: number;
|
|
30
|
+
semibold: number;
|
|
31
|
+
bold: number;
|
|
32
|
+
extrabold: number;
|
|
33
|
+
heavy: number;
|
|
34
|
+
};
|
|
35
|
+
'flex-direction': {
|
|
36
|
+
col: string;
|
|
37
|
+
'col-reverse': string;
|
|
38
|
+
};
|
|
39
|
+
'box-sizing': {
|
|
40
|
+
content: string;
|
|
41
|
+
border: string;
|
|
42
|
+
};
|
|
43
|
+
position: {
|
|
44
|
+
abs: string;
|
|
45
|
+
rel: string;
|
|
46
|
+
};
|
|
47
|
+
'transform-box': {
|
|
48
|
+
content: string;
|
|
49
|
+
border: string;
|
|
50
|
+
padding: string;
|
|
51
|
+
fill: string;
|
|
52
|
+
stroke: string;
|
|
53
|
+
view: string;
|
|
54
|
+
};
|
|
55
|
+
'animation-direction': {
|
|
56
|
+
alt: string;
|
|
57
|
+
'alt-reverse': string;
|
|
58
|
+
};
|
|
59
|
+
'background-clip': {
|
|
60
|
+
content: string;
|
|
61
|
+
border: string;
|
|
62
|
+
padding: string;
|
|
63
|
+
};
|
|
64
|
+
'background-origin': {
|
|
65
|
+
content: string;
|
|
66
|
+
border: string;
|
|
67
|
+
padding: string;
|
|
68
|
+
};
|
|
69
|
+
order: {
|
|
70
|
+
first: number;
|
|
71
|
+
last: number;
|
|
72
|
+
};
|
|
73
|
+
'shape-outside': {
|
|
74
|
+
content: string;
|
|
75
|
+
border: string;
|
|
76
|
+
padding: string;
|
|
77
|
+
margin: string;
|
|
78
|
+
};
|
|
79
|
+
'clip-path': {
|
|
80
|
+
content: string;
|
|
81
|
+
border: string;
|
|
82
|
+
padding: string;
|
|
83
|
+
margin: string;
|
|
84
|
+
fill: string;
|
|
85
|
+
stroke: string;
|
|
86
|
+
view: string;
|
|
87
|
+
black: string;
|
|
88
|
+
};
|
|
89
|
+
current: string;
|
|
90
|
+
text: {
|
|
91
|
+
strong: {
|
|
92
|
+
'@light': string;
|
|
93
|
+
'@dark': string;
|
|
94
|
+
};
|
|
95
|
+
neutral: {
|
|
96
|
+
'@light': string;
|
|
97
|
+
'@dark': string;
|
|
98
|
+
};
|
|
99
|
+
lightest: {
|
|
100
|
+
'@light': string;
|
|
101
|
+
'@dark': string;
|
|
102
|
+
};
|
|
103
|
+
lighter: {
|
|
104
|
+
'@light': string;
|
|
105
|
+
'@dark': string;
|
|
106
|
+
};
|
|
107
|
+
light: {
|
|
108
|
+
'@light': string;
|
|
109
|
+
'@dark': string;
|
|
110
|
+
};
|
|
111
|
+
gray: {
|
|
112
|
+
'@light': string;
|
|
113
|
+
'@dark': string;
|
|
114
|
+
};
|
|
115
|
+
slate: {
|
|
116
|
+
'@light': string;
|
|
117
|
+
'@dark': string;
|
|
118
|
+
};
|
|
119
|
+
brown: {
|
|
120
|
+
'@light': string;
|
|
121
|
+
'@dark': string;
|
|
122
|
+
};
|
|
123
|
+
orange: {
|
|
124
|
+
'@light': string;
|
|
125
|
+
'@dark': string;
|
|
126
|
+
};
|
|
127
|
+
amber: {
|
|
128
|
+
'@light': string;
|
|
129
|
+
'@dark': string;
|
|
130
|
+
};
|
|
131
|
+
yellow: {
|
|
132
|
+
'@light': string;
|
|
133
|
+
'@dark': string;
|
|
134
|
+
};
|
|
135
|
+
lime: {
|
|
136
|
+
'@light': string;
|
|
137
|
+
'@dark': string;
|
|
138
|
+
};
|
|
139
|
+
green: {
|
|
140
|
+
'@light': string;
|
|
141
|
+
'@dark': string;
|
|
142
|
+
};
|
|
143
|
+
beryl: {
|
|
144
|
+
'@light': string;
|
|
145
|
+
'@dark': string;
|
|
146
|
+
};
|
|
147
|
+
teal: {
|
|
148
|
+
'@light': string;
|
|
149
|
+
'@dark': string;
|
|
150
|
+
};
|
|
151
|
+
cyan: {
|
|
152
|
+
'@light': string;
|
|
153
|
+
'@dark': string;
|
|
154
|
+
};
|
|
155
|
+
sky: {
|
|
156
|
+
'@light': string;
|
|
157
|
+
'@dark': string;
|
|
158
|
+
};
|
|
159
|
+
blue: {
|
|
160
|
+
'@light': string;
|
|
161
|
+
'@dark': string;
|
|
162
|
+
};
|
|
163
|
+
indigo: {
|
|
164
|
+
'@light': string;
|
|
165
|
+
'@dark': string;
|
|
166
|
+
};
|
|
167
|
+
violet: {
|
|
168
|
+
'@light': string;
|
|
169
|
+
'@dark': string;
|
|
170
|
+
};
|
|
171
|
+
purple: {
|
|
172
|
+
'@light': string;
|
|
173
|
+
'@dark': string;
|
|
174
|
+
};
|
|
175
|
+
fuchsia: {
|
|
176
|
+
'@light': string;
|
|
177
|
+
'@dark': string;
|
|
178
|
+
};
|
|
179
|
+
pink: {
|
|
180
|
+
'@light': string;
|
|
181
|
+
'@dark': string;
|
|
182
|
+
};
|
|
183
|
+
crimson: {
|
|
184
|
+
'@light': string;
|
|
185
|
+
'@dark': string;
|
|
186
|
+
};
|
|
187
|
+
red: {
|
|
188
|
+
'@light': string;
|
|
189
|
+
'@dark': string;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
base: {
|
|
193
|
+
'@light': string;
|
|
194
|
+
'@dark': string;
|
|
195
|
+
};
|
|
196
|
+
canvas: {
|
|
197
|
+
'@light': string;
|
|
198
|
+
'@dark': string;
|
|
199
|
+
};
|
|
200
|
+
surface: {
|
|
201
|
+
'@light': string;
|
|
202
|
+
'@dark': string;
|
|
203
|
+
};
|
|
204
|
+
white: string;
|
|
205
|
+
black: string;
|
|
206
|
+
frame: {
|
|
207
|
+
'@light': string;
|
|
208
|
+
'@dark': string;
|
|
209
|
+
};
|
|
210
|
+
gray: {
|
|
211
|
+
'5': string;
|
|
212
|
+
'10': string;
|
|
213
|
+
'20': string;
|
|
214
|
+
'30': string;
|
|
215
|
+
'40': string;
|
|
216
|
+
'50': string;
|
|
217
|
+
'60': string;
|
|
218
|
+
'70': string;
|
|
219
|
+
'80': string;
|
|
220
|
+
'90': string;
|
|
221
|
+
'95': string;
|
|
222
|
+
'': {
|
|
223
|
+
'@light': string;
|
|
224
|
+
'@dark': string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
slate: {
|
|
228
|
+
'5': string;
|
|
229
|
+
'10': string;
|
|
230
|
+
'20': string;
|
|
231
|
+
'30': string;
|
|
232
|
+
'40': string;
|
|
233
|
+
'50': string;
|
|
234
|
+
'60': string;
|
|
235
|
+
'70': string;
|
|
236
|
+
'80': string;
|
|
237
|
+
'90': string;
|
|
238
|
+
'95': string;
|
|
239
|
+
'': {
|
|
240
|
+
'@light': string;
|
|
241
|
+
'@dark': string;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
brown: {
|
|
245
|
+
'5': string;
|
|
246
|
+
'10': string;
|
|
247
|
+
'20': string;
|
|
248
|
+
'30': string;
|
|
249
|
+
'40': string;
|
|
250
|
+
'50': string;
|
|
251
|
+
'60': string;
|
|
252
|
+
'70': string;
|
|
253
|
+
'80': string;
|
|
254
|
+
'90': string;
|
|
255
|
+
'95': string;
|
|
256
|
+
'': {
|
|
257
|
+
'@light': string;
|
|
258
|
+
'@dark': string;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
orange: {
|
|
262
|
+
'5': string;
|
|
263
|
+
'10': string;
|
|
264
|
+
'20': string;
|
|
265
|
+
'30': string;
|
|
266
|
+
'40': string;
|
|
267
|
+
'50': string;
|
|
268
|
+
'60': string;
|
|
269
|
+
'70': string;
|
|
270
|
+
'80': string;
|
|
271
|
+
'90': string;
|
|
272
|
+
'95': string;
|
|
273
|
+
'': {
|
|
274
|
+
'@light': string;
|
|
275
|
+
'@dark': string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
amber: {
|
|
279
|
+
'5': string;
|
|
280
|
+
'10': string;
|
|
281
|
+
'20': string;
|
|
282
|
+
'30': string;
|
|
283
|
+
'40': string;
|
|
284
|
+
'50': string;
|
|
285
|
+
'60': string;
|
|
286
|
+
'70': string;
|
|
287
|
+
'80': string;
|
|
288
|
+
'90': string;
|
|
289
|
+
'95': string;
|
|
290
|
+
'': {
|
|
291
|
+
'@light': string;
|
|
292
|
+
'@dark': string;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
yellow: {
|
|
296
|
+
'5': string;
|
|
297
|
+
'10': string;
|
|
298
|
+
'20': string;
|
|
299
|
+
'30': string;
|
|
300
|
+
'40': string;
|
|
301
|
+
'50': string;
|
|
302
|
+
'60': string;
|
|
303
|
+
'70': string;
|
|
304
|
+
'80': string;
|
|
305
|
+
'90': string;
|
|
306
|
+
'95': string;
|
|
307
|
+
'': {
|
|
308
|
+
'@light': string;
|
|
309
|
+
'@dark': string;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
lime: {
|
|
313
|
+
'5': string;
|
|
314
|
+
'10': string;
|
|
315
|
+
'20': string;
|
|
316
|
+
'30': string;
|
|
317
|
+
'40': string;
|
|
318
|
+
'50': string;
|
|
319
|
+
'60': string;
|
|
320
|
+
'70': string;
|
|
321
|
+
'80': string;
|
|
322
|
+
'90': string;
|
|
323
|
+
'95': string;
|
|
324
|
+
'': {
|
|
325
|
+
'@light': string;
|
|
326
|
+
'@dark': string;
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
green: {
|
|
330
|
+
'5': string;
|
|
331
|
+
'10': string;
|
|
332
|
+
'20': string;
|
|
333
|
+
'30': string;
|
|
334
|
+
'40': string;
|
|
335
|
+
'50': string;
|
|
336
|
+
'60': string;
|
|
337
|
+
'70': string;
|
|
338
|
+
'80': string;
|
|
339
|
+
'90': string;
|
|
340
|
+
'95': string;
|
|
341
|
+
'': {
|
|
342
|
+
'@light': string;
|
|
343
|
+
'@dark': string;
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
beryl: {
|
|
347
|
+
'5': string;
|
|
348
|
+
'10': string;
|
|
349
|
+
'20': string;
|
|
350
|
+
'30': string;
|
|
351
|
+
'40': string;
|
|
352
|
+
'50': string;
|
|
353
|
+
'60': string;
|
|
354
|
+
'70': string;
|
|
355
|
+
'80': string;
|
|
356
|
+
'90': string;
|
|
357
|
+
'95': string;
|
|
358
|
+
'': {
|
|
359
|
+
'@light': string;
|
|
360
|
+
'@dark': string;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
teal: {
|
|
364
|
+
'5': string;
|
|
365
|
+
'10': string;
|
|
366
|
+
'20': string;
|
|
367
|
+
'30': string;
|
|
368
|
+
'40': string;
|
|
369
|
+
'50': string;
|
|
370
|
+
'60': string;
|
|
371
|
+
'70': string;
|
|
372
|
+
'80': string;
|
|
373
|
+
'90': string;
|
|
374
|
+
'95': string;
|
|
375
|
+
'': {
|
|
376
|
+
'@light': string;
|
|
377
|
+
'@dark': string;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
cyan: {
|
|
381
|
+
'5': string;
|
|
382
|
+
'10': string;
|
|
383
|
+
'20': string;
|
|
384
|
+
'30': string;
|
|
385
|
+
'40': string;
|
|
386
|
+
'50': string;
|
|
387
|
+
'60': string;
|
|
388
|
+
'70': string;
|
|
389
|
+
'80': string;
|
|
390
|
+
'90': string;
|
|
391
|
+
'95': string;
|
|
392
|
+
'': {
|
|
393
|
+
'@light': string;
|
|
394
|
+
'@dark': string;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
sky: {
|
|
398
|
+
'5': string;
|
|
399
|
+
'10': string;
|
|
400
|
+
'20': string;
|
|
401
|
+
'30': string;
|
|
402
|
+
'40': string;
|
|
403
|
+
'50': string;
|
|
404
|
+
'60': string;
|
|
405
|
+
'70': string;
|
|
406
|
+
'80': string;
|
|
407
|
+
'90': string;
|
|
408
|
+
'95': string;
|
|
409
|
+
'': {
|
|
410
|
+
'@light': string;
|
|
411
|
+
'@dark': string;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
blue: {
|
|
415
|
+
'5': string;
|
|
416
|
+
'10': string;
|
|
417
|
+
'20': string;
|
|
418
|
+
'30': string;
|
|
419
|
+
'40': string;
|
|
420
|
+
'50': string;
|
|
421
|
+
'60': string;
|
|
422
|
+
'70': string;
|
|
423
|
+
'80': string;
|
|
424
|
+
'90': string;
|
|
425
|
+
'95': string;
|
|
426
|
+
'': {
|
|
427
|
+
'@light': string;
|
|
428
|
+
'@dark': string;
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
indigo: {
|
|
432
|
+
'5': string;
|
|
433
|
+
'10': string;
|
|
434
|
+
'20': string;
|
|
435
|
+
'30': string;
|
|
436
|
+
'40': string;
|
|
437
|
+
'50': string;
|
|
438
|
+
'60': string;
|
|
439
|
+
'70': string;
|
|
440
|
+
'80': string;
|
|
441
|
+
'90': string;
|
|
442
|
+
'95': string;
|
|
443
|
+
'': {
|
|
444
|
+
'@light': string;
|
|
445
|
+
'@dark': string;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
violet: {
|
|
449
|
+
'5': string;
|
|
450
|
+
'10': string;
|
|
451
|
+
'20': string;
|
|
452
|
+
'30': string;
|
|
453
|
+
'40': string;
|
|
454
|
+
'50': string;
|
|
455
|
+
'60': string;
|
|
456
|
+
'70': string;
|
|
457
|
+
'80': string;
|
|
458
|
+
'90': string;
|
|
459
|
+
'95': string;
|
|
460
|
+
'': {
|
|
461
|
+
'@light': string;
|
|
462
|
+
'@dark': string;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
purple: {
|
|
466
|
+
'5': string;
|
|
467
|
+
'10': string;
|
|
468
|
+
'20': string;
|
|
469
|
+
'30': string;
|
|
470
|
+
'40': string;
|
|
471
|
+
'50': string;
|
|
472
|
+
'60': string;
|
|
473
|
+
'70': string;
|
|
474
|
+
'80': string;
|
|
475
|
+
'90': string;
|
|
476
|
+
'95': string;
|
|
477
|
+
'': {
|
|
478
|
+
'@light': string;
|
|
479
|
+
'@dark': string;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
fuchsia: {
|
|
483
|
+
'5': string;
|
|
484
|
+
'10': string;
|
|
485
|
+
'20': string;
|
|
486
|
+
'30': string;
|
|
487
|
+
'40': string;
|
|
488
|
+
'50': string;
|
|
489
|
+
'60': string;
|
|
490
|
+
'70': string;
|
|
491
|
+
'80': string;
|
|
492
|
+
'90': string;
|
|
493
|
+
'95': string;
|
|
494
|
+
'': {
|
|
495
|
+
'@light': string;
|
|
496
|
+
'@dark': string;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
pink: {
|
|
500
|
+
'5': string;
|
|
501
|
+
'10': string;
|
|
502
|
+
'20': string;
|
|
503
|
+
'30': string;
|
|
504
|
+
'40': string;
|
|
505
|
+
'50': string;
|
|
506
|
+
'60': string;
|
|
507
|
+
'70': string;
|
|
508
|
+
'80': string;
|
|
509
|
+
'90': string;
|
|
510
|
+
'95': string;
|
|
511
|
+
'': {
|
|
512
|
+
'@light': string;
|
|
513
|
+
'@dark': string;
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
crimson: {
|
|
517
|
+
'5': string;
|
|
518
|
+
'10': string;
|
|
519
|
+
'20': string;
|
|
520
|
+
'30': string;
|
|
521
|
+
'40': string;
|
|
522
|
+
'50': string;
|
|
523
|
+
'60': string;
|
|
524
|
+
'70': string;
|
|
525
|
+
'80': string;
|
|
526
|
+
'90': string;
|
|
527
|
+
'95': string;
|
|
528
|
+
'': {
|
|
529
|
+
'@light': string;
|
|
530
|
+
'@dark': string;
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
red: {
|
|
534
|
+
'5': string;
|
|
535
|
+
'10': string;
|
|
536
|
+
'20': string;
|
|
537
|
+
'30': string;
|
|
538
|
+
'40': string;
|
|
539
|
+
'50': string;
|
|
540
|
+
'60': string;
|
|
541
|
+
'70': string;
|
|
542
|
+
'80': string;
|
|
543
|
+
'90': string;
|
|
544
|
+
'95': string;
|
|
545
|
+
'': {
|
|
546
|
+
'@light': string;
|
|
547
|
+
'@dark': string;
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
export default variables;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BASE_UNIT_REGEX: RegExp;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CONFIG_ESM_TEXT = "/** @type {import('@master/css').Config} */\nexport default {\n styles: {},\n rules: {},\n variables: {},\n semantics: {},\n mediaQueries: {},\n animations: {},\n selectors: {},\n functions: {}\n}\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CONFIG_TEXT = "/** @type {import('@master/css').Config} */\nmodule.exports = {\n styles: {},\n rules: {},\n variables: {},\n semantics: {},\n mediaQueries: {},\n animations: {},\n selectors: {},\n functions: {}\n}\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CONFIG_TS_TEXT = "import type { Config } from '@master/css'\n\nexport default {\n styles: {},\n rules: {},\n variables: {},\n semantics: {},\n mediaQueries: {},\n animations: {},\n selectors: {},\n functions: {}\n} as Config\n";
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Rule, NativeRule, RegisteredRule } from './rule';
|
|
2
|
+
import type { Config, AnimationDefinitions } from './config';
|
|
3
|
+
import './types/global';
|
|
4
|
+
type VariableValue = {
|
|
5
|
+
type: 'string';
|
|
6
|
+
value: string;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'number';
|
|
9
|
+
value: number;
|
|
10
|
+
} | {
|
|
11
|
+
type: 'color';
|
|
12
|
+
value: string;
|
|
13
|
+
space: 'rgb' | 'hsl';
|
|
14
|
+
};
|
|
15
|
+
export type Variable = Omit<VariableValue, 'value' | 'space'> & {
|
|
16
|
+
value?: any;
|
|
17
|
+
space?: any;
|
|
18
|
+
usage?: number;
|
|
19
|
+
themes?: {
|
|
20
|
+
[theme: string]: VariableValue;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export interface MasterCSS {
|
|
24
|
+
readonly style: HTMLStyleElement;
|
|
25
|
+
styles: Record<string, string[]>;
|
|
26
|
+
stylesBy: Record<string, string[]>;
|
|
27
|
+
selectors: Record<string, [RegExp, string[]][]>;
|
|
28
|
+
variables: Record<string, Variable>;
|
|
29
|
+
mediaQueries: Record<string, string | number>;
|
|
30
|
+
variablesNativeRules: Record<string, NativeRule>;
|
|
31
|
+
hasKeyframesRule: boolean;
|
|
32
|
+
animations: Record<string, AnimationDefinitions & {
|
|
33
|
+
usage?: number;
|
|
34
|
+
native?: NativeRule;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
export declare class MasterCSS {
|
|
38
|
+
customConfig: Config;
|
|
39
|
+
static config: Config;
|
|
40
|
+
readonly rules: Rule[];
|
|
41
|
+
readonly ruleBy: Record<string, Rule>;
|
|
42
|
+
readonly classesUsage: Record<string, number>;
|
|
43
|
+
readonly config: Config;
|
|
44
|
+
readonly RegisteredSemanticRules: RegisteredRule[];
|
|
45
|
+
readonly RegisteredRules: RegisteredRule[];
|
|
46
|
+
constructor(customConfig?: Config);
|
|
47
|
+
resolve(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Match check if Master CSS syntax
|
|
50
|
+
* @param className
|
|
51
|
+
* @returns css text
|
|
52
|
+
*/
|
|
53
|
+
match(className: string): RegisteredRule | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Generate rules from class name
|
|
56
|
+
* @param className
|
|
57
|
+
* @returns Rule[]
|
|
58
|
+
*/
|
|
59
|
+
generate(className: string): Rule[];
|
|
60
|
+
/**
|
|
61
|
+
* Create rule from given syntax
|
|
62
|
+
* @param syntax
|
|
63
|
+
* @returns Rule
|
|
64
|
+
*/
|
|
65
|
+
create(syntax: string): Rule | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* 根據蒐集到的所有 DOM class 重新 create
|
|
68
|
+
*/
|
|
69
|
+
refresh(customConfig?: Config): this;
|
|
70
|
+
reset(): this;
|
|
71
|
+
destroy(): this;
|
|
72
|
+
add(...classNames: string[]): this;
|
|
73
|
+
delete(...classNames: string[]): void;
|
|
74
|
+
/**
|
|
75
|
+
* 加工插入規則
|
|
76
|
+
* 1. where
|
|
77
|
+
* 2. normal
|
|
78
|
+
* 3. where selectors
|
|
79
|
+
* 4. normal selectors
|
|
80
|
+
* 5. media where
|
|
81
|
+
* 6. media normal
|
|
82
|
+
* 7. media where selectors
|
|
83
|
+
* 8. media selectors
|
|
84
|
+
* 9. media width where
|
|
85
|
+
* 10. media width
|
|
86
|
+
* 11. media width where selectors
|
|
87
|
+
* 12. media width selectors
|
|
88
|
+
*/
|
|
89
|
+
insert(rule: Rule): void;
|
|
90
|
+
get text(): string;
|
|
91
|
+
handleRuleWithAnimationNames(rule: Rule, initializing?: boolean): void;
|
|
92
|
+
handleRuleWithVariableNames(rule: Rule, initializing?: boolean): void;
|
|
93
|
+
pushVariableNativeRule(theme: string, variableCSSRule: CSSStyleRule): NativeRule;
|
|
94
|
+
}
|
|
95
|
+
export declare const masterCSSs: MasterCSS[];
|
|
96
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Config } from '../config';
|
|
2
|
+
import { MasterCSS } from '../core';
|
|
3
|
+
/**
|
|
4
|
+
* Sorts classes in a consistent order
|
|
5
|
+
* @param classes
|
|
6
|
+
* @param options
|
|
7
|
+
* @returns consistent classes
|
|
8
|
+
*/
|
|
9
|
+
export default function reorderForReadableClasses(classes: string[], options?: {
|
|
10
|
+
css?: MasterCSS;
|
|
11
|
+
config?: Config;
|
|
12
|
+
}): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function transformColorWithOpacity(color: string, opacityStr: string): string;
|