mancha 0.17.4 → 0.17.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mancha",
3
- "version": "0.17.4",
3
+ "version": "0.17.6",
4
4
  "description": "Javscript HTML rendering engine",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -105,28 +105,71 @@ function generateMarkdown() {
105
105
  md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
106
106
  }
107
107
  }
108
+ // Document dynamic border widths
109
+ md += "| `border-{0-15}` | Border width in pixels (e.g., `border-0`, `border-1`, ..., `border-15`) |\n";
110
+ md += "| `border-x-{0-15}` | Horizontal border width in pixels |\n";
111
+ md += "| `border-y-{0-15}` | Vertical border width in pixels |\n";
112
+ md += "| `border-{t,b,l,r}-{0-15}` | Individual side border width in pixels |\n";
108
113
  md += "\n";
109
114
 
110
115
  md += "### Shadows & Effects\n\n";
111
116
  md += "| Utility | Description |\n";
112
117
  md += "| --- | --- |\n";
113
- const effectProps = ["shadow", "opacity-", "mix-blend-"];
118
+ const effectProps = ["shadow", "ring", "mix-blend-"];
114
119
  for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
115
120
  if (effectProps.some((p) => klass.startsWith(p))) {
116
121
  md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
117
122
  }
118
123
  }
124
+ // Document opacity
125
+ md += "| `opacity-0` | Fully transparent |\n";
126
+ md += `| \`opacity-{${PERCENTS.join(",")}}\` | Opacity values from 0-100 |\n`;
127
+ md += "\n";
128
+
129
+ md += "### Outline\n\n";
130
+ md += "| Utility | Description |\n";
131
+ md += "| --- | --- |\n";
132
+ const outlineProps = ["outline"];
133
+ for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
134
+ if (outlineProps.some((p) => klass.startsWith(p))) {
135
+ md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
136
+ }
137
+ }
138
+ md += "\n";
139
+
140
+ md += "### Aspect Ratio\n\n";
141
+ md += "| Utility | Description |\n";
142
+ md += "| --- | --- |\n";
143
+ const aspectProps = ["aspect-"];
144
+ for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
145
+ if (aspectProps.some((p) => klass.startsWith(p))) {
146
+ md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
147
+ }
148
+ }
149
+ md += "\n";
150
+
151
+ md += "### Backdrop Filters\n\n";
152
+ md += "| Utility | Description |\n";
153
+ md += "| --- | --- |\n";
154
+ const backdropProps = ["backdrop-"];
155
+ for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
156
+ if (backdropProps.some((p) => klass.startsWith(p))) {
157
+ md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
158
+ }
159
+ }
119
160
  md += "\n";
120
161
 
121
162
  md += "### Transitions & Animations\n\n";
122
163
  md += "| Utility | Description |\n";
123
164
  md += "| --- | --- |\n";
124
- const animProps = ["transition", "duration-", "animate-"];
165
+ const animProps = ["transition", "animate-"];
125
166
  for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
126
167
  if (animProps.some((p) => klass.startsWith(p))) {
127
168
  md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
128
169
  }
129
170
  }
171
+ // Document durations
172
+ md += `| \`duration-{${DURATIONS.join(",")}}\` | Transition duration in milliseconds |\n`;
130
173
  md += "\n";
131
174
 
132
175
  md += "### Interactivity\n\n";
@@ -186,6 +229,27 @@ function generateMarkdown() {
186
229
  md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
187
230
  }
188
231
  }
232
+ // Document gap utilities
233
+ md += "| `gap-0` | No gap |\n";
234
+ md += "| `gap-{1-512}` | Gap in rem units (0.25rem increments) |\n";
235
+ md += "| `gap-{1-512}px` | Gap in pixels |\n";
236
+ md += "| `gap-x-{1-512}` | Horizontal gap in rem units |\n";
237
+ md += "| `gap-y-{1-512}` | Vertical gap in rem units |\n";
238
+ md += "| `gap-x-{1-512}px` | Horizontal gap in pixels |\n";
239
+ md += "| `gap-y-{1-512}px` | Vertical gap in pixels |\n";
240
+ md += "| `space-x-{0-512}` | Horizontal spacing between children (rem) |\n";
241
+ md += "| `space-y-{0-512}` | Vertical spacing between children (rem) |\n";
242
+ md += "| `space-x-{0-512}px` | Horizontal spacing between children (px) |\n";
243
+ md += "| `space-y-{0-512}px` | Vertical spacing between children (px) |\n";
244
+ // Document divide utilities
245
+ md += "| `divide-x` | Add 1px vertical border between horizontal children |\n";
246
+ md += "| `divide-y` | Add 1px horizontal border between vertical children |\n";
247
+ md += "| `divide-x-{0,2,4,8}` | Vertical border width between horizontal children |\n";
248
+ md += "| `divide-y-{0,2,4,8}` | Horizontal border width between vertical children |\n";
249
+ md += "| `divide-solid` | Solid border style for dividers |\n";
250
+ md += "| `divide-dashed` | Dashed border style for dividers |\n";
251
+ md += "| `divide-dotted` | Dotted border style for dividers |\n";
252
+ md += "| `divide-none` | Remove divider borders |\n";
189
253
  md += "\n";
190
254
 
191
255
  md += "### Position & Inset\n\n";
@@ -197,11 +261,6 @@ function generateMarkdown() {
197
261
  "fixed",
198
262
  "sticky",
199
263
  "inset-",
200
- "top-",
201
- "bottom-",
202
- "left-",
203
- "right-",
204
- "z-",
205
264
  "object-",
206
265
  ];
207
266
  for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
@@ -209,6 +268,95 @@ function generateMarkdown() {
209
268
  md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
210
269
  }
211
270
  }
271
+ // Document position values
272
+ md += "| `top-{0-512}`, `bottom-{0-512}`, `left-{0-512}`, `right-{0-512}` | Position in rem units (0.25rem increments) |\n";
273
+ md += "| `top-{0-512}px`, `bottom-{0-512}px`, `left-{0-512}px`, `right-{0-512}px` | Position in pixels |\n";
274
+ md += "| `top-{1-100}%`, `bottom-{1-100}%`, `left-{1-100}%`, `right-{1-100}%` | Position in percentages |\n";
275
+ md += "| `top-auto`, `bottom-auto`, `left-auto`, `right-auto` | Auto positioning |\n";
276
+ // Document z-index
277
+ md += `| \`z-{${PERCENTS.join(",")}}\` | Z-index values |\n`;
278
+ md += "\n";
279
+
280
+ md += "### Display & Visibility\n\n";
281
+ md += "| Utility | Description |\n";
282
+ md += "| --- | --- |\n";
283
+ const displayProps = ["block", "inline", "hidden", "contents", "visible", "invisible", "collapse"];
284
+ for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
285
+ if (displayProps.some((p) => klass === p)) {
286
+ md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
287
+ }
288
+ }
289
+ md += "\n";
290
+
291
+ md += "### Overflow & Scrolling\n\n";
292
+ md += "| Utility | Description |\n";
293
+ md += "| --- | --- |\n";
294
+ const overflowProps = ["overflow-", "overscroll-"];
295
+ for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
296
+ if (overflowProps.some((p) => klass.startsWith(p))) {
297
+ md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
298
+ }
299
+ }
300
+ md += "\n";
301
+
302
+ md += "### Backgrounds\n\n";
303
+ md += "| Utility | Description |\n";
304
+ md += "| --- | --- |\n";
305
+ const bgProps = ["bg-auto", "bg-cover", "bg-contain", "bg-no-repeat", "bg-fixed", "bg-local", "bg-scroll"];
306
+ for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
307
+ if (bgProps.some((p) => klass === p)) {
308
+ md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
309
+ }
310
+ }
311
+ md += "\n";
312
+
313
+ md += "### Lists\n\n";
314
+ md += "| Utility | Description |\n";
315
+ md += "| --- | --- |\n";
316
+ const listProps = ["list-"];
317
+ for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
318
+ if (listProps.some((p) => klass.startsWith(p))) {
319
+ md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
320
+ }
321
+ }
322
+ md += "\n";
323
+
324
+ md += "### Vertical Alignment\n\n";
325
+ md += "| Utility | Description |\n";
326
+ md += "| --- | --- |\n";
327
+ const alignProps = ["align-"];
328
+ for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
329
+ if (alignProps.some((p) => klass.startsWith(p))) {
330
+ md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
331
+ }
332
+ }
333
+ md += "\n";
334
+
335
+ md += "### Viewport Sizing\n\n";
336
+ md += "| Utility | Description |\n";
337
+ md += "| --- | --- |\n";
338
+ const viewportProps = [
339
+ "min-h-screen", "max-h-screen", "min-w-screen",
340
+ "h-dvh", "h-svh", "h-lvh",
341
+ "w-dvw", "w-svw", "w-lvw",
342
+ "min-h-dvh", "min-h-svh", "min-h-lvh"
343
+ ];
344
+ for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
345
+ if (viewportProps.some((p) => klass === p)) {
346
+ md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
347
+ }
348
+ }
349
+ md += "\n";
350
+
351
+ md += "### Accessibility\n\n";
352
+ md += "| Utility | Description |\n";
353
+ md += "| --- | --- |\n";
354
+ const a11yProps = ["sr-only", "not-sr-only"];
355
+ for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
356
+ if (a11yProps.some((p) => klass === p)) {
357
+ md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
358
+ }
359
+ }
212
360
  md += "\n";
213
361
 
214
362
  md += "### Other Utilities\n\n";
@@ -222,6 +370,16 @@ function generateMarkdown() {
222
370
  ...effectProps,
223
371
  ...animProps,
224
372
  ...interProps,
373
+ ...displayProps,
374
+ ...overflowProps,
375
+ ...bgProps,
376
+ ...listProps,
377
+ ...alignProps,
378
+ ...a11yProps,
379
+ ...viewportProps,
380
+ ...outlineProps,
381
+ ...aspectProps,
382
+ ...backdropProps,
225
383
  "w-",
226
384
  "h-",
227
385
  "min-w-",
@@ -233,25 +391,24 @@ function generateMarkdown() {
233
391
  "opacity-",
234
392
  "cursor-",
235
393
  "size-",
236
- "block",
237
- "inline",
238
- "hidden",
239
- "contents",
240
- "visible",
241
- "invisible",
242
- "collapse",
243
- "overflow-",
244
- "overscroll-",
245
- "list-",
246
- "align-",
247
- "sr-only",
248
- "not-sr-only",
394
+ "top-",
395
+ "bottom-",
396
+ "left-",
397
+ "right-",
398
+ "z-",
399
+ "duration-",
400
+ "gap-",
401
+ "space-",
402
+ "divide-",
249
403
  ];
250
404
  for (const [klass, props] of Object.entries(PROPS_CUSTOM)) {
251
- if (!allHandledPrefixes.some((p) => klass.startsWith(p))) {
405
+ if (!allHandledPrefixes.some((p) => klass.startsWith(p) || klass === p)) {
252
406
  md += `| \`${klass}\` | \`${JSON.stringify(props)}\` |\n`;
253
407
  }
254
408
  }
409
+ // Document text sizes
410
+ md += "| `text-{0-99}px` | Font size in pixels (e.g., `text-12px`, `text-16px`) |\n";
411
+ md += "| `text-{0-24.75}rem` | Font size in rem units (0.25rem increments) |\n";
255
412
  md += "\n";
256
413
 
257
414
  md += "--- \n\n*Generated automatically from `src/css_gen_utils.ts`*\n";