@unocss/core 0.1.0 → 0.1.4

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/index.js CHANGED
@@ -1,22 +1,4 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
2
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
21
3
  var __export = (target, all) => {
22
4
  __markAsModule(target);
@@ -119,7 +101,7 @@ function mergeDeep(original, patch) {
119
101
  return [...o, ...p];
120
102
  if (Array.isArray(o))
121
103
  return [...o];
122
- const output = __spreadValues({}, o);
104
+ const output = { ...o };
123
105
  if (isObject(o) && isObject(p)) {
124
106
  Object.keys(p).forEach((key) => {
125
107
  if (isObject(p[key])) {
@@ -414,11 +396,11 @@ function resolveConfig(userConfig = {}, defaults = {}) {
414
396
  ...sortedPresets.map((p) => p.theme || {}),
415
397
  config.theme || {}
416
398
  ].reduce((a, p) => mergeDeep(a, p), {});
417
- return __spreadProps(__spreadValues({
399
+ return {
418
400
  mergeSelectors: true,
419
401
  warnExcluded: true,
420
- excluded: []
421
- }, config), {
402
+ excluded: [],
403
+ ...config,
422
404
  theme,
423
405
  rulesSize,
424
406
  rulesDynamic: rules,
@@ -426,7 +408,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
426
408
  variants: mergePresets("variants"),
427
409
  shortcuts: resolveShortcuts(mergePresets("shortcuts")),
428
410
  extractors
429
- });
411
+ };
430
412
  }
431
413
 
432
414
  // src/generator/utils.ts
package/dist/index.mjs CHANGED
@@ -1,22 +1,4 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
2
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
21
3
  var __export = (target, all) => {
22
4
  __markAsModule(target);
@@ -83,7 +65,7 @@ function mergeDeep(original, patch) {
83
65
  return [...o, ...p];
84
66
  if (Array.isArray(o))
85
67
  return [...o];
86
- const output = __spreadValues({}, o);
68
+ const output = { ...o };
87
69
  if (isObject(o) && isObject(p)) {
88
70
  Object.keys(p).forEach((key) => {
89
71
  if (isObject(p[key])) {
@@ -378,11 +360,11 @@ function resolveConfig(userConfig = {}, defaults = {}) {
378
360
  ...sortedPresets.map((p) => p.theme || {}),
379
361
  config.theme || {}
380
362
  ].reduce((a, p) => mergeDeep(a, p), {});
381
- return __spreadProps(__spreadValues({
363
+ return {
382
364
  mergeSelectors: true,
383
365
  warnExcluded: true,
384
- excluded: []
385
- }, config), {
366
+ excluded: [],
367
+ ...config,
386
368
  theme,
387
369
  rulesSize,
388
370
  rulesDynamic: rules,
@@ -390,7 +372,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
390
372
  variants: mergePresets("variants"),
391
373
  shortcuts: resolveShortcuts(mergePresets("shortcuts")),
392
374
  extractors
393
- });
375
+ };
394
376
  }
395
377
 
396
378
  // src/generator/utils.ts
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
1
  {
2
- "name": "@unocss/core",
3
- "version": "0.1.0",
4
- "description": "",
5
- "keywords": [],
6
- "homepage": "https://github.com/antfu/unocss#readme",
7
- "bugs": {
8
- "url": "https://github.com/antfu/unocss/issues"
9
- },
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/antfu/unocss.git"
13
- },
14
- "funding": "https://github.com/sponsors/antfu",
15
- "license": "MIT",
16
- "author": "Anthony Fu <anthonyfu117@hotmail.com>",
17
- "sideEffects": false,
18
- "exports": {
19
- ".": {
20
- "require": "./dist/index.js",
21
- "import": "./dist/index.mjs"
22
- }
23
- },
24
- "main": "dist/index.js",
25
- "module": "dist/index.mjs",
26
- "types": "dist/index.d.ts",
27
- "files": [
28
- "dist"
29
- ],
30
- "scripts": {
31
- "build": "tsup",
32
- "dev": "tsup --watch src"
33
- }
34
- }
2
+ "name": "@unocss/core",
3
+ "version": "0.1.4",
4
+ "description": "",
5
+ "keywords": [],
6
+ "homepage": "https://github.com/antfu/unocss#readme",
7
+ "bugs": {
8
+ "url": "https://github.com/antfu/unocss/issues"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/antfu/unocss.git"
13
+ },
14
+ "funding": "https://github.com/sponsors/antfu",
15
+ "license": "MIT",
16
+ "author": "Anthony Fu <anthonyfu117@hotmail.com>",
17
+ "sideEffects": false,
18
+ "exports": {
19
+ ".": {
20
+ "require": "./dist/index.js",
21
+ "import": "./dist/index.mjs"
22
+ }
23
+ },
24
+ "main": "dist/index.js",
25
+ "module": "dist/index.mjs",
26
+ "types": "dist/index.d.ts",
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "scripts": {
31
+ "build": "tsup",
32
+ "dev": "tsup --watch src"
33
+ }
34
+ }