@kbach/react 0.3.8 → 0.3.9

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.
@@ -8,7 +8,7 @@ import {
8
8
  resolve,
9
9
  useConditionalWidth,
10
10
  useGlobalDarkMode
11
- } from "./chunk-WYY3PRRC.mjs";
11
+ } from "./chunk-UG3UVDJA.mjs";
12
12
 
13
13
  // src/jsx-runtime.tsx
14
14
  import { jsx as _jsx, jsxs as _jsxs, Fragment } from "react/jsx-runtime";
@@ -115,6 +115,15 @@ function processElement(type, rawProps, key, isStaticChildren) {
115
115
  return makeElement(isStaticChildren, type, rawProps, key);
116
116
  }
117
117
  const config = getConfig();
118
+ if (isWeb && classStr) {
119
+ resolve(classStr, config.theme, config.darkMode);
120
+ const { style: userStyle2, ...passProps2 } = omitConsumed(rawProps);
121
+ return makeElement(isStaticChildren, type, {
122
+ ...passProps2,
123
+ className: classStr,
124
+ ...userStyle2 !== void 0 ? { style: userStyle2 } : {}
125
+ }, key);
126
+ }
118
127
  const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
119
128
  const { style: userStyle, ...passProps } = omitConsumed(rawProps);
120
129
  const { interactive, modeOrResponsive } = bucketMods(resolved);
@@ -2040,12 +2040,10 @@ function resolve(classString, theme, darkMode = "attribute") {
2040
2040
  }
2041
2041
  }
2042
2042
  styleCache.set(cacheKey, result);
2043
- if (isWeb && injectQueue.length > 0) {
2044
- Promise.resolve().then(() => {
2045
- for (const { cls, bucketKey, styles } of injectQueue) {
2046
- injectClassRule(cls, bucketKey, styles, darkMode);
2047
- }
2048
- });
2043
+ if (isWeb) {
2044
+ for (const { cls, bucketKey, styles } of injectQueue) {
2045
+ injectClassRule(cls, bucketKey, styles, darkMode);
2046
+ }
2049
2047
  }
2050
2048
  return result;
2051
2049
  }
package/dist/index.js CHANGED
@@ -2170,12 +2170,10 @@ function resolve(classString, theme, darkMode = "attribute") {
2170
2170
  }
2171
2171
  }
2172
2172
  styleCache.set(cacheKey, result);
2173
- if (isWeb && injectQueue.length > 0) {
2174
- Promise.resolve().then(() => {
2175
- for (const { cls, bucketKey, styles } of injectQueue) {
2176
- injectClassRule(cls, bucketKey, styles, darkMode);
2177
- }
2178
- });
2173
+ if (isWeb) {
2174
+ for (const { cls, bucketKey, styles } of injectQueue) {
2175
+ injectClassRule(cls, bucketKey, styles, darkMode);
2176
+ }
2179
2177
  }
2180
2178
  return result;
2181
2179
  }
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  updateConfig,
22
22
  useGlobalDarkMode,
23
23
  useGlobalWidth
24
- } from "./chunk-WYY3PRRC.mjs";
24
+ } from "./chunk-UG3UVDJA.mjs";
25
25
 
26
26
  // src/context.tsx
27
27
  import { createContext, useContext } from "react";
@@ -2061,12 +2061,10 @@ function resolve(classString, theme, darkMode = "attribute") {
2061
2061
  }
2062
2062
  }
2063
2063
  styleCache.set(cacheKey, result);
2064
- if (isWeb && injectQueue.length > 0) {
2065
- Promise.resolve().then(() => {
2066
- for (const { cls, bucketKey, styles } of injectQueue) {
2067
- injectClassRule(cls, bucketKey, styles, darkMode);
2068
- }
2069
- });
2064
+ if (isWeb) {
2065
+ for (const { cls, bucketKey, styles } of injectQueue) {
2066
+ injectClassRule(cls, bucketKey, styles, darkMode);
2067
+ }
2070
2068
  }
2071
2069
  return result;
2072
2070
  }
@@ -2487,6 +2485,15 @@ function processElement(type, rawProps, key, isStaticChildren) {
2487
2485
  return makeElement(isStaticChildren, type, rawProps, key);
2488
2486
  }
2489
2487
  const config = getConfig();
2488
+ if (isWeb && classStr) {
2489
+ resolve(classStr, config.theme, config.darkMode);
2490
+ const { style: userStyle2, ...passProps2 } = omitConsumed(rawProps);
2491
+ return makeElement(isStaticChildren, type, {
2492
+ ...passProps2,
2493
+ className: classStr,
2494
+ ...userStyle2 !== void 0 ? { style: userStyle2 } : {}
2495
+ }, key);
2496
+ }
2490
2497
  const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
2491
2498
  const { style: userStyle, ...passProps } = omitConsumed(rawProps);
2492
2499
  const { interactive, modeOrResponsive } = bucketMods(resolved);
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-H5232HHF.mjs";
6
- import "./chunk-WYY3PRRC.mjs";
5
+ } from "./chunk-HDKCXMOY.mjs";
6
+ import "./chunk-UG3UVDJA.mjs";
7
7
 
8
8
  // src/jsx-dev-runtime.tsx
9
9
  function jsxDEV(type, props, key, isStaticChildren, _source, _self) {
@@ -2060,12 +2060,10 @@ function resolve(classString, theme, darkMode = "attribute") {
2060
2060
  }
2061
2061
  }
2062
2062
  styleCache.set(cacheKey, result);
2063
- if (isWeb && injectQueue.length > 0) {
2064
- Promise.resolve().then(() => {
2065
- for (const { cls, bucketKey, styles } of injectQueue) {
2066
- injectClassRule(cls, bucketKey, styles, darkMode);
2067
- }
2068
- });
2063
+ if (isWeb) {
2064
+ for (const { cls, bucketKey, styles } of injectQueue) {
2065
+ injectClassRule(cls, bucketKey, styles, darkMode);
2066
+ }
2069
2067
  }
2070
2068
  return result;
2071
2069
  }
@@ -2486,6 +2484,15 @@ function processElement(type, rawProps, key, isStaticChildren) {
2486
2484
  return makeElement(isStaticChildren, type, rawProps, key);
2487
2485
  }
2488
2486
  const config = getConfig();
2487
+ if (isWeb && classStr) {
2488
+ resolve(classStr, config.theme, config.darkMode);
2489
+ const { style: userStyle2, ...passProps2 } = omitConsumed(rawProps);
2490
+ return makeElement(isStaticChildren, type, {
2491
+ ...passProps2,
2492
+ className: classStr,
2493
+ ...userStyle2 !== void 0 ? { style: userStyle2 } : {}
2494
+ }, key);
2495
+ }
2489
2496
  const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
2490
2497
  const { style: userStyle, ...passProps } = omitConsumed(rawProps);
2491
2498
  const { interactive, modeOrResponsive } = bucketMods(resolved);
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-H5232HHF.mjs";
6
- import "./chunk-WYY3PRRC.mjs";
5
+ } from "./chunk-HDKCXMOY.mjs";
6
+ import "./chunk-UG3UVDJA.mjs";
7
7
  export {
8
8
  Fragment,
9
9
  jsx,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "React / React Native components and hooks for the Kbach framework",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",