@takumi-rs/helpers 0.45.0 → 0.45.2

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 ColorInput } from './types-BOxuFk68.cjs';
2
- export { A as AnyNode, J as JsonValue, N as Node } from './types-BOxuFk68.cjs';
1
+ import { C as ContainerNode, P as PartialStyle, T as TextNode, I as ImageNode, S as Style, a as ColorInput } from './types-yxtAVyMN.cjs';
2
+ export { A as AnyNode, J as JsonValue, N as Node } from './types-yxtAVyMN.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 ColorInput } from './types-BOxuFk68.js';
2
- export { A as AnyNode, J as JsonValue, N as Node } from './types-BOxuFk68.js';
1
+ import { C as ContainerNode, P as PartialStyle, T as TextNode, I as ImageNode, S as Style, a as ColorInput } from './types-yxtAVyMN.js';
2
+ export { A as AnyNode, J as JsonValue, N as Node } from './types-yxtAVyMN.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-BOxuFk68.cjs';
2
+ import { N as Node } from '../types-yxtAVyMN.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-BOxuFk68.js';
2
+ import { N as Node } from '../types-yxtAVyMN.js';
3
3
 
4
4
  type ReactElementLike = {
5
5
  type: string | symbol | ((props: unknown) => ReactElementLike) | ReactElementLike;
@@ -101,6 +101,34 @@ type NoiseV1 = {
101
101
  opacity?: number;
102
102
  };
103
103
 
104
+ /**
105
+ * Horizontal keywords for `background-position`.
106
+ */
107
+ type PositionKeywordX = "left" | "center" | "right";
108
+
109
+ /**
110
+ * Vertical keywords for `background-position`.
111
+ */
112
+ type PositionKeywordY = "top" | "center" | "bottom";
113
+
114
+ /**
115
+ * A single `background-position` component for an axis.
116
+ */
117
+ type PositionComponent = PositionKeywordX | PositionKeywordY | LengthUnit;
118
+
119
+ /**
120
+ * A pair of values for horizontal and vertical axes.
121
+ */
122
+ type SpacePair<T> = T | {
123
+ x: T;
124
+ y: T;
125
+ } | string;
126
+
127
+ /**
128
+ * Parsed `background-position` value for one layer.
129
+ */
130
+ type BackgroundPosition = SpacePair<PositionComponent>;
131
+
104
132
  /**
105
133
  * Supported shapes for radial gradients
106
134
  */
@@ -124,9 +152,9 @@ type RadialGradient = {
124
152
  */
125
153
  size: RadialSize;
126
154
  /**
127
- * Center position in normalized coordinates [0.0, 1.0]
155
+ * Center position
128
156
  */
129
- center: [number, number];
157
+ center: BackgroundPosition;
130
158
  /**
131
159
  * Gradient stops
132
160
  */
@@ -143,34 +171,6 @@ type BackgroundImage = LinearGradient | RadialGradient | NoiseV1 | string;
143
171
  */
144
172
  type BackgroundImages = Array<BackgroundImage> | string;
145
173
 
146
- /**
147
- * Horizontal keywords for `background-position`.
148
- */
149
- type PositionKeywordX = "left" | "center" | "right";
150
-
151
- /**
152
- * Vertical keywords for `background-position`.
153
- */
154
- type PositionKeywordY = "top" | "center" | "bottom";
155
-
156
- /**
157
- * A single `background-position` component for an axis.
158
- */
159
- type PositionComponent = PositionKeywordX | PositionKeywordY | LengthUnit;
160
-
161
- /**
162
- * A pair of values for horizontal and vertical axes.
163
- */
164
- type SpacePair<T> = T | {
165
- x: T;
166
- y: T;
167
- } | string;
168
-
169
- /**
170
- * Parsed `background-position` value for one layer.
171
- */
172
- type BackgroundPosition = SpacePair<PositionComponent>;
173
-
174
174
  /**
175
175
  * A list of `background-position` values (one per layer).
176
176
  */
@@ -101,6 +101,34 @@ type NoiseV1 = {
101
101
  opacity?: number;
102
102
  };
103
103
 
104
+ /**
105
+ * Horizontal keywords for `background-position`.
106
+ */
107
+ type PositionKeywordX = "left" | "center" | "right";
108
+
109
+ /**
110
+ * Vertical keywords for `background-position`.
111
+ */
112
+ type PositionKeywordY = "top" | "center" | "bottom";
113
+
114
+ /**
115
+ * A single `background-position` component for an axis.
116
+ */
117
+ type PositionComponent = PositionKeywordX | PositionKeywordY | LengthUnit;
118
+
119
+ /**
120
+ * A pair of values for horizontal and vertical axes.
121
+ */
122
+ type SpacePair<T> = T | {
123
+ x: T;
124
+ y: T;
125
+ } | string;
126
+
127
+ /**
128
+ * Parsed `background-position` value for one layer.
129
+ */
130
+ type BackgroundPosition = SpacePair<PositionComponent>;
131
+
104
132
  /**
105
133
  * Supported shapes for radial gradients
106
134
  */
@@ -124,9 +152,9 @@ type RadialGradient = {
124
152
  */
125
153
  size: RadialSize;
126
154
  /**
127
- * Center position in normalized coordinates [0.0, 1.0]
155
+ * Center position
128
156
  */
129
- center: [number, number];
157
+ center: BackgroundPosition;
130
158
  /**
131
159
  * Gradient stops
132
160
  */
@@ -143,34 +171,6 @@ type BackgroundImage = LinearGradient | RadialGradient | NoiseV1 | string;
143
171
  */
144
172
  type BackgroundImages = Array<BackgroundImage> | string;
145
173
 
146
- /**
147
- * Horizontal keywords for `background-position`.
148
- */
149
- type PositionKeywordX = "left" | "center" | "right";
150
-
151
- /**
152
- * Vertical keywords for `background-position`.
153
- */
154
- type PositionKeywordY = "top" | "center" | "bottom";
155
-
156
- /**
157
- * A single `background-position` component for an axis.
158
- */
159
- type PositionComponent = PositionKeywordX | PositionKeywordY | LengthUnit;
160
-
161
- /**
162
- * A pair of values for horizontal and vertical axes.
163
- */
164
- type SpacePair<T> = T | {
165
- x: T;
166
- y: T;
167
- } | string;
168
-
169
- /**
170
- * Parsed `background-position` value for one layer.
171
- */
172
- type BackgroundPosition = SpacePair<PositionComponent>;
173
-
174
174
  /**
175
175
  * A list of `background-position` values (one per layer).
176
176
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takumi-rs/helpers",
3
- "version": "0.45.0",
3
+ "version": "0.45.2",
4
4
  "author": {
5
5
  "email": "me@kane.tw",
6
6
  "name": "Kane Wang",