@kbach/react 0.5.35 → 0.5.37
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-VRYE5CAE.mjs → chunk-36QDTNAQ.mjs} +1 -1
- package/dist/{chunk-YU55J6F6.mjs → chunk-J2I5YSC5.mjs} +31 -6
- package/dist/{chunk-65BTN2UR.mjs → chunk-VZHNEDUW.mjs} +6 -5
- package/dist/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +35 -7
- package/dist/index.mjs +7 -3
- package/dist/jsx-dev-runtime.js +33 -9
- package/dist/jsx-dev-runtime.mjs +3 -3
- package/dist/jsx-runtime.js +33 -9
- package/dist/jsx-runtime.mjs +3 -3
- package/dist/vite-plugin.js +16 -6
- package/dist/vite-plugin.mjs +1 -1
- package/package.json +2 -2
|
@@ -1284,12 +1284,22 @@ function splitClassTokens(classString) {
|
|
|
1284
1284
|
let depth = 0;
|
|
1285
1285
|
for (let i = 0; i < classString.length; i++) {
|
|
1286
1286
|
const ch = classString[i];
|
|
1287
|
-
if (ch === "[")
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1287
|
+
if (ch === "[") {
|
|
1288
|
+
depth++;
|
|
1289
|
+
current += ch;
|
|
1290
|
+
continue;
|
|
1291
|
+
}
|
|
1292
|
+
if (ch === "]") {
|
|
1293
|
+
depth--;
|
|
1294
|
+
current += ch;
|
|
1295
|
+
continue;
|
|
1296
|
+
}
|
|
1297
|
+
if (/\s/.test(ch)) {
|
|
1298
|
+
if (depth === 0) {
|
|
1299
|
+
if (current) {
|
|
1300
|
+
tokens.push(current);
|
|
1301
|
+
current = "";
|
|
1302
|
+
}
|
|
1293
1303
|
}
|
|
1294
1304
|
} else {
|
|
1295
1305
|
current += ch;
|
|
@@ -1298,6 +1308,9 @@ function splitClassTokens(classString) {
|
|
|
1298
1308
|
if (current) tokens.push(current);
|
|
1299
1309
|
return tokens;
|
|
1300
1310
|
}
|
|
1311
|
+
function normalizeClassString(classString) {
|
|
1312
|
+
return splitClassTokens(classString).join(" ");
|
|
1313
|
+
}
|
|
1301
1314
|
function parseClasses(classString) {
|
|
1302
1315
|
const results = [];
|
|
1303
1316
|
for (const token of splitClassTokens(classString)) {
|
|
@@ -3343,6 +3356,17 @@ function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new
|
|
|
3343
3356
|
if (_df && !("fontFamily" in result)) {
|
|
3344
3357
|
result.fontFamily = _df;
|
|
3345
3358
|
}
|
|
3359
|
+
if (isWeb) {
|
|
3360
|
+
const r = result;
|
|
3361
|
+
for (const [rnProp, [p1, p2]] of Object.entries(RN_SHORTHAND_EXPAND)) {
|
|
3362
|
+
const v = r[rnProp];
|
|
3363
|
+
if (v !== void 0) {
|
|
3364
|
+
r[p1] = v;
|
|
3365
|
+
r[p2] = v;
|
|
3366
|
+
delete r[rnProp];
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3346
3370
|
return result;
|
|
3347
3371
|
}
|
|
3348
3372
|
function matchesMods(mods, isDark, state, breakpoints) {
|
|
@@ -3579,6 +3603,7 @@ export {
|
|
|
3579
3603
|
setCSSGenMode,
|
|
3580
3604
|
parseClass,
|
|
3581
3605
|
splitClassTokens,
|
|
3606
|
+
normalizeClassString,
|
|
3582
3607
|
parseClasses,
|
|
3583
3608
|
syncGlobalWidth,
|
|
3584
3609
|
syncGlobalScreens,
|
|
@@ -3,15 +3,16 @@ import {
|
|
|
3
3
|
InteractiveWrapper,
|
|
4
4
|
useConditionalWidth,
|
|
5
5
|
useGlobalDarkMode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-36QDTNAQ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
flatten,
|
|
9
9
|
getActiveBreakpoints,
|
|
10
10
|
getConfig,
|
|
11
11
|
getDefaultFontFamily,
|
|
12
12
|
isWeb,
|
|
13
|
+
normalizeClassString,
|
|
13
14
|
resolve
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-J2I5YSC5.mjs";
|
|
15
16
|
|
|
16
17
|
// src/jsx-runtime.tsx
|
|
17
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -214,7 +215,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
214
215
|
return _jsx(InteractiveWrapper, {
|
|
215
216
|
Component: actualType,
|
|
216
217
|
resolvedStyle: resolved,
|
|
217
|
-
...isWeb && classStr ? { className: classStr } : {},
|
|
218
|
+
...isWeb && classStr ? { className: normalizeClassString(classStr) } : {},
|
|
218
219
|
style: userStyle,
|
|
219
220
|
...passProps
|
|
220
221
|
}, key);
|
|
@@ -223,7 +224,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
223
224
|
return _jsx(DarkWrapper, {
|
|
224
225
|
Component: actualType,
|
|
225
226
|
resolvedStyle: resolved,
|
|
226
|
-
...isWeb && classStr ? { className: classStr } : {},
|
|
227
|
+
...isWeb && classStr ? { className: normalizeClassString(classStr) } : {},
|
|
227
228
|
style: userStyle,
|
|
228
229
|
...passProps
|
|
229
230
|
}, key);
|
|
@@ -235,7 +236,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
235
236
|
return makeElement(isStaticChildren, actualType, {
|
|
236
237
|
...passProps,
|
|
237
238
|
style: finalStyle,
|
|
238
|
-
...isWeb && classStr ? { className: classStr } : {}
|
|
239
|
+
...isWeb && classStr ? { className: normalizeClassString(classStr) } : {}
|
|
239
240
|
}, key);
|
|
240
241
|
}
|
|
241
242
|
function jsx(type, props, key) {
|
package/dist/index.d.mts
CHANGED
|
@@ -7,6 +7,19 @@ declare const defaultColors: ThemeColors;
|
|
|
7
7
|
declare const defaultTheme: ThemeConfig;
|
|
8
8
|
|
|
9
9
|
declare function parseClass(className: string): ParsedClass | null;
|
|
10
|
+
/**
|
|
11
|
+
* Split a class string into tokens. Whitespace at bracket depth > 0 is STRIPPED
|
|
12
|
+
* (not just skipped as a delimiter) so that arbitrary values like rgb(41, 172, 15)
|
|
13
|
+
* become valid CSS class name tokens: bg-[rgb(41,172,15)].
|
|
14
|
+
* Spaces inside brackets are illegal in HTML class attributes and would cause the
|
|
15
|
+
* browser to split the class into multiple broken tokens.
|
|
16
|
+
*/
|
|
17
|
+
declare function splitClassTokens(classString: string): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Normalize a full class string so it is safe to use as an HTML className value.
|
|
20
|
+
* Strips spaces inside brackets: "bg-[rgb(41, 172, 15)] p-4" → "bg-[rgb(41,172,15)] p-4"
|
|
21
|
+
*/
|
|
22
|
+
declare function normalizeClassString(classString: string): string;
|
|
10
23
|
/** Parse a space-separated class string into individual ParsedClass objects. */
|
|
11
24
|
declare function parseClasses(classString: string): ParsedClass[];
|
|
12
25
|
|
|
@@ -301,4 +314,4 @@ declare function kb(classString: string, isDark?: boolean): StyleValue | string;
|
|
|
301
314
|
*/
|
|
302
315
|
declare function cx(...classes: Array<string | false | null | undefined>): string;
|
|
303
316
|
|
|
304
|
-
export { type ColorScale, type ColorsAPI, FrameworkConfig, type InteractionState, InteractiveWrapper, type InteractiveWrapperProps, ParsedClass, ResolvedConfig, ResolvedStyle, StyleValue, type StyledProps, ThemeConfig, ThemeContext, type ThemeContextValue, ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, type ToggleVariant, buildConfig, cx, defaultColors, defaultTheme, flatten, getConfig, initConfig, kb, parseClass, parseClasses, resolve, styled, updateConfig, useBreakpoint, useColors, useGlobalDarkMode, useIsDark, useResolvedStyle, useResponsive, useStyles, useTheme, wrapColors };
|
|
317
|
+
export { type ColorScale, type ColorsAPI, FrameworkConfig, type InteractionState, InteractiveWrapper, type InteractiveWrapperProps, ParsedClass, ResolvedConfig, ResolvedStyle, StyleValue, type StyledProps, ThemeConfig, ThemeContext, type ThemeContextValue, ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, type ToggleVariant, buildConfig, cx, defaultColors, defaultTheme, flatten, getConfig, initConfig, kb, normalizeClassString, parseClass, parseClasses, resolve, splitClassTokens, styled, updateConfig, useBreakpoint, useColors, useGlobalDarkMode, useIsDark, useResolvedStyle, useResponsive, useStyles, useTheme, wrapColors };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,19 @@ declare const defaultColors: ThemeColors;
|
|
|
7
7
|
declare const defaultTheme: ThemeConfig;
|
|
8
8
|
|
|
9
9
|
declare function parseClass(className: string): ParsedClass | null;
|
|
10
|
+
/**
|
|
11
|
+
* Split a class string into tokens. Whitespace at bracket depth > 0 is STRIPPED
|
|
12
|
+
* (not just skipped as a delimiter) so that arbitrary values like rgb(41, 172, 15)
|
|
13
|
+
* become valid CSS class name tokens: bg-[rgb(41,172,15)].
|
|
14
|
+
* Spaces inside brackets are illegal in HTML class attributes and would cause the
|
|
15
|
+
* browser to split the class into multiple broken tokens.
|
|
16
|
+
*/
|
|
17
|
+
declare function splitClassTokens(classString: string): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Normalize a full class string so it is safe to use as an HTML className value.
|
|
20
|
+
* Strips spaces inside brackets: "bg-[rgb(41, 172, 15)] p-4" → "bg-[rgb(41,172,15)] p-4"
|
|
21
|
+
*/
|
|
22
|
+
declare function normalizeClassString(classString: string): string;
|
|
10
23
|
/** Parse a space-separated class string into individual ParsedClass objects. */
|
|
11
24
|
declare function parseClasses(classString: string): ParsedClass[];
|
|
12
25
|
|
|
@@ -301,4 +314,4 @@ declare function kb(classString: string, isDark?: boolean): StyleValue | string;
|
|
|
301
314
|
*/
|
|
302
315
|
declare function cx(...classes: Array<string | false | null | undefined>): string;
|
|
303
316
|
|
|
304
|
-
export { type ColorScale, type ColorsAPI, FrameworkConfig, type InteractionState, InteractiveWrapper, type InteractiveWrapperProps, ParsedClass, ResolvedConfig, ResolvedStyle, StyleValue, type StyledProps, ThemeConfig, ThemeContext, type ThemeContextValue, ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, type ToggleVariant, buildConfig, cx, defaultColors, defaultTheme, flatten, getConfig, initConfig, kb, parseClass, parseClasses, resolve, styled, updateConfig, useBreakpoint, useColors, useGlobalDarkMode, useIsDark, useResolvedStyle, useResponsive, useStyles, useTheme, wrapColors };
|
|
317
|
+
export { type ColorScale, type ColorsAPI, FrameworkConfig, type InteractionState, InteractiveWrapper, type InteractiveWrapperProps, ParsedClass, ResolvedConfig, ResolvedStyle, StyleValue, type StyledProps, ThemeConfig, ThemeContext, type ThemeContextValue, ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, type ToggleVariant, buildConfig, cx, defaultColors, defaultTheme, flatten, getConfig, initConfig, kb, normalizeClassString, parseClass, parseClasses, resolve, splitClassTokens, styled, updateConfig, useBreakpoint, useColors, useGlobalDarkMode, useIsDark, useResolvedStyle, useResponsive, useStyles, useTheme, wrapColors };
|
package/dist/index.js
CHANGED
|
@@ -42,9 +42,11 @@ __export(index_exports, {
|
|
|
42
42
|
getConfig: () => getConfig,
|
|
43
43
|
initConfig: () => initConfig,
|
|
44
44
|
kb: () => kb,
|
|
45
|
+
normalizeClassString: () => normalizeClassString,
|
|
45
46
|
parseClass: () => parseClass,
|
|
46
47
|
parseClasses: () => parseClasses,
|
|
47
48
|
resolve: () => resolve,
|
|
49
|
+
splitClassTokens: () => splitClassTokens,
|
|
48
50
|
styled: () => styled,
|
|
49
51
|
updateConfig: () => updateConfig,
|
|
50
52
|
useBreakpoint: () => useBreakpoint,
|
|
@@ -1447,12 +1449,22 @@ function splitClassTokens(classString) {
|
|
|
1447
1449
|
let depth = 0;
|
|
1448
1450
|
for (let i = 0; i < classString.length; i++) {
|
|
1449
1451
|
const ch = classString[i];
|
|
1450
|
-
if (ch === "[")
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1452
|
+
if (ch === "[") {
|
|
1453
|
+
depth++;
|
|
1454
|
+
current += ch;
|
|
1455
|
+
continue;
|
|
1456
|
+
}
|
|
1457
|
+
if (ch === "]") {
|
|
1458
|
+
depth--;
|
|
1459
|
+
current += ch;
|
|
1460
|
+
continue;
|
|
1461
|
+
}
|
|
1462
|
+
if (/\s/.test(ch)) {
|
|
1463
|
+
if (depth === 0) {
|
|
1464
|
+
if (current) {
|
|
1465
|
+
tokens.push(current);
|
|
1466
|
+
current = "";
|
|
1467
|
+
}
|
|
1456
1468
|
}
|
|
1457
1469
|
} else {
|
|
1458
1470
|
current += ch;
|
|
@@ -1461,6 +1473,9 @@ function splitClassTokens(classString) {
|
|
|
1461
1473
|
if (current) tokens.push(current);
|
|
1462
1474
|
return tokens;
|
|
1463
1475
|
}
|
|
1476
|
+
function normalizeClassString(classString) {
|
|
1477
|
+
return splitClassTokens(classString).join(" ");
|
|
1478
|
+
}
|
|
1464
1479
|
function parseClasses(classString) {
|
|
1465
1480
|
const results = [];
|
|
1466
1481
|
for (const token of splitClassTokens(classString)) {
|
|
@@ -3460,6 +3475,17 @@ function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new
|
|
|
3460
3475
|
if (_df && !("fontFamily" in result)) {
|
|
3461
3476
|
result.fontFamily = _df;
|
|
3462
3477
|
}
|
|
3478
|
+
if (isWeb) {
|
|
3479
|
+
const r = result;
|
|
3480
|
+
for (const [rnProp, [p1, p2]] of Object.entries(RN_SHORTHAND_EXPAND)) {
|
|
3481
|
+
const v = r[rnProp];
|
|
3482
|
+
if (v !== void 0) {
|
|
3483
|
+
r[p1] = v;
|
|
3484
|
+
r[p2] = v;
|
|
3485
|
+
delete r[rnProp];
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3463
3489
|
return result;
|
|
3464
3490
|
}
|
|
3465
3491
|
function matchesMods(mods, isDark, state, breakpoints) {
|
|
@@ -4118,7 +4144,7 @@ function styled(Component, baseClasses = "") {
|
|
|
4118
4144
|
...rest,
|
|
4119
4145
|
style: finalStyle,
|
|
4120
4146
|
// className lets injected CSS rules (group-hover:, before:, print:, etc.) match the element.
|
|
4121
|
-
...isWeb && combined ? { className: combined } : {},
|
|
4147
|
+
...isWeb && combined ? { className: normalizeClassString(combined) } : {},
|
|
4122
4148
|
// onPressIn / onPressOut are React Native-only; on web use Pointer Events instead.
|
|
4123
4149
|
...isWeb ? { onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, onPointerLeave: handlePointerLeave } : { onPressIn: handlePressIn, onPressOut: handlePressOut },
|
|
4124
4150
|
onMouseEnter: handleMouseEnter,
|
|
@@ -4325,9 +4351,11 @@ function cx(...classes) {
|
|
|
4325
4351
|
getConfig,
|
|
4326
4352
|
initConfig,
|
|
4327
4353
|
kb,
|
|
4354
|
+
normalizeClassString,
|
|
4328
4355
|
parseClass,
|
|
4329
4356
|
parseClasses,
|
|
4330
4357
|
resolve,
|
|
4358
|
+
splitClassTokens,
|
|
4331
4359
|
styled,
|
|
4332
4360
|
updateConfig,
|
|
4333
4361
|
useBreakpoint,
|
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useConditionalWidth,
|
|
7
7
|
useGlobalDarkMode,
|
|
8
8
|
useGlobalWidth
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-36QDTNAQ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__require,
|
|
12
12
|
buildConfig,
|
|
@@ -17,15 +17,17 @@ import {
|
|
|
17
17
|
getConfig,
|
|
18
18
|
initConfig,
|
|
19
19
|
isWeb,
|
|
20
|
+
normalizeClassString,
|
|
20
21
|
onConfigChange,
|
|
21
22
|
parseClass,
|
|
22
23
|
parseClasses,
|
|
23
24
|
resolve,
|
|
24
25
|
setGlobalWidth,
|
|
26
|
+
splitClassTokens,
|
|
25
27
|
syncGlobalScreens,
|
|
26
28
|
syncGlobalWidth,
|
|
27
29
|
updateConfig
|
|
28
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-J2I5YSC5.mjs";
|
|
29
31
|
|
|
30
32
|
// src/context.tsx
|
|
31
33
|
import { createContext, useContext } from "react";
|
|
@@ -458,7 +460,7 @@ function styled(Component, baseClasses = "") {
|
|
|
458
460
|
...rest,
|
|
459
461
|
style: finalStyle,
|
|
460
462
|
// className lets injected CSS rules (group-hover:, before:, print:, etc.) match the element.
|
|
461
|
-
...isWeb && combined ? { className: combined } : {},
|
|
463
|
+
...isWeb && combined ? { className: normalizeClassString(combined) } : {},
|
|
462
464
|
// onPressIn / onPressOut are React Native-only; on web use Pointer Events instead.
|
|
463
465
|
...isWeb ? { onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, onPointerLeave: handlePointerLeave } : { onPressIn: handlePressIn, onPressOut: handlePressOut },
|
|
464
466
|
onMouseEnter: handleMouseEnter,
|
|
@@ -541,9 +543,11 @@ export {
|
|
|
541
543
|
getConfig,
|
|
542
544
|
initConfig,
|
|
543
545
|
kb,
|
|
546
|
+
normalizeClassString,
|
|
544
547
|
parseClass,
|
|
545
548
|
parseClasses,
|
|
546
549
|
resolve,
|
|
550
|
+
splitClassTokens,
|
|
547
551
|
styled,
|
|
548
552
|
updateConfig,
|
|
549
553
|
useBreakpoint,
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1351,12 +1351,22 @@ function splitClassTokens(classString) {
|
|
|
1351
1351
|
let depth = 0;
|
|
1352
1352
|
for (let i = 0; i < classString.length; i++) {
|
|
1353
1353
|
const ch = classString[i];
|
|
1354
|
-
if (ch === "[")
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1354
|
+
if (ch === "[") {
|
|
1355
|
+
depth++;
|
|
1356
|
+
current += ch;
|
|
1357
|
+
continue;
|
|
1358
|
+
}
|
|
1359
|
+
if (ch === "]") {
|
|
1360
|
+
depth--;
|
|
1361
|
+
current += ch;
|
|
1362
|
+
continue;
|
|
1363
|
+
}
|
|
1364
|
+
if (/\s/.test(ch)) {
|
|
1365
|
+
if (depth === 0) {
|
|
1366
|
+
if (current) {
|
|
1367
|
+
tokens.push(current);
|
|
1368
|
+
current = "";
|
|
1369
|
+
}
|
|
1360
1370
|
}
|
|
1361
1371
|
} else {
|
|
1362
1372
|
current += ch;
|
|
@@ -1365,6 +1375,9 @@ function splitClassTokens(classString) {
|
|
|
1365
1375
|
if (current) tokens.push(current);
|
|
1366
1376
|
return tokens;
|
|
1367
1377
|
}
|
|
1378
|
+
function normalizeClassString(classString) {
|
|
1379
|
+
return splitClassTokens(classString).join(" ");
|
|
1380
|
+
}
|
|
1368
1381
|
function parseClasses(classString) {
|
|
1369
1382
|
const results = [];
|
|
1370
1383
|
for (const token of splitClassTokens(classString)) {
|
|
@@ -3352,6 +3365,17 @@ function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new
|
|
|
3352
3365
|
if (_df && !("fontFamily" in result)) {
|
|
3353
3366
|
result.fontFamily = _df;
|
|
3354
3367
|
}
|
|
3368
|
+
if (isWeb) {
|
|
3369
|
+
const r = result;
|
|
3370
|
+
for (const [rnProp, [p1, p2]] of Object.entries(RN_SHORTHAND_EXPAND)) {
|
|
3371
|
+
const v = r[rnProp];
|
|
3372
|
+
if (v !== void 0) {
|
|
3373
|
+
r[p1] = v;
|
|
3374
|
+
r[p2] = v;
|
|
3375
|
+
delete r[rnProp];
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3355
3379
|
return result;
|
|
3356
3380
|
}
|
|
3357
3381
|
function matchesMods(mods, isDark, state, breakpoints) {
|
|
@@ -3941,7 +3965,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
3941
3965
|
return (0, import_jsx_runtime.jsx)(InteractiveWrapper, {
|
|
3942
3966
|
Component: actualType,
|
|
3943
3967
|
resolvedStyle: resolved,
|
|
3944
|
-
...isWeb && classStr ? { className: classStr } : {},
|
|
3968
|
+
...isWeb && classStr ? { className: normalizeClassString(classStr) } : {},
|
|
3945
3969
|
style: userStyle,
|
|
3946
3970
|
...passProps
|
|
3947
3971
|
}, key);
|
|
@@ -3950,7 +3974,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
3950
3974
|
return (0, import_jsx_runtime.jsx)(DarkWrapper, {
|
|
3951
3975
|
Component: actualType,
|
|
3952
3976
|
resolvedStyle: resolved,
|
|
3953
|
-
...isWeb && classStr ? { className: classStr } : {},
|
|
3977
|
+
...isWeb && classStr ? { className: normalizeClassString(classStr) } : {},
|
|
3954
3978
|
style: userStyle,
|
|
3955
3979
|
...passProps
|
|
3956
3980
|
}, key);
|
|
@@ -3962,7 +3986,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
3962
3986
|
return makeElement(isStaticChildren, actualType, {
|
|
3963
3987
|
...passProps,
|
|
3964
3988
|
style: finalStyle,
|
|
3965
|
-
...isWeb && classStr ? { className: classStr } : {}
|
|
3989
|
+
...isWeb && classStr ? { className: normalizeClassString(classStr) } : {}
|
|
3966
3990
|
}, key);
|
|
3967
3991
|
}
|
|
3968
3992
|
function jsx(type, props, key) {
|
package/dist/jsx-dev-runtime.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
Fragment,
|
|
3
3
|
jsx,
|
|
4
4
|
jsxs
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-VZHNEDUW.mjs";
|
|
6
|
+
import "./chunk-36QDTNAQ.mjs";
|
|
7
|
+
import "./chunk-J2I5YSC5.mjs";
|
|
8
8
|
|
|
9
9
|
// src/jsx-dev-runtime.tsx
|
|
10
10
|
function jsxDEV(type, props, key, isStaticChildren, _source, _self) {
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1350,12 +1350,22 @@ function splitClassTokens(classString) {
|
|
|
1350
1350
|
let depth = 0;
|
|
1351
1351
|
for (let i = 0; i < classString.length; i++) {
|
|
1352
1352
|
const ch = classString[i];
|
|
1353
|
-
if (ch === "[")
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1353
|
+
if (ch === "[") {
|
|
1354
|
+
depth++;
|
|
1355
|
+
current += ch;
|
|
1356
|
+
continue;
|
|
1357
|
+
}
|
|
1358
|
+
if (ch === "]") {
|
|
1359
|
+
depth--;
|
|
1360
|
+
current += ch;
|
|
1361
|
+
continue;
|
|
1362
|
+
}
|
|
1363
|
+
if (/\s/.test(ch)) {
|
|
1364
|
+
if (depth === 0) {
|
|
1365
|
+
if (current) {
|
|
1366
|
+
tokens.push(current);
|
|
1367
|
+
current = "";
|
|
1368
|
+
}
|
|
1359
1369
|
}
|
|
1360
1370
|
} else {
|
|
1361
1371
|
current += ch;
|
|
@@ -1364,6 +1374,9 @@ function splitClassTokens(classString) {
|
|
|
1364
1374
|
if (current) tokens.push(current);
|
|
1365
1375
|
return tokens;
|
|
1366
1376
|
}
|
|
1377
|
+
function normalizeClassString(classString) {
|
|
1378
|
+
return splitClassTokens(classString).join(" ");
|
|
1379
|
+
}
|
|
1367
1380
|
function parseClasses(classString) {
|
|
1368
1381
|
const results = [];
|
|
1369
1382
|
for (const token of splitClassTokens(classString)) {
|
|
@@ -3351,6 +3364,17 @@ function flatten(resolved, isDark, state = {}, breakpoints = /* @__PURE__ */ new
|
|
|
3351
3364
|
if (_df && !("fontFamily" in result)) {
|
|
3352
3365
|
result.fontFamily = _df;
|
|
3353
3366
|
}
|
|
3367
|
+
if (isWeb) {
|
|
3368
|
+
const r = result;
|
|
3369
|
+
for (const [rnProp, [p1, p2]] of Object.entries(RN_SHORTHAND_EXPAND)) {
|
|
3370
|
+
const v = r[rnProp];
|
|
3371
|
+
if (v !== void 0) {
|
|
3372
|
+
r[p1] = v;
|
|
3373
|
+
r[p2] = v;
|
|
3374
|
+
delete r[rnProp];
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3354
3378
|
return result;
|
|
3355
3379
|
}
|
|
3356
3380
|
function matchesMods(mods, isDark, state, breakpoints) {
|
|
@@ -3940,7 +3964,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
3940
3964
|
return (0, import_jsx_runtime.jsx)(InteractiveWrapper, {
|
|
3941
3965
|
Component: actualType,
|
|
3942
3966
|
resolvedStyle: resolved,
|
|
3943
|
-
...isWeb && classStr ? { className: classStr } : {},
|
|
3967
|
+
...isWeb && classStr ? { className: normalizeClassString(classStr) } : {},
|
|
3944
3968
|
style: userStyle,
|
|
3945
3969
|
...passProps
|
|
3946
3970
|
}, key);
|
|
@@ -3949,7 +3973,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
3949
3973
|
return (0, import_jsx_runtime.jsx)(DarkWrapper, {
|
|
3950
3974
|
Component: actualType,
|
|
3951
3975
|
resolvedStyle: resolved,
|
|
3952
|
-
...isWeb && classStr ? { className: classStr } : {},
|
|
3976
|
+
...isWeb && classStr ? { className: normalizeClassString(classStr) } : {},
|
|
3953
3977
|
style: userStyle,
|
|
3954
3978
|
...passProps
|
|
3955
3979
|
}, key);
|
|
@@ -3961,7 +3985,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
3961
3985
|
return makeElement(isStaticChildren, actualType, {
|
|
3962
3986
|
...passProps,
|
|
3963
3987
|
style: finalStyle,
|
|
3964
|
-
...isWeb && classStr ? { className: classStr } : {}
|
|
3988
|
+
...isWeb && classStr ? { className: normalizeClassString(classStr) } : {}
|
|
3965
3989
|
}, key);
|
|
3966
3990
|
}
|
|
3967
3991
|
function jsx(type, props, key) {
|
package/dist/jsx-runtime.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
Fragment,
|
|
3
3
|
jsx,
|
|
4
4
|
jsxs
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-VZHNEDUW.mjs";
|
|
6
|
+
import "./chunk-36QDTNAQ.mjs";
|
|
7
|
+
import "./chunk-J2I5YSC5.mjs";
|
|
8
8
|
export {
|
|
9
9
|
Fragment,
|
|
10
10
|
jsx,
|
package/dist/vite-plugin.js
CHANGED
|
@@ -2931,12 +2931,22 @@ function splitClassTokens(classString) {
|
|
|
2931
2931
|
let depth = 0;
|
|
2932
2932
|
for (let i = 0; i < classString.length; i++) {
|
|
2933
2933
|
const ch = classString[i];
|
|
2934
|
-
if (ch === "[")
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2934
|
+
if (ch === "[") {
|
|
2935
|
+
depth++;
|
|
2936
|
+
current += ch;
|
|
2937
|
+
continue;
|
|
2938
|
+
}
|
|
2939
|
+
if (ch === "]") {
|
|
2940
|
+
depth--;
|
|
2941
|
+
current += ch;
|
|
2942
|
+
continue;
|
|
2943
|
+
}
|
|
2944
|
+
if (/\s/.test(ch)) {
|
|
2945
|
+
if (depth === 0) {
|
|
2946
|
+
if (current) {
|
|
2947
|
+
tokens.push(current);
|
|
2948
|
+
current = "";
|
|
2949
|
+
}
|
|
2940
2950
|
}
|
|
2941
2951
|
} else {
|
|
2942
2952
|
current += ch;
|
package/dist/vite-plugin.mjs
CHANGED
package/package.json
CHANGED