@kbach/react 0.6.43 → 0.6.45
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-SKXO5XEY.mjs → chunk-ERIVGK24.mjs} +1 -1
- package/dist/{chunk-35JCNDLF.mjs → chunk-VB6KOAZZ.mjs} +6 -2
- package/dist/core/index.js +6 -2
- package/dist/index.mjs +1 -1
- package/dist/jsx-dev-runtime.mjs +2 -2
- package/dist/jsx-runtime.mjs +2 -2
- package/dist/vite-plugin.js +1 -1
- package/dist/vite-plugin.mjs +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/core/platform.ts
|
|
4
4
|
var isWeb = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
5
|
-
var isNative = !isWeb && (typeof globalThis.HermesInternal !== "undefined" || typeof globalThis.__fbBatchedBridge !== "undefined" || typeof navigator !== "undefined" && navigator.product === "ReactNative" || typeof globalThis.__REACT_NATIVE__ !== "undefined");
|
|
5
|
+
var isNative = !isWeb && (typeof globalThis.HermesInternal !== "undefined" || typeof globalThis.__fbBatchedBridge !== "undefined" || typeof navigator !== "undefined" && navigator.product === "ReactNative" || typeof globalThis.__REACT_NATIVE__ !== "undefined" || typeof globalThis.nativeFabricUIManager !== "undefined" || typeof globalThis.__turboModuleProxy !== "undefined" || typeof globalThis.RN$Bridgeless !== "undefined" || typeof globalThis.nativePerformanceNow !== "undefined");
|
|
6
6
|
var _resolveTargetOverride = null;
|
|
7
7
|
function setResolveTarget(target) {
|
|
8
8
|
_resolveTargetOverride = target;
|
|
@@ -3212,6 +3212,10 @@ function injectClassRule(cls, bucketKey, styles, darkMode, important, order) {
|
|
|
3212
3212
|
for (const r of cssRules) injectRule(r, order);
|
|
3213
3213
|
return cssRules;
|
|
3214
3214
|
}
|
|
3215
|
+
function isPureDisplayStyle(styles) {
|
|
3216
|
+
const keys = Object.keys(styles);
|
|
3217
|
+
return keys.length === 1 && keys[0] === "display";
|
|
3218
|
+
}
|
|
3215
3219
|
function resolve(classString, theme, darkMode = "attribute") {
|
|
3216
3220
|
const cache = getThemeCache(theme);
|
|
3217
3221
|
const cacheKey = `${classString}::${darkMode}::${getEffectiveIsWeb() ? "web" : "native"}`;
|
|
@@ -3237,7 +3241,7 @@ function resolve(classString, theme, darkMode = "attribute") {
|
|
|
3237
3241
|
if (!result[bucketKey]) result[bucketKey] = {};
|
|
3238
3242
|
Object.assign(result[bucketKey], styles);
|
|
3239
3243
|
if (onWeb) {
|
|
3240
|
-
const order = getModifierOrder(bucketKey);
|
|
3244
|
+
const order = getModifierOrder(bucketKey) + (isPureDisplayStyle(styles) ? 0.5 : 0);
|
|
3241
3245
|
for (const r of injectClassRule(parsed.original, bucketKey, styles, darkMode, parsed.important, order)) {
|
|
3242
3246
|
rules.push({ rule: r, order });
|
|
3243
3247
|
}
|
package/dist/core/index.js
CHANGED
|
@@ -96,7 +96,7 @@ function splitColorShadeRef(ref) {
|
|
|
96
96
|
|
|
97
97
|
// src/core/platform.ts
|
|
98
98
|
var isWeb = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
99
|
-
var isNative = !isWeb && (typeof globalThis.HermesInternal !== "undefined" || typeof globalThis.__fbBatchedBridge !== "undefined" || typeof navigator !== "undefined" && navigator.product === "ReactNative" || typeof globalThis.__REACT_NATIVE__ !== "undefined");
|
|
99
|
+
var isNative = !isWeb && (typeof globalThis.HermesInternal !== "undefined" || typeof globalThis.__fbBatchedBridge !== "undefined" || typeof navigator !== "undefined" && navigator.product === "ReactNative" || typeof globalThis.__REACT_NATIVE__ !== "undefined" || typeof globalThis.nativeFabricUIManager !== "undefined" || typeof globalThis.__turboModuleProxy !== "undefined" || typeof globalThis.RN$Bridgeless !== "undefined" || typeof globalThis.nativePerformanceNow !== "undefined");
|
|
100
100
|
var _resolveTargetOverride = null;
|
|
101
101
|
function setResolveTarget(target) {
|
|
102
102
|
_resolveTargetOverride = target;
|
|
@@ -3310,6 +3310,10 @@ function generateClassCSS(classString, theme, darkMode = "attribute", screens =
|
|
|
3310
3310
|
}
|
|
3311
3311
|
return rules.join("\n");
|
|
3312
3312
|
}
|
|
3313
|
+
function isPureDisplayStyle(styles) {
|
|
3314
|
+
const keys = Object.keys(styles);
|
|
3315
|
+
return keys.length === 1 && keys[0] === "display";
|
|
3316
|
+
}
|
|
3313
3317
|
function resolve(classString, theme, darkMode = "attribute") {
|
|
3314
3318
|
const cache = getThemeCache(theme);
|
|
3315
3319
|
const cacheKey = `${classString}::${darkMode}::${getEffectiveIsWeb() ? "web" : "native"}`;
|
|
@@ -3335,7 +3339,7 @@ function resolve(classString, theme, darkMode = "attribute") {
|
|
|
3335
3339
|
if (!result[bucketKey]) result[bucketKey] = {};
|
|
3336
3340
|
Object.assign(result[bucketKey], styles);
|
|
3337
3341
|
if (onWeb) {
|
|
3338
|
-
const order = getModifierOrder(bucketKey);
|
|
3342
|
+
const order = getModifierOrder(bucketKey) + (isPureDisplayStyle(styles) ? 0.5 : 0);
|
|
3339
3343
|
for (const r of injectClassRule(parsed.original, bucketKey, styles, darkMode, parsed.important, order)) {
|
|
3340
3344
|
rules.push({ rule: r, order });
|
|
3341
3345
|
}
|
package/dist/index.mjs
CHANGED
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-ERIVGK24.mjs";
|
|
7
|
+
import "./chunk-VB6KOAZZ.mjs";
|
|
8
8
|
|
|
9
9
|
// src/jsx-dev-runtime.tsx
|
|
10
10
|
function jsxDEV(type, props, key, isStaticChildren, source, self) {
|
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-ERIVGK24.mjs";
|
|
8
8
|
import {
|
|
9
9
|
registerWebElement
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VB6KOAZZ.mjs";
|
|
11
11
|
export {
|
|
12
12
|
Fragment,
|
|
13
13
|
_invalidateDefaultFontCache,
|
package/dist/vite-plugin.js
CHANGED
|
@@ -40,7 +40,7 @@ var import_node_process = __toESM(require("process"));
|
|
|
40
40
|
|
|
41
41
|
// src/core/platform.ts
|
|
42
42
|
var isWeb = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
43
|
-
var isNative = !isWeb && (typeof globalThis.HermesInternal !== "undefined" || typeof globalThis.__fbBatchedBridge !== "undefined" || typeof navigator !== "undefined" && navigator.product === "ReactNative" || typeof globalThis.__REACT_NATIVE__ !== "undefined");
|
|
43
|
+
var isNative = !isWeb && (typeof globalThis.HermesInternal !== "undefined" || typeof globalThis.__fbBatchedBridge !== "undefined" || typeof navigator !== "undefined" && navigator.product === "ReactNative" || typeof globalThis.__REACT_NATIVE__ !== "undefined" || typeof globalThis.nativeFabricUIManager !== "undefined" || typeof globalThis.__turboModuleProxy !== "undefined" || typeof globalThis.RN$Bridgeless !== "undefined" || typeof globalThis.nativePerformanceNow !== "undefined");
|
|
44
44
|
var _resolveTargetOverride = null;
|
|
45
45
|
function setCSSGenMode(on) {
|
|
46
46
|
_resolveTargetOverride = on ? "web" : null;
|
package/dist/vite-plugin.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import processImport from "process";
|
|
|
5
5
|
|
|
6
6
|
// src/core/platform.ts
|
|
7
7
|
var isWeb = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8
|
-
var isNative = !isWeb && (typeof globalThis.HermesInternal !== "undefined" || typeof globalThis.__fbBatchedBridge !== "undefined" || typeof navigator !== "undefined" && navigator.product === "ReactNative" || typeof globalThis.__REACT_NATIVE__ !== "undefined");
|
|
8
|
+
var isNative = !isWeb && (typeof globalThis.HermesInternal !== "undefined" || typeof globalThis.__fbBatchedBridge !== "undefined" || typeof navigator !== "undefined" && navigator.product === "ReactNative" || typeof globalThis.__REACT_NATIVE__ !== "undefined" || typeof globalThis.nativeFabricUIManager !== "undefined" || typeof globalThis.__turboModuleProxy !== "undefined" || typeof globalThis.RN$Bridgeless !== "undefined" || typeof globalThis.nativePerformanceNow !== "undefined");
|
|
9
9
|
var _resolveTargetOverride = null;
|
|
10
10
|
function setCSSGenMode(on) {
|
|
11
11
|
_resolveTargetOverride = on ? "web" : null;
|