@takumi-rs/helpers 0.12.2 → 0.13.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.ts +82 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,10 @@ export type BoxShadow = {
|
|
|
98
98
|
* a single shadow or multiple shadows.
|
|
99
99
|
*/
|
|
100
100
|
export type BoxShadowInput = BoxShadow | Array<BoxShadow>;
|
|
101
|
+
/**
|
|
102
|
+
* This enum determines the layout algorithm used for the children of a node.
|
|
103
|
+
*/
|
|
104
|
+
export type Display = "block" | "flex" | "grid" | "none";
|
|
101
105
|
/**
|
|
102
106
|
* Defines the direction of flex items within a flex container.
|
|
103
107
|
*
|
|
@@ -127,6 +131,33 @@ export type Gap = LengthUnit | [
|
|
|
127
131
|
LengthUnit,
|
|
128
132
|
LengthUnit
|
|
129
133
|
];
|
|
134
|
+
/**
|
|
135
|
+
* Represents the grid auto flow with serde support
|
|
136
|
+
*/
|
|
137
|
+
export type GridAutoFlow = "row" | "column" | "row-dense" | "column-dense";
|
|
138
|
+
/**
|
|
139
|
+
* Represents a grid placement with serde support
|
|
140
|
+
*/
|
|
141
|
+
export type GridPlacement = null | number | number | string;
|
|
142
|
+
/**
|
|
143
|
+
* Represents a grid line placement with serde support
|
|
144
|
+
*/
|
|
145
|
+
export type GridLine = {
|
|
146
|
+
/**
|
|
147
|
+
* The start line placement
|
|
148
|
+
*/
|
|
149
|
+
start: GridPlacement | null;
|
|
150
|
+
/**
|
|
151
|
+
* The end line placement
|
|
152
|
+
*/
|
|
153
|
+
end: GridPlacement | null;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Represents a grid track sizing function with serde support
|
|
157
|
+
*/
|
|
158
|
+
export type GridTrackSize = {
|
|
159
|
+
"fr": number;
|
|
160
|
+
} | "min-content" | "max-content" | LengthUnit;
|
|
130
161
|
/**
|
|
131
162
|
* Defines how flex items are aligned along the main axis.
|
|
132
163
|
*
|
|
@@ -145,7 +176,7 @@ export type ObjectFit = "contain" | "cover" | "fill" | "scale-down" | "none";
|
|
|
145
176
|
*
|
|
146
177
|
* This enum determines how an element is positioned within its containing element.
|
|
147
178
|
*/
|
|
148
|
-
type Position$1 = "
|
|
179
|
+
type Position$1 = "relative" | "absolute";
|
|
149
180
|
/**
|
|
150
181
|
* Represents values that can be applied to all sides of an element.
|
|
151
182
|
*
|
|
@@ -174,6 +205,21 @@ export type TextAlign = "left" | "right" | "center" | "justify" | "start" | "end
|
|
|
174
205
|
* This enum determines how text should be handled when it exceeds the container width.
|
|
175
206
|
*/
|
|
176
207
|
export type TextOverflow = "ellipsis" | "clip";
|
|
208
|
+
/**
|
|
209
|
+
* Represents a grid track repetition pattern
|
|
210
|
+
*/
|
|
211
|
+
export type GridTrackRepetition = "auto-fill" | "auto-fit" | number;
|
|
212
|
+
/**
|
|
213
|
+
* Represents a track sizing function
|
|
214
|
+
*/
|
|
215
|
+
export type TrackSizingFunction = {
|
|
216
|
+
"single": GridTrackSize;
|
|
217
|
+
} | {
|
|
218
|
+
"repeat": [
|
|
219
|
+
GridTrackRepetition,
|
|
220
|
+
Array<GridTrackSize>
|
|
221
|
+
];
|
|
222
|
+
};
|
|
177
223
|
/**
|
|
178
224
|
* Main styling structure that contains all layout and visual properties.
|
|
179
225
|
*
|
|
@@ -182,6 +228,10 @@ export type TextOverflow = "ellipsis" | "clip";
|
|
|
182
228
|
* down to child elements.
|
|
183
229
|
*/
|
|
184
230
|
export type Style = {
|
|
231
|
+
/**
|
|
232
|
+
* Display algorithm to use for the element
|
|
233
|
+
*/
|
|
234
|
+
display: Display;
|
|
185
235
|
/**
|
|
186
236
|
* Width of the element
|
|
187
237
|
*/
|
|
@@ -274,6 +324,34 @@ export type Style = {
|
|
|
274
324
|
* Box shadow for the element
|
|
275
325
|
*/
|
|
276
326
|
box_shadow?: BoxShadowInput;
|
|
327
|
+
/**
|
|
328
|
+
* Controls the size of implicitly-created grid columns
|
|
329
|
+
*/
|
|
330
|
+
grid_auto_columns?: Array<GridTrackSize>;
|
|
331
|
+
/**
|
|
332
|
+
* Controls the size of implicitly-created grid rows
|
|
333
|
+
*/
|
|
334
|
+
grid_auto_rows?: Array<GridTrackSize>;
|
|
335
|
+
/**
|
|
336
|
+
* Controls how auto-placed items are inserted in the grid
|
|
337
|
+
*/
|
|
338
|
+
grid_auto_flow?: GridAutoFlow;
|
|
339
|
+
/**
|
|
340
|
+
* Specifies a grid item's size and location within the grid column
|
|
341
|
+
*/
|
|
342
|
+
grid_column?: GridLine;
|
|
343
|
+
/**
|
|
344
|
+
* Specifies a grid item's size and location within the grid row
|
|
345
|
+
*/
|
|
346
|
+
grid_row?: GridLine;
|
|
347
|
+
/**
|
|
348
|
+
* Defines the line names and track sizing functions of the grid columns
|
|
349
|
+
*/
|
|
350
|
+
grid_template_columns?: Array<TrackSizingFunction>;
|
|
351
|
+
/**
|
|
352
|
+
* Defines the line names and track sizing functions of the grid rows
|
|
353
|
+
*/
|
|
354
|
+
grid_template_rows?: Array<TrackSizingFunction>;
|
|
277
355
|
/**
|
|
278
356
|
* How text should be overflowed
|
|
279
357
|
*/
|
|
@@ -374,6 +452,9 @@ export declare function em(em: number): {
|
|
|
374
452
|
export declare function rem(rem: number): {
|
|
375
453
|
rem: number;
|
|
376
454
|
};
|
|
455
|
+
export declare function fr(fr: number): {
|
|
456
|
+
fr: number;
|
|
457
|
+
};
|
|
377
458
|
export declare function gradient(from: ColorInput, to: ColorInput, angle?: number): {
|
|
378
459
|
from: ColorInput;
|
|
379
460
|
to: ColorInput;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function i(e){return{type:"container",...e}}function s(e,t){return{...t,type:"text",text:e}}function r(e,t){return{...t,type:"image",src:e}}function n(e){return e}function a(e){return{percentage:e}}function l(e){return{vw:e}}function p(e){return{vh:e}}function h(e){return{em:e}}function m(e){return{rem:e}}function f(e,t,o=0){return{from:e,to:t,angle:o}}export{l as vw,p as vh,s as text,n as style,m as rem,a as percentage,r as image,
|
|
1
|
+
function i(e){return{type:"container",...e}}function s(e,t){return{...t,type:"text",text:e}}function r(e,t){return{...t,type:"image",src:e}}function n(e){return e}function a(e){return{percentage:e}}function l(e){return{vw:e}}function p(e){return{vh:e}}function h(e){return{em:e}}function m(e){return{rem:e}}function f(e){return{fr:e}}function u(e,t,o=0){return{from:e,to:t,angle:o}}export{l as vw,p as vh,s as text,n as style,m as rem,a as percentage,r as image,u as gradient,f as fr,h as em,i as container};
|