@multiplatform.one/theme 10.6.0 → 10.7.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/theme",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.7.0",
|
|
4
4
|
"description": "Tamagui theme system for multiplatform.one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"multiplatform",
|
|
@@ -163,8 +163,8 @@
|
|
|
163
163
|
"access": "public"
|
|
164
164
|
},
|
|
165
165
|
"dependencies": {
|
|
166
|
-
"@multiplatform.one/platform": "^10.
|
|
167
|
-
"@multiplatform.one/store": "^10.
|
|
166
|
+
"@multiplatform.one/platform": "^10.7.0",
|
|
167
|
+
"@multiplatform.one/store": "^10.7.0",
|
|
168
168
|
"@tamagui/animations-react-native": "3.2.3",
|
|
169
169
|
"@tamagui/colors": "3.2.3",
|
|
170
170
|
"@tamagui/config": "3.2.3",
|
|
@@ -178,8 +178,8 @@
|
|
|
178
178
|
},
|
|
179
179
|
"devDependencies": {
|
|
180
180
|
"@expo/prebuild-config": "58.0.19",
|
|
181
|
-
"@multiplatform.one/config": "10.
|
|
182
|
-
"@multiplatform.one/test-utils": "10.
|
|
181
|
+
"@multiplatform.one/config": "10.7.0",
|
|
182
|
+
"@multiplatform.one/test-utils": "10.7.0",
|
|
183
183
|
"@tamagui/animations-css": "3.2.3",
|
|
184
184
|
"@tamagui/animations-reanimated": "3.2.3",
|
|
185
185
|
"@tamagui/build": "3.2.3",
|
|
@@ -53,6 +53,21 @@ describe("Axiom 4: dialog and sheet scrims are two theme tokens", () => {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
for (const scheme of ["light", "dark"] as const) {
|
|
57
|
+
const configured =
|
|
58
|
+
scheme === "light" ? defaultBaseTheme.lightScrims : defaultBaseTheme.darkScrims;
|
|
59
|
+
|
|
60
|
+
it(`${scheme} carries the configured alphas through to the built tokens`, () => {
|
|
61
|
+
expect(alphaOf(themes[scheme]["scrim-sheet"])).toBe(configured?.sheet);
|
|
62
|
+
expect(alphaOf(themes[scheme]["scrim-dialog"])).toBe(configured?.dialog);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
it("pins the configured scrim alphas, so a change to them is deliberate", () => {
|
|
67
|
+
expect(defaultBaseTheme.lightScrims).toEqual({ dialog: 0.5, sheet: 0.22 });
|
|
68
|
+
expect(defaultBaseTheme.darkScrims).toEqual({ dialog: 0.58, sheet: 0.45 });
|
|
69
|
+
});
|
|
70
|
+
|
|
56
71
|
it("washes a dialog's page toward that theme's own page and dims a sheet's toward black", () => {
|
|
57
72
|
for (const scheme of ["light", "dark"] as const) {
|
|
58
73
|
for (const scope of scopes) {
|
|
@@ -83,7 +98,7 @@ describe("Axiom 4: no scrim literal at a use site", () => {
|
|
|
83
98
|
.filter((dir) => statSync(dir, { throwIfNoEntry: false })?.isDirectory())
|
|
84
99
|
.flatMap((dir) => sources(dir));
|
|
85
100
|
|
|
86
|
-
it("paints every overlay scrim from dialogScrim or sheetScrim, with no opacity of
|
|
101
|
+
it("paints every overlay scrim from dialogScrim or sheetScrim, with no opacity but an explicit base of 1", () => {
|
|
87
102
|
const offenders: string[] = [];
|
|
88
103
|
for (const file of files) {
|
|
89
104
|
const source = readFileSync(file, "utf8");
|
|
@@ -94,7 +109,7 @@ describe("Axiom 4: no scrim literal at a use site", () => {
|
|
|
94
109
|
const background = props.match(/backgroundColor=\{?"?([^\s}"]+)/)?.[1];
|
|
95
110
|
const restingOpacity = props
|
|
96
111
|
.replace(/\bopacity=\{\{\s*enter:\s*0,\s*exit:\s*0\s*\}\}/g, "")
|
|
97
|
-
.replace(/\bopacity="enter:0 exit:0"/g, "");
|
|
112
|
+
.replace(/\bopacity="1 enter:0 exit:0"/g, "");
|
|
98
113
|
if (
|
|
99
114
|
/\bopacity=/.test(restingOpacity) ||
|
|
100
115
|
(background && !/^(dialogScrim|sheetScrim)$/.test(background))
|