@kbach/react 0.6.10 → 0.6.11
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/dist/{chunk-CJRRPENF.mjs → chunk-OWJUMH2V.mjs} +14 -9
- package/dist/{chunk-RWQKYQWN.mjs → chunk-Z5SUFJ53.mjs} +1 -1
- package/dist/index.js +29 -21
- package/dist/index.mjs +16 -13
- package/dist/jsx-dev-runtime.js +14 -9
- package/dist/jsx-dev-runtime.mjs +2 -2
- package/dist/jsx-runtime.js +14 -9
- package/dist/jsx-runtime.mjs +2 -2
- package/package.json +1 -1
|
@@ -3694,19 +3694,24 @@ var InteractiveWrapper = forwardRef(
|
|
|
3694
3694
|
...checked !== void 0 ? { checked } : {},
|
|
3695
3695
|
style: finalStyle,
|
|
3696
3696
|
...!isNative && className ? { className } : {},
|
|
3697
|
-
// On web, onPointerDown/Up drive the wrapper's own pressed state (covers mouse + touch)
|
|
3698
|
-
//
|
|
3699
|
-
//
|
|
3700
|
-
//
|
|
3701
|
-
//
|
|
3702
|
-
//
|
|
3703
|
-
//
|
|
3697
|
+
// On web, onPointerDown/Up drive the wrapper's own pressed state (covers mouse + touch) —
|
|
3698
|
+
// onPressIn/onPressOut are RN-only prop names and are never forwarded here, even when
|
|
3699
|
+
// Component isn't a literal HTML tag string. A non-string Component on web is just as
|
|
3700
|
+
// likely to be an ordinary web component (React Router's <Link>, Next.js's <Link>, any
|
|
3701
|
+
// custom wrapper) as an actual react-native-web primitive — "not a string" alone was never
|
|
3702
|
+
// a reliable signal that onPressIn/onPressOut are wanted, and forwarding them
|
|
3703
|
+
// unconditionally made React DOM warn "Unknown event handler property" the moment any web
|
|
3704
|
+
// component got an interactive modifier (hover:, active:, …), which is the common case,
|
|
3705
|
+
// not the exception. (A real react-native-web primitive would additionally have this pair
|
|
3706
|
+
// of props silently vanish after hydration anyway, once the browser-only web-substitution
|
|
3707
|
+
// in jsx-runtime.tsx swaps it for a plain host tag — so keeping them pre-hydration would
|
|
3708
|
+
// only have traded one prop-mismatch warning for another.) Genuinely native code paths
|
|
3709
|
+
// still get them via the isNative branch below.
|
|
3704
3710
|
...!isNative ? {
|
|
3705
3711
|
onPointerDown: handlePointerDown,
|
|
3706
3712
|
onPointerUp: handlePointerUp,
|
|
3707
3713
|
onPointerLeave: handlePointerLeave,
|
|
3708
|
-
onPointerCancel: handlePointerCancel
|
|
3709
|
-
...typeof Component !== "string" ? { onPressIn, onPressOut } : {}
|
|
3714
|
+
onPointerCancel: handlePointerCancel
|
|
3710
3715
|
} : { onPressIn: handlePressIn, onPressOut: handlePressOut },
|
|
3711
3716
|
onMouseEnter: handleMouseEnter,
|
|
3712
3717
|
onMouseLeave: handleMouseLeave,
|
package/dist/index.js
CHANGED
|
@@ -3988,25 +3988,28 @@ function styled(Component, baseClasses = "") {
|
|
|
3988
3988
|
...isWeb && combined ? { className: normalizeClassString(combined) } : {},
|
|
3989
3989
|
// Only attach state-tracking handlers when interactive modifiers are present.
|
|
3990
3990
|
// Always forward user-provided handlers to avoid silently swallowing them.
|
|
3991
|
-
//
|
|
3992
|
-
//
|
|
3993
|
-
//
|
|
3994
|
-
// string
|
|
3995
|
-
//
|
|
3996
|
-
//
|
|
3997
|
-
//
|
|
3998
|
-
|
|
3991
|
+
// Gated on isNative, not isWeb: isWeb is false during SSR too (no `window` there),
|
|
3992
|
+
// and onPressIn/onPressOut must stay excluded there as well — SSR is exactly where
|
|
3993
|
+
// getWebTag() above is skipped (it's isWeb-gated), so effectiveComponent may still be
|
|
3994
|
+
// a non-string RN-style reference server-side, and this used to forward onPressIn/
|
|
3995
|
+
// onPressOut to it unconditionally in that case (isWeb ? ... : ...'s false branch
|
|
3996
|
+
// covered both native AND SSR). onPressIn/onPressOut are RN-only prop names — a
|
|
3997
|
+
// non-string effectiveComponent on the web/SSR side is just as likely to be an
|
|
3998
|
+
// ordinary web component (React Router's <Link>, Next.js's <Link>, any custom
|
|
3999
|
+
// wrapper) as an actual react-native-web primitive, and "not a string" alone isn't a
|
|
4000
|
+
// reliable signal either way. Forwarding them made React DOM warn "Unknown event
|
|
4001
|
+
// handler property" the moment any such component got an interactive modifier
|
|
4002
|
+
// (hover:, active:, …), which is the common case, not the exception.
|
|
4003
|
+
...!isNative ? hasInteractive ? {
|
|
3999
4004
|
onPointerDown: handlePointerDown,
|
|
4000
4005
|
onPointerUp: handlePointerUp,
|
|
4001
4006
|
onPointerLeave: handlePointerLeave,
|
|
4002
|
-
onPointerCancel: handlePointerCancel
|
|
4003
|
-
...typeof effectiveComponent !== "string" ? { onPressIn, onPressOut } : {}
|
|
4007
|
+
onPointerCancel: handlePointerCancel
|
|
4004
4008
|
} : {
|
|
4005
4009
|
onPointerDown,
|
|
4006
4010
|
onPointerUp,
|
|
4007
4011
|
onPointerLeave,
|
|
4008
|
-
onPointerCancel
|
|
4009
|
-
...typeof effectiveComponent !== "string" ? { onPressIn, onPressOut } : {}
|
|
4012
|
+
onPointerCancel
|
|
4010
4013
|
} : hasInteractive ? { onPressIn: handlePressIn, onPressOut: handlePressOut } : { onPressIn, onPressOut },
|
|
4011
4014
|
onMouseEnter: hasInteractive ? handleMouseEnter : onMouseEnter,
|
|
4012
4015
|
onMouseLeave: hasInteractive ? handleMouseLeave : onMouseLeave,
|
|
@@ -4127,19 +4130,24 @@ var InteractiveWrapper = (0, import_react8.forwardRef)(
|
|
|
4127
4130
|
...checked !== void 0 ? { checked } : {},
|
|
4128
4131
|
style: finalStyle,
|
|
4129
4132
|
...!isNative && className ? { className } : {},
|
|
4130
|
-
// On web, onPointerDown/Up drive the wrapper's own pressed state (covers mouse + touch)
|
|
4131
|
-
//
|
|
4132
|
-
//
|
|
4133
|
-
//
|
|
4134
|
-
//
|
|
4135
|
-
//
|
|
4136
|
-
//
|
|
4133
|
+
// On web, onPointerDown/Up drive the wrapper's own pressed state (covers mouse + touch) —
|
|
4134
|
+
// onPressIn/onPressOut are RN-only prop names and are never forwarded here, even when
|
|
4135
|
+
// Component isn't a literal HTML tag string. A non-string Component on web is just as
|
|
4136
|
+
// likely to be an ordinary web component (React Router's <Link>, Next.js's <Link>, any
|
|
4137
|
+
// custom wrapper) as an actual react-native-web primitive — "not a string" alone was never
|
|
4138
|
+
// a reliable signal that onPressIn/onPressOut are wanted, and forwarding them
|
|
4139
|
+
// unconditionally made React DOM warn "Unknown event handler property" the moment any web
|
|
4140
|
+
// component got an interactive modifier (hover:, active:, …), which is the common case,
|
|
4141
|
+
// not the exception. (A real react-native-web primitive would additionally have this pair
|
|
4142
|
+
// of props silently vanish after hydration anyway, once the browser-only web-substitution
|
|
4143
|
+
// in jsx-runtime.tsx swaps it for a plain host tag — so keeping them pre-hydration would
|
|
4144
|
+
// only have traded one prop-mismatch warning for another.) Genuinely native code paths
|
|
4145
|
+
// still get them via the isNative branch below.
|
|
4137
4146
|
...!isNative ? {
|
|
4138
4147
|
onPointerDown: handlePointerDown,
|
|
4139
4148
|
onPointerUp: handlePointerUp,
|
|
4140
4149
|
onPointerLeave: handlePointerLeave,
|
|
4141
|
-
onPointerCancel: handlePointerCancel
|
|
4142
|
-
...typeof Component !== "string" ? { onPressIn, onPressOut } : {}
|
|
4150
|
+
onPointerCancel: handlePointerCancel
|
|
4143
4151
|
} : { onPressIn: handlePressIn, onPressOut: handlePressOut },
|
|
4144
4152
|
onMouseEnter: handleMouseEnter,
|
|
4145
4153
|
onMouseLeave: handleMouseLeave,
|
package/dist/index.mjs
CHANGED
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
useGlobalDarkMode,
|
|
40
40
|
useGlobalWidth,
|
|
41
41
|
useSyncExternalStore
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-OWJUMH2V.mjs";
|
|
43
43
|
|
|
44
44
|
// src/context.tsx
|
|
45
45
|
import { createContext, useContext } from "react";
|
|
@@ -339,25 +339,28 @@ function styled(Component, baseClasses = "") {
|
|
|
339
339
|
...isWeb && combined ? { className: normalizeClassString(combined) } : {},
|
|
340
340
|
// Only attach state-tracking handlers when interactive modifiers are present.
|
|
341
341
|
// Always forward user-provided handlers to avoid silently swallowing them.
|
|
342
|
-
//
|
|
343
|
-
//
|
|
344
|
-
//
|
|
345
|
-
// string
|
|
346
|
-
//
|
|
347
|
-
//
|
|
348
|
-
//
|
|
349
|
-
|
|
342
|
+
// Gated on isNative, not isWeb: isWeb is false during SSR too (no `window` there),
|
|
343
|
+
// and onPressIn/onPressOut must stay excluded there as well — SSR is exactly where
|
|
344
|
+
// getWebTag() above is skipped (it's isWeb-gated), so effectiveComponent may still be
|
|
345
|
+
// a non-string RN-style reference server-side, and this used to forward onPressIn/
|
|
346
|
+
// onPressOut to it unconditionally in that case (isWeb ? ... : ...'s false branch
|
|
347
|
+
// covered both native AND SSR). onPressIn/onPressOut are RN-only prop names — a
|
|
348
|
+
// non-string effectiveComponent on the web/SSR side is just as likely to be an
|
|
349
|
+
// ordinary web component (React Router's <Link>, Next.js's <Link>, any custom
|
|
350
|
+
// wrapper) as an actual react-native-web primitive, and "not a string" alone isn't a
|
|
351
|
+
// reliable signal either way. Forwarding them made React DOM warn "Unknown event
|
|
352
|
+
// handler property" the moment any such component got an interactive modifier
|
|
353
|
+
// (hover:, active:, …), which is the common case, not the exception.
|
|
354
|
+
...!isNative ? hasInteractive ? {
|
|
350
355
|
onPointerDown: handlePointerDown,
|
|
351
356
|
onPointerUp: handlePointerUp,
|
|
352
357
|
onPointerLeave: handlePointerLeave,
|
|
353
|
-
onPointerCancel: handlePointerCancel
|
|
354
|
-
...typeof effectiveComponent !== "string" ? { onPressIn, onPressOut } : {}
|
|
358
|
+
onPointerCancel: handlePointerCancel
|
|
355
359
|
} : {
|
|
356
360
|
onPointerDown,
|
|
357
361
|
onPointerUp,
|
|
358
362
|
onPointerLeave,
|
|
359
|
-
onPointerCancel
|
|
360
|
-
...typeof effectiveComponent !== "string" ? { onPressIn, onPressOut } : {}
|
|
363
|
+
onPointerCancel
|
|
361
364
|
} : hasInteractive ? { onPressIn: handlePressIn, onPressOut: handlePressOut } : { onPressIn, onPressOut },
|
|
362
365
|
onMouseEnter: hasInteractive ? handleMouseEnter : onMouseEnter,
|
|
363
366
|
onMouseLeave: hasInteractive ? handleMouseLeave : onMouseLeave,
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -3391,19 +3391,24 @@ var InteractiveWrapper = (0, import_react2.forwardRef)(
|
|
|
3391
3391
|
...checked !== void 0 ? { checked } : {},
|
|
3392
3392
|
style: finalStyle,
|
|
3393
3393
|
...!isNative && className ? { className } : {},
|
|
3394
|
-
// On web, onPointerDown/Up drive the wrapper's own pressed state (covers mouse + touch)
|
|
3395
|
-
//
|
|
3396
|
-
//
|
|
3397
|
-
//
|
|
3398
|
-
//
|
|
3399
|
-
//
|
|
3400
|
-
//
|
|
3394
|
+
// On web, onPointerDown/Up drive the wrapper's own pressed state (covers mouse + touch) —
|
|
3395
|
+
// onPressIn/onPressOut are RN-only prop names and are never forwarded here, even when
|
|
3396
|
+
// Component isn't a literal HTML tag string. A non-string Component on web is just as
|
|
3397
|
+
// likely to be an ordinary web component (React Router's <Link>, Next.js's <Link>, any
|
|
3398
|
+
// custom wrapper) as an actual react-native-web primitive — "not a string" alone was never
|
|
3399
|
+
// a reliable signal that onPressIn/onPressOut are wanted, and forwarding them
|
|
3400
|
+
// unconditionally made React DOM warn "Unknown event handler property" the moment any web
|
|
3401
|
+
// component got an interactive modifier (hover:, active:, …), which is the common case,
|
|
3402
|
+
// not the exception. (A real react-native-web primitive would additionally have this pair
|
|
3403
|
+
// of props silently vanish after hydration anyway, once the browser-only web-substitution
|
|
3404
|
+
// in jsx-runtime.tsx swaps it for a plain host tag — so keeping them pre-hydration would
|
|
3405
|
+
// only have traded one prop-mismatch warning for another.) Genuinely native code paths
|
|
3406
|
+
// still get them via the isNative branch below.
|
|
3401
3407
|
...!isNative ? {
|
|
3402
3408
|
onPointerDown: handlePointerDown,
|
|
3403
3409
|
onPointerUp: handlePointerUp,
|
|
3404
3410
|
onPointerLeave: handlePointerLeave,
|
|
3405
|
-
onPointerCancel: handlePointerCancel
|
|
3406
|
-
...typeof Component !== "string" ? { onPressIn, onPressOut } : {}
|
|
3411
|
+
onPointerCancel: handlePointerCancel
|
|
3407
3412
|
} : { onPressIn: handlePressIn, onPressOut: handlePressOut },
|
|
3408
3413
|
onMouseEnter: handleMouseEnter,
|
|
3409
3414
|
onMouseLeave: handleMouseLeave,
|
package/dist/jsx-dev-runtime.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
Fragment,
|
|
4
4
|
jsx,
|
|
5
5
|
jsxs
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-Z5SUFJ53.mjs";
|
|
7
|
+
import "./chunk-OWJUMH2V.mjs";
|
|
8
8
|
|
|
9
9
|
// src/jsx-dev-runtime.tsx
|
|
10
10
|
function jsxDEV(type, props, key, isStaticChildren, source, self) {
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -3392,19 +3392,24 @@ var InteractiveWrapper = (0, import_react2.forwardRef)(
|
|
|
3392
3392
|
...checked !== void 0 ? { checked } : {},
|
|
3393
3393
|
style: finalStyle,
|
|
3394
3394
|
...!isNative && className ? { className } : {},
|
|
3395
|
-
// On web, onPointerDown/Up drive the wrapper's own pressed state (covers mouse + touch)
|
|
3396
|
-
//
|
|
3397
|
-
//
|
|
3398
|
-
//
|
|
3399
|
-
//
|
|
3400
|
-
//
|
|
3401
|
-
//
|
|
3395
|
+
// On web, onPointerDown/Up drive the wrapper's own pressed state (covers mouse + touch) —
|
|
3396
|
+
// onPressIn/onPressOut are RN-only prop names and are never forwarded here, even when
|
|
3397
|
+
// Component isn't a literal HTML tag string. A non-string Component on web is just as
|
|
3398
|
+
// likely to be an ordinary web component (React Router's <Link>, Next.js's <Link>, any
|
|
3399
|
+
// custom wrapper) as an actual react-native-web primitive — "not a string" alone was never
|
|
3400
|
+
// a reliable signal that onPressIn/onPressOut are wanted, and forwarding them
|
|
3401
|
+
// unconditionally made React DOM warn "Unknown event handler property" the moment any web
|
|
3402
|
+
// component got an interactive modifier (hover:, active:, …), which is the common case,
|
|
3403
|
+
// not the exception. (A real react-native-web primitive would additionally have this pair
|
|
3404
|
+
// of props silently vanish after hydration anyway, once the browser-only web-substitution
|
|
3405
|
+
// in jsx-runtime.tsx swaps it for a plain host tag — so keeping them pre-hydration would
|
|
3406
|
+
// only have traded one prop-mismatch warning for another.) Genuinely native code paths
|
|
3407
|
+
// still get them via the isNative branch below.
|
|
3402
3408
|
...!isNative ? {
|
|
3403
3409
|
onPointerDown: handlePointerDown,
|
|
3404
3410
|
onPointerUp: handlePointerUp,
|
|
3405
3411
|
onPointerLeave: handlePointerLeave,
|
|
3406
|
-
onPointerCancel: handlePointerCancel
|
|
3407
|
-
...typeof Component !== "string" ? { onPressIn, onPressOut } : {}
|
|
3412
|
+
onPointerCancel: handlePointerCancel
|
|
3408
3413
|
} : { onPressIn: handlePressIn, onPressOut: handlePressOut },
|
|
3409
3414
|
onMouseEnter: handleMouseEnter,
|
|
3410
3415
|
onMouseLeave: handleMouseLeave,
|
package/dist/jsx-runtime.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
_invalidateDefaultFontCache,
|
|
5
5
|
jsx,
|
|
6
6
|
jsxs
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Z5SUFJ53.mjs";
|
|
8
8
|
import {
|
|
9
9
|
registerWebElement
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OWJUMH2V.mjs";
|
|
11
11
|
export {
|
|
12
12
|
Fragment,
|
|
13
13
|
_invalidateDefaultFontCache,
|