@kbach/react 0.6.41 → 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-PTOTQ6A2.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
  }
@@ -3481,9 +3485,9 @@ function onConfigChange(listener) {
3481
3485
  return () => configStore.listeners.delete(listener);
3482
3486
  }
3483
3487
  function updateConfig(userConfig) {
3488
+ clearCache();
3484
3489
  configStore.resolved = buildConfig(userConfig);
3485
3490
  configStore._src = userConfig;
3486
- clearCache();
3487
3491
  for (const listener of configStore.listeners) {
3488
3492
  listener(configStore.resolved);
3489
3493
  }
@@ -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
  }
@@ -3579,9 +3583,9 @@ function onConfigChange(listener) {
3579
3583
  return () => configStore.listeners.delete(listener);
3580
3584
  }
3581
3585
  function updateConfig(userConfig) {
3586
+ clearCache();
3582
3587
  configStore.resolved = buildConfig(userConfig);
3583
3588
  configStore._src = userConfig;
3584
- clearCache();
3585
3589
  for (const listener of configStore.listeners) {
3586
3590
  listener(configStore.resolved);
3587
3591
  }
package/dist/index.mjs CHANGED
@@ -48,7 +48,7 @@ import {
48
48
  useGlobalDarkMode,
49
49
  useGlobalWidth,
50
50
  useSyncExternalStore
51
- } from "./chunk-PTOTQ6A2.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-LM3OWOK2.mjs";
7
- import "./chunk-PTOTQ6A2.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-LM3OWOK2.mjs";
7
+ } from "./chunk-IY5Z6IYL.mjs";
8
8
  import {
9
9
  registerWebElement
10
- } from "./chunk-PTOTQ6A2.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.41",
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": {