@kbach/react 0.5.55 → 0.5.57

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.
@@ -6,7 +6,7 @@ import {
6
6
  transformToWebProps,
7
7
  useConditionalWidth,
8
8
  useGlobalDarkMode
9
- } from "./chunk-PESA3FMP.mjs";
9
+ } from "./chunk-VWEYYCBW.mjs";
10
10
  import {
11
11
  flatten,
12
12
  getActiveBreakpoints,
@@ -138,7 +138,7 @@ var _rnOnlyProps = /* @__PURE__ */ new Set([
138
138
  "showsVerticalScrollIndicator",
139
139
  "showsHorizontalScrollIndicator",
140
140
  "contentContainerStyle",
141
- "horizontal",
141
+ // 'horizontal' is handled in transformToWebProps (converted to CSS overflow-x).
142
142
  "keyboardShouldPersistTaps",
143
143
  "keyboardDismissMode",
144
144
  "pagingEnabled",
@@ -222,6 +222,7 @@ function transformToWebProps(originalName, tag, props) {
222
222
  const isPressable = _pressableNames.has(originalName);
223
223
  const isTextInput = originalName === "TextInput";
224
224
  const isImage = originalName === "Image" || originalName === "ImageBackground";
225
+ const isScrollable = originalName === "ScrollView" || originalName === "FlatList" || originalName === "SectionList";
225
226
  for (const [k, v] of Object.entries(props)) {
226
227
  if (_rnOnlyProps.has(k)) continue;
227
228
  if (k === "onPress") {
@@ -265,9 +266,18 @@ function transformToWebProps(originalName, tag, props) {
265
266
  continue;
266
267
  }
267
268
  }
269
+ if (isScrollable && k === "horizontal") {
270
+ if (v) {
271
+ const existing = out.style ?? {};
272
+ out.style = { display: "flex", flexDirection: "row", overflowX: "auto", ...existing };
273
+ }
274
+ continue;
275
+ }
268
276
  if (isImage) {
269
277
  if (k === "source") {
270
- if (v && typeof v === "object" && "uri" in v) {
278
+ if (typeof v === "string") {
279
+ out.src = v;
280
+ } else if (v && typeof v === "object" && "uri" in v) {
271
281
  out.src = v.uri;
272
282
  if (v.headers) out["crossOrigin"] = "anonymous";
273
283
  }
package/dist/index.js CHANGED
@@ -3640,7 +3640,7 @@ var _rnOnlyProps = /* @__PURE__ */ new Set([
3640
3640
  "showsVerticalScrollIndicator",
3641
3641
  "showsHorizontalScrollIndicator",
3642
3642
  "contentContainerStyle",
3643
- "horizontal",
3643
+ // 'horizontal' is handled in transformToWebProps (converted to CSS overflow-x).
3644
3644
  "keyboardShouldPersistTaps",
3645
3645
  "keyboardDismissMode",
3646
3646
  "pagingEnabled",
@@ -3724,6 +3724,7 @@ function transformToWebProps(originalName, tag, props) {
3724
3724
  const isPressable = _pressableNames.has(originalName);
3725
3725
  const isTextInput = originalName === "TextInput";
3726
3726
  const isImage = originalName === "Image" || originalName === "ImageBackground";
3727
+ const isScrollable = originalName === "ScrollView" || originalName === "FlatList" || originalName === "SectionList";
3727
3728
  for (const [k, v] of Object.entries(props)) {
3728
3729
  if (_rnOnlyProps.has(k)) continue;
3729
3730
  if (k === "onPress") {
@@ -3767,9 +3768,18 @@ function transformToWebProps(originalName, tag, props) {
3767
3768
  continue;
3768
3769
  }
3769
3770
  }
3771
+ if (isScrollable && k === "horizontal") {
3772
+ if (v) {
3773
+ const existing = out.style ?? {};
3774
+ out.style = { display: "flex", flexDirection: "row", overflowX: "auto", ...existing };
3775
+ }
3776
+ continue;
3777
+ }
3770
3778
  if (isImage) {
3771
3779
  if (k === "source") {
3772
- if (v && typeof v === "object" && "uri" in v) {
3780
+ if (typeof v === "string") {
3781
+ out.src = v;
3782
+ } else if (v && typeof v === "object" && "uri" in v) {
3773
3783
  out.src = v.uri;
3774
3784
  if (v.headers) out["crossOrigin"] = "anonymous";
3775
3785
  }
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  useConditionalWidth,
12
12
  useGlobalDarkMode,
13
13
  useGlobalWidth
14
- } from "./chunk-PESA3FMP.mjs";
14
+ } from "./chunk-VWEYYCBW.mjs";
15
15
  import {
16
16
  __require,
17
17
  buildConfig,
@@ -3355,7 +3355,7 @@ var _rnOnlyProps = /* @__PURE__ */ new Set([
3355
3355
  "showsVerticalScrollIndicator",
3356
3356
  "showsHorizontalScrollIndicator",
3357
3357
  "contentContainerStyle",
3358
- "horizontal",
3358
+ // 'horizontal' is handled in transformToWebProps (converted to CSS overflow-x).
3359
3359
  "keyboardShouldPersistTaps",
3360
3360
  "keyboardDismissMode",
3361
3361
  "pagingEnabled",
@@ -3439,6 +3439,7 @@ function transformToWebProps(originalName, tag, props) {
3439
3439
  const isPressable = _pressableNames.has(originalName);
3440
3440
  const isTextInput = originalName === "TextInput";
3441
3441
  const isImage = originalName === "Image" || originalName === "ImageBackground";
3442
+ const isScrollable = originalName === "ScrollView" || originalName === "FlatList" || originalName === "SectionList";
3442
3443
  for (const [k, v] of Object.entries(props)) {
3443
3444
  if (_rnOnlyProps.has(k)) continue;
3444
3445
  if (k === "onPress") {
@@ -3482,9 +3483,18 @@ function transformToWebProps(originalName, tag, props) {
3482
3483
  continue;
3483
3484
  }
3484
3485
  }
3486
+ if (isScrollable && k === "horizontal") {
3487
+ if (v) {
3488
+ const existing = out.style ?? {};
3489
+ out.style = { display: "flex", flexDirection: "row", overflowX: "auto", ...existing };
3490
+ }
3491
+ continue;
3492
+ }
3485
3493
  if (isImage) {
3486
3494
  if (k === "source") {
3487
- if (v && typeof v === "object" && "uri" in v) {
3495
+ if (typeof v === "string") {
3496
+ out.src = v;
3497
+ } else if (v && typeof v === "object" && "uri" in v) {
3488
3498
  out.src = v.uri;
3489
3499
  if (v.headers) out["crossOrigin"] = "anonymous";
3490
3500
  }
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-O4EKWQSX.mjs";
6
- import "./chunk-PESA3FMP.mjs";
5
+ } from "./chunk-UJBMEM6N.mjs";
6
+ import "./chunk-VWEYYCBW.mjs";
7
7
  import "./chunk-JBV2R655.mjs";
8
8
 
9
9
  // src/jsx-dev-runtime.tsx
@@ -3361,7 +3361,7 @@ var _rnOnlyProps = /* @__PURE__ */ new Set([
3361
3361
  "showsVerticalScrollIndicator",
3362
3362
  "showsHorizontalScrollIndicator",
3363
3363
  "contentContainerStyle",
3364
- "horizontal",
3364
+ // 'horizontal' is handled in transformToWebProps (converted to CSS overflow-x).
3365
3365
  "keyboardShouldPersistTaps",
3366
3366
  "keyboardDismissMode",
3367
3367
  "pagingEnabled",
@@ -3445,6 +3445,7 @@ function transformToWebProps(originalName, tag, props) {
3445
3445
  const isPressable = _pressableNames.has(originalName);
3446
3446
  const isTextInput = originalName === "TextInput";
3447
3447
  const isImage = originalName === "Image" || originalName === "ImageBackground";
3448
+ const isScrollable = originalName === "ScrollView" || originalName === "FlatList" || originalName === "SectionList";
3448
3449
  for (const [k, v] of Object.entries(props)) {
3449
3450
  if (_rnOnlyProps.has(k)) continue;
3450
3451
  if (k === "onPress") {
@@ -3488,9 +3489,18 @@ function transformToWebProps(originalName, tag, props) {
3488
3489
  continue;
3489
3490
  }
3490
3491
  }
3492
+ if (isScrollable && k === "horizontal") {
3493
+ if (v) {
3494
+ const existing = out.style ?? {};
3495
+ out.style = { display: "flex", flexDirection: "row", overflowX: "auto", ...existing };
3496
+ }
3497
+ continue;
3498
+ }
3491
3499
  if (isImage) {
3492
3500
  if (k === "source") {
3493
- if (v && typeof v === "object" && "uri" in v) {
3501
+ if (typeof v === "string") {
3502
+ out.src = v;
3503
+ } else if (v && typeof v === "object" && "uri" in v) {
3494
3504
  out.src = v.uri;
3495
3505
  if (v.headers) out["crossOrigin"] = "anonymous";
3496
3506
  }
@@ -3,10 +3,10 @@ import {
3
3
  _invalidateDefaultFontCache,
4
4
  jsx,
5
5
  jsxs
6
- } from "./chunk-O4EKWQSX.mjs";
6
+ } from "./chunk-UJBMEM6N.mjs";
7
7
  import {
8
8
  registerWebElement
9
- } from "./chunk-PESA3FMP.mjs";
9
+ } from "./chunk-VWEYYCBW.mjs";
10
10
  import "./chunk-JBV2R655.mjs";
11
11
  export {
12
12
  Fragment,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.5.55",
3
+ "version": "0.5.57",
4
4
  "description": "React / React Native components and hooks for the Kbach framework",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",