@multiplatform.one/theme 7.81.1 → 7.81.2
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": "7.81.
|
|
3
|
+
"version": "7.81.2",
|
|
4
4
|
"description": "Tamagui theme system for multiplatform.one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"multiplatform",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@multiplatform.one/platform": "^7.81.
|
|
76
|
-
"@multiplatform.one/store": "^7.81.
|
|
75
|
+
"@multiplatform.one/platform": "^7.81.2",
|
|
76
|
+
"@multiplatform.one/store": "^7.81.2",
|
|
77
77
|
"@tamagui/animations-react-native": "2.7.6",
|
|
78
78
|
"@tamagui/colors": "2.7.6",
|
|
79
79
|
"@tamagui/config": "2.7.6",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@expo/prebuild-config": "55.0.18",
|
|
92
|
-
"@multiplatform.one/config": "7.81.
|
|
93
|
-
"@multiplatform.one/test-utils": "7.81.
|
|
92
|
+
"@multiplatform.one/config": "7.81.2",
|
|
93
|
+
"@multiplatform.one/test-utils": "7.81.2",
|
|
94
94
|
"@tamagui/animations-css": "2.7.6",
|
|
95
95
|
"@tamagui/animations-reanimated": "2.7.6",
|
|
96
96
|
"@tamagui/font-inter": "2.7.6",
|
package/src/theme/theme.tsx
CHANGED
|
@@ -19,6 +19,7 @@ import { defaultPreset } from "./presets";
|
|
|
19
19
|
import { ScaleStyles } from "./scale/ScaleStyles";
|
|
20
20
|
import { useActiveScale } from "./scale/useActiveScale";
|
|
21
21
|
import { type ThemeConfig, getPreset } from "./shared";
|
|
22
|
+
import { touchManipulationCss } from "./touchManipulation";
|
|
22
23
|
import { useSchemePreference } from "./useSchemePreference";
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -168,6 +169,7 @@ export function ThemeProvider<T extends CreateTamaguiProps>({
|
|
|
168
169
|
"::view-transition-old(root), ::view-transition-new(root) {",
|
|
169
170
|
" animation-duration: calc(var(--mp-transition) * 1);",
|
|
170
171
|
"}",
|
|
172
|
+
touchManipulationCss,
|
|
171
173
|
].join("\n");
|
|
172
174
|
document.head.appendChild(style);
|
|
173
175
|
}, []);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LC-196 TOUCH-MANIPULATION: every web pressable sets `touch-action:
|
|
3
|
+
* manipulation` so a tap fires without the double-tap-zoom wait, while pinch
|
|
4
|
+
* zoom stays on. ThemeProvider injects this once with its global styles.
|
|
5
|
+
* `:where()` keeps it at zero specificity so a drag surface that sets its own
|
|
6
|
+
* `touch-action: none` still wins. `button` sits outside it at element
|
|
7
|
+
* specificity because the Tamagui reset's `button { all: unset }` would
|
|
8
|
+
* otherwise put it back to `auto`; this sheet is appended after the reset.
|
|
9
|
+
*/
|
|
10
|
+
export const pressableSelectors = [
|
|
11
|
+
"a[href]",
|
|
12
|
+
"summary",
|
|
13
|
+
"label[for]",
|
|
14
|
+
'[role="button"]',
|
|
15
|
+
'[role="link"]',
|
|
16
|
+
'[role="tab"]',
|
|
17
|
+
'[role="menuitem"]',
|
|
18
|
+
'[role="menuitemradio"]',
|
|
19
|
+
'[role="menuitemcheckbox"]',
|
|
20
|
+
'[role="option"]',
|
|
21
|
+
'[role="switch"]',
|
|
22
|
+
'[role="checkbox"]',
|
|
23
|
+
'[role="radio"]',
|
|
24
|
+
'[tabindex="0"]',
|
|
25
|
+
] as const;
|
|
26
|
+
|
|
27
|
+
export const touchManipulationCss = `:where(${pressableSelectors.join(", ")}),\nbutton {\n touch-action: manipulation;\n}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme/theme.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,oBAAoB,EAG1B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAU/C,OAAO,EAAE,KAAK,WAAW,EAAa,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme/theme.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,oBAAoB,EAG1B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAU/C,OAAO,EAAE,KAAK,WAAW,EAAa,MAAM,UAAU,CAAC;AAIvD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,IAAI,CAkB5D;AAMD,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,CACjD,SAAQ,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,cAAc,CAAC,CAAC;IAChF,MAAM,CAAC,EAAE;QACP,OAAO,EAAE,UAAU,CAAC,cAAc,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;KAChE,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,eAAe,CAAC,CAAC,CAAC;IAC3D,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAChC;AAkBD,wBAAgB,aAAa,CAAC,CAAC,SAAS,kBAAkB,EAAE,EAC1D,QAAQ,EACR,MAAM,EACN,WAAW,EACX,GAAG,YAAY,EAChB,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CA4GvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LC-196 TOUCH-MANIPULATION: every web pressable sets `touch-action:
|
|
3
|
+
* manipulation` so a tap fires without the double-tap-zoom wait, while pinch
|
|
4
|
+
* zoom stays on. ThemeProvider injects this once with its global styles.
|
|
5
|
+
* `:where()` keeps it at zero specificity so a drag surface that sets its own
|
|
6
|
+
* `touch-action: none` still wins. `button` sits outside it at element
|
|
7
|
+
* specificity because the Tamagui reset's `button { all: unset }` would
|
|
8
|
+
* otherwise put it back to `auto`; this sheet is appended after the reset.
|
|
9
|
+
*/
|
|
10
|
+
export declare const pressableSelectors: readonly ["a[href]", "summary", "label[for]", "[role=\"button\"]", "[role=\"link\"]", "[role=\"tab\"]", "[role=\"menuitem\"]", "[role=\"menuitemradio\"]", "[role=\"menuitemcheckbox\"]", "[role=\"option\"]", "[role=\"switch\"]", "[role=\"checkbox\"]", "[role=\"radio\"]", "[tabindex=\"0\"]"];
|
|
11
|
+
export declare const touchManipulationCss: string;
|
|
12
|
+
//# sourceMappingURL=touchManipulation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"touchManipulation.d.ts","sourceRoot":"","sources":["../../src/theme/touchManipulation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,oSAerB,CAAC;AAEX,eAAO,MAAM,oBAAoB,QAA0F,CAAC"}
|