@master/css 2.0.0-beta.16 → 2.0.0-beta.161

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 (253) hide show
  1. package/README.md +113 -109
  2. package/dist/bin/index.bundle.js +45 -0
  3. package/dist/bin/index.d.ts +2 -0
  4. package/dist/config/breakpoints.d.ts +1 -2
  5. package/dist/config/colors.d.ts +3 -4
  6. package/dist/config/functions.d.ts +7 -0
  7. package/dist/config/important.d.ts +1 -0
  8. package/dist/config/index.d.ts +58 -25
  9. package/dist/config/keyframes.d.ts +109 -0
  10. package/dist/config/override.d.ts +1 -0
  11. package/dist/config/root-size.d.ts +1 -2
  12. package/dist/config/rules.d.ts +267 -3
  13. package/dist/config/scope.d.ts +1 -0
  14. package/dist/config/selectors.d.ts +1 -2
  15. package/dist/config/semantics.d.ts +147 -43
  16. package/dist/config/themeDriver.d.ts +1 -0
  17. package/dist/constants/config-esm-text.d.ts +1 -0
  18. package/dist/constants/config-text.d.ts +1 -0
  19. package/dist/constants/config-ts-text.d.ts +1 -0
  20. package/dist/constants/selector-symbols.d.ts +1 -0
  21. package/dist/constants/start-symbol.d.ts +2 -1
  22. package/dist/core.d.ts +92 -0
  23. package/dist/functions/extract-classes-from-html.d.ts +5 -0
  24. package/dist/functions/generate-from-classes.d.ts +8 -0
  25. package/dist/functions/generate-from-html.d.ts +8 -0
  26. package/dist/functions/init-runtime.d.ts +9 -0
  27. package/dist/functions/render-html.d.ts +8 -0
  28. package/dist/index.browser.bundle.js +1 -0
  29. package/dist/index.browser.d.ts +6 -1
  30. package/dist/index.bundle.js +44 -0
  31. package/dist/index.bundle.mjs +44 -0
  32. package/dist/index.d.ts +13 -21
  33. package/dist/polyfills/css-escape.d.ts +0 -1
  34. package/dist/rule.d.ts +59 -46
  35. package/dist/utils/is-plain-object.d.ts +1 -1
  36. package/dist/utils/parse-rule-value.d.ts +5 -0
  37. package/package.json +1 -162
  38. package/LICENSE +0 -21
  39. package/dist/apis/extend.d.ts +0 -5
  40. package/dist/apis/render-from-html.d.ts +0 -3
  41. package/dist/apis/render-into-html.d.ts +0 -3
  42. package/dist/apis/render.d.ts +0 -3
  43. package/dist/config/scheme.d.ts +0 -7
  44. package/dist/config/themes.d.ts +0 -2
  45. package/dist/config/values.d.ts +0 -126
  46. package/dist/css.d.ts +0 -81
  47. package/dist/index.browser.js +0 -2
  48. package/dist/index.browser.js.map +0 -7
  49. package/dist/index.cjs +0 -2
  50. package/dist/index.cjs.map +0 -7
  51. package/dist/index.mjs +0 -2
  52. package/dist/index.mjs.map +0 -7
  53. package/dist/rules/accent-color.d.ts +0 -7
  54. package/dist/rules/align-content.d.ts +0 -6
  55. package/dist/rules/align-items.d.ts +0 -6
  56. package/dist/rules/align-self.d.ts +0 -6
  57. package/dist/rules/animation-delay.d.ts +0 -7
  58. package/dist/rules/animation-direction.d.ts +0 -6
  59. package/dist/rules/animation-duration.d.ts +0 -7
  60. package/dist/rules/animation-fill-mode.d.ts +0 -6
  61. package/dist/rules/animation-iteration-count.d.ts +0 -7
  62. package/dist/rules/animation-name.d.ts +0 -6
  63. package/dist/rules/animation-play-state.d.ts +0 -6
  64. package/dist/rules/animation-timing-function.d.ts +0 -6
  65. package/dist/rules/animation.d.ts +0 -8
  66. package/dist/rules/appearance.d.ts +0 -5
  67. package/dist/rules/aspect-radio.d.ts +0 -7
  68. package/dist/rules/backdrop-filter.d.ts +0 -11
  69. package/dist/rules/background-attachment.d.ts +0 -6
  70. package/dist/rules/background-blend-mode.d.ts +0 -5
  71. package/dist/rules/background-clip.d.ts +0 -9
  72. package/dist/rules/background-color.d.ts +0 -8
  73. package/dist/rules/background-image.d.ts +0 -7
  74. package/dist/rules/background-origin.d.ts +0 -6
  75. package/dist/rules/background-position.d.ts +0 -7
  76. package/dist/rules/background-repeat.d.ts +0 -6
  77. package/dist/rules/background-size.d.ts +0 -6
  78. package/dist/rules/background.d.ts +0 -8
  79. package/dist/rules/border-collapse.d.ts +0 -6
  80. package/dist/rules/border-color.d.ts +0 -11
  81. package/dist/rules/border-image-outset.d.ts +0 -5
  82. package/dist/rules/border-image-repeat.d.ts +0 -6
  83. package/dist/rules/border-image-slice.d.ts +0 -6
  84. package/dist/rules/border-image-source.d.ts +0 -6
  85. package/dist/rules/border-image-width.d.ts +0 -6
  86. package/dist/rules/border-image.d.ts +0 -6
  87. package/dist/rules/border-radius.d.ts +0 -9
  88. package/dist/rules/border-spacing.d.ts +0 -5
  89. package/dist/rules/border-style.d.ts +0 -9
  90. package/dist/rules/border-width.d.ts +0 -9
  91. package/dist/rules/border.d.ts +0 -10
  92. package/dist/rules/box-decoration-break.d.ts +0 -9
  93. package/dist/rules/box-shadow.d.ts +0 -7
  94. package/dist/rules/box-sizing.d.ts +0 -6
  95. package/dist/rules/break-after.d.ts +0 -5
  96. package/dist/rules/break-before.d.ts +0 -5
  97. package/dist/rules/break-inside.d.ts +0 -5
  98. package/dist/rules/caret-color.d.ts +0 -7
  99. package/dist/rules/clear.d.ts +0 -5
  100. package/dist/rules/clip-path.d.ts +0 -6
  101. package/dist/rules/color.d.ts +0 -8
  102. package/dist/rules/column-span.d.ts +0 -6
  103. package/dist/rules/columns.d.ts +0 -8
  104. package/dist/rules/contain.d.ts +0 -5
  105. package/dist/rules/content.d.ts +0 -5
  106. package/dist/rules/counter-increment.d.ts +0 -6
  107. package/dist/rules/cursor.d.ts +0 -5
  108. package/dist/rules/cx.d.ts +0 -6
  109. package/dist/rules/cy.d.ts +0 -6
  110. package/dist/rules/direction.d.ts +0 -5
  111. package/dist/rules/display.d.ts +0 -6
  112. package/dist/rules/fill.d.ts +0 -7
  113. package/dist/rules/filter.d.ts +0 -8
  114. package/dist/rules/flex-basis.d.ts +0 -5
  115. package/dist/rules/flex-direction.d.ts +0 -6
  116. package/dist/rules/flex-grow.d.ts +0 -6
  117. package/dist/rules/flex-shrink.d.ts +0 -6
  118. package/dist/rules/flex-wrap.d.ts +0 -6
  119. package/dist/rules/flex.d.ts +0 -7
  120. package/dist/rules/float.d.ts +0 -5
  121. package/dist/rules/font-family.d.ts +0 -6
  122. package/dist/rules/font-size.d.ts +0 -6
  123. package/dist/rules/font-smoothing.d.ts +0 -9
  124. package/dist/rules/font-style.d.ts +0 -7
  125. package/dist/rules/font-variant-numeric.d.ts +0 -6
  126. package/dist/rules/font-weight.d.ts +0 -7
  127. package/dist/rules/font.d.ts +0 -8
  128. package/dist/rules/gap.d.ts +0 -9
  129. package/dist/rules/grid-area.d.ts +0 -7
  130. package/dist/rules/grid-auto-columns.d.ts +0 -6
  131. package/dist/rules/grid-auto-flow.d.ts +0 -6
  132. package/dist/rules/grid-auto-rows.d.ts +0 -5
  133. package/dist/rules/grid-column-end.d.ts +0 -7
  134. package/dist/rules/grid-column-start.d.ts +0 -7
  135. package/dist/rules/grid-column.d.ts +0 -9
  136. package/dist/rules/grid-columns.d.ts +0 -10
  137. package/dist/rules/grid-row-end.d.ts +0 -6
  138. package/dist/rules/grid-row-start.d.ts +0 -6
  139. package/dist/rules/grid-row.d.ts +0 -9
  140. package/dist/rules/grid-rows.d.ts +0 -9
  141. package/dist/rules/grid-template-areas.d.ts +0 -5
  142. package/dist/rules/grid-template-columns.d.ts +0 -6
  143. package/dist/rules/grid-template-rows.d.ts +0 -5
  144. package/dist/rules/grid-template.d.ts +0 -6
  145. package/dist/rules/grid.d.ts +0 -6
  146. package/dist/rules/group.d.ts +0 -9
  147. package/dist/rules/height.d.ts +0 -6
  148. package/dist/rules/inset.d.ts +0 -9
  149. package/dist/rules/isolation.d.ts +0 -5
  150. package/dist/rules/justify-content.d.ts +0 -6
  151. package/dist/rules/justify-items.d.ts +0 -6
  152. package/dist/rules/justify-self.d.ts +0 -6
  153. package/dist/rules/letter-spacing.d.ts +0 -7
  154. package/dist/rules/line-clamp.d.ts +0 -9
  155. package/dist/rules/line-height.d.ts +0 -7
  156. package/dist/rules/lines.d.ts +0 -9
  157. package/dist/rules/list-style-image.d.ts +0 -6
  158. package/dist/rules/list-style-position.d.ts +0 -6
  159. package/dist/rules/list-style-type.d.ts +0 -6
  160. package/dist/rules/list-style.d.ts +0 -6
  161. package/dist/rules/margin.d.ts +0 -9
  162. package/dist/rules/mask-image.d.ts +0 -8
  163. package/dist/rules/max-height.d.ts +0 -6
  164. package/dist/rules/max-width.d.ts +0 -6
  165. package/dist/rules/min-height.d.ts +0 -6
  166. package/dist/rules/min-width.d.ts +0 -6
  167. package/dist/rules/mix-blend-mode.d.ts +0 -6
  168. package/dist/rules/object-fit.d.ts +0 -6
  169. package/dist/rules/object-position.d.ts +0 -6
  170. package/dist/rules/opacity.d.ts +0 -6
  171. package/dist/rules/order.d.ts +0 -7
  172. package/dist/rules/outline-color.d.ts +0 -7
  173. package/dist/rules/outline-offset.d.ts +0 -5
  174. package/dist/rules/outline-style.d.ts +0 -6
  175. package/dist/rules/outline-width.d.ts +0 -6
  176. package/dist/rules/outline.d.ts +0 -7
  177. package/dist/rules/overflow.d.ts +0 -9
  178. package/dist/rules/overscroll-behavior.d.ts +0 -8
  179. package/dist/rules/padding.d.ts +0 -9
  180. package/dist/rules/place-content.d.ts +0 -6
  181. package/dist/rules/place-items.d.ts +0 -6
  182. package/dist/rules/place-self.d.ts +0 -6
  183. package/dist/rules/placement.d.ts +0 -8
  184. package/dist/rules/pointer-events.d.ts +0 -5
  185. package/dist/rules/position.d.ts +0 -5
  186. package/dist/rules/quotes.d.ts +0 -5
  187. package/dist/rules/resize.d.ts +0 -5
  188. package/dist/rules/rx.d.ts +0 -6
  189. package/dist/rules/ry.d.ts +0 -6
  190. package/dist/rules/scroll-behavior.d.ts +0 -5
  191. package/dist/rules/scroll-margin.d.ts +0 -9
  192. package/dist/rules/scroll-padding.d.ts +0 -9
  193. package/dist/rules/scroll-snap-align.d.ts +0 -6
  194. package/dist/rules/scroll-snap-stop.d.ts +0 -6
  195. package/dist/rules/scroll-snap-type.d.ts +0 -6
  196. package/dist/rules/shape-image-threshold.d.ts +0 -6
  197. package/dist/rules/shape-margin.d.ts +0 -6
  198. package/dist/rules/shape-outside.d.ts +0 -6
  199. package/dist/rules/spacing.d.ts +0 -9
  200. package/dist/rules/stroke-dasharray.d.ts +0 -5
  201. package/dist/rules/stroke-dashoffset.d.ts +0 -5
  202. package/dist/rules/stroke-width.d.ts +0 -6
  203. package/dist/rules/stroke.d.ts +0 -6
  204. package/dist/rules/table-layout.d.ts +0 -5
  205. package/dist/rules/text-align.d.ts +0 -6
  206. package/dist/rules/text-decoration-color.d.ts +0 -7
  207. package/dist/rules/text-decoration-line.d.ts +0 -6
  208. package/dist/rules/text-decoration-style.d.ts +0 -6
  209. package/dist/rules/text-decoration-thickness.d.ts +0 -7
  210. package/dist/rules/text-decoration.d.ts +0 -8
  211. package/dist/rules/text-fill-color.d.ts +0 -10
  212. package/dist/rules/text-indent.d.ts +0 -5
  213. package/dist/rules/text-orientation.d.ts +0 -6
  214. package/dist/rules/text-overflow.d.ts +0 -6
  215. package/dist/rules/text-rendering.d.ts +0 -6
  216. package/dist/rules/text-shadow.d.ts +0 -6
  217. package/dist/rules/text-size.d.ts +0 -8
  218. package/dist/rules/text-stroke-color.d.ts +0 -10
  219. package/dist/rules/text-stroke-width.d.ts +0 -8
  220. package/dist/rules/text-stroke.d.ts +0 -8
  221. package/dist/rules/text-transform.d.ts +0 -6
  222. package/dist/rules/text-underline-offset.d.ts +0 -5
  223. package/dist/rules/touch-action.d.ts +0 -5
  224. package/dist/rules/transform-box.d.ts +0 -6
  225. package/dist/rules/transform-origin.d.ts +0 -7
  226. package/dist/rules/transform-style.d.ts +0 -6
  227. package/dist/rules/transform.d.ts +0 -9
  228. package/dist/rules/transition-delay.d.ts +0 -7
  229. package/dist/rules/transition-duration.d.ts +0 -7
  230. package/dist/rules/transition-property.d.ts +0 -6
  231. package/dist/rules/transition-timing-function.d.ts +0 -6
  232. package/dist/rules/transition.d.ts +0 -7
  233. package/dist/rules/user-drag.d.ts +0 -8
  234. package/dist/rules/user-select.d.ts +0 -8
  235. package/dist/rules/variable.d.ts +0 -9
  236. package/dist/rules/vertical-align.d.ts +0 -6
  237. package/dist/rules/visibility.d.ts +0 -5
  238. package/dist/rules/white-space.d.ts +0 -6
  239. package/dist/rules/width.d.ts +0 -6
  240. package/dist/rules/will-change.d.ts +0 -5
  241. package/dist/rules/word-break.d.ts +0 -6
  242. package/dist/rules/word-spacing.d.ts +0 -6
  243. package/dist/rules/writing-mode.d.ts +0 -6
  244. package/dist/rules/x.d.ts +0 -6
  245. package/dist/rules/y.d.ts +0 -6
  246. package/dist/rules/z-index.d.ts +0 -7
  247. package/dist/utils/get-border-props.d.ts +0 -3
  248. package/dist/utils/get-css-property-text.d.ts +0 -5
  249. package/dist/utils/normalize-css-calc-text.d.ts +0 -5
  250. package/dist/utils/parse-value-unit.d.ts +0 -2
  251. package/dist/utils/parse-value.d.ts +0 -6
  252. package/readme.md +0 -118
  253. /package/dist/{apis → functions}/fill-color-scale.d.ts +0 -0
@@ -1,3 +1,267 @@
1
- import FontWeight from '../rules/font-weight';
2
- declare const DefaultRules: (typeof FontWeight)[];
3
- export default DefaultRules;
1
+ import { RuleConfig } from '../rule';
2
+ export declare const rules: {
3
+ flex: RuleConfig;
4
+ grid: RuleConfig;
5
+ group: RuleConfig;
6
+ variable: RuleConfig;
7
+ fontSize: RuleConfig;
8
+ fontWeight: RuleConfig;
9
+ fontFamily: RuleConfig;
10
+ fontSmoothing: RuleConfig;
11
+ fontStyle: RuleConfig;
12
+ fontVariantNumeric: RuleConfig;
13
+ fontFeatureSettings: RuleConfig;
14
+ font: RuleConfig;
15
+ color: RuleConfig;
16
+ marginLeft: RuleConfig;
17
+ marginRight: RuleConfig;
18
+ marginTop: RuleConfig;
19
+ marginBottom: RuleConfig;
20
+ marginX: RuleConfig;
21
+ marginY: RuleConfig;
22
+ margin: RuleConfig;
23
+ paddingLeft: RuleConfig;
24
+ paddingRight: RuleConfig;
25
+ paddingTop: RuleConfig;
26
+ paddingBottom: RuleConfig;
27
+ paddingX: RuleConfig;
28
+ paddingY: RuleConfig;
29
+ padding: RuleConfig;
30
+ flexBasis: RuleConfig;
31
+ flexWrap: RuleConfig;
32
+ flexGrow: RuleConfig;
33
+ flexShrink: RuleConfig;
34
+ flexDirection: RuleConfig;
35
+ display: RuleConfig;
36
+ width: RuleConfig;
37
+ height: RuleConfig;
38
+ minWidth: RuleConfig;
39
+ minHeight: RuleConfig;
40
+ box: RuleConfig;
41
+ minBox: RuleConfig;
42
+ maxBox: RuleConfig;
43
+ contain: RuleConfig;
44
+ content: RuleConfig;
45
+ counterIncrement: RuleConfig;
46
+ counterReset: RuleConfig;
47
+ letterSpacing: RuleConfig;
48
+ lineHeight: RuleConfig;
49
+ objectFit: RuleConfig;
50
+ objectPosition: RuleConfig;
51
+ textAlign: RuleConfig;
52
+ textDecorationColor: RuleConfig;
53
+ textDecorationStyle: RuleConfig;
54
+ textDecorationThickness: RuleConfig;
55
+ textDecorationLine: RuleConfig;
56
+ textDecoration: RuleConfig;
57
+ textUnderlineOffset: RuleConfig;
58
+ textOverflow: RuleConfig;
59
+ textOrientation: RuleConfig;
60
+ textTransform: RuleConfig;
61
+ textRendering: RuleConfig;
62
+ textIndent: RuleConfig;
63
+ verticalAlign: RuleConfig;
64
+ columns: RuleConfig;
65
+ whiteSpace: RuleConfig;
66
+ top: RuleConfig;
67
+ bottom: RuleConfig;
68
+ left: RuleConfig;
69
+ right: RuleConfig;
70
+ inset: RuleConfig;
71
+ lines: RuleConfig;
72
+ maxHeight: RuleConfig;
73
+ maxWidth: RuleConfig;
74
+ boxSizing: RuleConfig;
75
+ opacity: RuleConfig;
76
+ visibility: RuleConfig;
77
+ clear: RuleConfig;
78
+ float: RuleConfig;
79
+ isolation: RuleConfig;
80
+ overflowX: RuleConfig;
81
+ overflowY: RuleConfig;
82
+ overflow: RuleConfig;
83
+ overscrollBehaviorX: RuleConfig;
84
+ overscrollBehaviorY: RuleConfig;
85
+ overscrollBehavior: RuleConfig;
86
+ zIndex: RuleConfig;
87
+ position: RuleConfig;
88
+ cursor: RuleConfig;
89
+ pointerEvents: RuleConfig;
90
+ resize: RuleConfig;
91
+ touchAction: RuleConfig;
92
+ wordBreak: RuleConfig;
93
+ wordSpacing: RuleConfig;
94
+ userDrag: RuleConfig;
95
+ userSelect: RuleConfig;
96
+ textShadow: RuleConfig;
97
+ textSize: RuleConfig;
98
+ textFillColor: RuleConfig;
99
+ textStrokeWidth: RuleConfig;
100
+ textStrokeColor: RuleConfig;
101
+ textStroke: RuleConfig;
102
+ boxShadow: RuleConfig;
103
+ tableLayout: RuleConfig;
104
+ transformBox: RuleConfig;
105
+ transformStyle: RuleConfig;
106
+ transformOrigin: RuleConfig;
107
+ transform: RuleConfig;
108
+ transitionProperty: RuleConfig;
109
+ transitionTimingFunction: RuleConfig;
110
+ transitionDuration: RuleConfig;
111
+ transitionDelay: RuleConfig;
112
+ transition: RuleConfig;
113
+ animationDelay: RuleConfig;
114
+ animationDirection: RuleConfig;
115
+ animationDuration: RuleConfig;
116
+ animationFillMode: RuleConfig;
117
+ animationIterationCount: RuleConfig;
118
+ animationName: RuleConfig;
119
+ animationPlayState: RuleConfig;
120
+ animationTimingFunction: RuleConfig;
121
+ animation: RuleConfig;
122
+ borderCollapse: RuleConfig;
123
+ borderSpacing: RuleConfig;
124
+ borderTopColor: RuleConfig;
125
+ borderBottomColor: RuleConfig;
126
+ borderLeftColor: RuleConfig;
127
+ borderRightColor: RuleConfig;
128
+ borderXColor: RuleConfig;
129
+ borderYColor: RuleConfig;
130
+ borderColor: RuleConfig;
131
+ borderTopLeftRadius: RuleConfig;
132
+ borderTopRightRadius: RuleConfig;
133
+ borderBottomLeftRadius: RuleConfig;
134
+ borderBottomRightRadius: RuleConfig;
135
+ borderTopRadius: RuleConfig;
136
+ borderBottomRadius: RuleConfig;
137
+ borderLeftRadius: RuleConfig;
138
+ borderRightRadius: RuleConfig;
139
+ borderRadius: RuleConfig;
140
+ borderTopStyle: RuleConfig;
141
+ borderBottomStyle: RuleConfig;
142
+ borderLeftStyle: RuleConfig;
143
+ borderRightStyle: RuleConfig;
144
+ borderXStyle: RuleConfig;
145
+ borderYStyle: RuleConfig;
146
+ borderStyle: RuleConfig;
147
+ borderTopWidth: RuleConfig;
148
+ borderBottomWidth: RuleConfig;
149
+ borderLeftWidth: RuleConfig;
150
+ borderRightWidth: RuleConfig;
151
+ borderXWidth: RuleConfig;
152
+ borderYWidth: RuleConfig;
153
+ borderWidth: RuleConfig;
154
+ borderImageOutset: RuleConfig;
155
+ borderImageRepeat: RuleConfig;
156
+ borderImageSlice: RuleConfig;
157
+ borderImageSource: RuleConfig;
158
+ borderImageWidth: RuleConfig;
159
+ borderImage: RuleConfig;
160
+ borderTop: RuleConfig;
161
+ borderBottom: RuleConfig;
162
+ borderLeft: RuleConfig;
163
+ borderRight: RuleConfig;
164
+ borderX: RuleConfig;
165
+ borderY: RuleConfig;
166
+ border: RuleConfig;
167
+ backgroundAttachment: RuleConfig;
168
+ backgroundBlendMode: RuleConfig;
169
+ backgroundColor: RuleConfig;
170
+ backgroundClip: RuleConfig;
171
+ backgroundOrigin: RuleConfig;
172
+ backgroundPosition: RuleConfig;
173
+ backgroundRepeat: RuleConfig;
174
+ backgroundSize: RuleConfig;
175
+ backgroundImage: RuleConfig;
176
+ background: RuleConfig;
177
+ mixBlendMode: RuleConfig;
178
+ backdropFilter: RuleConfig;
179
+ filter: RuleConfig;
180
+ fill: RuleConfig;
181
+ strokeDasharray: RuleConfig;
182
+ strokeDashoffset: RuleConfig;
183
+ strokeWidth: RuleConfig;
184
+ stroke: RuleConfig;
185
+ x: RuleConfig;
186
+ y: RuleConfig;
187
+ cx: RuleConfig;
188
+ cy: RuleConfig;
189
+ rx: RuleConfig;
190
+ ry: RuleConfig;
191
+ gridColumnStart: RuleConfig;
192
+ gridColumnEnd: RuleConfig;
193
+ gridColumn: RuleConfig;
194
+ gridColumns: RuleConfig;
195
+ gridRowStart: RuleConfig;
196
+ gridRowEnd: RuleConfig;
197
+ gridRow: RuleConfig;
198
+ gridRows: RuleConfig;
199
+ gridAutoColumns: RuleConfig;
200
+ gridAutoFlow: RuleConfig;
201
+ gridAutoRows: RuleConfig;
202
+ gridTemplateAreas: RuleConfig;
203
+ gridTemplateColumns: RuleConfig;
204
+ gridTemplateRows: RuleConfig;
205
+ gridTemplate: RuleConfig;
206
+ gridArea: RuleConfig;
207
+ columnGap: RuleConfig;
208
+ rowGap: RuleConfig;
209
+ gap: RuleConfig;
210
+ order: RuleConfig;
211
+ breakInside: RuleConfig;
212
+ breakBefore: RuleConfig;
213
+ breakAfter: RuleConfig;
214
+ boxDecorationBreak: RuleConfig;
215
+ aspectRatio: RuleConfig;
216
+ columnSpan: RuleConfig;
217
+ alignContent: RuleConfig;
218
+ alignItems: RuleConfig;
219
+ alignSelf: RuleConfig;
220
+ justifyContent: RuleConfig;
221
+ justifyItems: RuleConfig;
222
+ justifySelf: RuleConfig;
223
+ placeContent: RuleConfig;
224
+ placeItems: RuleConfig;
225
+ placeSelf: RuleConfig;
226
+ listStylePosition: RuleConfig;
227
+ listStyleType: RuleConfig;
228
+ listStyleImage: RuleConfig;
229
+ listStyle: RuleConfig;
230
+ outlineColor: RuleConfig;
231
+ outlineOffset: RuleConfig;
232
+ outlineStyle: RuleConfig;
233
+ outlineWidth: RuleConfig;
234
+ outline: RuleConfig;
235
+ accentColor: RuleConfig;
236
+ appearance: RuleConfig;
237
+ caretColor: RuleConfig;
238
+ scrollBehavior: RuleConfig;
239
+ scrollMarginLeft: RuleConfig;
240
+ scrollMarginRight: RuleConfig;
241
+ scrollMarginTop: RuleConfig;
242
+ scrollMarginBottom: RuleConfig;
243
+ scrollMarginX: RuleConfig;
244
+ scrollMarginY: RuleConfig;
245
+ scrollMargin: RuleConfig;
246
+ scrollPaddingLeft: RuleConfig;
247
+ scrollPaddingRight: RuleConfig;
248
+ scrollPaddingTop: RuleConfig;
249
+ scrollPaddingBottom: RuleConfig;
250
+ scrollPaddingX: RuleConfig;
251
+ scrollPaddingY: RuleConfig;
252
+ scrollPadding: RuleConfig;
253
+ scrollSnapAlign: RuleConfig;
254
+ scrollSnapStop: RuleConfig;
255
+ scrollSnapType: RuleConfig;
256
+ willChange: RuleConfig;
257
+ writingMode: RuleConfig;
258
+ direction: RuleConfig;
259
+ shapeOutside: RuleConfig;
260
+ shapeMargin: RuleConfig;
261
+ shapeImageThreshold: RuleConfig;
262
+ clipPath: RuleConfig;
263
+ quotes: RuleConfig;
264
+ maskImage: RuleConfig;
265
+ } & {
266
+ [key: string]: RuleConfig;
267
+ };
@@ -0,0 +1 @@
1
+ export declare const scope = "";
@@ -1,4 +1,4 @@
1
- declare const defaultSelectors: {
1
+ export declare const selectors: {
2
2
  '::scrollbar': string;
3
3
  '::scrollbar-button': string;
4
4
  '::scrollbar-thumb': string;
@@ -16,4 +16,3 @@ declare const defaultSelectors: {
16
16
  ':odd': string;
17
17
  ':nth(': string;
18
18
  };
19
- export default defaultSelectors;
@@ -1,45 +1,145 @@
1
- declare const defaultSemantics: {
2
- square: string;
3
- video: string;
4
- rounded: string;
5
- round: string;
6
- hidden: string;
7
- hide: string;
8
- block: string;
9
- table: string;
10
- flex: string;
11
- grid: string;
12
- contents: string;
13
- inline: string;
14
- 'inline-block': string;
15
- 'inline-flex': string;
16
- 'inline-grid': string;
17
- 'inline-table': string;
18
- 'table-cell': string;
19
- 'table-caption': string;
20
- 'flow-root': string;
21
- 'list-item': string;
22
- 'table-row': string;
23
- 'table-column': string;
24
- 'table-row-group': string;
25
- 'table-column-group': string;
26
- 'table-header-group': string;
27
- 'table-footer-group': string;
28
- italic: string;
29
- oblique: string;
30
- isolate: string;
31
- overflow: string;
32
- untouchable: string;
33
- static: string;
34
- fixed: string;
35
- abs: string;
36
- rel: string;
37
- sticky: string;
38
- uppercase: string;
39
- lowercase: string;
40
- capitalize: string;
41
- visible: string;
42
- invisible: string;
1
+ export declare const semantics: {
2
+ square: {
3
+ 'aspect-ratio': string;
4
+ };
5
+ video: {
6
+ 'aspect-ratio': string;
7
+ };
8
+ rounded: {
9
+ 'border-radius': string;
10
+ };
11
+ round: {
12
+ 'border-radius': string;
13
+ };
14
+ hidden: {
15
+ display: string;
16
+ };
17
+ hide: {
18
+ display: string;
19
+ };
20
+ block: {
21
+ display: string;
22
+ };
23
+ table: {
24
+ display: string;
25
+ };
26
+ flex: {
27
+ display: string;
28
+ };
29
+ grid: {
30
+ display: string;
31
+ };
32
+ contents: {
33
+ display: string;
34
+ };
35
+ inline: {
36
+ display: string;
37
+ };
38
+ 'inline-block': {
39
+ display: string;
40
+ };
41
+ 'inline-flex': {
42
+ display: string;
43
+ };
44
+ 'inline-grid': {
45
+ display: string;
46
+ };
47
+ 'inline-table': {
48
+ display: string;
49
+ };
50
+ 'table-cell': {
51
+ display: string;
52
+ };
53
+ 'table-caption': {
54
+ display: string;
55
+ };
56
+ 'flow-root': {
57
+ display: string;
58
+ };
59
+ 'list-item': {
60
+ display: string;
61
+ };
62
+ 'table-row': {
63
+ display: string;
64
+ };
65
+ 'table-column': {
66
+ display: string;
67
+ };
68
+ 'table-row-group': {
69
+ display: string;
70
+ };
71
+ 'table-column-group': {
72
+ display: string;
73
+ };
74
+ 'table-header-group': {
75
+ display: string;
76
+ };
77
+ 'table-footer-group': {
78
+ display: string;
79
+ };
80
+ italic: {
81
+ 'font-style': string;
82
+ };
83
+ oblique: {
84
+ 'font-style': string;
85
+ };
86
+ isolate: {
87
+ isolation: string;
88
+ };
89
+ overflowed: {
90
+ overflow: string;
91
+ };
92
+ untouchable: {
93
+ 'pointer-events': string;
94
+ };
95
+ static: {
96
+ position: string;
97
+ };
98
+ fixed: {
99
+ position: string;
100
+ };
101
+ abs: {
102
+ position: string;
103
+ };
104
+ rel: {
105
+ position: string;
106
+ };
107
+ sticky: {
108
+ position: string;
109
+ };
110
+ uppercase: {
111
+ 'text-transform': string;
112
+ };
113
+ lowercase: {
114
+ 'text-transform': string;
115
+ };
116
+ capitalize: {
117
+ 'text-transform': string;
118
+ };
119
+ visible: {
120
+ visibility: string;
121
+ };
122
+ invisible: {
123
+ visibility: string;
124
+ };
125
+ vw: {
126
+ width: string;
127
+ };
128
+ vh: {
129
+ height: string;
130
+ };
131
+ 'max-vw': {
132
+ 'max-width': string;
133
+ };
134
+ 'max-vh': {
135
+ 'max-height': string;
136
+ };
137
+ 'min-vw': {
138
+ 'min-width': string;
139
+ };
140
+ 'min-vh': {
141
+ 'min-height': string;
142
+ };
43
143
  'center-content': {
44
144
  'justify-content': string;
45
145
  'align-items': string;
@@ -78,5 +178,9 @@ declare const defaultSemantics: {
78
178
  'overflow-wrap': string;
79
179
  overflow: string;
80
180
  };
181
+ 'gradient-text': {
182
+ '-webkit-text-fill-color': string;
183
+ '-webkit-background-clip': string;
184
+ 'background-clip': string;
185
+ };
81
186
  };
82
- export default defaultSemantics;
@@ -0,0 +1 @@
1
+ export declare const themeDriver = "class";
@@ -0,0 +1 @@
1
+ export declare const CONFIG_ESM_TEXT = "/** @type {import('@master/css').Config} */\nexport default {\n classes: {},\n colors: {},\n themes: {},\n rules: {},\n values: {},\n semantics: {},\n breakpoints: {},\n mediaQueries: {},\n keyframes: {},\n selectors: {},\n functions: {}\n}\n";
@@ -0,0 +1 @@
1
+ export declare const CONFIG_TEXT = "/** @type {import('@master/css').Config} */\nmodule.exports = {\n classes: {},\n colors: {},\n themes: {},\n rules: {},\n values: {},\n semantics: {},\n breakpoints: {},\n mediaQueries: {},\n keyframes: {},\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 classes: {},\n colors: {},\n themes: {},\n rules: {},\n values: {},\n semantics: {},\n breakpoints: {},\n mediaQueries: {},\n keyframes: {},\n selectors: {},\n functions: {}\n} as Config\n";
@@ -0,0 +1 @@
1
+ export declare const SELECTOR_SYMBOLS: string[];
@@ -1,5 +1,6 @@
1
- export declare const START_SYMBOL: {
1
+ export declare const START_SYMBOLS: {
2
2
  '(': string;
3
3
  '\'': string;
4
+ '"': string;
4
5
  '{': string;
5
6
  };
package/dist/core.d.ts ADDED
@@ -0,0 +1,92 @@
1
+ import { Rule, RuleMeta, RuleNative } from './rule';
2
+ import type { Config } from './config';
3
+ export interface MasterCSS {
4
+ readonly style: HTMLStyleElement;
5
+ readonly host: Element;
6
+ readonly root: Document | ShadowRoot;
7
+ semantics: [RegExp, [string, string | Record<string, string>]][];
8
+ classes: Record<string, string[]>;
9
+ colorThemesMap: Record<string, Record<string, string>>;
10
+ colorNames: string[];
11
+ themeNames: string[];
12
+ classesBy: Record<string, string[]>;
13
+ selectors: Record<string, [RegExp, string[]][]>;
14
+ values: Record<string, Record<string, string | number>>;
15
+ globalValues: Record<string, string | number>;
16
+ breakpoints: Record<string, number>;
17
+ mediaQueries: Record<string, string>;
18
+ matches: Record<string, RegExp>;
19
+ keyframes: Record<string, {
20
+ native: RuleNative;
21
+ count: number;
22
+ }>;
23
+ }
24
+ export declare class MasterCSS {
25
+ config: Config;
26
+ static root: MasterCSS;
27
+ static config: Config;
28
+ static instances: MasterCSS[];
29
+ static refresh: (config: Config) => void;
30
+ readonly rules: Rule[];
31
+ readonly ruleBy: Record<string, Rule>;
32
+ readonly countBy: {};
33
+ readonly observing = false;
34
+ observer: MutationObserver;
35
+ constructor(config?: Config);
36
+ cache(): void;
37
+ /**
38
+ * Observe the DOM for changes and update the running stylesheet. (browser only)
39
+ * @param targetRoot root element to observe. default: document
40
+ * @param options mutation observer options
41
+ * @returns this
42
+ */
43
+ observe(targetRoot: Document | ShadowRoot | null, options?: MutationObserverInit): this;
44
+ disconnect(): void;
45
+ /**
46
+ * Match check if Master CSS class syntax
47
+ * @param syntax class syntax
48
+ * @returns css text
49
+ */
50
+ match(syntax: string): RuleMeta;
51
+ /**
52
+ * Create rules from class syntax
53
+ * @param syntax class syntax
54
+ * @returns Rule[]
55
+ */
56
+ create(syntax: string): Rule[];
57
+ /**
58
+ * 根據蒐集到的所有 DOM class 重新 create
59
+ */
60
+ refresh(config: Config): void;
61
+ destroy(): void;
62
+ /**
63
+ * 透過類名來刪除對應的 rules
64
+ */
65
+ delete(className: string): void;
66
+ /**
67
+ * 依類名插入規則
68
+ */
69
+ insert(syntax: string): boolean;
70
+ /**
71
+ * 加工插入規則
72
+ * 1. where
73
+ * 2. normal
74
+ * 3. where selectors
75
+ * 4. normal selectors
76
+ * 5. media where
77
+ * 6. media normal
78
+ * 7. media where selectors
79
+ * 8. media selectors
80
+ * 9. media width where
81
+ * 10. media width
82
+ * 11. media width where selectors
83
+ * 12. media width selectors
84
+ */
85
+ insertRules(rules: Rule[]): void;
86
+ get text(): string;
87
+ }
88
+ declare global {
89
+ interface Window {
90
+ MasterCSS: typeof MasterCSS;
91
+ }
92
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @param html
3
+ * @returns classes from html
4
+ */
5
+ export default function extractClassesFromHTML(html: string): string[];
@@ -0,0 +1,8 @@
1
+ import { Config } from '../config';
2
+ /**
3
+ * Generates the sorted CSS text from classes
4
+ * @param classes
5
+ * @param config
6
+ * @returns joined css text
7
+ */
8
+ export default function generateFromClasses(classes: string[], config?: Config): string;
@@ -0,0 +1,8 @@
1
+ import { Config } from '../config';
2
+ /**
3
+ * Generates the sorted CSS text from HTML
4
+ * @param html
5
+ * @param config
6
+ * @returns joined css text
7
+ */
8
+ export default function generateFromHTML(html: string, config?: Config): string;
@@ -0,0 +1,9 @@
1
+ import { MasterCSS } from '../core';
2
+ import type { Config } from '../config';
3
+ /**
4
+ * Initialize a new MasterCSS instance and observe the target root
5
+ * @param config master css config
6
+ * @param targetRoot target root to observe
7
+ * @returns master css instance
8
+ */
9
+ export default function initRuntime(config?: Config, targetRoot?: Document | ShadowRoot | null): MasterCSS;
@@ -0,0 +1,8 @@
1
+ import { Config } from '../config';
2
+ /**
3
+ * Renders the page-required and sorted CSS text from HTML and injected it back into HTML
4
+ * @param html
5
+ * @param config
6
+ * @returns html text
7
+ */
8
+ export default function renderHTML(html: string, config?: Config): string;