postcss-clampwind 0.0.8 → 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.
@@ -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
- console.warn("Invalid clamp() values", { node: decl });
349
- decl.value = ` ${decl.value} /* Invalid clamp() values */`;
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();
@@ -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
- console.warn("Invalid clamp() values", { node: decl });
324
- decl.value = ` ${decl.value} /* Invalid clamp() values */`;
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-clampwind",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "A PostCSS plugin to create fluid clamp values for any Tailwind CSS utility",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -36,7 +36,6 @@
36
36
  },
37
37
  "scripts": {
38
38
  "dev": "node scripts/build.js --watch",
39
- "build": "node scripts/build.js",
40
- "publish": "npm publish"
39
+ "build": "node scripts/build.js"
41
40
  }
42
41
  }