@multiplatform.one/config 9.4.0 → 9.6.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.
- package/design-lint.mjs +11 -5
- package/package.json +2 -2
package/design-lint.mjs
CHANGED
|
@@ -72,14 +72,14 @@ const rowTag = /^(?:XStack|XGroup)$|\.XGroup$/;
|
|
|
72
72
|
// copy inside its top-trailing corner), never mono text with a copy beside it.
|
|
73
73
|
const copyGlyph = /(?:Copy|Clipboard)\w*Icon\b/;
|
|
74
74
|
const copyTag = /^Copy\w*Button$/;
|
|
75
|
-
// LC-176 ICON-BUTTON: an icon-only button
|
|
76
|
-
// paints
|
|
75
|
+
// LC-176 ICON-BUTTON: an icon-only button paints its recipe's plate. A prop that
|
|
76
|
+
// paints its own plate, ring or corners around the glyph needs a named plate.
|
|
77
77
|
const buttonTag = /^(?:Button|IconButton|TamaguiButton|PageBarButton)$|\.Button$/;
|
|
78
78
|
// LC-286: a system bar's trailing action is the glyph on a round filled plate in
|
|
79
79
|
// its own intent, round 95's round-plate allowance, so SystemBarAction may plate.
|
|
80
80
|
const roundPlateHome = /^SystemBarAction$/;
|
|
81
81
|
const platePaint =
|
|
82
|
-
/^(?:
|
|
82
|
+
/^(?:circular|bordered|elevate|elevation|bg|backgroundColor|background|borderWidth|borderColor|variant)$/;
|
|
83
83
|
const tokenFactories = new Set([
|
|
84
84
|
"createTokens",
|
|
85
85
|
"createTamagui",
|
|
@@ -1374,6 +1374,12 @@ export function inspectDesign(source, filename, projectRoot = process.cwd(), opt
|
|
|
1374
1374
|
if (plate?.initializer && /["'](?:media|primary)["']/.test(plate.initializer.getText(file)))
|
|
1375
1375
|
return undefined;
|
|
1376
1376
|
if (insideRoundPlateHome(element)) return undefined;
|
|
1377
|
+
const chromeless = attribute(element, "chromeless");
|
|
1378
|
+
const bare =
|
|
1379
|
+
!!chromeless &&
|
|
1380
|
+
(!chromeless.initializer ||
|
|
1381
|
+
(ts.isJsxExpression(chromeless.initializer) &&
|
|
1382
|
+
chromeless.initializer.expression?.kind === ts.SyntaxKind.TrueKeyword));
|
|
1377
1383
|
return tag.attributes.properties.find((attr) => {
|
|
1378
1384
|
if (!ts.isJsxAttribute(attr)) return false;
|
|
1379
1385
|
const key = name(attr.name);
|
|
@@ -1382,7 +1388,7 @@ export function inspectDesign(source, filename, projectRoot = process.cwd(), opt
|
|
|
1382
1388
|
? attr.initializer.expression
|
|
1383
1389
|
: attr.initializer;
|
|
1384
1390
|
const off = !!value && (inert(value) || value.kind === ts.SyntaxKind.FalseKeyword);
|
|
1385
|
-
if (key === "
|
|
1391
|
+
if (key === "borderRadius") return !bare && !off;
|
|
1386
1392
|
return platePaint.test(key) && !off;
|
|
1387
1393
|
});
|
|
1388
1394
|
}
|
|
@@ -1392,7 +1398,7 @@ export function inspectDesign(source, filename, projectRoot = process.cwd(), opt
|
|
|
1392
1398
|
report(
|
|
1393
1399
|
plated,
|
|
1394
1400
|
"icon-button",
|
|
1395
|
-
`An icon-only button
|
|
1401
|
+
`An icon-only button paints its recipe's plate, or outlined; drop ${name(plated.name)}, or pass plate="media" over imagery (LC-176 ICON-BUTTON).`,
|
|
1396
1402
|
);
|
|
1397
1403
|
}
|
|
1398
1404
|
// LC-260 ICONS-OVER-WORDS at a pressable's visible label.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/config",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
4
4
|
"description": "Shared build and test configuration presets for multiplatform.one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"@babel/parser": "^7.29.9",
|
|
123
123
|
"@babel/plugin-transform-block-scoping": "^7.29.7",
|
|
124
124
|
"@babel/traverse": "^7.29.10",
|
|
125
|
-
"@multiplatform.one/utils": "^9.
|
|
125
|
+
"@multiplatform.one/utils": "^9.6.0",
|
|
126
126
|
"@tamagui/vite-plugin": "2.7.6",
|
|
127
127
|
"@vitejs/plugin-react": "^6.1.2",
|
|
128
128
|
"dotenv": "^17.4.2",
|