@kbach/react 0.5.9 → 0.5.11

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.
@@ -9,7 +9,7 @@ import {
9
9
  resolve,
10
10
  useConditionalWidth,
11
11
  useGlobalDarkMode
12
- } from "./chunk-OBFLMVLT.mjs";
12
+ } from "./chunk-FXDTPPTC.mjs";
13
13
 
14
14
  // src/jsx-runtime.tsx
15
15
  import { jsx as _jsx, jsxs as _jsxs, Fragment } from "react/jsx-runtime";
@@ -187,6 +187,7 @@ function stripWebOnlyInlineProps(s) {
187
187
  }
188
188
  }
189
189
  function processElement(type, rawProps, key, isStaticChildren) {
190
+ if (typeof type === "symbol") return makeElement(isStaticChildren, type, rawProps ?? {}, key);
190
191
  if (!rawProps) return _jsx(type, null, key);
191
192
  const { className, kb: kbProp, __kbachStyles, __kbachClasses } = rawProps;
192
193
  const classStr = className ?? kbProp ?? __kbachClasses;
@@ -2988,12 +2988,12 @@ function getActiveBreakpoints(width) {
2988
2988
 
2989
2989
  // src/core/resolver.ts
2990
2990
  var styleCache = new LRUCache(1e4);
2991
- var _defaultFontFamily;
2991
+ var FONT_KEY = "__kbach_default_font__";
2992
2992
  function setDefaultFontFamily(font) {
2993
- _defaultFontFamily = font;
2993
+ globalThis[FONT_KEY] = font;
2994
2994
  }
2995
2995
  function getDefaultFontFamily() {
2996
- return _defaultFontFamily;
2996
+ return globalThis[FONT_KEY];
2997
2997
  }
2998
2998
  var _styleEl = null;
2999
2999
  var _injectedRules = /* @__PURE__ */ new Set();
@@ -3263,7 +3263,8 @@ function resolve(classString, theme, darkMode = "attribute") {
3263
3263
  }
3264
3264
  function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new Set()) {
3265
3265
  const result = {};
3266
- if (_defaultFontFamily) result.fontFamily = _defaultFontFamily;
3266
+ const _df = getDefaultFontFamily();
3267
+ if (_df) result.fontFamily = _df;
3267
3268
  const entries = Object.entries(resolved);
3268
3269
  entries.sort((a, b) => {
3269
3270
  const pa = a[0] === "base" ? -1 : a[0].split(":").length;
package/dist/index.js CHANGED
@@ -3118,9 +3118,12 @@ function getActiveBreakpoints(width) {
3118
3118
 
3119
3119
  // src/core/resolver.ts
3120
3120
  var styleCache = new LRUCache(1e4);
3121
- var _defaultFontFamily;
3121
+ var FONT_KEY = "__kbach_default_font__";
3122
3122
  function setDefaultFontFamily(font) {
3123
- _defaultFontFamily = font;
3123
+ globalThis[FONT_KEY] = font;
3124
+ }
3125
+ function getDefaultFontFamily() {
3126
+ return globalThis[FONT_KEY];
3124
3127
  }
3125
3128
  var _styleEl = null;
3126
3129
  var _injectedRules = /* @__PURE__ */ new Set();
@@ -3390,7 +3393,8 @@ function resolve(classString, theme, darkMode = "attribute") {
3390
3393
  }
3391
3394
  function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new Set()) {
3392
3395
  const result = {};
3393
- if (_defaultFontFamily) result.fontFamily = _defaultFontFamily;
3396
+ const _df = getDefaultFontFamily();
3397
+ if (_df) result.fontFamily = _df;
3394
3398
  const entries = Object.entries(resolved);
3395
3399
  entries.sort((a, b) => {
3396
3400
  const pa = a[0] === "base" ? -1 : a[0].split(":").length;
package/dist/index.mjs CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  useConditionalWidth,
24
24
  useGlobalDarkMode,
25
25
  useGlobalWidth
26
- } from "./chunk-OBFLMVLT.mjs";
26
+ } from "./chunk-FXDTPPTC.mjs";
27
27
 
28
28
  // src/context.tsx
29
29
  import { createContext, useContext } from "react";
@@ -3009,12 +3009,12 @@ function getActiveBreakpoints(width) {
3009
3009
 
3010
3010
  // src/core/resolver.ts
3011
3011
  var styleCache = new LRUCache(1e4);
3012
- var _defaultFontFamily;
3012
+ var FONT_KEY = "__kbach_default_font__";
3013
3013
  function setDefaultFontFamily(font) {
3014
- _defaultFontFamily = font;
3014
+ globalThis[FONT_KEY] = font;
3015
3015
  }
3016
3016
  function getDefaultFontFamily() {
3017
- return _defaultFontFamily;
3017
+ return globalThis[FONT_KEY];
3018
3018
  }
3019
3019
  var _styleEl = null;
3020
3020
  var _injectedRules = /* @__PURE__ */ new Set();
@@ -3284,7 +3284,8 @@ function resolve(classString, theme, darkMode = "attribute") {
3284
3284
  }
3285
3285
  function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new Set()) {
3286
3286
  const result = {};
3287
- if (_defaultFontFamily) result.fontFamily = _defaultFontFamily;
3287
+ const _df = getDefaultFontFamily();
3288
+ if (_df) result.fontFamily = _df;
3288
3289
  const entries = Object.entries(resolved);
3289
3290
  entries.sort((a, b) => {
3290
3291
  const pa = a[0] === "base" ? -1 : a[0].split(":").length;
@@ -3867,6 +3868,7 @@ function stripWebOnlyInlineProps(s) {
3867
3868
  }
3868
3869
  }
3869
3870
  function processElement(type, rawProps, key, isStaticChildren) {
3871
+ if (typeof type === "symbol") return makeElement(isStaticChildren, type, rawProps ?? {}, key);
3870
3872
  if (!rawProps) return (0, import_jsx_runtime.jsx)(type, null, key);
3871
3873
  const { className, kb: kbProp, __kbachStyles, __kbachClasses } = rawProps;
3872
3874
  const classStr = className ?? kbProp ?? __kbachClasses;
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-QG3EWTVW.mjs";
6
- import "./chunk-OBFLMVLT.mjs";
5
+ } from "./chunk-CPU4VXII.mjs";
6
+ import "./chunk-FXDTPPTC.mjs";
7
7
 
8
8
  // src/jsx-dev-runtime.tsx
9
9
  function jsxDEV(type, props, key, isStaticChildren, _source, _self) {
@@ -3008,12 +3008,12 @@ function getActiveBreakpoints(width) {
3008
3008
 
3009
3009
  // src/core/resolver.ts
3010
3010
  var styleCache = new LRUCache(1e4);
3011
- var _defaultFontFamily;
3011
+ var FONT_KEY = "__kbach_default_font__";
3012
3012
  function setDefaultFontFamily(font) {
3013
- _defaultFontFamily = font;
3013
+ globalThis[FONT_KEY] = font;
3014
3014
  }
3015
3015
  function getDefaultFontFamily() {
3016
- return _defaultFontFamily;
3016
+ return globalThis[FONT_KEY];
3017
3017
  }
3018
3018
  var _styleEl = null;
3019
3019
  var _injectedRules = /* @__PURE__ */ new Set();
@@ -3283,7 +3283,8 @@ function resolve(classString, theme, darkMode = "attribute") {
3283
3283
  }
3284
3284
  function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new Set()) {
3285
3285
  const result = {};
3286
- if (_defaultFontFamily) result.fontFamily = _defaultFontFamily;
3286
+ const _df = getDefaultFontFamily();
3287
+ if (_df) result.fontFamily = _df;
3287
3288
  const entries = Object.entries(resolved);
3288
3289
  entries.sort((a, b) => {
3289
3290
  const pa = a[0] === "base" ? -1 : a[0].split(":").length;
@@ -3866,6 +3867,7 @@ function stripWebOnlyInlineProps(s) {
3866
3867
  }
3867
3868
  }
3868
3869
  function processElement(type, rawProps, key, isStaticChildren) {
3870
+ if (typeof type === "symbol") return makeElement(isStaticChildren, type, rawProps ?? {}, key);
3869
3871
  if (!rawProps) return (0, import_jsx_runtime.jsx)(type, null, key);
3870
3872
  const { className, kb: kbProp, __kbachStyles, __kbachClasses } = rawProps;
3871
3873
  const classStr = className ?? kbProp ?? __kbachClasses;
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-QG3EWTVW.mjs";
6
- import "./chunk-OBFLMVLT.mjs";
5
+ } from "./chunk-CPU4VXII.mjs";
6
+ import "./chunk-FXDTPPTC.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.5.9",
3
+ "version": "0.5.11",
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",