@estjs/shared 0.0.15-beta.13 → 0.0.15-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared.cjs.js +400 -2
- package/dist/shared.cjs.js.map +1 -1
- package/dist/shared.d.cts +204 -153
- package/dist/shared.d.ts +204 -153
- package/dist/shared.dev.cjs.js +1 -523
- package/dist/shared.dev.cjs.js.map +1 -1
- package/dist/shared.dev.esm.js +1 -429
- package/dist/shared.dev.esm.js.map +1 -1
- package/dist/shared.esm.js +333 -2
- package/dist/shared.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/shared.d.ts
CHANGED
|
@@ -9,25 +9,26 @@ declare const extend: {
|
|
|
9
9
|
(target: object, ...sources: any[]): any;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* Checks if an object has a specific property
|
|
13
|
-
*
|
|
14
|
-
* @param
|
|
15
|
-
* @param
|
|
16
|
-
* @returns {
|
|
12
|
+
* Checks if an object has a specific property.
|
|
13
|
+
*
|
|
14
|
+
* @param val - The target object to check.
|
|
15
|
+
* @param key - The property name to check for.
|
|
16
|
+
* @returns {boolean} True if the object has the property, false otherwise.
|
|
17
17
|
*/
|
|
18
18
|
declare const hasOwn: (val: object, key: string | symbol) => key is keyof typeof val;
|
|
19
19
|
/**
|
|
20
|
-
* Forces a value to be an array
|
|
21
|
-
*
|
|
22
|
-
* @param
|
|
23
|
-
* @returns
|
|
20
|
+
* Forces a value to be an array.
|
|
21
|
+
*
|
|
22
|
+
* @param data - The data to convert, can be a single element or an array.
|
|
23
|
+
* @returns The resulting array.
|
|
24
24
|
*/
|
|
25
25
|
declare function coerceArray<T>(data: T | T[]): T[];
|
|
26
26
|
/**
|
|
27
|
-
* Checks if a value has changed
|
|
28
|
-
*
|
|
29
|
-
* @param
|
|
30
|
-
* @
|
|
27
|
+
* Checks if a value has changed.
|
|
28
|
+
*
|
|
29
|
+
* @param value - The new value.
|
|
30
|
+
* @param oldValue - The old value.
|
|
31
|
+
* @returns {boolean} True if the value has changed, false otherwise.
|
|
31
32
|
*/
|
|
32
33
|
declare const hasChanged: (value: unknown, oldValue: unknown) => boolean;
|
|
33
34
|
/**
|
|
@@ -36,33 +37,30 @@ declare const hasChanged: (value: unknown, oldValue: unknown) => boolean;
|
|
|
36
37
|
*/
|
|
37
38
|
declare const noop: () => void;
|
|
38
39
|
/**
|
|
39
|
-
* Checks if a string starts with a specified substring
|
|
40
|
+
* Checks if a string starts with a specified substring.
|
|
40
41
|
*
|
|
41
|
-
*
|
|
42
|
-
* @
|
|
43
|
-
* @
|
|
44
|
-
* @param {string} searchString - The substring to search for
|
|
45
|
-
* @returns {boolean} - Returns true if the string starts with the substring, false otherwise
|
|
42
|
+
* @param str - The string to check.
|
|
43
|
+
* @param searchString - The substring to search for.
|
|
44
|
+
* @returns True if the string starts with the substring, false otherwise.
|
|
46
45
|
*/
|
|
47
46
|
declare function startsWith(str: string, searchString: string): boolean;
|
|
48
47
|
/**
|
|
49
|
-
* Generates an 8-character random string as a unique identifier
|
|
48
|
+
* Generates an 8-character random string as a unique identifier.
|
|
50
49
|
*
|
|
51
|
-
*
|
|
52
|
-
* For security-sensitive use cases, consider using crypto.getRandomValues()
|
|
53
|
-
* @returns {string} - The generated unique identifier
|
|
50
|
+
* @returns The generated unique identifier.
|
|
54
51
|
*/
|
|
55
52
|
declare function generateUniqueId(): string;
|
|
56
53
|
/**
|
|
57
|
-
* Checks if the current environment is a browser
|
|
58
|
-
*
|
|
54
|
+
* Checks if the current environment is a browser.
|
|
55
|
+
*
|
|
56
|
+
* @returns True if in a browser environment, false otherwise.
|
|
59
57
|
*/
|
|
60
58
|
declare function isBrowser(): boolean;
|
|
61
59
|
/**
|
|
62
|
-
* Creates a cached version of a string processing function
|
|
63
|
-
*
|
|
64
|
-
* @param
|
|
65
|
-
* @returns
|
|
60
|
+
* Creates a cached version of a string processing function.
|
|
61
|
+
*
|
|
62
|
+
* @param fn - The string processing function to cache.
|
|
63
|
+
* @returns The cached function.
|
|
66
64
|
*/
|
|
67
65
|
declare const cacheStringFunction: <T extends (str: string) => string>(fn: T) => T;
|
|
68
66
|
/**
|
|
@@ -78,119 +76,136 @@ declare const EMPTY_OBJ: {
|
|
|
78
76
|
*/
|
|
79
77
|
declare const EMPTY_ARR: readonly never[];
|
|
80
78
|
/**
|
|
81
|
-
* Checks if a property name is an event handler
|
|
79
|
+
* Checks if a property name is an event handler.
|
|
82
80
|
*
|
|
83
|
-
*
|
|
84
|
-
* @
|
|
85
|
-
* @returns {boolean} - Returns true if the property is an event handler, false otherwise
|
|
81
|
+
* @param key - The property name to check.
|
|
82
|
+
* @returns {boolean} True if the property is an event handler, false otherwise.
|
|
86
83
|
*/
|
|
87
84
|
declare const isOn: (key: string) => boolean;
|
|
88
85
|
/**
|
|
89
86
|
* Gets the global object for the current environment
|
|
90
|
-
* @returns {unknown
|
|
87
|
+
* @returns {unknown} - The global object for the current environment
|
|
91
88
|
*/
|
|
92
89
|
declare const getGlobalThis: () => unknown;
|
|
93
90
|
|
|
94
91
|
/**
|
|
95
|
-
* Checks if a value is an object
|
|
96
|
-
*
|
|
97
|
-
* @
|
|
92
|
+
* Checks if a value is an object.
|
|
93
|
+
*
|
|
94
|
+
* @param val - The value to check.
|
|
95
|
+
* @returns {boolean} True if the value is an object, false otherwise.
|
|
98
96
|
*/
|
|
99
97
|
declare const isObject: (val: unknown) => val is Record<any, unknown>;
|
|
100
98
|
/**
|
|
101
|
-
* Checks if a value is a Promise
|
|
102
|
-
*
|
|
103
|
-
* @
|
|
104
|
-
* @
|
|
99
|
+
* Checks if a value is a Promise.
|
|
100
|
+
*
|
|
101
|
+
* @template T - The type of the Promise's resolved value.
|
|
102
|
+
* @param val - The value to check.
|
|
103
|
+
* @returns True if the value is a Promise, false otherwise.
|
|
105
104
|
*/
|
|
106
105
|
declare function isPromise<T = unknown>(val: unknown): val is Promise<T>;
|
|
107
106
|
/**
|
|
108
|
-
* Checks if a value is an Array
|
|
109
|
-
*
|
|
107
|
+
* Checks if a value is an Array.
|
|
108
|
+
*
|
|
109
|
+
* @param arg - The value to check.
|
|
110
|
+
* @returns True if the value is an array, false otherwise.
|
|
110
111
|
*/
|
|
111
112
|
declare const isArray: (arg: any) => arg is any[];
|
|
112
113
|
/**
|
|
113
|
-
* Checks if a value is a string
|
|
114
|
-
*
|
|
115
|
-
* @
|
|
114
|
+
* Checks if a value is a string.
|
|
115
|
+
*
|
|
116
|
+
* @param val - The value to check.
|
|
117
|
+
* @returns True if the value is a string, false otherwise.
|
|
116
118
|
*/
|
|
117
119
|
declare function isString(val: unknown): val is string;
|
|
118
120
|
/**
|
|
119
|
-
* Checks if a value is a number
|
|
120
|
-
*
|
|
121
|
-
* @
|
|
121
|
+
* Checks if a value is a number.
|
|
122
|
+
*
|
|
123
|
+
* @param val - The value to check.
|
|
124
|
+
* @returns True if the value is a number, false otherwise.
|
|
122
125
|
*/
|
|
123
126
|
declare function isNumber(val: unknown): val is number;
|
|
124
127
|
/**
|
|
125
|
-
* Checks if a value is null
|
|
126
|
-
*
|
|
127
|
-
* @
|
|
128
|
+
* Checks if a value is null.
|
|
129
|
+
*
|
|
130
|
+
* @param val - The value to check.
|
|
131
|
+
* @returns True if the value is null, false otherwise.
|
|
128
132
|
*/
|
|
129
133
|
declare function isNull(val: unknown): val is null;
|
|
130
134
|
/**
|
|
131
|
-
* Checks if a value is a Symbol
|
|
132
|
-
*
|
|
133
|
-
* @
|
|
135
|
+
* Checks if a value is a Symbol.
|
|
136
|
+
*
|
|
137
|
+
* @param val - The value to check.
|
|
138
|
+
* @returns True if the value is a Symbol, false otherwise.
|
|
134
139
|
*/
|
|
135
140
|
declare function isSymbol(val: unknown): val is symbol;
|
|
136
141
|
/**
|
|
137
|
-
* Checks if a value is a Set
|
|
138
|
-
*
|
|
139
|
-
* @
|
|
142
|
+
* Checks if a value is a Set.
|
|
143
|
+
*
|
|
144
|
+
* @param val - The value to check.
|
|
145
|
+
* @returns True if the value is a Set, false otherwise.
|
|
140
146
|
*/
|
|
141
147
|
declare function isSet(val: unknown): val is Set<unknown>;
|
|
142
148
|
/**
|
|
143
|
-
* Checks if a value is a WeakMap
|
|
144
|
-
*
|
|
145
|
-
* @
|
|
149
|
+
* Checks if a value is a WeakMap.
|
|
150
|
+
*
|
|
151
|
+
* @param val - The value to check.
|
|
152
|
+
* @returns True if the value is a WeakMap, false otherwise.
|
|
146
153
|
*/
|
|
147
154
|
declare function isWeakMap(val: unknown): val is WeakMap<any, unknown>;
|
|
148
155
|
/**
|
|
149
|
-
* Checks if a value is a WeakSet
|
|
150
|
-
*
|
|
151
|
-
* @
|
|
156
|
+
* Checks if a value is a WeakSet.
|
|
157
|
+
*
|
|
158
|
+
* @param val - The value to check.
|
|
159
|
+
* @returns True if the value is a WeakSet, false otherwise.
|
|
152
160
|
*/
|
|
153
161
|
declare function isWeakSet(val: unknown): val is WeakSet<any>;
|
|
154
162
|
/**
|
|
155
|
-
* Checks if a value is a Map
|
|
156
|
-
*
|
|
157
|
-
* @
|
|
163
|
+
* Checks if a value is a Map.
|
|
164
|
+
*
|
|
165
|
+
* @param val - The value to check.
|
|
166
|
+
* @returns True if the value is a Map, false otherwise.
|
|
158
167
|
*/
|
|
159
168
|
declare function isMap(val: unknown): val is Map<unknown, unknown>;
|
|
160
169
|
/**
|
|
161
|
-
* Checks if a value is null or undefined
|
|
162
|
-
*
|
|
163
|
-
* @
|
|
170
|
+
* Checks if a value is null or undefined.
|
|
171
|
+
*
|
|
172
|
+
* @param val - The value to check.
|
|
173
|
+
* @returns True if the value is null or undefined, false otherwise.
|
|
164
174
|
*/
|
|
165
175
|
declare function isNil(val: unknown): val is null | undefined;
|
|
166
176
|
/**
|
|
167
|
-
* Checks if a value is a function
|
|
168
|
-
*
|
|
169
|
-
* @
|
|
177
|
+
* Checks if a value is a function.
|
|
178
|
+
*
|
|
179
|
+
* @param val - The value to check.
|
|
180
|
+
* @returns {boolean} True if the value is a function, false otherwise.
|
|
170
181
|
*/
|
|
171
182
|
declare const isFunction: (val: unknown) => val is Function;
|
|
172
183
|
/**
|
|
173
|
-
* Checks if a value is falsy (false, null, or undefined)
|
|
174
|
-
*
|
|
175
|
-
* @
|
|
184
|
+
* Checks if a value is falsy (false, null, or undefined).
|
|
185
|
+
*
|
|
186
|
+
* @param val - The value to check.
|
|
187
|
+
* @returns True if the value is falsy, false otherwise.
|
|
176
188
|
*/
|
|
177
189
|
declare function isFalsy(val: unknown): val is false | null | undefined;
|
|
178
190
|
/**
|
|
179
|
-
* Checks if a value is a primitive type
|
|
180
|
-
*
|
|
181
|
-
* @
|
|
191
|
+
* Checks if a value is a primitive type.
|
|
192
|
+
*
|
|
193
|
+
* @param val - The value to check.
|
|
194
|
+
* @returns {boolean} True if the value is a primitive type, false otherwise.
|
|
182
195
|
*/
|
|
183
196
|
declare const isPrimitive: (val: unknown) => val is string | number | boolean | symbol | null | undefined;
|
|
184
197
|
/**
|
|
185
|
-
* Checks if a value is an HTMLElement
|
|
186
|
-
*
|
|
187
|
-
* @
|
|
198
|
+
* Checks if a value is an HTMLElement.
|
|
199
|
+
*
|
|
200
|
+
* @param val - The value to check.
|
|
201
|
+
* @returns True if the value is an HTMLElement, false otherwise.
|
|
188
202
|
*/
|
|
189
203
|
declare function isHTMLElement(val: unknown): val is HTMLElement;
|
|
190
204
|
/**
|
|
191
|
-
* Checks if a value is a plain object
|
|
192
|
-
*
|
|
193
|
-
* @
|
|
205
|
+
* Checks if a value is a plain object.
|
|
206
|
+
*
|
|
207
|
+
* @param val - The value to check.
|
|
208
|
+
* @returns {boolean} True if the value is a plain object, false otherwise.
|
|
194
209
|
*/
|
|
195
210
|
declare const isPlainObject: (val: unknown) => val is object;
|
|
196
211
|
/**
|
|
@@ -199,84 +214,125 @@ declare const isPlainObject: (val: unknown) => val is object;
|
|
|
199
214
|
*/
|
|
200
215
|
type StringNumber = `${number}`;
|
|
201
216
|
/**
|
|
202
|
-
* Checks if a value is a string representation of a number
|
|
203
|
-
*
|
|
204
|
-
* @
|
|
217
|
+
* Checks if a value is a string representation of a number.
|
|
218
|
+
*
|
|
219
|
+
* @param val - The value to check.
|
|
220
|
+
* @returns True if the value is a string number, false otherwise.
|
|
205
221
|
*/
|
|
206
222
|
declare function isStringNumber(val: unknown): val is StringNumber;
|
|
207
223
|
/**
|
|
208
|
-
* Checks if a value is undefined
|
|
209
|
-
*
|
|
210
|
-
* @
|
|
224
|
+
* Checks if a value is undefined.
|
|
225
|
+
*
|
|
226
|
+
* @param val - The value to check.
|
|
227
|
+
* @returns True if the value is undefined, false otherwise.
|
|
211
228
|
*/
|
|
212
229
|
declare function isUndefined(val: unknown): val is undefined;
|
|
213
230
|
/**
|
|
214
|
-
* Checks if a value is a boolean
|
|
215
|
-
*
|
|
216
|
-
* @
|
|
231
|
+
* Checks if a value is a boolean.
|
|
232
|
+
*
|
|
233
|
+
* @param val - The value to check.
|
|
234
|
+
* @returns True if the value is a boolean, false otherwise.
|
|
217
235
|
*/
|
|
218
236
|
declare function isBoolean(val: unknown): val is boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Checks whether the value is `NaN`.
|
|
239
|
+
*
|
|
240
|
+
* @param val - The value to check.
|
|
241
|
+
* @returns True if the value is NaN.
|
|
242
|
+
*/
|
|
219
243
|
declare function isNaN(val: unknown): val is number;
|
|
244
|
+
/**
|
|
245
|
+
* Checks whether the value is a bigint.
|
|
246
|
+
*
|
|
247
|
+
* @param val - The value to check.
|
|
248
|
+
* @returns True if the value is a bigint.
|
|
249
|
+
*/
|
|
250
|
+
declare function isBigint(val: unknown): val is bigint;
|
|
220
251
|
|
|
221
252
|
/**
|
|
222
|
-
* Converts a camelCase string to kebab-case
|
|
223
|
-
*
|
|
224
|
-
* @param
|
|
225
|
-
* @returns {string}
|
|
253
|
+
* Converts a camelCase string to kebab-case.
|
|
254
|
+
*
|
|
255
|
+
* @param str - The camelCase string to convert.
|
|
256
|
+
* @returns {string} The kebab-case string.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```typescript
|
|
260
|
+
* kebabCase('myFunction') // 'my-function'
|
|
261
|
+
* ```
|
|
226
262
|
*/
|
|
227
263
|
declare const kebabCase: (str: string) => string;
|
|
228
264
|
/**
|
|
229
|
-
* Converts a kebab-case or snake_case string to camelCase
|
|
230
|
-
*
|
|
231
|
-
* @param
|
|
232
|
-
* @returns {string}
|
|
265
|
+
* Converts a kebab-case or snake_case string to camelCase.
|
|
266
|
+
*
|
|
267
|
+
* @param str - The kebab-case or snake_case string to convert.
|
|
268
|
+
* @returns {string} The camelCase string.
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* ```typescript
|
|
272
|
+
* camelCase('my-function') // 'myFunction'
|
|
273
|
+
* camelCase('my_function') // 'myFunction'
|
|
274
|
+
* ```
|
|
233
275
|
*/
|
|
234
276
|
declare const camelCase: (str: string) => string;
|
|
235
277
|
/**
|
|
236
|
-
* Capitalizes the first letter of a string
|
|
237
|
-
*
|
|
238
|
-
* @template T - The input string type
|
|
239
|
-
* @param
|
|
240
|
-
* @returns {Capitalize<T>}
|
|
278
|
+
* Capitalizes the first letter of a string.
|
|
279
|
+
*
|
|
280
|
+
* @template T - The input string type.
|
|
281
|
+
* @param str - The string to capitalize.
|
|
282
|
+
* @returns {Capitalize<T>} The capitalized string.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```typescript
|
|
286
|
+
* capitalize('hello') // 'Hello'
|
|
287
|
+
* ```
|
|
241
288
|
*/
|
|
242
289
|
declare const capitalize: <T extends string>(str: T) => Capitalize<T>;
|
|
243
290
|
|
|
244
291
|
/**
|
|
245
|
-
* Outputs a warning level log message
|
|
246
|
-
*
|
|
247
|
-
* @param
|
|
292
|
+
* Outputs a warning level log message.
|
|
293
|
+
*
|
|
294
|
+
* @param msg - The warning message.
|
|
295
|
+
* @param args - Additional arguments to log.
|
|
296
|
+
* @returns {void}
|
|
248
297
|
*/
|
|
249
298
|
declare function warn(msg: string, ...args: unknown[]): void;
|
|
250
299
|
/**
|
|
251
|
-
* Outputs an info level log message
|
|
252
|
-
*
|
|
253
|
-
* @param
|
|
300
|
+
* Outputs an info level log message.
|
|
301
|
+
*
|
|
302
|
+
* @param msg - The info message.
|
|
303
|
+
* @param args - Additional arguments to log.
|
|
304
|
+
* @returns {void}
|
|
254
305
|
*/
|
|
255
306
|
declare function info(msg: string, ...args: unknown[]): void;
|
|
256
307
|
/**
|
|
257
|
-
* Outputs an error level log message
|
|
258
|
-
*
|
|
259
|
-
* @param
|
|
308
|
+
* Outputs an error level log message.
|
|
309
|
+
*
|
|
310
|
+
* @param msg - The error message.
|
|
311
|
+
* @param args - Additional arguments to log.
|
|
312
|
+
* @returns {void}
|
|
260
313
|
*/
|
|
261
314
|
declare function error(msg: string, ...args: unknown[]): void;
|
|
262
315
|
|
|
263
316
|
/**
|
|
264
|
-
* Escapes HTML special characters in a string to their corresponding entity references
|
|
265
|
-
*
|
|
266
|
-
* @
|
|
317
|
+
* Escapes HTML special characters in a string to their corresponding entity references.
|
|
318
|
+
*
|
|
319
|
+
* @param string - The string to escape.
|
|
320
|
+
* @returns {string} The escaped string.
|
|
267
321
|
*/
|
|
268
322
|
declare function escapeHTML(string: unknown): string;
|
|
269
323
|
/**
|
|
270
|
-
* Strips special characters from HTML comments
|
|
271
|
-
*
|
|
272
|
-
* @
|
|
324
|
+
* Strips special characters from HTML comments.
|
|
325
|
+
*
|
|
326
|
+
* @param src - The source string.
|
|
327
|
+
* @returns {string} The cleaned string.
|
|
273
328
|
*/
|
|
274
329
|
declare function escapeHTMLComment(src: string): string;
|
|
275
330
|
/**
|
|
276
|
-
* Escapes special characters in CSS variable names
|
|
277
|
-
*
|
|
278
|
-
* @param
|
|
279
|
-
* @
|
|
331
|
+
* Escapes special characters in CSS variable names.
|
|
332
|
+
*
|
|
333
|
+
* @param key - The CSS variable name.
|
|
334
|
+
* @param doubleEscape - Whether to apply double escaping.
|
|
335
|
+
* @returns The escaped CSS variable name.
|
|
280
336
|
*/
|
|
281
337
|
declare function getEscapedCssVarName(key: string, doubleEscape: boolean): string;
|
|
282
338
|
|
|
@@ -288,8 +344,17 @@ declare const isBooleanAttr: (key: string) => boolean;
|
|
|
288
344
|
/**
|
|
289
345
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
290
346
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
347
|
+
*
|
|
348
|
+
* @param value - The value to check.
|
|
349
|
+
* @returns True if the attribute should be included.
|
|
291
350
|
*/
|
|
292
351
|
declare function includeBooleanAttr(value: unknown): boolean;
|
|
352
|
+
/**
|
|
353
|
+
* Checks whether an attribute name is safe to render during SSR.
|
|
354
|
+
*
|
|
355
|
+
* @param name - The attribute name to check.
|
|
356
|
+
* @returns True if the attribute name is safe.
|
|
357
|
+
*/
|
|
293
358
|
declare function isSSRSafeAttrName(name: string): boolean;
|
|
294
359
|
declare const propsToAttrMap: Record<string, string | undefined>;
|
|
295
360
|
/**
|
|
@@ -303,14 +368,9 @@ declare const isKnownHtmlAttr: (key: string) => boolean;
|
|
|
303
368
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
|
304
369
|
*/
|
|
305
370
|
declare const isKnownSvgAttr: (key: string) => boolean;
|
|
306
|
-
/**
|
|
307
|
-
* Shared between server-renderer and runtime-core hydration logic
|
|
308
|
-
*/
|
|
309
|
-
declare function isRenderAbleAttrValue(value: unknown): boolean;
|
|
310
371
|
declare const isHTMLTag: (key: string) => boolean;
|
|
311
372
|
declare const isSVGTag: (key: string) => boolean;
|
|
312
373
|
declare const isMathMLTag: (key: string) => boolean;
|
|
313
|
-
declare const isVoidTag: (key: string) => boolean;
|
|
314
374
|
declare const isSelfClosingTag: (key: string) => boolean;
|
|
315
375
|
declare const isDelegatedEvent: (key: string) => boolean;
|
|
316
376
|
|
|
@@ -368,41 +428,32 @@ type StyleValue = string | NormalizedStyle | StyleValue[] | null | undefined;
|
|
|
368
428
|
*/
|
|
369
429
|
type ClassValue = string | Record<string, boolean> | ClassValue[] | null | undefined;
|
|
370
430
|
/**
|
|
371
|
-
* Parse CSS style string into object format
|
|
431
|
+
* Parse CSS style string into object format.
|
|
372
432
|
*
|
|
373
|
-
* @param cssText - CSS style string
|
|
374
|
-
* @returns Normalized style object
|
|
433
|
+
* @param cssText - CSS style string.
|
|
434
|
+
* @returns {NormalizedStyle} Normalized style object.
|
|
375
435
|
*/
|
|
376
436
|
declare function parseStyleString(cssText: string): NormalizedStyle;
|
|
377
437
|
/**
|
|
378
|
-
* Normalize style value to a unified format
|
|
438
|
+
* Normalize style value to a unified format.
|
|
379
439
|
*
|
|
380
|
-
* @param styleValue - Original style value (object, string, or array)
|
|
381
|
-
* @returns Normalized style object or string
|
|
440
|
+
* @param styleValue - Original style value (object, string, or array).
|
|
441
|
+
* @returns {NormalizedStyle | string | undefined} Normalized style object or string.
|
|
382
442
|
*/
|
|
383
443
|
declare function normalizeStyle(styleValue: unknown): NormalizedStyle | string | undefined;
|
|
384
444
|
/**
|
|
385
|
-
* Convert style object to CSS string
|
|
445
|
+
* Convert style object to CSS string.
|
|
386
446
|
*
|
|
387
|
-
* @param styleValue - Style object or string
|
|
388
|
-
* @returns Formatted CSS string
|
|
447
|
+
* @param styleValue - Style object or string.
|
|
448
|
+
* @returns {string} Formatted CSS string.
|
|
389
449
|
*/
|
|
390
450
|
declare function styleToString(styleValue: NormalizedStyle | string | undefined): string;
|
|
391
451
|
/**
|
|
392
|
-
* Normalize class value to a unified string format
|
|
452
|
+
* Normalize class value to a unified string format.
|
|
393
453
|
*
|
|
394
|
-
* @param classValue - Original class value (string, array, or object)
|
|
395
|
-
* @returns Normalized class name string
|
|
454
|
+
* @param classValue - Original class value (string, array, or object).
|
|
455
|
+
* @returns {string} Normalized class name string.
|
|
396
456
|
*/
|
|
397
457
|
declare function normalizeClassName(classValue: unknown): string;
|
|
398
|
-
/**
|
|
399
|
-
* Convert style object to CSS string
|
|
400
|
-
*
|
|
401
|
-
* Handle different types of style values, and apply CSS variable and kebab-case transformations
|
|
402
|
-
*
|
|
403
|
-
* @param styleValue Style object or string
|
|
404
|
-
* @returns Formatted CSS string
|
|
405
|
-
*/
|
|
406
|
-
declare function styleObjectToString(styleValue: NormalizedStyle | string | undefined): string;
|
|
407
458
|
|
|
408
|
-
export { type ClassValue, EMPTY_ARR, EMPTY_OBJ, type NormalizedStyle, type StringNumber, type StyleValue, cacheStringFunction, camelCase, capitalize, coerceArray, error, escapeHTML, escapeHTMLComment, extend, generateUniqueId, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, includeBooleanAttr, info, isArray, isBoolean, isBooleanAttr, isBrowser, isDelegatedEvent, isFalsy, isFunction, isHTMLElement, isHTMLTag, isHtmlFormElement, isHtmlInputElement, isHtmlSelectElement, isHtmlTextAreaElement, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isNaN, isNil, isNode, isNull, isNumber, isObject, isOn, isPlainObject, isPrimitive, isPromise,
|
|
459
|
+
export { type ClassValue, EMPTY_ARR, EMPTY_OBJ, type NormalizedStyle, type StringNumber, type StyleValue, cacheStringFunction, camelCase, capitalize, coerceArray, error, escapeHTML, escapeHTMLComment, extend, generateUniqueId, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, includeBooleanAttr, info, isArray, isBigint, isBoolean, isBooleanAttr, isBrowser, isDelegatedEvent, isFalsy, isFunction, isHTMLElement, isHTMLTag, isHtmlFormElement, isHtmlInputElement, isHtmlSelectElement, isHtmlTextAreaElement, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isNaN, isNil, isNode, isNull, isNumber, isObject, isOn, isPlainObject, isPrimitive, isPromise, isSSRSafeAttrName, isSVGTag, isSelfClosingTag, isSet, isSpecialBooleanAttr, isString, isStringNumber, isSymbol, isTextNode, isUndefined, isWeakMap, isWeakSet, kebabCase, noop, normalizeClassName, normalizeStyle, parseStyleString, propsToAttrMap, startsWith, styleToString, warn };
|