@tenphi/tasty 3.6.0 → 3.8.0
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/{astro-CzY4LCpr.js → astro-w8r-u4qo.js} +6 -142
- package/dist/astro-w8r-u4qo.js.map +1 -0
- package/dist/{babel-DWCsafYw.d.ts → babel-Cp_dRhuS.d.ts} +2 -2
- package/dist/{collector-C6TtL8HJ.js → collector-C7YBiY7D.js} +3 -3
- package/dist/{collector-C6TtL8HJ.js.map → collector-C7YBiY7D.js.map} +1 -1
- package/dist/{collector-BTVXj2hS.d.ts → collector-CUtAFyIb.d.ts} +2 -2
- package/dist/{config-LfIDmVHx.d.ts → config-BY1e5y7V.d.ts} +2 -2
- package/dist/{config-B3gPdCqd.js → config-yXpe2jAV.js} +404 -157
- package/dist/config-yXpe2jAV.js.map +1 -0
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +5 -5
- package/dist/{core-Bq7w2kti.js → core-DoEZAHJq.js} +79 -33
- package/dist/{core-Bq7w2kti.js.map → core-DoEZAHJq.js.map} +1 -1
- package/dist/css-resources-Cyl_axbI.js +149 -0
- package/dist/css-resources-Cyl_axbI.js.map +1 -0
- package/dist/{css-writer-Bgowobbx.js → css-writer-BiumPvq-.js} +3 -3
- package/dist/{css-writer-Bgowobbx.js.map → css-writer-BiumPvq-.js.map} +1 -1
- package/dist/{format-rules-rCZ37rqY.js → format-rules-DHuG25KU.js} +3 -29
- package/dist/format-rules-DHuG25KU.js.map +1 -0
- package/dist/{hydrate-CNOmZprz.js → hydrate-BvRP6QEC.js} +2 -2
- package/dist/{hydrate-CNOmZprz.js.map → hydrate-BvRP6QEC.js.map} +1 -1
- package/dist/{index-BmogEzTo.d.ts → index-DBjd4MAb.d.ts} +46 -5
- package/dist/{index-Bm9ltvdH.d.ts → index-uX74k5jG.d.ts} +93 -46
- package/dist/index.d.ts +4 -4
- package/dist/index.js +6 -6
- package/dist/{keyframes-DE-OE76F.js → keyframes-B8uPLZwx.js} +2 -2
- package/dist/{keyframes-DE-OE76F.js.map → keyframes-B8uPLZwx.js.map} +1 -1
- package/dist/{merge-styles-DuoZEsm9.js → merge-styles-ChW1k-ZM.js} +2 -2
- package/dist/{merge-styles-DuoZEsm9.js.map → merge-styles-ChW1k-ZM.js.map} +1 -1
- package/dist/{merge-styles-BcLl1u_d.d.ts → merge-styles-pf6iPs82.d.ts} +2 -2
- package/dist/{resolve-recipes-H9NqOQuP.js → resolve-recipes-BNmjANzT.js} +3 -3
- package/dist/{resolve-recipes-H9NqOQuP.js.map → resolve-recipes-BNmjANzT.js.map} +1 -1
- package/dist/ssr/astro-client.js +1 -1
- package/dist/ssr/astro-middleware-extract-static.js +1 -1
- package/dist/ssr/astro-middleware-extract.js +1 -1
- package/dist/ssr/astro-middleware-static.js +1 -1
- package/dist/ssr/astro-middleware.js +1 -1
- package/dist/ssr/astro.js +1 -1
- package/dist/ssr/index.d.ts +1 -1
- package/dist/ssr/index.js +3 -3
- package/dist/ssr/next-config.d.ts +66 -0
- package/dist/ssr/next-config.js +115 -0
- package/dist/ssr/next-config.js.map +1 -0
- package/dist/ssr/next.d.ts +9 -2
- package/dist/ssr/next.js +26 -9
- package/dist/ssr/next.js.map +1 -1
- package/dist/ssr-collector-ref-COs_ioWl.js +29 -0
- package/dist/ssr-collector-ref-COs_ioWl.js.map +1 -0
- package/dist/static/index.d.ts +2 -2
- package/dist/static/index.js +1 -1
- package/dist/zero/babel.d.ts +1 -1
- package/dist/zero/babel.js +4 -4
- package/dist/zero/index.d.ts +1 -1
- package/dist/zero/index.js +1 -1
- package/dist/zero/next.d.ts +1 -1
- package/docs/ai-agents.md +8 -3
- package/docs/debug.md +13 -0
- package/docs/methodology.md +3 -3
- package/docs/runtime-benchmarks.md +185 -12
- package/docs/ssr.md +113 -18
- package/docs/styles.md +43 -11
- package/package.json +14 -6
- package/dist/astro-CzY4LCpr.js.map +0 -1
- package/dist/config-B3gPdCqd.js.map +0 -1
- package/dist/format-rules-rCZ37rqY.js.map +0 -1
|
@@ -1599,8 +1599,8 @@ function resetStyleWarnings() {
|
|
|
1599
1599
|
* Callers must guard on the count themselves so the valid path costs one integer
|
|
1600
1600
|
* comparison; everything expensive happens here, on the misuse path only.
|
|
1601
1601
|
*/
|
|
1602
|
-
function warnExtraGroupValues(property, input, maxValues) {
|
|
1603
|
-
const message = maxValues === 2 ? `${property}="${input}": with a span modifier a group takes at most two values — one for the named edge and one for the spanned sides. The extra values are ignored.` : `${property}="${input}": a group that names directions takes a single value, applied to every direction it names. The extra values are ignored — use comma-separated groups instead, e.g. ${property}="2x
|
|
1602
|
+
function warnExtraGroupValues(property, input, maxValues, directionExamples = ["top", "right"]) {
|
|
1603
|
+
const message = maxValues === 2 ? `${property}="${input}": with a span modifier a group takes at most two values — one for the named edge and one for the spanned sides. The extra values are ignored.` : `${property}="${input}": a group that names directions takes a single value, applied to every direction it names. The extra values are ignored — use comma-separated groups instead, e.g. ${property}="2x ${directionExamples[0]}, 4x ${directionExamples[1]}".`;
|
|
1604
1604
|
warnOnceDev(`extra-values:${property}:${input}`, message);
|
|
1605
1605
|
}
|
|
1606
1606
|
//#endregion
|
|
@@ -2311,12 +2311,35 @@ function resetFunctionPolyfills() {
|
|
|
2311
2311
|
registeredFunctionDefs.clear();
|
|
2312
2312
|
}
|
|
2313
2313
|
//#endregion
|
|
2314
|
+
//#region src/styles/logical-list.ts
|
|
2315
|
+
/** Data-only logical style families shared by handlers, public lists, and chunks. */
|
|
2316
|
+
const BLOCK_SIZE_STYLES = [
|
|
2317
|
+
"blockSize",
|
|
2318
|
+
"minBlockSize",
|
|
2319
|
+
"maxBlockSize"
|
|
2320
|
+
];
|
|
2321
|
+
const INLINE_SIZE_STYLES = [
|
|
2322
|
+
"inlineSize",
|
|
2323
|
+
"minInlineSize",
|
|
2324
|
+
"maxInlineSize"
|
|
2325
|
+
];
|
|
2326
|
+
/** Enhanced logical size categories exposed by Tasty's public style lists. */
|
|
2327
|
+
const LOGICAL_SIZE_STYLES = ["blockSize", "inlineSize"];
|
|
2328
|
+
/** Every input consumed by the two logical size handlers. */
|
|
2329
|
+
const LOGICAL_SIZE_HANDLER_STYLES = [...BLOCK_SIZE_STYLES, ...INLINE_SIZE_STYLES];
|
|
2330
|
+
const LOGICAL_PADDING_STYLES = ["blockPadding", "inlinePadding"];
|
|
2331
|
+
const LOGICAL_MARGIN_STYLES = ["blockMargin", "inlineMargin"];
|
|
2332
|
+
const LOGICAL_INSET_STYLES = ["blockInset", "inlineInset"];
|
|
2333
|
+
const LOGICAL_SCROLL_MARGIN_STYLES = ["blockScrollMargin", "inlineScrollMargin"];
|
|
2334
|
+
const LOGICAL_SCROLL_PADDING_STYLES = ["blockScrollPadding", "inlineScrollPadding"];
|
|
2335
|
+
const LOGICAL_BORDER_STYLES = ["blockBorder", "inlineBorder"];
|
|
2336
|
+
//#endregion
|
|
2314
2337
|
//#region src/chunks/style-chunk-map.ts
|
|
2315
2338
|
/**
|
|
2316
2339
|
* Chunk names, the built-in chunk style lists, and the style→chunk lookup.
|
|
2317
2340
|
*
|
|
2318
|
-
* This
|
|
2319
|
-
* `definitions.ts` for two reasons:
|
|
2341
|
+
* This module only imports data-only style-name lists. It exists separately
|
|
2342
|
+
* from `definitions.ts` for two reasons:
|
|
2320
2343
|
*
|
|
2321
2344
|
* 1. The style handler registry (`styles/predefined.ts`) needs to assign chunk
|
|
2322
2345
|
* membership for custom handlers. Reaching for `definitions.ts` would create an
|
|
@@ -2350,6 +2373,7 @@ const APPEARANCE_CHUNK_STYLES = [
|
|
|
2350
2373
|
"color",
|
|
2351
2374
|
"opacity",
|
|
2352
2375
|
"border",
|
|
2376
|
+
...LOGICAL_BORDER_STYLES,
|
|
2353
2377
|
"radius",
|
|
2354
2378
|
"outline",
|
|
2355
2379
|
"outlineOffset",
|
|
@@ -2384,10 +2408,12 @@ const FONT_CHUNK_STYLES = [
|
|
|
2384
2408
|
* Dimension chunk - sizing and spacing
|
|
2385
2409
|
*
|
|
2386
2410
|
* Handler dependencies (all styles in each handler MUST stay in this chunk):
|
|
2387
|
-
* ⚠️ paddingStyle: padding, paddingTop/Right/Bottom/Left
|
|
2388
|
-
* ⚠️ marginStyle: margin, marginTop/Right/Bottom/Left
|
|
2411
|
+
* ⚠️ paddingStyle: padding, paddingTop/Right/Bottom/Left
|
|
2412
|
+
* ⚠️ marginStyle: margin, marginTop/Right/Bottom/Left
|
|
2389
2413
|
* ⚠️ widthStyle: width, minWidth, maxWidth
|
|
2390
2414
|
* ⚠️ heightStyle: height, minHeight, maxHeight
|
|
2415
|
+
* ⚠️ blockSizeStyle: blockSize, minBlockSize, maxBlockSize
|
|
2416
|
+
* ⚠️ inlineSizeStyle: inlineSize, minInlineSize, maxInlineSize
|
|
2391
2417
|
*/
|
|
2392
2418
|
/** @public */
|
|
2393
2419
|
const DIMENSION_CHUNK_STYLES = [
|
|
@@ -2396,21 +2422,20 @@ const DIMENSION_CHUNK_STYLES = [
|
|
|
2396
2422
|
"paddingRight",
|
|
2397
2423
|
"paddingBottom",
|
|
2398
2424
|
"paddingLeft",
|
|
2399
|
-
|
|
2400
|
-
"paddingInline",
|
|
2425
|
+
...LOGICAL_PADDING_STYLES,
|
|
2401
2426
|
"margin",
|
|
2402
2427
|
"marginTop",
|
|
2403
2428
|
"marginRight",
|
|
2404
2429
|
"marginBottom",
|
|
2405
2430
|
"marginLeft",
|
|
2406
|
-
|
|
2407
|
-
"marginInline",
|
|
2431
|
+
...LOGICAL_MARGIN_STYLES,
|
|
2408
2432
|
"width",
|
|
2409
2433
|
"minWidth",
|
|
2410
2434
|
"maxWidth",
|
|
2411
2435
|
"height",
|
|
2412
2436
|
"minHeight",
|
|
2413
2437
|
"maxHeight",
|
|
2438
|
+
...LOGICAL_SIZE_HANDLER_STYLES,
|
|
2414
2439
|
"flexBasis",
|
|
2415
2440
|
"flexGrow",
|
|
2416
2441
|
"flexShrink",
|
|
@@ -2467,18 +2492,19 @@ const LAYOUT_CHUNK_STYLES = [
|
|
|
2467
2492
|
* Position chunk - element positioning
|
|
2468
2493
|
*
|
|
2469
2494
|
* Handler dependencies (all styles in each handler MUST stay in this chunk):
|
|
2470
|
-
* ⚠️ insetStyle: inset,
|
|
2495
|
+
* ⚠️ insetStyle: inset, top, right, bottom, left
|
|
2471
2496
|
*/
|
|
2472
2497
|
/** @public */
|
|
2473
2498
|
const POSITION_CHUNK_STYLES = [
|
|
2474
2499
|
"position",
|
|
2475
2500
|
"inset",
|
|
2476
|
-
|
|
2477
|
-
"insetInline",
|
|
2501
|
+
...LOGICAL_INSET_STYLES,
|
|
2478
2502
|
"top",
|
|
2479
2503
|
"right",
|
|
2480
2504
|
"bottom",
|
|
2481
2505
|
"left",
|
|
2506
|
+
...LOGICAL_SCROLL_MARGIN_STYLES,
|
|
2507
|
+
...LOGICAL_SCROLL_PADDING_STYLES,
|
|
2482
2508
|
"zIndex",
|
|
2483
2509
|
"gridArea",
|
|
2484
2510
|
"gridColumn",
|
|
@@ -3310,6 +3336,23 @@ function processGroup$1(group) {
|
|
|
3310
3336
|
function formatBorderValue(value) {
|
|
3311
3337
|
return `${value.width} ${value.style} ${value.color}`;
|
|
3312
3338
|
}
|
|
3339
|
+
/** Parse one native border declaration without Tasty's physical-side modifiers. */
|
|
3340
|
+
function parseBorderValue(value) {
|
|
3341
|
+
if (value === false) return null;
|
|
3342
|
+
if (value === true) value = "1bw";
|
|
3343
|
+
const stringValue = typeof value === "number" ? `${value}px` : String(value).trim();
|
|
3344
|
+
if (!stringValue) return null;
|
|
3345
|
+
if (CSS_WIDE_KEYWORDS.has(stringValue)) return stringValue;
|
|
3346
|
+
const group = parseStyle(stringValue).groups[0];
|
|
3347
|
+
if (!group) return null;
|
|
3348
|
+
const keyword = extractCSSWideKeyword(group);
|
|
3349
|
+
if (keyword) return keyword;
|
|
3350
|
+
return formatBorderValue(processGroup$1({
|
|
3351
|
+
values: group.values ?? [],
|
|
3352
|
+
mods: group.mods ?? [],
|
|
3353
|
+
colors: group.colors ?? []
|
|
3354
|
+
}).borderValue);
|
|
3355
|
+
}
|
|
3313
3356
|
/**
|
|
3314
3357
|
* Border style handler with multi-group support.
|
|
3315
3358
|
*
|
|
@@ -3399,6 +3442,120 @@ function borderStyle({ border }) {
|
|
|
3399
3442
|
}
|
|
3400
3443
|
borderStyle.__lookupStyles = ["border"];
|
|
3401
3444
|
//#endregion
|
|
3445
|
+
//#region src/styles/dimension.ts
|
|
3446
|
+
const DEFAULT_MIN_SIZE = "var(--gap)";
|
|
3447
|
+
const DEFAULT_MAX_SIZE = "100%";
|
|
3448
|
+
/**
|
|
3449
|
+
* Parse a dimension value (string, number, or boolean) into a CSS value
|
|
3450
|
+
*/
|
|
3451
|
+
function parseDimensionValue(val) {
|
|
3452
|
+
if (val == null) return null;
|
|
3453
|
+
if (typeof val === "number") return `${val}px`;
|
|
3454
|
+
if (val === true) return "initial";
|
|
3455
|
+
return parseStyle(String(val)).groups[0]?.values[0] || null;
|
|
3456
|
+
}
|
|
3457
|
+
/**
|
|
3458
|
+
* Creates a dimension style handler for a physical or logical size.
|
|
3459
|
+
*
|
|
3460
|
+
* Supports:
|
|
3461
|
+
* - Main dimension prop (width/height) with syntax for min/max
|
|
3462
|
+
* - Separate min/max props (minWidth/maxWidth or minHeight/maxHeight)
|
|
3463
|
+
*
|
|
3464
|
+
* Priority: Individual min/max props override values from main prop syntax
|
|
3465
|
+
*/
|
|
3466
|
+
function dimensionStyle(name) {
|
|
3467
|
+
const minStyle = `min-${name}`;
|
|
3468
|
+
const maxStyle = `max-${name}`;
|
|
3469
|
+
return ({ value, min, max }) => {
|
|
3470
|
+
if (value == null && min == null && max == null) return null;
|
|
3471
|
+
if (value != null && typeof value === "string" && CSS_WIDE_KEYWORDS.has(value)) {
|
|
3472
|
+
const styles = {
|
|
3473
|
+
[name]: value,
|
|
3474
|
+
[minStyle]: value,
|
|
3475
|
+
[maxStyle]: value
|
|
3476
|
+
};
|
|
3477
|
+
const minVal = parseDimensionValue(min);
|
|
3478
|
+
const maxVal = parseDimensionValue(max);
|
|
3479
|
+
if (minVal) styles[minStyle] = minVal;
|
|
3480
|
+
if (maxVal) styles[maxStyle] = maxVal;
|
|
3481
|
+
return styles;
|
|
3482
|
+
}
|
|
3483
|
+
if (value === true) {
|
|
3484
|
+
const styles = {
|
|
3485
|
+
[name]: "auto",
|
|
3486
|
+
[minStyle]: "initial",
|
|
3487
|
+
[maxStyle]: "initial"
|
|
3488
|
+
};
|
|
3489
|
+
const minVal = parseDimensionValue(min);
|
|
3490
|
+
const maxVal = parseDimensionValue(max);
|
|
3491
|
+
if (minVal) styles[minStyle] = minVal;
|
|
3492
|
+
if (maxVal) styles[maxStyle] = maxVal;
|
|
3493
|
+
return styles;
|
|
3494
|
+
}
|
|
3495
|
+
const styles = {
|
|
3496
|
+
[name]: "auto",
|
|
3497
|
+
[minStyle]: "initial",
|
|
3498
|
+
[maxStyle]: "initial"
|
|
3499
|
+
};
|
|
3500
|
+
if (value != null) {
|
|
3501
|
+
let val = value;
|
|
3502
|
+
if (typeof val === "number") val = `${val}px`;
|
|
3503
|
+
val = String(val);
|
|
3504
|
+
const { mods, values } = parseStyle(val).groups[0] ?? makeEmptyDetails();
|
|
3505
|
+
let flag = false;
|
|
3506
|
+
for (const mod of mods) switch (mod) {
|
|
3507
|
+
case "min":
|
|
3508
|
+
styles[minStyle] = values[0] || DEFAULT_MIN_SIZE;
|
|
3509
|
+
flag = true;
|
|
3510
|
+
break;
|
|
3511
|
+
case "max":
|
|
3512
|
+
styles[maxStyle] = values[0] || DEFAULT_MAX_SIZE;
|
|
3513
|
+
flag = true;
|
|
3514
|
+
break;
|
|
3515
|
+
case "fixed": {
|
|
3516
|
+
const fixedValue = values[0] || "max-content";
|
|
3517
|
+
styles[minStyle] = fixedValue;
|
|
3518
|
+
styles[name] = fixedValue;
|
|
3519
|
+
styles[maxStyle] = fixedValue;
|
|
3520
|
+
flag = true;
|
|
3521
|
+
break;
|
|
3522
|
+
}
|
|
3523
|
+
default: break;
|
|
3524
|
+
}
|
|
3525
|
+
if (!flag || !mods.length) if (values.length === 2) {
|
|
3526
|
+
styles[minStyle] = values[0];
|
|
3527
|
+
styles[maxStyle] = values[1];
|
|
3528
|
+
} else if (values.length === 3) {
|
|
3529
|
+
styles[minStyle] = values[0];
|
|
3530
|
+
styles[name] = values[1];
|
|
3531
|
+
styles[maxStyle] = values[2];
|
|
3532
|
+
} else styles[name] = values[0] || "auto";
|
|
3533
|
+
if (styles[name] === "stretch") if (name === "width") styles[name] = [
|
|
3534
|
+
"stretch",
|
|
3535
|
+
"-webkit-fill-available",
|
|
3536
|
+
"-moz-available"
|
|
3537
|
+
];
|
|
3538
|
+
else styles[name] = "auto";
|
|
3539
|
+
}
|
|
3540
|
+
const minVal = parseDimensionValue(min);
|
|
3541
|
+
const maxVal = parseDimensionValue(max);
|
|
3542
|
+
if (minVal) styles[minStyle] = minVal;
|
|
3543
|
+
if (maxVal) styles[maxStyle] = maxVal;
|
|
3544
|
+
return styles;
|
|
3545
|
+
};
|
|
3546
|
+
}
|
|
3547
|
+
//#endregion
|
|
3548
|
+
//#region src/styles/blockSize.ts
|
|
3549
|
+
const dimension$3 = dimensionStyle("block-size");
|
|
3550
|
+
function blockSizeStyle({ blockSize, minBlockSize, maxBlockSize }) {
|
|
3551
|
+
return dimension$3({
|
|
3552
|
+
value: blockSize,
|
|
3553
|
+
min: minBlockSize,
|
|
3554
|
+
max: maxBlockSize
|
|
3555
|
+
});
|
|
3556
|
+
}
|
|
3557
|
+
blockSizeStyle.__lookupStyles = [...BLOCK_SIZE_STYLES];
|
|
3558
|
+
//#endregion
|
|
3402
3559
|
//#region src/styles/color.ts
|
|
3403
3560
|
/**
|
|
3404
3561
|
* A color that already resolves against the color the element inherits, and so
|
|
@@ -3671,113 +3828,10 @@ gapStyle.__lookupStyles = [
|
|
|
3671
3828
|
"gap"
|
|
3672
3829
|
];
|
|
3673
3830
|
//#endregion
|
|
3674
|
-
//#region src/styles/dimension.ts
|
|
3675
|
-
const DEFAULT_MIN_SIZE = "var(--gap)";
|
|
3676
|
-
const DEFAULT_MAX_SIZE = "100%";
|
|
3677
|
-
/**
|
|
3678
|
-
* Parse a dimension value (string, number, or boolean) into a CSS value
|
|
3679
|
-
*/
|
|
3680
|
-
function parseDimensionValue(val) {
|
|
3681
|
-
if (val == null) return null;
|
|
3682
|
-
if (typeof val === "number") return `${val}px`;
|
|
3683
|
-
if (val === true) return "initial";
|
|
3684
|
-
return parseStyle(String(val)).groups[0]?.values[0] || null;
|
|
3685
|
-
}
|
|
3686
|
-
/**
|
|
3687
|
-
* Creates a dimension style handler for width or height.
|
|
3688
|
-
*
|
|
3689
|
-
* Supports:
|
|
3690
|
-
* - Main dimension prop (width/height) with syntax for min/max
|
|
3691
|
-
* - Separate min/max props (minWidth/maxWidth or minHeight/maxHeight)
|
|
3692
|
-
*
|
|
3693
|
-
* Priority: Individual min/max props override values from main prop syntax
|
|
3694
|
-
*/
|
|
3695
|
-
function dimensionStyle(name) {
|
|
3696
|
-
const minStyle = `min-${name}`;
|
|
3697
|
-
const maxStyle = `max-${name}`;
|
|
3698
|
-
return ({ value, min, max }) => {
|
|
3699
|
-
if (value == null && min == null && max == null) return null;
|
|
3700
|
-
if (value != null && typeof value === "string" && CSS_WIDE_KEYWORDS.has(value)) {
|
|
3701
|
-
const styles = {
|
|
3702
|
-
[name]: value,
|
|
3703
|
-
[minStyle]: value,
|
|
3704
|
-
[maxStyle]: value
|
|
3705
|
-
};
|
|
3706
|
-
const minVal = parseDimensionValue(min);
|
|
3707
|
-
const maxVal = parseDimensionValue(max);
|
|
3708
|
-
if (minVal) styles[minStyle] = minVal;
|
|
3709
|
-
if (maxVal) styles[maxStyle] = maxVal;
|
|
3710
|
-
return styles;
|
|
3711
|
-
}
|
|
3712
|
-
if (value === true) {
|
|
3713
|
-
const styles = {
|
|
3714
|
-
[name]: "auto",
|
|
3715
|
-
[minStyle]: "initial",
|
|
3716
|
-
[maxStyle]: "initial"
|
|
3717
|
-
};
|
|
3718
|
-
const minVal = parseDimensionValue(min);
|
|
3719
|
-
const maxVal = parseDimensionValue(max);
|
|
3720
|
-
if (minVal) styles[minStyle] = minVal;
|
|
3721
|
-
if (maxVal) styles[maxStyle] = maxVal;
|
|
3722
|
-
return styles;
|
|
3723
|
-
}
|
|
3724
|
-
const styles = {
|
|
3725
|
-
[name]: "auto",
|
|
3726
|
-
[minStyle]: "initial",
|
|
3727
|
-
[maxStyle]: "initial"
|
|
3728
|
-
};
|
|
3729
|
-
if (value != null) {
|
|
3730
|
-
let val = value;
|
|
3731
|
-
if (typeof val === "number") val = `${val}px`;
|
|
3732
|
-
val = String(val);
|
|
3733
|
-
const { mods, values } = parseStyle(val).groups[0] ?? makeEmptyDetails();
|
|
3734
|
-
let flag = false;
|
|
3735
|
-
for (const mod of mods) switch (mod) {
|
|
3736
|
-
case "min":
|
|
3737
|
-
styles[minStyle] = values[0] || DEFAULT_MIN_SIZE;
|
|
3738
|
-
flag = true;
|
|
3739
|
-
break;
|
|
3740
|
-
case "max":
|
|
3741
|
-
styles[maxStyle] = values[0] || DEFAULT_MAX_SIZE;
|
|
3742
|
-
flag = true;
|
|
3743
|
-
break;
|
|
3744
|
-
case "fixed": {
|
|
3745
|
-
const fixedValue = values[0] || "max-content";
|
|
3746
|
-
styles[minStyle] = fixedValue;
|
|
3747
|
-
styles[name] = fixedValue;
|
|
3748
|
-
styles[maxStyle] = fixedValue;
|
|
3749
|
-
flag = true;
|
|
3750
|
-
break;
|
|
3751
|
-
}
|
|
3752
|
-
default: break;
|
|
3753
|
-
}
|
|
3754
|
-
if (!flag || !mods.length) if (values.length === 2) {
|
|
3755
|
-
styles[minStyle] = values[0];
|
|
3756
|
-
styles[maxStyle] = values[1];
|
|
3757
|
-
} else if (values.length === 3) {
|
|
3758
|
-
styles[minStyle] = values[0];
|
|
3759
|
-
styles[name] = values[1];
|
|
3760
|
-
styles[maxStyle] = values[2];
|
|
3761
|
-
} else styles[name] = values[0] || "auto";
|
|
3762
|
-
if (styles[name] === "stretch") if (name === "width") styles[name] = [
|
|
3763
|
-
"stretch",
|
|
3764
|
-
"-webkit-fill-available",
|
|
3765
|
-
"-moz-available"
|
|
3766
|
-
];
|
|
3767
|
-
else styles[name] = "auto";
|
|
3768
|
-
}
|
|
3769
|
-
const minVal = parseDimensionValue(min);
|
|
3770
|
-
const maxVal = parseDimensionValue(max);
|
|
3771
|
-
if (minVal) styles[minStyle] = minVal;
|
|
3772
|
-
if (maxVal) styles[maxStyle] = maxVal;
|
|
3773
|
-
return styles;
|
|
3774
|
-
};
|
|
3775
|
-
}
|
|
3776
|
-
//#endregion
|
|
3777
3831
|
//#region src/styles/height.ts
|
|
3778
|
-
const dimension$
|
|
3832
|
+
const dimension$2 = dimensionStyle("height");
|
|
3779
3833
|
function heightStyle({ height, minHeight, maxHeight }) {
|
|
3780
|
-
return dimension$
|
|
3834
|
+
return dimension$2({
|
|
3781
3835
|
value: height,
|
|
3782
3836
|
min: minHeight,
|
|
3783
3837
|
max: maxHeight
|
|
@@ -3840,12 +3894,12 @@ function optimizeShorthand(property, dirs) {
|
|
|
3840
3894
|
* Core directional style logic shared by padding, margin, inset, scrollMargin.
|
|
3841
3895
|
*/
|
|
3842
3896
|
function processDirectionalStyle(config, props) {
|
|
3843
|
-
const { main,
|
|
3844
|
-
if (main == null &&
|
|
3897
|
+
const { main, top, right, bottom, left } = props;
|
|
3898
|
+
if (main == null && top == null && right == null && bottom == null && left == null) return null;
|
|
3845
3899
|
const { property, defaultValue, trueValue, defaultInit, individualOnly, directionProperty, spanModifiers } = config;
|
|
3846
3900
|
const dirProp = directionProperty ?? ((dir) => `${property}-${dir}`);
|
|
3847
3901
|
if (individualOnly) {
|
|
3848
|
-
if (main == null
|
|
3902
|
+
if (main == null) {
|
|
3849
3903
|
const result = {};
|
|
3850
3904
|
if (top != null) {
|
|
3851
3905
|
const val = parseSingleValue(top, defaultValue, trueValue);
|
|
@@ -3896,14 +3950,6 @@ function processDirectionalStyle(config, props) {
|
|
|
3896
3950
|
}
|
|
3897
3951
|
}
|
|
3898
3952
|
}
|
|
3899
|
-
if (block != null) {
|
|
3900
|
-
const val = parseSingleValue(block, defaultValue, trueValue);
|
|
3901
|
-
if (val) dirs.top = dirs.bottom = val;
|
|
3902
|
-
}
|
|
3903
|
-
if (inline != null) {
|
|
3904
|
-
const val = parseSingleValue(inline, defaultValue, trueValue);
|
|
3905
|
-
if (val) dirs.left = dirs.right = val;
|
|
3906
|
-
}
|
|
3907
3953
|
if (top != null) {
|
|
3908
3954
|
const val = parseSingleValue(top, defaultValue, trueValue);
|
|
3909
3955
|
if (val) dirs.top = val;
|
|
@@ -3939,11 +3985,9 @@ const INSET_CONFIG = {
|
|
|
3939
3985
|
spanModifiers: ["dock"],
|
|
3940
3986
|
directionProperty: (dir) => dir
|
|
3941
3987
|
};
|
|
3942
|
-
function insetStyle({ inset,
|
|
3988
|
+
function insetStyle({ inset, top, right, bottom, left }) {
|
|
3943
3989
|
return processDirectionalStyle(INSET_CONFIG, {
|
|
3944
3990
|
main: inset,
|
|
3945
|
-
block: insetBlock,
|
|
3946
|
-
inline: insetInline,
|
|
3947
3991
|
top,
|
|
3948
3992
|
right,
|
|
3949
3993
|
bottom,
|
|
@@ -3952,14 +3996,187 @@ function insetStyle({ inset, insetBlock, insetInline, top, right, bottom, left }
|
|
|
3952
3996
|
}
|
|
3953
3997
|
insetStyle.__lookupStyles = [
|
|
3954
3998
|
"inset",
|
|
3955
|
-
"insetBlock",
|
|
3956
|
-
"insetInline",
|
|
3957
3999
|
"top",
|
|
3958
4000
|
"right",
|
|
3959
4001
|
"bottom",
|
|
3960
4002
|
"left"
|
|
3961
4003
|
];
|
|
3962
4004
|
//#endregion
|
|
4005
|
+
//#region src/styles/inlineSize.ts
|
|
4006
|
+
const dimension$1 = dimensionStyle("inline-size");
|
|
4007
|
+
function inlineSizeStyle({ inlineSize, minInlineSize, maxInlineSize }) {
|
|
4008
|
+
return dimension$1({
|
|
4009
|
+
value: inlineSize,
|
|
4010
|
+
min: minInlineSize,
|
|
4011
|
+
max: maxInlineSize
|
|
4012
|
+
});
|
|
4013
|
+
}
|
|
4014
|
+
inlineSizeStyle.__lookupStyles = [...INLINE_SIZE_STYLES];
|
|
4015
|
+
//#endregion
|
|
4016
|
+
//#region src/styles/logical.ts
|
|
4017
|
+
const LOGICAL_DIRECTIONS = ["start", "end"];
|
|
4018
|
+
/**
|
|
4019
|
+
* Create one enhanced handler for one logical axis/category pair.
|
|
4020
|
+
*
|
|
4021
|
+
* The handler owns the native axis shorthand and its start/end declarations,
|
|
4022
|
+
* but never reads or converts a physical property. The browser remains
|
|
4023
|
+
* responsible for resolving logical edges from writing mode and direction.
|
|
4024
|
+
*/
|
|
4025
|
+
function logicalAxisStyle({ styleName, cssProperty, defaultValue, trueValue, defaultInit }) {
|
|
4026
|
+
const handler = ((styles) => {
|
|
4027
|
+
let value = styles[styleName];
|
|
4028
|
+
if (value == null || value === false || value === "") return null;
|
|
4029
|
+
if (value === true) value = trueValue;
|
|
4030
|
+
if (typeof value === "number") value = `${value}px`;
|
|
4031
|
+
const strValue = String(value);
|
|
4032
|
+
if (CSS_WIDE_KEYWORDS.has(strValue)) return { [cssProperty]: strValue };
|
|
4033
|
+
const groups = parseStyle(strValue).groups ?? [];
|
|
4034
|
+
if (!groups.length) return null;
|
|
4035
|
+
const edges = {
|
|
4036
|
+
start: defaultInit,
|
|
4037
|
+
end: defaultInit
|
|
4038
|
+
};
|
|
4039
|
+
let useLonghand = false;
|
|
4040
|
+
for (const group of groups) {
|
|
4041
|
+
const directions = filterMods(group.mods, LOGICAL_DIRECTIONS);
|
|
4042
|
+
const keyword = extractCSSWideKeyword(group);
|
|
4043
|
+
const values = keyword ? [keyword] : group.values.length ? group.values : [defaultValue];
|
|
4044
|
+
if (directions.length && values.length > 1) warnExtraGroupValues(styleName, group.input, 1, LOGICAL_DIRECTIONS);
|
|
4045
|
+
else if (!directions.length && values.length > 2) warnOnceDev(`extra-logical-axis-values:${styleName}:${group.input}`, `${styleName}="${group.input}": a logical axis takes at most two values in start/end order. The extra values are ignored.`);
|
|
4046
|
+
if (group.mods.includes("longhand")) useLonghand = true;
|
|
4047
|
+
if (!directions.length) {
|
|
4048
|
+
edges.start = values[0];
|
|
4049
|
+
edges.end = values[1] ?? values[0];
|
|
4050
|
+
} else for (const direction of directions) edges[direction] = values[0];
|
|
4051
|
+
}
|
|
4052
|
+
if (useLonghand) return {
|
|
4053
|
+
[`${cssProperty}-start`]: edges.start,
|
|
4054
|
+
[`${cssProperty}-end`]: edges.end
|
|
4055
|
+
};
|
|
4056
|
+
return { [cssProperty]: edges.start === edges.end ? edges.start : `${edges.start} ${edges.end}` };
|
|
4057
|
+
});
|
|
4058
|
+
handler.__lookupStyles = [styleName];
|
|
4059
|
+
return handler;
|
|
4060
|
+
}
|
|
4061
|
+
function zeroBorderValue(value) {
|
|
4062
|
+
const firstSpace = value.indexOf(" ");
|
|
4063
|
+
return firstSpace === -1 ? "0 solid var(--border-color, currentColor)" : `0${value.slice(firstSpace)}`;
|
|
4064
|
+
}
|
|
4065
|
+
/** Create one enhanced border handler for one logical axis. */
|
|
4066
|
+
function logicalBorderStyle(styleName, cssProperty) {
|
|
4067
|
+
const handler = ((styles) => {
|
|
4068
|
+
let value = styles[styleName];
|
|
4069
|
+
if (value == null || value === false || value === "") return null;
|
|
4070
|
+
if (value === true) value = "1bw";
|
|
4071
|
+
if (typeof value === "number") value = `${value}px`;
|
|
4072
|
+
const groups = parseStyle(String(value)).groups ?? [];
|
|
4073
|
+
if (!groups.length) return null;
|
|
4074
|
+
const edges = {
|
|
4075
|
+
start: null,
|
|
4076
|
+
end: null
|
|
4077
|
+
};
|
|
4078
|
+
let fallback = "0 solid var(--border-color, currentColor)";
|
|
4079
|
+
let useLonghand = false;
|
|
4080
|
+
for (const group of groups) {
|
|
4081
|
+
const borderValue = parseBorderValue(group.input);
|
|
4082
|
+
if (borderValue == null) continue;
|
|
4083
|
+
const directions = filterMods(group.mods, LOGICAL_DIRECTIONS);
|
|
4084
|
+
if (group.mods.includes("longhand")) useLonghand = true;
|
|
4085
|
+
if (!directions.length) {
|
|
4086
|
+
edges.start = borderValue;
|
|
4087
|
+
edges.end = borderValue;
|
|
4088
|
+
} else {
|
|
4089
|
+
fallback = zeroBorderValue(borderValue);
|
|
4090
|
+
for (const direction of directions) edges[direction] = borderValue;
|
|
4091
|
+
}
|
|
4092
|
+
}
|
|
4093
|
+
const start = edges.start ?? fallback;
|
|
4094
|
+
const end = edges.end ?? fallback;
|
|
4095
|
+
if (!useLonghand && start === end) return { [cssProperty]: start };
|
|
4096
|
+
return {
|
|
4097
|
+
[`${cssProperty}-start`]: start,
|
|
4098
|
+
[`${cssProperty}-end`]: end
|
|
4099
|
+
};
|
|
4100
|
+
});
|
|
4101
|
+
handler.__lookupStyles = [styleName];
|
|
4102
|
+
return handler;
|
|
4103
|
+
}
|
|
4104
|
+
/** One handler per logical axis/category; native CSS longhands stay ordinary. */
|
|
4105
|
+
const logicalStyleHandlers = {
|
|
4106
|
+
blockPadding: logicalAxisStyle({
|
|
4107
|
+
styleName: "blockPadding",
|
|
4108
|
+
cssProperty: "padding-block",
|
|
4109
|
+
defaultValue: "var(--gap)",
|
|
4110
|
+
trueValue: "1x",
|
|
4111
|
+
defaultInit: "0"
|
|
4112
|
+
}),
|
|
4113
|
+
inlinePadding: logicalAxisStyle({
|
|
4114
|
+
styleName: "inlinePadding",
|
|
4115
|
+
cssProperty: "padding-inline",
|
|
4116
|
+
defaultValue: "var(--gap)",
|
|
4117
|
+
trueValue: "1x",
|
|
4118
|
+
defaultInit: "0"
|
|
4119
|
+
}),
|
|
4120
|
+
blockMargin: logicalAxisStyle({
|
|
4121
|
+
styleName: "blockMargin",
|
|
4122
|
+
cssProperty: "margin-block",
|
|
4123
|
+
defaultValue: "var(--gap)",
|
|
4124
|
+
trueValue: "1x",
|
|
4125
|
+
defaultInit: "0"
|
|
4126
|
+
}),
|
|
4127
|
+
inlineMargin: logicalAxisStyle({
|
|
4128
|
+
styleName: "inlineMargin",
|
|
4129
|
+
cssProperty: "margin-inline",
|
|
4130
|
+
defaultValue: "var(--gap)",
|
|
4131
|
+
trueValue: "1x",
|
|
4132
|
+
defaultInit: "0"
|
|
4133
|
+
}),
|
|
4134
|
+
blockInset: logicalAxisStyle({
|
|
4135
|
+
styleName: "blockInset",
|
|
4136
|
+
cssProperty: "inset-block",
|
|
4137
|
+
defaultValue: "0",
|
|
4138
|
+
trueValue: "0",
|
|
4139
|
+
defaultInit: "auto"
|
|
4140
|
+
}),
|
|
4141
|
+
inlineInset: logicalAxisStyle({
|
|
4142
|
+
styleName: "inlineInset",
|
|
4143
|
+
cssProperty: "inset-inline",
|
|
4144
|
+
defaultValue: "0",
|
|
4145
|
+
trueValue: "0",
|
|
4146
|
+
defaultInit: "auto"
|
|
4147
|
+
}),
|
|
4148
|
+
blockScrollMargin: logicalAxisStyle({
|
|
4149
|
+
styleName: "blockScrollMargin",
|
|
4150
|
+
cssProperty: "scroll-margin-block",
|
|
4151
|
+
defaultValue: "0",
|
|
4152
|
+
trueValue: "1x",
|
|
4153
|
+
defaultInit: "0"
|
|
4154
|
+
}),
|
|
4155
|
+
inlineScrollMargin: logicalAxisStyle({
|
|
4156
|
+
styleName: "inlineScrollMargin",
|
|
4157
|
+
cssProperty: "scroll-margin-inline",
|
|
4158
|
+
defaultValue: "0",
|
|
4159
|
+
trueValue: "1x",
|
|
4160
|
+
defaultInit: "0"
|
|
4161
|
+
}),
|
|
4162
|
+
blockScrollPadding: logicalAxisStyle({
|
|
4163
|
+
styleName: "blockScrollPadding",
|
|
4164
|
+
cssProperty: "scroll-padding-block",
|
|
4165
|
+
defaultValue: "0",
|
|
4166
|
+
trueValue: "1x",
|
|
4167
|
+
defaultInit: "0"
|
|
4168
|
+
}),
|
|
4169
|
+
inlineScrollPadding: logicalAxisStyle({
|
|
4170
|
+
styleName: "inlineScrollPadding",
|
|
4171
|
+
cssProperty: "scroll-padding-inline",
|
|
4172
|
+
defaultValue: "0",
|
|
4173
|
+
trueValue: "1x",
|
|
4174
|
+
defaultInit: "0"
|
|
4175
|
+
}),
|
|
4176
|
+
blockBorder: logicalBorderStyle("blockBorder", "border-block"),
|
|
4177
|
+
inlineBorder: logicalBorderStyle("inlineBorder", "border-inline")
|
|
4178
|
+
};
|
|
4179
|
+
//#endregion
|
|
3963
4180
|
//#region src/styles/margin.ts
|
|
3964
4181
|
const MARGIN_CONFIG = {
|
|
3965
4182
|
property: "margin",
|
|
@@ -3967,11 +4184,9 @@ const MARGIN_CONFIG = {
|
|
|
3967
4184
|
trueValue: "1x",
|
|
3968
4185
|
defaultInit: "0"
|
|
3969
4186
|
};
|
|
3970
|
-
function marginStyle({ margin,
|
|
4187
|
+
function marginStyle({ margin, marginTop, marginRight, marginBottom, marginLeft }) {
|
|
3971
4188
|
return processDirectionalStyle(MARGIN_CONFIG, {
|
|
3972
4189
|
main: margin,
|
|
3973
|
-
block: marginBlock,
|
|
3974
|
-
inline: marginInline,
|
|
3975
4190
|
top: marginTop,
|
|
3976
4191
|
right: marginRight,
|
|
3977
4192
|
bottom: marginBottom,
|
|
@@ -3983,9 +4198,7 @@ marginStyle.__lookupStyles = [
|
|
|
3983
4198
|
"marginTop",
|
|
3984
4199
|
"marginRight",
|
|
3985
4200
|
"marginBottom",
|
|
3986
|
-
"marginLeft"
|
|
3987
|
-
"marginBlock",
|
|
3988
|
-
"marginInline"
|
|
4201
|
+
"marginLeft"
|
|
3989
4202
|
];
|
|
3990
4203
|
//#endregion
|
|
3991
4204
|
//#region src/styles/outline.ts
|
|
@@ -4045,11 +4258,9 @@ const PADDING_CONFIG = {
|
|
|
4045
4258
|
trueValue: "1x",
|
|
4046
4259
|
defaultInit: "0"
|
|
4047
4260
|
};
|
|
4048
|
-
function paddingStyle({ padding,
|
|
4261
|
+
function paddingStyle({ padding, paddingTop, paddingRight, paddingBottom, paddingLeft }) {
|
|
4049
4262
|
return processDirectionalStyle(PADDING_CONFIG, {
|
|
4050
4263
|
main: padding,
|
|
4051
|
-
block: paddingBlock,
|
|
4052
|
-
inline: paddingInline,
|
|
4053
4264
|
top: paddingTop,
|
|
4054
4265
|
right: paddingRight,
|
|
4055
4266
|
bottom: paddingBottom,
|
|
@@ -4061,9 +4272,7 @@ paddingStyle.__lookupStyles = [
|
|
|
4061
4272
|
"paddingTop",
|
|
4062
4273
|
"paddingRight",
|
|
4063
4274
|
"paddingBottom",
|
|
4064
|
-
"paddingLeft"
|
|
4065
|
-
"paddingBlock",
|
|
4066
|
-
"paddingInline"
|
|
4275
|
+
"paddingLeft"
|
|
4067
4276
|
];
|
|
4068
4277
|
//#endregion
|
|
4069
4278
|
//#region src/styles/placement.ts
|
|
@@ -4370,11 +4579,9 @@ const SCROLL_MARGIN_CONFIG = {
|
|
|
4370
4579
|
trueValue: "1x",
|
|
4371
4580
|
defaultInit: "0"
|
|
4372
4581
|
};
|
|
4373
|
-
function scrollMarginStyle({ scrollMargin,
|
|
4582
|
+
function scrollMarginStyle({ scrollMargin, scrollMarginTop, scrollMarginRight, scrollMarginBottom, scrollMarginLeft }) {
|
|
4374
4583
|
return processDirectionalStyle(SCROLL_MARGIN_CONFIG, {
|
|
4375
4584
|
main: scrollMargin,
|
|
4376
|
-
block: scrollMarginBlock,
|
|
4377
|
-
inline: scrollMarginInline,
|
|
4378
4585
|
top: scrollMarginTop,
|
|
4379
4586
|
right: scrollMarginRight,
|
|
4380
4587
|
bottom: scrollMarginBottom,
|
|
@@ -4386,9 +4593,31 @@ scrollMarginStyle.__lookupStyles = [
|
|
|
4386
4593
|
"scrollMarginTop",
|
|
4387
4594
|
"scrollMarginRight",
|
|
4388
4595
|
"scrollMarginBottom",
|
|
4389
|
-
"scrollMarginLeft"
|
|
4390
|
-
|
|
4391
|
-
|
|
4596
|
+
"scrollMarginLeft"
|
|
4597
|
+
];
|
|
4598
|
+
//#endregion
|
|
4599
|
+
//#region src/styles/scrollPadding.ts
|
|
4600
|
+
const SCROLL_PADDING_CONFIG = {
|
|
4601
|
+
property: "scroll-padding",
|
|
4602
|
+
defaultValue: "0",
|
|
4603
|
+
trueValue: "1x",
|
|
4604
|
+
defaultInit: "0"
|
|
4605
|
+
};
|
|
4606
|
+
function scrollPaddingStyle({ scrollPadding, scrollPaddingTop, scrollPaddingRight, scrollPaddingBottom, scrollPaddingLeft }) {
|
|
4607
|
+
return processDirectionalStyle(SCROLL_PADDING_CONFIG, {
|
|
4608
|
+
main: scrollPadding,
|
|
4609
|
+
top: scrollPaddingTop,
|
|
4610
|
+
right: scrollPaddingRight,
|
|
4611
|
+
bottom: scrollPaddingBottom,
|
|
4612
|
+
left: scrollPaddingLeft
|
|
4613
|
+
});
|
|
4614
|
+
}
|
|
4615
|
+
scrollPaddingStyle.__lookupStyles = [
|
|
4616
|
+
"scrollPadding",
|
|
4617
|
+
"scrollPaddingTop",
|
|
4618
|
+
"scrollPaddingRight",
|
|
4619
|
+
"scrollPaddingBottom",
|
|
4620
|
+
"scrollPaddingLeft"
|
|
4392
4621
|
];
|
|
4393
4622
|
//#endregion
|
|
4394
4623
|
//#region src/styles/scrollbar.ts
|
|
@@ -4729,7 +4958,11 @@ function predefine() {
|
|
|
4729
4958
|
outlineStyle,
|
|
4730
4959
|
scrollbarStyle,
|
|
4731
4960
|
fadeStyle,
|
|
4732
|
-
insetStyle
|
|
4961
|
+
insetStyle,
|
|
4962
|
+
blockSizeStyle,
|
|
4963
|
+
inlineSizeStyle,
|
|
4964
|
+
scrollPaddingStyle,
|
|
4965
|
+
...Object.values(logicalStyleHandlers)
|
|
4733
4966
|
].forEach((handler) => defineCustomStyle(handler));
|
|
4734
4967
|
captureInitialHandlerState();
|
|
4735
4968
|
return {
|
|
@@ -4881,6 +5114,10 @@ function wrapHandler(handler) {
|
|
|
4881
5114
|
wrapped.__lookupStyles = handler.__lookupStyles;
|
|
4882
5115
|
return wrapped;
|
|
4883
5116
|
}
|
|
5117
|
+
function wrapHandlerRecord(handlers) {
|
|
5118
|
+
return Object.fromEntries(Object.entries(handlers).map(([name, handler]) => [name, wrapHandler(handler)]));
|
|
5119
|
+
}
|
|
5120
|
+
const wrappedLogicalStyleHandlers = wrapHandlerRecord(logicalStyleHandlers);
|
|
4884
5121
|
/**
|
|
4885
5122
|
* Exported object containing wrapped predefined style handlers.
|
|
4886
5123
|
* Users can import and call these to extend or delegate to built-in behavior.
|
|
@@ -4905,6 +5142,7 @@ function wrapHandler(handler) {
|
|
|
4905
5142
|
* ```
|
|
4906
5143
|
*/
|
|
4907
5144
|
const styleHandlers = {
|
|
5145
|
+
blockSize: wrapHandler(blockSizeStyle),
|
|
4908
5146
|
border: wrapHandler(borderStyle),
|
|
4909
5147
|
color: wrapHandler(colorStyle),
|
|
4910
5148
|
display: wrapHandler(displayStyle),
|
|
@@ -4915,6 +5153,8 @@ const styleHandlers = {
|
|
|
4915
5153
|
gap: wrapHandler(gapStyle),
|
|
4916
5154
|
height: wrapHandler(heightStyle),
|
|
4917
5155
|
inset: wrapHandler(insetStyle),
|
|
5156
|
+
inlineSize: wrapHandler(inlineSizeStyle),
|
|
5157
|
+
...wrappedLogicalStyleHandlers,
|
|
4918
5158
|
margin: wrapHandler(marginStyle),
|
|
4919
5159
|
outline: wrapHandler(outlineStyle),
|
|
4920
5160
|
padding: wrapHandler(paddingStyle),
|
|
@@ -4922,6 +5162,7 @@ const styleHandlers = {
|
|
|
4922
5162
|
preset: wrapHandler(presetStyle),
|
|
4923
5163
|
radius: wrapHandler(radiusStyle),
|
|
4924
5164
|
scrollMargin: wrapHandler(scrollMarginStyle),
|
|
5165
|
+
scrollPadding: wrapHandler(scrollPaddingStyle),
|
|
4925
5166
|
scrollbar: wrapHandler(scrollbarStyle),
|
|
4926
5167
|
shadow: wrapHandler(shadowStyle),
|
|
4927
5168
|
transition: wrapHandler(transitionStyle),
|
|
@@ -11478,20 +11719,25 @@ const POSITION_STYLES = [
|
|
|
11478
11719
|
"justifySelf",
|
|
11479
11720
|
"zIndex",
|
|
11480
11721
|
"margin",
|
|
11722
|
+
...LOGICAL_MARGIN_STYLES,
|
|
11481
11723
|
"inset",
|
|
11724
|
+
...LOGICAL_INSET_STYLES,
|
|
11482
11725
|
"position",
|
|
11483
|
-
"scrollMargin"
|
|
11726
|
+
"scrollMargin",
|
|
11727
|
+
...LOGICAL_SCROLL_MARGIN_STYLES,
|
|
11728
|
+
"scrollPadding",
|
|
11729
|
+
...LOGICAL_SCROLL_PADDING_STYLES
|
|
11484
11730
|
];
|
|
11485
11731
|
const BLOCK_INNER_STYLES = [
|
|
11486
11732
|
"padding",
|
|
11487
|
-
|
|
11488
|
-
"paddingBlock",
|
|
11733
|
+
...LOGICAL_PADDING_STYLES,
|
|
11489
11734
|
"overflow",
|
|
11490
11735
|
"scrollbar",
|
|
11491
11736
|
"textAlign"
|
|
11492
11737
|
];
|
|
11493
11738
|
const BLOCK_OUTER_STYLES = [
|
|
11494
11739
|
"border",
|
|
11740
|
+
...LOGICAL_BORDER_STYLES,
|
|
11495
11741
|
"radius",
|
|
11496
11742
|
"shadow",
|
|
11497
11743
|
"outline"
|
|
@@ -11511,6 +11757,7 @@ const TEXT_STYLES = [
|
|
|
11511
11757
|
const DIMENSION_STYLES = [
|
|
11512
11758
|
"width",
|
|
11513
11759
|
"height",
|
|
11760
|
+
...LOGICAL_SIZE_STYLES,
|
|
11514
11761
|
"flexBasis",
|
|
11515
11762
|
"flexGrow",
|
|
11516
11763
|
"flexShrink",
|
|
@@ -12418,4 +12665,4 @@ function resetConfig() {
|
|
|
12418
12665
|
//#endregion
|
|
12419
12666
|
export { SheetManager as $, StyleParser as $t, FLOW_STYLES as A, STYLE_TO_CHUNK as At, createStateParserContext as B, getGlobalParseFunctions as Bt, BASE_STYLES as C, APPEARANCE_CHUNK_STYLES as Ct, COLOR_STYLES as D, FONT_CHUNK_STYLES as Dt, BLOCK_STYLES as E, DISPLAY_CHUNK_STYLES as Et, hasPipelineCacheEntry as F, registerFunctionPolyfill as Ft, StyleInjector as G, parseStyle as Gt, extractPredefinedStateRefs as H, getGlobalPredefinedTokens as Ht, isSelector as I, registerLocalFunctionPolyfills as It, hasLocalCounterStyle as J, okhstPlugin as Jt, extractLocalCounterStyle as K, stringifyStyles as Kt, renderStyles as L, CUSTOM_UNITS as Lt, OUTER_STYLES as M, formatFunctionRule as Mt, POSITION_STYLES as N, hasLocalFunctions as Nt, CONTAINER_STYLES as O, LAYOUT_CHUNK_STYLES as Ot, TEXT_STYLES as P, parseFunctionName as Pt, hasLocalFontFace as Q, isDevEnv as Qt, parseStateKey as R, DIRECTIONS as Rt, baseStylePropsRegistry as S, propHandlerRegistry as St, BLOCK_OUTER_STYLES as T, DIMENSION_CHUNK_STYLES as Tt, getGlobalPredefinedStates as U, normalizeColorTokenValue as Ut, extractLocalPredefinedStates as V, getGlobalParser as Vt, setGlobalPredefinedStates as W, parseColor as Wt, fontFaceContentHash as X, okhslPlugin as Xt, extractLocalFontFace as Y, okhslFunction as Yt, formatFontFaceRule as Z, createColorFunc as Zt, isFunctionsPolyfillEnabled as _, hashString as _t, getGlobalCounterStyles as a, hslToRgbValues as an, closeBatchWindow as at, resetConfig as b, hasLocalProperties as bt, getGlobalInjector as c, openBatchWindow as ct, getGlobalStyles as d, DEFAULT_ZERO_NAME_PREFIX as dt, Lru as en, STYLE_HANDLER_MAP as et, getNamePrefix as f, makeClassName as ft, isConfigLocked as g, validateNamePrefix as gt, hasStylesGenerated as h, tastyClassRegex as ht, getGlobalConfigTokens as i, hexToRgb as in, PropertyTypeResolver as it, INNER_STYLES as j, extractLocalFunctions as jt, DIMENSION_STYLES as k, POSITION_CHUNK_STYLES as kt, getGlobalKeyframes as l, resetStyleBatch as lt, hasGlobalRecipes as m, makeKeyframeName as mt, getConfig as n, getNamedColorHex as nn, styleHandlers as nt, getGlobalFontFaces as o, strToRgb as on, flushStyles as ot, hasGlobalKeyframes as p, makeCounterStyleName as pt, formatCounterStyleRule as q, okhstFunction as qt, getEffectiveProperties as r, getRgbValuesFromRgbaString as rn, createStyle as rt, getGlobalFunctions as s, normalizeDslName as sn, hasPendingStyleWrites as st, configure as t, overrideColorAlpha as tn, defineHandler as tt, getGlobalRecipes as u, DEFAULT_NAME_PREFIX as ut, isTestEnvironment as v, extractLocalProperties as vt, BLOCK_INNER_STYLES as w, CHUNK_NAMES as wt, generateTypographyTokens as x, parsePropertyToken as xt, markStylesGenerated as y, getEffectiveDefinition as yt, camelToKebab as z, filterMods as zt };
|
|
12420
12667
|
|
|
12421
|
-
//# sourceMappingURL=config-
|
|
12668
|
+
//# sourceMappingURL=config-yXpe2jAV.js.map
|