postcss-clampwind 0.0.9 → 0.0.10
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/clampwind.cjs.cjs +11 -5
- package/dist/clampwind.esm.js +11 -5
- package/package.json +1 -1
package/dist/clampwind.cjs.cjs
CHANGED
|
@@ -180,8 +180,8 @@ var extractMinValue = (params) => {
|
|
|
180
180
|
// src/clampwind.js
|
|
181
181
|
var clampwind = (opts = {}) => {
|
|
182
182
|
return {
|
|
183
|
-
postcssPlugin: "clampwind",
|
|
184
|
-
prepare() {
|
|
183
|
+
postcssPlugin: "postcss-clampwind",
|
|
184
|
+
prepare(result) {
|
|
185
185
|
let rootFontSize = 16;
|
|
186
186
|
let spacingSize = "0.25rem";
|
|
187
187
|
let customProperties = {};
|
|
@@ -345,8 +345,14 @@ var clampwind = (opts = {}) => {
|
|
|
345
345
|
(val) => convertToRem(val, rootFontSize, spacingSize, customProperties)
|
|
346
346
|
);
|
|
347
347
|
if (!args || !lower || !upper) {
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
result.warn(
|
|
349
|
+
`Invalid clamp() values: "${decl.value}". Expected format: clamp(min, preferred, max)`,
|
|
350
|
+
{
|
|
351
|
+
node: decl,
|
|
352
|
+
word: decl.value
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
decl.value = `${decl.value} /* Invalid clamp() values */`;
|
|
350
356
|
return true;
|
|
351
357
|
}
|
|
352
358
|
const clamp = generateClamp(
|
|
@@ -454,7 +460,7 @@ var clampwind = (opts = {}) => {
|
|
|
454
460
|
};
|
|
455
461
|
return {
|
|
456
462
|
// Use OnceExit to ensure Tailwind has generated its content
|
|
457
|
-
OnceExit(root, { result }) {
|
|
463
|
+
OnceExit(root, { result: result2 }) {
|
|
458
464
|
collectConfig(root);
|
|
459
465
|
finalizeConfig();
|
|
460
466
|
const processedAtRules = /* @__PURE__ */ new WeakSet();
|
package/dist/clampwind.esm.js
CHANGED
|
@@ -155,8 +155,8 @@ var extractMinValue = (params) => {
|
|
|
155
155
|
// src/clampwind.js
|
|
156
156
|
var clampwind = (opts = {}) => {
|
|
157
157
|
return {
|
|
158
|
-
postcssPlugin: "clampwind",
|
|
159
|
-
prepare() {
|
|
158
|
+
postcssPlugin: "postcss-clampwind",
|
|
159
|
+
prepare(result) {
|
|
160
160
|
let rootFontSize = 16;
|
|
161
161
|
let spacingSize = "0.25rem";
|
|
162
162
|
let customProperties = {};
|
|
@@ -320,8 +320,14 @@ var clampwind = (opts = {}) => {
|
|
|
320
320
|
(val) => convertToRem(val, rootFontSize, spacingSize, customProperties)
|
|
321
321
|
);
|
|
322
322
|
if (!args || !lower || !upper) {
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
result.warn(
|
|
324
|
+
`Invalid clamp() values: "${decl.value}". Expected format: clamp(min, preferred, max)`,
|
|
325
|
+
{
|
|
326
|
+
node: decl,
|
|
327
|
+
word: decl.value
|
|
328
|
+
}
|
|
329
|
+
);
|
|
330
|
+
decl.value = `${decl.value} /* Invalid clamp() values */`;
|
|
325
331
|
return true;
|
|
326
332
|
}
|
|
327
333
|
const clamp = generateClamp(
|
|
@@ -429,7 +435,7 @@ var clampwind = (opts = {}) => {
|
|
|
429
435
|
};
|
|
430
436
|
return {
|
|
431
437
|
// Use OnceExit to ensure Tailwind has generated its content
|
|
432
|
-
OnceExit(root, { result }) {
|
|
438
|
+
OnceExit(root, { result: result2 }) {
|
|
433
439
|
collectConfig(root);
|
|
434
440
|
finalizeConfig();
|
|
435
441
|
const processedAtRules = /* @__PURE__ */ new WeakSet();
|