mnfst 0.5.135 → 0.5.136
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/lib/manifest.css +1 -1
- package/lib/manifest.dropdown.css +1 -1
- package/lib/manifest.integrity.json +5 -5
- package/lib/manifest.js +1 -1
- package/lib/manifest.localization.js +17 -0
- package/lib/manifest.min.css +1 -1
- package/lib/manifest.payments.js +11 -1
- package/lib/manifest.tailwind.js +87 -110
- package/lib/manifest.utilities.js +36 -0
- package/package.json +1 -1
|
@@ -2376,6 +2376,42 @@ TailwindCompiler.prototype.parseClassName = function (className) {
|
|
|
2376
2376
|
}
|
|
2377
2377
|
}
|
|
2378
2378
|
|
|
2379
|
+
// Container query variants (Tailwind v4): @[size], @min-[size], @max-[size],
|
|
2380
|
+
// named @sm/@md/… and @max-sm/…, each optionally scoped to a /name container.
|
|
2381
|
+
// Tailwind emits these for its own utilities; recognising them here keeps them
|
|
2382
|
+
// off the "Unknown variant" path and lets the Manifest compiler apply them to
|
|
2383
|
+
// theme/semantic utilities too. The @-prefixed selector is wrapped as an
|
|
2384
|
+
// at-rule by the generator, producing `@container (width …) { … }`.
|
|
2385
|
+
if (variant.startsWith('@')) {
|
|
2386
|
+
const containerSizes = {
|
|
2387
|
+
'3xs': '16rem', '2xs': '18rem', 'xs': '20rem', 'sm': '24rem',
|
|
2388
|
+
'md': '28rem', 'lg': '32rem', 'xl': '36rem', '2xl': '42rem',
|
|
2389
|
+
'3xl': '48rem', '4xl': '56rem', '5xl': '64rem', '6xl': '72rem', '7xl': '80rem'
|
|
2390
|
+
};
|
|
2391
|
+
const slash = variant.indexOf('/');
|
|
2392
|
+
const name = slash !== -1 ? variant.slice(slash + 1) : '';
|
|
2393
|
+
const ctx = name ? `@container ${name}` : '@container';
|
|
2394
|
+
const body = (slash !== -1 ? variant.slice(0, slash) : variant).slice(1); // strip '@'
|
|
2395
|
+
let m;
|
|
2396
|
+
if (body === '' || body === 'container') {
|
|
2397
|
+
return { name: variant, selector: ctx, isArbitrary: false };
|
|
2398
|
+
}
|
|
2399
|
+
if ((m = body.match(/^(?:min-)?\[(.+)\]$/))) {
|
|
2400
|
+
return { name: variant, selector: `${ctx} (width >= ${m[1]})`, isArbitrary: false };
|
|
2401
|
+
}
|
|
2402
|
+
if ((m = body.match(/^max-\[(.+)\]$/))) {
|
|
2403
|
+
return { name: variant, selector: `${ctx} (width < ${m[1]})`, isArbitrary: false };
|
|
2404
|
+
}
|
|
2405
|
+
if ((m = body.match(/^max-(.+)$/))) {
|
|
2406
|
+
if (containerSizes[m[1]]) {
|
|
2407
|
+
return { name: variant, selector: `${ctx} (width < ${containerSizes[m[1]]})`, isArbitrary: false };
|
|
2408
|
+
}
|
|
2409
|
+
} else if (containerSizes[body]) {
|
|
2410
|
+
return { name: variant, selector: `${ctx} (width >= ${containerSizes[body]})`, isArbitrary: false };
|
|
2411
|
+
}
|
|
2412
|
+
// Unrecognised @-form falls through to the warning below.
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2379
2415
|
// If no match found, warn once per unique token and return null.
|
|
2380
2416
|
// Deduped so unsupported variants (e.g. container queries like
|
|
2381
2417
|
// `@[10rem]:`) don't flood the console on every compile pass.
|