@kbach/react 0.6.43 → 0.6.44

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.
@@ -26,7 +26,7 @@ import {
26
26
  transformToWebProps,
27
27
  useConditionalGlobalDarkMode,
28
28
  useConditionalWidth
29
- } from "./chunk-35JCNDLF.mjs";
29
+ } from "./chunk-XKJUIAYE.mjs";
30
30
 
31
31
  // src/jsx-runtime.tsx
32
32
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -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
  }
@@ -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
@@ -48,7 +48,7 @@ import {
48
48
  useGlobalDarkMode,
49
49
  useGlobalWidth,
50
50
  useSyncExternalStore
51
- } from "./chunk-35JCNDLF.mjs";
51
+ } from "./chunk-XKJUIAYE.mjs";
52
52
 
53
53
  // src/context.tsx
54
54
  import { createContext, useContext } from "react";
@@ -3,8 +3,8 @@ import {
3
3
  Fragment,
4
4
  jsx,
5
5
  jsxs
6
- } from "./chunk-SKXO5XEY.mjs";
7
- import "./chunk-35JCNDLF.mjs";
6
+ } from "./chunk-IY5Z6IYL.mjs";
7
+ import "./chunk-XKJUIAYE.mjs";
8
8
 
9
9
  // src/jsx-dev-runtime.tsx
10
10
  function jsxDEV(type, props, key, isStaticChildren, source, self) {
@@ -4,10 +4,10 @@ import {
4
4
  _invalidateDefaultFontCache,
5
5
  jsx,
6
6
  jsxs
7
- } from "./chunk-SKXO5XEY.mjs";
7
+ } from "./chunk-IY5Z6IYL.mjs";
8
8
  import {
9
9
  registerWebElement
10
- } from "./chunk-35JCNDLF.mjs";
10
+ } from "./chunk-XKJUIAYE.mjs";
11
11
  export {
12
12
  Fragment,
13
13
  _invalidateDefaultFontCache,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.6.43",
3
+ "version": "0.6.44",
4
4
  "description": "React / React Native components and hooks for the Kbach framework",
5
5
  "license": "MIT",
6
6
  "repository": {