@kbach/react 0.5.38 → 0.5.41

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.
@@ -2,9 +2,11 @@ import {
2
2
  flatten,
3
3
  getActiveBreakpoints,
4
4
  getGlobalWidth,
5
+ getResponsiveModifiers,
6
+ isNative,
5
7
  isWeb,
6
8
  subscribeGlobalWidth
7
- } from "./chunk-NWVL4BES.mjs";
9
+ } from "./chunk-VCNP57PR.mjs";
8
10
 
9
11
  // src/core/darkModeStore.ts
10
12
  var KEY = "__kbach_dark_store__";
@@ -107,23 +109,26 @@ function useConditionalWidth(active) {
107
109
  );
108
110
  }
109
111
 
110
- // src/InteractiveWrapper.tsx
111
- function chain(original, extra) {
112
- return (...args) => {
113
- original?.(...args);
114
- extra();
115
- };
116
- }
117
- var RESPONSIVE_MODS = /* @__PURE__ */ new Set(["sm", "md", "lg", "xl", "2xl"]);
112
+ // src/shared-utils.ts
118
113
  function hasResponsiveBuckets(resolved) {
114
+ const responsiveMods = getResponsiveModifiers();
119
115
  for (const key of Object.keys(resolved)) {
120
116
  if (key === "base") continue;
121
117
  for (const mod of key.split(":")) {
122
- if (RESPONSIVE_MODS.has(mod)) return true;
118
+ if (responsiveMods.has(mod)) return true;
123
119
  }
124
120
  }
125
121
  return false;
126
122
  }
123
+ var EMPTY_BREAKPOINTS2 = /* @__PURE__ */ new Set();
124
+
125
+ // src/InteractiveWrapper.tsx
126
+ function chain(original, extra) {
127
+ return (...args) => {
128
+ original?.(...args);
129
+ extra();
130
+ };
131
+ }
127
132
  var InteractiveWrapper = forwardRef(
128
133
  function InteractiveWrapper2({
129
134
  Component,
@@ -199,10 +204,10 @@ var InteractiveWrapper = forwardRef(
199
204
  ref,
200
205
  ...restWithoutChildren,
201
206
  style: finalStyle,
202
- ...isWeb && className ? { className } : {},
207
+ ...!isNative && className ? { className } : {},
203
208
  // onPressIn / onPressOut are React Native-only.
204
209
  // On web, onPointerDown/Up drive the pressed state instead (covers mouse + touch).
205
- ...isWeb ? { onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, onPointerLeave: handlePointerLeave } : { onPressIn: handlePressIn, onPressOut: handlePressOut },
210
+ ...!isNative ? { onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, onPointerLeave: handlePointerLeave } : { onPressIn: handlePressIn, onPressOut: handlePressOut },
206
211
  onMouseEnter: handleMouseEnter,
207
212
  onMouseLeave: handleMouseLeave,
208
213
  onFocus: handleFocus,
@@ -219,6 +224,8 @@ export {
219
224
  EMPTY_BREAKPOINTS,
220
225
  useGlobalWidth,
221
226
  useConditionalWidth,
227
+ hasResponsiveBuckets,
228
+ EMPTY_BREAKPOINTS2,
222
229
  useGlobalDarkMode,
223
230
  InteractiveWrapper
224
231
  };