@multiplatform.one/config 7.85.1 → 7.86.0

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.
Files changed (2) hide show
  1. package/design-lint.mjs +14 -0
  2. package/package.json +2 -2
package/design-lint.mjs CHANGED
@@ -251,6 +251,7 @@ const destructiveHome = /Confirm|AlertDialog|Danger|Destructive/;
251
251
  const destructiveTone = /^(?:intent|tone|severity|theme|variant)$/;
252
252
  const destructiveValue = /destructive|danger|red|error/i;
253
253
  const backdropKey = /^(?:backdropFilter|WebkitBackdropFilter)$/;
254
+ const cssMaskKey = /^(?:mask|WebkitMask)$/;
254
255
  const materialHome = /(?:^|[\\/])components[\\/]src[\\/]Material[\\/]index\.tsx$/;
255
256
  const cssFilter =
256
257
  /^\s*(?:blur|grayscale|brightness|contrast|saturate|sepia|invert|hue-rotate|drop-shadow)\(/;
@@ -1046,10 +1047,23 @@ export function inspectDesign(source, filename, projectRoot = process.cwd(), opt
1046
1047
  )
1047
1048
  report(attr, "web-paint", `${name(attr.name)} is paint React Native cannot draw (LC-206).`);
1048
1049
  }
1050
+ function numberValued(prop) {
1051
+ const checker = typeChecker();
1052
+ const number = (type) => !!type && (type.flags & ts.TypeFlags.NumberLike) !== 0;
1053
+ const declared = checker.getContextualType(prop.parent);
1054
+ const slot = declared && checker.getPropertyOfType(declared, name(prop.name));
1055
+ if (slot && number(checker.getTypeOfSymbolAtLocation(slot, prop))) return true;
1056
+ return number(
1057
+ ts.isShorthandPropertyAssignment(prop)
1058
+ ? checker.getTypeOfSymbolAtLocation(checker.getShorthandAssignmentValueSymbol(prop), prop)
1059
+ : checker.getTypeAtLocation(prop.initializer),
1060
+ );
1061
+ }
1049
1062
  function checkPaintKey(prop) {
1050
1063
  if (!prop.name || ts.isComputedPropertyName(prop.name)) return;
1051
1064
  const key = name(prop.name);
1052
1065
  if (webPaintKey.test(key)) {
1066
+ if (cssMaskKey.test(key) && numberValued(prop)) return;
1053
1067
  if (!(material && backdropKey.test(key)))
1054
1068
  report(prop, "web-paint", `${key} is paint React Native cannot draw (LC-206).`);
1055
1069
  } else if (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/config",
3
- "version": "7.85.1",
3
+ "version": "7.86.0",
4
4
  "description": "Shared build and test configuration presets for multiplatform.one",
5
5
  "keywords": [
6
6
  "config",
@@ -114,7 +114,7 @@
114
114
  "access": "public"
115
115
  },
116
116
  "dependencies": {
117
- "@multiplatform.one/utils": "^7.85.1",
117
+ "@multiplatform.one/utils": "^7.86.0",
118
118
  "@tamagui/vite-plugin": "2.7.6",
119
119
  "@vitejs/plugin-react": "^6.1.2",
120
120
  "dotenv": "^17.4.2",