shweet 0.0.34 → 0.0.36
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 +994 -1
- package/dist/index.d.ts +340 -386
- package/dist/index.js +11 -11
- package/package.json +8 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,155 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
type obj<T> = Record<string, T>;
|
|
3
|
-
|
|
4
|
-
type ModuleLike = {
|
|
5
|
-
[Symbol.toStringTag]: "Module";
|
|
6
|
-
default?: unknown;
|
|
7
|
-
[key: string]: unknown;
|
|
8
|
-
};
|
|
9
|
-
declare const isFN: (v: any) => v is Function;
|
|
10
|
-
declare const isAsync: (v: any) => v is Function;
|
|
11
|
-
declare const isPromise: (v: any) => v is Function;
|
|
12
|
-
declare const isNumber: (value: any) => boolean;
|
|
13
|
-
declare const isObject: (val: any) => val is Record<string, any>;
|
|
14
|
-
declare const isPlainObject: (value: any) => boolean;
|
|
15
|
-
declare const isModule: (obj: any) => obj is ModuleLike;
|
|
16
|
-
declare const isArraybuff: (val: any) => val is string | ArrayBuffer | Uint8Array<ArrayBufferLike>;
|
|
17
|
-
declare const isClassOrId: (k: string) => boolean;
|
|
18
|
-
declare const isBool: (v: any) => v is boolean;
|
|
19
|
-
declare const isStr: (v: any) => v is string;
|
|
20
|
-
declare const isArr: (v: any) => v is any[];
|
|
21
|
-
declare const isObj: (v: any) => v is object;
|
|
22
|
-
declare const isNum: (v: any) => v is number;
|
|
23
|
-
declare const isNull: (v: any) => v is null;
|
|
24
|
-
declare const isNotNull: <T>(v: T) => v is Exclude<T, null>;
|
|
25
|
-
declare const isUndefined: (v: any) => v is undefined;
|
|
26
|
-
declare const isDefined: <T>(v: T) => v is Exclude<T, undefined>;
|
|
27
|
-
declare const isInt: (str: string) => boolean;
|
|
28
|
-
declare const isWindow: boolean;
|
|
29
|
-
declare const isNotWindow: boolean;
|
|
30
|
-
|
|
31
|
-
type is_ModuleLike = ModuleLike;
|
|
32
|
-
declare const is_isArr: typeof isArr;
|
|
33
|
-
declare const is_isArraybuff: typeof isArraybuff;
|
|
34
|
-
declare const is_isAsync: typeof isAsync;
|
|
35
|
-
declare const is_isBool: typeof isBool;
|
|
36
|
-
declare const is_isClassOrId: typeof isClassOrId;
|
|
37
|
-
declare const is_isDefined: typeof isDefined;
|
|
38
|
-
declare const is_isFN: typeof isFN;
|
|
39
|
-
declare const is_isInt: typeof isInt;
|
|
40
|
-
declare const is_isModule: typeof isModule;
|
|
41
|
-
declare const is_isNotNull: typeof isNotNull;
|
|
42
|
-
declare const is_isNotWindow: typeof isNotWindow;
|
|
43
|
-
declare const is_isNull: typeof isNull;
|
|
44
|
-
declare const is_isNum: typeof isNum;
|
|
45
|
-
declare const is_isNumber: typeof isNumber;
|
|
46
|
-
declare const is_isObj: typeof isObj;
|
|
47
|
-
declare const is_isObject: typeof isObject;
|
|
48
|
-
declare const is_isPlainObject: typeof isPlainObject;
|
|
49
|
-
declare const is_isPromise: typeof isPromise;
|
|
50
|
-
declare const is_isStr: typeof isStr;
|
|
51
|
-
declare const is_isUndefined: typeof isUndefined;
|
|
52
|
-
declare const is_isWindow: typeof isWindow;
|
|
53
|
-
declare namespace is {
|
|
54
|
-
export { is_isArr as isArr, is_isArraybuff as isArraybuff, is_isAsync as isAsync, is_isBool as isBool, is_isClassOrId as isClassOrId, is_isDefined as isDefined, is_isFN as isFN, is_isInt as isInt, is_isModule as isModule, is_isNotNull as isNotNull, is_isNotWindow as isNotWindow, is_isNull as isNull, is_isNum as isNum, is_isNumber as isNumber, is_isObj as isObj, is_isObject as isObject, is_isPlainObject as isPlainObject, is_isPromise as isPromise, is_isStr as isStr, is_isUndefined as isUndefined, is_isWindow as isWindow };
|
|
55
|
-
export type { is_ModuleLike as ModuleLike };
|
|
56
|
-
}
|
|
1
|
+
import { Mapped } from '@ohmyqt/u';
|
|
57
2
|
|
|
58
3
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @template V - The type of the values in the map.
|
|
4
|
+
* Value-level number guard matching the migrated source's original behavior.
|
|
5
|
+
* Unlike the utility package's strict `isNumber`, `NaN` is still a number here, which keeps
|
|
6
|
+
* `Value` output unchanged for non-finite CSS values.
|
|
63
7
|
*/
|
|
64
|
-
declare
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
8
|
+
declare const isNumber: (value: unknown) => value is number;
|
|
9
|
+
/**
|
|
10
|
+
* Numeric-key guard matching the original helper used for keyframe keys.
|
|
11
|
+
* Accepts numeric strings such as `"50"` so `50` becomes `"50%"`.
|
|
12
|
+
*/
|
|
13
|
+
declare const isNumeric: (value: unknown) => boolean;
|
|
14
|
+
declare const isClassOrId: (key: string) => boolean;
|
|
71
15
|
|
|
72
|
-
declare
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
static set i(a: any);
|
|
82
|
-
static set e(a: any);
|
|
83
|
-
static set w(a: any);
|
|
84
|
-
static set d(a: any);
|
|
16
|
+
declare const guards_isClassOrId: typeof isClassOrId;
|
|
17
|
+
declare const guards_isNumber: typeof isNumber;
|
|
18
|
+
declare const guards_isNumeric: typeof isNumeric;
|
|
19
|
+
declare namespace guards {
|
|
20
|
+
export {
|
|
21
|
+
guards_isClassOrId as isClassOrId,
|
|
22
|
+
guards_isNumber as isNumber,
|
|
23
|
+
guards_isNumeric as isNumeric,
|
|
24
|
+
};
|
|
85
25
|
}
|
|
86
26
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
* - `ss, s` —— Second
|
|
101
|
-
* - `SSS` —— Millisecond
|
|
102
|
-
* - `A, a` —— AM/PM
|
|
103
|
-
* - `Q` —— Quarter
|
|
104
|
-
* - `DoY` —— Day of Year
|
|
105
|
-
* @param pattern - Format string with tokens (default: `"YYYY-MM-DD HH:mm:ss"`)
|
|
106
|
-
* @param locale - Optional locale or array of locales (default: system locale)
|
|
107
|
-
*/
|
|
108
|
-
format(pattern?: string, locale?: string | string[]): string;
|
|
109
|
-
}
|
|
110
|
-
interface DateConstructor {
|
|
111
|
-
/**
|
|
112
|
-
* Register or override a custom format token.
|
|
113
|
-
* @param token The token string to replace (e.g. "DoY")
|
|
114
|
-
* @param fn A function that returns a string when formatting
|
|
115
|
-
*/
|
|
116
|
-
registerFormat(token: string, fn: (d: Date, locale?: string | string[]) => string): void;
|
|
117
|
-
/**
|
|
118
|
-
*
|
|
119
|
-
* * Format a date using tokens.
|
|
120
|
-
*
|
|
121
|
-
* ### Available tokens:
|
|
122
|
-
* - `YYYY, YY` —— Year
|
|
123
|
-
* - `MMMM, MMM, MM, M` —— Month
|
|
124
|
-
* - `dddd, ddd` —— Weekday
|
|
125
|
-
* - `DD, D` —— Day of Month
|
|
126
|
-
* - `HH, H, hh, h` —— Hour
|
|
127
|
-
* - `mm, m` —— Minute
|
|
128
|
-
* - `ss, s` —— Second
|
|
129
|
-
* - `SSS` —— Millisecond
|
|
130
|
-
* - `A, a` —— AM/PM
|
|
131
|
-
* - `Q` —— Quarter
|
|
132
|
-
* - `DoY` —— Day of Year
|
|
133
|
-
* @param pattern - Format string with tokens (default: `"YYYY-MM-DD HH:mm:ss"`)
|
|
134
|
-
* @param locale - Optional locale or array of locales (default: system locale)
|
|
135
|
-
*/
|
|
136
|
-
format(pattern?: string, locale?: string | string[]): string;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
27
|
+
type ObjectChanges = {
|
|
28
|
+
added: Record<string, unknown>;
|
|
29
|
+
removed: Record<string, unknown>;
|
|
30
|
+
modified: Record<string, {
|
|
31
|
+
old: unknown;
|
|
32
|
+
new: unknown;
|
|
33
|
+
}>;
|
|
34
|
+
};
|
|
35
|
+
declare const compareObjects: (oldObject: object, newObject: object) => ObjectChanges;
|
|
36
|
+
declare const hasObjectChanges: (changes: ObjectChanges) => boolean;
|
|
37
|
+
|
|
38
|
+
type V = string | number | boolean;
|
|
39
|
+
type obj<T> = Record<string, T>;
|
|
139
40
|
|
|
41
|
+
declare class returner {
|
|
42
|
+
static arr<T = string>(value?: unknown): T[];
|
|
43
|
+
static num(value: unknown, fallback?: number): number;
|
|
44
|
+
static str(value: unknown): string;
|
|
45
|
+
static arr2obj(value: unknown[], switched?: boolean): Record<string, any>;
|
|
46
|
+
}
|
|
47
|
+
declare class Formatteer {
|
|
48
|
+
val: unknown;
|
|
49
|
+
constructor(val: unknown);
|
|
50
|
+
get px(): string;
|
|
51
|
+
get rem(): string;
|
|
52
|
+
get pr(): string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Small public utility namespace preserved from the legacy helper barrel.
|
|
56
|
+
*/
|
|
140
57
|
declare class __ {
|
|
141
58
|
static rand(min?: number, max?: number): number;
|
|
142
|
-
static fill(count: number, fill?:
|
|
59
|
+
static fill(count: number, fill?: unknown): any[];
|
|
143
60
|
static new({ dom, id, inner, }: {
|
|
144
61
|
dom: keyof HTMLElementTagNameMap | keyof SVGElementTagNameMap;
|
|
145
62
|
id?: string;
|
|
146
63
|
inner?: any;
|
|
147
64
|
}): HTMLElement;
|
|
148
|
-
static randFrom(
|
|
149
|
-
static randArray<T>(
|
|
150
|
-
static randomAZ: () => string
|
|
65
|
+
static randFrom(source: unknown[] | object): unknown;
|
|
66
|
+
static randArray<T>(source?: T[], length?: number, unique?: boolean): T[];
|
|
67
|
+
static randomAZ: () => string;
|
|
151
68
|
static makeID: (length: number) => string;
|
|
152
|
-
static class(
|
|
69
|
+
static class(attributes: obj<any>, ...classes: (string | undefined | boolean)[]): void;
|
|
153
70
|
static get O(): {
|
|
154
71
|
vals: {
|
|
155
72
|
<T>(o: {
|
|
@@ -167,100 +84,25 @@ declare class __ {
|
|
|
167
84
|
} | ArrayLike<T>): [string, T][];
|
|
168
85
|
(o: {}): [string, any][];
|
|
169
86
|
};
|
|
170
|
-
has: (
|
|
87
|
+
has: (target: object, key: PropertyKey) => boolean;
|
|
171
88
|
ass: {
|
|
172
89
|
<T extends {}, U>(target: T, source: U): T & U;
|
|
173
90
|
<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
|
|
174
91
|
<T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
|
175
92
|
(target: object, ...sources: any[]): any;
|
|
176
93
|
};
|
|
177
|
-
len: (
|
|
94
|
+
len: (target?: object) => number;
|
|
178
95
|
};
|
|
179
|
-
static get is(): typeof
|
|
96
|
+
static get is(): typeof guards;
|
|
180
97
|
static get return(): typeof returner;
|
|
181
|
-
static isHREF(
|
|
182
|
-
static sleep: (ms?: number) => Promise<
|
|
98
|
+
static isHREF(path: string, href: string): boolean;
|
|
99
|
+
static sleep: (ms?: number) => Promise<void>;
|
|
183
100
|
static get screen(): "xs" | "sm" | "smd" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
184
101
|
bytes(bytes: number): string;
|
|
185
|
-
static format(
|
|
186
|
-
static compareObjects:
|
|
187
|
-
|
|
188
|
-
removed: Record<string, any>;
|
|
189
|
-
modified: Record<string, {
|
|
190
|
-
old: any;
|
|
191
|
-
new: any;
|
|
192
|
-
}>;
|
|
193
|
-
};
|
|
194
|
-
static isObjectUdpated: (changes: {
|
|
195
|
-
added: Record<string, any>;
|
|
196
|
-
removed: Record<string, any>;
|
|
197
|
-
modified: Record<string, {
|
|
198
|
-
old: any;
|
|
199
|
-
new: any;
|
|
200
|
-
}>;
|
|
201
|
-
}) => boolean;
|
|
202
|
-
}
|
|
203
|
-
declare class returner {
|
|
204
|
-
static arr<T = string>(val?: any): T[];
|
|
205
|
-
static num(val: any, iferr?: any): number;
|
|
206
|
-
static str(val: any): string;
|
|
207
|
-
static arr2obj(val: any[], switched?: boolean): any;
|
|
208
|
-
}
|
|
209
|
-
declare class Formatteer {
|
|
210
|
-
val: any;
|
|
211
|
-
constructor(val: any);
|
|
212
|
-
get px(): string;
|
|
213
|
-
get rem(): string;
|
|
214
|
-
get pr(): string;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
declare class _Var {
|
|
218
|
-
k: string;
|
|
219
|
-
fallback?: CSSValue;
|
|
220
|
-
var: string;
|
|
221
|
-
value: media;
|
|
222
|
-
constructor(vr?: obj<CSSValue | media>, fallback?: CSSValue);
|
|
223
|
-
__(fallback?: CSSValue): string;
|
|
224
|
-
new(val: CSSValue, fallback?: CSSValue): _Var;
|
|
225
|
-
}
|
|
226
|
-
declare const Var: (vr: obj<CSSValue | media>, fallback?: CSSValue) => _Var;
|
|
227
|
-
declare const Vars: <T extends Record<string, CSSValue | media>>(vr: T) => { [K in keyof T]: _Var; };
|
|
228
|
-
|
|
229
|
-
type CSSValue = V | _Var | undefined | CSSValue[];
|
|
230
|
-
type VarType = _Var;
|
|
231
|
-
interface xtraCSS extends Partial<CSSStyleDeclaration> {
|
|
232
|
-
src?: string;
|
|
233
|
-
webkitBackdropFilter?: string;
|
|
234
|
-
webkitTextFillColor?: string;
|
|
235
|
-
webkitFontSmoothing?: string;
|
|
236
|
-
webkitTapHighlightColor?: string;
|
|
237
|
-
textFillColor?: string;
|
|
238
|
-
lineClamp?: string;
|
|
239
|
-
textJustify?: string;
|
|
240
|
-
webkitBoxDecorationBreak: string;
|
|
241
|
-
boxDecorationBreak: string;
|
|
242
|
-
webkitBoxReflect: string;
|
|
102
|
+
static format(value: any): Formatteer;
|
|
103
|
+
static compareObjects: typeof compareObjects;
|
|
104
|
+
static isObjectUdpated: typeof hasObjectChanges;
|
|
243
105
|
}
|
|
244
|
-
interface fontFace {
|
|
245
|
-
src?: string;
|
|
246
|
-
fontStretch?: "condensed" | "ultra-condensed" | "extra-condensed" | "semi-condensed" | "expanded" | "semi-expanded" | "extra-expanded" | "ultra-expanded";
|
|
247
|
-
fontStyle?: "normal" | "italic" | "oblique";
|
|
248
|
-
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
249
|
-
unicodeRange?: CSSValue;
|
|
250
|
-
}
|
|
251
|
-
type CSSinR = {
|
|
252
|
-
[P in keyof xtraCSS]?: CSSValue | media;
|
|
253
|
-
} | {
|
|
254
|
-
[p: string]: CSSValue | media;
|
|
255
|
-
} | CSSinR[];
|
|
256
|
-
type atCSS = string;
|
|
257
|
-
type CSS = Record<string, CSSinR | Record<string, CSSinR>>;
|
|
258
|
-
type KFX = CSSinR | Medyas<any, {}>;
|
|
259
|
-
type KFCSS = obj<{
|
|
260
|
-
from?: KFX;
|
|
261
|
-
to?: KFX;
|
|
262
|
-
[percent: `${string}%`]: KFX;
|
|
263
|
-
}>;
|
|
264
106
|
|
|
265
107
|
interface mtype {
|
|
266
108
|
xs?: CSSValue;
|
|
@@ -283,7 +125,15 @@ declare class media {
|
|
|
283
125
|
static readonly prop: mtype;
|
|
284
126
|
static readonly extra: mtype;
|
|
285
127
|
constructor(defValue?: CSSValue, g?: obj<any>);
|
|
286
|
-
static get breakpoints():
|
|
128
|
+
static get breakpoints(): {
|
|
129
|
+
xs: string;
|
|
130
|
+
sm: string;
|
|
131
|
+
smd: string;
|
|
132
|
+
md: string;
|
|
133
|
+
lg: string;
|
|
134
|
+
xl: string;
|
|
135
|
+
xxl: string;
|
|
136
|
+
};
|
|
287
137
|
}
|
|
288
138
|
type exmed$1 = {
|
|
289
139
|
[k: string]: undefined | CSSValue;
|
|
@@ -291,17 +141,24 @@ type exmed$1 = {
|
|
|
291
141
|
declare function med(g: mtype & exmed$1): media;
|
|
292
142
|
declare function med(defValue: CSSValue): media;
|
|
293
143
|
declare function med(defValue: CSSValue, g: mtype & exmed$1): media;
|
|
294
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Constructor options for `Medyas` and its subclasses.
|
|
146
|
+
*
|
|
147
|
+
* Every field is optional so a subclass can be instantiated as `new Preset()`,
|
|
148
|
+
* with only a prefix (`new Preset({ prefix: "md" })`), or with its own data and
|
|
149
|
+
* shared media buckets.
|
|
150
|
+
*/
|
|
151
|
+
interface MedyasOptions<Q = Record<string, any>> {
|
|
295
152
|
prefix?: string;
|
|
296
|
-
data
|
|
297
|
-
values
|
|
153
|
+
data?: Q;
|
|
154
|
+
values?: Record<string, media>;
|
|
298
155
|
}
|
|
299
156
|
declare class Medyas<T extends Medyas<T>, Q = Record<string, any>> {
|
|
300
157
|
[k: number]: this;
|
|
301
158
|
_prefix?: string | undefined;
|
|
302
159
|
data: Q;
|
|
303
160
|
protected _values: Record<string, media>;
|
|
304
|
-
constructor({ prefix, data, values }?:
|
|
161
|
+
constructor({ prefix, data, values }?: MedyasOptions<Q>);
|
|
305
162
|
get XS(): T;
|
|
306
163
|
get SM(): T;
|
|
307
164
|
get SMD(): T;
|
|
@@ -315,343 +172,359 @@ declare class Medyas<T extends Medyas<T>, Q = Record<string, any>> {
|
|
|
315
172
|
get SCREEN(): T;
|
|
316
173
|
get DARK(): T;
|
|
317
174
|
set _value(val: CSSinR);
|
|
318
|
-
get _value():
|
|
175
|
+
get _value(): Record<string, media>;
|
|
319
176
|
}
|
|
320
177
|
|
|
321
|
-
declare class
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
178
|
+
declare class _Var {
|
|
179
|
+
k: string;
|
|
180
|
+
fallback?: CSSValue;
|
|
181
|
+
var: string;
|
|
182
|
+
value: media;
|
|
183
|
+
constructor(vr?: obj<CSSValue | media>, fallback?: CSSValue);
|
|
184
|
+
__(fallback?: CSSValue): string;
|
|
185
|
+
new(val: CSSValue, fallback?: CSSValue): _Var;
|
|
325
186
|
}
|
|
326
|
-
declare
|
|
187
|
+
declare const Var: (vr: obj<CSSValue | media>, fallback?: CSSValue) => _Var;
|
|
188
|
+
declare const Vars: <T extends Record<string, CSSValue | media>>(vr: T) => { [K in keyof T]: _Var; };
|
|
327
189
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
190
|
+
type CSSValue = V | _Var | undefined | CSSValue[];
|
|
191
|
+
type VarType = _Var;
|
|
192
|
+
interface xtraCSS extends Partial<CSSStyleDeclaration> {
|
|
193
|
+
src?: string;
|
|
194
|
+
webkitBackdropFilter?: string;
|
|
195
|
+
webkitTextFillColor?: string;
|
|
196
|
+
webkitFontSmoothing?: string;
|
|
197
|
+
webkitTapHighlightColor?: string;
|
|
198
|
+
textFillColor?: string;
|
|
199
|
+
lineClamp?: string;
|
|
200
|
+
textJustify?: string;
|
|
201
|
+
webkitBoxDecorationBreak: string;
|
|
202
|
+
boxDecorationBreak: string;
|
|
203
|
+
webkitBoxReflect: string;
|
|
204
|
+
webkitTouchCallout: string;
|
|
336
205
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
PS: Proc;
|
|
345
|
-
PREFIX: string;
|
|
346
|
-
ARR: Mapper<string, Set<string>>;
|
|
347
|
-
CID: Mapper<string, string>;
|
|
348
|
-
DATA: CMapper;
|
|
349
|
-
ANIM: Mapper<string, Set<string>>;
|
|
350
|
-
IMPORTED: Base[];
|
|
351
|
-
constructor(PRE?: string, prefix?: string, EXPORT?: boolean | undefined, UNIT?: string | undefined);
|
|
352
|
-
get(target: Base, prop: string, receiver: any): any;
|
|
353
|
-
set(target: any, prop: string, val: any): boolean;
|
|
354
|
-
get css(): T;
|
|
355
|
-
load(css: Base): this;
|
|
356
|
-
__(f: CSS): void;
|
|
206
|
+
interface fontFace {
|
|
207
|
+
src?: string | string[];
|
|
208
|
+
fontStretch?: "condensed" | "ultra-condensed" | "extra-condensed" | "semi-condensed" | "expanded" | "semi-expanded" | "extra-expanded" | "ultra-expanded";
|
|
209
|
+
fontStyle?: "normal" | "italic" | "oblique";
|
|
210
|
+
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
211
|
+
unicodeRange?: CSSValue;
|
|
212
|
+
fontDisplay: "auto" | "block" | "swap" | "fallback" | "optional";
|
|
357
213
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
214
|
+
type CSSinR = {
|
|
215
|
+
[P in keyof xtraCSS]?: CSSValue | media;
|
|
216
|
+
} | {
|
|
217
|
+
[p: string]: CSSValue | media;
|
|
218
|
+
} | CSSinR[];
|
|
219
|
+
type atCSS = string;
|
|
220
|
+
type CSSF = CSSinR | Record<string, CSSinR> | Medyas<any, {}>;
|
|
221
|
+
type CSS = Record<string, CSSinR | Record<string, CSSinR>>;
|
|
222
|
+
type KFX = CSSinR | Medyas<any, {}>;
|
|
223
|
+
type KFCSS = obj<{
|
|
224
|
+
from?: KFX;
|
|
225
|
+
to?: KFX;
|
|
226
|
+
[percent: `${string}%`]: KFX;
|
|
227
|
+
}>;
|
|
228
|
+
|
|
229
|
+
declare class support {
|
|
230
|
+
value: Mapped<string, CSSinR[]>;
|
|
231
|
+
__: (...css: CSSinR[]) => this;
|
|
232
|
+
constructor(css: CSSinR | string);
|
|
361
233
|
}
|
|
234
|
+
declare function supports(css: CSSinR | string): (...css: CSSinR[]) => support;
|
|
362
235
|
|
|
363
236
|
declare class ps {
|
|
364
237
|
static attr(d: obj<string>): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
365
|
-
[x: string]: (
|
|
238
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
366
239
|
};
|
|
367
240
|
static after(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
368
|
-
[x: string]: (
|
|
241
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
369
242
|
};
|
|
370
243
|
static before(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
371
|
-
[x: string]: (
|
|
244
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
372
245
|
};
|
|
373
246
|
static backdrop(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
374
|
-
[x: string]: (
|
|
247
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
375
248
|
};
|
|
376
249
|
static cue(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
377
|
-
[x: string]: (
|
|
250
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
378
251
|
};
|
|
379
252
|
static cueRegion(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
380
|
-
[x: string]: (
|
|
253
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
381
254
|
};
|
|
382
255
|
static firstLetter(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
383
|
-
[x: string]: (
|
|
256
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
384
257
|
};
|
|
385
258
|
static firstLine(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
386
|
-
[x: string]: (
|
|
259
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
387
260
|
};
|
|
388
261
|
static marker(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
389
|
-
[x: string]: (
|
|
262
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
390
263
|
};
|
|
391
264
|
static part(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
392
|
-
[x: string]: (
|
|
265
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
393
266
|
};
|
|
394
267
|
static placeholder(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
395
|
-
[x: string]: (
|
|
268
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
396
269
|
};
|
|
397
270
|
static selection(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
398
|
-
[x: string]: (
|
|
271
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
399
272
|
};
|
|
400
273
|
static slotted(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
401
|
-
[x: string]: (
|
|
274
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
402
275
|
};
|
|
403
276
|
static spellingError(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
404
|
-
[x: string]: (
|
|
277
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
405
278
|
};
|
|
406
279
|
static targetText(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
407
|
-
[x: string]: (
|
|
280
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
408
281
|
};
|
|
409
282
|
static viewTransition(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
410
|
-
[x: string]: (
|
|
283
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
411
284
|
};
|
|
412
285
|
static viewTransitionGroup(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
413
|
-
[x: string]: (
|
|
286
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
414
287
|
};
|
|
415
288
|
static viewTransitionImagePair(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
416
|
-
[x: string]: (
|
|
289
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
417
290
|
};
|
|
418
291
|
static viewTransitionNew(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
419
|
-
[x: string]: (
|
|
292
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
420
293
|
};
|
|
421
294
|
static viewTransitionOld(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
422
|
-
[x: string]: (
|
|
295
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
423
296
|
};
|
|
424
297
|
static scrollbar(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
425
|
-
[x: string]: (
|
|
298
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
426
299
|
};
|
|
427
300
|
static scrollbarThumb(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
428
|
-
[x: string]: (
|
|
301
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
429
302
|
};
|
|
430
303
|
static scrollbarTrack(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
431
|
-
[x: string]: (
|
|
304
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
432
305
|
};
|
|
433
306
|
static scrollbarCorner(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
434
|
-
[x: string]: (
|
|
307
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
435
308
|
};
|
|
436
309
|
static active(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
437
|
-
[x: string]: (
|
|
310
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
438
311
|
};
|
|
439
312
|
static anyLink(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
440
|
-
[x: string]: (
|
|
313
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
441
314
|
};
|
|
442
315
|
static autofill(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
443
|
-
[x: string]: (
|
|
316
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
444
317
|
};
|
|
445
318
|
static blank(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
446
|
-
[x: string]: (
|
|
319
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
447
320
|
};
|
|
448
321
|
static checked(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
449
|
-
[x: string]: (
|
|
322
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
450
323
|
};
|
|
451
324
|
static current(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
452
|
-
[x: string]: (
|
|
325
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
453
326
|
};
|
|
454
327
|
static default(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
455
|
-
[x: string]: (
|
|
328
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
456
329
|
};
|
|
457
330
|
static defined(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
458
|
-
[x: string]: (
|
|
331
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
459
332
|
};
|
|
460
333
|
static disabled(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
461
|
-
[x: string]: (
|
|
334
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
462
335
|
};
|
|
463
336
|
static empty(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
464
|
-
[x: string]: (
|
|
337
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
465
338
|
};
|
|
466
339
|
static enabled(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
467
|
-
[x: string]: (
|
|
340
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
468
341
|
};
|
|
469
342
|
static first(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
470
|
-
[x: string]: (
|
|
343
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
471
344
|
};
|
|
472
345
|
static firstChild(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
473
|
-
[x: string]: (
|
|
346
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
474
347
|
};
|
|
475
348
|
static firstOfType(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
476
|
-
[x: string]: (
|
|
349
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
477
350
|
};
|
|
478
351
|
static fullscreen(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
479
|
-
[x: string]: (
|
|
352
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
480
353
|
};
|
|
481
354
|
static future(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
482
|
-
[x: string]: (
|
|
355
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
483
356
|
};
|
|
484
357
|
static focus(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
485
|
-
[x: string]: (
|
|
358
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
486
359
|
};
|
|
487
360
|
static focusVisible(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
488
|
-
[x: string]: (
|
|
361
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
489
362
|
};
|
|
490
363
|
static focusWithin(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
491
|
-
[x: string]: (
|
|
364
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
492
365
|
};
|
|
493
366
|
static host(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
494
|
-
[x: string]: (
|
|
367
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
495
368
|
};
|
|
496
369
|
static hover(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
497
|
-
[x: string]: (
|
|
370
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
498
371
|
};
|
|
499
372
|
static indeterminate(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
500
|
-
[x: string]: (
|
|
373
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
501
374
|
};
|
|
502
375
|
static inRange(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
503
|
-
[x: string]: (
|
|
376
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
504
377
|
};
|
|
505
378
|
static invalid(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
506
|
-
[x: string]: (
|
|
379
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
507
380
|
};
|
|
508
381
|
static lastChild(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
509
|
-
[x: string]: (
|
|
382
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
510
383
|
};
|
|
511
384
|
static lastOfType(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
512
|
-
[x: string]: (
|
|
385
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
513
386
|
};
|
|
514
387
|
static left(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
515
|
-
[x: string]: (
|
|
388
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
516
389
|
};
|
|
517
390
|
static link(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
518
|
-
[x: string]: (
|
|
391
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
519
392
|
};
|
|
520
393
|
static localLink(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
521
|
-
[x: string]: (
|
|
394
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
522
395
|
};
|
|
523
396
|
static modal(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
524
|
-
[x: string]: (
|
|
397
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
525
398
|
};
|
|
526
399
|
static onlyChild(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
527
|
-
[x: string]: (
|
|
400
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
528
401
|
};
|
|
529
402
|
static onlyOfType(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
530
|
-
[x: string]: (
|
|
403
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
531
404
|
};
|
|
532
405
|
static optional(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
533
|
-
[x: string]: (
|
|
406
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
534
407
|
};
|
|
535
408
|
static outOfRange(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
536
|
-
[x: string]: (
|
|
409
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
537
410
|
};
|
|
538
411
|
static past(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
539
|
-
[x: string]: (
|
|
412
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
540
413
|
};
|
|
541
414
|
static pictureInPicture(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
542
|
-
[x: string]: (
|
|
415
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
543
416
|
};
|
|
544
417
|
static placeholderShown(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
545
|
-
[x: string]: (
|
|
418
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
546
419
|
};
|
|
547
420
|
static paused(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
548
|
-
[x: string]: (
|
|
421
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
549
422
|
};
|
|
550
423
|
static playing(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
551
|
-
[x: string]: (
|
|
424
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
552
425
|
};
|
|
553
426
|
static readOnly(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
554
|
-
[x: string]: (
|
|
427
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
555
428
|
};
|
|
556
429
|
static readWrite(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
557
|
-
[x: string]: (
|
|
430
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
558
431
|
};
|
|
559
432
|
static required(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
560
|
-
[x: string]: (
|
|
433
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
561
434
|
};
|
|
562
435
|
static right(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
563
|
-
[x: string]: (
|
|
436
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
564
437
|
};
|
|
565
438
|
static root(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
566
|
-
[x: string]: (
|
|
439
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
567
440
|
};
|
|
568
441
|
static scope(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
569
|
-
[x: string]: (
|
|
442
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
570
443
|
};
|
|
571
444
|
static target(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
572
|
-
[x: string]: (
|
|
445
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
573
446
|
};
|
|
574
447
|
static targetWithin(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
575
|
-
[x: string]: (
|
|
448
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
576
449
|
};
|
|
577
450
|
static userInvalid(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
578
|
-
[x: string]: (
|
|
451
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
579
452
|
};
|
|
580
453
|
static valid(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
581
|
-
[x: string]: (
|
|
454
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
582
455
|
};
|
|
583
456
|
static visited(xx?: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
584
|
-
[x: string]: (
|
|
457
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
585
458
|
};
|
|
586
459
|
static dir(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
587
|
-
[x: string]: (
|
|
460
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
588
461
|
};
|
|
589
462
|
static has(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
590
|
-
[x: string]: (
|
|
463
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
591
464
|
};
|
|
592
465
|
static host_(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
593
|
-
[x: string]: (
|
|
466
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
594
467
|
};
|
|
595
468
|
static hostContext(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
596
|
-
[x: string]: (
|
|
469
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
597
470
|
};
|
|
598
471
|
static is(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
599
|
-
[x: string]: (
|
|
472
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
600
473
|
};
|
|
601
474
|
static lang(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
602
|
-
[x: string]: (
|
|
475
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
603
476
|
};
|
|
604
477
|
static not(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
605
|
-
[x: string]: (
|
|
478
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
606
479
|
};
|
|
607
480
|
static nthChild(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
608
|
-
[x: string]: (
|
|
481
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
609
482
|
};
|
|
610
483
|
static nthCol(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
611
|
-
[x: string]: (
|
|
484
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
612
485
|
};
|
|
613
486
|
static nthLastChild(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
614
|
-
[x: string]: (
|
|
487
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
615
488
|
};
|
|
616
489
|
static nthLastCol(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
617
|
-
[x: string]: (
|
|
490
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
618
491
|
};
|
|
619
492
|
static nthLastOfType(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
620
|
-
[x: string]: (
|
|
493
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
621
494
|
};
|
|
622
495
|
static nthOfType(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
623
|
-
[x: string]: (
|
|
496
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
624
497
|
};
|
|
625
498
|
static state(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
626
|
-
[x: string]: (
|
|
499
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
627
500
|
};
|
|
628
501
|
static where(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
629
|
-
[x: string]: (
|
|
502
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
630
503
|
};
|
|
631
504
|
/**
|
|
632
505
|
* i.e outer-spin-button
|
|
633
506
|
* @param xx string
|
|
634
507
|
*/
|
|
635
508
|
static webkit(xx: V): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
636
|
-
[x: string]: (
|
|
509
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
637
510
|
};
|
|
638
511
|
static and(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
639
|
-
[x: string]: (
|
|
512
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
640
513
|
};
|
|
641
514
|
static child(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
642
|
-
[x: string]: (
|
|
515
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
643
516
|
};
|
|
644
517
|
static desc(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
645
|
-
[x: string]: (
|
|
518
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
646
519
|
};
|
|
647
520
|
static next(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
648
|
-
[x: string]: (
|
|
521
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
649
522
|
};
|
|
650
523
|
static general(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
651
|
-
[x: string]: (
|
|
524
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
652
525
|
};
|
|
653
526
|
static withClass(str: string): (...itm: (CSSinR | _Var | support | obj<CSSValue> | Medyas<any> | undefined)[]) => {
|
|
654
|
-
[x: string]: (
|
|
527
|
+
[x: string]: (Medyas<any, Record<string, any>> | _Var | obj<CSSValue> | support | CSSinR | undefined)[];
|
|
655
528
|
};
|
|
656
529
|
}
|
|
657
530
|
|
|
@@ -732,6 +605,7 @@ declare class f extends g {
|
|
|
732
605
|
static translateY(Y: CSSValue): string;
|
|
733
606
|
static translateZ(...sfs: CSSValue[]): string;
|
|
734
607
|
static url(url: CSSValue): string;
|
|
608
|
+
static format(format: string): string;
|
|
735
609
|
static var(st: string, opt?: CSSValue): string;
|
|
736
610
|
}
|
|
737
611
|
|
|
@@ -796,38 +670,53 @@ interface propCfg {
|
|
|
796
670
|
type undefNull = CSSValue | undefined | null | undefNull[];
|
|
797
671
|
declare const Value: (val: CSSValue | undefNull, cfg?: propCfg) => string;
|
|
798
672
|
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
name?: string;
|
|
673
|
+
declare class Proc {
|
|
674
|
+
private base;
|
|
675
|
+
constructor(base: Base);
|
|
676
|
+
private prefixAnimationValues;
|
|
677
|
+
private addPrefixToAnimation;
|
|
678
|
+
private saveAnim;
|
|
679
|
+
private processDeclaration;
|
|
680
|
+
set(name: string, css: CSSinR, data: CMapper): void;
|
|
808
681
|
}
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
682
|
+
|
|
683
|
+
type CMapper = Mapped<string, Mapped<string, media | support[]>>;
|
|
684
|
+
declare class Base<T = Record<string, any>> {
|
|
685
|
+
PRE: string;
|
|
686
|
+
EXPORT?: boolean | undefined;
|
|
687
|
+
UNIT?: string | undefined;
|
|
688
|
+
/** Source `__filename` of the instance that owns this handler. */
|
|
689
|
+
SOURCE: string;
|
|
690
|
+
[k: string]: any;
|
|
691
|
+
PS: Proc;
|
|
692
|
+
PREFIX: string;
|
|
693
|
+
ARR: Mapped<string, Set<string>>;
|
|
694
|
+
CID: Mapped<string, string>;
|
|
695
|
+
DATA: CMapper;
|
|
696
|
+
ANIM: Mapped<string, Set<string>>;
|
|
697
|
+
IMPORTED: Base[];
|
|
698
|
+
constructor(PRE?: string, prefix?: string, EXPORT?: boolean | undefined, UNIT?: string | undefined,
|
|
699
|
+
/** Source `__filename` of the instance that owns this handler. */
|
|
700
|
+
SOURCE?: string);
|
|
701
|
+
get(target: Base, prop: string, receiver: any): any;
|
|
702
|
+
set(target: any, prop: string, val: any): boolean;
|
|
703
|
+
get css(): T;
|
|
704
|
+
load(css: Base): this;
|
|
705
|
+
__(f: CSS): void;
|
|
818
706
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
707
|
+
|
|
708
|
+
declare class FontFace extends Base<obj<fontFace>> {
|
|
709
|
+
constructor(prefix?: string, source?: string);
|
|
710
|
+
set(target: any, prop: string, val: fontFace): boolean;
|
|
711
|
+
}
|
|
712
|
+
|
|
825
713
|
declare class Shweet<T extends exmed = exmed> {
|
|
826
714
|
[k: string]: any;
|
|
827
715
|
path: string;
|
|
828
716
|
name: string | undefined;
|
|
829
717
|
prefix: string;
|
|
830
718
|
exportMap?: boolean | undefined;
|
|
719
|
+
onDiagnostic: DiagnosticHandler | undefined;
|
|
831
720
|
private mediaFeatures;
|
|
832
721
|
protected _imported: Set<string>;
|
|
833
722
|
d: __CSS;
|
|
@@ -842,8 +731,8 @@ declare class Shweet<T extends exmed = exmed> {
|
|
|
842
731
|
};
|
|
843
732
|
font: FontFace["css"];
|
|
844
733
|
shweet: this;
|
|
845
|
-
save: (x?:
|
|
846
|
-
constructor({ __filename, name, prefix, shweets, exportMap, webkitKeyframes, mediaFeature, unit, }:
|
|
734
|
+
save: (x?: SaveOptions) => this;
|
|
735
|
+
constructor({ __filename, name, prefix, shweets, exportMap, webkitKeyframes, mediaFeature, unit, onDiagnostic, }: ShweetOptions<T>);
|
|
847
736
|
get imported(): string[];
|
|
848
737
|
med(g: mtype & T): media;
|
|
849
738
|
med(defValue: CSSValue): media;
|
|
@@ -851,5 +740,70 @@ declare class Shweet<T extends exmed = exmed> {
|
|
|
851
740
|
}
|
|
852
741
|
declare function fileName(path: string): string | undefined;
|
|
853
742
|
|
|
854
|
-
|
|
855
|
-
|
|
743
|
+
type exmed = {
|
|
744
|
+
[k: string]: undefined | CSSValue;
|
|
745
|
+
};
|
|
746
|
+
type DiagnosticSeverity = "warning" | "error";
|
|
747
|
+
/**
|
|
748
|
+
* Structured, source-aware compiler diagnostic.
|
|
749
|
+
*
|
|
750
|
+
* The Proxy assignment API records no source spans, so diagnostics deliberately
|
|
751
|
+
* carry no line/column information. `sourcePath` is the `__filename` of the
|
|
752
|
+
* instance whose handler produced the diagnostic (including imported
|
|
753
|
+
* instances), and `rule`/`selector` identify the affected at-rule/keyframe
|
|
754
|
+
* step when one exists.
|
|
755
|
+
*/
|
|
756
|
+
interface CompileDiagnostic {
|
|
757
|
+
/** Stable identifier suitable for programmatic filtering. */
|
|
758
|
+
code: string;
|
|
759
|
+
severity: DiagnosticSeverity;
|
|
760
|
+
message: string;
|
|
761
|
+
sourcePath: string;
|
|
762
|
+
/** Affected rule, e.g. `@keyframes spin`. */
|
|
763
|
+
rule?: string;
|
|
764
|
+
/** Affected selector or keyframe step, e.g. `from`. */
|
|
765
|
+
selector?: string;
|
|
766
|
+
}
|
|
767
|
+
type DiagnosticHandler = (diagnostic: CompileDiagnostic) => void;
|
|
768
|
+
interface SaveOptions {
|
|
769
|
+
dir?: string | string[];
|
|
770
|
+
mapDir?: string | string[];
|
|
771
|
+
mapName?: string;
|
|
772
|
+
minify?: boolean;
|
|
773
|
+
shaker?: string[];
|
|
774
|
+
include?: string[];
|
|
775
|
+
includeAnimation?: string[];
|
|
776
|
+
name?: string;
|
|
777
|
+
}
|
|
778
|
+
interface ShweetOptions<T extends exmed> {
|
|
779
|
+
__filename: string;
|
|
780
|
+
name?: string;
|
|
781
|
+
prefix?: string;
|
|
782
|
+
shweets?: Shweet | Shweet[];
|
|
783
|
+
exportMap?: boolean;
|
|
784
|
+
webkitKeyframes?: boolean;
|
|
785
|
+
unit?: "rem" | "em" | "px" | "pt" | "pc";
|
|
786
|
+
mediaFeature?: T;
|
|
787
|
+
/**
|
|
788
|
+
* Optional structured diagnostic sink. When supplied it replaces the
|
|
789
|
+
* default console logging for diagnostics that were previously logged.
|
|
790
|
+
*/
|
|
791
|
+
onDiagnostic?: DiagnosticHandler;
|
|
792
|
+
}
|
|
793
|
+
type __CSS = CSS & {
|
|
794
|
+
__: (a: CSS) => void;
|
|
795
|
+
};
|
|
796
|
+
|
|
797
|
+
declare const Z: (cx: CSS, a: Record<string, [CSSF, Record<string, CSSF>]>) => void;
|
|
798
|
+
declare const X: (cx: CSS, a: Record<string, CSSF | XZ>, mc?: string) => void;
|
|
799
|
+
declare class XZ {
|
|
800
|
+
__: Record<string, CSSF>;
|
|
801
|
+
private merge;
|
|
802
|
+
constructor(__: Record<string, CSSF>, merge?: boolean);
|
|
803
|
+
$(mc: string, cx: CSS): void;
|
|
804
|
+
}
|
|
805
|
+
declare const XX: (a: Record<string, CSSF>) => XZ;
|
|
806
|
+
declare const XY: (a: Record<string, CSSF>) => XZ;
|
|
807
|
+
|
|
808
|
+
export { Medyas, Shweet, Value, Var, Vars, X, XX, XY, Z, __, f, fileName, med, media, ps, supports, v };
|
|
809
|
+
export type { CSS, CSSF, CSSValue, CSSinR, CompileDiagnostic, DiagnosticHandler, DiagnosticSeverity, KFCSS, MedyasOptions, VarType, atCSS, fontFace };
|