catom 1.2.7 → 1.3.0

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 CHANGED
@@ -136,7 +136,7 @@ and then inject it using a template parameter.
136
136
  </head>
137
137
  ```
138
138
 
139
- uses parcel css under the hood
139
+ it also allows you to use postCSS plugins by importing the `transformCSS` and/or `autoPrefixCSS` functions
140
140
 
141
141
  # 0 Runtime
142
142
 
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/css.js CHANGED
@@ -1,13 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.emitCSS = exports.autoPrefixCSS = void 0;
4
- const css_1 = require("@parcel/css");
4
+ const lightningcss_1 = require("lightningcss");
5
5
  const cssTransform_1 = require("./plugin/cssTransform");
6
6
  Object.defineProperty(exports, "emitCSS", { enumerable: true, get: function () { return cssTransform_1.emitCSS; } });
7
7
  async function transformCSS(css, ...plugins) {
8
8
  css = css || (0, cssTransform_1.emitCSS)();
9
- const { code } = (0, css_1.transform)({
9
+ const { code } = (0, lightningcss_1.transform)({
10
10
  code: Buffer.from(css),
11
+ drafts: { customMedia: true, nesting: true },
12
+ minify: true,
11
13
  filename: "style.css",
12
14
  sourceMap: false,
13
15
  // browserslist hardcoded
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catom",
3
- "version": "1.2.7",
3
+ "version": "1.3.0",
4
4
  "description": "0 runtime CSS in JS tool",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -21,19 +21,19 @@
21
21
  "sideEffects": false,
22
22
  "homepage": "https://github.com/Hydrophobefireman/catom#readme",
23
23
  "devDependencies": {
24
- "@babel/types": "^7.15.6",
24
+ "@babel/types": "^7.20.2",
25
25
  "@types/babel__template": "^7.4.1",
26
- "@types/babel__traverse": "^7.14.2",
27
- "@types/estree": "^0.0.50",
28
- "@types/node": "^16.10.8",
29
- "typescript": "^4.4.4"
26
+ "@types/babel__traverse": "^7.18.2",
27
+ "@types/estree": "^1.0.0",
28
+ "@types/node": "^18.11.9",
29
+ "typescript": "^4.8.4"
30
30
  },
31
31
  "peerDependencies": {
32
- "@parcel/css": "^1.5.0"
32
+ "lightningcss": "^1.16.0"
33
33
  },
34
34
  "dependencies": {
35
- "@babel/template": "^7.15.4",
36
- "@babel/traverse": "^7.15.4",
37
- "csstype": "^3.0.9"
35
+ "@babel/template": "^7.18.10",
36
+ "@babel/traverse": "^7.20.1",
37
+ "csstype": "^3.1.1"
38
38
  }
39
39
  }