@multiplatform.one/config 7.70.0 → 7.72.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 +19 -0
- package/package.json +2 -2
package/design-lint.mjs
CHANGED
|
@@ -51,6 +51,10 @@ const svgPrimitives = new Set([
|
|
|
51
51
|
"Use",
|
|
52
52
|
]);
|
|
53
53
|
const svgRoots = new Set(["Svg", "Symbol"]);
|
|
54
|
+
// LC-261 NO-MIDDOT-JOIN: values strung together with a "·" (or a spaced "•")
|
|
55
|
+
// instead of each value in its own element. A dot inside a word (Catalan
|
|
56
|
+
// "l·l"), a list bullet and a masked "••••" are not joins.
|
|
57
|
+
const middotJoin = /(^|[^\p{L}\p{N}])·([^\p{L}\p{N}]|$)|\s•\s/u;
|
|
54
58
|
// FZ-7717: focus looks come from MPO (FIELD_FOCUS_STYLE / the control ring).
|
|
55
59
|
// A use site that paints its own focus ring or shadow forks the look.
|
|
56
60
|
const focusPaint =
|
|
@@ -178,6 +182,7 @@ export const designRules = [
|
|
|
178
182
|
"geometry",
|
|
179
183
|
"icon-button",
|
|
180
184
|
"inline-spacing",
|
|
185
|
+
"middot-join",
|
|
181
186
|
"mpo-role",
|
|
182
187
|
"phosphor-import",
|
|
183
188
|
"raw-control",
|
|
@@ -1093,6 +1098,20 @@ export function inspectDesign(source, filename, projectRoot = process.cwd(), opt
|
|
|
1093
1098
|
) {
|
|
1094
1099
|
report(node, "hex", "Hex colours require a theme token.");
|
|
1095
1100
|
}
|
|
1101
|
+
if (
|
|
1102
|
+
(ts.isStringLiteralLike(node) ||
|
|
1103
|
+
ts.isTemplateHead(node) ||
|
|
1104
|
+
ts.isTemplateMiddle(node) ||
|
|
1105
|
+
ts.isTemplateTail(node) ||
|
|
1106
|
+
ts.isJsxText(node)) &&
|
|
1107
|
+
middotJoin.test(node.text)
|
|
1108
|
+
) {
|
|
1109
|
+
report(
|
|
1110
|
+
node,
|
|
1111
|
+
"middot-join",
|
|
1112
|
+
'Give each value its own element placed by role (LC-261), not a run joined by "·".',
|
|
1113
|
+
);
|
|
1114
|
+
}
|
|
1096
1115
|
if (
|
|
1097
1116
|
ts.isCallExpression(node) &&
|
|
1098
1117
|
referenceName(node.expression) === "styled" &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/config",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.72.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.
|
|
117
|
+
"@multiplatform.one/utils": "^7.72.0",
|
|
118
118
|
"@tamagui/vite-plugin": "2.7.6",
|
|
119
119
|
"@vitejs/plugin-react": "^6.1.2",
|
|
120
120
|
"dotenv": "^17.4.2",
|