@takumi-rs/helpers 0.52.1 → 0.53.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.cjs +1 -1
- package/dist/index.d.cts +13 -29
- package/dist/index.d.ts +13 -29
- package/dist/index.js +1 -1
- package/dist/jsx/jsx.cjs +2 -2
- package/dist/jsx/jsx.d.cts +1 -1
- package/dist/jsx/jsx.d.ts +1 -1
- package/dist/jsx/jsx.js +2 -2
- package/dist/types-D4Tf1iTw.d.cts +35 -0
- package/dist/types-D4Tf1iTw.d.ts +35 -0
- package/package.json +1 -1
- package/dist/types-Dm5SijB6.d.cts +0 -985
- package/dist/types-Dm5SijB6.d.ts +0 -985
|
@@ -1,985 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Defines how flex items are aligned along the cross axis.
|
|
3
|
-
*
|
|
4
|
-
* This enum determines how items are aligned within the flex container
|
|
5
|
-
* along the cross axis (perpendicular to the main axis).
|
|
6
|
-
*/
|
|
7
|
-
type AlignItems = "normal" | "start" | "end" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Represents an angle value in degrees.
|
|
11
|
-
*/
|
|
12
|
-
type Angle = number | string;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Represents a aspect ratio.
|
|
16
|
-
*/
|
|
17
|
-
type AspectRatio = number | "auto" | (string & {});
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Represents a color input value.
|
|
21
|
-
*/
|
|
22
|
-
type ColorInput = [number, number, number] | [number, number, number, number] | number | "currentColor" | string;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Represents a value that can be a specific length, percentage, or automatic.
|
|
26
|
-
*
|
|
27
|
-
* This corresponds to CSS values that can be specified as pixels, percentages,
|
|
28
|
-
* or the 'auto' keyword for automatic sizing.
|
|
29
|
-
*/
|
|
30
|
-
type LengthUnit = "auto" | {
|
|
31
|
-
percentage: number;
|
|
32
|
-
} | {
|
|
33
|
-
rem: number;
|
|
34
|
-
} | {
|
|
35
|
-
em: number;
|
|
36
|
-
} | {
|
|
37
|
-
vh: number;
|
|
38
|
-
} | {
|
|
39
|
-
vw: number;
|
|
40
|
-
} | {
|
|
41
|
-
cm: number;
|
|
42
|
-
} | {
|
|
43
|
-
mm: number;
|
|
44
|
-
} | {
|
|
45
|
-
in: number;
|
|
46
|
-
} | {
|
|
47
|
-
Q: number;
|
|
48
|
-
} | {
|
|
49
|
-
Pt: number;
|
|
50
|
-
} | {
|
|
51
|
-
Pc: number;
|
|
52
|
-
} | number | string;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Represents a gradient stop position.
|
|
56
|
-
* If a percentage or number (0.0-1.0) is provided, it is treated as a percentage.
|
|
57
|
-
*/
|
|
58
|
-
type StopPosition = LengthUnit | string;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Represents a gradient stop.
|
|
62
|
-
*/
|
|
63
|
-
type GradientStop = {
|
|
64
|
-
/**
|
|
65
|
-
* The color of the gradient stop.
|
|
66
|
-
*/
|
|
67
|
-
color: ColorInput;
|
|
68
|
-
/**
|
|
69
|
-
* The position of the gradient stop.
|
|
70
|
-
*/
|
|
71
|
-
hint?: StopPosition;
|
|
72
|
-
} | StopPosition;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Represents a linear gradient.
|
|
76
|
-
*/
|
|
77
|
-
type LinearGradient = {
|
|
78
|
-
/**
|
|
79
|
-
* The angle of the gradient.
|
|
80
|
-
*/
|
|
81
|
-
angle: Angle;
|
|
82
|
-
/**
|
|
83
|
-
* The steps of the gradient.
|
|
84
|
-
*/
|
|
85
|
-
stops: Array<GradientStop>;
|
|
86
|
-
} | string;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Procedural noise gradient that generates organic, natural-looking patterns using fractal Brownian motion.
|
|
90
|
-
* This creates dynamic textures that can be used as backgrounds or overlays with customizable parameters
|
|
91
|
-
* for controlling the noise characteristics and visual appearance.
|
|
92
|
-
*/
|
|
93
|
-
type NoiseV1 = {
|
|
94
|
-
/**
|
|
95
|
-
* Random seed value that determines the unique noise pattern generated
|
|
96
|
-
*/
|
|
97
|
-
seed?: number;
|
|
98
|
-
/**
|
|
99
|
-
* Controls the opacity of the noise pattern. 0.0 is fully transparent, 1.0 is fully opaque
|
|
100
|
-
*/
|
|
101
|
-
opacity?: number;
|
|
102
|
-
};
|
|
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
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Supported shapes for radial gradients
|
|
134
|
-
*/
|
|
135
|
-
type RadialShape = "circle" | "ellipse";
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Supported size keywords for radial gradients
|
|
139
|
-
*/
|
|
140
|
-
type RadialSize = "closest-side" | "farthest-side" | "closest-corner" | "farthest-corner";
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Represents a radial gradient.
|
|
144
|
-
*/
|
|
145
|
-
type RadialGradient = {
|
|
146
|
-
/**
|
|
147
|
-
* The radial gradient shape
|
|
148
|
-
*/
|
|
149
|
-
shape: RadialShape;
|
|
150
|
-
/**
|
|
151
|
-
* The sizing mode for the gradient
|
|
152
|
-
*/
|
|
153
|
-
size: RadialSize;
|
|
154
|
-
/**
|
|
155
|
-
* Center position
|
|
156
|
-
*/
|
|
157
|
-
center: BackgroundPosition;
|
|
158
|
-
/**
|
|
159
|
-
* Gradient stops
|
|
160
|
-
*/
|
|
161
|
-
stops: Array<GradientStop>;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Background image variants supported by Takumi.
|
|
166
|
-
*/
|
|
167
|
-
type BackgroundImage = LinearGradient | RadialGradient | NoiseV1 | string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* A collection of background images.
|
|
171
|
-
*/
|
|
172
|
-
type BackgroundImages = Array<BackgroundImage> | string;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* A list of `background-position` values (one per layer).
|
|
176
|
-
*/
|
|
177
|
-
type BackgroundPositions = Array<BackgroundPosition> | string;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Per-axis repeat style.
|
|
181
|
-
*/
|
|
182
|
-
type BackgroundRepeatStyle = "repeat" | "no-repeat" | "space" | "round";
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Combined repeat for X and Y axes.
|
|
186
|
-
*/
|
|
187
|
-
type BackgroundRepeat = [BackgroundRepeatStyle, BackgroundRepeatStyle];
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* A list of background-repeat values (layered).
|
|
191
|
-
*/
|
|
192
|
-
type BackgroundRepeats = Array<BackgroundRepeat> | string;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Parsed `background-size` for one layer.
|
|
196
|
-
*/
|
|
197
|
-
type BackgroundSize = "Cover" | "Contain" | {
|
|
198
|
-
Explicit: {
|
|
199
|
-
/**
|
|
200
|
-
* Width value for the background image.
|
|
201
|
-
*/
|
|
202
|
-
width: LengthUnit;
|
|
203
|
-
/**
|
|
204
|
-
* Height value for the background image.
|
|
205
|
-
*/
|
|
206
|
-
height: LengthUnit;
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* A list of `background-size` values (one per layer).
|
|
212
|
-
*/
|
|
213
|
-
type BackgroundSizes = Array<BackgroundSize> | string;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Represents a position for circle() and ellipse() functions.
|
|
217
|
-
*/
|
|
218
|
-
type ShapePosition = SpacePair<LengthUnit>;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Represents radius values for circle() and ellipse() functions.
|
|
222
|
-
*/
|
|
223
|
-
type ShapeRadius = "closest-side" | "farthest-side" | LengthUnit;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Represents a circle() shape.
|
|
227
|
-
*/
|
|
228
|
-
type CircleShape = {
|
|
229
|
-
/**
|
|
230
|
-
* The radius of the circle
|
|
231
|
-
*/
|
|
232
|
-
radius: ShapeRadius;
|
|
233
|
-
/**
|
|
234
|
-
* The center position of the circle
|
|
235
|
-
*/
|
|
236
|
-
position: ShapePosition;
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Represents an ellipse() shape.
|
|
241
|
-
*/
|
|
242
|
-
type EllipseShape = {
|
|
243
|
-
/**
|
|
244
|
-
* The horizontal radius
|
|
245
|
-
*/
|
|
246
|
-
radiusX: ShapeRadius;
|
|
247
|
-
/**
|
|
248
|
-
* The vertical radius
|
|
249
|
-
*/
|
|
250
|
-
radiusY: ShapeRadius;
|
|
251
|
-
/**
|
|
252
|
-
* The center position of the ellipse
|
|
253
|
-
*/
|
|
254
|
-
position: ShapePosition;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Represents the values for the four sides of a box (top, right, bottom, left).
|
|
259
|
-
*/
|
|
260
|
-
type Sides<T> = string | [T, T, T, T] | [T, T] | T;
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Represents an inset() rectangle shape.
|
|
264
|
-
*
|
|
265
|
-
* The inset() function creates an inset rectangle, with its size defined by the offset distance
|
|
266
|
-
* of each of the four sides of its container and, optionally, rounded corners.
|
|
267
|
-
*/
|
|
268
|
-
type InsetShape = {
|
|
269
|
-
/**
|
|
270
|
-
* Sides of the inset.
|
|
271
|
-
*/
|
|
272
|
-
inset: Sides<LengthUnit>;
|
|
273
|
-
/**
|
|
274
|
-
* Optional border radius for rounded corners
|
|
275
|
-
*/
|
|
276
|
-
borderRadius: Sides<LengthUnit> | null;
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Represents the fill rule used for determining the interior of shapes.
|
|
281
|
-
*
|
|
282
|
-
* Corresponds to the SVG fill-rule attribute and is used in polygon(), path(), and shape() functions.
|
|
283
|
-
*/
|
|
284
|
-
type FillRule = "non-zero" | "even-odd";
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Represents a path() shape using an SVG path string.
|
|
288
|
-
*/
|
|
289
|
-
type PathShape = {
|
|
290
|
-
/**
|
|
291
|
-
* The fill rule to use
|
|
292
|
-
*/
|
|
293
|
-
fillRule: FillRule | null;
|
|
294
|
-
/**
|
|
295
|
-
* SVG path data string
|
|
296
|
-
*/
|
|
297
|
-
path: string;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Represents a polygon() shape.
|
|
302
|
-
*/
|
|
303
|
-
type PolygonShape = {
|
|
304
|
-
/**
|
|
305
|
-
* The fill rule to use
|
|
306
|
-
*/
|
|
307
|
-
fillRule: FillRule | null;
|
|
308
|
-
/**
|
|
309
|
-
* List of coordinate pairs defining the polygon vertices
|
|
310
|
-
*/
|
|
311
|
-
coordinates: Array<SpacePair<LengthUnit>>;
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Represents a basic shape function for clip-path.
|
|
316
|
-
*/
|
|
317
|
-
type BasicShape = ({
|
|
318
|
-
type: "inset";
|
|
319
|
-
} & InsetShape) | ({
|
|
320
|
-
type: "circle";
|
|
321
|
-
} & CircleShape) | ({
|
|
322
|
-
type: "ellipse";
|
|
323
|
-
} & EllipseShape) | ({
|
|
324
|
-
type: "polygon";
|
|
325
|
-
} & PolygonShape) | ({
|
|
326
|
-
type: "path";
|
|
327
|
-
} & PathShape) | string;
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* Represents border style options (currently only solid is supported).
|
|
331
|
-
*/
|
|
332
|
-
type BorderStyle = "solid";
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* Parsed `border` value.
|
|
336
|
-
*/
|
|
337
|
-
type Border = {
|
|
338
|
-
width: LengthUnit | null;
|
|
339
|
-
style: BorderStyle | null;
|
|
340
|
-
color: ColorInput | null;
|
|
341
|
-
} | string;
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
* Represents a box shadow with all its properties.
|
|
345
|
-
*
|
|
346
|
-
* Box shadows can be either outset (default) or inset, and consist of:
|
|
347
|
-
* - Horizontal and vertical offsets
|
|
348
|
-
* - Blur radius (optional, defaults to 0)
|
|
349
|
-
* - Spread radius (optional, defaults to 0)
|
|
350
|
-
* - Color (optional, defaults to transparent)
|
|
351
|
-
*/
|
|
352
|
-
type BoxShadow = {
|
|
353
|
-
/**
|
|
354
|
-
* Whether the shadow is inset (inside the element) or outset (outside the element).
|
|
355
|
-
*/
|
|
356
|
-
inset: boolean;
|
|
357
|
-
/**
|
|
358
|
-
* Horizontal offset of the shadow.
|
|
359
|
-
*/
|
|
360
|
-
offsetX: LengthUnit;
|
|
361
|
-
/**
|
|
362
|
-
* Vertical offset of the shadow.
|
|
363
|
-
*/
|
|
364
|
-
offsetY: LengthUnit;
|
|
365
|
-
/**
|
|
366
|
-
* Blur radius of the shadow. Higher values create a more blurred shadow.
|
|
367
|
-
*/
|
|
368
|
-
blurRadius: LengthUnit;
|
|
369
|
-
/**
|
|
370
|
-
* Spread radius of the shadow. Positive values expand the shadow, negative values shrink it.
|
|
371
|
-
*/
|
|
372
|
-
spreadRadius: LengthUnit;
|
|
373
|
-
/**
|
|
374
|
-
* Color of the shadow.
|
|
375
|
-
*/
|
|
376
|
-
color: ColorInput;
|
|
377
|
-
} | string;
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* Represents a collection of box shadows, have custom `FromCss` implementation for comma-separated values.
|
|
381
|
-
*/
|
|
382
|
-
type BoxShadows = Array<BoxShadow> | string;
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Defines how the width and height of an element are calculated.
|
|
386
|
-
*
|
|
387
|
-
* This enum determines whether the width and height properties include padding and border, or just the content area.
|
|
388
|
-
*/
|
|
389
|
-
type BoxSizing = "content-box" | "border-box";
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* Proxy type for CSS `Option` serialization/deserialization.
|
|
393
|
-
*/
|
|
394
|
-
type CssOption<T> = T | null;
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* CSS Global keyword
|
|
398
|
-
*/
|
|
399
|
-
type CssGlobalKeyword = "initial" | "inherit";
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* Represents a CSS property value that can be explicitly set, inherited from parent, or reset to initial value.
|
|
403
|
-
*/
|
|
404
|
-
type CssValue<T> = CssGlobalKeyword | T;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* This enum determines the layout algorithm used for the children of a node.
|
|
408
|
-
*/
|
|
409
|
-
type Display = "none" | "flex" | "grid" | "inline" | "block";
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Represents a single CSS filter operation
|
|
413
|
-
*/
|
|
414
|
-
type Filter = {
|
|
415
|
-
brightness: number;
|
|
416
|
-
} | {
|
|
417
|
-
contrast: number;
|
|
418
|
-
} | {
|
|
419
|
-
grayscale: number;
|
|
420
|
-
} | {
|
|
421
|
-
saturate: number;
|
|
422
|
-
} | {
|
|
423
|
-
"hue-rotate": Angle;
|
|
424
|
-
} | {
|
|
425
|
-
invert: number;
|
|
426
|
-
} | {
|
|
427
|
-
opacity: number;
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* A list of filter operations
|
|
432
|
-
*/
|
|
433
|
-
type Filters = Array<Filter> | string;
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Represents a flex shorthand property for flex-grow, flex-shrink, and flex-basis.
|
|
437
|
-
*/
|
|
438
|
-
type Flex = {
|
|
439
|
-
grow: number | null;
|
|
440
|
-
shrink: number | null;
|
|
441
|
-
basis: LengthUnit | null;
|
|
442
|
-
} | number | "auto" | "none" | string;
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* Defines the direction of flex items within a flex container.
|
|
446
|
-
*
|
|
447
|
-
* This enum determines how flex items are laid out along the main axis.
|
|
448
|
-
*/
|
|
449
|
-
type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* Represents a flex grow value.
|
|
453
|
-
*/
|
|
454
|
-
type FlexGrow = number | string;
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* Defines how flex items should wrap.
|
|
458
|
-
*
|
|
459
|
-
* This enum determines how flex items should wrap within the flex container.
|
|
460
|
-
*/
|
|
461
|
-
type FlexWrap = "nowrap" | "wrap" | "wrap-reverse";
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Represents a font family for text rendering.
|
|
465
|
-
* Multi value fallback is supported.
|
|
466
|
-
*/
|
|
467
|
-
type FontFamily = string;
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* Controls OpenType font features via CSS font-feature-settings property.
|
|
471
|
-
*
|
|
472
|
-
* This allows enabling/disabling specific typographic features in OpenType fonts
|
|
473
|
-
* such as ligatures, kerning, small caps, and other advanced typography features.
|
|
474
|
-
*/
|
|
475
|
-
type FontFeatureSettings = string;
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* Controls the slant (italic/oblique) of text rendering.
|
|
479
|
-
*/
|
|
480
|
-
type FontStyle = "normal" | "italic" | "oblique" | `oblique ${string}deg`;
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* Controls variable font axis values via CSS font-variation-settings property.
|
|
484
|
-
*
|
|
485
|
-
* This allows fine-grained control over variable font characteristics like weight,
|
|
486
|
-
* width, slant, and other custom axes defined in the font.
|
|
487
|
-
*/
|
|
488
|
-
type FontVariationSettings = string;
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Represents font weight value.
|
|
492
|
-
*/
|
|
493
|
-
type FontWeight = string | number;
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* Represents the direction of the grid auto flow.
|
|
497
|
-
*/
|
|
498
|
-
type GridDirection = "row" | "column";
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Represents the flow of the grid auto placement.
|
|
502
|
-
*/
|
|
503
|
-
type GridAutoFlow = {
|
|
504
|
-
direction: GridDirection;
|
|
505
|
-
dense: boolean;
|
|
506
|
-
} | string;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Represents a grid placement keyword
|
|
510
|
-
*/
|
|
511
|
-
type GridPlacementKeyword = "auto";
|
|
512
|
-
|
|
513
|
-
/**
|
|
514
|
-
* Represents a grid placement span
|
|
515
|
-
*/
|
|
516
|
-
type GridPlacementSpan = {
|
|
517
|
-
span: number;
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* Represents a grid placement with serde support
|
|
522
|
-
*/
|
|
523
|
-
type GridPlacement = GridPlacementKeyword | GridPlacementSpan | number | string;
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
* Represents a grid line placement with serde support
|
|
527
|
-
*/
|
|
528
|
-
type GridLine = {
|
|
529
|
-
/**
|
|
530
|
-
* The start line placement
|
|
531
|
-
*/
|
|
532
|
-
start?: GridPlacement;
|
|
533
|
-
/**
|
|
534
|
-
* The end line placement
|
|
535
|
-
*/
|
|
536
|
-
end?: GridPlacement;
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* Represents `grid-template-areas` value
|
|
541
|
-
*
|
|
542
|
-
* Supports either a 2D matrix of area names (use "." for empty) or a CSS string value
|
|
543
|
-
* like: "a a ." "b b c"
|
|
544
|
-
*/
|
|
545
|
-
type GridTemplateAreas = Array<Array<string>> | string;
|
|
546
|
-
|
|
547
|
-
/**
|
|
548
|
-
* Represents a fraction of the available space
|
|
549
|
-
*/
|
|
550
|
-
type FrLengthUnit = {
|
|
551
|
-
fr: number;
|
|
552
|
-
};
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* Represents a grid track sizing function with serde support
|
|
556
|
-
*/
|
|
557
|
-
type GridLengthUnit = FrLengthUnit | LengthUnit | string;
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* Represents a grid minmax()
|
|
561
|
-
*/
|
|
562
|
-
type GridMinMaxSize = {
|
|
563
|
-
/**
|
|
564
|
-
* The minimum size of the grid item
|
|
565
|
-
*/
|
|
566
|
-
min: GridLengthUnit;
|
|
567
|
-
/**
|
|
568
|
-
* The maximum size of the grid item
|
|
569
|
-
*/
|
|
570
|
-
max: GridLengthUnit;
|
|
571
|
-
};
|
|
572
|
-
|
|
573
|
-
/**
|
|
574
|
-
* Represents a grid track size
|
|
575
|
-
*/
|
|
576
|
-
type GridTrackSize = GridMinMaxSize | GridLengthUnit;
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* Represents a grid repeat track
|
|
580
|
-
*/
|
|
581
|
-
type GridRepeatTrack = {
|
|
582
|
-
/**
|
|
583
|
-
* The size of the grid track
|
|
584
|
-
*/
|
|
585
|
-
size: GridTrackSize;
|
|
586
|
-
/**
|
|
587
|
-
* The names for the line preceding this track within the repeat() clause
|
|
588
|
-
*/
|
|
589
|
-
names: Array<string>;
|
|
590
|
-
/**
|
|
591
|
-
* The names for the final line after the last track within the repeat() clause
|
|
592
|
-
* Only set on the last track of the repeat fragment. For other tracks this is None.
|
|
593
|
-
*/
|
|
594
|
-
endNames?: Array<string>;
|
|
595
|
-
};
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* Represents grid track repetition keywords
|
|
599
|
-
*/
|
|
600
|
-
type GridRepetitionKeyword = "auto-fill" | "auto-fit";
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* Represents a grid track repetition pattern
|
|
604
|
-
*/
|
|
605
|
-
type GridRepetitionCount = GridRepetitionKeyword | number;
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Represents a track sizing function or a list of line names between tracks
|
|
609
|
-
*/
|
|
610
|
-
type GridTemplateComponent = Array<string> | GridTrackSize | [GridRepetitionCount, Array<GridRepeatTrack>];
|
|
611
|
-
|
|
612
|
-
/**
|
|
613
|
-
* A transparent wrapper around a list of `GridTemplateComponent`.
|
|
614
|
-
*
|
|
615
|
-
* This exists to provide a distinct type for template component lists while
|
|
616
|
-
* preserving JSON compatibility (serialized as a plain array) and clean TS types.
|
|
617
|
-
*/
|
|
618
|
-
type GridTemplateComponents = Array<GridTemplateComponent> | string;
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* A wrapper around a list of `GridTrackSize` that can also be parsed from a CSS string.
|
|
622
|
-
*/
|
|
623
|
-
type GridTrackSizes = Array<GridTrackSize> | string;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Defines how images should be scaled when rendered.
|
|
627
|
-
*/
|
|
628
|
-
type ImageScalingAlgorithm = "auto" | "smooth" | "pixelated";
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Defines how flex items are aligned along the main axis.
|
|
632
|
-
*
|
|
633
|
-
* This enum determines how space is distributed between and around flex items
|
|
634
|
-
* along the main axis of the flex container.
|
|
635
|
-
*/
|
|
636
|
-
type JustifyContent = "normal" | "start" | "end" | "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-evenly" | "space-around";
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
* Represents a line clamp value.
|
|
640
|
-
*/
|
|
641
|
-
type LineClamp = {
|
|
642
|
-
count: number;
|
|
643
|
-
ellipsis: string | null;
|
|
644
|
-
} | number | string;
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
* Represents a line height value, number value is parsed as em.
|
|
648
|
-
*/
|
|
649
|
-
type LineHeight = number | string | LengthUnit;
|
|
650
|
-
|
|
651
|
-
/**
|
|
652
|
-
* Defines how an image should be resized to fit its container.
|
|
653
|
-
*
|
|
654
|
-
* Similar to CSS object-fit property.
|
|
655
|
-
*/
|
|
656
|
-
type ObjectFit = "fill" | "contain" | "cover" | "scale-down" | "none";
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* How children overflowing their container should affect layout
|
|
660
|
-
*/
|
|
661
|
-
type Overflow = "visible" | "hidden";
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* Represents overflow values for both axes.
|
|
665
|
-
*
|
|
666
|
-
* Can be either a single value applied to both axes, or separate values
|
|
667
|
-
* for horizontal and vertical overflow.
|
|
668
|
-
*/
|
|
669
|
-
type Overflows = SpacePair<Overflow>;
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* Controls how text should be overflowed.
|
|
673
|
-
*/
|
|
674
|
-
type OverflowWrap = "normal" | "anywhere" | "break-word";
|
|
675
|
-
|
|
676
|
-
/**
|
|
677
|
-
* Represents a percentage value (0.0-1.0) in CSS parsing.
|
|
678
|
-
*
|
|
679
|
-
* This struct wraps an f32 value that represents a percentage
|
|
680
|
-
* where 0.0 corresponds to 0% and 1.0 corresponds to 100%.
|
|
681
|
-
*/
|
|
682
|
-
type PercentageNumber = string | number;
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
* Defines the positioning method for an element.
|
|
686
|
-
*
|
|
687
|
-
* This enum determines how an element is positioned within its containing element.
|
|
688
|
-
*/
|
|
689
|
-
type Position = "relative" | "absolute";
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* Text alignment options for text rendering.
|
|
693
|
-
*
|
|
694
|
-
* Corresponds to CSS text-align property values.
|
|
695
|
-
*/
|
|
696
|
-
type TextAlign = "left" | "right" | "center" | "justify" | "start" | "end";
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* Represents text decoration line options.
|
|
700
|
-
*/
|
|
701
|
-
type TextDecorationLine = "underline" | "line-through" | "overline";
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* Represents a collection of text decoration lines.
|
|
705
|
-
*/
|
|
706
|
-
type TextDecorationLines = Array<TextDecorationLine> | string;
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Represents text decoration style options (currently only solid is supported).
|
|
710
|
-
*/
|
|
711
|
-
type TextDecorationStyle = "solid";
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
* Parsed `text-decoration` value.
|
|
715
|
-
*/
|
|
716
|
-
type TextDecoration = {
|
|
717
|
-
line: TextDecorationLines;
|
|
718
|
-
style: TextDecorationStyle | null;
|
|
719
|
-
color: ColorInput | null;
|
|
720
|
-
} | string;
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* Defines how text should be overflowed.
|
|
724
|
-
*
|
|
725
|
-
* This enum determines how text should be handled when it exceeds the container width.
|
|
726
|
-
*/
|
|
727
|
-
type TextOverflow = "clip" | "ellipsis" | string;
|
|
728
|
-
|
|
729
|
-
/**
|
|
730
|
-
* Represents a text shadow with all its properties.
|
|
731
|
-
*/
|
|
732
|
-
type TextShadow = {
|
|
733
|
-
/**
|
|
734
|
-
* Horizontal offset of the shadow.
|
|
735
|
-
*/
|
|
736
|
-
offsetX: LengthUnit;
|
|
737
|
-
/**
|
|
738
|
-
* Vertical offset of the shadow.
|
|
739
|
-
*/
|
|
740
|
-
offsetY: LengthUnit;
|
|
741
|
-
/**
|
|
742
|
-
* Blur radius of the shadow. Higher values create a more blurred shadow.
|
|
743
|
-
*/
|
|
744
|
-
blurRadius: LengthUnit;
|
|
745
|
-
/**
|
|
746
|
-
* Color of the shadow.
|
|
747
|
-
*/
|
|
748
|
-
color: ColorInput;
|
|
749
|
-
} | string;
|
|
750
|
-
|
|
751
|
-
/**
|
|
752
|
-
* Represents a collection of text shadows; has custom `FromCss` implementation for comma-separated values.
|
|
753
|
-
*/
|
|
754
|
-
type TextShadows = Array<TextShadow> | string;
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* Parsed `text-stroke` value.
|
|
758
|
-
*
|
|
759
|
-
* `color` is optional; when absent the element's `color` property should be used.
|
|
760
|
-
*/
|
|
761
|
-
type TextStroke = {
|
|
762
|
-
width: LengthUnit;
|
|
763
|
-
color: ColorInput | null;
|
|
764
|
-
} | string;
|
|
765
|
-
|
|
766
|
-
/**
|
|
767
|
-
* Controls text case transformation when rendering.
|
|
768
|
-
*/
|
|
769
|
-
type TextTransform = "none" | "uppercase" | "lowercase" | "capitalize";
|
|
770
|
-
|
|
771
|
-
/**
|
|
772
|
-
* Controls whether text should be wrapped.
|
|
773
|
-
*/
|
|
774
|
-
type TextWrapMode = "wrap" | "nowrap";
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* | a b x |
|
|
778
|
-
* | c d y |
|
|
779
|
-
* | 0 0 1 |
|
|
780
|
-
*/
|
|
781
|
-
type Affine = string;
|
|
782
|
-
|
|
783
|
-
/**
|
|
784
|
-
* Represents a single CSS transform operation
|
|
785
|
-
*/
|
|
786
|
-
type Transform = {
|
|
787
|
-
translate: [LengthUnit, LengthUnit];
|
|
788
|
-
} | {
|
|
789
|
-
scale: [number, number];
|
|
790
|
-
} | {
|
|
791
|
-
rotate: Angle;
|
|
792
|
-
} | {
|
|
793
|
-
skew: [Angle, Angle];
|
|
794
|
-
} | {
|
|
795
|
-
matrix: Affine;
|
|
796
|
-
};
|
|
797
|
-
|
|
798
|
-
/**
|
|
799
|
-
* A collection of transform operations that can be applied together
|
|
800
|
-
*/
|
|
801
|
-
type Transforms = Array<Transform> | string;
|
|
802
|
-
|
|
803
|
-
/**
|
|
804
|
-
* Controls how whitespace should be collapsed.
|
|
805
|
-
*/
|
|
806
|
-
type WhiteSpaceCollapse = "preserve" | "collapse" | "preserve-spaces" | "preserve-breaks";
|
|
807
|
-
|
|
808
|
-
type WhiteSpaceKeywords = "normal" | "pre" | "pre-wrap" | "pre-line";
|
|
809
|
-
|
|
810
|
-
/**
|
|
811
|
-
* Controls how whitespace should be handled.
|
|
812
|
-
*/
|
|
813
|
-
type WhiteSpace = WhiteSpaceKeywords | {
|
|
814
|
-
textWrapMode: TextWrapMode;
|
|
815
|
-
whiteSpaceCollapse: WhiteSpaceCollapse;
|
|
816
|
-
} | string;
|
|
817
|
-
|
|
818
|
-
/**
|
|
819
|
-
* Controls how text should be broken at word boundaries.
|
|
820
|
-
*
|
|
821
|
-
* Corresponds to CSS word-break property.
|
|
822
|
-
*/
|
|
823
|
-
type WordBreak = "normal" | "break-all" | "keep-all" | "break-word";
|
|
824
|
-
|
|
825
|
-
/**
|
|
826
|
-
* Defines the style of an element.
|
|
827
|
-
*/
|
|
828
|
-
type Style = {
|
|
829
|
-
boxSizing: CssValue<BoxSizing>;
|
|
830
|
-
opacity: CssValue<PercentageNumber>;
|
|
831
|
-
display: CssValue<Display>;
|
|
832
|
-
width: CssValue<LengthUnit>;
|
|
833
|
-
height: CssValue<LengthUnit>;
|
|
834
|
-
maxWidth: CssValue<LengthUnit>;
|
|
835
|
-
maxHeight: CssValue<LengthUnit>;
|
|
836
|
-
minWidth: CssValue<LengthUnit>;
|
|
837
|
-
minHeight: CssValue<LengthUnit>;
|
|
838
|
-
aspectRatio: CssValue<AspectRatio>;
|
|
839
|
-
padding: CssValue<Sides<LengthUnit>>;
|
|
840
|
-
paddingInline: CssValue<CssOption<SpacePair<LengthUnit>>>;
|
|
841
|
-
paddingBlock: CssValue<CssOption<SpacePair<LengthUnit>>>;
|
|
842
|
-
paddingTop: CssValue<CssOption<LengthUnit>>;
|
|
843
|
-
paddingRight: CssValue<CssOption<LengthUnit>>;
|
|
844
|
-
paddingBottom: CssValue<CssOption<LengthUnit>>;
|
|
845
|
-
paddingLeft: CssValue<CssOption<LengthUnit>>;
|
|
846
|
-
margin: CssValue<Sides<LengthUnit>>;
|
|
847
|
-
marginInline: CssValue<CssOption<SpacePair<LengthUnit>>>;
|
|
848
|
-
marginBlock: CssValue<CssOption<SpacePair<LengthUnit>>>;
|
|
849
|
-
marginTop: CssValue<CssOption<LengthUnit>>;
|
|
850
|
-
marginRight: CssValue<CssOption<LengthUnit>>;
|
|
851
|
-
marginBottom: CssValue<CssOption<LengthUnit>>;
|
|
852
|
-
marginLeft: CssValue<CssOption<LengthUnit>>;
|
|
853
|
-
inset: CssValue<Sides<LengthUnit>>;
|
|
854
|
-
insetInline: CssValue<CssOption<SpacePair<LengthUnit>>>;
|
|
855
|
-
insetBlock: CssValue<CssOption<SpacePair<LengthUnit>>>;
|
|
856
|
-
top: CssValue<CssOption<LengthUnit>>;
|
|
857
|
-
right: CssValue<CssOption<LengthUnit>>;
|
|
858
|
-
bottom: CssValue<CssOption<LengthUnit>>;
|
|
859
|
-
left: CssValue<CssOption<LengthUnit>>;
|
|
860
|
-
flexDirection: CssValue<FlexDirection>;
|
|
861
|
-
justifySelf: CssValue<AlignItems>;
|
|
862
|
-
justifyContent: CssValue<JustifyContent>;
|
|
863
|
-
alignContent: CssValue<JustifyContent>;
|
|
864
|
-
justifyItems: CssValue<AlignItems>;
|
|
865
|
-
alignItems: CssValue<AlignItems>;
|
|
866
|
-
alignSelf: CssValue<AlignItems>;
|
|
867
|
-
flexWrap: CssValue<FlexWrap>;
|
|
868
|
-
flexBasis: CssValue<CssOption<LengthUnit>>;
|
|
869
|
-
position: CssValue<Position>;
|
|
870
|
-
rotate: CssValue<CssOption<Angle>>;
|
|
871
|
-
scale: CssValue<CssOption<SpacePair<PercentageNumber>>>;
|
|
872
|
-
scaleX: CssValue<CssOption<PercentageNumber>>;
|
|
873
|
-
scaleY: CssValue<CssOption<PercentageNumber>>;
|
|
874
|
-
transform: CssValue<CssOption<Transforms>>;
|
|
875
|
-
transformOrigin: CssValue<CssOption<BackgroundPosition>>;
|
|
876
|
-
translate: CssValue<CssOption<SpacePair<LengthUnit>>>;
|
|
877
|
-
translateX: CssValue<CssOption<LengthUnit>>;
|
|
878
|
-
translateY: CssValue<CssOption<LengthUnit>>;
|
|
879
|
-
maskImage: CssValue<CssOption<BackgroundImages>>;
|
|
880
|
-
maskSize: CssValue<CssOption<BackgroundSizes>>;
|
|
881
|
-
maskPosition: CssValue<CssOption<BackgroundPositions>>;
|
|
882
|
-
maskRepeat: CssValue<CssOption<BackgroundRepeats>>;
|
|
883
|
-
gap: CssValue<SpacePair<LengthUnit>>;
|
|
884
|
-
columnGap: CssValue<CssOption<LengthUnit>>;
|
|
885
|
-
rowGap: CssValue<CssOption<LengthUnit>>;
|
|
886
|
-
flex: CssValue<CssOption<Flex>>;
|
|
887
|
-
flexGrow: CssValue<CssOption<FlexGrow>>;
|
|
888
|
-
flexShrink: CssValue<CssOption<FlexGrow>>;
|
|
889
|
-
borderRadius: CssValue<Sides<LengthUnit>>;
|
|
890
|
-
borderTopLeftRadius: CssValue<CssOption<LengthUnit>>;
|
|
891
|
-
borderTopRightRadius: CssValue<CssOption<LengthUnit>>;
|
|
892
|
-
borderBottomRightRadius: CssValue<CssOption<LengthUnit>>;
|
|
893
|
-
borderBottomLeftRadius: CssValue<CssOption<LengthUnit>>;
|
|
894
|
-
borderWidth: CssValue<CssOption<Sides<LengthUnit>>>;
|
|
895
|
-
borderInlineWidth: CssValue<CssOption<SpacePair<LengthUnit>>>;
|
|
896
|
-
borderBlockWidth: CssValue<CssOption<SpacePair<LengthUnit>>>;
|
|
897
|
-
borderTopWidth: CssValue<CssOption<LengthUnit>>;
|
|
898
|
-
borderRightWidth: CssValue<CssOption<LengthUnit>>;
|
|
899
|
-
borderBottomWidth: CssValue<CssOption<LengthUnit>>;
|
|
900
|
-
borderLeftWidth: CssValue<CssOption<LengthUnit>>;
|
|
901
|
-
border: CssValue<Border>;
|
|
902
|
-
objectFit: CssValue<ObjectFit>;
|
|
903
|
-
overflow: CssValue<Overflows>;
|
|
904
|
-
overflowX: CssValue<CssOption<Overflow>>;
|
|
905
|
-
overflowY: CssValue<CssOption<Overflow>>;
|
|
906
|
-
objectPosition: CssValue<BackgroundPosition>;
|
|
907
|
-
backgroundImage: CssValue<CssOption<BackgroundImages>>;
|
|
908
|
-
backgroundPosition: CssValue<CssOption<BackgroundPositions>>;
|
|
909
|
-
backgroundSize: CssValue<CssOption<BackgroundSizes>>;
|
|
910
|
-
backgroundRepeat: CssValue<CssOption<BackgroundRepeats>>;
|
|
911
|
-
backgroundColor: CssValue<ColorInput>;
|
|
912
|
-
boxShadow: CssValue<CssOption<BoxShadows>>;
|
|
913
|
-
gridAutoColumns: CssValue<CssOption<GridTrackSizes>>;
|
|
914
|
-
gridAutoRows: CssValue<CssOption<GridTrackSizes>>;
|
|
915
|
-
gridAutoFlow: CssValue<CssOption<GridAutoFlow>>;
|
|
916
|
-
gridColumn: CssValue<CssOption<GridLine>>;
|
|
917
|
-
gridRow: CssValue<CssOption<GridLine>>;
|
|
918
|
-
gridTemplateColumns: CssValue<CssOption<GridTemplateComponents>>;
|
|
919
|
-
gridTemplateRows: CssValue<CssOption<GridTemplateComponents>>;
|
|
920
|
-
gridTemplateAreas: CssValue<CssOption<GridTemplateAreas>>;
|
|
921
|
-
textOverflow: CssValue<TextOverflow>;
|
|
922
|
-
textTransform: CssValue<TextTransform>;
|
|
923
|
-
fontStyle: CssValue<FontStyle>;
|
|
924
|
-
borderColor: CssValue<CssOption<ColorInput>>;
|
|
925
|
-
color: CssValue<ColorInput>;
|
|
926
|
-
filter: CssValue<CssOption<Filters>>;
|
|
927
|
-
fontSize: CssValue<CssOption<LengthUnit>>;
|
|
928
|
-
fontFamily: CssValue<CssOption<FontFamily>>;
|
|
929
|
-
lineHeight: CssValue<LineHeight>;
|
|
930
|
-
fontWeight: CssValue<FontWeight>;
|
|
931
|
-
fontVariationSettings: CssValue<CssOption<FontVariationSettings>>;
|
|
932
|
-
fontFeatureSettings: CssValue<CssOption<FontFeatureSettings>>;
|
|
933
|
-
lineClamp: CssValue<CssOption<LineClamp>>;
|
|
934
|
-
textAlign: CssValue<TextAlign>;
|
|
935
|
-
textStrokeWidth: CssValue<LengthUnit>;
|
|
936
|
-
textStrokeColor: CssValue<CssOption<ColorInput>>;
|
|
937
|
-
textStroke: CssValue<CssOption<TextStroke>>;
|
|
938
|
-
textShadow: CssValue<CssOption<TextShadows>>;
|
|
939
|
-
textDecoration: CssValue<TextDecoration>;
|
|
940
|
-
textDecorationLine: CssValue<CssOption<TextDecorationLines>>;
|
|
941
|
-
textDecorationColor: CssValue<CssOption<ColorInput>>;
|
|
942
|
-
letterSpacing: CssValue<CssOption<LengthUnit>>;
|
|
943
|
-
wordSpacing: CssValue<CssOption<LengthUnit>>;
|
|
944
|
-
imageRendering: CssValue<ImageScalingAlgorithm>;
|
|
945
|
-
overflowWrap: CssValue<OverflowWrap>;
|
|
946
|
-
wordBreak: CssValue<WordBreak>;
|
|
947
|
-
clipPath: CssValue<CssOption<BasicShape>>;
|
|
948
|
-
clipRule: CssValue<FillRule>;
|
|
949
|
-
whiteSpace: CssValue<WhiteSpace>;
|
|
950
|
-
whiteSpaceCollapse: CssValue<CssOption<WhiteSpaceCollapse>>;
|
|
951
|
-
textWrapMode: CssValue<CssOption<TextWrapMode>>;
|
|
952
|
-
textWrap: CssValue<CssOption<TextWrapMode>>;
|
|
953
|
-
};
|
|
954
|
-
|
|
955
|
-
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
956
|
-
[key: string]: JsonValue;
|
|
957
|
-
};
|
|
958
|
-
type AnyNode = {
|
|
959
|
-
type: string;
|
|
960
|
-
[key: string]: JsonValue;
|
|
961
|
-
};
|
|
962
|
-
type PartialStyle = Partial<Style>;
|
|
963
|
-
type Node = ContainerNode | TextNode | ImageNode | AnyNode;
|
|
964
|
-
type ContainerNode = {
|
|
965
|
-
type: "container";
|
|
966
|
-
style?: PartialStyle;
|
|
967
|
-
children?: Node[];
|
|
968
|
-
tw?: string;
|
|
969
|
-
};
|
|
970
|
-
type TextNode = {
|
|
971
|
-
type: "text";
|
|
972
|
-
text: string;
|
|
973
|
-
style?: PartialStyle;
|
|
974
|
-
tw?: string;
|
|
975
|
-
};
|
|
976
|
-
type ImageNode = {
|
|
977
|
-
type: "image";
|
|
978
|
-
src: string;
|
|
979
|
-
width?: number;
|
|
980
|
-
height?: number;
|
|
981
|
-
style?: PartialStyle;
|
|
982
|
-
tw?: string;
|
|
983
|
-
};
|
|
984
|
-
|
|
985
|
-
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, ColorInput as a };
|