@takumi-rs/helpers 0.33.0 → 0.34.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,10 @@
1
- import { C as ContainerNode, P as PartialStyle, T as TextNode, I as ImageNode, S as Style, a as Color } from './types-RqcFyzbc.cjs';
2
- export { A as AnyNode, J as JsonValue, N as Node } from './types-RqcFyzbc.cjs';
1
+ import { C as ContainerNode, P as PartialStyle, T as TextNode, I as ImageNode, S as Style } from './types-DxxXoHai.cjs';
2
+ export { A as AnyNode, J as JsonValue, N as Node } from './types-DxxXoHai.cjs';
3
+
4
+ /**
5
+ * Represents a color with 8-bit RGBA components.
6
+ */
7
+ type Color = [number, number, number] | [number, number, number, number] | number | string;
3
8
 
4
9
  declare function container(props: Omit<ContainerNode, "type">): ContainerNode;
5
10
  declare function text(text: string, style?: PartialStyle): TextNode;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,10 @@
1
- import { C as ContainerNode, P as PartialStyle, T as TextNode, I as ImageNode, S as Style, a as Color } from './types-RqcFyzbc.js';
2
- export { A as AnyNode, J as JsonValue, N as Node } from './types-RqcFyzbc.js';
1
+ import { C as ContainerNode, P as PartialStyle, T as TextNode, I as ImageNode, S as Style } from './types-DxxXoHai.js';
2
+ export { A as AnyNode, J as JsonValue, N as Node } from './types-DxxXoHai.js';
3
+
4
+ /**
5
+ * Represents a color with 8-bit RGBA components.
6
+ */
7
+ type Color = [number, number, number] | [number, number, number, number] | number | string;
3
8
 
4
9
  declare function container(props: Omit<ContainerNode, "type">): ContainerNode;
5
10
  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-RqcFyzbc.cjs';
2
+ import { N as Node } from '../types-DxxXoHai.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-RqcFyzbc.js';
2
+ import { N as Node } from '../types-DxxXoHai.js';
3
3
 
4
4
  type ReactElementLike = {
5
5
  type: string | symbol | ((props: unknown) => ReactElementLike) | ReactElementLike;
@@ -17,9 +17,9 @@ type Angle = number | string;
17
17
  type AspectRatio = number | "auto" | (string & {});
18
18
 
19
19
  /**
20
- * Represents a color with 8-bit RGBA components.
20
+ * Represents a color input value.
21
21
  */
22
- type Color = [number, number, number] | [number, number, number, number] | number | string;
22
+ type ColorInput = [number, number, number] | [number, number, number, number] | number | "currentColor" | string;
23
23
 
24
24
  /**
25
25
  * Represents a value that can be a specific length, percentage, or automatic.
@@ -64,7 +64,7 @@ type GradientStop = {
64
64
  /**
65
65
  * The color of the gradient stop.
66
66
  */
67
- color: Color;
67
+ color: ColorInput;
68
68
  /**
69
69
  * The position of the gradient stop.
70
70
  */
@@ -246,7 +246,7 @@ type BorderStyle = "solid";
246
246
  type Border = {
247
247
  width: LengthUnit | null;
248
248
  style: BorderStyle | null;
249
- color: Color | null;
249
+ color: ColorInput | null;
250
250
  } | string;
251
251
 
252
252
  /**
@@ -282,7 +282,7 @@ type BoxShadow = {
282
282
  /**
283
283
  * Color of the shadow.
284
284
  */
285
- color: Color;
285
+ color: ColorInput;
286
286
  } | string;
287
287
 
288
288
  /**
@@ -593,7 +593,7 @@ type TextDecorationStyle = "solid";
593
593
  type TextDecoration = {
594
594
  line: TextDecorationLines;
595
595
  style: TextDecorationStyle | null;
596
- color: Color | null;
596
+ color: ColorInput | null;
597
597
  } | string;
598
598
 
599
599
  /**
@@ -622,7 +622,7 @@ type TextShadow = {
622
622
  /**
623
623
  * Color of the shadow.
624
624
  */
625
- color: Color;
625
+ color: ColorInput;
626
626
  } | string;
627
627
 
628
628
  /**
@@ -637,7 +637,7 @@ type TextShadows = Array<TextShadow> | string;
637
637
  */
638
638
  type TextStroke = {
639
639
  width: LengthUnit;
640
- color: Color | null;
640
+ color: ColorInput | null;
641
641
  } | string;
642
642
 
643
643
  /**
@@ -778,7 +778,7 @@ type Style = {
778
778
  backgroundPosition: CssValue<CssOption<BackgroundPositions>>;
779
779
  backgroundSize: CssValue<CssOption<BackgroundSizes>>;
780
780
  backgroundRepeat: CssValue<CssOption<BackgroundRepeats>>;
781
- backgroundColor: CssValue<Color>;
781
+ backgroundColor: CssValue<ColorInput>;
782
782
  boxShadow: CssValue<CssOption<BoxShadows>>;
783
783
  gridAutoColumns: CssValue<CssOption<GridTrackSizes>>;
784
784
  gridAutoRows: CssValue<CssOption<GridTrackSizes>>;
@@ -791,8 +791,8 @@ type Style = {
791
791
  textOverflow: CssValue<TextOverflow>;
792
792
  textTransform: CssValue<TextTransform>;
793
793
  fontStyle: CssValue<FontStyle>;
794
- borderColor: CssValue<CssOption<Color>>;
795
- color: CssValue<Color>;
794
+ borderColor: CssValue<CssOption<ColorInput>>;
795
+ color: CssValue<ColorInput>;
796
796
  fontSize: CssValue<CssOption<LengthUnit>>;
797
797
  fontFamily: CssValue<CssOption<FontFamily>>;
798
798
  lineHeight: CssValue<LineHeight>;
@@ -802,12 +802,12 @@ type Style = {
802
802
  lineClamp: CssValue<CssOption<LineClamp>>;
803
803
  textAlign: CssValue<TextAlign>;
804
804
  textStrokeWidth: CssValue<LengthUnit>;
805
- textStrokeColor: CssValue<CssOption<Color>>;
805
+ textStrokeColor: CssValue<CssOption<ColorInput>>;
806
806
  textStroke: CssValue<CssOption<TextStroke>>;
807
807
  textShadow: CssValue<CssOption<TextShadows>>;
808
808
  textDecoration: CssValue<TextDecoration>;
809
809
  textDecorationLine: CssValue<CssOption<TextDecorationLines>>;
810
- textDecorationColor: CssValue<CssOption<Color>>;
810
+ textDecorationColor: CssValue<CssOption<ColorInput>>;
811
811
  letterSpacing: CssValue<CssOption<LengthUnit>>;
812
812
  wordSpacing: CssValue<CssOption<LengthUnit>>;
813
813
  imageRendering: CssValue<ImageScalingAlgorithm>;
@@ -842,4 +842,4 @@ type ImageNode = {
842
842
  style?: PartialStyle;
843
843
  };
844
844
 
845
- export type { AnyNode as A, ContainerNode as C, ImageNode as I, JsonValue as J, Node as N, PartialStyle as P, Style as S, TextNode as T, Color as a };
845
+ export type { AnyNode as A, ContainerNode as C, ImageNode as I, JsonValue as J, Node as N, PartialStyle as P, Style as S, TextNode as T };
@@ -17,9 +17,9 @@ type Angle = number | string;
17
17
  type AspectRatio = number | "auto" | (string & {});
18
18
 
19
19
  /**
20
- * Represents a color with 8-bit RGBA components.
20
+ * Represents a color input value.
21
21
  */
22
- type Color = [number, number, number] | [number, number, number, number] | number | string;
22
+ type ColorInput = [number, number, number] | [number, number, number, number] | number | "currentColor" | string;
23
23
 
24
24
  /**
25
25
  * Represents a value that can be a specific length, percentage, or automatic.
@@ -64,7 +64,7 @@ type GradientStop = {
64
64
  /**
65
65
  * The color of the gradient stop.
66
66
  */
67
- color: Color;
67
+ color: ColorInput;
68
68
  /**
69
69
  * The position of the gradient stop.
70
70
  */
@@ -246,7 +246,7 @@ type BorderStyle = "solid";
246
246
  type Border = {
247
247
  width: LengthUnit | null;
248
248
  style: BorderStyle | null;
249
- color: Color | null;
249
+ color: ColorInput | null;
250
250
  } | string;
251
251
 
252
252
  /**
@@ -282,7 +282,7 @@ type BoxShadow = {
282
282
  /**
283
283
  * Color of the shadow.
284
284
  */
285
- color: Color;
285
+ color: ColorInput;
286
286
  } | string;
287
287
 
288
288
  /**
@@ -593,7 +593,7 @@ type TextDecorationStyle = "solid";
593
593
  type TextDecoration = {
594
594
  line: TextDecorationLines;
595
595
  style: TextDecorationStyle | null;
596
- color: Color | null;
596
+ color: ColorInput | null;
597
597
  } | string;
598
598
 
599
599
  /**
@@ -622,7 +622,7 @@ type TextShadow = {
622
622
  /**
623
623
  * Color of the shadow.
624
624
  */
625
- color: Color;
625
+ color: ColorInput;
626
626
  } | string;
627
627
 
628
628
  /**
@@ -637,7 +637,7 @@ type TextShadows = Array<TextShadow> | string;
637
637
  */
638
638
  type TextStroke = {
639
639
  width: LengthUnit;
640
- color: Color | null;
640
+ color: ColorInput | null;
641
641
  } | string;
642
642
 
643
643
  /**
@@ -778,7 +778,7 @@ type Style = {
778
778
  backgroundPosition: CssValue<CssOption<BackgroundPositions>>;
779
779
  backgroundSize: CssValue<CssOption<BackgroundSizes>>;
780
780
  backgroundRepeat: CssValue<CssOption<BackgroundRepeats>>;
781
- backgroundColor: CssValue<Color>;
781
+ backgroundColor: CssValue<ColorInput>;
782
782
  boxShadow: CssValue<CssOption<BoxShadows>>;
783
783
  gridAutoColumns: CssValue<CssOption<GridTrackSizes>>;
784
784
  gridAutoRows: CssValue<CssOption<GridTrackSizes>>;
@@ -791,8 +791,8 @@ type Style = {
791
791
  textOverflow: CssValue<TextOverflow>;
792
792
  textTransform: CssValue<TextTransform>;
793
793
  fontStyle: CssValue<FontStyle>;
794
- borderColor: CssValue<CssOption<Color>>;
795
- color: CssValue<Color>;
794
+ borderColor: CssValue<CssOption<ColorInput>>;
795
+ color: CssValue<ColorInput>;
796
796
  fontSize: CssValue<CssOption<LengthUnit>>;
797
797
  fontFamily: CssValue<CssOption<FontFamily>>;
798
798
  lineHeight: CssValue<LineHeight>;
@@ -802,12 +802,12 @@ type Style = {
802
802
  lineClamp: CssValue<CssOption<LineClamp>>;
803
803
  textAlign: CssValue<TextAlign>;
804
804
  textStrokeWidth: CssValue<LengthUnit>;
805
- textStrokeColor: CssValue<CssOption<Color>>;
805
+ textStrokeColor: CssValue<CssOption<ColorInput>>;
806
806
  textStroke: CssValue<CssOption<TextStroke>>;
807
807
  textShadow: CssValue<CssOption<TextShadows>>;
808
808
  textDecoration: CssValue<TextDecoration>;
809
809
  textDecorationLine: CssValue<CssOption<TextDecorationLines>>;
810
- textDecorationColor: CssValue<CssOption<Color>>;
810
+ textDecorationColor: CssValue<CssOption<ColorInput>>;
811
811
  letterSpacing: CssValue<CssOption<LengthUnit>>;
812
812
  wordSpacing: CssValue<CssOption<LengthUnit>>;
813
813
  imageRendering: CssValue<ImageScalingAlgorithm>;
@@ -842,4 +842,4 @@ type ImageNode = {
842
842
  style?: PartialStyle;
843
843
  };
844
844
 
845
- export type { AnyNode as A, ContainerNode as C, ImageNode as I, JsonValue as J, Node as N, PartialStyle as P, Style as S, TextNode as T, Color as a };
845
+ export type { AnyNode as A, ContainerNode as C, ImageNode as I, JsonValue as J, Node as N, PartialStyle as P, Style as S, TextNode as T };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takumi-rs/helpers",
3
- "version": "0.33.0",
3
+ "version": "0.34.0",
4
4
  "author": {
5
5
  "email": "me@kane.tw",
6
6
  "name": "Kane Wang",