@pandacss/postcss 0.3.1 → 0.4.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/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { PluginCreator } from 'postcss';
2
2
 
3
3
  declare const loadConfig: () => any;
4
- declare const pandacss: PluginCreator<{}>;
4
+ declare const pandacss: PluginCreator<{
5
+ configPath?: string;
6
+ }>;
5
7
 
6
8
  export { pandacss as default, loadConfig, pandacss };
package/dist/index.js CHANGED
@@ -36,10 +36,9 @@ var import_module = require("module");
36
36
  var require2 = (0, import_module.createRequire)(importMetaUrl);
37
37
  var PLUGIN_NAME = "pandacss";
38
38
  var interopDefault = (obj) => obj && obj.__esModule ? obj.default : obj;
39
- var loadConfig = () => {
40
- return interopDefault(require2("@pandacss/postcss"));
41
- };
42
- var pandacss = () => {
39
+ var loadConfig = () => interopDefault(require2("@pandacss/postcss"));
40
+ var pandacss = (options = {}) => {
41
+ const { configPath } = options;
43
42
  const builder = new import_node.Builder();
44
43
  return {
45
44
  postcssPlugin: PLUGIN_NAME,
@@ -48,7 +47,7 @@ var pandacss = () => {
48
47
  if (!builder.isValidRoot(root)) {
49
48
  return;
50
49
  }
51
- await builder.setup();
50
+ await builder.setup({ configPath });
52
51
  await builder.extract();
53
52
  builder.registerDependency((dep) => {
54
53
  result.messages.push({
package/dist/index.mjs CHANGED
@@ -4,10 +4,9 @@ import { createRequire } from "module";
4
4
  var require2 = createRequire(import.meta.url);
5
5
  var PLUGIN_NAME = "pandacss";
6
6
  var interopDefault = (obj) => obj && obj.__esModule ? obj.default : obj;
7
- var loadConfig = () => {
8
- return interopDefault(require2("@pandacss/postcss"));
9
- };
10
- var pandacss = () => {
7
+ var loadConfig = () => interopDefault(require2("@pandacss/postcss"));
8
+ var pandacss = (options = {}) => {
9
+ const { configPath } = options;
11
10
  const builder = new Builder();
12
11
  return {
13
12
  postcssPlugin: PLUGIN_NAME,
@@ -16,7 +15,7 @@ var pandacss = () => {
16
15
  if (!builder.isValidRoot(root)) {
17
16
  return;
18
17
  }
19
- await builder.setup();
18
+ await builder.setup({ configPath });
20
19
  await builder.extract();
21
20
  builder.registerDependency((dep) => {
22
21
  result.messages.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/postcss",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "PostCSS integration for Panda CSS",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "dependencies": {
17
17
  "postcss": "^8.4.24",
18
- "@pandacss/node": "0.3.1"
18
+ "@pandacss/node": "0.4.0"
19
19
  },
20
20
  "scripts": {
21
21
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",