@pandacss/postcss 0.0.0-dev-20230609134615

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.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Segun Adebayo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ import { PluginCreator } from 'postcss';
2
+
3
+ declare const loadConfig: () => any;
4
+ declare const pandacss: PluginCreator<{}>;
5
+
6
+ export { pandacss as default, loadConfig, pandacss };
package/dist/index.js ADDED
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ default: () => src_default,
24
+ loadConfig: () => loadConfig,
25
+ pandacss: () => pandacss
26
+ });
27
+ module.exports = __toCommonJS(src_exports);
28
+
29
+ // ../../node_modules/.pnpm/tsup@6.7.0_postcss@8.4.24_typescript@5.1.3/node_modules/tsup/assets/cjs_shims.js
30
+ var getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
31
+ var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
32
+
33
+ // src/index.ts
34
+ var import_node = require("@pandacss/node");
35
+ var import_module = require("module");
36
+ var require2 = (0, import_module.createRequire)(importMetaUrl);
37
+ var PLUGIN_NAME = "pandacss";
38
+ var interopDefault = (obj) => obj && obj.__esModule ? obj.default : obj;
39
+ var loadConfig = () => {
40
+ return interopDefault(require2("@pandacss/postcss"));
41
+ };
42
+ var pandacss = () => {
43
+ const builder = new import_node.Builder();
44
+ return {
45
+ postcssPlugin: PLUGIN_NAME,
46
+ plugins: [
47
+ async function(root, result) {
48
+ if (!builder.isValidRoot(root)) {
49
+ return;
50
+ }
51
+ await builder.setup();
52
+ await builder.extract();
53
+ builder.registerDependency((dep) => {
54
+ result.messages.push({
55
+ ...dep,
56
+ plugin: PLUGIN_NAME,
57
+ parent: result.opts.from
58
+ });
59
+ });
60
+ builder.write(root);
61
+ root.walk((node) => {
62
+ if (!node.source) {
63
+ node.source = root.source;
64
+ }
65
+ });
66
+ }
67
+ ]
68
+ };
69
+ };
70
+ pandacss.postcss = true;
71
+ var src_default = pandacss;
72
+ // Annotate the CommonJS export names for ESM import in node:
73
+ 0 && (module.exports = {
74
+ loadConfig,
75
+ pandacss
76
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,44 @@
1
+ // src/index.ts
2
+ import { Builder } from "@pandacss/node";
3
+ import { createRequire } from "module";
4
+ var require2 = createRequire(import.meta.url);
5
+ var PLUGIN_NAME = "pandacss";
6
+ var interopDefault = (obj) => obj && obj.__esModule ? obj.default : obj;
7
+ var loadConfig = () => {
8
+ return interopDefault(require2("@pandacss/postcss"));
9
+ };
10
+ var pandacss = () => {
11
+ const builder = new Builder();
12
+ return {
13
+ postcssPlugin: PLUGIN_NAME,
14
+ plugins: [
15
+ async function(root, result) {
16
+ if (!builder.isValidRoot(root)) {
17
+ return;
18
+ }
19
+ await builder.setup();
20
+ await builder.extract();
21
+ builder.registerDependency((dep) => {
22
+ result.messages.push({
23
+ ...dep,
24
+ plugin: PLUGIN_NAME,
25
+ parent: result.opts.from
26
+ });
27
+ });
28
+ builder.write(root);
29
+ root.walk((node) => {
30
+ if (!node.source) {
31
+ node.source = root.source;
32
+ }
33
+ });
34
+ }
35
+ ]
36
+ };
37
+ };
38
+ pandacss.postcss = true;
39
+ var src_default = pandacss;
40
+ export {
41
+ src_default as default,
42
+ loadConfig,
43
+ pandacss
44
+ };
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@pandacss/postcss",
3
+ "version": "0.0.0-dev-20230609134615",
4
+ "description": "PostCSS integration for Panda CSS",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "author": "Segun Adebayo <joseshegs@gmail.com>",
9
+ "sideEffects": false,
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "dependencies": {
17
+ "postcss": "^8.4.23",
18
+ "@pandacss/node": "0.0.0-dev-20230609134615"
19
+ },
20
+ "scripts": {
21
+ "build": "tsup src/index.ts --format=cjs,esm --shims --dts",
22
+ "build-fast": "tsup src/index.ts --format=cjs,esm --shims --no-dts",
23
+ "dev": "pnpm build-fast --watch"
24
+ }
25
+ }