mancha 0.17.5 → 0.17.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +1 -1
- package/dist/css_gen_utils.d.ts +105 -2
- package/dist/css_gen_utils.js +63 -10
- package/dist/css_gen_utils.js.map +1 -1
- package/dist/mancha.js +1 -1
- package/docs/css.md +68 -9
- package/package.json +1 -1
- package/scripts/generate-css-docs.ts +48 -1
package/docs/css.md
CHANGED
|
@@ -61,9 +61,11 @@ Spacing utilities use a 0.25rem (4px) unit by default.
|
|
|
61
61
|
| Prefix | Property | Values |
|
|
62
62
|
| --- | --- | --- |
|
|
63
63
|
| `w-` | `width` | `0`, `full` (100%), `screen` (100vw/vh), `auto`, `px`, `0.25rem` - `128rem` |
|
|
64
|
+
| `w-sm/md/lg/xl` | `width` | Match media breakpoints (e.g. `w-sm`, `max-w-lg`) |
|
|
64
65
|
| `w-dvw/dvh/svw/svh/lvw/lvh` | `width` | Viewport-relative units |
|
|
65
66
|
| `w-fit/min/max` | `width` | `fit-content`, `min-content`, `max-content` |
|
|
66
67
|
| `h-` | `height` | `0`, `full` (100%), `screen` (100vw/vh), `auto`, `px`, `0.25rem` - `128rem` |
|
|
68
|
+
| `h-sm/md/lg/xl` | `height` | Match media breakpoints (e.g. `w-sm`, `max-w-lg`) |
|
|
67
69
|
| `h-dvw/dvh/svw/svh/lvw/lvh` | `height` | Viewport-relative units |
|
|
68
70
|
| `h-fit/min/max` | `height` | `fit-content`, `min-content`, `max-content` |
|
|
69
71
|
| `min-w-` | `min-width` | Same as sizing |
|
|
@@ -125,18 +127,67 @@ Supported prefixes: `text-`, `bg-`, `border-`, `fill-`.
|
|
|
125
127
|
|
|
126
128
|
| Utility | Description |
|
|
127
129
|
| --- | --- |
|
|
128
|
-
| `shadow` | `{"box-shadow":"0
|
|
129
|
-
| `shadow-
|
|
130
|
-
| `shadow
|
|
131
|
-
| `shadow-
|
|
132
|
-
| `shadow-
|
|
133
|
-
| `shadow-
|
|
134
|
-
| `shadow-
|
|
135
|
-
| `shadow-
|
|
136
|
-
| `shadow-
|
|
130
|
+
| `shadow-2xs` | `{"box-shadow":"0 1px rgb(0 0 0 / 0.05)"}` |
|
|
131
|
+
| `shadow-xs` | `{"box-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)"}` |
|
|
132
|
+
| `shadow` | `{"box-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"}` |
|
|
133
|
+
| `shadow-sm` | `{"box-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"}` |
|
|
134
|
+
| `shadow-md` | `{"box-shadow":"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}` |
|
|
135
|
+
| `shadow-lg` | `{"box-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"}` |
|
|
136
|
+
| `shadow-xl` | `{"box-shadow":"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"}` |
|
|
137
|
+
| `shadow-2xl` | `{"box-shadow":"0 25px 50px -12px rgb(0 0 0 / 0.25)"}` |
|
|
138
|
+
| `shadow-inner` | `{"box-shadow":"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"}` |
|
|
139
|
+
| `shadow-none` | `{"box-shadow":"0 0 #0000"}` |
|
|
140
|
+
| `ring` | `{"box-shadow":"0 0 0 3px rgb(59 130 246 / 0.5)"}` |
|
|
141
|
+
| `ring-0` | `{"box-shadow":"0 0 0 0px rgb(59 130 246 / 0.5)"}` |
|
|
142
|
+
| `ring-1` | `{"box-shadow":"0 0 0 1px rgb(59 130 246 / 0.5)"}` |
|
|
143
|
+
| `ring-2` | `{"box-shadow":"0 0 0 2px rgb(59 130 246 / 0.5)"}` |
|
|
144
|
+
| `ring-4` | `{"box-shadow":"0 0 0 4px rgb(59 130 246 / 0.5)"}` |
|
|
145
|
+
| `ring-8` | `{"box-shadow":"0 0 0 8px rgb(59 130 246 / 0.5)"}` |
|
|
146
|
+
| `ring-inset` | `{"--tw-ring-inset":"inset"}` |
|
|
137
147
|
| `opacity-0` | Fully transparent |
|
|
138
148
|
| `opacity-{1,2,5,10,20,25,30,40,50,60,70,75,80,90,95,98,99,100}` | Opacity values from 0-100 |
|
|
139
149
|
|
|
150
|
+
### Outline
|
|
151
|
+
|
|
152
|
+
| Utility | Description |
|
|
153
|
+
| --- | --- |
|
|
154
|
+
| `outline` | `{"outline-style":"solid"}` |
|
|
155
|
+
| `outline-none` | `{"outline":"2px solid transparent","outline-offset":"2px"}` |
|
|
156
|
+
| `outline-dashed` | `{"outline-style":"dashed"}` |
|
|
157
|
+
| `outline-dotted` | `{"outline-style":"dotted"}` |
|
|
158
|
+
| `outline-double` | `{"outline-style":"double"}` |
|
|
159
|
+
| `outline-0` | `{"outline-width":"0px"}` |
|
|
160
|
+
| `outline-1` | `{"outline-width":"1px"}` |
|
|
161
|
+
| `outline-2` | `{"outline-width":"2px"}` |
|
|
162
|
+
| `outline-4` | `{"outline-width":"4px"}` |
|
|
163
|
+
| `outline-8` | `{"outline-width":"8px"}` |
|
|
164
|
+
| `outline-offset-0` | `{"outline-offset":"0px"}` |
|
|
165
|
+
| `outline-offset-1` | `{"outline-offset":"1px"}` |
|
|
166
|
+
| `outline-offset-2` | `{"outline-offset":"2px"}` |
|
|
167
|
+
| `outline-offset-4` | `{"outline-offset":"4px"}` |
|
|
168
|
+
| `outline-offset-8` | `{"outline-offset":"8px"}` |
|
|
169
|
+
|
|
170
|
+
### Aspect Ratio
|
|
171
|
+
|
|
172
|
+
| Utility | Description |
|
|
173
|
+
| --- | --- |
|
|
174
|
+
| `aspect-auto` | `{"aspect-ratio":"auto"}` |
|
|
175
|
+
| `aspect-square` | `{"aspect-ratio":"1 / 1"}` |
|
|
176
|
+
| `aspect-video` | `{"aspect-ratio":"16 / 9"}` |
|
|
177
|
+
|
|
178
|
+
### Backdrop Filters
|
|
179
|
+
|
|
180
|
+
| Utility | Description |
|
|
181
|
+
| --- | --- |
|
|
182
|
+
| `backdrop-blur-none` | `{"backdrop-filter":"blur(0)"}` |
|
|
183
|
+
| `backdrop-blur-sm` | `{"backdrop-filter":"blur(4px)"}` |
|
|
184
|
+
| `backdrop-blur` | `{"backdrop-filter":"blur(8px)"}` |
|
|
185
|
+
| `backdrop-blur-md` | `{"backdrop-filter":"blur(12px)"}` |
|
|
186
|
+
| `backdrop-blur-lg` | `{"backdrop-filter":"blur(16px)"}` |
|
|
187
|
+
| `backdrop-blur-xl` | `{"backdrop-filter":"blur(24px)"}` |
|
|
188
|
+
| `backdrop-blur-2xl` | `{"backdrop-filter":"blur(40px)"}` |
|
|
189
|
+
| `backdrop-blur-3xl` | `{"backdrop-filter":"blur(64px)"}` |
|
|
190
|
+
|
|
140
191
|
### Transitions & Animations
|
|
141
192
|
|
|
142
193
|
| Utility | Description |
|
|
@@ -291,6 +342,14 @@ Supported prefixes: `text-`, `bg-`, `border-`, `fill-`.
|
|
|
291
342
|
| `space-y-{0-512}` | Vertical spacing between children (rem) |
|
|
292
343
|
| `space-x-{0-512}px` | Horizontal spacing between children (px) |
|
|
293
344
|
| `space-y-{0-512}px` | Vertical spacing between children (px) |
|
|
345
|
+
| `divide-x` | Add 1px vertical border between horizontal children |
|
|
346
|
+
| `divide-y` | Add 1px horizontal border between vertical children |
|
|
347
|
+
| `divide-x-{0,2,4,8}` | Vertical border width between horizontal children |
|
|
348
|
+
| `divide-y-{0,2,4,8}` | Horizontal border width between vertical children |
|
|
349
|
+
| `divide-solid` | Solid border style for dividers |
|
|
350
|
+
| `divide-dashed` | Dashed border style for dividers |
|
|
351
|
+
| `divide-dotted` | Dotted border style for dividers |
|
|
352
|
+
| `divide-none` | Remove divider borders |
|
|
294
353
|
|
|
295
354
|
### Position & Inset
|
|
296
355
|
|
package/package.json
CHANGED
|
@@ -76,6 +76,7 @@ function generateMarkdown() {
|
|
|
76
76
|
md += "| --- | --- | --- |\n";
|
|
77
77
|
for (const [prop, prefix] of Object.entries(PROPS_SIZING)) {
|
|
78
78
|
md += `| \`${prefix}-\` | \`${prop}\` | \`0\`, \`full\` (100%), \`screen\` (100vw/vh), \`auto\`, \`px\`, \`0.25rem\` - \`128rem\` |\n`;
|
|
79
|
+
md += `| \`${prefix}-sm/md/lg/xl\` | \`${prop}\` | Match media breakpoints (e.g. \`w-sm\`, \`max-w-lg\`) |\n`;
|
|
79
80
|
md += `| \`${prefix}-dvw/dvh/svw/svh/lvw/lvh\` | \`${prop}\` | Viewport-relative units |\n`;
|
|
80
81
|
md += `| \`${prefix}-fit/min/max\` | \`${prop}\` | \`fit-content\`, \`min-content\`, \`max-content\` |\n`;
|
|
81
82
|
}
|
|
@@ -115,7 +116,7 @@ function generateMarkdown() {
|
|
|
115
116
|
md += "### Shadows & Effects\n\n";
|
|
116
117
|
md += "| Utility | Description |\n";
|
|
117
118
|
md += "| --- | --- |\n";
|
|
118
|
-
const effectProps = ["shadow", "mix-blend-"];
|
|
119
|
+
const effectProps = ["shadow", "ring", "mix-blend-"];
|
|
119
120
|
for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
|
|
120
121
|
if (effectProps.some((p) => klass.startsWith(p))) {
|
|
121
122
|
md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
|
|
@@ -126,6 +127,39 @@ function generateMarkdown() {
|
|
|
126
127
|
md += `| \`opacity-{${PERCENTS.join(",")}}\` | Opacity values from 0-100 |\n`;
|
|
127
128
|
md += "\n";
|
|
128
129
|
|
|
130
|
+
md += "### Outline\n\n";
|
|
131
|
+
md += "| Utility | Description |\n";
|
|
132
|
+
md += "| --- | --- |\n";
|
|
133
|
+
const outlineProps = ["outline"];
|
|
134
|
+
for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
|
|
135
|
+
if (outlineProps.some((p) => klass.startsWith(p))) {
|
|
136
|
+
md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
md += "\n";
|
|
140
|
+
|
|
141
|
+
md += "### Aspect Ratio\n\n";
|
|
142
|
+
md += "| Utility | Description |\n";
|
|
143
|
+
md += "| --- | --- |\n";
|
|
144
|
+
const aspectProps = ["aspect-"];
|
|
145
|
+
for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
|
|
146
|
+
if (aspectProps.some((p) => klass.startsWith(p))) {
|
|
147
|
+
md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
md += "\n";
|
|
151
|
+
|
|
152
|
+
md += "### Backdrop Filters\n\n";
|
|
153
|
+
md += "| Utility | Description |\n";
|
|
154
|
+
md += "| --- | --- |\n";
|
|
155
|
+
const backdropProps = ["backdrop-"];
|
|
156
|
+
for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
|
|
157
|
+
if (backdropProps.some((p) => klass.startsWith(p))) {
|
|
158
|
+
md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
md += "\n";
|
|
162
|
+
|
|
129
163
|
md += "### Transitions & Animations\n\n";
|
|
130
164
|
md += "| Utility | Description |\n";
|
|
131
165
|
md += "| --- | --- |\n";
|
|
@@ -208,6 +242,15 @@ function generateMarkdown() {
|
|
|
208
242
|
md += "| `space-y-{0-512}` | Vertical spacing between children (rem) |\n";
|
|
209
243
|
md += "| `space-x-{0-512}px` | Horizontal spacing between children (px) |\n";
|
|
210
244
|
md += "| `space-y-{0-512}px` | Vertical spacing between children (px) |\n";
|
|
245
|
+
// Document divide utilities
|
|
246
|
+
md += "| `divide-x` | Add 1px vertical border between horizontal children |\n";
|
|
247
|
+
md += "| `divide-y` | Add 1px horizontal border between vertical children |\n";
|
|
248
|
+
md += "| `divide-x-{0,2,4,8}` | Vertical border width between horizontal children |\n";
|
|
249
|
+
md += "| `divide-y-{0,2,4,8}` | Horizontal border width between vertical children |\n";
|
|
250
|
+
md += "| `divide-solid` | Solid border style for dividers |\n";
|
|
251
|
+
md += "| `divide-dashed` | Dashed border style for dividers |\n";
|
|
252
|
+
md += "| `divide-dotted` | Dotted border style for dividers |\n";
|
|
253
|
+
md += "| `divide-none` | Remove divider borders |\n";
|
|
211
254
|
md += "\n";
|
|
212
255
|
|
|
213
256
|
md += "### Position & Inset\n\n";
|
|
@@ -335,6 +378,9 @@ function generateMarkdown() {
|
|
|
335
378
|
...alignProps,
|
|
336
379
|
...a11yProps,
|
|
337
380
|
...viewportProps,
|
|
381
|
+
...outlineProps,
|
|
382
|
+
...aspectProps,
|
|
383
|
+
...backdropProps,
|
|
338
384
|
"w-",
|
|
339
385
|
"h-",
|
|
340
386
|
"min-w-",
|
|
@@ -354,6 +400,7 @@ function generateMarkdown() {
|
|
|
354
400
|
"duration-",
|
|
355
401
|
"gap-",
|
|
356
402
|
"space-",
|
|
403
|
+
"divide-",
|
|
357
404
|
];
|
|
358
405
|
for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
|
|
359
406
|
if (!allHandledPrefixes.some((p) => klass.startsWith(p) || klass === p)) {
|