@multiplatform.one/vite-plugin-gnome 7.23.0 → 7.23.1
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/lib/index.cjs +2 -2
- package/lib/index.mjs +2 -2
- package/package.json +1 -1
- package/src/index.ts +11 -11
package/lib/index.cjs
CHANGED
|
@@ -92,8 +92,8 @@ const corePatches = [
|
|
|
92
92
|
name: "core-attach-hover-on-desktop",
|
|
93
93
|
module: "@tamagui/core",
|
|
94
94
|
precondition: corePrecondition,
|
|
95
|
-
find: /var attachHover =
|
|
96
|
-
replace: "var attachHover =
|
|
95
|
+
find: /var attachHover = isNativeDesktop && !!\(hasDynamicGroupChildren \|\| needsHoverState \|\| onMouseEnter \|\| onMouseLeave\);/g,
|
|
96
|
+
replace: "var attachHover = !!(hasDynamicGroupChildren || needsHoverState || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave);"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
name: "core-forward-hover-handlers",
|
package/lib/index.mjs
CHANGED
|
@@ -90,8 +90,8 @@ const corePatches = [
|
|
|
90
90
|
name: "core-attach-hover-on-desktop",
|
|
91
91
|
module: "@tamagui/core",
|
|
92
92
|
precondition: corePrecondition,
|
|
93
|
-
find: /var attachHover =
|
|
94
|
-
replace: "var attachHover =
|
|
93
|
+
find: /var attachHover = isNativeDesktop && !!\(hasDynamicGroupChildren \|\| needsHoverState \|\| onMouseEnter \|\| onMouseLeave\);/g,
|
|
94
|
+
replace: "var attachHover = !!(hasDynamicGroupChildren || needsHoverState || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave);"
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
name: "core-forward-hover-handlers",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/vite-plugin-gnome",
|
|
3
|
-
"version": "7.23.
|
|
3
|
+
"version": "7.23.1",
|
|
4
4
|
"description": "Vite plugin that makes Tamagui render under react-gnome (GTK4/GJS) — bundle patches for @tamagui/core's native lazy-init chains, the sheet/portal native builds, the hover/animation gates, plus the Tamagui-specific resolver aliases. Pairs with @react-gnome/vite-plugin (generic GJS aliases/conditions/define).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gjs",
|
package/src/index.ts
CHANGED
|
@@ -229,22 +229,22 @@ const corePatches: TamaguiPatch[] = [
|
|
|
229
229
|
replace:
|
|
230
230
|
'var hasAnimationProp = Boolean(!isHOC && ("transition" in props || "animation" in props) || props.style && hasAnimatedStyleValue(props.style));',
|
|
231
231
|
},
|
|
232
|
-
// The NATIVE build
|
|
233
|
-
//
|
|
234
|
-
//
|
|
235
|
-
//
|
|
236
|
-
//
|
|
237
|
-
//
|
|
238
|
-
// same function, and the emitted
|
|
239
|
-
// host element where the renderer's
|
|
240
|
-
// Gtk.EventControllerMotion.
|
|
232
|
+
// The NATIVE build attaches hover only when `isNativeDesktop`, which is
|
|
233
|
+
// Platform.OS "macos" or "windows" (touch platforms have no hover), so on
|
|
234
|
+
// GNOME the events object never includes the onMouseEnter/onMouseLeave
|
|
235
|
+
// handlers that drive the hoverStyle state machine and call user
|
|
236
|
+
// onHoverIn/onHoverOut. GNOME is a pointer desktop — drop the platform
|
|
237
|
+
// gate and count onHoverIn/onHoverOut too. `needsHoverState` is declared
|
|
238
|
+
// on the preceding line of the same function, and the emitted
|
|
239
|
+
// onMouseEnter/onMouseLeave land on the host element where the renderer's
|
|
240
|
+
// maybeWireHoverHandler maps them to a Gtk.EventControllerMotion.
|
|
241
241
|
{
|
|
242
242
|
name: "core-attach-hover-on-desktop",
|
|
243
243
|
module: "@tamagui/core",
|
|
244
244
|
precondition: corePrecondition,
|
|
245
|
-
find: /var attachHover =
|
|
245
|
+
find: /var attachHover = isNativeDesktop && !!\(hasDynamicGroupChildren \|\| needsHoverState \|\| onMouseEnter \|\| onMouseLeave\);/g,
|
|
246
246
|
replace:
|
|
247
|
-
"var attachHover =
|
|
247
|
+
"var attachHover = !!(hasDynamicGroupChildren || needsHoverState || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave);",
|
|
248
248
|
},
|
|
249
249
|
// …and useEvents (native) forwards ONLY focus/blur + the press family to
|
|
250
250
|
// the host — the hover handlers above would dead-end there. Forward them
|