@master/css 2.0.0-beta.17 → 2.0.0-beta.170

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