effcss 1.0.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.
Files changed (57) hide show
  1. package/LICENSE +251 -0
  2. package/README.md +152 -0
  3. package/dist/build/define-provider-with-configs.min.js +1 -0
  4. package/dist/build/define-provider.min.js +1 -0
  5. package/dist/configs/basic.js +1 -0
  6. package/dist/configs/ext.js +1 -0
  7. package/dist/css/dict.js +1 -0
  8. package/dist/css/functions.js +1 -0
  9. package/dist/index.js +1 -0
  10. package/dist/types/allConfigs.d.ts +1 -0
  11. package/dist/types/build/defineProvider.d.ts +1 -0
  12. package/dist/types/build/defineProviderWithConfigs.d.ts +1 -0
  13. package/dist/types/defineProvider.d.ts +1 -0
  14. package/dist/types/defineProviderWithConfigs.d.ts +1 -0
  15. package/dist/types/src/_provider/constants.d.ts +5 -0
  16. package/dist/types/src/_provider/manage.d.ts +35 -0
  17. package/dist/types/src/_provider/process.d.ts +102 -0
  18. package/dist/types/src/configs/basic/Agent.d.ts +3 -0
  19. package/dist/types/src/configs/basic/AgentColor.d.ts +3 -0
  20. package/dist/types/src/configs/basic/Animation.d.ts +3 -0
  21. package/dist/types/src/configs/basic/Background.d.ts +3 -0
  22. package/dist/types/src/configs/basic/Border.d.ts +3 -0
  23. package/dist/types/src/configs/basic/BorderExt.d.ts +3 -0
  24. package/dist/types/src/configs/basic/Box.d.ts +3 -0
  25. package/dist/types/src/configs/basic/Color.d.ts +3 -0
  26. package/dist/types/src/configs/basic/Column.d.ts +3 -0
  27. package/dist/types/src/configs/basic/FlexContainer.d.ts +3 -0
  28. package/dist/types/src/configs/basic/FlexItem.d.ts +3 -0
  29. package/dist/types/src/configs/basic/Font.d.ts +3 -0
  30. package/dist/types/src/configs/basic/GridContainer.d.ts +3 -0
  31. package/dist/types/src/configs/basic/GridItem.d.ts +3 -0
  32. package/dist/types/src/configs/basic/Indent.d.ts +3 -0
  33. package/dist/types/src/configs/basic/Inset.d.ts +3 -0
  34. package/dist/types/src/configs/basic/Mask.d.ts +3 -0
  35. package/dist/types/src/configs/basic/Object.d.ts +3 -0
  36. package/dist/types/src/configs/basic/Outline.d.ts +3 -0
  37. package/dist/types/src/configs/basic/Scroll.d.ts +3 -0
  38. package/dist/types/src/configs/basic/ScrollExt.d.ts +3 -0
  39. package/dist/types/src/configs/basic/Size.d.ts +3 -0
  40. package/dist/types/src/configs/basic/SizeExt.d.ts +3 -0
  41. package/dist/types/src/configs/basic/Text.d.ts +3 -0
  42. package/dist/types/src/configs/basic/Transform.d.ts +3 -0
  43. package/dist/types/src/configs/basic/Transition.d.ts +3 -0
  44. package/dist/types/src/configs/basic/User.d.ts +3 -0
  45. package/dist/types/src/configs/basic/View.d.ts +3 -0
  46. package/dist/types/src/configs/basic.d.ts +112 -0
  47. package/dist/types/src/configs/ext/Keyframes.d.ts +6 -0
  48. package/dist/types/src/configs/ext/Reset.d.ts +3 -0
  49. package/dist/types/src/configs/ext.d.ts +8 -0
  50. package/dist/types/src/css/dict.d.ts +4 -0
  51. package/dist/types/src/css/functions.d.ts +443 -0
  52. package/dist/types/src/index.d.ts +11 -0
  53. package/dist/types/src/types.d.ts +358 -0
  54. package/dist/types/src/utils.d.ts +88 -0
  55. package/dist/types/tests/Processor.test.d.ts +1 -0
  56. package/dist/utils.js +1 -0
  57. package/package.json +67 -0
@@ -0,0 +1,443 @@
1
+ /**
2
+ * Join args with dash
3
+ * @param args
4
+ */
5
+ export declare const dash: (...args: (string | number)[]) => string;
6
+ /**
7
+ * Join args with space
8
+ * @param args
9
+ */
10
+ export declare const space: (...args: (string | number)[]) => string;
11
+ /**
12
+ * Join args with comma
13
+ * @param args
14
+ */
15
+ export declare const comma: (...args: (string | number)[]) => string;
16
+ /**
17
+ * Put value in parentheses
18
+ * @param val
19
+ */
20
+ export declare const parentheses: (val: string | number) => string;
21
+ /**
22
+ * Transformer
23
+ * @param target
24
+ * @param transform
25
+ */
26
+ export declare const transformer: <K extends string, T, V>(target: Record<K, T>, transform: (val: [string | number, T]) => [string | number, V]) => Record<K, V>;
27
+ /**
28
+ * Value transformer
29
+ * @param target
30
+ * @param transformVal
31
+ */
32
+ export declare const valTransformer: <K extends string, T, V>(target: Record<K, T>, handler: (val: T) => V) => Record<K, V>;
33
+ /**
34
+ * Constructs `attr(val)` expression
35
+ * @param val
36
+ */
37
+ export declare const attr: (val: string | number) => string;
38
+ /**
39
+ * Constructs `url(val)` expression
40
+ * @param val
41
+ */
42
+ export declare const url: (val: string | number) => string;
43
+ /**
44
+ * Add a string inside `calc(val)` expression
45
+ * @param val
46
+ */
47
+ export declare const calcExp: (val: string) => string;
48
+ /**
49
+ * Constructs `@keyframes key` expression
50
+ * @param val
51
+ */
52
+ export declare const atKeyframes: (val: string) => string;
53
+ /**
54
+ * Constructs `fitContent(val)` expression
55
+ * @param val
56
+ */
57
+ export declare const fitContent: (val: string | number) => string;
58
+ /**
59
+ * Constructs `minmax(min, max)` expression
60
+ * @param val
61
+ */
62
+ export declare const minmax: (min: string | number, max: string | number) => string;
63
+ /**
64
+ * Constructs `repeat(count, tracks)` expression
65
+ * @param val
66
+ */
67
+ export declare const repeat: (count: string | number, tracks: string | number) => string;
68
+ /**
69
+ * Constructs `scale3d(val)` expression
70
+ * @param val
71
+ */
72
+ export declare const scale3d: (val: string | number) => string;
73
+ /**
74
+ * Constructs `scaleX(val)` expression
75
+ * @param val
76
+ */
77
+ export declare const scaleX: (val: string | number) => string;
78
+ /**
79
+ * Constructs `scaleY(val)` expression
80
+ * @param val
81
+ */
82
+ export declare const scaleY: (val: string | number) => string;
83
+ /**
84
+ * Constructs `scaleZ(val)` expression
85
+ * @param val
86
+ */
87
+ export declare const scaleZ: (val: string | number) => string;
88
+ /**
89
+ * Constructs `scale(val)` expression
90
+ * @param val
91
+ */
92
+ export declare const scale: (val: string | number) => string;
93
+ /**
94
+ * Constructs `translate3d(x, y, z)` expression
95
+ * @param x
96
+ * @param y
97
+ * @param z
98
+ */
99
+ export declare const translate3d: (x: string | number, y: string | number, z: string | number) => string;
100
+ /**
101
+ * Constructs `translateX(val)` expression
102
+ * @param val
103
+ */
104
+ export declare const translateX: (val: string | number) => string;
105
+ /**
106
+ * Constructs `translateY(val)` expression
107
+ * @param val
108
+ */
109
+ export declare const translateY: (val: string | number) => string;
110
+ /**
111
+ * Constructs `translateZ(val)` expression
112
+ * @param val
113
+ */
114
+ export declare const translateZ: (val: string | number) => string;
115
+ /**
116
+ * Constructs `translate(x, y)` expression
117
+ * @param x
118
+ * @param y
119
+ */
120
+ export declare const translate: (x: string | number, y: string | number) => string;
121
+ /**
122
+ * Constructs `rotate(val)` expression
123
+ * @param val
124
+ */
125
+ export declare const rotate: (val: string | number) => string;
126
+ /**
127
+ * Constructs `rotateX(val)` expression
128
+ * @param val
129
+ */
130
+ export declare const rotateX: (val: string | number) => string;
131
+ /**
132
+ * Constructs `rotateX(val)` expression
133
+ * @param val
134
+ */
135
+ export declare const rotateY: (val: string | number) => string;
136
+ /**
137
+ * Constructs `rotateX(val)` expression
138
+ * @param val
139
+ */
140
+ export declare const rotateZ: (val: string | number) => string;
141
+ /**
142
+ * Constructs `rotate3d(x, y, z)` expression
143
+ * @param x
144
+ * @param y
145
+ * @param z
146
+ * @param a
147
+ */
148
+ export declare const rotate3d: (x: string | number, y: string | number, z: string | number, a: string | number) => string;
149
+ /**
150
+ * Constructs `skew(x, y)` expression
151
+ * @param x
152
+ * @param y
153
+ */
154
+ export declare const skew: (x: string | number, y: string | number) => string;
155
+ /**
156
+ * Constructs `skewX(val)` expression
157
+ * @param val
158
+ */
159
+ export declare const skewX: (val: string | number) => string;
160
+ /**
161
+ * Constructs `skewY(val)` expression
162
+ * @param val
163
+ */
164
+ export declare const skewY: (val: string | number) => string;
165
+ /**
166
+ * Constructs `perspective(val)` expression
167
+ * @param val
168
+ */
169
+ export declare const perspective: (val: string | number) => string;
170
+ /**
171
+ * Constructs `opacity(val)` expression
172
+ * @param val
173
+ */
174
+ export declare const opacity: (val: string | number) => string;
175
+ /**
176
+ * Constructs `blur(val)` expression
177
+ * @param val
178
+ */
179
+ export declare const blur: (val: string | number) => string;
180
+ /**
181
+ * Constructs `contrast(val)` expression
182
+ * @param val
183
+ */
184
+ export declare const contrast: (val: string | number) => string;
185
+ /**
186
+ * Constructs `drop-shadow(val)` expression
187
+ * @param val
188
+ */
189
+ export declare const dropShadow: (val: string | number) => string;
190
+ /**
191
+ * Constructs `saturate(val)` expression
192
+ * @param val
193
+ */
194
+ export declare const saturate: (val: string | number) => string;
195
+ /**
196
+ * Constructs `invert(val)` expression
197
+ * @param val
198
+ */
199
+ export declare const invert: (val: string | number) => string;
200
+ /**
201
+ * Constructs `sepia(val)` expression
202
+ * @param val
203
+ */
204
+ export declare const sepia: (val: string | number) => string;
205
+ /**
206
+ * Constructs `hue-rotate(val)` expression
207
+ * @param val
208
+ */
209
+ export declare const hueRotate: (val: string | number) => string;
210
+ /**
211
+ * Constructs `grayscale(val)` expression
212
+ * @param val
213
+ */
214
+ export declare const grayscale: (val: string | number) => string;
215
+ /**
216
+ * Constructs `blur(val)` expression
217
+ * @param val
218
+ */
219
+ export declare const brightness: (val: string | number) => string;
220
+ /**
221
+ * Constructs `oklch(from f l c h / alpha)` expression
222
+ * @param params
223
+ */
224
+ export declare const oklchFrom: ({ f, l, c, h, a }: {
225
+ f: string;
226
+ l?: string | number;
227
+ c?: string | number;
228
+ h?: string | number;
229
+ a?: string | number;
230
+ }) => string;
231
+ /**
232
+ * Constructs `light-dark(val)` expression
233
+ * @param val
234
+ */
235
+ export declare const lightDark: (l: string, d: string) => string;
236
+ /**
237
+ * Constructs `color-mix(m, c1 p1, c2, p2)` expression
238
+ * @param val
239
+ */
240
+ export declare const colorMix: ({ m, c1, c2, p1, p2 }: {
241
+ m: string;
242
+ c1: string;
243
+ c2: string;
244
+ p1?: number;
245
+ p2?: number;
246
+ }) => string;
247
+ /**
248
+ * Constructs `prefers-color-scheme: key` expression
249
+ * @param params
250
+ */
251
+ export declare const preferColorScheme: (val: string) => string;
252
+ /**
253
+ * Constructs `linear-gradient(val)` expression
254
+ * @param val
255
+ */
256
+ export declare const linearGradient: (val: string | number) => string;
257
+ /**
258
+ * Constructs `radial-gradient(val)` expression
259
+ * @param val
260
+ */
261
+ export declare const radialGradient: (val: string | number) => string;
262
+ /**
263
+ * Constructs `conic-gradient(val)` expression
264
+ * @param val
265
+ */
266
+ export declare const conicGradient: (val: string | number) => string;
267
+ /**
268
+ * Constructs `val:active` expression
269
+ * @param val
270
+ */
271
+ export declare const pseudoActive: (val: string) => string;
272
+ /**
273
+ * Constructs `val:focus` expression
274
+ * @param val
275
+ */
276
+ export declare const pseudoFocus: (val: string) => string;
277
+ /**
278
+ * Constructs `val:hover` expression
279
+ * @param val
280
+ */
281
+ export declare const pseudoHover: (val: string) => string;
282
+ /**
283
+ * Constructs `val:visited` expression
284
+ * @param val
285
+ */
286
+ export declare const pseudoVisited: (val: string) => string;
287
+ /**
288
+ * Constructs `val:link` expression
289
+ * @param val
290
+ */
291
+ export declare const pseudoLink: (val: string) => string;
292
+ /**
293
+ * Constructs `val::before` expression
294
+ * @param val
295
+ */
296
+ export declare const pseudoBefore: (val?: string) => string;
297
+ /**
298
+ * Constructs `val::after` expression
299
+ * @param val
300
+ */
301
+ export declare const pseudoAfter: (val?: string) => string;
302
+ /**
303
+ * Constructs `::part(val)` expression
304
+ * @param val
305
+ */
306
+ export declare const pseudoPart: (val: string) => string;
307
+ /**
308
+ * Constructs `::slotted(val)` expression
309
+ * @param val
310
+ */
311
+ export declare const pseudoSlotted: (val: string) => string;
312
+ /**
313
+ * Constructs `:has(val)` expression
314
+ * @param val
315
+ */
316
+ export declare const pseudoHas: (val: string) => string;
317
+ /**
318
+ * Constructs `:is(val)` expression
319
+ * @param val
320
+ */
321
+ export declare const pseudoIs: (val: string) => string;
322
+ /**
323
+ * Constructs `:not(val)` expression
324
+ * @param val
325
+ */
326
+ export declare const pseudoNot: (val: string) => string;
327
+ /**
328
+ * Constructs `:nth-child(val)` expression
329
+ * @param val
330
+ */
331
+ export declare const pseudoNthChild: (val: string) => string;
332
+ /**
333
+ * Constructs `:nth-of-type(val)` expression
334
+ * @param val
335
+ */
336
+ export declare const pseudoNthOfType: (val: string) => string;
337
+ /**
338
+ * Constructs `:host(val)` expression
339
+ * @param val
340
+ */
341
+ export declare const pseudoHost: (val: string) => string;
342
+ /**
343
+ * Constructs `:state(val)` expression
344
+ * @param val
345
+ */
346
+ export declare const pseudoState: (val: string) => string;
347
+ /**
348
+ * Constructs `:where(val)` expression
349
+ * @param val
350
+ */
351
+ export declare const pseudoWhere: (val: string) => string;
352
+ export declare const pseudoOddChild: () => string;
353
+ export declare const pseudoEvenChild: () => string;
354
+ /**
355
+ * Transform object values to `percents`
356
+ * @param params
357
+ */
358
+ export declare const toPercent: <T extends string>(params?: Record<string | number, string | number>) => Record<T, string> | undefined;
359
+ /**
360
+ * Transform args to `percent` object
361
+ * @param params
362
+ */
363
+ export declare const argsToPercent: <T extends number>(...args: T[]) => Record<T, string>;
364
+ /**
365
+ * Transform object values to `rem`s
366
+ * @param params
367
+ */
368
+ export declare const toRem: <T extends string>(params?: Record<string | number, string | number>) => Record<T, string> | undefined;
369
+ /**
370
+ * Transform object values to `ms`s
371
+ * @param params
372
+ */
373
+ export declare const toMs: <T extends string>(params?: Record<string | number, string | number>) => Record<T, string> | undefined;
374
+ /**
375
+ * Transform object values to `px`s
376
+ * @param params
377
+ */
378
+ export declare const toPx: <T extends string>(params?: Record<string | number, string | number>) => Record<T, string> | undefined;
379
+ /**
380
+ * Transform object values to `deg`s
381
+ * @param params
382
+ */
383
+ export declare const toDeg: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
384
+ /**
385
+ * Transform object values to `vw`s
386
+ * @param params
387
+ */
388
+ export declare const toVw: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
389
+ /**
390
+ * Transform object values to `vh`s
391
+ * @param params
392
+ */
393
+ export declare const toVh: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
394
+ /**
395
+ * Transform object values to `vmin`s
396
+ * @param params
397
+ */
398
+ export declare const toVmin: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
399
+ /**
400
+ * Transform object values to `vmax`s
401
+ * @param params
402
+ */
403
+ export declare const toVmax: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
404
+ /**
405
+ * Transform object values to `cqb`s
406
+ * @param params
407
+ */
408
+ export declare const toCqb: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
409
+ /**
410
+ * Transform object values to `cqi`s
411
+ * @param params
412
+ */
413
+ export declare const toCqi: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
414
+ /**
415
+ * Transform object values to `cqw`s
416
+ * @param params
417
+ */
418
+ export declare const toCqw: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
419
+ /**
420
+ * Transform object values to `cqh`s
421
+ * @param params
422
+ */
423
+ export declare const toCqh: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
424
+ /**
425
+ * Transform object values to `cqmin`s
426
+ * @param params
427
+ */
428
+ export declare const toCqmin: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
429
+ /**
430
+ * Transform object values to `cqmax`s
431
+ * @param params
432
+ */
433
+ export declare const toCqmax: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
434
+ /**
435
+ * Transform object values to `span`s
436
+ * @param params
437
+ */
438
+ export declare const toSpan: <T extends string | number>(params?: Record<T, string | number>) => Record<T, string> | undefined;
439
+ /**
440
+ * Transform args to `deg` object
441
+ * @param params
442
+ */
443
+ export declare const argsToDeg: <T extends number>(...args: T[]) => Record<T, string>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Define style provider
3
+ */
4
+ export declare function defineStyleProvider(props?: {
5
+ name?: string;
6
+ config?: {
7
+ params?: object;
8
+ styles?: object;
9
+ ext?: object;
10
+ };
11
+ }): void;