@takumi-rs/helpers 0.33.1 → 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
|
|
2
|
-
export { A as AnyNode, J as JsonValue, N as Node } from './types-
|
|
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
|
|
2
|
-
export { A as AnyNode, J as JsonValue, N as Node } from './types-
|
|
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;
|
package/dist/jsx/jsx.d.cts
CHANGED
package/dist/jsx/jsx.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ type Angle = number | string;
|
|
|
17
17
|
type AspectRatio = number | "auto" | (string & {});
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Represents a color
|
|
20
|
+
* Represents a color input value.
|
|
21
21
|
*/
|
|
22
|
-
type
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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<
|
|
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<
|
|
795
|
-
color: CssValue<
|
|
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<
|
|
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<
|
|
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
|
|
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
|
|
20
|
+
* Represents a color input value.
|
|
21
21
|
*/
|
|
22
|
-
type
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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<
|
|
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<
|
|
795
|
-
color: CssValue<
|
|
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<
|
|
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<
|
|
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
|
|
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 };
|