@unocss/core 0.32.1 → 0.32.9
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/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.cjs +4 -8
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +4 -8
- package/package.json +2 -3
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2021 Anthony Fu <https://github.com/antfu>
|
|
3
|
+
Copyright (c) 2021-PRESENT Anthony Fu <https://github.com/antfu>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -81,14 +81,10 @@ function mergeDeep(original, patch) {
|
|
|
81
81
|
const output = { ...o };
|
|
82
82
|
if (isObject(o) && isObject(p)) {
|
|
83
83
|
Object.keys(p).forEach((key) => {
|
|
84
|
-
if (isObject(p[key]))
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
else
|
|
88
|
-
output[key] = mergeDeep(o[key], p[key]);
|
|
89
|
-
} else {
|
|
84
|
+
if (isObject(o[key]) && isObject(p[key]) || Array.isArray(o[key]) && Array.isArray(p[key]))
|
|
85
|
+
output[key] = mergeDeep(o[key], p[key]);
|
|
86
|
+
else
|
|
90
87
|
Object.assign(output, { [key]: p[key] });
|
|
91
|
-
}
|
|
92
88
|
});
|
|
93
89
|
}
|
|
94
90
|
return output;
|
|
@@ -447,7 +443,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
447
443
|
};
|
|
448
444
|
}
|
|
449
445
|
|
|
450
|
-
const version = "0.32.
|
|
446
|
+
const version = "0.32.9";
|
|
451
447
|
|
|
452
448
|
class UnoGenerator {
|
|
453
449
|
constructor(userConfig = {}, defaults = {}) {
|
package/dist/index.d.ts
CHANGED
|
@@ -309,6 +309,10 @@ interface VariantHandler {
|
|
|
309
309
|
}
|
|
310
310
|
declare type VariantFunction<Theme extends {} = {}> = (matcher: string, context: Readonly<VariantContext<Theme>>) => string | VariantHandler | undefined;
|
|
311
311
|
interface VariantObject<Theme extends {} = {}> {
|
|
312
|
+
/**
|
|
313
|
+
* The name of the variant.
|
|
314
|
+
*/
|
|
315
|
+
name?: string;
|
|
312
316
|
/**
|
|
313
317
|
* The entry function to match and rewrite the selector for futher processing.
|
|
314
318
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -77,14 +77,10 @@ function mergeDeep(original, patch) {
|
|
|
77
77
|
const output = { ...o };
|
|
78
78
|
if (isObject(o) && isObject(p)) {
|
|
79
79
|
Object.keys(p).forEach((key) => {
|
|
80
|
-
if (isObject(p[key]))
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
else
|
|
84
|
-
output[key] = mergeDeep(o[key], p[key]);
|
|
85
|
-
} else {
|
|
80
|
+
if (isObject(o[key]) && isObject(p[key]) || Array.isArray(o[key]) && Array.isArray(p[key]))
|
|
81
|
+
output[key] = mergeDeep(o[key], p[key]);
|
|
82
|
+
else
|
|
86
83
|
Object.assign(output, { [key]: p[key] });
|
|
87
|
-
}
|
|
88
84
|
});
|
|
89
85
|
}
|
|
90
86
|
return output;
|
|
@@ -443,7 +439,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
443
439
|
};
|
|
444
440
|
}
|
|
445
441
|
|
|
446
|
-
const version = "0.32.
|
|
442
|
+
const version = "0.32.9";
|
|
447
443
|
|
|
448
444
|
class UnoGenerator {
|
|
449
445
|
constructor(userConfig = {}, defaults = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/core",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.9",
|
|
4
4
|
"description": "The instant on-demand Atomic CSS engine.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -43,6 +43,5 @@
|
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "unbuild",
|
|
45
45
|
"stub": "unbuild --stub"
|
|
46
|
-
}
|
|
47
|
-
"readme": "# @unocss/core\n\nThe core engine of [UnoCSS](https://github.com/unocss/unocss) without any presets. It can be used as the engine of your own atomic CSS framework.\n\n## Usage\n\n```ts\nimport { createGenerator } from '@unocss/core'\n\nconst generator = createGenerator({ /* user options */ }, { /* default options */ })\n\nconst { css } = await generator.generate(code)\n```\n\n## License\n\nMIT License © 2021-PRESENT [Anthony Fu](https://github.com/antfu)\n\n"
|
|
46
|
+
}
|
|
48
47
|
}
|