shweet 0.0.10
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/README.md +3 -0
- package/dist/index.d.ts +621 -0
- package/dist/index.js +13 -0
- package/package.json +41 -0
package/README.md
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
type V = string | number | boolean;
|
|
2
|
+
type obj<T> = Record<string, T>;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A custom Map implementation that provides additional utility methods for working with objects and maps.
|
|
6
|
+
*
|
|
7
|
+
* @template K - The type of the keys in the map.
|
|
8
|
+
* @template V - The type of the values in the map.
|
|
9
|
+
*/
|
|
10
|
+
declare class Mapper<K, V> extends Map<K, V> {
|
|
11
|
+
obj(obj?: object | null): void;
|
|
12
|
+
map(map: Mapper<K, V>): void;
|
|
13
|
+
ass<T>(key: K, obj: T): void;
|
|
14
|
+
lacks(key: K): boolean;
|
|
15
|
+
init(key: K, val: V): V;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class log {
|
|
19
|
+
static set i(a: any);
|
|
20
|
+
static set e(a: any);
|
|
21
|
+
static set w(a: any);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class _Var {
|
|
25
|
+
k: string;
|
|
26
|
+
fallback?: CSSValue;
|
|
27
|
+
var: string;
|
|
28
|
+
value: media;
|
|
29
|
+
constructor(vr?: obj<CSSValue | CSSValue[]>, fallback?: CSSValue);
|
|
30
|
+
__(fallback?: CSSValue): string;
|
|
31
|
+
new(val: CSSValue, fallback?: CSSValue): _Var;
|
|
32
|
+
}
|
|
33
|
+
declare const Var: (vr: obj<CSSValue>, fallback?: CSSValue) => _Var;
|
|
34
|
+
|
|
35
|
+
type CSSValue = V | _Var | undefined | CSSValue[];
|
|
36
|
+
type VarType = _Var;
|
|
37
|
+
interface xtraCSS extends Partial<CSSStyleDeclaration> {
|
|
38
|
+
src?: string;
|
|
39
|
+
webkitBackdropFilter?: string;
|
|
40
|
+
webkitTextFillColor?: string;
|
|
41
|
+
webkitFontSmoothing?: string;
|
|
42
|
+
webkitTapHighlightColor?: string;
|
|
43
|
+
textFillColor?: string;
|
|
44
|
+
lineClamp?: string;
|
|
45
|
+
textJustify?: string;
|
|
46
|
+
webkitBoxDecorationBreak: string;
|
|
47
|
+
boxDecorationBreak: string;
|
|
48
|
+
webkitBoxReflect: string;
|
|
49
|
+
}
|
|
50
|
+
interface fontFace {
|
|
51
|
+
src?: string;
|
|
52
|
+
fontStretch?: "condensed" | "ultra-condensed" | "extra-condensed" | "semi-condensed" | "expanded" | "semi-expanded" | "extra-expanded" | "ultra-expanded";
|
|
53
|
+
fontStyle?: "normal" | "italic" | "oblique";
|
|
54
|
+
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
55
|
+
unicodeRange?: CSSValue;
|
|
56
|
+
}
|
|
57
|
+
type CSSinR = {
|
|
58
|
+
[P in keyof xtraCSS]?: CSSValue | media;
|
|
59
|
+
} | {
|
|
60
|
+
[p: string]: CSSValue | media;
|
|
61
|
+
} | CSSinR[];
|
|
62
|
+
type atCSS = string;
|
|
63
|
+
type CSS = Record<string, CSSinR>;
|
|
64
|
+
type KFX = CSSinR | Medyas<any, {}>;
|
|
65
|
+
type KFCSS = obj<{
|
|
66
|
+
from?: KFX;
|
|
67
|
+
to?: KFX;
|
|
68
|
+
[percent: `${string}%`]: KFX;
|
|
69
|
+
}>;
|
|
70
|
+
|
|
71
|
+
interface mtype {
|
|
72
|
+
xs?: CSSValue;
|
|
73
|
+
sm?: CSSValue;
|
|
74
|
+
smd?: CSSValue;
|
|
75
|
+
md?: CSSValue;
|
|
76
|
+
lg?: CSSValue;
|
|
77
|
+
xl?: CSSValue;
|
|
78
|
+
xxl?: CSSValue;
|
|
79
|
+
no_hover?: CSSValue;
|
|
80
|
+
print?: CSSValue;
|
|
81
|
+
dark?: CSSValue;
|
|
82
|
+
screen?: CSSValue;
|
|
83
|
+
}
|
|
84
|
+
declare class media {
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
static default: keyof mtype;
|
|
87
|
+
static readonly prop: mtype;
|
|
88
|
+
static readonly extra: mtype;
|
|
89
|
+
constructor(defValue?: CSSValue, g?: obj<any>);
|
|
90
|
+
static get breakpoints(): any;
|
|
91
|
+
}
|
|
92
|
+
declare function med(g: mtype & {
|
|
93
|
+
[k: string]: undefined | CSSValue;
|
|
94
|
+
}): media;
|
|
95
|
+
declare function med(defValue: CSSValue, g: mtype & {
|
|
96
|
+
[k: string]: undefined | CSSValue;
|
|
97
|
+
}): media;
|
|
98
|
+
interface MedCFG<Q = Record<string, any>> {
|
|
99
|
+
prefix?: string;
|
|
100
|
+
data: Q;
|
|
101
|
+
values: Record<string, media>;
|
|
102
|
+
}
|
|
103
|
+
declare class Medyas<T extends Medyas<T>, Q = Record<string, any>> {
|
|
104
|
+
[k: number]: this;
|
|
105
|
+
_prefix?: string;
|
|
106
|
+
data: Q;
|
|
107
|
+
protected _values: Record<string, media>;
|
|
108
|
+
constructor({ prefix, data, values }?: MedCFG);
|
|
109
|
+
get XS(): Medyas<T, Q>;
|
|
110
|
+
get SM(): T;
|
|
111
|
+
get SMD(): T;
|
|
112
|
+
get MD(): T;
|
|
113
|
+
get LG(): T;
|
|
114
|
+
get XL(): T;
|
|
115
|
+
get XXL(): T;
|
|
116
|
+
get NO_HOVER(): T;
|
|
117
|
+
get PRINT(): T;
|
|
118
|
+
get SCREEN(): T;
|
|
119
|
+
get DARK(): T;
|
|
120
|
+
set _value(val: CSSinR);
|
|
121
|
+
get _value(): CSSinR;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare class support {
|
|
125
|
+
value: Mapper<string, CSSinR[]>;
|
|
126
|
+
__: (...css: CSSinR[]) => this;
|
|
127
|
+
constructor(css: CSSinR | string);
|
|
128
|
+
}
|
|
129
|
+
declare function supports(css: CSSinR | string): (...css: CSSinR[]) => support;
|
|
130
|
+
|
|
131
|
+
declare class Proc {
|
|
132
|
+
private base;
|
|
133
|
+
constructor(base: Base);
|
|
134
|
+
private props;
|
|
135
|
+
private addPrefixToAnimation;
|
|
136
|
+
private saveAnim;
|
|
137
|
+
private process;
|
|
138
|
+
set(name: string, css: CSSinR, data: CMapper): void;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
type CMapper = Mapper<string, Mapper<string, media | support[]>>;
|
|
142
|
+
declare class Base<T = Record<string, any>> {
|
|
143
|
+
PRE: string;
|
|
144
|
+
EXPORT?: boolean | undefined;
|
|
145
|
+
UNIT?: string | undefined;
|
|
146
|
+
[k: string]: any;
|
|
147
|
+
PS: Proc;
|
|
148
|
+
PREFIX: string;
|
|
149
|
+
ARR: Mapper<string, Set<string>>;
|
|
150
|
+
CID: Mapper<string, string>;
|
|
151
|
+
DATA: CMapper;
|
|
152
|
+
ANIM: Mapper<string, Set<string>>;
|
|
153
|
+
IMPORTED: Base[];
|
|
154
|
+
constructor(PRE?: string, prefix?: string, EXPORT?: boolean | undefined, UNIT?: string | undefined);
|
|
155
|
+
get(target: Base, prop: string, receiver: any): any;
|
|
156
|
+
set(target: any, prop: string, val: any): boolean;
|
|
157
|
+
get css(): T;
|
|
158
|
+
load(css: Base): this;
|
|
159
|
+
}
|
|
160
|
+
declare class FontFace extends Base<obj<fontFace>> {
|
|
161
|
+
constructor(prefix?: string);
|
|
162
|
+
set(target: any, prop: string, val: fontFace): boolean;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare class ps {
|
|
166
|
+
static attr(d: obj<string>): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
167
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
168
|
+
};
|
|
169
|
+
static after(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
170
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
171
|
+
};
|
|
172
|
+
static before(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
173
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
174
|
+
};
|
|
175
|
+
static backdrop(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
176
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
177
|
+
};
|
|
178
|
+
static cue(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
179
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
180
|
+
};
|
|
181
|
+
static cueRegion(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
182
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
183
|
+
};
|
|
184
|
+
static firstLetter(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
185
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
186
|
+
};
|
|
187
|
+
static firstLine(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
188
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
189
|
+
};
|
|
190
|
+
static marker(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
191
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
192
|
+
};
|
|
193
|
+
static part(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
194
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
195
|
+
};
|
|
196
|
+
static placeholder(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
197
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
198
|
+
};
|
|
199
|
+
static selection(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
200
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
201
|
+
};
|
|
202
|
+
static slotted(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
203
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
204
|
+
};
|
|
205
|
+
static spellingError(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
206
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
207
|
+
};
|
|
208
|
+
static targetText(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
209
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
210
|
+
};
|
|
211
|
+
static viewTransition(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
212
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
213
|
+
};
|
|
214
|
+
static viewTransitionGroup(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
215
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
216
|
+
};
|
|
217
|
+
static viewTransitionImagePair(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
218
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
219
|
+
};
|
|
220
|
+
static viewTransitionNew(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
221
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
222
|
+
};
|
|
223
|
+
static viewTransitionOld(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
224
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
225
|
+
};
|
|
226
|
+
static scrollbar(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
227
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
228
|
+
};
|
|
229
|
+
static scrollbarThumb(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
230
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
231
|
+
};
|
|
232
|
+
static scrollbarTrack(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
233
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
234
|
+
};
|
|
235
|
+
static scrollbarCorner(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
236
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
237
|
+
};
|
|
238
|
+
static active(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
239
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
240
|
+
};
|
|
241
|
+
static anyLink(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
242
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
243
|
+
};
|
|
244
|
+
static autofill(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
245
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
246
|
+
};
|
|
247
|
+
static blank(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
248
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
249
|
+
};
|
|
250
|
+
static checked(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
251
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
252
|
+
};
|
|
253
|
+
static current(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
254
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
255
|
+
};
|
|
256
|
+
static default(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
257
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
258
|
+
};
|
|
259
|
+
static defined(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
260
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
261
|
+
};
|
|
262
|
+
static disabled(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
263
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
264
|
+
};
|
|
265
|
+
static empty(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
266
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
267
|
+
};
|
|
268
|
+
static enabled(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
269
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
270
|
+
};
|
|
271
|
+
static first(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
272
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
273
|
+
};
|
|
274
|
+
static firstChild(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
275
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
276
|
+
};
|
|
277
|
+
static firstOfType(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
278
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
279
|
+
};
|
|
280
|
+
static fullscreen(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
281
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
282
|
+
};
|
|
283
|
+
static future(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
284
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
285
|
+
};
|
|
286
|
+
static focus(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
287
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
288
|
+
};
|
|
289
|
+
static focusVisible(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
290
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
291
|
+
};
|
|
292
|
+
static focusWithin(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
293
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
294
|
+
};
|
|
295
|
+
static host(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
296
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
297
|
+
};
|
|
298
|
+
static hover(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
299
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
300
|
+
};
|
|
301
|
+
static indeterminate(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
302
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
303
|
+
};
|
|
304
|
+
static inRange(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
305
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
306
|
+
};
|
|
307
|
+
static invalid(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
308
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
309
|
+
};
|
|
310
|
+
static lastChild(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
311
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
312
|
+
};
|
|
313
|
+
static lastOfType(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
314
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
315
|
+
};
|
|
316
|
+
static left(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
317
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
318
|
+
};
|
|
319
|
+
static link(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
320
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
321
|
+
};
|
|
322
|
+
static localLink(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
323
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
324
|
+
};
|
|
325
|
+
static modal(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
326
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
327
|
+
};
|
|
328
|
+
static onlyChild(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
329
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
330
|
+
};
|
|
331
|
+
static onlyOfType(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
332
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
333
|
+
};
|
|
334
|
+
static optional(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
335
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
336
|
+
};
|
|
337
|
+
static outOfRange(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
338
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
339
|
+
};
|
|
340
|
+
static past(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
341
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
342
|
+
};
|
|
343
|
+
static pictureInPicture(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
344
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
345
|
+
};
|
|
346
|
+
static placeholderShown(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
347
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
348
|
+
};
|
|
349
|
+
static paused(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
350
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
351
|
+
};
|
|
352
|
+
static playing(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
353
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
354
|
+
};
|
|
355
|
+
static readOnly(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
356
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
357
|
+
};
|
|
358
|
+
static readWrite(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
359
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
360
|
+
};
|
|
361
|
+
static required(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
362
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
363
|
+
};
|
|
364
|
+
static right(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
365
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
366
|
+
};
|
|
367
|
+
static root(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
368
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
369
|
+
};
|
|
370
|
+
static scope(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
371
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
372
|
+
};
|
|
373
|
+
static target(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
374
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
375
|
+
};
|
|
376
|
+
static targetWithin(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
377
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
378
|
+
};
|
|
379
|
+
static userInvalid(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
380
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
381
|
+
};
|
|
382
|
+
static valid(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
383
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
384
|
+
};
|
|
385
|
+
static visited(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
386
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
387
|
+
};
|
|
388
|
+
static dir(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
389
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
390
|
+
};
|
|
391
|
+
static has(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
392
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
393
|
+
};
|
|
394
|
+
static host_(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
395
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
396
|
+
};
|
|
397
|
+
static hostContext(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
398
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
399
|
+
};
|
|
400
|
+
static is(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
401
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
402
|
+
};
|
|
403
|
+
static lang(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
404
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
405
|
+
};
|
|
406
|
+
static not(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
407
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
408
|
+
};
|
|
409
|
+
static nthChild(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
410
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
411
|
+
};
|
|
412
|
+
static nthCol(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
413
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
414
|
+
};
|
|
415
|
+
static nthLastChild(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
416
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
417
|
+
};
|
|
418
|
+
static nthLastCol(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
419
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
420
|
+
};
|
|
421
|
+
static nthLastOfType(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
422
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
423
|
+
};
|
|
424
|
+
static nthOfType(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
425
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
426
|
+
};
|
|
427
|
+
static state(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
428
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
429
|
+
};
|
|
430
|
+
static where(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
431
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
432
|
+
};
|
|
433
|
+
static and(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
434
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
435
|
+
};
|
|
436
|
+
static child(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
437
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
438
|
+
};
|
|
439
|
+
static desc(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
440
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
441
|
+
};
|
|
442
|
+
static next(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
443
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
444
|
+
};
|
|
445
|
+
static general(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
446
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
447
|
+
};
|
|
448
|
+
static withClass(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any>)[]) => {
|
|
449
|
+
[x: string]: (_Var | obj<CSSValue> | CSSinR | Medyas<any, Record<string, any>> | support)[];
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
declare class g {
|
|
454
|
+
static minmax(min: CSSValue, max: CSSValue): string;
|
|
455
|
+
static fitContent(len: CSSValue): string;
|
|
456
|
+
static repeat(count: CSSValue, ...tracks: CSSValue[]): string;
|
|
457
|
+
}
|
|
458
|
+
declare class f extends g {
|
|
459
|
+
static attr(name: CSSValue, type?: CSSValue, fallback?: CSSValue): string;
|
|
460
|
+
static blur(blur: CSSValue): string;
|
|
461
|
+
static brightness(brightness: CSSValue): string;
|
|
462
|
+
static calc(...calc: CSSValue[]): string;
|
|
463
|
+
static circle(radius: CSSValue, position?: CSSValue): string;
|
|
464
|
+
static clamp(min: CSSValue, preferred: CSSValue, max: CSSValue): string;
|
|
465
|
+
/**
|
|
466
|
+
*
|
|
467
|
+
* @param colorInterpolation in + srgb, srgb-linear, display-p3, a98-rgb, prophoto-rgb, rec2020, lab, oklab, xyz, xyz-d50, xyz-d65, hsl, hwb, lch, and oklch
|
|
468
|
+
* @param color1 color, mix%
|
|
469
|
+
* @param color2 color, mix%
|
|
470
|
+
*/
|
|
471
|
+
static colorMix(colorInterpolation: CSSValue, color1: CSSValue | CSSValue[], color2: CSSValue | CSSValue[]): string;
|
|
472
|
+
static conicGradient(...sfs: CSSValue[]): string;
|
|
473
|
+
static contrast(contrast: CSSValue): string;
|
|
474
|
+
/**
|
|
475
|
+
* Numeric values. x1 and x2 must be a number from 0 to 1
|
|
476
|
+
*/
|
|
477
|
+
static cubicBezier(x1: CSSValue, y1: CSSValue, x2: CSSValue, y2: CSSValue): string;
|
|
478
|
+
/**
|
|
479
|
+
* @param sfs h-shadow v-shadow blur spread color
|
|
480
|
+
*/
|
|
481
|
+
static dropShadow(...sfs: CSSValue[]): string;
|
|
482
|
+
static grayscale(grayscale: CSSValue): string;
|
|
483
|
+
static hsl(hue: CSSValue, saturation: CSSValue, lightness: CSSValue): string;
|
|
484
|
+
static hsla(hue: CSSValue, saturation: CSSValue, lightness: CSSValue, A?: CSSValue): string;
|
|
485
|
+
static hueRotate(degree: CSSValue): string;
|
|
486
|
+
static inset(...sfs: CSSValue[]): string;
|
|
487
|
+
static invert(percent: CSSValue): string;
|
|
488
|
+
static linearGradient(...sfs: CSSValue[]): string;
|
|
489
|
+
static matrix(scaleX: CSSValue, skewY: CSSValue, skewX: CSSValue, scaleY: CSSValue, translateX: CSSValue, translateY: CSSValue): string;
|
|
490
|
+
static matrix3d(a1: CSSValue[], a2: CSSValue[], a3: CSSValue[], t4: CSSValue[]): string;
|
|
491
|
+
static max(...sfs: CSSValue[]): string;
|
|
492
|
+
static min(...sfs: CSSValue[]): string;
|
|
493
|
+
static opacity(percent: CSSValue): string;
|
|
494
|
+
static path(path: CSSValue): string;
|
|
495
|
+
static clipPath(fillRule: CSSValue, path: CSSValue): string;
|
|
496
|
+
static perspective(value: CSSValue): string;
|
|
497
|
+
static polygon(...lengths: CSSValue[]): string;
|
|
498
|
+
static ray(...sfs: CSSValue[]): string;
|
|
499
|
+
static radialGradient(...sfs: CSSValue[]): string;
|
|
500
|
+
static repeatingConicGradient(...sfs: CSSValue[]): string;
|
|
501
|
+
static repeatingLinearGradient(...sfs: CSSValue[]): string;
|
|
502
|
+
static repeatingRadialGradient(...sfs: CSSValue[]): string;
|
|
503
|
+
static rgb(R: CSSValue, G: CSSValue, B: CSSValue): string;
|
|
504
|
+
static rgba(R: CSSValue, G: CSSValue, B: CSSValue, A?: CSSValue): string;
|
|
505
|
+
static rotate(R: CSSValue): string;
|
|
506
|
+
static rotate3d(x: CSSValue, y: CSSValue, z: CSSValue, angle: CSSValue): string;
|
|
507
|
+
static rotateX(X: CSSValue): string;
|
|
508
|
+
static rotateY(Y: CSSValue): string;
|
|
509
|
+
static rotateZ(Z: CSSValue): string;
|
|
510
|
+
static saturate(...sfs: CSSValue[]): string;
|
|
511
|
+
static scale(sx: CSSValue, sy?: CSSValue): string;
|
|
512
|
+
static scale3d(sx: CSSValue, sy: CSSValue, sz: CSSValue): string;
|
|
513
|
+
static scaleX(X: CSSValue): string;
|
|
514
|
+
static scaleY(Y: CSSValue): string;
|
|
515
|
+
static scaleZ(Z: CSSValue): string;
|
|
516
|
+
static sepia(percent: CSSValue): string;
|
|
517
|
+
static skew(...sfs: CSSValue[]): string;
|
|
518
|
+
static skewX(X: CSSValue): string;
|
|
519
|
+
static skewY(Y: CSSValue): string;
|
|
520
|
+
static steps(n: CSSValue, position: "start" | "end" | "no" | "jump-start" | "jump-end" | "jump-none" | "jump-both"): string;
|
|
521
|
+
/**
|
|
522
|
+
* Translate(X,Y)
|
|
523
|
+
*/
|
|
524
|
+
static translate(...sfs: CSSValue[]): string;
|
|
525
|
+
static translate3d(...sfs: CSSValue[]): string;
|
|
526
|
+
static translateX(X: CSSValue): string;
|
|
527
|
+
static translateY(Y: CSSValue): string;
|
|
528
|
+
static translateZ(...sfs: CSSValue[]): string;
|
|
529
|
+
static url(url: CSSValue): string;
|
|
530
|
+
static var(st: string, opt?: CSSValue): string;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
declare const v: {
|
|
534
|
+
important: string;
|
|
535
|
+
visible: string;
|
|
536
|
+
hidden: string;
|
|
537
|
+
auto: string;
|
|
538
|
+
none: string;
|
|
539
|
+
clip: string;
|
|
540
|
+
scroll: string;
|
|
541
|
+
initial: string;
|
|
542
|
+
inherit: string;
|
|
543
|
+
flex: string;
|
|
544
|
+
center: string;
|
|
545
|
+
flex_start: string;
|
|
546
|
+
flex_end: string;
|
|
547
|
+
space_evenly: string;
|
|
548
|
+
stretch: string;
|
|
549
|
+
wrap: string;
|
|
550
|
+
column: string;
|
|
551
|
+
column_reverse: string;
|
|
552
|
+
row: string;
|
|
553
|
+
row_reverse: string;
|
|
554
|
+
space_between: string;
|
|
555
|
+
space_around: string;
|
|
556
|
+
pr100: string;
|
|
557
|
+
pr50: string;
|
|
558
|
+
i100vh: string;
|
|
559
|
+
i100vw: string;
|
|
560
|
+
block: string;
|
|
561
|
+
sticky: string;
|
|
562
|
+
fixed: string;
|
|
563
|
+
absolute: string;
|
|
564
|
+
relative: string;
|
|
565
|
+
pointer: string;
|
|
566
|
+
grabbing: string;
|
|
567
|
+
checkbox: string;
|
|
568
|
+
solid: string;
|
|
569
|
+
inset: string;
|
|
570
|
+
bold: string;
|
|
571
|
+
currentColor: string;
|
|
572
|
+
forwards: string;
|
|
573
|
+
text: string;
|
|
574
|
+
norepeat: string;
|
|
575
|
+
nowrap: string;
|
|
576
|
+
difference: string;
|
|
577
|
+
preserve3d: string;
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
interface saveCSS {
|
|
581
|
+
dir?: string | string[];
|
|
582
|
+
mapDir?: string;
|
|
583
|
+
mapName?: string;
|
|
584
|
+
minify?: boolean;
|
|
585
|
+
shaker?: string[];
|
|
586
|
+
include?: string[];
|
|
587
|
+
includeAnimation?: string[];
|
|
588
|
+
}
|
|
589
|
+
interface shweetCFG {
|
|
590
|
+
__filename: string;
|
|
591
|
+
name?: string;
|
|
592
|
+
prefix?: string;
|
|
593
|
+
Shweet?: Shweet | Shweet[];
|
|
594
|
+
exportMap?: boolean;
|
|
595
|
+
webkitKeyframes?: boolean;
|
|
596
|
+
unit?: "rem" | "em" | "px" | "pt" | "pc";
|
|
597
|
+
}
|
|
598
|
+
declare class Shweet {
|
|
599
|
+
[k: string]: any;
|
|
600
|
+
path: string;
|
|
601
|
+
name: string;
|
|
602
|
+
prefix: string;
|
|
603
|
+
exportMap?: boolean;
|
|
604
|
+
protected _imported: Set<string>;
|
|
605
|
+
d: CSS;
|
|
606
|
+
i: CSS;
|
|
607
|
+
c: CSS;
|
|
608
|
+
kf: KFCSS;
|
|
609
|
+
at: {
|
|
610
|
+
import: atCSS;
|
|
611
|
+
charset: atCSS;
|
|
612
|
+
};
|
|
613
|
+
font: FontFace["css"];
|
|
614
|
+
shweet: this;
|
|
615
|
+
save: ({}: saveCSS) => this;
|
|
616
|
+
constructor({ __filename, name, prefix, Shweet: Sheese, exportMap, webkitKeyframes, unit, }: shweetCFG);
|
|
617
|
+
get imported(): string[];
|
|
618
|
+
}
|
|
619
|
+
declare function fileName(path: string): string;
|
|
620
|
+
|
|
621
|
+
export { type CSS, type CSSValue, type CSSinR, type KFCSS, Shweet, Var, type VarType, type atCSS, f, fileName, type fontFace, log, med, media, ps, supports, v };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var a=(n)=>typeof n==="function";var m=(n)=>{return!isNaN(parseFloat(n))&&isFinite(n)};var Sn=(n)=>{return n.startsWith(".")||n.startsWith("#")};var t=(n)=>typeof n==="string",Z=(n)=>Array.isArray(n),l=(n)=>typeof n==="object",qn=(n)=>typeof n==="number",e=(n)=>n===null;var Gn=(n)=>typeof n==="undefined",K=(n)=>typeof n!=="undefined";var nn=(n)=>{return Z(n)?n:[n]};class y{static set i(n){console.info(...nn(n))}static set e(n){console.error(...nn(n))}static set w(n){console.info(...nn(n))}}var v=(n)=>JSON.stringify(n),Cn=(n)=>{return JSON.parse(n)},w=(n)=>{if(n.startsWith("webkit"))n="-"+n;return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()};class L extends Map{obj(n){n&&q(n).forEach(([C,$])=>this.set(C,$))}map(n){n.forEach((C,$)=>{if(C instanceof L)this.set($,C);else if(Z(C)){if(this.lacks($))this.set($,[]);this.get($).push(...C)}else if(l(C))this.ass($,C);else this.set($,C)})}ass(n,C){if(!this.has(n))this.set(n,{});I(this.get(n),C)}lacks(n){return!this.has(n)}init(n,C){return this.has(n)?this.get(n):this.set(n,C).get(n)}}var{values:A,keys:V,entries:q}=Object;var I=Object.assign;var Un=(n)=>{return Object.keys(n).length};var gn={xs:"480px",sm:"480px",smd:"624px",md:"768px",lg:"1024px",xl:"1280px",xxl:"1536px"};class D{static default="xs";static prop=q(gn).reduce((n,[C,$],T)=>{return n[C]=`(${T==0?"max-width":"min-width"}: ${$})`,n},{});static extra={no_hover:"(pointer: coarse)",print:"print",screen:"screen",dark:"(prefers-color-scheme: dark)"};constructor(n,C={}){let $=D.default,T={};if(n!==void 0)i(T,$,n,$);q(C).forEach(([J,E])=>{i(T,J,E,$)}),I(this,T)}static get breakpoints(){return Cn(v(gn))}}var i=(n,C,$,T)=>{if($!==void 0)if($ instanceof D)q($).forEach(([J,E])=>{if(T!==C)if(C!==J)if(T===J)i(n,C,E,T);else i(n,`${C}-${J}`,E,T);else i(n,J,E,T);else i(n,J,E,T)});else n[C]=$};function X(n,C){if(C)return new D(n,C);return new D(void 0,n)}function jn(n){if(this._prefix)return X({[this._prefix]:n});else return X({xs:n})}function B(n){return new this.constructor({prefix:n,values:this._values,data:this.data})}class $n{_prefix;data;_values;constructor({prefix:n,data:C,values:$}={data:{},values:{}}){this._prefix=n,this._values=$,q($).forEach(([T,J])=>{if(!this._values[T])this._values[T]=X({});I(this._values[T],J)}),this.data=C}get XS(){return B.call(this,"xs")}get SM(){return B.call(this,"sm")}get SMD(){return B.call(this,"smd")}get MD(){return B.call(this,"md")}get LG(){return B.call(this,"lg")}get XL(){return B.call(this,"xl")}get XXL(){return B.call(this,"xxl")}get NO_HOVER(){return B.call(this,"no_hover")}get PRINT(){return B.call(this,"print")}get SCREEN(){return B.call(this,"screen")}get DARK(){return B.call(this,"dark")}set _value(n){q(n).forEach(([C,$])=>{if(!this._values[C])this._values[C]=X({});I(this._values[C],jn.call(this,$))})}get _value(){return this._values}}class Y{k="";fallback;var="";value;constructor(n={},C){if(Un(n)){let[$,T]=q(n)[0];this.k=$,this.var="--"+w($),this.value=T instanceof D?T:X(T,{}),this.fallback=C}else this.value=X({})}__(n){if(n)this.fallback=n;let C=this.fallback;if(C)return`var(${this.var}, ${Q(C)})`;else return`var(${this.var})`}new(n,C){return new Y({[this.k]:n instanceof D?n:Q(n)},C)}}var Mn=(n,C)=>{return new Y(n,C)};var Q=(n,C={unit:"rem"})=>{let{rem:$,second:T,quote:J,degree:E,percent:G,delimeter:U,unit:R,delimeter_arr:W}=C;if(Gn(n)||e(n)||n==="")return"";let g=Z(n)?n:[n];if(!g.length)return"";return g.filter((S)=>K(S)).map((S)=>{if(Z(S))return U=W||", ",Q(S,{...C,delimeter:" "});if(S instanceof Y)return S.__();if(a(S))return Q(S(),C);if(J)S=String(S);if(qn(S))if($)return`${S}${R?R:"rem"}`;else if(E)return`${S}deg`;else if(G)return`${S}%`;else if(T)return`${S}s`;else return String(S);if(t(S))if(S.includes("("))return S;else if(J)return`'${S}'`;else return S;return""}).filter((S)=>K(S)&&S!=="").join(U||" ")};var Hn=new Set(["transitionDuration","transitionDelay","animationDelay","animationDuration"]),Kn=new Set([...Hn,"zIndex","opacity","aspectRatio","order","flexShrink","flexGrow","flex","fillOpacity","lineClamp","order","scale","webkitLineClamp","animationIterationCount","animationTimingFunction","transitionTimingFunction","columnCount","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd"]),In=new Set(["content"]),hn=new Set(["transitionProperty"]),z=(n,C,$="rem")=>{let T=Q(C,{rem:!Kn.has(n),second:Hn.has(n),quote:In.has(n),delimeter:hn.has(n)?", ":" ",unit:$});return`${w(n)}: ${T};`};class x{value;__;constructor(n){if(this.value=new L,t(n))this.value.set(n,[]);else q(n).forEach(([C,$])=>{this.value.set(`${C}:${$}`,[])});this.__=(...C)=>{return this.value.forEach(($)=>{$.push(...C)}),this}}}function wn(n){return new x(n).__}var _=(n)=>{if(n instanceof D)return n;if(n instanceof Y)return X(n.__(),{});return X(n,{})},tn=(n)=>{n.value.forEach((C,$)=>{n.value.set($,C.map((T)=>{let J={};return q(T).forEach(([E,G])=>{if(K(G))J[E]=_(G)}),J}))})},Tn=(n,C=[])=>{let $=[];if(Z(n))return Tn(n[0],$);if(n instanceof Y)return Tn(A(n.value),$);return $.push(String(n)),$};class fn{base;constructor(n){this.base=n}props(n,C,$){let T=["animation","animationName"].includes(C);return q($).forEach(([J,E])=>{if(T)$[J]=this.addPrefixToAnimation(n,E);else $[J]=E}),$}addPrefixToAnimation(n,C){if(C instanceof Y)this.saveAnim(n,C);else if(Z(C))return C[0]=this.addPrefixToAnimation(n,C[0]),C;else if(t(C)&&!C.includes("("))return C.split(", ").map((J)=>{let E=J.split(" "),G=E[0],U=E.slice(1).join(" "),R=`${this.base.PREFIX}${G}`;return this.base.ANIM.init(R,new Set).add(n),`${this.base.PREFIX}${G} ${U}`.trim()}).join(", ");return C}saveAnim(n,C){Tn(C).forEach(($)=>{this.base.ANIM.init(`${this.base.PREFIX}${$}`,new Set).add(n)})}process(n,C,$,T,J){if($ instanceof Y)this.saveAnim(n,$),T.ass($.var,this.props(n,$.var,_($.value)));else if(C.startsWith(":")||C.startsWith(",")){if(C.startsWith("::before")||C.startsWith("::after")){if(Z($)){if(!$.some((G)=>("content"in G)))$.push({content:""})}}this.set(n+C,$,J)}else if(C.startsWith(" ")){let G=C.match(/^.*?\w/gm)?.[0].slice(0,-1),U=C.replaceAll(/, /gm,`, ${n}${G}`);this.set(n+U,$,J)}else if(Sn(C))this.set(n+C,$,J);else T.set(C,this.props(n,C,_($)))}set(n,C,$){if(!l(C))return;let T=new L;if(C instanceof Y)this.saveAnim(n,C),T.ass(C.var,this.props(n,C.var,_(C.value)));else if(C instanceof $n)q(C._value).forEach(([J,E])=>{if(K(E))T.set(J,this.props(n,J,_(E)))});else if(C instanceof x)tn(C),T.init("supports",[]).push(C);else if(Z(C))C.forEach((J)=>{this.set(n,J,$)});else q(C).forEach(([J,E])=>{return this.process(n,J,E,T,$)});T.forEach((J,E)=>{if(E==="supports")$.init(n,new L).init(E,[])?.push(...J);else $.init(n,new L).set(E,J)})}}class d{PRE;EXPORT;UNIT;PS;PREFIX;ARR=new L;CID=new L;DATA=new L;ANIM=new L;IMPORTED=[];constructor(n="",C="",$,T){this.PRE=n;this.EXPORT=$;this.UNIT=T;this.PREFIX=C?C+"_":C,this.PS=new fn(this)}get(n,C,$){let T=n.PRE+C;if(n.DATA.has(T))return T;else if(C in n)return n[C];else return n.PRE+C}set(n,C,$){return!1}get css(){return new Proxy(this,this)}load(n){return this.IMPORTED.push(n),this}}class P extends d{set(n,C,$){let T=n.PRE+C;return n.PS.set(T,$,n.DATA),!0}}class c extends d{webkit;constructor(n="",C=!0,$){super("",n,!1,$);this.webkit=C}set(n,C,$){let T=n.PREFIX+C,J=Z($)?$:[$],E=new L;if(J.forEach((G)=>{q(G).forEach(([U,R])=>{let W=m(U)?`${U}%`:U;n.PS.set(W,R,E)})}),n.ANIM.init(T,new Set),n.DATA.set(`@keyframes ${T}`,E),this.webkit)n.DATA.set(`@-webkit-keyframes ${T}`,E);return!0}}class r extends d{constructor(n=""){super("@",n)}set(n,C,$){return n.ARR.init(n.PRE+C,new Set).add($),n}}class k extends d{constructor(n=""){super("@font-face",n);this.ARR.set(this.PRE,new Set)}set(n,C,$){let T=q({fontFamily:C,...$}).map(([J,E])=>{return z(J,E,this.UNIT)});return n.ARR.get(n.PRE)?.add(T.join(`
|
|
3
|
+
`)),!0}}var Wn=Array.from;class Qn{shweet;shaker;include;CID=new L;css="";constructor(n,C=[],$=[]){this.shweet=n;this.shaker=C;this.include=$}load(n,C="rem"){let $=D.default,T=D.prop;I(T,D.extra);let J=new L,E={},G={},U={},R=new Set,W={},g={};V(T).forEach((S)=>{W[S]={}});for(let S of A(this.shweet))if(S instanceof P){if(!S.DATA.size)continue;this.ClassID(S,E,G,n),S.ANIM.forEach((b,H)=>{b.forEach((F)=>{J.init(H,new Set).add(F)})})}else if(S instanceof c)this.KF(S,U,J);else if(S instanceof r)this.AT(S,R);else if(S instanceof k)this.FONT(S,R);return q(E).forEach(([S,b])=>{if(!W[S])W[S]={};q(b).forEach(([H,F])=>{let N=F.join(", ");if(!W[S][N])W[S][N]=[];W[S][N].push(H)})}),q(G).forEach(([S,b])=>{q(b).forEach(([H,F])=>{if(!g[H])g[H]={};q(F).forEach(([N,O])=>{let j=`@supports (${S})`;if(!g[H][j])g[H][j]={};let M=O.join(", ");if(!g[H][j][M])g[H][j][M]=new Set;g[H][j][M].add(N)})})}),q(W).forEach(([S,b])=>{let H=[],F=[];if(q(b).forEach(([N,O])=>{if(O.some((M)=>{return M.startsWith("animation")||M.startsWith("transition")}))F.push(o(N,O));else H.push(o(N,O))}),F.length)H.unshift(...F);if(U[S])q(U[S]).forEach(([N,O])=>{H.push(o(N,O))});if(g[S])q(g[S]).forEach(([N,O])=>{let j=q(O).map(([M,h])=>{return o(M,[...h])});H.push(o(N,j))});if(H.length)if(R.add(`/* -------------- ${S+(S===$?" ( default )":"")} */`),S===$)R.add(H.join(`
|
|
4
|
+
`));else{let N=S.split("-").map((O)=>T[O]).join(" and ");R.add(`@media ${N} {
|
|
5
|
+
${H.join(`
|
|
6
|
+
`)}
|
|
7
|
+
}`)}}),this.css=[...R].join(`
|
|
8
|
+
`),this}ClassID(n,C,$,T){let J=(E,G,U,R,W)=>{q(G).forEach(([g,S])=>{this.push(W,U,g,R,z(E,S,n.UNIT))})};n.DATA.forEach((E,G)=>{let U=Pn(G,n.PREFIX),R=this.getCID(G,n.PREFIX,T);E.forEach((W,g)=>{if(g==="supports"){if(Z(W))W.forEach((S)=>{S.value.forEach((b,H)=>{if(!(H in $))$[H]={};b.forEach((F)=>{q(F).forEach(([N,O])=>{J(N,O,U,R,$[H])})})})})}else J(g,W,U,R,C)})}),n.IMPORTED.forEach((E)=>{this.ClassID(E,C,$,E.EXPORT)})}KF(n,C,$){let T=(J,E,G)=>{Zn(C,J,E),C[J][E].push(G)};n.DATA.forEach((J,E)=>{J.forEach((G,U)=>{let R={};G.forEach((W,g)=>{if(g==="supports")y.e=["@supports not supported in @keyframes",{error:"support in keyframes"}];else q(W).forEach(([S,b])=>{if(this.shaker.length){let H=E.split(" ")[1];if($.has(H)){if([...$.get(H)].some((O)=>{return this.getCID(O,"",!1,!1)})){if(!(S in R))R[S]=[];R[S].push(z(g,b,n.UNIT))}}}else{if(!(S in R))R[S]=[];R[S].push(z(g,b,n.UNIT))}})}),q(R).forEach(([W,g])=>{T(W,E,o(U,g))})})}),n.IMPORTED.forEach((J)=>{this.KF(J,C,$)})}AT(n,C){for(let[$,T]of n.ARR)T.forEach((J)=>{let E=J.includes("(")?J:`"${J}"`;C.add(`${$} ${E.trim()};`)});n.IMPORTED.forEach(($)=>{this.AT($,C)})}FONT(n,C){(n.ARR.get("@font-face")??new Set).forEach((J)=>{C.add(`@font-face {
|
|
9
|
+
${J}
|
|
10
|
+
}`)}),n.IMPORTED.forEach((J)=>{this.FONT(J,C)})}getCID(n,C,$,T=!0){let J=/\.(?![0-9])([a-zA-Z0-9_-]+)(?![^{]*})/g,E=/#(?![0-9])([a-zA-Z0-9_-]+)(?![^{]*})/g,G=/\b([a-zA-Z][a-zA-Z0-9]*)\b(?![^{}]*})/g,U=[...new Set(Jn(n,J)),...new Set(Jn(n,E))];if(T&&K($)&&$)U.forEach((R)=>{this.CID.init(R.replaceAll("-","_"),new Set).add(C+R)});return U.push(...new Set(Jn(n,G))),U.some((R)=>this.shaker.includes(R)||this.include.includes(R))}push(n,C,$,T,J){if(!(this.shaker.length&&C.startsWith(".")||C.startsWith("#"))||T)Zn(n,$,J),An(n,$,J,C)}}var o=(n,C)=>{return`${n} {
|
|
11
|
+
${C.join(`
|
|
12
|
+
`)}
|
|
13
|
+
}`},Jn=(n,C)=>{return Wn(n.matchAll(C),($)=>$[1])},Zn=(n,C,$)=>{try{if(!n[C])n[C]={},n[C][$]=[];if(!n[C][$])n[C][$]=[]}catch(T){y.e=[`property "${C}" not found!`,{error:"@ensurePropsInitialized"}]}},An=(n,C,$,T)=>{if(!n[C])n[C]={[$]:T.split(",").map((J)=>J.trim())};else n[C][$].push(...T.split(",").map((J)=>J.trim()))},Pn=(n,C)=>{if(C)return n.replaceAll(/\.|\#/g,($)=>$+C);return n};import{mkdirSync as Vn,writeFileSync as zn,existsSync as Ln}from"fs";var p=(n,C="")=>{if(Ln(n))return!0;return zn(n,C,{flag:"wx"}),!0},s=(n)=>{if(Ln(n))return!0;return Vn(n,{recursive:!0}),!0};import{writeFileSync as bn}from"fs";function f(n){return function(...C){return{[n]:C}}}class Nn{static attr(n){let[C,$]=q(n)[0];return f(`[${C}="${$}"]`)}static after(n=""){return f("::after"+n)}static before(n=""){return f("::before"+n)}static backdrop(n=""){return f("::backdrop"+n)}static cue(n=""){return f("::cue"+n)}static cueRegion(n=""){return f("::cue-region"+n)}static firstLetter(n=""){return f("::first-letter"+n)}static firstLine(n=""){return f("::first-line"+n)}static marker(n=""){return f("::marker"+n)}static part(n=""){return f("::part"+n)}static placeholder(n=""){return f("::placeholder"+n)}static selection(n=""){return f("::selection"+n)}static slotted(n=""){return f("::slotted"+n)}static spellingError(n=""){return f("::spelling-error"+n)}static targetText(n=""){return f("::target-text"+n)}static viewTransition(n=""){return f("::view-transition"+n)}static viewTransitionGroup(n=""){return f("::view-transition-group"+n)}static viewTransitionImagePair(n=""){return f("::view-transition-image-pair"+n)}static viewTransitionNew(n=""){return f("::view-transition-new"+n)}static viewTransitionOld(n=""){return f("::view-transition-old"+n)}static scrollbar(n=""){return f("::-webkit-scrollbar"+n)}static scrollbarThumb(n=""){return f("::-webkit-scrollbar-thumb"+n)}static scrollbarTrack(n=""){return f("::-webkit-scrollbar-track"+n)}static scrollbarCorner(n=""){return f("::-webkit-scrollbar-corner"+n)}static active(n=""){return f(":active"+n)}static anyLink(n=""){return f(":any-link"+n)}static autofill(n=""){return f(":autofill"+n)}static blank(n=""){return f(":blank"+n)}static checked(n=""){return f(":checked"+n)}static current(n=""){return f(":current"+n)}static default(n=""){return f(":default"+n)}static defined(n=""){return f(":defined"+n)}static disabled(n=""){return f(":disabled"+n)}static empty(n=""){return f(":empty"+n)}static enabled(n=""){return f(":enabled"+n)}static first(n=""){return f(":first"+n)}static firstChild(n=""){return f(":first-child"+n)}static firstOfType(n=""){return f(":first-of-type"+n)}static fullscreen(n=""){return f(":fullscreen"+n)}static future(n=""){return f(":future"+n)}static focus(n=""){return f(":focus"+n)}static focusVisible(n=""){return f(":focus-visible"+n)}static focusWithin(n=""){return f(":focus-within"+n)}static host(n=""){return f(":host"+n)}static hover(n=""){return f(":hover"+n)}static indeterminate(n=""){return f(":indeterminate"+n)}static inRange(n=""){return f(":in-range"+n)}static invalid(n=""){return f(":invalid"+n)}static lastChild(n=""){return f(":last-child"+n)}static lastOfType(n=""){return f(":last-of-type"+n)}static left(n=""){return f(":left"+n)}static link(n=""){return f(":link"+n)}static localLink(n=""){return f(":local-link"+n)}static modal(n=""){return f(":modal"+n)}static onlyChild(n=""){return f(":only-child"+n)}static onlyOfType(n=""){return f(":only-of-type"+n)}static optional(n=""){return f(":optional"+n)}static outOfRange(n=""){return f(":out-of-range"+n)}static past(n=""){return f(":past"+n)}static pictureInPicture(n=""){return f(":picture-in-picture"+n)}static placeholderShown(n=""){return f(":placeholder-shown"+n)}static paused(n=""){return f(":paused"+n)}static playing(n=""){return f(":playing"+n)}static readOnly(n=""){return f(":read-only"+n)}static readWrite(n=""){return f(":read-write"+n)}static required(n=""){return f(":required"+n)}static right(n=""){return f(":right"+n)}static root(n=""){return f(":root"+n)}static scope(n=""){return f(":scope"+n)}static target(n=""){return f(":target"+n)}static targetWithin(n=""){return f(":target-within"+n)}static userInvalid(n=""){return f(":user-invalid"+n)}static valid(n=""){return f(":valid"+n)}static visited(n=""){return f(":visited"+n)}static dir(n){return f(`:dir(${n})`)}static has(n){return f(`:has(${n})`)}static host_(n){return f(`:host(${n})`)}static hostContext(n){return f(`:host-context(${n})`)}static is(n){return f(`:is(${n})`)}static lang(n){return f(`:lang(${n})`)}static not(n){return f(`:not(${n})`)}static nthChild(n){return f(`:nth-child(${n})`)}static nthCol(n){return f(`:nth-col(${n})`)}static nthLastChild(n){return f(`:nth-last-child(${n})`)}static nthLastCol(n){return f(`:nth-last-col(${n})`)}static nthLastOfType(n){return f(`:nth-last-of-type(${n})`)}static nthOfType(n){return f(`:nth-of-type(${n})`)}static state(n){return f(`:state(${n})`)}static where(n){return f(`:where(${n})`)}static and(n){return f(", "+n)}static child(n){return f(" > "+n)}static desc(n){return f(" "+n)}static next(n){return f(" + "+n)}static general(n){return f(" ~ "+n)}static withClass(n){if(!n.startsWith("."))throw Error("should start with . or # - class / id");return f(n)}}class On{static minmax(n,C){return`minmax(${Q([n,C],{rem:!0,delimeter:", "})})`}static fitContent(n){return`fit-content(${Q([n],{rem:!0})})`}static repeat(n,...C){return`repeat(${Q([n,Q([C],{rem:!0})],{delimeter:", "})})`}}class Dn extends On{static attr(n,C,$){return`attr(${Q([n,C,$])})`}static blur(n){return`blur(${Q([n],{rem:!0})})`}static brightness(n){return`brightness(${Q([n])})`}static calc(...n){return`calc(${Q(n,{rem:!0})})`}static circle(n,C){return`circle(${Q([n,C],{rem:!0})})`}static clamp(n,C,$){return`clamp(${Q([n,C,$],{rem:!0,delimeter:", "})})`}static colorMix(n,C,$){return`color-mix(${Q([n,Q(Z(C)?C:[C]),Q(Z($)?$:[$])],{delimeter:", "})})`}static conicGradient(...n){return`conic-gradient(${Q(n,{delimeter:", "})})`}static contrast(n){return`contrast(${Q([n])})`}static cubicBezier(n,C,$,T){return`cubic-bezier(${Q([n,C,$,T],{delimeter:", "})})`}static dropShadow(...n){return`drop-shadow(${Q(n,{rem:!0})})`}static grayscale(n){return`grayscale(${Q([n])})`}static hsl(n,C,$){return`hsl(${Q([n,C,$])})`}static hsla(n,C,$,T){return`hsl(${Q([n,C,$,T?["/",T]:T])})`}static hueRotate(n){return`hue-rotate(${Q([n],{degree:!0})})`}static inset(...n){return`inset(${Q(n,{rem:!0})})`}static invert(n){return`invert(${Q([n])})`}static linearGradient(...n){return`linear-gradient(${Q(n,{delimeter:", "})})`}static matrix(n,C,$,T,J,E){return`matrix(${Q([n,C,$,T,J,E],{delimeter:", "})})`}static matrix3d(n,C,$,T){return`matrix3d(${Q([n,C,$,T],{delimeter:", "})})`}static max(...n){return`max(${Q(n,{rem:!0,delimeter:", "})})`}static min(...n){return`min(${Q(n,{rem:!0,delimeter:", "})})`}static opacity(n){return`opacity(${Q([n])})`}static path(n){return`path(${Q([n],{quote:!0})})`}static clipPath(n,C){return`path(${Q([n,Q([C],{quote:!0})],{delimeter:", "})})`}static perspective(n){return`perspective(${Q([n])})`}static polygon(...n){return`polygon(${Q(n,{percent:!0,delimeter:", "})})`}static ray(...n){return`ray(${Q(n,{degree:!0})})`}static radialGradient(...n){return`radial-gradient(${Q(n,{delimeter_arr:", ",percent:!0,delimeter:", "})})`}static repeatingConicGradient(...n){return`repeating-conic-gradient(${Q(n,{degree:!0,delimeter:", "})})`}static repeatingLinearGradient(...n){return`repeating-linear-gradient(${Q(n,{degree:!0,delimeter:", "})})`}static repeatingRadialGradient(...n){return`repeating-radial-gradient(${Q(n,{degree:!0,delimeter:", "})})`}static rgb(n,C,$){return`rgb(${Q([n,C,$])})`}static rgba(n,C,$,T){return`rgba(${Q([n,C,$,T?["/",T]:void 0],{delimeter_arr:" "})})`}static rotate(n){return`rotate(${Q([n],{degree:!0})})`}static rotate3d(n,C,$,T){return`rotate3d(${Q([Q([n,C,$],{delimeter:", "}),T],{degree:!0,delimeter:", "})})`}static rotateX(n){return`rotateX(${Q([n],{degree:!0})})`}static rotateY(n){return`rotateY(${Q([n],{degree:!0})})`}static rotateZ(n){return`rotateZ(${Q([n],{degree:!0})})`}static saturate(...n){return`saturate(${Q(n)})`}static scale(n,C){return`scale(${Q([n,C],{delimeter:", "})})`}static scale3d(n,C,$){return`scale3d(${Q([n,C,$],{delimeter:", "})})`}static scaleX(n){return`scaleX(${Q([n])})`}static scaleY(n){return`scaleY(${Q([n])})`}static scaleZ(n){return`scaleZ(${Q([n])})`}static sepia(n){return`sepia(${Q([n])})`}static skew(...n){return`skew(${Q(n,{degree:!0,delimeter:", "})})`}static skewX(n){return`skewX(${Q([n],{degree:!0})})`}static skewY(n){return`skewY(${Q([n],{degree:!0})})`}static steps(n,C){return`steps(${Q([n,C],{delimeter:", "})})`}static translate(...n){return`translate(${Q(n,{rem:!0,delimeter:", "})})`}static translate3d(...n){return`translate3d(${Q(n,{rem:!0,delimeter:", "})})`}static translateX(n){return`translateX(${Q([n],{rem:!0})})`}static translateY(n){return`translateY(${Q([n],{rem:!0})})`}static translateZ(...n){return`translateZ(${Q(n,{rem:!0,delimeter:", "})})`}static url(n){return`url(${Q([n],{quote:!0})})`}static var(n,C=""){n="--"+w(n);let $=C?", "+Q([C],{rem:!0,delimeter:", "}):"";return`var(${Q([n],{rem:!0})}${$})`}}var on={important:" !important",visible:"visible",hidden:"hidden",auto:"auto",none:"none",clip:"clip",scroll:"scroll",initial:"initial",inherit:"inherit",flex:"flex",center:"center",flex_start:"flex-start",flex_end:"flex-end",space_evenly:"space-evenly",stretch:"stretch",wrap:"wrap",column:"column",column_reverse:"column-reverse",row:"row",row_reverse:"row-reverse",space_between:"space-between",space_around:"space-around",pr100:"100%",pr50:"50%",i100vh:"100vh",i100vw:"100vw",block:"block",sticky:"sticky",fixed:"fixed",absolute:"absolute",relative:"relative",pointer:"pointer",grabbing:"grabbing",checkbox:"checkbox",solid:"solid",inset:"inset",bold:"bold",currentColor:"currentColor",forwards:"forwards",text:"text",norepeat:"no-repeat",nowrap:"nowrap",difference:"difference",preserve3d:"preserve-3d"};class un{path;name;prefix;exportMap;_imported=new Set;save;constructor({__filename:n,name:C,prefix:$,Shweet:T=[],exportMap:J,webkitKeyframes:E,unit:G="rem"}){this.path=n,this.name=C||cn(n),this.prefix=$??"",this.exportMap=J;let U=Z(T)?T:[T];dn.call(this,this.prefix,U,E,J,G);let R=this;Object.assign(this,{get shweet(){return R}}),this.save=({dir:W,mapDir:g,mapName:S="index",minify:b=!0,shaker:H=[],include:F=[]})=>{let N=K(J)?J:!!g,O=new Qn(this,H,F).load(N),j=Z(W)?W:[W],M=b?yn(O.css):O.css;if(j.forEach((h)=>{if(!h)return;let u=h.endsWith("/")?"":"/",En=h+u+this.name+".css";s(h+u),p(En),bn(En,M||"/* --------------*/")}),g){let h=g.endsWith("/")?"":"/",u=g+h+S+".js";s(g+h),p(u),_n(u,O.CID)}return this}}get imported(){return[...this._imported]}}var yn=(n)=>{return n.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s*([{}:;,])\s*/g,"$1").trim()},_n=(n,C)=>{let $={};C.forEach((J)=>{q(J).forEach(([E,G])=>{if(!$[E])$[E]=[G];else $[E].push(G)})});let T=[...C.entries()].map(([J,E])=>{return`${J}="${[...E].join(" ")}"`}).sort((J,E)=>J.localeCompare(E,void 0,{numeric:!0}));bn(n,T.length?`export const ${T.join()};`:"export {}");return};function dn(n,C,$=!1,T,J){let E={d:new P("",n,T,J),i:new P("#",n,T,J),c:new P(".",n,T,J),kf:new c(n,$,J),at:new r,font:new k};C.forEach((G)=>{this._imported.add(G.path),G._imported.forEach((U)=>{this._imported.add(U)}),V(E).forEach((U)=>{E[U].load(G[U])})}),V(E).forEach((G)=>{E[G]=E[G].css}),I(this,E)}function cn(n){return n.split("/").slice(-1)[0].split(".")[0]}export{on as v,wn as supports,Nn as ps,D as media,X as med,y as log,cn as fileName,Dn as f,Mn as Var,un as Shweet};
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "shweet",
|
|
3
|
+
"version": "0.0.10",
|
|
4
|
+
"description": "CSS in TS",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"util": "cp -r ../misc/util ./",
|
|
12
|
+
"dirs": "for dir in ./src ./dist ./test ./util ./types; do mkdir -p $dir; done",
|
|
13
|
+
"@": "ln -sf ../../misc/@/ ./src",
|
|
14
|
+
"ts": "ln -sf ../misc/tsconfig.json ./;",
|
|
15
|
+
"init": "bun run dirs && bun run util && bun run @ && bun run ts;",
|
|
16
|
+
"build": "rm -r ./types ; tsc && bun build ./src/index.ts --outdir ./dist --minify --packages external --target bun && rollup -c ./util/rollup.config.js"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"css",
|
|
20
|
+
"ts"
|
|
21
|
+
],
|
|
22
|
+
"author": "MARKjotep",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/MARKjotep/sweetss.git"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/MARKjotep/sweetss/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/MARKjotep/sweetss#readme",
|
|
32
|
+
"type": "module",
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "latest",
|
|
35
|
+
"@types/bun": "latest",
|
|
36
|
+
"rollup-plugin-dts": "^6.1.1"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"typescript": "^5.8.2"
|
|
40
|
+
}
|
|
41
|
+
}
|