@kbach/react 0.6.46 → 0.6.47
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-FYVFEEFX.mjs → chunk-5HY7Z2PS.mjs} +25 -2
- package/dist/{chunk-4Y44K364.mjs → chunk-WW3NH5W2.mjs} +4 -2
- package/dist/core/index.js +25 -2
- package/dist/index.mjs +1 -1
- package/dist/jsx-dev-runtime.js +3 -1
- package/dist/jsx-dev-runtime.mjs +2 -2
- package/dist/jsx-runtime.js +3 -1
- package/dist/jsx-runtime.mjs +2 -2
- package/package.json +1 -1
|
@@ -3106,6 +3106,27 @@ var CSS_UNITLESS = /* @__PURE__ */ new Set([
|
|
|
3106
3106
|
"gridRowStart",
|
|
3107
3107
|
"gridRowEnd"
|
|
3108
3108
|
]);
|
|
3109
|
+
var TEXT_ONLY_STYLE_KEYS = [
|
|
3110
|
+
"color",
|
|
3111
|
+
"fontSize",
|
|
3112
|
+
"fontWeight",
|
|
3113
|
+
"fontStyle",
|
|
3114
|
+
"fontVariant",
|
|
3115
|
+
"letterSpacing",
|
|
3116
|
+
"lineHeight",
|
|
3117
|
+
"textAlign",
|
|
3118
|
+
"textAlignVertical",
|
|
3119
|
+
"textDecorationLine",
|
|
3120
|
+
"textDecorationColor",
|
|
3121
|
+
"textDecorationStyle",
|
|
3122
|
+
"textShadowColor",
|
|
3123
|
+
"textShadowOffset",
|
|
3124
|
+
"textShadowRadius",
|
|
3125
|
+
"textTransform",
|
|
3126
|
+
"writingDirection",
|
|
3127
|
+
"includeFontPadding",
|
|
3128
|
+
"verticalAlign"
|
|
3129
|
+
];
|
|
3109
3130
|
var RN_SHORTHAND_EXPAND = {
|
|
3110
3131
|
marginHorizontal: ["margin-left", "margin-right"],
|
|
3111
3132
|
marginVertical: ["margin-top", "margin-bottom"],
|
|
@@ -3265,8 +3286,10 @@ function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new
|
|
|
3265
3286
|
}
|
|
3266
3287
|
if (isNative) {
|
|
3267
3288
|
const defaultFont = getDefaultFontFamily();
|
|
3268
|
-
|
|
3269
|
-
|
|
3289
|
+
const r = result;
|
|
3290
|
+
const looksLikeText = TEXT_ONLY_STYLE_KEYS.some((k) => k in r);
|
|
3291
|
+
if (defaultFont && looksLikeText && !("fontFamily" in r)) {
|
|
3292
|
+
r.fontFamily = defaultFont;
|
|
3270
3293
|
}
|
|
3271
3294
|
}
|
|
3272
3295
|
if (!isNative) {
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
transformToWebProps,
|
|
27
27
|
useConditionalGlobalDarkMode,
|
|
28
28
|
useConditionalWidth
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-5HY7Z2PS.mjs";
|
|
30
30
|
|
|
31
31
|
// src/jsx-runtime.tsx
|
|
32
32
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -144,7 +144,9 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
144
144
|
if (!classStr && !__kbachStyles) {
|
|
145
145
|
if (getEffectiveIsWeb()) return makeElement(isStaticChildren, effectiveType, omitConsumed(workingProps), key);
|
|
146
146
|
const defaultFont = getCachedDefaultFont();
|
|
147
|
-
if (!defaultFont
|
|
147
|
+
if (!defaultFont || getWebTag(type) !== "span") {
|
|
148
|
+
return makeElement(isStaticChildren, effectiveType, workingProps, key);
|
|
149
|
+
}
|
|
148
150
|
const { style: userStyle2, ...passProps2 } = omitConsumed(workingProps);
|
|
149
151
|
const finalStyle2 = userStyle2 ? Array.isArray(userStyle2) ? { fontFamily: defaultFont, ...Object.assign({}, ...userStyle2) } : { fontFamily: defaultFont, ...userStyle2 } : { fontFamily: defaultFont };
|
|
150
152
|
return makeElement(isStaticChildren, effectiveType, { ...passProps2, style: finalStyle2 }, key);
|
package/dist/core/index.js
CHANGED
|
@@ -3194,6 +3194,27 @@ var CSS_UNITLESS = /* @__PURE__ */ new Set([
|
|
|
3194
3194
|
"gridRowStart",
|
|
3195
3195
|
"gridRowEnd"
|
|
3196
3196
|
]);
|
|
3197
|
+
var TEXT_ONLY_STYLE_KEYS = [
|
|
3198
|
+
"color",
|
|
3199
|
+
"fontSize",
|
|
3200
|
+
"fontWeight",
|
|
3201
|
+
"fontStyle",
|
|
3202
|
+
"fontVariant",
|
|
3203
|
+
"letterSpacing",
|
|
3204
|
+
"lineHeight",
|
|
3205
|
+
"textAlign",
|
|
3206
|
+
"textAlignVertical",
|
|
3207
|
+
"textDecorationLine",
|
|
3208
|
+
"textDecorationColor",
|
|
3209
|
+
"textDecorationStyle",
|
|
3210
|
+
"textShadowColor",
|
|
3211
|
+
"textShadowOffset",
|
|
3212
|
+
"textShadowRadius",
|
|
3213
|
+
"textTransform",
|
|
3214
|
+
"writingDirection",
|
|
3215
|
+
"includeFontPadding",
|
|
3216
|
+
"verticalAlign"
|
|
3217
|
+
];
|
|
3197
3218
|
var RN_SHORTHAND_EXPAND = {
|
|
3198
3219
|
marginHorizontal: ["margin-left", "margin-right"],
|
|
3199
3220
|
marginVertical: ["margin-top", "margin-bottom"],
|
|
@@ -3363,8 +3384,10 @@ function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new
|
|
|
3363
3384
|
}
|
|
3364
3385
|
if (isNative) {
|
|
3365
3386
|
const defaultFont = getDefaultFontFamily();
|
|
3366
|
-
|
|
3367
|
-
|
|
3387
|
+
const r = result;
|
|
3388
|
+
const looksLikeText = TEXT_ONLY_STYLE_KEYS.some((k) => k in r);
|
|
3389
|
+
if (defaultFont && looksLikeText && !("fontFamily" in r)) {
|
|
3390
|
+
r.fontFamily = defaultFont;
|
|
3368
3391
|
}
|
|
3369
3392
|
}
|
|
3370
3393
|
if (!isNative) {
|
package/dist/index.mjs
CHANGED
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -682,7 +682,9 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
682
682
|
if (!classStr && !__kbachStyles) {
|
|
683
683
|
if ((0, import_core6.getEffectiveIsWeb)()) return makeElement(isStaticChildren, effectiveType, omitConsumed(workingProps), key);
|
|
684
684
|
const defaultFont = getCachedDefaultFont();
|
|
685
|
-
if (!defaultFont
|
|
685
|
+
if (!defaultFont || getWebTag(type) !== "span") {
|
|
686
|
+
return makeElement(isStaticChildren, effectiveType, workingProps, key);
|
|
687
|
+
}
|
|
686
688
|
const { style: userStyle2, ...passProps2 } = omitConsumed(workingProps);
|
|
687
689
|
const finalStyle2 = userStyle2 ? Array.isArray(userStyle2) ? { fontFamily: defaultFont, ...Object.assign({}, ...userStyle2) } : { fontFamily: defaultFont, ...userStyle2 } : { fontFamily: defaultFont };
|
|
688
690
|
return makeElement(isStaticChildren, effectiveType, { ...passProps2, style: finalStyle2 }, key);
|
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-WW3NH5W2.mjs";
|
|
7
|
+
import "./chunk-5HY7Z2PS.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
|
@@ -688,7 +688,9 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
688
688
|
if (!classStr && !__kbachStyles) {
|
|
689
689
|
if ((0, import_core6.getEffectiveIsWeb)()) return makeElement(isStaticChildren, effectiveType, omitConsumed(workingProps), key);
|
|
690
690
|
const defaultFont = getCachedDefaultFont();
|
|
691
|
-
if (!defaultFont
|
|
691
|
+
if (!defaultFont || getWebTag(type) !== "span") {
|
|
692
|
+
return makeElement(isStaticChildren, effectiveType, workingProps, key);
|
|
693
|
+
}
|
|
692
694
|
const { style: userStyle2, ...passProps2 } = omitConsumed(workingProps);
|
|
693
695
|
const finalStyle2 = userStyle2 ? Array.isArray(userStyle2) ? { fontFamily: defaultFont, ...Object.assign({}, ...userStyle2) } : { fontFamily: defaultFont, ...userStyle2 } : { fontFamily: defaultFont };
|
|
694
696
|
return makeElement(isStaticChildren, effectiveType, { ...passProps2, style: finalStyle2 }, key);
|
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-WW3NH5W2.mjs";
|
|
8
8
|
import {
|
|
9
9
|
registerWebElement
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5HY7Z2PS.mjs";
|
|
11
11
|
export {
|
|
12
12
|
Fragment,
|
|
13
13
|
_invalidateDefaultFontCache,
|