@takumi-rs/helpers 0.31.3 → 0.32.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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ContainerNode, P as PartialStyle, T as TextNode, I as ImageNode, S as Style, a as Color } from './types-DrsQhvya.cjs';
2
- export { A as AnyNode, J as JsonValue, N as Node } from './types-DrsQhvya.cjs';
1
+ import { C as ContainerNode, P as PartialStyle, T as TextNode, I as ImageNode, S as Style, a as Color } from './types-CIAK4Jh8.cjs';
2
+ export { A as AnyNode, J as JsonValue, N as Node } from './types-CIAK4Jh8.cjs';
3
3
 
4
4
  declare function container(props: Omit<ContainerNode, "type">): ContainerNode;
5
5
  declare function text(text: string, style?: PartialStyle): TextNode;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ContainerNode, P as PartialStyle, T as TextNode, I as ImageNode, S as Style, a as Color } from './types-DrsQhvya.js';
2
- export { A as AnyNode, J as JsonValue, N as Node } from './types-DrsQhvya.js';
1
+ import { C as ContainerNode, P as PartialStyle, T as TextNode, I as ImageNode, S as Style, a as Color } from './types-CIAK4Jh8.js';
2
+ export { A as AnyNode, J as JsonValue, N as Node } from './types-CIAK4Jh8.js';
3
3
 
4
4
  declare function container(props: Omit<ContainerNode, "type">): ContainerNode;
5
5
  declare function text(text: string, style?: PartialStyle): TextNode;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { N as Node } from '../types-DrsQhvya.cjs';
2
+ import { N as Node } from '../types-CIAK4Jh8.cjs';
3
3
 
4
4
  type ReactElementLike = {
5
5
  type: string | symbol | ((props: unknown) => ReactElementLike) | ReactElementLike;
package/dist/jsx/jsx.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { N as Node } from '../types-DrsQhvya.js';
2
+ import { N as Node } from '../types-CIAK4Jh8.js';
3
3
 
4
4
  type ReactElementLike = {
5
5
  type: string | symbol | ((props: unknown) => ReactElementLike) | ReactElementLike;
@@ -4,7 +4,12 @@
4
4
  * This enum determines how items are aligned within the flex container
5
5
  * along the cross axis (perpendicular to the main axis).
6
6
  */
7
- type AlignItems = "start" | "end" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch";
7
+ type AlignItems = "normal" | "start" | "end" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch";
8
+
9
+ /**
10
+ * Represents a aspect ratio.
11
+ */
12
+ type AspectRatio = number | "auto" | (string & {});
8
13
 
9
14
  /**
10
15
  * Represents an angle value in degrees.
@@ -292,10 +297,20 @@ type BoxShadows = Array<BoxShadow> | string;
292
297
  */
293
298
  type BoxSizing = "content-box" | "border-box";
294
299
 
300
+ /**
301
+ * Proxy type for CSS `Option` serialization/deserialization.
302
+ */
303
+ type CssOption<T> = T | null;
304
+
305
+ /**
306
+ * CSS Global keyword
307
+ */
308
+ type CssGlobalKeyword = "initial" | "inherit";
309
+
295
310
  /**
296
311
  * Represents a CSS property value that can be explicitly set, inherited from parent, or reset to initial value.
297
312
  */
298
- type CssValue<T> = "initial" | "inherit" | T;
313
+ type CssValue<T> = CssGlobalKeyword | T;
299
314
 
300
315
  /**
301
316
  * This enum determines the layout algorithm used for the children of a node.
@@ -309,6 +324,11 @@ type Display = "flex" | "grid";
309
324
  */
310
325
  type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
311
326
 
327
+ /**
328
+ * Represents a flex grow value.
329
+ */
330
+ type FlexGrow = number | string;
331
+
312
332
  /**
313
333
  * Defines how flex items should wrap.
314
334
  *
@@ -362,11 +382,21 @@ type Gap = LengthUnit | [LengthUnit, LengthUnit] | string;
362
382
  type GridAutoFlow = "row" | "column" | "row dense" | "column dense";
363
383
 
364
384
  /**
365
- * Represents a grid placement with serde support
385
+ * Represents a grid placement keyword
386
+ */
387
+ type GridPlacementKeyword = "auto";
388
+
389
+ /**
390
+ * Represents a grid placement span
366
391
  */
367
- type GridPlacement = "auto" | {
392
+ type GridPlacementSpan = {
368
393
  span: number;
369
- } | number | string;
394
+ };
395
+
396
+ /**
397
+ * Represents a grid placement with serde support
398
+ */
399
+ type GridPlacement = GridPlacementKeyword | GridPlacementSpan | number | string;
370
400
 
371
401
  /**
372
402
  * Represents a grid line placement with serde support
@@ -391,11 +421,16 @@ type GridLine = {
391
421
  type GridTemplateAreas = Array<Array<string>> | string;
392
422
 
393
423
  /**
394
- * Represents a grid track sizing function with serde support
424
+ * Represents a fraction of the available space
395
425
  */
396
- type GridLengthUnit = {
426
+ type FrLengthUnit = {
397
427
  fr: number;
398
- } | LengthUnit | string;
428
+ };
429
+
430
+ /**
431
+ * Represents a grid track sizing function with serde support
432
+ */
433
+ type GridLengthUnit = FrLengthUnit | LengthUnit | string;
399
434
 
400
435
  /**
401
436
  * Represents a grid minmax()
@@ -435,10 +470,15 @@ type GridRepeatTrack = {
435
470
  endNames?: Array<string>;
436
471
  };
437
472
 
473
+ /**
474
+ * Represents grid track repetition keywords
475
+ */
476
+ type GridRepetitionKeyword = "auto-fill" | "auto-fit";
477
+
438
478
  /**
439
479
  * Represents a grid track repetition pattern
440
480
  */
441
- type GridRepetitionCount = "auto-fill" | "auto-fit" | number;
481
+ type GridRepetitionCount = GridRepetitionKeyword | number;
442
482
 
443
483
  /**
444
484
  * Represents a track sizing function or a list of line names between tracks
@@ -469,7 +509,7 @@ type ImageScalingAlgorithm = "auto" | "smooth" | "pixelated";
469
509
  * This enum determines how space is distributed between and around flex items
470
510
  * along the main axis of the flex container.
471
511
  */
472
- type JustifyContent = "start" | "end" | "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-evenly" | "space-around";
512
+ type JustifyContent = "normal" | "start" | "end" | "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-evenly" | "space-around";
473
513
 
474
514
  /**
475
515
  * Represents a line height value, number value is parsed as em.
@@ -649,90 +689,90 @@ type Style = {
649
689
  maxHeight: CssValue<LengthUnit>;
650
690
  minWidth: CssValue<LengthUnit>;
651
691
  minHeight: CssValue<LengthUnit>;
652
- aspectRatio: CssValue<number | null>;
692
+ aspectRatio: CssValue<AspectRatio>;
653
693
  padding: CssValue<Sides<LengthUnit>>;
654
- paddingTop: CssValue<LengthUnit | null>;
655
- paddingRight: CssValue<LengthUnit | null>;
656
- paddingBottom: CssValue<LengthUnit | null>;
657
- paddingLeft: CssValue<LengthUnit | null>;
694
+ paddingTop: CssValue<CssOption<LengthUnit>>;
695
+ paddingRight: CssValue<CssOption<LengthUnit>>;
696
+ paddingBottom: CssValue<CssOption<LengthUnit>>;
697
+ paddingLeft: CssValue<CssOption<LengthUnit>>;
658
698
  margin: CssValue<Sides<LengthUnit>>;
659
- marginTop: CssValue<LengthUnit | null>;
660
- marginRight: CssValue<LengthUnit | null>;
661
- marginBottom: CssValue<LengthUnit | null>;
662
- marginLeft: CssValue<LengthUnit | null>;
699
+ marginTop: CssValue<CssOption<LengthUnit>>;
700
+ marginRight: CssValue<CssOption<LengthUnit>>;
701
+ marginBottom: CssValue<CssOption<LengthUnit>>;
702
+ marginLeft: CssValue<CssOption<LengthUnit>>;
663
703
  inset: CssValue<Sides<LengthUnit>>;
664
- top: CssValue<LengthUnit | null>;
665
- right: CssValue<LengthUnit | null>;
666
- bottom: CssValue<LengthUnit | null>;
667
- left: CssValue<LengthUnit | null>;
704
+ top: CssValue<CssOption<LengthUnit>>;
705
+ right: CssValue<CssOption<LengthUnit>>;
706
+ bottom: CssValue<CssOption<LengthUnit>>;
707
+ left: CssValue<CssOption<LengthUnit>>;
668
708
  flexDirection: CssValue<FlexDirection>;
669
- justifySelf: CssValue<AlignItems | null>;
670
- justifyContent: CssValue<JustifyContent | null>;
671
- alignContent: CssValue<JustifyContent | null>;
672
- justifyItems: CssValue<AlignItems | null>;
673
- alignItems: CssValue<AlignItems | null>;
674
- alignSelf: CssValue<AlignItems | null>;
709
+ justifySelf: CssValue<AlignItems>;
710
+ justifyContent: CssValue<JustifyContent>;
711
+ alignContent: CssValue<JustifyContent>;
712
+ justifyItems: CssValue<AlignItems>;
713
+ alignItems: CssValue<AlignItems>;
714
+ alignSelf: CssValue<AlignItems>;
675
715
  flexWrap: CssValue<FlexWrap>;
676
716
  flexBasis: CssValue<LengthUnit>;
677
717
  position: CssValue<Position>;
678
- transform: CssValue<Transforms | null>;
679
- transformOrigin: CssValue<BackgroundPosition | null>;
680
- maskImage: CssValue<BackgroundImages | null>;
681
- maskSize: CssValue<BackgroundSizes | null>;
682
- maskPosition: CssValue<BackgroundPositions | null>;
683
- maskRepeat: CssValue<BackgroundRepeats | null>;
718
+ transform: CssValue<CssOption<Transforms>>;
719
+ transformOrigin: CssValue<CssOption<BackgroundPosition>>;
720
+ maskImage: CssValue<CssOption<BackgroundImages>>;
721
+ maskSize: CssValue<CssOption<BackgroundSizes>>;
722
+ maskPosition: CssValue<CssOption<BackgroundPositions>>;
723
+ maskRepeat: CssValue<CssOption<BackgroundRepeats>>;
684
724
  gap: CssValue<Gap>;
685
- flexGrow: CssValue<number>;
686
- flexShrink: CssValue<number>;
725
+ flexGrow: CssValue<FlexGrow>;
726
+ flexShrink: CssValue<FlexGrow>;
687
727
  borderRadius: CssValue<Sides<LengthUnit>>;
688
- borderTopLeftRadius: CssValue<LengthUnit | null>;
689
- borderTopRightRadius: CssValue<LengthUnit | null>;
690
- borderBottomRightRadius: CssValue<LengthUnit | null>;
691
- borderBottomLeftRadius: CssValue<LengthUnit | null>;
692
- borderWidth: CssValue<Sides<LengthUnit> | null>;
693
- borderTopWidth: CssValue<LengthUnit | null>;
694
- borderRightWidth: CssValue<LengthUnit | null>;
695
- borderBottomWidth: CssValue<LengthUnit | null>;
696
- borderLeftWidth: CssValue<LengthUnit | null>;
728
+ borderTopLeftRadius: CssValue<CssOption<LengthUnit>>;
729
+ borderTopRightRadius: CssValue<CssOption<LengthUnit>>;
730
+ borderBottomRightRadius: CssValue<CssOption<LengthUnit>>;
731
+ borderBottomLeftRadius: CssValue<CssOption<LengthUnit>>;
732
+ borderWidth: CssValue<CssOption<Sides<LengthUnit>>>;
733
+ borderTopWidth: CssValue<CssOption<LengthUnit>>;
734
+ borderRightWidth: CssValue<CssOption<LengthUnit>>;
735
+ borderBottomWidth: CssValue<CssOption<LengthUnit>>;
736
+ borderLeftWidth: CssValue<CssOption<LengthUnit>>;
697
737
  border: CssValue<Border>;
698
738
  objectFit: CssValue<ObjectFit>;
699
739
  objectPosition: CssValue<BackgroundPosition>;
700
- backgroundImage: CssValue<BackgroundImages | null>;
701
- backgroundPosition: CssValue<BackgroundPositions | null>;
702
- backgroundSize: CssValue<BackgroundSizes | null>;
703
- backgroundRepeat: CssValue<BackgroundRepeats | null>;
740
+ backgroundImage: CssValue<CssOption<BackgroundImages>>;
741
+ backgroundPosition: CssValue<CssOption<BackgroundPositions>>;
742
+ backgroundSize: CssValue<CssOption<BackgroundSizes>>;
743
+ backgroundRepeat: CssValue<CssOption<BackgroundRepeats>>;
704
744
  backgroundColor: CssValue<Color>;
705
- boxShadow: CssValue<BoxShadows | null>;
706
- gridAutoColumns: CssValue<GridTrackSizes | null>;
707
- gridAutoRows: CssValue<GridTrackSizes | null>;
708
- gridAutoFlow: CssValue<GridAutoFlow | null>;
709
- gridColumn: CssValue<GridLine | null>;
710
- gridRow: CssValue<GridLine | null>;
711
- gridTemplateColumns: CssValue<GridTemplateComponents | null>;
712
- gridTemplateRows: CssValue<GridTemplateComponents | null>;
713
- gridTemplateAreas: CssValue<GridTemplateAreas | null>;
745
+ boxShadow: CssValue<CssOption<BoxShadows>>;
746
+ gridAutoColumns: CssValue<CssOption<GridTrackSizes>>;
747
+ gridAutoRows: CssValue<CssOption<GridTrackSizes>>;
748
+ gridAutoFlow: CssValue<CssOption<GridAutoFlow>>;
749
+ gridColumn: CssValue<CssOption<GridLine>>;
750
+ gridRow: CssValue<CssOption<GridLine>>;
751
+ gridTemplateColumns: CssValue<CssOption<GridTemplateComponents>>;
752
+ gridTemplateRows: CssValue<CssOption<GridTemplateComponents>>;
753
+ gridTemplateAreas: CssValue<CssOption<GridTemplateAreas>>;
714
754
  textOverflow: CssValue<TextOverflow>;
715
755
  textTransform: CssValue<TextTransform>;
716
756
  fontStyle: CssValue<FontStyle>;
717
- borderColor: CssValue<Color | null>;
757
+ borderColor: CssValue<CssOption<Color>>;
718
758
  color: CssValue<Color>;
719
- fontSize: CssValue<LengthUnit | null>;
720
- fontFamily: CssValue<FontFamily | null>;
759
+ fontSize: CssValue<CssOption<LengthUnit>>;
760
+ fontFamily: CssValue<CssOption<FontFamily>>;
721
761
  lineHeight: CssValue<LineHeight>;
722
762
  fontWeight: CssValue<FontWeight>;
723
- fontVariationSettings: CssValue<FontVariationSettings | null>;
724
- fontFeatureSettings: CssValue<FontFeatureSettings | null>;
725
- lineClamp: CssValue<number | null>;
763
+ fontVariationSettings: CssValue<CssOption<FontVariationSettings>>;
764
+ fontFeatureSettings: CssValue<CssOption<FontFeatureSettings>>;
765
+ lineClamp: CssValue<CssOption<number>>;
726
766
  textAlign: CssValue<TextAlign>;
727
767
  textStrokeWidth: CssValue<LengthUnit>;
728
- textStrokeColor: CssValue<Color | null>;
729
- textStroke: CssValue<TextStroke | null>;
730
- textShadow: CssValue<TextShadows | null>;
768
+ textStrokeColor: CssValue<CssOption<Color>>;
769
+ textStroke: CssValue<CssOption<TextStroke>>;
770
+ textShadow: CssValue<CssOption<TextShadows>>;
731
771
  textDecoration: CssValue<TextDecoration>;
732
- textDecorationLine: CssValue<TextDecorationLines | null>;
733
- textDecorationColor: CssValue<Color | null>;
734
- letterSpacing: CssValue<LengthUnit | null>;
735
- wordSpacing: CssValue<LengthUnit | null>;
772
+ textDecorationLine: CssValue<CssOption<TextDecorationLines>>;
773
+ textDecorationColor: CssValue<CssOption<Color>>;
774
+ letterSpacing: CssValue<CssOption<LengthUnit>>;
775
+ wordSpacing: CssValue<CssOption<LengthUnit>>;
736
776
  imageRendering: CssValue<ImageScalingAlgorithm>;
737
777
  overflowWrap: CssValue<OverflowWrap>;
738
778
  wordBreak: CssValue<WordBreak>;
@@ -4,7 +4,12 @@
4
4
  * This enum determines how items are aligned within the flex container
5
5
  * along the cross axis (perpendicular to the main axis).
6
6
  */
7
- type AlignItems = "start" | "end" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch";
7
+ type AlignItems = "normal" | "start" | "end" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch";
8
+
9
+ /**
10
+ * Represents a aspect ratio.
11
+ */
12
+ type AspectRatio = number | "auto" | (string & {});
8
13
 
9
14
  /**
10
15
  * Represents an angle value in degrees.
@@ -292,10 +297,20 @@ type BoxShadows = Array<BoxShadow> | string;
292
297
  */
293
298
  type BoxSizing = "content-box" | "border-box";
294
299
 
300
+ /**
301
+ * Proxy type for CSS `Option` serialization/deserialization.
302
+ */
303
+ type CssOption<T> = T | null;
304
+
305
+ /**
306
+ * CSS Global keyword
307
+ */
308
+ type CssGlobalKeyword = "initial" | "inherit";
309
+
295
310
  /**
296
311
  * Represents a CSS property value that can be explicitly set, inherited from parent, or reset to initial value.
297
312
  */
298
- type CssValue<T> = "initial" | "inherit" | T;
313
+ type CssValue<T> = CssGlobalKeyword | T;
299
314
 
300
315
  /**
301
316
  * This enum determines the layout algorithm used for the children of a node.
@@ -309,6 +324,11 @@ type Display = "flex" | "grid";
309
324
  */
310
325
  type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
311
326
 
327
+ /**
328
+ * Represents a flex grow value.
329
+ */
330
+ type FlexGrow = number | string;
331
+
312
332
  /**
313
333
  * Defines how flex items should wrap.
314
334
  *
@@ -362,11 +382,21 @@ type Gap = LengthUnit | [LengthUnit, LengthUnit] | string;
362
382
  type GridAutoFlow = "row" | "column" | "row dense" | "column dense";
363
383
 
364
384
  /**
365
- * Represents a grid placement with serde support
385
+ * Represents a grid placement keyword
386
+ */
387
+ type GridPlacementKeyword = "auto";
388
+
389
+ /**
390
+ * Represents a grid placement span
366
391
  */
367
- type GridPlacement = "auto" | {
392
+ type GridPlacementSpan = {
368
393
  span: number;
369
- } | number | string;
394
+ };
395
+
396
+ /**
397
+ * Represents a grid placement with serde support
398
+ */
399
+ type GridPlacement = GridPlacementKeyword | GridPlacementSpan | number | string;
370
400
 
371
401
  /**
372
402
  * Represents a grid line placement with serde support
@@ -391,11 +421,16 @@ type GridLine = {
391
421
  type GridTemplateAreas = Array<Array<string>> | string;
392
422
 
393
423
  /**
394
- * Represents a grid track sizing function with serde support
424
+ * Represents a fraction of the available space
395
425
  */
396
- type GridLengthUnit = {
426
+ type FrLengthUnit = {
397
427
  fr: number;
398
- } | LengthUnit | string;
428
+ };
429
+
430
+ /**
431
+ * Represents a grid track sizing function with serde support
432
+ */
433
+ type GridLengthUnit = FrLengthUnit | LengthUnit | string;
399
434
 
400
435
  /**
401
436
  * Represents a grid minmax()
@@ -435,10 +470,15 @@ type GridRepeatTrack = {
435
470
  endNames?: Array<string>;
436
471
  };
437
472
 
473
+ /**
474
+ * Represents grid track repetition keywords
475
+ */
476
+ type GridRepetitionKeyword = "auto-fill" | "auto-fit";
477
+
438
478
  /**
439
479
  * Represents a grid track repetition pattern
440
480
  */
441
- type GridRepetitionCount = "auto-fill" | "auto-fit" | number;
481
+ type GridRepetitionCount = GridRepetitionKeyword | number;
442
482
 
443
483
  /**
444
484
  * Represents a track sizing function or a list of line names between tracks
@@ -469,7 +509,7 @@ type ImageScalingAlgorithm = "auto" | "smooth" | "pixelated";
469
509
  * This enum determines how space is distributed between and around flex items
470
510
  * along the main axis of the flex container.
471
511
  */
472
- type JustifyContent = "start" | "end" | "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-evenly" | "space-around";
512
+ type JustifyContent = "normal" | "start" | "end" | "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-evenly" | "space-around";
473
513
 
474
514
  /**
475
515
  * Represents a line height value, number value is parsed as em.
@@ -649,90 +689,90 @@ type Style = {
649
689
  maxHeight: CssValue<LengthUnit>;
650
690
  minWidth: CssValue<LengthUnit>;
651
691
  minHeight: CssValue<LengthUnit>;
652
- aspectRatio: CssValue<number | null>;
692
+ aspectRatio: CssValue<AspectRatio>;
653
693
  padding: CssValue<Sides<LengthUnit>>;
654
- paddingTop: CssValue<LengthUnit | null>;
655
- paddingRight: CssValue<LengthUnit | null>;
656
- paddingBottom: CssValue<LengthUnit | null>;
657
- paddingLeft: CssValue<LengthUnit | null>;
694
+ paddingTop: CssValue<CssOption<LengthUnit>>;
695
+ paddingRight: CssValue<CssOption<LengthUnit>>;
696
+ paddingBottom: CssValue<CssOption<LengthUnit>>;
697
+ paddingLeft: CssValue<CssOption<LengthUnit>>;
658
698
  margin: CssValue<Sides<LengthUnit>>;
659
- marginTop: CssValue<LengthUnit | null>;
660
- marginRight: CssValue<LengthUnit | null>;
661
- marginBottom: CssValue<LengthUnit | null>;
662
- marginLeft: CssValue<LengthUnit | null>;
699
+ marginTop: CssValue<CssOption<LengthUnit>>;
700
+ marginRight: CssValue<CssOption<LengthUnit>>;
701
+ marginBottom: CssValue<CssOption<LengthUnit>>;
702
+ marginLeft: CssValue<CssOption<LengthUnit>>;
663
703
  inset: CssValue<Sides<LengthUnit>>;
664
- top: CssValue<LengthUnit | null>;
665
- right: CssValue<LengthUnit | null>;
666
- bottom: CssValue<LengthUnit | null>;
667
- left: CssValue<LengthUnit | null>;
704
+ top: CssValue<CssOption<LengthUnit>>;
705
+ right: CssValue<CssOption<LengthUnit>>;
706
+ bottom: CssValue<CssOption<LengthUnit>>;
707
+ left: CssValue<CssOption<LengthUnit>>;
668
708
  flexDirection: CssValue<FlexDirection>;
669
- justifySelf: CssValue<AlignItems | null>;
670
- justifyContent: CssValue<JustifyContent | null>;
671
- alignContent: CssValue<JustifyContent | null>;
672
- justifyItems: CssValue<AlignItems | null>;
673
- alignItems: CssValue<AlignItems | null>;
674
- alignSelf: CssValue<AlignItems | null>;
709
+ justifySelf: CssValue<AlignItems>;
710
+ justifyContent: CssValue<JustifyContent>;
711
+ alignContent: CssValue<JustifyContent>;
712
+ justifyItems: CssValue<AlignItems>;
713
+ alignItems: CssValue<AlignItems>;
714
+ alignSelf: CssValue<AlignItems>;
675
715
  flexWrap: CssValue<FlexWrap>;
676
716
  flexBasis: CssValue<LengthUnit>;
677
717
  position: CssValue<Position>;
678
- transform: CssValue<Transforms | null>;
679
- transformOrigin: CssValue<BackgroundPosition | null>;
680
- maskImage: CssValue<BackgroundImages | null>;
681
- maskSize: CssValue<BackgroundSizes | null>;
682
- maskPosition: CssValue<BackgroundPositions | null>;
683
- maskRepeat: CssValue<BackgroundRepeats | null>;
718
+ transform: CssValue<CssOption<Transforms>>;
719
+ transformOrigin: CssValue<CssOption<BackgroundPosition>>;
720
+ maskImage: CssValue<CssOption<BackgroundImages>>;
721
+ maskSize: CssValue<CssOption<BackgroundSizes>>;
722
+ maskPosition: CssValue<CssOption<BackgroundPositions>>;
723
+ maskRepeat: CssValue<CssOption<BackgroundRepeats>>;
684
724
  gap: CssValue<Gap>;
685
- flexGrow: CssValue<number>;
686
- flexShrink: CssValue<number>;
725
+ flexGrow: CssValue<FlexGrow>;
726
+ flexShrink: CssValue<FlexGrow>;
687
727
  borderRadius: CssValue<Sides<LengthUnit>>;
688
- borderTopLeftRadius: CssValue<LengthUnit | null>;
689
- borderTopRightRadius: CssValue<LengthUnit | null>;
690
- borderBottomRightRadius: CssValue<LengthUnit | null>;
691
- borderBottomLeftRadius: CssValue<LengthUnit | null>;
692
- borderWidth: CssValue<Sides<LengthUnit> | null>;
693
- borderTopWidth: CssValue<LengthUnit | null>;
694
- borderRightWidth: CssValue<LengthUnit | null>;
695
- borderBottomWidth: CssValue<LengthUnit | null>;
696
- borderLeftWidth: CssValue<LengthUnit | null>;
728
+ borderTopLeftRadius: CssValue<CssOption<LengthUnit>>;
729
+ borderTopRightRadius: CssValue<CssOption<LengthUnit>>;
730
+ borderBottomRightRadius: CssValue<CssOption<LengthUnit>>;
731
+ borderBottomLeftRadius: CssValue<CssOption<LengthUnit>>;
732
+ borderWidth: CssValue<CssOption<Sides<LengthUnit>>>;
733
+ borderTopWidth: CssValue<CssOption<LengthUnit>>;
734
+ borderRightWidth: CssValue<CssOption<LengthUnit>>;
735
+ borderBottomWidth: CssValue<CssOption<LengthUnit>>;
736
+ borderLeftWidth: CssValue<CssOption<LengthUnit>>;
697
737
  border: CssValue<Border>;
698
738
  objectFit: CssValue<ObjectFit>;
699
739
  objectPosition: CssValue<BackgroundPosition>;
700
- backgroundImage: CssValue<BackgroundImages | null>;
701
- backgroundPosition: CssValue<BackgroundPositions | null>;
702
- backgroundSize: CssValue<BackgroundSizes | null>;
703
- backgroundRepeat: CssValue<BackgroundRepeats | null>;
740
+ backgroundImage: CssValue<CssOption<BackgroundImages>>;
741
+ backgroundPosition: CssValue<CssOption<BackgroundPositions>>;
742
+ backgroundSize: CssValue<CssOption<BackgroundSizes>>;
743
+ backgroundRepeat: CssValue<CssOption<BackgroundRepeats>>;
704
744
  backgroundColor: CssValue<Color>;
705
- boxShadow: CssValue<BoxShadows | null>;
706
- gridAutoColumns: CssValue<GridTrackSizes | null>;
707
- gridAutoRows: CssValue<GridTrackSizes | null>;
708
- gridAutoFlow: CssValue<GridAutoFlow | null>;
709
- gridColumn: CssValue<GridLine | null>;
710
- gridRow: CssValue<GridLine | null>;
711
- gridTemplateColumns: CssValue<GridTemplateComponents | null>;
712
- gridTemplateRows: CssValue<GridTemplateComponents | null>;
713
- gridTemplateAreas: CssValue<GridTemplateAreas | null>;
745
+ boxShadow: CssValue<CssOption<BoxShadows>>;
746
+ gridAutoColumns: CssValue<CssOption<GridTrackSizes>>;
747
+ gridAutoRows: CssValue<CssOption<GridTrackSizes>>;
748
+ gridAutoFlow: CssValue<CssOption<GridAutoFlow>>;
749
+ gridColumn: CssValue<CssOption<GridLine>>;
750
+ gridRow: CssValue<CssOption<GridLine>>;
751
+ gridTemplateColumns: CssValue<CssOption<GridTemplateComponents>>;
752
+ gridTemplateRows: CssValue<CssOption<GridTemplateComponents>>;
753
+ gridTemplateAreas: CssValue<CssOption<GridTemplateAreas>>;
714
754
  textOverflow: CssValue<TextOverflow>;
715
755
  textTransform: CssValue<TextTransform>;
716
756
  fontStyle: CssValue<FontStyle>;
717
- borderColor: CssValue<Color | null>;
757
+ borderColor: CssValue<CssOption<Color>>;
718
758
  color: CssValue<Color>;
719
- fontSize: CssValue<LengthUnit | null>;
720
- fontFamily: CssValue<FontFamily | null>;
759
+ fontSize: CssValue<CssOption<LengthUnit>>;
760
+ fontFamily: CssValue<CssOption<FontFamily>>;
721
761
  lineHeight: CssValue<LineHeight>;
722
762
  fontWeight: CssValue<FontWeight>;
723
- fontVariationSettings: CssValue<FontVariationSettings | null>;
724
- fontFeatureSettings: CssValue<FontFeatureSettings | null>;
725
- lineClamp: CssValue<number | null>;
763
+ fontVariationSettings: CssValue<CssOption<FontVariationSettings>>;
764
+ fontFeatureSettings: CssValue<CssOption<FontFeatureSettings>>;
765
+ lineClamp: CssValue<CssOption<number>>;
726
766
  textAlign: CssValue<TextAlign>;
727
767
  textStrokeWidth: CssValue<LengthUnit>;
728
- textStrokeColor: CssValue<Color | null>;
729
- textStroke: CssValue<TextStroke | null>;
730
- textShadow: CssValue<TextShadows | null>;
768
+ textStrokeColor: CssValue<CssOption<Color>>;
769
+ textStroke: CssValue<CssOption<TextStroke>>;
770
+ textShadow: CssValue<CssOption<TextShadows>>;
731
771
  textDecoration: CssValue<TextDecoration>;
732
- textDecorationLine: CssValue<TextDecorationLines | null>;
733
- textDecorationColor: CssValue<Color | null>;
734
- letterSpacing: CssValue<LengthUnit | null>;
735
- wordSpacing: CssValue<LengthUnit | null>;
772
+ textDecorationLine: CssValue<CssOption<TextDecorationLines>>;
773
+ textDecorationColor: CssValue<CssOption<Color>>;
774
+ letterSpacing: CssValue<CssOption<LengthUnit>>;
775
+ wordSpacing: CssValue<CssOption<LengthUnit>>;
736
776
  imageRendering: CssValue<ImageScalingAlgorithm>;
737
777
  overflowWrap: CssValue<OverflowWrap>;
738
778
  wordBreak: CssValue<WordBreak>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takumi-rs/helpers",
3
- "version": "0.31.3",
3
+ "version": "0.32.0",
4
4
  "author": {
5
5
  "email": "me@kane.tw",
6
6
  "name": "Kane Wang",
@@ -10,15 +10,15 @@
10
10
  "url": "git+https://github.com/kane50613/takumi.git"
11
11
  },
12
12
  "devDependencies": {
13
- "@types/bun": "^1.2.21",
14
- "@types/react": "^19.1.13",
13
+ "@types/bun": "^1.2.23",
14
+ "@types/react": "^19.1.16",
15
15
  "@types/react-dom": "^19.1.9",
16
16
  "bun-plugin-dts": "^0.3.0",
17
17
  "lucide-react": "^0.544.0",
18
18
  "react": "^19.1.1",
19
19
  "react-dom": "^19.1.1",
20
20
  "tsup": "^8.5.0",
21
- "typescript": "^5.9.2"
21
+ "typescript": "^5.9.3"
22
22
  },
23
23
  "exports": {
24
24
  ".": {