@kbach/react 0.6.29 → 0.6.30

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.
@@ -111,10 +111,16 @@ function mergeStyle(computed, userStyle) {
111
111
  return { ...computed, ...userStyle };
112
112
  }
113
113
  function withImpliedFlexIfNeeded(webTag, resolvedBase, userStyle) {
114
- if (!webTag || !resolvedBase || resolvedBase.display !== void 0 || !("flexGrow" in resolvedBase || "flexShrink" in resolvedBase || "flex" in resolvedBase)) {
115
- return userStyle;
116
- }
117
- return Array.isArray(userStyle) ? [{ display: "flex" }, ...userStyle] : { display: "flex", ...userStyle };
114
+ if (!webTag || !resolvedBase) return userStyle;
115
+ const explicitDisplay = resolvedBase.display;
116
+ const hasFlexItemProps = "flexGrow" in resolvedBase || "flexShrink" in resolvedBase || "flex" in resolvedBase;
117
+ const willBeFlex = explicitDisplay === "flex" || explicitDisplay === void 0 && hasFlexItemProps;
118
+ if (!willBeFlex) return userStyle;
119
+ const compensation = {};
120
+ if (explicitDisplay === void 0) compensation.display = "flex";
121
+ if (resolvedBase.flexDirection === void 0) compensation.flexDirection = "column";
122
+ if (Object.keys(compensation).length === 0) return userStyle;
123
+ return Array.isArray(userStyle) ? [compensation, ...userStyle] : { ...compensation, ...userStyle };
118
124
  }
119
125
  function makeElement(isStaticChildren, type, props, key) {
120
126
  return (isStaticChildren ? _jsxs : _jsx)(type, props, key);
@@ -623,10 +623,16 @@ function mergeStyle(computed, userStyle) {
623
623
  return { ...computed, ...userStyle };
624
624
  }
625
625
  function withImpliedFlexIfNeeded(webTag, resolvedBase, userStyle) {
626
- if (!webTag || !resolvedBase || resolvedBase.display !== void 0 || !("flexGrow" in resolvedBase || "flexShrink" in resolvedBase || "flex" in resolvedBase)) {
627
- return userStyle;
628
- }
629
- return Array.isArray(userStyle) ? [{ display: "flex" }, ...userStyle] : { display: "flex", ...userStyle };
626
+ if (!webTag || !resolvedBase) return userStyle;
627
+ const explicitDisplay = resolvedBase.display;
628
+ const hasFlexItemProps = "flexGrow" in resolvedBase || "flexShrink" in resolvedBase || "flex" in resolvedBase;
629
+ const willBeFlex = explicitDisplay === "flex" || explicitDisplay === void 0 && hasFlexItemProps;
630
+ if (!willBeFlex) return userStyle;
631
+ const compensation = {};
632
+ if (explicitDisplay === void 0) compensation.display = "flex";
633
+ if (resolvedBase.flexDirection === void 0) compensation.flexDirection = "column";
634
+ if (Object.keys(compensation).length === 0) return userStyle;
635
+ return Array.isArray(userStyle) ? [compensation, ...userStyle] : { ...compensation, ...userStyle };
630
636
  }
631
637
  function makeElement(isStaticChildren, type, props, key) {
632
638
  return (isStaticChildren ? import_jsx_runtime.jsxs : import_jsx_runtime.jsx)(type, props, key);
@@ -3,7 +3,7 @@ import {
3
3
  Fragment,
4
4
  jsx,
5
5
  jsxs
6
- } from "./chunk-S6AHQ5M6.mjs";
6
+ } from "./chunk-FF4AZQIQ.mjs";
7
7
  import "./chunk-TKBIGAR2.mjs";
8
8
 
9
9
  // src/jsx-dev-runtime.tsx
@@ -629,10 +629,16 @@ function mergeStyle(computed, userStyle) {
629
629
  return { ...computed, ...userStyle };
630
630
  }
631
631
  function withImpliedFlexIfNeeded(webTag, resolvedBase, userStyle) {
632
- if (!webTag || !resolvedBase || resolvedBase.display !== void 0 || !("flexGrow" in resolvedBase || "flexShrink" in resolvedBase || "flex" in resolvedBase)) {
633
- return userStyle;
634
- }
635
- return Array.isArray(userStyle) ? [{ display: "flex" }, ...userStyle] : { display: "flex", ...userStyle };
632
+ if (!webTag || !resolvedBase) return userStyle;
633
+ const explicitDisplay = resolvedBase.display;
634
+ const hasFlexItemProps = "flexGrow" in resolvedBase || "flexShrink" in resolvedBase || "flex" in resolvedBase;
635
+ const willBeFlex = explicitDisplay === "flex" || explicitDisplay === void 0 && hasFlexItemProps;
636
+ if (!willBeFlex) return userStyle;
637
+ const compensation = {};
638
+ if (explicitDisplay === void 0) compensation.display = "flex";
639
+ if (resolvedBase.flexDirection === void 0) compensation.flexDirection = "column";
640
+ if (Object.keys(compensation).length === 0) return userStyle;
641
+ return Array.isArray(userStyle) ? [compensation, ...userStyle] : { ...compensation, ...userStyle };
636
642
  }
637
643
  function makeElement(isStaticChildren, type, props, key) {
638
644
  return (isStaticChildren ? import_jsx_runtime.jsxs : import_jsx_runtime.jsx)(type, props, key);
@@ -4,7 +4,7 @@ import {
4
4
  _invalidateDefaultFontCache,
5
5
  jsx,
6
6
  jsxs
7
- } from "./chunk-S6AHQ5M6.mjs";
7
+ } from "./chunk-FF4AZQIQ.mjs";
8
8
  import {
9
9
  registerWebElement
10
10
  } from "./chunk-TKBIGAR2.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.6.29",
3
+ "version": "0.6.30",
4
4
  "description": "React / React Native components and hooks for the Kbach framework",
5
5
  "repository": {
6
6
  "type": "git",