@pandacss/node 0.0.0-dev-20230205182145 → 0.0.0-dev-20230206074851

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.
Files changed (4) hide show
  1. package/dist/index.d.ts +36 -339
  2. package/dist/index.js +1866 -2256
  3. package/dist/index.mjs +1873 -2236
  4. package/package.json +14 -12
package/dist/index.js CHANGED
@@ -5,6 +5,12 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
11
+ var __commonJS = (cb, mod) => function __require() {
12
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
+ };
8
14
  var __export = (target, all) => {
9
15
  for (var name in all)
10
16
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -23,2241 +29,1881 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
29
  ));
24
30
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
31
 
32
+ // ../../node_modules/.pnpm/tsup@6.5.0_typescript@4.9.5/node_modules/tsup/assets/cjs_shims.js
33
+ var init_cjs_shims = __esm({
34
+ "../../node_modules/.pnpm/tsup@6.5.0_typescript@4.9.5/node_modules/tsup/assets/cjs_shims.js"() {
35
+ }
36
+ });
37
+
38
+ // ../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js
39
+ var require_eastasianwidth = __commonJS({
40
+ "../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js"(exports, module2) {
41
+ init_cjs_shims();
42
+ var eaw = {};
43
+ if ("undefined" == typeof module2) {
44
+ window.eastasianwidth = eaw;
45
+ } else {
46
+ module2.exports = eaw;
47
+ }
48
+ eaw.eastAsianWidth = function(character) {
49
+ var x = character.charCodeAt(0);
50
+ var y = character.length == 2 ? character.charCodeAt(1) : 0;
51
+ var codePoint = x;
52
+ if (55296 <= x && x <= 56319 && (56320 <= y && y <= 57343)) {
53
+ x &= 1023;
54
+ y &= 1023;
55
+ codePoint = x << 10 | y;
56
+ codePoint += 65536;
57
+ }
58
+ if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) {
59
+ return "F";
60
+ }
61
+ if (8361 == codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) {
62
+ return "H";
63
+ }
64
+ if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) {
65
+ return "W";
66
+ }
67
+ if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 == codePoint || 175 == codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) {
68
+ return "Na";
69
+ }
70
+ if (161 == codePoint || 164 == codePoint || 167 <= codePoint && codePoint <= 168 || 170 == codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 == codePoint || 208 == codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 == codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 == codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 == codePoint || 254 == codePoint || 257 == codePoint || 273 == codePoint || 275 == codePoint || 283 == codePoint || 294 <= codePoint && codePoint <= 295 || 299 == codePoint || 305 <= codePoint && codePoint <= 307 || 312 == codePoint || 319 <= codePoint && codePoint <= 322 || 324 == codePoint || 328 <= codePoint && codePoint <= 331 || 333 == codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 == codePoint || 462 == codePoint || 464 == codePoint || 466 == codePoint || 468 == codePoint || 470 == codePoint || 472 == codePoint || 474 == codePoint || 476 == codePoint || 593 == codePoint || 609 == codePoint || 708 == codePoint || 711 == codePoint || 713 <= codePoint && codePoint <= 715 || 717 == codePoint || 720 == codePoint || 728 <= codePoint && codePoint <= 731 || 733 == codePoint || 735 == codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 == codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 == codePoint || 8208 == codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 == codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 == codePoint || 8251 == codePoint || 8254 == codePoint || 8308 == codePoint || 8319 == codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 == codePoint || 8451 == codePoint || 8453 == codePoint || 8457 == codePoint || 8467 == codePoint || 8470 == codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 == codePoint || 8491 == codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 == codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 == codePoint || 8660 == codePoint || 8679 == codePoint || 8704 == codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 == codePoint || 8719 == codePoint || 8721 == codePoint || 8725 == codePoint || 8730 == codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 == codePoint || 8741 == codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 == codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 == codePoint || 8780 == codePoint || 8786 == codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 == codePoint || 8857 == codePoint || 8869 == codePoint || 8895 == codePoint || 8978 == codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 == codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 == codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 == codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 == codePoint || 9758 == codePoint || 9792 == codePoint || 9794 == codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 == codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 == codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 == codePoint || 10071 == codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 == codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) {
71
+ return "A";
72
+ }
73
+ return "N";
74
+ };
75
+ eaw.characterLength = function(character) {
76
+ var code = this.eastAsianWidth(character);
77
+ if (code == "F" || code == "W" || code == "A") {
78
+ return 2;
79
+ } else {
80
+ return 1;
81
+ }
82
+ };
83
+ function stringToArray(string) {
84
+ return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
85
+ }
86
+ eaw.length = function(string) {
87
+ var characters = stringToArray(string);
88
+ var len = 0;
89
+ for (var i = 0; i < characters.length; i++) {
90
+ len = len + this.characterLength(characters[i]);
91
+ }
92
+ return len;
93
+ };
94
+ eaw.slice = function(text, start, end) {
95
+ textLen = eaw.length(text);
96
+ start = start ? start : 0;
97
+ end = end ? end : 1;
98
+ if (start < 0) {
99
+ start = textLen + start;
100
+ }
101
+ if (end < 0) {
102
+ end = textLen + end;
103
+ }
104
+ var result = "";
105
+ var eawLen = 0;
106
+ var chars = stringToArray(text);
107
+ for (var i = 0; i < chars.length; i++) {
108
+ var char = chars[i];
109
+ var charLen = eaw.length(char);
110
+ if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
111
+ if (eawLen + charLen <= end) {
112
+ result += char;
113
+ } else {
114
+ break;
115
+ }
116
+ }
117
+ eawLen += charLen;
118
+ }
119
+ return result;
120
+ };
121
+ }
122
+ });
123
+
124
+ // ../../node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js
125
+ var require_emoji_regex = __commonJS({
126
+ "../../node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js"(exports, module2) {
127
+ "use strict";
128
+ init_cjs_shims();
129
+ module2.exports = function() {
130
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
131
+ };
132
+ }
133
+ });
134
+
135
+ // ../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json
136
+ var require_boxes = __commonJS({
137
+ "../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json"(exports, module2) {
138
+ module2.exports = {
139
+ single: {
140
+ topLeft: "\u250C",
141
+ top: "\u2500",
142
+ topRight: "\u2510",
143
+ right: "\u2502",
144
+ bottomRight: "\u2518",
145
+ bottom: "\u2500",
146
+ bottomLeft: "\u2514",
147
+ left: "\u2502"
148
+ },
149
+ double: {
150
+ topLeft: "\u2554",
151
+ top: "\u2550",
152
+ topRight: "\u2557",
153
+ right: "\u2551",
154
+ bottomRight: "\u255D",
155
+ bottom: "\u2550",
156
+ bottomLeft: "\u255A",
157
+ left: "\u2551"
158
+ },
159
+ round: {
160
+ topLeft: "\u256D",
161
+ top: "\u2500",
162
+ topRight: "\u256E",
163
+ right: "\u2502",
164
+ bottomRight: "\u256F",
165
+ bottom: "\u2500",
166
+ bottomLeft: "\u2570",
167
+ left: "\u2502"
168
+ },
169
+ bold: {
170
+ topLeft: "\u250F",
171
+ top: "\u2501",
172
+ topRight: "\u2513",
173
+ right: "\u2503",
174
+ bottomRight: "\u251B",
175
+ bottom: "\u2501",
176
+ bottomLeft: "\u2517",
177
+ left: "\u2503"
178
+ },
179
+ singleDouble: {
180
+ topLeft: "\u2553",
181
+ top: "\u2500",
182
+ topRight: "\u2556",
183
+ right: "\u2551",
184
+ bottomRight: "\u255C",
185
+ bottom: "\u2500",
186
+ bottomLeft: "\u2559",
187
+ left: "\u2551"
188
+ },
189
+ doubleSingle: {
190
+ topLeft: "\u2552",
191
+ top: "\u2550",
192
+ topRight: "\u2555",
193
+ right: "\u2502",
194
+ bottomRight: "\u255B",
195
+ bottom: "\u2550",
196
+ bottomLeft: "\u2558",
197
+ left: "\u2502"
198
+ },
199
+ classic: {
200
+ topLeft: "+",
201
+ top: "-",
202
+ topRight: "+",
203
+ right: "|",
204
+ bottomRight: "+",
205
+ bottom: "-",
206
+ bottomLeft: "+",
207
+ left: "|"
208
+ },
209
+ arrow: {
210
+ topLeft: "\u2198",
211
+ top: "\u2193",
212
+ topRight: "\u2199",
213
+ right: "\u2190",
214
+ bottomRight: "\u2196",
215
+ bottom: "\u2191",
216
+ bottomLeft: "\u2197",
217
+ left: "\u2192"
218
+ }
219
+ };
220
+ }
221
+ });
222
+
223
+ // ../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js
224
+ var require_cli_boxes = __commonJS({
225
+ "../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js"(exports, module2) {
226
+ "use strict";
227
+ init_cjs_shims();
228
+ var cliBoxes2 = require_boxes();
229
+ module2.exports = cliBoxes2;
230
+ module2.exports.default = cliBoxes2;
231
+ }
232
+ });
233
+
234
+ // ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
235
+ var require_ansi_regex = __commonJS({
236
+ "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module2) {
237
+ "use strict";
238
+ init_cjs_shims();
239
+ module2.exports = ({ onlyFirst = false } = {}) => {
240
+ const pattern = [
241
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
242
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
243
+ ].join("|");
244
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
245
+ };
246
+ }
247
+ });
248
+
249
+ // ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
250
+ var require_strip_ansi = __commonJS({
251
+ "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module2) {
252
+ "use strict";
253
+ init_cjs_shims();
254
+ var ansiRegex2 = require_ansi_regex();
255
+ module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex2(), "") : string;
256
+ }
257
+ });
258
+
259
+ // ../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
260
+ var require_is_fullwidth_code_point = __commonJS({
261
+ "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module2) {
262
+ "use strict";
263
+ init_cjs_shims();
264
+ var isFullwidthCodePoint = (codePoint) => {
265
+ if (Number.isNaN(codePoint)) {
266
+ return false;
267
+ }
268
+ if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) {
269
+ return true;
270
+ }
271
+ return false;
272
+ };
273
+ module2.exports = isFullwidthCodePoint;
274
+ module2.exports.default = isFullwidthCodePoint;
275
+ }
276
+ });
277
+
278
+ // ../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
279
+ var require_emoji_regex2 = __commonJS({
280
+ "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module2) {
281
+ "use strict";
282
+ init_cjs_shims();
283
+ module2.exports = function() {
284
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
285
+ };
286
+ }
287
+ });
288
+
289
+ // ../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
290
+ var require_string_width = __commonJS({
291
+ "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module2) {
292
+ "use strict";
293
+ init_cjs_shims();
294
+ var stripAnsi2 = require_strip_ansi();
295
+ var isFullwidthCodePoint = require_is_fullwidth_code_point();
296
+ var emojiRegex2 = require_emoji_regex2();
297
+ var stringWidth2 = (string) => {
298
+ if (typeof string !== "string" || string.length === 0) {
299
+ return 0;
300
+ }
301
+ string = stripAnsi2(string);
302
+ if (string.length === 0) {
303
+ return 0;
304
+ }
305
+ string = string.replace(emojiRegex2(), " ");
306
+ let width = 0;
307
+ for (let i = 0; i < string.length; i++) {
308
+ const code = string.codePointAt(i);
309
+ if (code <= 31 || code >= 127 && code <= 159) {
310
+ continue;
311
+ }
312
+ if (code >= 768 && code <= 879) {
313
+ continue;
314
+ }
315
+ if (code > 65535) {
316
+ i++;
317
+ }
318
+ width += isFullwidthCodePoint(code) ? 2 : 1;
319
+ }
320
+ return width;
321
+ };
322
+ module2.exports = stringWidth2;
323
+ module2.exports.default = stringWidth2;
324
+ }
325
+ });
326
+
327
+ // ../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js
328
+ var require_ansi_align = __commonJS({
329
+ "../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js"(exports, module2) {
330
+ "use strict";
331
+ init_cjs_shims();
332
+ var stringWidth2 = require_string_width();
333
+ function ansiAlign2(text, opts) {
334
+ if (!text)
335
+ return text;
336
+ opts = opts || {};
337
+ const align = opts.align || "center";
338
+ if (align === "left")
339
+ return text;
340
+ const split = opts.split || "\n";
341
+ const pad = opts.pad || " ";
342
+ const widthDiffFn = align !== "right" ? halfDiff : fullDiff;
343
+ let returnString = false;
344
+ if (!Array.isArray(text)) {
345
+ returnString = true;
346
+ text = String(text).split(split);
347
+ }
348
+ let width;
349
+ let maxWidth = 0;
350
+ text = text.map(function(str) {
351
+ str = String(str);
352
+ width = stringWidth2(str);
353
+ maxWidth = Math.max(width, maxWidth);
354
+ return {
355
+ str,
356
+ width
357
+ };
358
+ }).map(function(obj) {
359
+ return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str;
360
+ });
361
+ return returnString ? text.join(split) : text;
362
+ }
363
+ ansiAlign2.left = function left(text) {
364
+ return ansiAlign2(text, { align: "left" });
365
+ };
366
+ ansiAlign2.center = function center(text) {
367
+ return ansiAlign2(text, { align: "center" });
368
+ };
369
+ ansiAlign2.right = function right(text) {
370
+ return ansiAlign2(text, { align: "right" });
371
+ };
372
+ module2.exports = ansiAlign2;
373
+ function halfDiff(maxWidth, curWidth) {
374
+ return Math.floor((maxWidth - curWidth) / 2);
375
+ }
376
+ function fullDiff(maxWidth, curWidth) {
377
+ return maxWidth - curWidth;
378
+ }
379
+ }
380
+ });
381
+
26
382
  // src/index.ts
27
383
  var src_exports = {};
28
384
  __export(src_exports, {
29
385
  Builder: () => Builder,
30
386
  createContext: () => createContext,
31
- discardDuplicate: () => import_core5.discardDuplicate,
387
+ discardDuplicate: () => import_core3.discardDuplicate,
32
388
  emitAndExtract: () => emitAndExtract,
33
389
  emitArtifacts: () => emitArtifacts,
34
390
  execCommand: () => execCommand,
35
391
  extractCss: () => extractCss,
36
- generate: () => generate5,
392
+ generate: () => generate,
37
393
  loadConfigAndCreateContext: () => loadConfigAndCreateContext,
38
394
  setupConfig: () => setupConfig,
39
395
  setupGitIgnore: () => setupGitIgnore,
40
396
  setupPostcss: () => setupPostcss
41
397
  });
42
398
  module.exports = __toCommonJS(src_exports);
399
+ init_cjs_shims();
400
+ var import_core3 = require("@pandacss/core");
43
401
 
44
- // ../../node_modules/.pnpm/tsup@6.5.0_typescript@4.9.5/node_modules/tsup/assets/cjs_shims.js
45
- var getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
46
- var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
402
+ // src/builder.ts
403
+ init_cjs_shims();
404
+ var import_core2 = require("@pandacss/core");
405
+ var import_error = require("@pandacss/error");
406
+ var import_logger3 = require("@pandacss/logger");
407
+ var import_shared = require("@pandacss/shared");
408
+ var import_fs = require("fs");
409
+ var import_fs_extra2 = require("fs-extra");
410
+ var import_path3 = require("path");
47
411
 
48
- // src/index.ts
49
- var import_core5 = require("@pandacss/core");
412
+ // src/config.ts
413
+ init_cjs_shims();
414
+ var import_config = require("@pandacss/config");
415
+ var import_look_it_up = require("look-it-up");
416
+
417
+ // src/create-context.ts
418
+ init_cjs_shims();
419
+ var import_generator = require("@pandacss/generator");
420
+ var import_parser = require("@pandacss/parser");
421
+ var import_lil_fp = require("lil-fp");
50
422
 
51
- // src/chunks.ts
423
+ // src/chunk-engine.ts
424
+ init_cjs_shims();
52
425
  var import_core = require("@pandacss/core");
53
- var import_logger2 = require("@pandacss/logger");
426
+ var getChunkEngine = ({ paths, config, runtime: { path, fs } }) => ({
427
+ dir: path.join(...paths.chunk),
428
+ readFile(file) {
429
+ const fileName = path.join(...paths.chunk, this.format(file));
430
+ return fs.existsSync(fileName) ? fs.readFileSync(fileName) : "";
431
+ },
432
+ getFiles() {
433
+ const files = fs.existsSync(this.dir) ? fs.readDirSync(this.dir) : [];
434
+ return files.map((file) => fs.readFileSync(path.join(this.dir, file)));
435
+ },
436
+ format(file) {
437
+ return path.relative(config.cwd, file).replaceAll(path.sep, "__").replace(path.extname(file), ".css");
438
+ },
439
+ getArtifact(file, css) {
440
+ const fileName = this.format(file);
441
+ const newCss = (0, import_core.mergeCss)(this.readFile(file), css);
442
+ return {
443
+ dir: paths.chunk,
444
+ files: [{ file: fileName, code: newCss }]
445
+ };
446
+ },
447
+ rm(file) {
448
+ return fs.rmFileSync(path.join(...paths.chunk, this.format(file)));
449
+ },
450
+ empty() {
451
+ return fs.rmDirSync(this.dir);
452
+ },
453
+ get glob() {
454
+ return [`${this.dir}/**/*.css`];
455
+ }
456
+ });
54
457
 
55
- // src/extract.ts
458
+ // src/node-runtime.ts
459
+ init_cjs_shims();
56
460
  var import_logger = require("@pandacss/logger");
57
- function extractFile(ctx, file) {
58
- import_logger.logger.debug("file:extract", file);
59
- let data;
60
- let result;
61
- const done = import_logger.logger.time.debug(`Extracted ${(0, import_logger.quote)(file)}`);
62
- try {
63
- data = ctx.project.parseSourceFile(ctx.absPath(file));
64
- } catch (error) {
65
- import_logger.logger.error("file:parse", error);
66
- }
67
- if (data) {
68
- result = ctx.getCss(data, file);
69
- }
70
- if (result) {
71
- done();
72
- }
73
- return result;
74
- }
75
- function extractFiles(ctx) {
76
- return ctx.extract(async (file) => {
77
- const result = extractFile(ctx, file);
78
- if (result) {
79
- await ctx.chunks.write(file, result.css);
80
- return result;
461
+ var import_chokidar = __toESM(require("chokidar"));
462
+ var import_fast_glob = __toESM(require("fast-glob"));
463
+ var import_fs_extra = require("fs-extra");
464
+ var import_path = require("path");
465
+ var nodeRuntime = {
466
+ cwd() {
467
+ return process.cwd();
468
+ },
469
+ env(name) {
470
+ return process.env[name];
471
+ },
472
+ path: {
473
+ join: import_path.join,
474
+ relative: import_path.relative,
475
+ dirname: import_path.dirname,
476
+ extname: import_path.extname,
477
+ isAbsolute: import_path.isAbsolute,
478
+ sep: import_path.sep,
479
+ abs(cwd, str) {
480
+ return (0, import_path.isAbsolute)(str) ? str : (0, import_path.join)(cwd, str);
481
+ }
482
+ },
483
+ fs: {
484
+ existsSync: import_fs_extra.existsSync,
485
+ readFileSync(filePath) {
486
+ return (0, import_fs_extra.readFileSync)(filePath, "utf8");
487
+ },
488
+ glob(opts) {
489
+ if (!opts.include)
490
+ return [];
491
+ return import_fast_glob.default.sync(opts.include, { cwd: opts.cwd, ignore: opts.exclude, absolute: true });
492
+ },
493
+ writeFile: import_fs_extra.writeFile,
494
+ writeFileSync: import_fs_extra.writeFileSync,
495
+ readDirSync: import_fs_extra.readdirSync,
496
+ rmDirSync: import_fs_extra.emptyDirSync,
497
+ rmFileSync: import_fs_extra.removeSync,
498
+ ensureDirSync(path) {
499
+ return (0, import_fs_extra.ensureDirSync)(path);
500
+ },
501
+ watch(options) {
502
+ const { include, exclude, cwd, poll } = options;
503
+ const coalesce = poll || process.platform === "win32";
504
+ const watcher = import_chokidar.default.watch(include, {
505
+ usePolling: poll,
506
+ cwd,
507
+ ignoreInitial: true,
508
+ ignorePermissionErrors: true,
509
+ ignored: exclude,
510
+ awaitWriteFinish: coalesce ? { stabilityThreshold: 50, pollInterval: 10 } : false
511
+ });
512
+ import_logger.logger.debug("watch:file", `watching [${include}]`);
513
+ process.once("SIGINT", async () => {
514
+ await watcher.close();
515
+ });
516
+ return watcher;
81
517
  }
82
- });
83
- }
84
- function extractGlobalCss(ctx) {
85
- const css3 = ctx.getGlobalCss();
86
- if (!css3)
87
- return;
88
- return ctx.chunks.write("system/global.css", css3);
89
- }
90
- function extractStaticCss(ctx) {
91
- const css3 = ctx.getStaticCss();
92
- if (!css3)
93
- return;
94
- return ctx.chunks.write("system/static.css", css3);
95
- }
96
-
97
- // src/chunks.ts
98
- async function extractChunks(ctx) {
99
- const sheet = new import_core.Stylesheet(ctx.context(), {
100
- content: [
101
- "@layer reset, base, tokens, recipes, utilities;",
102
- "@import './layout-grid.css';",
103
- ctx.preflight && "@import './reset.css';",
104
- !ctx.tokens.isEmpty && "@import './tokens/index.css';",
105
- ctx.theme.keyframes && "@import './tokens/keyframes.css';"
106
- ].filter(Boolean).join("\n\n")
107
- });
108
- const files = ctx.chunks.getFiles();
109
- await Promise.all(
110
- files.map(async (file) => {
111
- const css3 = await ctx.chunks.readFile(file);
112
- sheet.append(css3);
113
- })
114
- );
115
- return sheet.toCss({ minify: ctx.minify });
116
- }
117
- async function bundleChunks(ctx) {
118
- const css3 = await extractChunks(ctx);
119
- await ctx.write(ctx.paths.root, [{ file: "styles.css", code: css3 }]);
120
- }
121
- async function writeFileChunk(ctx, file) {
122
- import_logger2.logger.info("chunk:change", `File changed: ${file}`);
123
- const result = extractFile(ctx, file);
124
- if (result) {
125
- await ctx.chunks.write(result.file, result.css);
126
518
  }
127
- }
128
-
129
- // src/generators/index.ts
130
- var import_fs2 = require("fs");
131
- var import_outdent24 = __toESM(require("outdent"));
519
+ };
520
+ process.setMaxListeners(Infinity);
521
+ process.on("unhandledRejection", (reason) => {
522
+ import_logger.logger.error("unhandled-rejection", reason);
523
+ });
524
+ process.on("uncaughtException", (reason) => {
525
+ import_logger.logger.error("uncaught-exception", reason);
526
+ });
132
527
 
133
- // src/generators/conditions.ts
134
- var import_outdent = __toESM(require("outdent"));
135
- function generateConditions(ctx) {
136
- const keys = Object.keys(ctx.conditions.values).concat("base");
137
- return {
138
- js: import_outdent.default`
139
- ${ctx.getImport("withoutSpace", "../helpers")}
140
-
141
- const conditions = new Set([${keys.map((key) => JSON.stringify(key))}])
142
-
143
- export function isCondition(value){
144
- return conditions.has(value) || /^@|&|&$/.test(value)
145
- }
146
-
147
- export function finalizeConditions(paths){
148
- return paths.map((path) => {
149
- if (conditions.has(path)){
150
- return path.replace(/^_/, '')
151
- }
152
-
153
- if (/&|@/.test(path)){
154
- return \`[\${withoutSpace(path.trim())}]\`
528
+ // src/output-engine.ts
529
+ init_cjs_shims();
530
+ var getOutputEngine = ({ paths, runtime: { path, fs } }) => ({
531
+ empty() {
532
+ fs.rmDirSync(path.join(...paths.root));
533
+ },
534
+ async write(output) {
535
+ if (!output)
536
+ return;
537
+ const { dir = paths.root, files } = output;
538
+ fs.ensureDirSync(path.join(...dir));
539
+ return Promise.all(
540
+ files.map(async ({ file, code }) => {
541
+ const absPath = path.join(...dir, file);
542
+ if (code) {
543
+ return fs.writeFile(absPath, code);
155
544
  }
156
-
157
- return path
158
- })}
159
-
160
- export function sortConditions(paths){
161
- return paths.sort((a, b) => {
162
- const aa = isCondition(a)
163
- const bb = isCondition(b)
164
- if (aa && !bb) return 1
165
- if (!aa && bb) return -1
166
- return 0
167
- })
168
- }
169
- `,
170
- dts: import_outdent.default`
171
- import type { AnySelector, Selectors } from './selectors'
172
-
173
- export type Conditions = {
174
- ${keys.map((key) => ` ${JSON.stringify(key)}: string`).join("\n")}
175
- }
176
-
177
- export type Condition = keyof Conditions
545
+ })
546
+ );
547
+ }
548
+ });
178
549
 
179
- export type Conditional<V> =
180
- | V
181
- | Array<V | null>
182
- | {
183
- [K in keyof Conditions]?: Conditional<V>
184
- }
185
-
186
- export type ConditionalValue<T> = Conditional<T>
550
+ // src/create-context.ts
551
+ var createContext = (conf) => (0, import_lil_fp.pipe)(
552
+ conf,
553
+ import_generator.createGenerator,
554
+ import_lil_fp.Obj.assign({ runtime: nodeRuntime }),
555
+ (0, import_lil_fp.tap)(({ config, runtime }) => {
556
+ config.cwd ||= runtime.cwd();
557
+ }),
558
+ import_lil_fp.Obj.bind("getFiles", ({ config, runtime: { fs } }) => () => {
559
+ const { include, exclude, cwd } = config;
560
+ return fs.glob({ include, exclude, cwd });
561
+ }),
562
+ import_lil_fp.Obj.bind("project", ({ getFiles, runtime: { fs }, parserOptions }) => {
563
+ return (0, import_parser.createProject)({
564
+ getFiles,
565
+ readFile: fs.readFileSync,
566
+ parserOptions
567
+ });
568
+ }),
569
+ import_lil_fp.Obj.bind("chunks", getChunkEngine),
570
+ import_lil_fp.Obj.bind("output", getOutputEngine)
571
+ );
187
572
 
188
- export type Nested<P> = P & {
189
- [K in Selectors]?: Nested<P>
190
- } & {
191
- [K in AnySelector]?: Nested<P>
192
- } & {
193
- [K in keyof Conditions]?: Nested<P>
573
+ // src/config.ts
574
+ var configs = [".ts", ".js", ".mjs", ".cjs"];
575
+ function findConfig() {
576
+ for (const config of configs) {
577
+ const result = (0, import_look_it_up.lookItUpSync)(`panda.config${config}`);
578
+ if (result) {
579
+ return result;
194
580
  }
195
-
196
- `
197
- };
581
+ }
198
582
  }
199
-
200
- // src/generators/css-fn.ts
201
- var import_outdent2 = require("outdent");
202
- var stringify = (v) => JSON.stringify(Object.fromEntries(v), null, 2);
203
- function generateCssFn(ctx) {
204
- const { utility, hash, conditions } = ctx;
205
- const { separator } = utility;
206
- return {
207
- dts: import_outdent2.outdent`
208
- import type { SystemStyleObject } from '../types'
209
- export declare function css(styles: SystemStyleObject): string
210
- `,
211
- js: import_outdent2.outdent`
212
- ${ctx.getImport("createCss, createMergeCss, hypenateProperty, withoutSpace", "../helpers")}
213
- ${ctx.getImport("sortConditions, finalizeConditions", "./conditions")}
214
-
215
- const classNameMap = ${stringify(utility.entries())}
216
-
217
- const shorthands = ${stringify(utility.shorthands)}
218
-
219
- const breakpointKeys = ${JSON.stringify(conditions.breakpoints.keys)}
220
-
221
- const hasShorthand = ${utility.hasShorthand ? "true" : "false"}
222
-
223
- const resolveShorthand = (prop) => shorthands[prop] || prop
224
-
225
- function transform(prop, value) {
226
- const key = resolveShorthand(prop)
227
- const propKey = classNameMap[key] || hypenateProperty(key)
228
- const className = \`$\{propKey}${separator}$\{withoutSpace(value)}\`
229
- return { className }
230
- }
231
-
232
- const context = {
233
- hash: ${hash ? "true" : "false"},
234
- conditions: {
235
- shift: sortConditions,
236
- finalize: finalizeConditions,
237
- breakpoints: { keys: breakpointKeys }
238
- },
239
- utility: {
240
- prefix: ${ctx.prefix ? JSON.stringify(ctx.prefix) : void 0},
241
- transform,
242
- hasShorthand,
243
- resolveShorthand,
244
- }
245
- }
246
-
247
- export const css = createCss(context)
248
-
249
- export const { mergeCss, assignCss } = createMergeCss(context)
250
- `
251
- };
583
+ async function loadConfigAndCreateContext(options = {}) {
584
+ const { cwd = process.cwd(), config, configPath } = options;
585
+ const conf = await (0, import_config.loadConfigFile)({ cwd, file: configPath });
586
+ if (config) {
587
+ Object.assign(conf.config, config);
588
+ }
589
+ return createContext(conf);
252
590
  }
253
591
 
254
- // src/generators/cva.ts
255
- var import_outdent3 = require("outdent");
256
- function generateCvaFn(ctx) {
257
- return {
258
- js: import_outdent3.outdent`
259
- ${ctx.getImport("compact", "../helpers")}
260
- ${ctx.getImport("css, mergeCss", "./css")}
261
-
262
- export function cva(config) {
263
- const { base = {}, variants = {}, defaultVariants = {} } = config
264
-
265
- function resolve(props) {
266
- const computedVariants = { ...defaultVariants, ...compact(props) }
267
- let result = { ...base }
268
- for (const [key, value] of Object.entries(computedVariants)) {
269
- if (variants[key]?.[value]) {
270
- result = mergeCss(result, variants[key][value])
271
- }
272
- }
273
- return result
274
- }
275
-
276
- function cvaFn(props) {
277
- return css(resolve(props))
278
- }
592
+ // src/extract.ts
593
+ init_cjs_shims();
594
+ var import_logger2 = require("@pandacss/logger");
595
+ var import_lil_fp2 = require("lil-fp");
279
596
 
280
- return Object.assign(cvaFn, {
281
- __cva__: true,
282
- variants: Object.keys(variants),
283
- resolve,
284
- config,
285
- })
286
- }
287
- `,
288
- dts: import_outdent3.outdent`
289
- import type { RecipeCreatorFn } from '../types/recipe'
597
+ // src/cli-box.ts
598
+ init_cjs_shims();
290
599
 
291
- export declare const cva: RecipeCreatorFn
600
+ // ../../node_modules/.pnpm/boxen@7.0.1/node_modules/boxen/index.js
601
+ init_cjs_shims();
602
+ var import_node_process2 = __toESM(require("process"), 1);
292
603
 
293
- `
294
- };
295
- }
604
+ // ../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js
605
+ init_cjs_shims();
296
606
 
297
- // src/generators/cx.ts
298
- var import_outdent4 = __toESM(require("outdent"));
299
- function generateCx() {
300
- return {
301
- js: import_outdent4.default`
302
- function cx() {
303
- let str = '',
304
- i = 0,
305
- arg
306
-
307
- for (; i < arguments.length; ) {
308
- if ((arg = arguments[i++]) && typeof arg === 'string') {
309
- str && (str += ' ')
310
- str += arg
311
- }
312
- }
313
- return str
314
- }
315
-
316
- export { cx }
317
- `,
318
- dts: import_outdent4.default`
319
- type Argument = string | boolean | null | undefined
607
+ // ../../node_modules/.pnpm/strip-ansi@7.0.1/node_modules/strip-ansi/index.js
608
+ init_cjs_shims();
320
609
 
321
- /** Conditionally join classNames into a single string */
322
- export declare function cx(...args: Argument[]): string
323
- `
324
- };
610
+ // ../../node_modules/.pnpm/ansi-regex@6.0.1/node_modules/ansi-regex/index.js
611
+ init_cjs_shims();
612
+ function ansiRegex({ onlyFirst = false } = {}) {
613
+ const pattern = [
614
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
615
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
616
+ ].join("|");
617
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
325
618
  }
326
619
 
327
- // src/generators/get-entrypoint.ts
328
- var import_module = require("module");
329
- var import_path = require("path");
330
- var req = typeof globalThis.require === "function" ? globalThis.require : (0, import_module.createRequire)(importMetaUrl);
331
- function getEntrypoint(pkg, file) {
332
- const { dev, prod = dev } = file;
333
- const entry = req.resolve(pkg);
334
- const isDist = entry.includes("dist");
335
- const isType = pkg.includes("/types");
336
- if (isType) {
337
- return (0, import_path.join)((0, import_path.dirname)(entry), dev);
338
- }
339
- if (!isDist) {
340
- return (0, import_path.join)((0, import_path.dirname)(entry), "src", dev);
341
- }
342
- return (0, import_path.join)((0, import_path.dirname)(entry), prod);
620
+ // ../../node_modules/.pnpm/strip-ansi@7.0.1/node_modules/strip-ansi/index.js
621
+ function stripAnsi(string) {
622
+ if (typeof string !== "string") {
623
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
624
+ }
625
+ return string.replace(ansiRegex(), "");
343
626
  }
344
627
 
345
- // src/generators/is-valid-prop.ts
346
- var import_fs = require("fs");
347
- function generateisValidProp(ctx) {
348
- const filePath = getEntrypoint("@pandacss/is-valid-prop", { dev: "index.ts", prod: "index.mjs" });
349
- let content = (0, import_fs.readFileSync)(filePath, "utf8");
350
- content = content.replace(
351
- "var userGenerated = []",
352
- `var userGenerated = [${ctx.properties.map((key) => JSON.stringify(key)).join(",")}]`
353
- );
354
- return {
355
- js: content
628
+ // ../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js
629
+ var import_eastasianwidth = __toESM(require_eastasianwidth(), 1);
630
+ var import_emoji_regex = __toESM(require_emoji_regex(), 1);
631
+ function stringWidth(string, options = {}) {
632
+ if (typeof string !== "string" || string.length === 0) {
633
+ return 0;
634
+ }
635
+ options = {
636
+ ambiguousIsNarrow: true,
637
+ ...options
356
638
  };
357
- }
358
-
359
- // src/generators/jsx/preact-jsx.ts
360
- var import_outdent5 = require("outdent");
361
- function generatePreactJsxFactory(ctx) {
362
- const { name, componentName } = ctx.jsxFactoryDetails;
363
- return {
364
- js: import_outdent5.outdent`
365
- import { h } from 'preact'
366
- import { forwardRef } from 'preact/compat'
367
- import { useMemo } from 'preact/hooks'
368
- ${ctx.getImport("css, cx, assignCss", "../css/index")}
369
- ${ctx.getImport("splitProps, normalizeHTMLProps", "../helpers")}
370
- ${ctx.getImport("isCssProperty", "./is-valid-prop")}
371
-
372
- function styled(Dynamic, configOrCva = {}) {
373
- const cvaFn = configOrCva.__cva__ ? configOrCva : cva(configOrCva)
374
-
375
- const ${componentName} = forwardRef(function ${componentName}(props, ref) {
376
- const { as: Element = Dynamic, ...restProps } = props
377
-
378
- const [styleProps, variantProps, htmlProps, elementProps] = useMemo(() => {
379
- return splitProps(restProps, isCssProperty, cvaFn.variants, normalizeHTMLProps.keys)
380
- }, [restProps])
381
-
382
- function classes() {
383
- const { css: cssStyles, ...propStyles } = styleProps
384
- const cvaStyles = cvaFn.resolve(variantProps)
385
- const styles = assignCss(cvaStyles, propStyles, cssStyles)
386
- return cx(css(styles), elementProps.className)
387
- }
388
-
389
- return h(Element, {
390
- ...elementProps,
391
- ...normalizeHTMLProps(htmlProps),
392
- ref,
393
- className: classes()
394
- })
395
- })
396
-
397
- ${componentName}.displayName = \`${name}.\${Dynamic}\`
398
- return ${componentName}
639
+ string = stripAnsi(string);
640
+ if (string.length === 0) {
641
+ return 0;
642
+ }
643
+ string = string.replace((0, import_emoji_regex.default)(), " ");
644
+ const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
645
+ let width = 0;
646
+ for (const character of string) {
647
+ const codePoint = character.codePointAt(0);
648
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
649
+ continue;
399
650
  }
400
-
401
- function createJsxFactory() {
402
- const cache = new Map()
403
-
404
- return new Proxy(styled, {
405
- apply(_, __, args) {
406
- return styled(...args)
407
- },
408
- get(_, el) {
409
- if (!cache.has(el)) {
410
- cache.set(el, styled(el))
411
- }
412
- return cache.get(el)
413
- },
414
- })
651
+ if (codePoint >= 768 && codePoint <= 879) {
652
+ continue;
415
653
  }
416
-
417
- export const ${name} = createJsxFactory()
418
- `
419
- };
420
- }
421
-
422
- // src/generators/jsx/preact-layout-grid.ts
423
- var import_outdent6 = require("outdent");
424
- function generatePreactLayoutGrid() {
425
- return {
426
- dts: import_outdent6.outdent`
427
- import { FunctionComponent } from 'preact'
428
-
429
- export type LayoutGridProps = {
430
- count?: number
431
- gutter?: string
432
- maxWidth?: string
433
- margin?: string
434
- outline?: boolean
654
+ const code = import_eastasianwidth.default.eastAsianWidth(character);
655
+ switch (code) {
656
+ case "F":
657
+ case "W":
658
+ width += 2;
659
+ break;
660
+ case "A":
661
+ width += ambiguousCharacterWidth;
662
+ break;
663
+ default:
664
+ width += 1;
435
665
  }
436
-
437
- export declare const LayoutGrid: FunctionComponent<LayoutGridProps>
438
- `,
439
- js: import_outdent6.outdent`
440
- import { h } from 'preact'
441
-
442
- export function LayoutGrid(props) {
443
- const { count = 12, margin, gutter = '24px', maxWidth, outline } = props
444
- const hasMaxWidth = maxWidth != null
445
- return h('div', {
446
- className: 'panda-layout-grid',
447
- style: {
448
- '--gutter': gutter,
449
- '--count': count,
450
- '--max-width': hasMaxWidth ? maxWidth : 'initial',
451
- '--margin-x': hasMaxWidth ? 'auto' : undefined,
452
- '--padding-x': !hasMaxWidth ? margin : undefined,
453
- },
454
- children: Array.from({ length: count }).map((_, i) =>
455
- h('span', {
456
- 'data-variant': outline ? 'outline' : 'bg',
457
- key: i,
458
- className: 'panda-layout-grid__item',
459
- }),
460
- ),
461
- });
666
+ }
667
+ return width;
668
+ }
669
+
670
+ // ../../node_modules/.pnpm/chalk@5.0.1/node_modules/chalk/source/index.js
671
+ init_cjs_shims();
672
+
673
+ // ../../node_modules/.pnpm/chalk@5.0.1/node_modules/chalk/source/vendor/ansi-styles/index.js
674
+ init_cjs_shims();
675
+ var ANSI_BACKGROUND_OFFSET = 10;
676
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
677
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
678
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
679
+ function assembleStyles() {
680
+ const codes = /* @__PURE__ */ new Map();
681
+ const styles2 = {
682
+ modifier: {
683
+ reset: [0, 0],
684
+ bold: [1, 22],
685
+ dim: [2, 22],
686
+ italic: [3, 23],
687
+ underline: [4, 24],
688
+ overline: [53, 55],
689
+ inverse: [7, 27],
690
+ hidden: [8, 28],
691
+ strikethrough: [9, 29]
692
+ },
693
+ color: {
694
+ black: [30, 39],
695
+ red: [31, 39],
696
+ green: [32, 39],
697
+ yellow: [33, 39],
698
+ blue: [34, 39],
699
+ magenta: [35, 39],
700
+ cyan: [36, 39],
701
+ white: [37, 39],
702
+ blackBright: [90, 39],
703
+ redBright: [91, 39],
704
+ greenBright: [92, 39],
705
+ yellowBright: [93, 39],
706
+ blueBright: [94, 39],
707
+ magentaBright: [95, 39],
708
+ cyanBright: [96, 39],
709
+ whiteBright: [97, 39]
710
+ },
711
+ bgColor: {
712
+ bgBlack: [40, 49],
713
+ bgRed: [41, 49],
714
+ bgGreen: [42, 49],
715
+ bgYellow: [43, 49],
716
+ bgBlue: [44, 49],
717
+ bgMagenta: [45, 49],
718
+ bgCyan: [46, 49],
719
+ bgWhite: [47, 49],
720
+ bgBlackBright: [100, 49],
721
+ bgRedBright: [101, 49],
722
+ bgGreenBright: [102, 49],
723
+ bgYellowBright: [103, 49],
724
+ bgBlueBright: [104, 49],
725
+ bgMagentaBright: [105, 49],
726
+ bgCyanBright: [106, 49],
727
+ bgWhiteBright: [107, 49]
462
728
  }
463
- `
464
729
  };
465
- }
466
-
467
- // src/generators/jsx/preact-pattern.ts
468
- var import_outdent7 = require("outdent");
469
- var import_ts_pattern = require("ts-pattern");
470
- function generate(ctx, name, pattern) {
471
- const { upperName, styleFn, dashName, jsxName, props, blocklistType } = ctx.getPatternDetails(name, pattern);
472
- const { typeName } = ctx.jsxFactoryDetails;
473
- return {
474
- name: dashName,
475
- js: import_outdent7.outdent`
476
- import { h } from 'preact'
477
- import { forwardRef } from 'preact/compat'
478
- ${ctx.getImport(ctx.jsxFactory, "./factory")}
479
- ${ctx.getImport(styleFn, `../patterns/${dashName}`)}
480
-
481
- export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
482
- ${(0, import_ts_pattern.match)(props.length).with(
483
- 0,
484
- () => import_outdent7.outdent`
485
- return h(${ctx.jsxFactory}.div, { ref, ...props })
486
- `
487
- ).otherwise(
488
- () => import_outdent7.outdent`
489
- const { ${props.join(", ")}, ...restProps } = props
490
- const styleProps = ${styleFn}({${props.join(", ")}})
491
- return h(${ctx.jsxFactory}.div, { ref, ...styleProps, ...restProps })
492
- `
493
- )}
494
- })
495
- `,
496
- dts: import_outdent7.outdent`
497
- import type { FunctionComponent } from 'preact'
498
- import type { ${upperName}Properties } from '../patterns/${dashName}'
499
- import type { ${typeName} } from '../types/jsx'
500
-
501
- export type ${upperName}Props = ${upperName}Properties & Omit<${typeName}<'div'>, keyof ${upperName}Properties ${blocklistType}>
502
-
503
- ${pattern.description ? `/** ${pattern.description} */` : ""}
504
- export declare const ${jsxName}: FunctionComponent<${upperName}Props>
505
- `
506
- };
507
- }
508
- function generatePreactJsxPattern(ctx) {
509
- return Object.entries(ctx.patterns).map(([name, pattern]) => generate(ctx, name, pattern));
510
- }
511
-
512
- // src/generators/jsx/preact-types.ts
513
- var import_outdent8 = require("outdent");
514
- function generatePreactJsxTypes(ctx) {
515
- const { name, componentName, upperName, typeName } = ctx.jsxFactoryDetails;
516
- return {
517
- jsxFactory: import_outdent8.outdent`
518
- import type { ${upperName} } from '../types/jsx'
519
- export declare const ${name}: ${upperName}
520
- `,
521
- jsxType: import_outdent8.outdent`
522
- import type { JSX, ComponentProps } from 'preact'
523
- import type { JsxStyleProps, Assign } from '.'
524
- import type { RecipeDefinition, RecipeRuntimeFn, RecipeSelection, RecipeVariantRecord } from './recipe'
525
-
526
- type Dict = Record<string, unknown>
527
- type ElementType = keyof JSX.IntrinsicElements
528
-
529
- type HTMLProps = {
530
- htmlSize?: string | number
531
- htmlWidth?: string | number
532
- htmlHeight?: string | number
533
- htmlTranslate?: 'yes' | 'no' | undefined
534
- }
535
-
536
- type Polyfill<T> = Omit<T, 'color' | 'translate' | 'transition' | 'width' | 'height' | 'size'> & HTMLProps
537
-
538
- type Props<T extends Dict, P extends Dict = {}> = Assign<Polyfill<T>, P>
539
-
540
- export type ${componentName}<T extends ElementType, P extends Dict = {}> = {
541
- (props: Props<ComponentProps<T>, P> & JsxStyleProps): JSX.Element
542
- displayName?: string
543
- }
544
-
545
- export type ${upperName} = {
546
- <T extends ElementType, P extends RecipeVariantRecord = {}>(component: T, recipe?: RecipeDefinition<P> | RecipeRuntimeFn<P>): ${componentName}<T, RecipeSelection<P>>
547
- } & { [K in keyof JSX.IntrinsicElements]: ${componentName}<K, {}> }
548
-
549
- export type ${typeName}<T extends ElementType> = Polyfill<ComponentProps<T>> & JsxStyleProps
550
- `
551
- };
552
- }
553
-
554
- // src/generators/jsx/react-jsx.ts
555
- var import_outdent9 = require("outdent");
556
- function generateReactJsxFactory(ctx) {
557
- const { name, componentName } = ctx.jsxFactoryDetails;
558
- return {
559
- js: import_outdent9.outdent`
560
- import { createElement, forwardRef, useMemo } from 'react'
561
- ${ctx.getImport("css, cx, cva, assignCss", "../css/index")}
562
- ${ctx.getImport("splitProps, normalizeHTMLProps", "../helpers")}
563
- ${ctx.getImport("isCssProperty", "./is-valid-prop")}
564
-
565
- function styled(Dynamic, configOrCva = {}) {
566
- const cvaFn = configOrCva.__cva__ ? configOrCva : cva(configOrCva)
567
-
568
- const ${componentName} = forwardRef(function ${componentName}(props, ref) {
569
- const { as: Element = Dynamic, ...restProps } = props
570
-
571
- const [styleProps, variantProps, htmlProps, elementProps] = useMemo(() => {
572
- return splitProps(restProps, isCssProperty, cvaFn.variants, normalizeHTMLProps.keys)
573
- }, [restProps])
574
-
575
- function classes() {
576
- const { css: cssStyles, ...propStyles } = styleProps
577
- const cvaStyles = cvaFn.resolve(variantProps)
578
- const styles = assignCss(cvaStyles, propStyles, cssStyles)
579
- return cx(css(styles), elementProps.className)
580
- }
581
-
582
- return createElement(Element, {
583
- ref,
584
- ...elementProps,
585
- ...normalizeHTMLProps(htmlProps),
586
- className: classes(),
587
- })
588
- })
589
-
590
- ${componentName}.displayName = \`${name}.\${Dynamic}\`
591
- return ${componentName}
730
+ styles2.color.gray = styles2.color.blackBright;
731
+ styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
732
+ styles2.color.grey = styles2.color.blackBright;
733
+ styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
734
+ for (const [groupName, group] of Object.entries(styles2)) {
735
+ for (const [styleName, style] of Object.entries(group)) {
736
+ styles2[styleName] = {
737
+ open: `\x1B[${style[0]}m`,
738
+ close: `\x1B[${style[1]}m`
739
+ };
740
+ group[styleName] = styles2[styleName];
741
+ codes.set(style[0], style[1]);
592
742
  }
593
-
594
- function createJsxFactory() {
595
- const cache = new Map()
596
-
597
- return new Proxy(styled, {
598
- apply(_, __, args) {
599
- return styled(...args)
600
- },
601
- get(_, el) {
602
- if (!cache.has(el)) {
603
- cache.set(el, styled(el))
743
+ Object.defineProperty(styles2, groupName, {
744
+ value: group,
745
+ enumerable: false
746
+ });
747
+ }
748
+ Object.defineProperty(styles2, "codes", {
749
+ value: codes,
750
+ enumerable: false
751
+ });
752
+ styles2.color.close = "\x1B[39m";
753
+ styles2.bgColor.close = "\x1B[49m";
754
+ styles2.color.ansi = wrapAnsi16();
755
+ styles2.color.ansi256 = wrapAnsi256();
756
+ styles2.color.ansi16m = wrapAnsi16m();
757
+ styles2.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
758
+ styles2.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
759
+ styles2.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
760
+ Object.defineProperties(styles2, {
761
+ rgbToAnsi256: {
762
+ value: (red, green, blue) => {
763
+ if (red === green && green === blue) {
764
+ if (red < 8) {
765
+ return 16;
604
766
  }
605
- return cache.get(el)
606
- },
607
- })
608
- }
609
-
610
- export const ${name} = createJsxFactory()
611
-
612
- `
613
- };
614
- }
615
-
616
- // src/generators/jsx/react-layout-grid.ts
617
- var import_outdent10 = require("outdent");
618
- function generateReactLayoutGrid() {
619
- return {
620
- dts: import_outdent10.outdent`
621
- import type { FunctionComponent } from 'react'
622
-
623
- export type LayoutGridProps = {
624
- count?: number
625
- gutter?: string
626
- maxWidth?: string
627
- margin?: string
628
- outline?: boolean
629
- }
630
-
631
- export declare const LayoutGrid: FunctionComponent<LayoutGridProps>
632
- `,
633
- js: import_outdent10.outdent`
634
- import { createElement } from 'react'
635
-
636
- export function LayoutGrid(props) {
637
- const { count = 12, margin, gutter = '24px', maxWidth, outline } = props
638
- const hasMaxWidth = maxWidth != null
639
- return createElement('div', {
640
- className: 'panda-layout-grid',
641
- style: {
642
- '--gutter': gutter,
643
- '--count': count,
644
- '--max-width': hasMaxWidth ? maxWidth : 'initial',
645
- '--margin-x': hasMaxWidth ? 'auto' : undefined,
646
- '--padding-x': !hasMaxWidth ? margin : undefined,
647
- },
648
- children: Array.from({ length: count }).map((_, i) =>
649
- createElement('span', {
650
- 'data-variant': outline ? 'outline' : 'bg',
651
- key: i,
652
- className: 'panda-layout-grid__item',
653
- }),
654
- ),
655
- })
656
- }
657
- `
658
- };
659
- }
660
-
661
- // src/generators/jsx/react-pattern.ts
662
- var import_outdent11 = require("outdent");
663
- var import_ts_pattern2 = require("ts-pattern");
664
- function generate2(ctx, name, pattern) {
665
- const { upperName, styleFn, dashName, jsxName, props, blocklistType } = ctx.getPatternDetails(name, pattern);
666
- const { typeName } = ctx.jsxFactoryDetails;
667
- return {
668
- name: dashName,
669
- js: import_outdent11.outdent`
670
- import { createElement, forwardRef } from 'react'
671
- ${ctx.getImport(ctx.jsxFactory, "./factory")}
672
- ${ctx.getImport(styleFn, `../patterns/${dashName}`)}
673
-
674
- export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
675
- ${(0, import_ts_pattern2.match)(props.length).with(
676
- 0,
677
- () => import_outdent11.outdent`
678
- return createElement(${ctx.jsxFactory}.div, { ref, ...props })
679
- `
680
- ).otherwise(
681
- () => import_outdent11.outdent`
682
- const { ${props.join(", ")}, ...restProps } = props
683
- const styleProps = ${styleFn}({${props.join(", ")}})
684
- return createElement(${ctx.jsxFactory}.div, { ref, ...styleProps, ...restProps })
685
- `
686
- )}
687
- })
688
- `,
689
- dts: import_outdent11.outdent`
690
- import type { FunctionComponent } from 'react'
691
- import type { ${upperName}Properties } from '../patterns/${dashName}'
692
- import type { ${typeName} } from '../types/jsx'
693
-
694
- export type ${upperName}Props = ${upperName}Properties & Omit<${typeName}<'div'>, keyof ${upperName}Properties ${blocklistType}>
695
-
696
- ${pattern.description ? `/** ${pattern.description} */` : ""}
697
- export declare const ${jsxName}: FunctionComponent<${upperName}Props>
698
- `
699
- };
700
- }
701
- function generateReactJsxPattern(ctx) {
702
- return Object.entries(ctx.patterns).map(([name, pattern]) => generate2(ctx, name, pattern));
703
- }
704
-
705
- // src/generators/jsx/react-types.ts
706
- var import_outdent12 = require("outdent");
707
- function generateReactJsxTypes(ctx) {
708
- const { name, componentName, upperName, typeName } = ctx.jsxFactoryDetails;
709
- return {
710
- jsxFactory: import_outdent12.outdent`
711
- import { ${upperName} } from '../types/jsx'
712
- export declare const ${name}: ${upperName}
713
- `,
714
- jsxType: import_outdent12.outdent`
715
- import type { ElementType, ComponentProps } from 'react'
716
- import type { JsxStyleProps, Assign } from '.'
717
- import type { RecipeDefinition, RecipeRuntimeFn, RecipeSelection, RecipeVariantRecord } from './recipe'
718
-
719
- type Dict = Record<string, unknown>
720
-
721
- type HTMLProps = {
722
- htmlSize?: string | number
723
- htmlWidth?: string | number
724
- htmlHeight?: string | number
725
- htmlTranslate?: 'yes' | 'no' | undefined
726
- }
727
-
728
- type Polyfill<T> = Omit<T, 'color' | 'translate' | 'transition' | 'width' | 'height' | 'size'> & HTMLProps
729
-
730
- type Props<T extends Dict, P extends Dict = {}> = Assign<Polyfill<T>, P>
731
-
732
- export type ${componentName}<T extends ElementType, P extends Dict = {}> = {
733
- (props: Props<ComponentProps<T>, P> & JsxStyleProps): JSX.Element
734
- displayName?: string
735
- }
736
-
737
- export type ${upperName} = {
738
- <T extends ElementType, P extends RecipeVariantRecord = {}>(component: T, recipe?: RecipeDefinition<P> | RecipeRuntimeFn<P>): ${componentName}<T, RecipeSelection<P>>
739
- } & { [K in keyof JSX.IntrinsicElements]: ${componentName}<K, {}> }
740
-
741
- export type ${typeName}<T extends ElementType> = Polyfill<ComponentProps<T>> & JsxStyleProps
742
- `
743
- };
744
- }
745
-
746
- // src/generators/jsx/solid-jsx.ts
747
- var import_outdent13 = require("outdent");
748
- function generateSolidJsxFactory(ctx) {
749
- const { componentName, name } = ctx.jsxFactoryDetails;
750
- return {
751
- js: import_outdent13.outdent`
752
- import { Dynamic } from 'solid-js/web'
753
- import { mergeProps, splitProps } from 'solid-js'
754
- import { createComponent } from 'solid-js/web'
755
- ${ctx.getImport("css, cx, cva, assignCss", "../css/index")}
756
- ${ctx.getImport("normalizeHTMLProps", "../helpers")}
757
- ${ctx.getImport("allCssProperties", "./is-valid-prop")}
758
-
759
- function styled(element, configOrCva = {}) {
760
- const cvaFn = configOrCva.__cva__ ? configOrCva : cva(configOrCva)
761
-
762
- return function ${componentName}(props) {
763
- const mergedProps = mergeProps({ as: element }, props)
764
-
765
- const [localProps, styleProps, variantProps, htmlProps, elementProps] = splitProps(
766
- mergedProps,
767
- ['as', 'class'],
768
- allCssProperties,
769
- cvaFn.variants,
770
- normalizeHTMLProps.keys
771
- )
772
-
773
- const classes = () => {
774
- const { css: cssStyles, ...propStyles } = styleProps
775
- const cvaStyles = cvaFn.resolve(variantProps)
776
- const styles = assignCss(cvaStyles, propStyles, cssStyles)
777
- return cx(css(styles), localProps.class)
778
- }
779
-
780
- return createComponent(
781
- Dynamic,
782
- mergeProps(
783
- {
784
- get component() {
785
- return localProps.as
786
- },
787
- get class() {
788
- return classes()
789
- }
790
- },
791
- elementProps,
792
- normalizeHTMLProps(htmlProps)
793
- )
794
- )
795
- }
796
- }
797
-
798
- function createJsxFactory() {
799
- const cache = new Map()
800
-
801
- return new Proxy(styled, {
802
- apply(_, __, args) {
803
- return styled(...args)
804
- },
805
- get(_, el) {
806
- if (!cache.has(el)) {
807
- cache.set(el, styled(el))
767
+ if (red > 248) {
768
+ return 231;
808
769
  }
809
- return cache.get(el)
810
- },
811
- })
812
- }
813
-
814
- export const ${name} = createJsxFactory()
815
- `
816
- };
817
- }
818
-
819
- // src/generators/jsx/solid-layout-grid.ts
820
- var import_outdent14 = require("outdent");
821
- function generateSolidLayoutGrid() {
822
- return {
823
- dts: import_outdent14.outdent`
824
- import type { ParentProps } from 'solid-js'
825
-
826
- export type LayoutGridProps = {
827
- count?: number
828
- gutter?: string
829
- maxWidth?: string
830
- margin?: string
831
- outline?: boolean
832
- }
833
-
834
- export declare const LayoutGrid: ParentProps<LayoutGridProps>
835
- `,
836
- js: import_outdent14.outdent`
837
- import { createComponent, For } from 'solid-js/web'
838
-
839
- export function LayoutGrid(props) {
840
- const { count = 12, margin, gutter = '24px', maxWidth, outline } = props
841
- const hasMaxWidth = maxWidth != null
842
- return createComponent('div', {
843
- className: 'panda-layout-grid',
844
- style: {
845
- '--gutter': gutter,
846
- '--count': count,
847
- '--max-width': hasMaxWidth ? maxWidth : 'initial',
848
- '--margin-x': hasMaxWidth ? 'auto' : undefined,
849
- '--padding-x': !hasMaxWidth ? margin : undefined,
850
- },
851
- get children() {
852
- return createComponent(For, {
853
- get each() {
854
- return Array.from({ length: count })
855
- },
856
- children: () =>
857
- createComponent('span', {
858
- 'data-variant': outline ? 'outline' : 'bg',
859
- className: 'panda-layout-grid__item',
860
- }),
861
- })
862
- },
863
- })
864
- }
865
-
866
- `
867
- };
868
- }
869
-
870
- // src/generators/jsx/solid-pattern.ts
871
- var import_outdent15 = require("outdent");
872
- var import_ts_pattern3 = require("ts-pattern");
873
- function generate3(ctx, name, pattern) {
874
- const { upperName, styleFn, dashName, jsxName, props, blocklistType } = ctx.getPatternDetails(name, pattern);
875
- const { typeName } = ctx.jsxFactoryDetails;
876
- return {
877
- name: dashName,
878
- js: import_outdent15.outdent`
879
- import { splitProps, mergeProps } from 'solid-js'
880
- import { createComponent } from 'solid-js/web'
881
- ${ctx.getImport(ctx.jsxFactory, "./factory")}
882
- ${ctx.getImport(styleFn, `../patterns/${dashName}`)}
883
-
884
- export function ${jsxName}(props) {
885
- ${(0, import_ts_pattern3.match)(props.length).with(
886
- 0,
887
- () => import_outdent15.outdent`
888
- return createComponent(${ctx.jsxFactory}.div, props)
889
- `
890
- ).otherwise(
891
- () => import_outdent15.outdent`
892
- const [patternProps, restProps] = splitProps(props, [${props.map((v) => JSON.stringify(v)).join(", ")}]);
893
- const styleProps = ${styleFn}(patternProps)
894
- return createComponent(${ctx.jsxFactory}.div, mergeProps(styleProps, restProps))
895
- `
896
- )}
897
- }
898
- `,
899
- dts: import_outdent15.outdent`
900
- import { Component } from 'solid-js'
901
- import { ${upperName}Properties } from '../patterns/${dashName}'
902
- import { ${typeName} } from '../types/jsx'
903
-
904
- export type ${upperName}Props = ${upperName}Properties & Omit<${typeName}<'div'>, keyof ${upperName}Properties ${blocklistType}>
905
-
906
- ${pattern.description ? `/** ${pattern.description} */` : ""}
907
- export declare const ${jsxName}: Component<${upperName}Props>
908
- `
909
- };
910
- }
911
- function generateSolidJsxPattern(ctx) {
912
- return Object.entries(ctx.patterns).map(([name, pattern]) => generate3(ctx, name, pattern));
913
- }
914
-
915
- // src/generators/jsx/solid-types.ts
916
- var import_outdent16 = require("outdent");
917
- function generateSolidJsxTypes(ctx) {
918
- const { name, componentName, upperName, typeName } = ctx.jsxFactoryDetails;
919
- return {
920
- jsxFactory: import_outdent16.outdent`
921
- import type { ${upperName} } from '../types/jsx'
922
- export declare const ${name}: ${upperName}
923
- `,
924
- jsxType: import_outdent16.outdent`
925
- import type { JSX, ComponentProps, Component } from 'solid-js'
926
- import type { JsxStyleProps, Assign } from '.'
927
- import type { RecipeDefinition, RecipeRuntimeFn, RecipeSelection, RecipeVariantRecord } from './recipe'
928
-
929
- type Dict = Record<string, unknown>
930
-
931
- type ElementType<P = any> = keyof JSX.IntrinsicElements | Component<P>
932
-
933
- type HTMLProps = {
934
- htmlSize?: string | number
935
- htmlWidth?: string | number
936
- htmlHeight?: string | number
937
- htmlTranslate?: 'yes' | 'no' | undefined
938
- }
939
-
940
- type Polyfill<T> = Omit<T, 'color' | 'translate' | 'transition' | 'width' | 'height' | 'size'> & HTMLProps
941
-
942
- type Props<T extends Dict, P extends Dict = {}> = Assign<Polyfill<T>, P>
943
-
944
- export type ${componentName}<T extends ElementType, P extends Dict = {}> = {
945
- (props: Props<ComponentProps<T>, P> & JsxStyleProps): JSX.Element
946
- displayName?: string
947
- }
948
-
949
- export type ${upperName} = {
950
- <T extends ElementType, P extends RecipeVariantRecord = {}>(component: T, recipe?: RecipeDefinition<P> | RecipeRuntimeFn<P>): ${componentName}<T, RecipeSelection<P>>
951
- } & { [K in keyof JSX.IntrinsicElements]: ${componentName}<K, {}> }
952
-
953
- export type ${typeName}<T extends ElementType> = Polyfill<ComponentProps<T>> & JsxStyleProps
954
- `
955
- };
956
- }
957
-
958
- // src/generators/jsx/index.ts
959
- var typesMap = {
960
- react: generateReactJsxTypes,
961
- preact: generatePreactJsxTypes,
962
- solid: generateSolidJsxTypes
963
- };
964
- function generateJsxTypes(ctx) {
965
- if (!ctx.jsxFramework)
966
- return;
967
- return typesMap[ctx.jsxFramework](ctx);
968
- }
969
- var factoryMap = {
970
- react: generateReactJsxFactory,
971
- solid: generateSolidJsxFactory,
972
- preact: generatePreactJsxFactory
973
- };
974
- function generateJsxFactory(ctx) {
975
- return factoryMap[ctx.jsxFramework](ctx);
976
- }
977
- var patternMap = {
978
- react: generateReactJsxPattern,
979
- solid: generateSolidJsxPattern,
980
- preact: generatePreactJsxPattern
981
- };
982
- function generateJsxPatterns(ctx) {
983
- if (!ctx.hasPatterns)
984
- return [];
985
- return patternMap[ctx.jsxFramework](ctx);
986
- }
987
- var layoutGridMap = {
988
- react: generateReactLayoutGrid,
989
- preact: generatePreactLayoutGrid,
990
- solid: generateSolidLayoutGrid
991
- };
992
- function generateLayoutGrid(ctx) {
993
- return layoutGridMap[ctx.jsxFramework]();
994
- }
995
-
996
- // src/generators/layout-grid.ts
997
- var import_outdent17 = require("outdent");
998
- var css = (v) => v[0];
999
- var layoutGrid = css`
1000
- .panda-layout-grid {
1001
- display: grid;
1002
- gap: var(--gutter);
1003
- grid-template-columns: repeat(var(--count), 1fr);
1004
- height: 100%;
1005
- width: 100%;
1006
- position: absolute;
1007
- inset: 0;
1008
- pointer-events: none;
1009
- max-width: var(--max-width);
1010
- margin-inline: var(--margin-x);
1011
- padding-inline: var(--padding-x);
1012
- }
1013
- .panda-layout-grid__item {
1014
- display: flex;
1015
- --color: rgba(255, 0, 0, 0.1);
1016
- height: 100%;
1017
- }
1018
- .panda-layout-grid__item[data-variant='bg'] {
1019
- background: var(--color);
1020
- }
1021
- .panda-layout-grid__item[data-variant='outline'] {
1022
- border-inline: 1px solid var(--color);
1023
- }
1024
- `;
1025
- function generateLayoutGridCss() {
1026
- return import_outdent17.outdent`
1027
- @layer base {
1028
- ${layoutGrid}
1029
- }`;
1030
- }
1031
-
1032
- // src/generators/pattern.ts
1033
- var import_shared = require("@pandacss/shared");
1034
- var import_outdent18 = require("outdent");
1035
- var import_javascript_stringify = require("javascript-stringify");
1036
- var import_ts_pattern4 = require("ts-pattern");
1037
- function generate4(ctx, name, pattern) {
1038
- const { properties, transform, strict, description } = pattern;
1039
- const { upperName, styleFn, blocklistType } = ctx.getPatternDetails(name, pattern);
1040
- return {
1041
- name: (0, import_shared.dashCase)(name),
1042
- dts: import_outdent18.outdent`
1043
- import type { SystemStyleObject, ConditionalValue } from '../types'
1044
- import type { PropertyValue } from '../types/prop-type'
1045
- import type { Properties } from '../types/csstype'
1046
- import type { Tokens } from '../types/token'
1047
-
1048
- export type ${(0, import_shared.capitalize)(name)}Properties = {
1049
- ${Object.keys(properties ?? {}).map((key) => {
1050
- const value = properties[key];
1051
- return (0, import_ts_pattern4.match)(value).with({ type: "property" }, (value2) => {
1052
- return `${key}?: PropertyValue<'${value2.value}'>`;
1053
- }).with({ type: "token" }, (value2) => {
1054
- if (value2.property) {
1055
- return `${key}?: ConditionalValue<Tokens["${value2.value}"] | Properties["${value2.property}"]>`;
770
+ return Math.round((red - 8) / 247 * 24) + 232;
1056
771
  }
1057
- return `${key}?: ConditionalValue<Tokens["${value2.value}"]>`;
1058
- }).with({ type: "enum" }, (value2) => {
1059
- return `${key}?: ConditionalValue<${(0, import_shared.unionType)(value2.value)}>`;
1060
- }).otherwise(() => {
1061
- return `${key}?: ConditionalValue<${value.type}>`;
1062
- });
1063
- }).join("\n ")}
1064
- }
1065
-
1066
- ${strict ? import_outdent18.outdent`export declare function ${name}(options: ${upperName}Properties): string` : import_outdent18.outdent`
1067
-
1068
- type ${upperName}Options = ${upperName}Properties & Omit<SystemStyleObject, keyof ${upperName}Properties ${blocklistType}>
1069
-
1070
- ${description ? `/** ${description} */` : ""}
1071
- export declare function ${name}(options: ${upperName}Options): string
1072
- `}
1073
-
1074
- `,
1075
- js: import_outdent18.outdent`
1076
- ${ctx.getImport("mapObject", "../helpers")}
1077
- ${ctx.getImport("css", "../css/index")}
1078
-
1079
- const config = ${(0, import_javascript_stringify.stringify)({ transform })}
1080
-
1081
- export const ${styleFn} = (styles) => config.transform(styles, { map: mapObject })
1082
-
1083
- export const ${name} = (styles) => css(${styleFn}(styles))
1084
- `
1085
- };
1086
- }
1087
- function generatePattern(ctx) {
1088
- if (!ctx.hasPatterns)
1089
- return;
1090
- return Object.entries(ctx.patterns).map(([name, pattern]) => generate4(ctx, name, pattern));
1091
- }
1092
-
1093
- // src/generators/pkg-json.ts
1094
- function generatePackageJSON(ctx) {
1095
- const pkg = {
1096
- name: ctx.outdir,
1097
- description: "This package is auto-generated by CSS Panda",
1098
- version: `0.0.0-${performance.now()}`,
1099
- type: "module",
1100
- exports: {
1101
- "./css": { types: "./css/index.d.ts", import: "./css/index.mjs" },
1102
- "./jsx": { types: "./jsx/index.d.ts", import: "./jsx/index.mjs" },
1103
- "./patterns": { types: "./patterns/index.d.ts", import: "./patterns/index.mjs" },
1104
- "./recipes": { types: "./recipes/index.d.ts", import: "./recipes/index.mjs" },
1105
- "./tokens": { types: "./tokens/index.d.ts", import: "./tokens/index.mjs" },
1106
- "./types": { types: "./types/index.d.ts" },
1107
- "./styles.css": "./styles.css"
1108
- }
1109
- };
1110
- return JSON.stringify(pkg, null, 2);
1111
- }
1112
-
1113
- // src/generators/prop-types.ts
1114
- var import_outdent19 = require("outdent");
1115
- function generatePropTypes(utility, strict) {
1116
- const strictText = `${strict ? "" : " | NativeValue<T>"}`;
1117
- const result = [
1118
- import_outdent19.outdent`
1119
- import type { ConditionalValue } from './conditions';
1120
- import type { Properties as CSSProperties } from './csstype'
1121
- import type { Tokens } from './token'
1122
-
1123
- type PropertyValueTypes = {`
1124
- ];
1125
- const types = utility.getTypes();
1126
- for (const [prop, values] of types.entries()) {
1127
- result.push(` ${prop}: ${values.join(" | ")};`);
1128
- }
1129
- result.push("}", "\n");
1130
- result.push(`
1131
- type NativeValue<T> = T extends keyof CSSProperties ? CSSProperties[T] : never
1132
-
1133
- type Shorthand<T> = T extends keyof PropertyValueTypes ? PropertyValueTypes[T]${strictText} : NativeValue<T>
1134
-
1135
- export type PropertyTypes = PropertyValueTypes & {
1136
- `);
1137
- utility.shorthands.forEach((value, key) => {
1138
- result.push(` ${key}: Shorthand<${JSON.stringify(value)}>;`);
1139
- });
1140
- result.push("}");
1141
- return import_outdent19.outdent`
1142
- ${result.join("\n")}
1143
-
1144
- export type PropertyValue<T extends string> = T extends keyof PropertyTypes
1145
- ? ConditionalValue<PropertyTypes[T]${strictText}>
1146
- : T extends keyof CSSProperties
1147
- ? ConditionalValue<CSSProperties[T]>
1148
- : ConditionalValue<string | number>
1149
- `;
1150
- }
1151
-
1152
- // src/generators/recipe.ts
1153
- var import_shared2 = require("@pandacss/shared");
1154
- var import_outdent20 = require("outdent");
1155
- function generateRecipes(ctx) {
1156
- const { recipes = {}, hash, hasRecipes, utility } = ctx;
1157
- const { separator } = utility;
1158
- if (!hasRecipes)
1159
- return;
1160
- const js = [
1161
- import_outdent20.outdent`
1162
- ${ctx.getImport("createCss, withoutSpace, compact", "../helpers")}
1163
-
1164
- const createRecipe = (name, defaultVariants) => {
1165
- return (variants) => {
1166
- const transform = (prop, value) => {
1167
- if (value === '__ignore__') {
1168
- return { className: name }
1169
- }
1170
-
1171
- value = withoutSpace(value)
1172
- return { className: \`\${name}--\${prop}${separator}\${value}\` }
1173
- }
1174
-
1175
- const context = {
1176
- hash: ${hash ? "true" : "false"},
1177
- utility: {
1178
- prefix: ${ctx.prefix ? JSON.stringify(ctx.prefix) : void 0},
1179
- transform,
772
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
773
+ },
774
+ enumerable: false
775
+ },
776
+ hexToRgb: {
777
+ value: (hex) => {
778
+ const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
779
+ if (!matches) {
780
+ return [0, 0, 0];
1180
781
  }
1181
- }
1182
-
1183
- const css = createCss(context)
1184
-
1185
- return css({
1186
- [name]: '__ignore__',
1187
- ...defaultVariants,
1188
- ...compact(variants)
1189
- })
1190
- }
1191
- }
1192
- `
1193
- ];
1194
- const dts = [
1195
- import_outdent20.outdent`
1196
- import type { ConditionalValue } from '../types'
1197
- `
1198
- ];
1199
- Object.values(recipes).forEach((recipe) => {
1200
- const { name, description, defaultVariants, variants } = recipe;
1201
- js.push(import_outdent20.outdent`
1202
- export const ${name} = createRecipe('${name}', ${JSON.stringify(defaultVariants ?? {})})
1203
- ${name}.variants = ${JSON.stringify(Object.keys(variants ?? {}))}
1204
- `);
1205
- dts.push(import_outdent20.outdent`
1206
- export type ${(0, import_shared2.capitalize)(name)}Variants = {
1207
- ${Object.keys(variants ?? {}).map((key) => {
1208
- const value = variants[key];
1209
- const keys = Object.keys(value);
1210
- return `${key}?: ConditionalValue<${(0, import_shared2.unionType)(keys)}>`;
1211
- }).join("\n")}
782
+ let { colorString } = matches.groups;
783
+ if (colorString.length === 3) {
784
+ colorString = [...colorString].map((character) => character + character).join("");
785
+ }
786
+ const integer = Number.parseInt(colorString, 16);
787
+ return [
788
+ integer >> 16 & 255,
789
+ integer >> 8 & 255,
790
+ integer & 255
791
+ ];
792
+ },
793
+ enumerable: false
794
+ },
795
+ hexToAnsi256: {
796
+ value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
797
+ enumerable: false
798
+ },
799
+ ansi256ToAnsi: {
800
+ value: (code) => {
801
+ if (code < 8) {
802
+ return 30 + code;
803
+ }
804
+ if (code < 16) {
805
+ return 90 + (code - 8);
806
+ }
807
+ let red;
808
+ let green;
809
+ let blue;
810
+ if (code >= 232) {
811
+ red = ((code - 232) * 10 + 8) / 255;
812
+ green = red;
813
+ blue = red;
814
+ } else {
815
+ code -= 16;
816
+ const remainder = code % 36;
817
+ red = Math.floor(code / 36) / 5;
818
+ green = Math.floor(remainder / 6) / 5;
819
+ blue = remainder % 6 / 5;
820
+ }
821
+ const value = Math.max(red, green, blue) * 2;
822
+ if (value === 0) {
823
+ return 30;
824
+ }
825
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
826
+ if (value === 2) {
827
+ result += 60;
828
+ }
829
+ return result;
830
+ },
831
+ enumerable: false
832
+ },
833
+ rgbToAnsi: {
834
+ value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
835
+ enumerable: false
836
+ },
837
+ hexToAnsi: {
838
+ value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
839
+ enumerable: false
1212
840
  }
1213
-
1214
- ${description ? `/** ${description} */` : ""}
1215
- export declare function ${name}(variants?: ${(0, import_shared2.capitalize)(name)}Variants): string & { variants: string[] }
1216
- `);
1217
841
  });
842
+ return styles2;
843
+ }
844
+ var ansiStyles = assembleStyles();
845
+ var ansi_styles_default = ansiStyles;
846
+
847
+ // ../../node_modules/.pnpm/chalk@5.0.1/node_modules/chalk/source/vendor/supports-color/index.js
848
+ init_cjs_shims();
849
+ var import_node_process = __toESM(require("process"), 1);
850
+ var import_node_os = __toESM(require("os"), 1);
851
+ var import_node_tty = __toESM(require("tty"), 1);
852
+ function hasFlag(flag, argv = import_node_process.default.argv) {
853
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
854
+ const position = argv.indexOf(prefix + flag);
855
+ const terminatorPosition = argv.indexOf("--");
856
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
857
+ }
858
+ var { env } = import_node_process.default;
859
+ var flagForceColor;
860
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
861
+ flagForceColor = 0;
862
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
863
+ flagForceColor = 1;
864
+ }
865
+ function envForceColor() {
866
+ if ("FORCE_COLOR" in env) {
867
+ if (env.FORCE_COLOR === "true") {
868
+ return 1;
869
+ }
870
+ if (env.FORCE_COLOR === "false") {
871
+ return 0;
872
+ }
873
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
874
+ }
875
+ }
876
+ function translateLevel(level) {
877
+ if (level === 0) {
878
+ return false;
879
+ }
1218
880
  return {
1219
- js: import_outdent20.outdent.string(js.join("\n\n")),
1220
- dts: import_outdent20.outdent.string(dts.join("\n\n"))
881
+ level,
882
+ hasBasic: true,
883
+ has256: level >= 2,
884
+ has16m: level >= 3
1221
885
  };
1222
886
  }
1223
-
1224
- // src/generators/reset.ts
1225
- var css2 = (v) => v[0];
1226
- var reset = css2`
1227
- * {
1228
- margin: 0;
1229
- }
1230
-
1231
- *,
1232
- *::before,
1233
- *::after {
1234
- box-sizing: border-box;
1235
- border-width: 0;
1236
- border-style: solid;
1237
- }
1238
-
1239
- html,
1240
- body {
1241
- height: 100%;
1242
- }
1243
-
1244
- body {
1245
- line-height: 1.5;
1246
- -webkit-text-size-adjust: 100%;
1247
- -webkit-font-smoothing: antialiased;
1248
- }
1249
-
1250
- img {
1251
- border-style: none;
1252
- }
1253
-
1254
- img,
1255
- picture,
1256
- video,
1257
- canvas,
1258
- svg {
1259
- display: block;
1260
- max-width: 100%;
887
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
888
+ const noFlagForceColor = envForceColor();
889
+ if (noFlagForceColor !== void 0) {
890
+ flagForceColor = noFlagForceColor;
1261
891
  }
1262
-
1263
- input,
1264
- button,
1265
- textarea,
1266
- select {
1267
- font: inherit;
892
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
893
+ if (forceColor === 0) {
894
+ return 0;
1268
895
  }
1269
-
1270
- p,
1271
- h1,
1272
- h2,
1273
- h3,
1274
- h4,
1275
- h5,
1276
- h6 {
1277
- overflow-wrap: break-word;
896
+ if (sniffFlags) {
897
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
898
+ return 3;
899
+ }
900
+ if (hasFlag("color=256")) {
901
+ return 2;
902
+ }
1278
903
  }
1279
-
1280
- ::-webkit-search-decoration {
1281
- -webkit-appearance: none;
1282
- appearance: none;
904
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
905
+ return 0;
1283
906
  }
1284
-
1285
- ::-webkit-file-upload-button {
1286
- -webkit-appearance: button;
1287
- appearance: none;
1288
- font: inherit;
907
+ const min = forceColor || 0;
908
+ if (env.TERM === "dumb") {
909
+ return min;
1289
910
  }
1290
-
1291
- ::-webkit-inner-spin-button,
1292
- ::-webkit-outer-spin-button {
1293
- height: auto;
911
+ if (import_node_process.default.platform === "win32") {
912
+ const osRelease = import_node_os.default.release().split(".");
913
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
914
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
915
+ }
916
+ return 1;
1294
917
  }
1295
-
1296
- code,
1297
- kbd,
1298
- pre,
1299
- samp {
1300
- font-size: 1em;
918
+ if ("CI" in env) {
919
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
920
+ return 1;
921
+ }
922
+ return min;
1301
923
  }
1302
-
1303
- table {
1304
- border-collapse: collapse;
924
+ if ("TEAMCITY_VERSION" in env) {
925
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1305
926
  }
1306
-
1307
- textarea {
1308
- resize: vertical;
927
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
928
+ return 1;
1309
929
  }
1310
-
1311
- sub {
1312
- bottom: -0.25em;
930
+ if (env.COLORTERM === "truecolor") {
931
+ return 3;
1313
932
  }
1314
-
1315
- sup {
1316
- top: -0.5em;
1317
- }
1318
- `;
1319
- function generateResetCss() {
1320
- return `@layer reset {
1321
- ${reset}
1322
- }`;
1323
- }
1324
-
1325
- // src/generators/token-css.ts
1326
- var import_core2 = require("@pandacss/core");
1327
- var import_postcss = __toESM(require("postcss"));
1328
- function generateKeyframes(keyframes) {
1329
- if (!keyframes)
1330
- return;
1331
- return (0, import_core2.toKeyframeCss)(keyframes);
1332
- }
1333
- function generateTokenCss(ctx, varRoot) {
1334
- const root = varRoot ?? ctx.cssVarRoot;
1335
- const conditions = ctx.conditions;
1336
- const results = [];
1337
- for (const [key, values] of ctx.tokens.vars.entries()) {
1338
- const varsObj = Object.fromEntries(values);
1339
- if (Object.keys(varsObj).length === 0)
1340
- continue;
1341
- if (key === "base") {
1342
- const { css: css4 } = (0, import_core2.toCss)({ [root]: varsObj });
1343
- results.push(css4);
1344
- } else {
1345
- const keys = key.split(":");
1346
- const { css: css4 } = (0, import_core2.toCss)(varsObj);
1347
- const mapped = keys.map((key2) => conditions.get(key2)).filter(Boolean).map((condition) => {
1348
- const parent = (0, import_core2.extractParentSelectors)(condition);
1349
- return parent ? `&${parent}` : condition;
1350
- });
1351
- const rule = getDeepestRule(root, mapped);
1352
- if (!rule)
1353
- continue;
1354
- getDeepestNode(rule)?.append(css4);
1355
- results.push((0, import_core2.expandNestedCss)(rule.toString()));
933
+ if ("TERM_PROGRAM" in env) {
934
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
935
+ switch (env.TERM_PROGRAM) {
936
+ case "iTerm.app":
937
+ return version >= 3 ? 3 : 2;
938
+ case "Apple_Terminal":
939
+ return 2;
1356
940
  }
1357
941
  }
1358
- const css3 = results.join("\n\n");
1359
- return `@layer tokens {
1360
- ${(0, import_core2.prettifyCss)(cleanupSelectors(css3, root))}
942
+ if (/-256(color)?$/i.test(env.TERM)) {
943
+ return 2;
1361
944
  }
1362
- `;
1363
- }
1364
- function getDeepestRule(root, selectors) {
1365
- const rule = import_postcss.default.rule({ selector: "" });
1366
- for (const selector of selectors) {
1367
- const last = getDeepestNode(rule);
1368
- const node = last ?? rule;
1369
- if (selector.startsWith("@")) {
1370
- const atRule = import_postcss.default.rule({ selector, nodes: [import_postcss.default.rule({ selector: `${root}&` })] });
1371
- node.append(atRule);
1372
- } else {
1373
- node.append(import_postcss.default.rule({ selector }));
1374
- }
945
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
946
+ return 1;
1375
947
  }
1376
- return rule;
1377
- }
1378
- function getDeepestNode(node) {
1379
- if (node.nodes && node.nodes.length) {
1380
- return getDeepestNode(node.nodes[node.nodes.length - 1]);
948
+ if ("COLORTERM" in env) {
949
+ return 1;
1381
950
  }
1382
- return node;
951
+ return min;
1383
952
  }
1384
- function cleanupSelectors(css3, varSelector) {
1385
- const root = import_postcss.default.parse(css3);
1386
- root.walkRules((rule) => {
1387
- rule.selectors.forEach((selector) => {
1388
- const res = selector.split(varSelector).filter(Boolean);
1389
- if (res.length === 0)
1390
- return;
1391
- rule.selector = res.join(varSelector);
1392
- });
953
+ function createSupportsColor(stream, options = {}) {
954
+ const level = _supportsColor(stream, {
955
+ streamIsTTY: stream && stream.isTTY,
956
+ ...options
1393
957
  });
1394
- return root.toString();
958
+ return translateLevel(level);
1395
959
  }
1396
-
1397
- // src/generators/token-dts.ts
1398
- var import_shared3 = require("@pandacss/shared");
1399
- var import_outdent21 = require("outdent");
1400
- var import_pluralize = __toESM(require("pluralize"));
1401
- function generateTokenDts(dict) {
1402
- const set = /* @__PURE__ */ new Set();
1403
- set.add(`export type Token = ${dict.isEmpty ? "string" : (0, import_shared3.unionType)(dict.allNames)}`);
1404
- const result = /* @__PURE__ */ new Set(["export type Tokens = {"]);
1405
- if (dict.isEmpty) {
1406
- result.add("[token: string]: string");
1407
- } else {
1408
- for (const [key, value] of dict.categoryMap.entries()) {
1409
- const typeName = (0, import_shared3.capitalize)(import_pluralize.default.singular(key));
1410
- set.add(`export type ${typeName} = ${(0, import_shared3.unionType)(value.keys())}`);
1411
- set.add(`export type ColorPalette = ${(0, import_shared3.unionType)(Object.keys(dict.colorPalettes))}`);
1412
- result.add(` ${key}: ${typeName}`);
960
+ var supportsColor = {
961
+ stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
962
+ stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
963
+ };
964
+ var supports_color_default = supportsColor;
965
+
966
+ // ../../node_modules/.pnpm/chalk@5.0.1/node_modules/chalk/source/utilities.js
967
+ init_cjs_shims();
968
+ function stringReplaceAll(string, substring, replacer) {
969
+ let index = string.indexOf(substring);
970
+ if (index === -1) {
971
+ return string;
972
+ }
973
+ const substringLength = substring.length;
974
+ let endIndex = 0;
975
+ let returnValue = "";
976
+ do {
977
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
978
+ endIndex = index + substringLength;
979
+ index = string.indexOf(substring, endIndex);
980
+ } while (index !== -1);
981
+ returnValue += string.slice(endIndex);
982
+ return returnValue;
983
+ }
984
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
985
+ let endIndex = 0;
986
+ let returnValue = "";
987
+ do {
988
+ const gotCR = string[index - 1] === "\r";
989
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
990
+ endIndex = index + 1;
991
+ index = string.indexOf("\n", endIndex);
992
+ } while (index !== -1);
993
+ returnValue += string.slice(endIndex);
994
+ return returnValue;
995
+ }
996
+
997
+ // ../../node_modules/.pnpm/chalk@5.0.1/node_modules/chalk/source/index.js
998
+ var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
999
+ var GENERATOR = Symbol("GENERATOR");
1000
+ var STYLER = Symbol("STYLER");
1001
+ var IS_EMPTY = Symbol("IS_EMPTY");
1002
+ var levelMapping = [
1003
+ "ansi",
1004
+ "ansi",
1005
+ "ansi256",
1006
+ "ansi16m"
1007
+ ];
1008
+ var styles = /* @__PURE__ */ Object.create(null);
1009
+ var applyOptions = (object, options = {}) => {
1010
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1011
+ throw new Error("The `level` option should be an integer from 0 to 3");
1012
+ }
1013
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
1014
+ object.level = options.level === void 0 ? colorLevel : options.level;
1015
+ };
1016
+ var chalkFactory = (options) => {
1017
+ const chalk2 = (...strings) => strings.join(" ");
1018
+ applyOptions(chalk2, options);
1019
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
1020
+ return chalk2;
1021
+ };
1022
+ function createChalk(options) {
1023
+ return chalkFactory(options);
1024
+ }
1025
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
1026
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
1027
+ styles[styleName] = {
1028
+ get() {
1029
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
1030
+ Object.defineProperty(this, styleName, { value: builder });
1031
+ return builder;
1413
1032
  }
1414
- }
1415
- result.add("} & { [token: string]: never }");
1416
- set.add(Array.from(result).join("\n"));
1417
- return import_outdent21.outdent.string(Array.from(set).join("\n\n"));
1418
- }
1419
-
1420
- // src/generators/token-js.ts
1421
- var import_outdent22 = __toESM(require("outdent"));
1422
- function generateTokenJs(dict) {
1423
- const map = /* @__PURE__ */ new Map();
1424
- dict.allTokens.forEach((token) => {
1425
- const { varRef } = token.extensions;
1426
- const value = token.isConditional ? varRef : token.value;
1427
- map.set(token.name, { value, variable: varRef });
1428
- });
1429
- const obj = Object.fromEntries(map);
1430
- return {
1431
- js: import_outdent22.default`
1432
- const tokens = ${JSON.stringify(obj, null, 2)}
1433
-
1434
- export function token(path, fallback) {
1435
- return tokens[path]?.value || fallback
1436
- }
1437
-
1438
- function tokenVar(path, fallback) {
1439
- return tokens[path]?.variable || fallback
1440
- }
1441
-
1442
- token.var = tokenVar
1443
- `,
1444
- dts: import_outdent22.default`
1445
- import type { Token } from '../types/token'
1446
-
1447
- export declare function token(path: Token, fallback?: string): string & {
1448
- var: (path: Token, fallback?: string) => string
1449
- }
1450
- `
1451
1033
  };
1452
1034
  }
1453
-
1454
- // src/generators/types.ts
1455
- var import_is_valid_prop = require("@pandacss/is-valid-prop");
1456
- var import_fs_extra = require("fs-extra");
1457
- var import_outdent23 = __toESM(require("outdent"));
1458
- function getType(file) {
1459
- const filepath = getEntrypoint("@pandacss/types", { dev: file });
1460
- return (0, import_fs_extra.readFileSync)(filepath, "utf8");
1461
- }
1462
- function generateCssType(ctx) {
1463
- const propList = new Set(import_is_valid_prop.allCssProperties.concat(ctx.utility.keys()));
1464
- return {
1465
- css: getType("csstype.d.ts"),
1466
- system: getType("system-types.d.ts"),
1467
- selectors: getType("selectors.d.ts"),
1468
- recipe: getType("recipe.d.ts"),
1469
- composition: getType("composition.d.ts"),
1470
- global: import_outdent23.default`
1471
- import { RecipeVariantRecord, RecipeConfig } from './recipe'
1472
- import { GlobalStyleObject } from './system-types'
1473
- import { CompositionStyles } from './composition'
1474
-
1475
- declare module 'css-panda' {
1476
- export function defineRecipe<V extends RecipeVariantRecord>(config: RecipeConfig<V>): RecipeConfig<V>
1477
- export function defineGlobalStyles(definition: GlobalStyleObject): GlobalStyleObject
1478
- export function defineTextStyles(definition: CompositionStyles['textStyles']): CompositionStyles['textStyles']
1479
- export function defineLayerStyles(definition: CompositionStyles['layerStyles']): CompositionStyles['layerStyles']
1480
- }
1481
- `,
1482
- exported: import_outdent23.default`
1483
- import './global'
1484
- export { ConditionalValue } from './conditions'
1485
- export { GlobalStyleObject, JsxStyleProps, SystemStyleObject } from './system-types'
1486
-
1487
- export type Assign<Target, Override> = Omit<Target, keyof Override> & Override
1488
- `,
1489
- styleProps: import_outdent23.default`
1490
- import { PropertyValue } from './prop-type'
1491
- import { Token } from './token'
1492
-
1493
- type CssVarProperties = {
1494
- [key in \`--\${string}\`]?: Token | (string & {}) | (number & {})
1035
+ styles.visible = {
1036
+ get() {
1037
+ const builder = createBuilder(this, this[STYLER], true);
1038
+ Object.defineProperty(this, "visible", { value: builder });
1039
+ return builder;
1040
+ }
1041
+ };
1042
+ var getModelAnsi = (model, level, type, ...arguments_) => {
1043
+ if (model === "rgb") {
1044
+ if (level === "ansi16m") {
1045
+ return ansi_styles_default[type].ansi16m(...arguments_);
1495
1046
  }
1496
-
1497
- export type SystemProperties = CssVarProperties & {
1498
- ${Array.from(propList).map((v) => ` ${v}?: PropertyValue<'${v}'>`).join("\n")}
1047
+ if (level === "ansi256") {
1048
+ return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
1499
1049
  }
1500
- `
1501
- };
1502
- }
1503
-
1504
- // src/generators/index.ts
1505
- function setupHelpers(ctx) {
1506
- const sharedMjs = getEntrypoint("@pandacss/shared", { dev: "shared.mjs" });
1507
- const code = (0, import_fs2.readFileSync)(sharedMjs, "utf-8");
1508
- return {
1509
- files: [{ file: ctx.getExt("helpers"), code }]
1510
- };
1511
- }
1512
- function setupKeyframes(ctx) {
1513
- const code = generateKeyframes(ctx.theme.keyframes);
1514
- return {
1515
- dir: ctx.paths.token,
1516
- files: [{ file: "keyframes.css", code }]
1517
- };
1518
- }
1519
- function setupDesignTokens(ctx) {
1520
- if (ctx.tokens.isEmpty)
1521
- return;
1522
- const code = generateTokenJs(ctx.tokens);
1523
- const css3 = generateTokenCss(ctx);
1524
- return {
1525
- dir: ctx.paths.token,
1526
- files: [
1527
- { file: "index.css", code: css3 },
1528
- { file: "index.d.ts", code: code.dts },
1529
- { file: ctx.getExt("index"), code: code.js }
1530
- ]
1531
- };
1532
- }
1533
- function setupTypes(ctx) {
1534
- const types = generateCssType(ctx);
1535
- const conditions = generateConditions(ctx);
1536
- const jsx = generateJsxTypes(ctx);
1537
- return {
1538
- dir: ctx.paths.types,
1539
- files: [
1540
- jsx ? { file: "jsx.d.ts", code: jsx.jsxType } : null,
1541
- { file: "csstype.d.ts", code: types.css },
1542
- { file: "system-types.d.ts", code: types.system },
1543
- { file: "selectors.d.ts", code: types.selectors },
1544
- { file: "composition.d.ts", code: types.composition },
1545
- { file: "global.d.ts", code: types.global },
1546
- { file: "recipe.d.ts", code: types.recipe },
1547
- { file: "index.d.ts", code: types.exported },
1548
- { file: "token.d.ts", code: generateTokenDts(ctx.tokens) },
1549
- { file: "prop-type.d.ts", code: generatePropTypes(ctx.utility) },
1550
- { file: "style-props.d.ts", code: types.styleProps },
1551
- { file: "conditions.d.ts", code: conditions.dts }
1552
- ].filter(Boolean)
1553
- };
1554
- }
1555
- function setupCss(ctx) {
1556
- const code = generateCssFn(ctx);
1557
- const conditions = generateConditions(ctx);
1558
- return {
1559
- dir: ctx.paths.css,
1560
- files: [
1561
- { file: ctx.getExt("conditions"), code: conditions.js },
1562
- { file: ctx.getExt("css"), code: code.js },
1563
- { file: "css.d.ts", code: code.dts }
1564
- ]
1565
- };
1566
- }
1567
- function setupCva(ctx) {
1568
- const code = generateCvaFn(ctx);
1569
- return {
1570
- dir: ctx.paths.css,
1571
- files: [
1572
- { file: ctx.getExt("cva"), code: code.js },
1573
- { file: "cva.d.ts", code: code.dts }
1574
- ]
1575
- };
1576
- }
1577
- function setupCx(ctx) {
1578
- const code = generateCx();
1579
- return {
1580
- dir: ctx.paths.css,
1581
- files: [
1582
- { file: ctx.getExt("cx"), code: code.js },
1583
- { file: "cx.d.ts", code: code.dts }
1584
- ]
1585
- };
1586
- }
1587
- function setupRecipes(ctx) {
1588
- const code = generateRecipes(ctx);
1589
- if (!code)
1590
- return;
1591
- return {
1592
- dir: ctx.paths.recipe,
1593
- files: [
1594
- { file: ctx.getExt("index"), code: code.js },
1595
- { file: "index.d.ts", code: code.dts }
1596
- ]
1597
- };
1598
- }
1599
- function setupPatterns(ctx) {
1600
- const files = generatePattern(ctx);
1601
- if (!files)
1602
- return;
1603
- const index = {
1604
- js: import_outdent24.default.string(files.map((file) => ctx.getExport(`./${file.name}`)).join("\n")),
1605
- dts: import_outdent24.default.string(files.map((file) => `export * from './${file.name}'`).join("\n"))
1606
- };
1607
- return {
1608
- dir: ctx.paths.pattern,
1609
- files: [
1610
- ...files.map((file) => ({ file: ctx.getExt(file.name), code: file.js })),
1611
- ...files.map((file) => ({ file: `${file.name}.d.ts`, code: file.dts })),
1612
- { file: ctx.getExt("index"), code: index.js },
1613
- { file: "index.d.ts", code: index.dts }
1614
- ]
1615
- };
1616
- }
1617
- function setupJsx(ctx) {
1618
- if (!ctx.jsxFramework)
1619
- return;
1620
- const isValidProp = generateisValidProp(ctx);
1621
- const types = generateJsxTypes(ctx);
1622
- const factory = generateJsxFactory(ctx);
1623
- const patterns = generateJsxPatterns(ctx);
1624
- const layoutGrid2 = generateLayoutGrid(ctx);
1625
- const index = {
1626
- js: import_outdent24.default`
1627
- ${ctx.getExport("./factory")}
1628
- ${ctx.getExport("./layout-grid")}
1629
- ${import_outdent24.default.string(patterns.map((file) => ctx.getExport(`./${file.name}`)).join("\n"))}
1630
- `,
1631
- dts: import_outdent24.default`
1632
- export * from './factory'
1633
- export * from './layout-grid'
1634
- ${import_outdent24.default.string(patterns.map((file) => `export * from './${file.name}'`).join("\n"))}
1635
- export type { ${ctx.jsxFactoryDetails.typeName} } from '../types/jsx'
1636
- `
1637
- };
1638
- return {
1639
- dir: ctx.paths.jsx,
1640
- files: [
1641
- ...patterns.map((file) => ({ file: ctx.getExt(file.name), code: file.js })),
1642
- ...patterns.map((file) => ({ file: `${file.name}.d.ts`, code: file.dts })),
1643
- { file: ctx.getExt("layout-grid"), code: layoutGrid2.js },
1644
- { file: "layout-grid.d.ts", code: layoutGrid2.dts },
1645
- { file: ctx.getExt("is-valid-prop"), code: isValidProp.js },
1646
- { file: "factory.d.ts", code: types.jsxFactory },
1647
- { file: ctx.getExt("factory"), code: factory.js },
1648
- { file: "index.d.ts", code: index.dts },
1649
- { file: ctx.getExt("index"), code: index.js }
1650
- ]
1651
- };
1652
- }
1653
- function setupCssIndex(ctx) {
1654
- const index = {
1655
- js: import_outdent24.default`
1656
- ${ctx.getExport("./css")}
1657
- ${ctx.getExport("./cx")}
1658
- ${ctx.getExport("./cva")}
1659
- `,
1660
- dts: import_outdent24.default`
1661
- export * from './css'
1662
- export * from './cx'
1663
- export * from './cva'
1664
- `
1665
- };
1666
- return {
1667
- dir: ctx.paths.css,
1668
- files: [
1669
- { file: ctx.getExt("index"), code: index.js },
1670
- { file: "index.d.ts", code: index.dts }
1671
- ]
1672
- };
1673
- }
1674
- function setupResetCss(ctx) {
1675
- if (!ctx.preflight)
1676
- return;
1677
- const code = generateResetCss();
1678
- return { files: [{ file: "reset.css", code }] };
1679
- }
1680
- function setupLayoutGridCss() {
1681
- const code = generateLayoutGridCss();
1682
- return { files: [{ file: "layout-grid.css", code }] };
1683
- }
1684
- function setupPackageJson(ctx) {
1685
- if (!ctx.emitPackage)
1686
- return;
1687
- return {
1688
- files: [{ file: "package.json", code: generatePackageJSON(ctx) }]
1689
- };
1690
- }
1691
- function generateSystem(ctx) {
1692
- return [
1693
- setupHelpers(ctx),
1694
- setupDesignTokens(ctx),
1695
- setupKeyframes(ctx),
1696
- setupTypes(ctx),
1697
- setupCva(ctx),
1698
- setupCx(ctx),
1699
- setupCss(ctx),
1700
- setupRecipes(ctx),
1701
- setupPatterns(ctx),
1702
- setupCssIndex(ctx),
1703
- setupJsx(ctx),
1704
- setupResetCss(ctx),
1705
- setupLayoutGridCss(),
1706
- setupPackageJson(ctx)
1707
- ].filter(Boolean);
1708
- }
1709
-
1710
- // src/messages.ts
1711
- var import_logger3 = require("@pandacss/logger");
1712
- var import_outdent25 = require("outdent");
1713
- var tick = import_logger3.colors.green().bold("\u2714\uFE0F");
1714
- function artifactsGeneratedMessage(ctx) {
1715
- return [
1716
- import_outdent25.outdent`
1717
- ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/css")}: the css function to author styles
1718
- `,
1719
- ctx.hasTokens && import_outdent25.outdent`
1720
- ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/tokens")}: the css variables and js function to query your tokens
1721
- `,
1722
- ctx.hasPatterns && import_outdent25.outdent`
1723
- ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/patterns")}: functions to implement common css patterns
1724
- `,
1725
- ctx.hasRecipes && import_outdent25.outdent`
1726
- ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/recipes")}: functions to create multi-variant styles
1727
- `,
1728
- ctx.jsxFramework && import_outdent25.outdent`
1729
- ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/jsx")}: style prop powered elements for ${ctx.jsxFramework}
1730
- `,
1731
- "\n"
1732
- ].filter(Boolean).join("\n");
1733
- }
1734
- function configExistsMessage(cmd) {
1735
- return import_outdent25.outdent`
1736
- \n
1737
- It looks like you already have panda created\`.
1738
-
1739
- You can now run ${(0, import_logger3.quote)(cmd, " panda --watch")}.
1740
-
1741
- `;
1742
- }
1743
- function thankYouMessage() {
1744
- return import_outdent25.outdent`
1745
-
1746
- 🚀 Thanks for choosing ${import_logger3.colors.cyan("Panda")} to write your css.
1747
-
1748
- You are set up to start using Panda!
1749
-
1750
- `;
1751
- }
1752
- var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
1753
- var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
1754
- function scaffoldCompleteMessage() {
1755
- return import_logger3.logger.box(
1756
- import_outdent25.outdent`
1757
-
1758
- ${import_logger3.colors.bold().cyan("Next steps:")}
1759
-
1760
- [1] Create a ${(0, import_logger3.quote)("index.css")} file in your project that contains:
1761
-
1762
- @layer reset, base, tokens, recipes, utilities;
1763
-
1764
-
1765
- [2] Import the ${(0, import_logger3.quote)("index.css")} file at the root of your project.
1766
-
1767
- `,
1768
- `\u{1F43C} ${pickRandom(randomWords)}! \u2728`
1769
- );
1770
- }
1771
- function watchMessage() {
1772
- return import_outdent25.outdent`
1773
- Watching for file changes...
1774
- `;
1775
- }
1776
- function buildCompleteMessage(ctx) {
1777
- return import_outdent25.outdent`
1778
- Successfully extracted css from ${ctx.files.length} file(s) ✨
1779
- `;
1780
- }
1781
-
1782
- // src/artifacts.ts
1783
- async function emitArtifacts(ctx) {
1784
- if (ctx.clean)
1785
- await ctx.cleanOutdir();
1786
- const tasks = generateSystem(ctx).map((file) => ctx.writeOutput(file));
1787
- await Promise.all(tasks);
1788
- return artifactsGeneratedMessage(ctx) + scaffoldCompleteMessage();
1789
- }
1790
- async function emitAndExtract(ctx) {
1791
- await emitArtifacts(ctx);
1792
- return extractCss(ctx);
1793
- }
1794
- async function extractCss(ctx) {
1795
- await extractGlobalCss(ctx);
1796
- await extractStaticCss(ctx);
1797
- await extractFiles(ctx);
1798
- await bundleChunks(ctx);
1799
- return buildCompleteMessage(ctx);
1800
- }
1801
-
1802
- // src/builder.ts
1803
- var import_core4 = require("@pandacss/core");
1804
- var import_error = require("@pandacss/error");
1805
- var import_logger5 = require("@pandacss/logger");
1806
- var import_shared5 = require("@pandacss/shared");
1807
- var import_fs4 = require("fs");
1808
- var import_fs_extra3 = require("fs-extra");
1809
- var import_path4 = require("path");
1810
-
1811
- // src/get-base-css.ts
1812
- function getBaseCss(ctx) {
1813
- const css3 = [
1814
- generateResetCss(),
1815
- generateLayoutGridCss(),
1816
- generateTokenCss(ctx),
1817
- generateKeyframes(ctx.theme.keyframes),
1818
- ctx.getGlobalCss(),
1819
- ctx.getStaticCss()
1820
- ];
1821
- return css3.filter(Boolean).join("\n\n");
1822
- }
1823
-
1824
- // src/config.ts
1825
- var import_config = require("@pandacss/config");
1826
- var import_look_it_up = require("look-it-up");
1827
-
1828
- // src/context.ts
1829
- var import_core3 = require("@pandacss/core");
1830
- var import_is_valid_prop3 = require("@pandacss/is-valid-prop");
1831
- var import_logger4 = require("@pandacss/logger");
1832
- var import_parser = require("@pandacss/parser");
1833
- var import_shared4 = require("@pandacss/shared");
1834
- var import_token_dictionary = require("@pandacss/token-dictionary");
1835
- var import_fast_glob = __toESM(require("fast-glob"));
1836
- var import_fs3 = require("fs");
1837
- var import_fs_extra2 = require("fs-extra");
1838
- var import_promises = require("fs/promises");
1839
- var import_path2 = require("path");
1840
- var import_postcss2 = __toESM(require("postcss"));
1841
- var import_ts_pattern5 = require("ts-pattern");
1842
- var helpers = {
1843
- map: import_shared4.mapObject
1050
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
1051
+ }
1052
+ if (model === "hex") {
1053
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
1054
+ }
1055
+ return ansi_styles_default[type][model](...arguments_);
1844
1056
  };
1845
- var fileSystem = {
1846
- read: (path) => {
1847
- return (0, import_promises.readFile)(path, "utf-8");
1848
- },
1849
- write: (path, code) => {
1850
- return (0, import_promises.writeFile)(path, code);
1851
- },
1852
- rm: (path) => {
1853
- return (0, import_promises.unlink)(path);
1057
+ var usedModels = ["rgb", "hex", "ansi256"];
1058
+ for (const model of usedModels) {
1059
+ styles[model] = {
1060
+ get() {
1061
+ const { level } = this;
1062
+ return function(...arguments_) {
1063
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
1064
+ return createBuilder(this, styler, this[IS_EMPTY]);
1065
+ };
1066
+ }
1067
+ };
1068
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1069
+ styles[bgModel] = {
1070
+ get() {
1071
+ const { level } = this;
1072
+ return function(...arguments_) {
1073
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
1074
+ return createBuilder(this, styler, this[IS_EMPTY]);
1075
+ };
1076
+ }
1077
+ };
1078
+ }
1079
+ var proto = Object.defineProperties(() => {
1080
+ }, {
1081
+ ...styles,
1082
+ level: {
1083
+ enumerable: true,
1084
+ get() {
1085
+ return this[GENERATOR].level;
1086
+ },
1087
+ set(level) {
1088
+ this[GENERATOR].level = level;
1089
+ }
1854
1090
  }
1855
- };
1856
- function createContext(conf, io = fileSystem) {
1857
- const { config } = conf;
1858
- const {
1859
- cwd: cwdProp = process.cwd(),
1860
- conditions: conditionsProp = {},
1861
- prefix,
1862
- cssVarRoot = ":where(:root, :host)",
1863
- outdir,
1864
- exclude: excludeProp = [],
1865
- patterns = {},
1866
- theme = {},
1867
- utilities = {},
1868
- hash,
1869
- jsxFactory = "panda",
1870
- jsxFramework,
1871
- globalCss,
1872
- separator,
1873
- static: staticCss,
1874
- outExtension = "mjs",
1875
- emitPackage
1876
- } = config;
1877
- const {
1878
- breakpoints = {},
1879
- tokens: tokensProp = {},
1880
- semanticTokens = {},
1881
- recipes = {},
1882
- textStyles,
1883
- layerStyles
1884
- } = theme;
1885
- const jsxFactoryDetails = {
1886
- name: jsxFactory,
1887
- upperName: (0, import_shared4.capitalize)(jsxFactory),
1888
- typeName: `HTML${(0, import_shared4.capitalize)(jsxFactory)}Props`,
1889
- componentName: `${(0, import_shared4.capitalize)(jsxFactory)}Component`,
1890
- framework: jsxFramework
1091
+ });
1092
+ var createStyler = (open, close, parent) => {
1093
+ let openAll;
1094
+ let closeAll;
1095
+ if (parent === void 0) {
1096
+ openAll = open;
1097
+ closeAll = close;
1098
+ } else {
1099
+ openAll = parent.openAll + open;
1100
+ closeAll = close + parent.closeAll;
1101
+ }
1102
+ return {
1103
+ open,
1104
+ close,
1105
+ openAll,
1106
+ closeAll,
1107
+ parent
1891
1108
  };
1892
- const cwd = (0, import_path2.resolve)(cwdProp);
1893
- const exclude = [".git", ".yarn", "node_modules", "test-results"].concat(excludeProp);
1894
- const tokens = new import_token_dictionary.TokenDictionary({
1895
- tokens: tokensProp,
1896
- breakpoints,
1897
- semanticTokens,
1898
- prefix
1899
- });
1900
- const hasTokens = !tokens.isEmpty;
1901
- import_logger4.logger.debug("ctx:token", tokens.allNames);
1902
- const utility = new import_core3.Utility({
1903
- prefix,
1904
- tokens,
1905
- config: utilities,
1906
- separator
1907
- });
1908
- const conditions = new import_core3.Conditions({
1909
- conditions: conditionsProp,
1910
- breakpoints
1911
- });
1912
- import_logger4.logger.debug("ctx:conditions", conditions);
1913
- (0, import_core3.assignCompositions)(
1914
- { conditions, utility },
1915
- (0, import_shared4.compact)({
1916
- textStyle: textStyles,
1917
- layerStyle: layerStyles
1918
- })
1919
- );
1920
- const context = () => ({
1921
- root: import_postcss2.default.root(),
1922
- conditions,
1923
- hash,
1924
- helpers,
1925
- utility
1926
- });
1927
- function getPattern(name) {
1928
- return patterns[name];
1109
+ };
1110
+ var createBuilder = (self, _styler, _isEmpty) => {
1111
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1112
+ Object.setPrototypeOf(builder, proto);
1113
+ builder[GENERATOR] = self;
1114
+ builder[STYLER] = _styler;
1115
+ builder[IS_EMPTY] = _isEmpty;
1116
+ return builder;
1117
+ };
1118
+ var applyStyle = (self, string) => {
1119
+ if (self.level <= 0 || !string) {
1120
+ return self[IS_EMPTY] ? "" : string;
1121
+ }
1122
+ let styler = self[STYLER];
1123
+ if (styler === void 0) {
1124
+ return string;
1125
+ }
1126
+ const { openAll, closeAll } = styler;
1127
+ if (string.includes("\x1B")) {
1128
+ while (styler !== void 0) {
1129
+ string = stringReplaceAll(string, styler.close, styler.open);
1130
+ styler = styler.parent;
1131
+ }
1929
1132
  }
1930
- function execPattern(name, data) {
1931
- const pattern = getPattern(name);
1932
- return pattern?.transform?.(data, helpers) ?? {};
1133
+ const lfIndex = string.indexOf("\n");
1134
+ if (lfIndex !== -1) {
1135
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1933
1136
  }
1934
- function getPatternDetails(name, pattern) {
1935
- const upperName = (0, import_shared4.capitalize)(name);
1936
- return {
1937
- name,
1938
- props: Object.keys(pattern?.properties ?? {}),
1939
- dashName: (0, import_shared4.dashCase)(name),
1940
- upperName,
1941
- styleFn: `get${upperName}Style`,
1942
- jsxName: pattern?.jsx ?? upperName,
1943
- blocklistType: pattern?.blocklist ? `| '${pattern.blocklist.join("' | '")}'` : ""
1944
- };
1137
+ return openAll + string + closeAll;
1138
+ };
1139
+ Object.defineProperties(createChalk.prototype, styles);
1140
+ var chalk = createChalk();
1141
+ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
1142
+ var source_default = chalk;
1143
+
1144
+ // ../../node_modules/.pnpm/widest-line@4.0.1/node_modules/widest-line/index.js
1145
+ init_cjs_shims();
1146
+ function widestLine(string) {
1147
+ let lineWidth = 0;
1148
+ for (const line of string.split("\n")) {
1149
+ lineWidth = Math.max(lineWidth, stringWidth(line));
1150
+ }
1151
+ return lineWidth;
1152
+ }
1153
+
1154
+ // ../../node_modules/.pnpm/boxen@7.0.1/node_modules/boxen/index.js
1155
+ var import_cli_boxes = __toESM(require_cli_boxes(), 1);
1156
+
1157
+ // ../../node_modules/.pnpm/camelcase@7.0.0/node_modules/camelcase/index.js
1158
+ init_cjs_shims();
1159
+ var UPPERCASE = /[\p{Lu}]/u;
1160
+ var LOWERCASE = /[\p{Ll}]/u;
1161
+ var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
1162
+ var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
1163
+ var SEPARATORS = /[_.\- ]+/;
1164
+ var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
1165
+ var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
1166
+ var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
1167
+ var preserveCamelCase = (string, toLowerCase, toUpperCase) => {
1168
+ let isLastCharLower = false;
1169
+ let isLastCharUpper = false;
1170
+ let isLastLastCharUpper = false;
1171
+ for (let index = 0; index < string.length; index++) {
1172
+ const character = string[index];
1173
+ if (isLastCharLower && UPPERCASE.test(character)) {
1174
+ string = string.slice(0, index) + "-" + string.slice(index);
1175
+ isLastCharLower = false;
1176
+ isLastLastCharUpper = isLastCharUpper;
1177
+ isLastCharUpper = true;
1178
+ index++;
1179
+ } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
1180
+ string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
1181
+ isLastLastCharUpper = isLastCharUpper;
1182
+ isLastCharUpper = false;
1183
+ isLastCharLower = true;
1184
+ } else {
1185
+ isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
1186
+ isLastLastCharUpper = isLastCharUpper;
1187
+ isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
1188
+ }
1945
1189
  }
1946
- const patternNodes = Object.entries(patterns).map(([name, pattern]) => ({
1947
- type: "pattern",
1948
- name: pattern.jsx ?? (0, import_shared4.capitalize)(name),
1949
- props: Object.keys(pattern.properties),
1950
- baseName: name
1951
- }));
1952
- function getPatternFnName(jsx) {
1953
- return patternNodes.find((node) => node.name === jsx)?.baseName ?? (0, import_shared4.uncapitalize)(jsx);
1954
- }
1955
- const hasPatterns = Object.keys(patterns).length > 0;
1956
- function getRecipe(name) {
1957
- return recipes[name];
1958
- }
1959
- const recipeNodes = Object.entries(recipes).map(([name, recipe]) => ({
1960
- type: "recipe",
1961
- name: recipe.jsx ?? (0, import_shared4.capitalize)(name),
1962
- props: Object.keys(recipe.variants ?? {}),
1963
- baseName: name
1964
- }));
1965
- function getRecipeFnName(jsx) {
1966
- return recipeNodes.find((node) => node.name === jsx)?.baseName ?? (0, import_shared4.uncapitalize)(jsx);
1967
- }
1968
- function splitRecipeProps(name, props) {
1969
- const recipe = recipeNodes.find((node) => node.name === name);
1970
- if (!recipe)
1971
- return [{}, props];
1972
- return (0, import_shared4.splitProps)(props, recipe.props);
1973
- }
1974
- function getRecipeDetails() {
1975
- return Object.entries(recipes).map(([name, recipe]) => ({
1976
- [name]: Object.entries(recipe.variants ?? {}).map(([key, value]) => ({
1977
- [key]: Object.keys(value)
1978
- }))
1979
- }));
1980
- }
1981
- const hasRecipes = Object.keys(recipes).length > 0;
1982
- const properties = Array.from(/* @__PURE__ */ new Set(["css", ...utility.keys(), ...conditions.keys()]));
1983
- function isCustomCssProperty(prop) {
1984
- const regex = new RegExp("^(?:" + properties.join("|") + ")$");
1985
- return regex.test(prop);
1986
- }
1987
- function isStyleProp(prop) {
1988
- return (0, import_is_valid_prop3.isCssProperty)(prop) || isCustomCssProperty(prop);
1989
- }
1990
- function getPath(pathLike) {
1991
- const paths2 = [cwd, emitPackage ? "node_modules" : void 0, outdir, pathLike].filter(Boolean);
1992
- return (0, import_path2.join)(...paths2);
1993
- }
1994
- function absPath(str) {
1995
- return (0, import_path2.isAbsolute)(str) ? str : (0, import_path2.join)(cwd, str);
1996
- }
1997
- function getExt(file) {
1998
- return `${file}.${outExtension}`;
1999
- }
2000
- function getImport(items, mod) {
2001
- return `import { ${items} } from '${getExt(mod)}';`;
2002
- }
2003
- function getExport(mod) {
2004
- return `export * from '${getExt(mod)}';`;
2005
- }
2006
- const paths = {
2007
- root: getPath(),
2008
- css: getPath("css"),
2009
- token: getPath("tokens"),
2010
- types: getPath("types"),
2011
- recipe: getPath("recipes"),
2012
- pattern: getPath("patterns"),
2013
- chunk: getPath("chunks"),
2014
- outCss: getPath("styles.css"),
2015
- jsx: getPath("jsx")
1190
+ return string;
1191
+ };
1192
+ var preserveConsecutiveUppercase = (input, toLowerCase) => {
1193
+ LEADING_CAPITAL.lastIndex = 0;
1194
+ return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
1195
+ };
1196
+ var postProcess = (input, toUpperCase) => {
1197
+ SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
1198
+ NUMBERS_AND_IDENTIFIER.lastIndex = 0;
1199
+ return input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
1200
+ };
1201
+ function camelCase(input, options) {
1202
+ if (!(typeof input === "string" || Array.isArray(input))) {
1203
+ throw new TypeError("Expected the input to be `string | string[]`");
1204
+ }
1205
+ options = {
1206
+ pascalCase: false,
1207
+ preserveConsecutiveUppercase: false,
1208
+ ...options
2016
1209
  };
2017
- async function write(dir, options) {
2018
- await (0, import_fs_extra2.ensureDir)(dir);
2019
- return Promise.all(
2020
- options.map(async ({ file, code }) => {
2021
- const absPath2 = (0, import_path2.join)(dir, file);
2022
- if (code) {
2023
- return io.write(absPath2, code);
2024
- }
2025
- })
2026
- );
1210
+ if (Array.isArray(input)) {
1211
+ input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
1212
+ } else {
1213
+ input = input.trim();
2027
1214
  }
2028
- function cleanOutdir() {
2029
- return (0, import_fs_extra2.emptyDir)(paths.root);
1215
+ if (input.length === 0) {
1216
+ return "";
2030
1217
  }
2031
- function writeOutput(output) {
2032
- if (!output)
2033
- return;
2034
- const { dir = paths.root, files: files2 } = output;
2035
- return write(dir, files2);
2036
- }
2037
- const chunks = {
2038
- dir: paths.chunk,
2039
- readFile(file) {
2040
- let fileName = chunks.format(file);
2041
- fileName = (0, import_path2.join)(paths.chunk, fileName);
2042
- if (!(0, import_fs_extra2.existsSync)(fileName)) {
2043
- return Promise.resolve("");
2044
- }
2045
- return io.read(fileName);
1218
+ const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
1219
+ const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
1220
+ if (input.length === 1) {
1221
+ if (SEPARATORS.test(input)) {
1222
+ return "";
1223
+ }
1224
+ return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
1225
+ }
1226
+ const hasUpperCase = input !== toLowerCase(input);
1227
+ if (hasUpperCase) {
1228
+ input = preserveCamelCase(input, toLowerCase, toUpperCase);
1229
+ }
1230
+ input = input.replace(LEADING_SEPARATORS, "");
1231
+ input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
1232
+ if (options.pascalCase) {
1233
+ input = toUpperCase(input.charAt(0)) + input.slice(1);
1234
+ }
1235
+ return postProcess(input, toUpperCase);
1236
+ }
1237
+
1238
+ // ../../node_modules/.pnpm/boxen@7.0.1/node_modules/boxen/index.js
1239
+ var import_ansi_align = __toESM(require_ansi_align(), 1);
1240
+
1241
+ // ../../node_modules/.pnpm/wrap-ansi@8.0.1/node_modules/wrap-ansi/index.js
1242
+ init_cjs_shims();
1243
+
1244
+ // ../../node_modules/.pnpm/ansi-styles@6.1.1/node_modules/ansi-styles/index.js
1245
+ init_cjs_shims();
1246
+ var ANSI_BACKGROUND_OFFSET2 = 10;
1247
+ var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
1248
+ var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
1249
+ var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
1250
+ function assembleStyles2() {
1251
+ const codes = /* @__PURE__ */ new Map();
1252
+ const styles2 = {
1253
+ modifier: {
1254
+ reset: [0, 0],
1255
+ bold: [1, 22],
1256
+ dim: [2, 22],
1257
+ italic: [3, 23],
1258
+ underline: [4, 24],
1259
+ overline: [53, 55],
1260
+ inverse: [7, 27],
1261
+ hidden: [8, 28],
1262
+ strikethrough: [9, 29]
2046
1263
  },
2047
- getFiles() {
2048
- if (!(0, import_fs_extra2.existsSync)(chunks.dir))
2049
- return [];
2050
- return (0, import_fs3.readdirSync)(chunks.dir);
1264
+ color: {
1265
+ black: [30, 39],
1266
+ red: [31, 39],
1267
+ green: [32, 39],
1268
+ yellow: [33, 39],
1269
+ blue: [34, 39],
1270
+ magenta: [35, 39],
1271
+ cyan: [36, 39],
1272
+ white: [37, 39],
1273
+ blackBright: [90, 39],
1274
+ redBright: [91, 39],
1275
+ greenBright: [92, 39],
1276
+ yellowBright: [93, 39],
1277
+ blueBright: [94, 39],
1278
+ magentaBright: [95, 39],
1279
+ cyanBright: [96, 39],
1280
+ whiteBright: [97, 39]
2051
1281
  },
2052
- format(file) {
2053
- return (0, import_path2.relative)(cwd, file).replaceAll(import_path2.sep, "__").replace((0, import_path2.extname)(file), ".css");
1282
+ bgColor: {
1283
+ bgBlack: [40, 49],
1284
+ bgRed: [41, 49],
1285
+ bgGreen: [42, 49],
1286
+ bgYellow: [43, 49],
1287
+ bgBlue: [44, 49],
1288
+ bgMagenta: [45, 49],
1289
+ bgCyan: [46, 49],
1290
+ bgWhite: [47, 49],
1291
+ bgBlackBright: [100, 49],
1292
+ bgRedBright: [101, 49],
1293
+ bgGreenBright: [102, 49],
1294
+ bgYellowBright: [103, 49],
1295
+ bgBlueBright: [104, 49],
1296
+ bgMagentaBright: [105, 49],
1297
+ bgCyanBright: [106, 49],
1298
+ bgWhiteBright: [107, 49]
1299
+ }
1300
+ };
1301
+ styles2.color.gray = styles2.color.blackBright;
1302
+ styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
1303
+ styles2.color.grey = styles2.color.blackBright;
1304
+ styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
1305
+ for (const [groupName, group] of Object.entries(styles2)) {
1306
+ for (const [styleName, style] of Object.entries(group)) {
1307
+ styles2[styleName] = {
1308
+ open: `\x1B[${style[0]}m`,
1309
+ close: `\x1B[${style[1]}m`
1310
+ };
1311
+ group[styleName] = styles2[styleName];
1312
+ codes.set(style[0], style[1]);
1313
+ }
1314
+ Object.defineProperty(styles2, groupName, {
1315
+ value: group,
1316
+ enumerable: false
1317
+ });
1318
+ }
1319
+ Object.defineProperty(styles2, "codes", {
1320
+ value: codes,
1321
+ enumerable: false
1322
+ });
1323
+ styles2.color.close = "\x1B[39m";
1324
+ styles2.bgColor.close = "\x1B[49m";
1325
+ styles2.color.ansi = wrapAnsi162();
1326
+ styles2.color.ansi256 = wrapAnsi2562();
1327
+ styles2.color.ansi16m = wrapAnsi16m2();
1328
+ styles2.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
1329
+ styles2.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
1330
+ styles2.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
1331
+ Object.defineProperties(styles2, {
1332
+ rgbToAnsi256: {
1333
+ value: (red, green, blue) => {
1334
+ if (red === green && green === blue) {
1335
+ if (red < 8) {
1336
+ return 16;
1337
+ }
1338
+ if (red > 248) {
1339
+ return 231;
1340
+ }
1341
+ return Math.round((red - 8) / 247 * 24) + 232;
1342
+ }
1343
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1344
+ },
1345
+ enumerable: false
2054
1346
  },
2055
- async write(file, css3) {
2056
- const fileName = chunks.format(file);
2057
- const oldCss = await chunks.readFile(file);
2058
- const newCss = (0, import_core3.mergeCss)(oldCss, css3);
2059
- import_logger4.logger.debug("chunk:write", { file, path: fileName });
2060
- return write(paths.chunk, [{ file: fileName, code: newCss }]);
1347
+ hexToRgb: {
1348
+ value: (hex) => {
1349
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
1350
+ if (!matches) {
1351
+ return [0, 0, 0];
1352
+ }
1353
+ let [colorString] = matches;
1354
+ if (colorString.length === 3) {
1355
+ colorString = [...colorString].map((character) => character + character).join("");
1356
+ }
1357
+ const integer = Number.parseInt(colorString, 16);
1358
+ return [
1359
+ integer >> 16 & 255,
1360
+ integer >> 8 & 255,
1361
+ integer & 255
1362
+ ];
1363
+ },
1364
+ enumerable: false
2061
1365
  },
2062
- rm(file) {
2063
- const fileName = chunks.format(file);
2064
- return io.rm((0, import_path2.join)(paths.chunk, fileName));
1366
+ hexToAnsi256: {
1367
+ value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
1368
+ enumerable: false
2065
1369
  },
2066
- empty() {
2067
- return (0, import_fs_extra2.emptyDir)(paths.chunk);
1370
+ ansi256ToAnsi: {
1371
+ value: (code) => {
1372
+ if (code < 8) {
1373
+ return 30 + code;
1374
+ }
1375
+ if (code < 16) {
1376
+ return 90 + (code - 8);
1377
+ }
1378
+ let red;
1379
+ let green;
1380
+ let blue;
1381
+ if (code >= 232) {
1382
+ red = ((code - 232) * 10 + 8) / 255;
1383
+ green = red;
1384
+ blue = red;
1385
+ } else {
1386
+ code -= 16;
1387
+ const remainder = code % 36;
1388
+ red = Math.floor(code / 36) / 5;
1389
+ green = Math.floor(remainder / 6) / 5;
1390
+ blue = remainder % 6 / 5;
1391
+ }
1392
+ const value = Math.max(red, green, blue) * 2;
1393
+ if (value === 0) {
1394
+ return 30;
1395
+ }
1396
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
1397
+ if (value === 2) {
1398
+ result += 60;
1399
+ }
1400
+ return result;
1401
+ },
1402
+ enumerable: false
2068
1403
  },
2069
- glob: [`${paths.chunk}/**/*.css`]
2070
- };
2071
- function getFiles() {
2072
- if (!config.include)
2073
- return [];
2074
- return import_fast_glob.default.sync(config.include, { cwd, ignore: config.exclude, absolute: true });
2075
- }
2076
- const files = getFiles();
2077
- import_logger4.logger.debug("ctx:files", files);
2078
- const importMap = {
2079
- css: `${outdir}/css`,
2080
- recipe: `${outdir}/recipes`,
2081
- pattern: `${outdir}/patterns`,
2082
- jsx: `${outdir}/jsx`
2083
- };
2084
- const project = (0, import_parser.createProject)({
2085
- getFiles,
2086
- readFile(filePath) {
2087
- return (0, import_fs3.readFileSync)(filePath, "utf8");
1404
+ rgbToAnsi: {
1405
+ value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
1406
+ enumerable: false
2088
1407
  },
2089
- parserOptions: {
2090
- importMap,
2091
- jsx: {
2092
- factory: jsxFactory,
2093
- isStyleProp,
2094
- nodes: [...patternNodes, ...recipeNodes]
2095
- }
1408
+ hexToAnsi: {
1409
+ value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
1410
+ enumerable: false
2096
1411
  }
2097
1412
  });
2098
- function getGlobalCss() {
2099
- const sheet = new import_core3.Stylesheet(context());
2100
- sheet.processGlobalCss({
2101
- ":root": { "--made-with-panda": `'\u{1F43C}'` }
2102
- });
2103
- if (globalCss) {
2104
- sheet.processGlobalCss(globalCss);
1413
+ return styles2;
1414
+ }
1415
+ var ansiStyles2 = assembleStyles2();
1416
+ var ansi_styles_default2 = ansiStyles2;
1417
+
1418
+ // ../../node_modules/.pnpm/wrap-ansi@8.0.1/node_modules/wrap-ansi/index.js
1419
+ var ESCAPES = /* @__PURE__ */ new Set([
1420
+ "\x1B",
1421
+ "\x9B"
1422
+ ]);
1423
+ var END_CODE = 39;
1424
+ var ANSI_ESCAPE_BELL = "\x07";
1425
+ var ANSI_CSI = "[";
1426
+ var ANSI_OSC = "]";
1427
+ var ANSI_SGR_TERMINATOR = "m";
1428
+ var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
1429
+ var wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
1430
+ var wrapAnsiHyperlink = (uri) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;
1431
+ var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
1432
+ var wrapWord = (rows, word, columns) => {
1433
+ const characters = [...word];
1434
+ let isInsideEscape = false;
1435
+ let isInsideLinkEscape = false;
1436
+ let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
1437
+ for (const [index, character] of characters.entries()) {
1438
+ const characterLength = stringWidth(character);
1439
+ if (visible + characterLength <= columns) {
1440
+ rows[rows.length - 1] += character;
1441
+ } else {
1442
+ rows.push(character);
1443
+ visible = 0;
1444
+ }
1445
+ if (ESCAPES.has(character)) {
1446
+ isInsideEscape = true;
1447
+ isInsideLinkEscape = characters.slice(index + 1).join("").startsWith(ANSI_ESCAPE_LINK);
1448
+ }
1449
+ if (isInsideEscape) {
1450
+ if (isInsideLinkEscape) {
1451
+ if (character === ANSI_ESCAPE_BELL) {
1452
+ isInsideEscape = false;
1453
+ isInsideLinkEscape = false;
1454
+ }
1455
+ } else if (character === ANSI_SGR_TERMINATOR) {
1456
+ isInsideEscape = false;
1457
+ }
1458
+ continue;
1459
+ }
1460
+ visible += characterLength;
1461
+ if (visible === columns && index < characters.length - 1) {
1462
+ rows.push("");
1463
+ visible = 0;
2105
1464
  }
2106
- return sheet.toCss();
2107
1465
  }
2108
- function getStaticCss() {
2109
- if (!staticCss)
2110
- return;
2111
- const sheet = new import_core3.Stylesheet(context());
2112
- const recipes2 = getRecipeDetails();
2113
- const getResults = (0, import_core3.getStaticCss)(staticCss);
2114
- const results = getResults({
2115
- breakpoints: Object.keys(breakpoints ?? {}),
2116
- getPropertyKeys: utility.getPropertyKeys,
2117
- getRecipeKeys(recipe) {
2118
- return recipes2[recipe];
1466
+ if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
1467
+ rows[rows.length - 2] += rows.pop();
1468
+ }
1469
+ };
1470
+ var stringVisibleTrimSpacesRight = (string) => {
1471
+ const words = string.split(" ");
1472
+ let last = words.length;
1473
+ while (last > 0) {
1474
+ if (stringWidth(words[last - 1]) > 0) {
1475
+ break;
1476
+ }
1477
+ last--;
1478
+ }
1479
+ if (last === words.length) {
1480
+ return string;
1481
+ }
1482
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
1483
+ };
1484
+ var exec = (string, columns, options = {}) => {
1485
+ if (options.trim !== false && string.trim() === "") {
1486
+ return "";
1487
+ }
1488
+ let returnValue = "";
1489
+ let escapeCode;
1490
+ let escapeUrl;
1491
+ const lengths = wordLengths(string);
1492
+ let rows = [""];
1493
+ for (const [index, word] of string.split(" ").entries()) {
1494
+ if (options.trim !== false) {
1495
+ rows[rows.length - 1] = rows[rows.length - 1].trimStart();
1496
+ }
1497
+ let rowLength = stringWidth(rows[rows.length - 1]);
1498
+ if (index !== 0) {
1499
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
1500
+ rows.push("");
1501
+ rowLength = 0;
2119
1502
  }
2120
- });
2121
- results.css.forEach((css3) => {
2122
- sheet.processAtomic(css3);
2123
- });
2124
- results.recipes.forEach((result) => {
2125
- Object.entries(result).forEach(([key, value]) => {
2126
- const recipe = getRecipe(key);
2127
- if (!recipe)
2128
- return;
2129
- sheet.processRecipe(recipe, value);
2130
- });
2131
- });
2132
- return sheet.toCss();
1503
+ if (rowLength > 0 || options.trim === false) {
1504
+ rows[rows.length - 1] += " ";
1505
+ rowLength++;
1506
+ }
1507
+ }
1508
+ if (options.hard && lengths[index] > columns) {
1509
+ const remainingColumns = columns - rowLength;
1510
+ const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
1511
+ const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
1512
+ if (breaksStartingNextLine < breaksStartingThisLine) {
1513
+ rows.push("");
1514
+ }
1515
+ wrapWord(rows, word, columns);
1516
+ continue;
1517
+ }
1518
+ if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
1519
+ if (options.wordWrap === false && rowLength < columns) {
1520
+ wrapWord(rows, word, columns);
1521
+ continue;
1522
+ }
1523
+ rows.push("");
1524
+ }
1525
+ if (rowLength + lengths[index] > columns && options.wordWrap === false) {
1526
+ wrapWord(rows, word, columns);
1527
+ continue;
1528
+ }
1529
+ rows[rows.length - 1] += word;
1530
+ }
1531
+ if (options.trim !== false) {
1532
+ rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
1533
+ }
1534
+ const pre = [...rows.join("\n")];
1535
+ for (const [index, character] of pre.entries()) {
1536
+ returnValue += character;
1537
+ if (ESCAPES.has(character)) {
1538
+ const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} };
1539
+ if (groups.code !== void 0) {
1540
+ const code2 = Number.parseFloat(groups.code);
1541
+ escapeCode = code2 === END_CODE ? void 0 : code2;
1542
+ } else if (groups.uri !== void 0) {
1543
+ escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
1544
+ }
1545
+ }
1546
+ const code = ansi_styles_default2.codes.get(Number(escapeCode));
1547
+ if (pre[index + 1] === "\n") {
1548
+ if (escapeUrl) {
1549
+ returnValue += wrapAnsiHyperlink("");
1550
+ }
1551
+ if (escapeCode && code) {
1552
+ returnValue += wrapAnsiCode(code);
1553
+ }
1554
+ } else if (character === "\n") {
1555
+ if (escapeCode && code) {
1556
+ returnValue += wrapAnsiCode(escapeCode);
1557
+ }
1558
+ if (escapeUrl) {
1559
+ returnValue += wrapAnsiHyperlink(escapeUrl);
1560
+ }
1561
+ }
2133
1562
  }
2134
- function getCss(collector, file) {
2135
- const sheet = new import_core3.Stylesheet(context());
2136
- collector.css.forEach((result) => {
2137
- sheet.processAtomic(result.data);
2138
- });
2139
- collector.cva.forEach((result) => {
2140
- sheet.processAtomicRecipe(result.data);
2141
- });
2142
- collector.jsx.forEach((result) => {
2143
- const { data, type, name } = result;
2144
- const { css: css3 = {}, ...rest } = data;
2145
- const styles = { ...css3, ...rest };
2146
- (0, import_ts_pattern5.match)([name, type]).with([import_ts_pattern5.P.string, "pattern"], ([name2]) => {
2147
- collector.setPattern(getPatternFnName(name2), { data: styles });
2148
- }).with([import_ts_pattern5.P.string, "recipe"], ([name2]) => {
2149
- const [recipeProps, atomicProps] = splitRecipeProps(name2, styles);
2150
- collector.setRecipe(getRecipeFnName(name2), { data: recipeProps });
2151
- sheet.processAtomic(atomicProps);
2152
- }).otherwise(() => {
2153
- sheet.processAtomic(styles);
2154
- });
2155
- });
2156
- collector.recipe.forEach((result, name) => {
2157
- try {
2158
- for (const item of result) {
2159
- const recipe = getRecipe(name);
2160
- if (!recipe)
2161
- continue;
2162
- sheet.processRecipe(recipe, item.data);
2163
- }
2164
- } catch (error) {
2165
- import_logger4.logger.error("recipe", error);
1563
+ return returnValue;
1564
+ };
1565
+ function wrapAnsi(string, columns, options) {
1566
+ return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
1567
+ }
1568
+
1569
+ // ../../node_modules/.pnpm/boxen@7.0.1/node_modules/boxen/index.js
1570
+ var import_cli_boxes2 = __toESM(require_cli_boxes(), 1);
1571
+ var NEWLINE = "\n";
1572
+ var PAD = " ";
1573
+ var BORDERS_WIDTH = 2;
1574
+ var terminalColumns = () => {
1575
+ const { env: env2, stdout, stderr } = import_node_process2.default;
1576
+ if (stdout?.columns) {
1577
+ return stdout.columns;
1578
+ }
1579
+ if (stderr?.columns) {
1580
+ return stderr.columns;
1581
+ }
1582
+ if (env2.COLUMNS) {
1583
+ return Number.parseInt(env2.COLUMNS, 10);
1584
+ }
1585
+ return 80;
1586
+ };
1587
+ var getObject = (detail) => typeof detail === "number" ? {
1588
+ top: detail,
1589
+ right: detail * 3,
1590
+ bottom: detail,
1591
+ left: detail * 3
1592
+ } : {
1593
+ top: 0,
1594
+ right: 0,
1595
+ bottom: 0,
1596
+ left: 0,
1597
+ ...detail
1598
+ };
1599
+ var getBorderChars = (borderStyle) => {
1600
+ const sides = [
1601
+ "topLeft",
1602
+ "topRight",
1603
+ "bottomRight",
1604
+ "bottomLeft",
1605
+ "left",
1606
+ "right",
1607
+ "top",
1608
+ "bottom"
1609
+ ];
1610
+ let characters;
1611
+ if (typeof borderStyle === "string") {
1612
+ characters = import_cli_boxes.default[borderStyle];
1613
+ if (!characters) {
1614
+ throw new TypeError(`Invalid border style: ${borderStyle}`);
1615
+ }
1616
+ } else {
1617
+ if (typeof borderStyle?.vertical === "string") {
1618
+ borderStyle.left = borderStyle.vertical;
1619
+ borderStyle.right = borderStyle.vertical;
1620
+ }
1621
+ if (typeof borderStyle?.horizontal === "string") {
1622
+ borderStyle.top = borderStyle.horizontal;
1623
+ borderStyle.bottom = borderStyle.horizontal;
1624
+ }
1625
+ for (const side of sides) {
1626
+ if (!borderStyle[side] || typeof borderStyle[side] !== "string") {
1627
+ throw new TypeError(`Invalid border style: ${side}`);
2166
1628
  }
2167
- });
2168
- collector.pattern.forEach((result, name) => {
2169
- try {
2170
- for (const item of result) {
2171
- const styles = execPattern(name, item.data);
2172
- sheet.processAtomic(styles);
1629
+ }
1630
+ characters = borderStyle;
1631
+ }
1632
+ return characters;
1633
+ };
1634
+ var makeTitle = (text, horizontal, alignement) => {
1635
+ let title = "";
1636
+ const textWidth = stringWidth(text);
1637
+ switch (alignement) {
1638
+ case "left":
1639
+ title = text + horizontal.slice(textWidth);
1640
+ break;
1641
+ case "right":
1642
+ title = horizontal.slice(textWidth) + text;
1643
+ break;
1644
+ default:
1645
+ horizontal = horizontal.slice(textWidth);
1646
+ if (horizontal.length % 2 === 1) {
1647
+ horizontal = horizontal.slice(Math.floor(horizontal.length / 2));
1648
+ title = horizontal.slice(1) + text + horizontal;
1649
+ } else {
1650
+ horizontal = horizontal.slice(horizontal.length / 2);
1651
+ title = horizontal + text + horizontal;
1652
+ }
1653
+ break;
1654
+ }
1655
+ return title;
1656
+ };
1657
+ var makeContentText = (text, { padding, width, textAlignment, height }) => {
1658
+ text = (0, import_ansi_align.default)(text, { align: textAlignment });
1659
+ let lines = text.split(NEWLINE);
1660
+ const textWidth = widestLine(text);
1661
+ const max = width - padding.left - padding.right;
1662
+ if (textWidth > max) {
1663
+ const newLines = [];
1664
+ for (const line of lines) {
1665
+ const createdLines = wrapAnsi(line, max, { hard: true });
1666
+ const alignedLines = (0, import_ansi_align.default)(createdLines, { align: textAlignment });
1667
+ const alignedLinesArray = alignedLines.split("\n");
1668
+ const longestLength = Math.max(...alignedLinesArray.map((s) => stringWidth(s)));
1669
+ for (const alignedLine of alignedLinesArray) {
1670
+ let paddedLine;
1671
+ switch (textAlignment) {
1672
+ case "center":
1673
+ paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;
1674
+ break;
1675
+ case "right":
1676
+ paddedLine = PAD.repeat(max - longestLength) + alignedLine;
1677
+ break;
1678
+ default:
1679
+ paddedLine = alignedLine;
1680
+ break;
2173
1681
  }
2174
- } catch (error) {
2175
- import_logger4.logger.error("pattern", error);
1682
+ newLines.push(paddedLine);
2176
1683
  }
2177
- });
2178
- if (collector.isEmpty()) {
2179
- return;
2180
1684
  }
2181
- return {
2182
- css: sheet.toCss({ minify: config.minify }),
2183
- file: chunks.format(file)
2184
- };
1685
+ lines = newLines;
1686
+ }
1687
+ if (textAlignment === "center" && textWidth < max) {
1688
+ lines = lines.map((line) => PAD.repeat((max - textWidth) / 2) + line);
1689
+ } else if (textAlignment === "right" && textWidth < max) {
1690
+ lines = lines.map((line) => PAD.repeat(max - textWidth) + line);
1691
+ }
1692
+ const paddingLeft = PAD.repeat(padding.left);
1693
+ const paddingRight = PAD.repeat(padding.right);
1694
+ lines = lines.map((line) => paddingLeft + line + paddingRight);
1695
+ lines = lines.map((line) => {
1696
+ if (width - stringWidth(line) > 0) {
1697
+ switch (textAlignment) {
1698
+ case "center":
1699
+ return line + PAD.repeat(width - stringWidth(line));
1700
+ case "right":
1701
+ return line + PAD.repeat(width - stringWidth(line));
1702
+ default:
1703
+ return line + PAD.repeat(width - stringWidth(line));
1704
+ }
1705
+ }
1706
+ return line;
1707
+ });
1708
+ if (padding.top > 0) {
1709
+ lines = [...Array.from({ length: padding.top }).fill(PAD.repeat(width)), ...lines];
2185
1710
  }
2186
- function extract(fn) {
2187
- return Promise.all(getFiles().map(fn));
1711
+ if (padding.bottom > 0) {
1712
+ lines = [...lines, ...Array.from({ length: padding.bottom }).fill(PAD.repeat(width))];
2188
1713
  }
2189
- return {
2190
- ...config,
2191
- theme,
2192
- config,
2193
- configPath: conf.path,
2194
- cwd,
2195
- conf,
2196
- chunks,
2197
- files,
2198
- helpers,
2199
- context,
2200
- exclude,
2201
- conditions,
2202
- importMap,
2203
- absPath,
2204
- project,
2205
- getPath,
2206
- paths,
2207
- write,
2208
- writeOutput,
2209
- cleanOutdir,
2210
- getExt,
2211
- getImport,
2212
- getExport,
2213
- cssVarRoot,
2214
- tokens,
2215
- hasTokens,
2216
- utility,
2217
- getCss,
2218
- getGlobalCss,
2219
- getStaticCss,
2220
- patterns,
2221
- hasPatterns,
2222
- getPattern,
2223
- execPattern,
2224
- patternNodes,
2225
- getPatternFnName,
2226
- getPatternDetails,
2227
- recipes,
2228
- getRecipe,
2229
- hasRecipes,
2230
- getRecipeDetails,
2231
- jsxFactory,
2232
- jsxFactoryDetails,
2233
- properties,
2234
- extract
1714
+ if (height && lines.length > height) {
1715
+ lines = lines.slice(0, height);
1716
+ } else if (height && lines.length < height) {
1717
+ lines = [...lines, ...Array.from({ length: height - lines.length }).fill(PAD.repeat(width))];
1718
+ }
1719
+ return lines.join(NEWLINE);
1720
+ };
1721
+ var boxContent = (content, contentWidth, options) => {
1722
+ const colorizeBorder = (border) => {
1723
+ const newBorder = options.borderColor ? getColorFn(options.borderColor)(border) : border;
1724
+ return options.dimBorder ? source_default.dim(newBorder) : newBorder;
2235
1725
  };
2236
- }
2237
-
2238
- // src/config.ts
2239
- var configs = [".ts", ".js", ".mjs", ".cjs"];
2240
- function findConfig() {
2241
- for (const config of configs) {
2242
- const result = (0, import_look_it_up.lookItUpSync)(`panda.config${config}`);
2243
- if (result) {
2244
- return result;
1726
+ const colorizeContent = (content2) => options.backgroundColor ? getBGColorFn(options.backgroundColor)(content2) : content2;
1727
+ const chars = getBorderChars(options.borderStyle);
1728
+ const columns = terminalColumns();
1729
+ let marginLeft = PAD.repeat(options.margin.left);
1730
+ if (options.float === "center") {
1731
+ const marginWidth = Math.max((columns - contentWidth - BORDERS_WIDTH) / 2, 0);
1732
+ marginLeft = PAD.repeat(marginWidth);
1733
+ } else if (options.float === "right") {
1734
+ const marginWidth = Math.max(columns - contentWidth - options.margin.right - BORDERS_WIDTH, 0);
1735
+ marginLeft = PAD.repeat(marginWidth);
1736
+ }
1737
+ const top = colorizeBorder(NEWLINE.repeat(options.margin.top) + marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight);
1738
+ const bottom = colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight + NEWLINE.repeat(options.margin.bottom));
1739
+ const lines = content.split(NEWLINE);
1740
+ const middle = lines.map((line) => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(NEWLINE);
1741
+ return top + NEWLINE + middle + NEWLINE + bottom;
1742
+ };
1743
+ var sanitizeOptions = (options) => {
1744
+ if (options.fullscreen && import_node_process2.default?.stdout) {
1745
+ let newDimensions = [import_node_process2.default.stdout.columns, import_node_process2.default.stdout.rows];
1746
+ if (typeof options.fullscreen === "function") {
1747
+ newDimensions = options.fullscreen(...newDimensions);
1748
+ }
1749
+ if (!options.width) {
1750
+ options.width = newDimensions[0];
1751
+ }
1752
+ if (!options.height) {
1753
+ options.height = newDimensions[1];
2245
1754
  }
2246
1755
  }
2247
- }
2248
- async function loadConfigAndCreateContext(options = {}) {
2249
- const { cwd = process.cwd(), config, configPath } = options;
2250
- const conf = await (0, import_config.loadConfigFile)({ cwd, file: configPath });
2251
- if (config) {
2252
- Object.assign(conf.config, config);
1756
+ if (options.width) {
1757
+ options.width = Math.max(1, options.width - BORDERS_WIDTH);
2253
1758
  }
2254
- return createContext(conf);
1759
+ if (options.height) {
1760
+ options.height = Math.max(1, options.height - BORDERS_WIDTH);
1761
+ }
1762
+ return options;
1763
+ };
1764
+ var determineDimensions = (text, options) => {
1765
+ options = sanitizeOptions(options);
1766
+ const widthOverride = options.width !== void 0;
1767
+ const columns = terminalColumns();
1768
+ const maxWidth = columns - options.margin.left - options.margin.right - BORDERS_WIDTH;
1769
+ const widest = widestLine(wrapAnsi(text, columns - BORDERS_WIDTH, { hard: true, trim: false })) + options.padding.left + options.padding.right;
1770
+ if (options.title && widthOverride) {
1771
+ options.title = options.title.slice(0, Math.max(0, options.width - 2));
1772
+ if (options.title) {
1773
+ options.title = ` ${options.title} `;
1774
+ }
1775
+ } else if (options.title) {
1776
+ options.title = options.title.slice(0, Math.max(0, maxWidth - 2));
1777
+ if (options.title) {
1778
+ options.title = ` ${options.title} `;
1779
+ if (stringWidth(options.title) > widest) {
1780
+ options.width = stringWidth(options.title);
1781
+ }
1782
+ }
1783
+ }
1784
+ options.width = options.width ? options.width : widest;
1785
+ if (!widthOverride) {
1786
+ if (options.margin.left && options.margin.right && options.width > maxWidth) {
1787
+ const spaceForMargins = columns - options.width - BORDERS_WIDTH;
1788
+ const multiplier = spaceForMargins / (options.margin.left + options.margin.right);
1789
+ options.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));
1790
+ options.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));
1791
+ }
1792
+ options.width = Math.min(options.width, columns - BORDERS_WIDTH - options.margin.left - options.margin.right);
1793
+ }
1794
+ if (options.width - (options.padding.left + options.padding.right) <= 0) {
1795
+ options.padding.left = 0;
1796
+ options.padding.right = 0;
1797
+ }
1798
+ if (options.height && options.height - (options.padding.top + options.padding.bottom) <= 0) {
1799
+ options.padding.top = 0;
1800
+ options.padding.bottom = 0;
1801
+ }
1802
+ return options;
1803
+ };
1804
+ var isHex = (color) => color.match(/^#(?:[0-f]{3}){1,2}$/i);
1805
+ var isColorValid = (color) => typeof color === "string" && (source_default[color] ?? isHex(color));
1806
+ var getColorFn = (color) => isHex(color) ? source_default.hex(color) : source_default[color];
1807
+ var getBGColorFn = (color) => isHex(color) ? source_default.bgHex(color) : source_default[camelCase(["bg", color])];
1808
+ function boxen(text, options) {
1809
+ options = {
1810
+ padding: 0,
1811
+ borderStyle: "single",
1812
+ dimBorder: false,
1813
+ textAlignment: "left",
1814
+ float: "left",
1815
+ titleAlignment: "left",
1816
+ ...options
1817
+ };
1818
+ if (options.align) {
1819
+ options.textAlignment = options.align;
1820
+ }
1821
+ if (options.borderColor && !isColorValid(options.borderColor)) {
1822
+ throw new Error(`${options.borderColor} is not a valid borderColor`);
1823
+ }
1824
+ if (options.backgroundColor && !isColorValid(options.backgroundColor)) {
1825
+ throw new Error(`${options.backgroundColor} is not a valid backgroundColor`);
1826
+ }
1827
+ options.padding = getObject(options.padding);
1828
+ options.margin = getObject(options.margin);
1829
+ options = determineDimensions(text, options);
1830
+ text = makeContentText(text, options);
1831
+ return boxContent(text, options.width, options);
2255
1832
  }
2256
1833
 
2257
- // src/glob.ts
2258
- var import_glob_parent = __toESM(require("glob-parent"));
1834
+ // src/cli-box.ts
1835
+ var createBox = (options) => boxen(options.content, {
1836
+ padding: { left: 3, right: 3, top: 1, bottom: 1 },
1837
+ borderColor: "magenta",
1838
+ borderStyle: "round",
1839
+ title: options.title,
1840
+ titleAlignment: "center"
1841
+ });
1842
+
1843
+ // src/extract.ts
1844
+ async function bundleChunks(ctx) {
1845
+ const files = ctx.chunks.getFiles();
1846
+ return ctx.output.write({
1847
+ dir: ctx.paths.root,
1848
+ files: [{ file: "styles.css", code: ctx.getCss({ files }) }]
1849
+ });
1850
+ }
1851
+ async function writeFileChunk(ctx, file) {
1852
+ const { path } = ctx.runtime;
1853
+ import_logger2.logger.debug("chunk:write", `File: ${path.relative(ctx.config.cwd, file)}`);
1854
+ const css = extractFile(ctx, file);
1855
+ if (!css)
1856
+ return;
1857
+ const artifact = ctx.chunks.getArtifact(file, css);
1858
+ return ctx.output.write(artifact);
1859
+ }
1860
+ function extractFile(ctx, file) {
1861
+ const {
1862
+ runtime: { path },
1863
+ config: { cwd }
1864
+ } = ctx;
1865
+ return (0, import_lil_fp2.pipe)(
1866
+ { file: path.abs(cwd, file) },
1867
+ (0, import_lil_fp2.tap)(() => import_logger2.logger.debug("file:extract", file)),
1868
+ import_lil_fp2.Obj.bind("measure", () => import_logger2.logger.time.debug(`Extracted ${file}`)),
1869
+ import_lil_fp2.Obj.bind("result", ({ file: file2 }) => ctx.project.parseSourceFile(file2)),
1870
+ import_lil_fp2.Obj.bind("css", ({ result }) => result ? ctx.getParserCss(result) : void 0),
1871
+ (0, import_lil_fp2.tap)(({ measure }) => measure()),
1872
+ ({ css }) => css
1873
+ );
1874
+ }
1875
+ function extractFiles(ctx) {
1876
+ return Promise.all(ctx.getFiles().map((file) => writeFileChunk(ctx, file)));
1877
+ }
1878
+ var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
1879
+ var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
1880
+ async function emitArtifacts(ctx) {
1881
+ if (ctx.config.clean)
1882
+ ctx.output.empty();
1883
+ await Promise.all(ctx.getArtifacts().map(ctx.output.write));
1884
+ return ctx.messages.artifactsGenerated() + createBox({
1885
+ content: ctx.messages.codegenComplete(),
1886
+ title: `\u{1F43C} ${pickRandom(randomWords)}! \u2728`
1887
+ });
1888
+ }
1889
+ async function emitAndExtract(ctx) {
1890
+ await emitArtifacts(ctx);
1891
+ return extractCss(ctx);
1892
+ }
1893
+ async function extractCss(ctx) {
1894
+ await extractFiles(ctx);
1895
+ await bundleChunks(ctx);
1896
+ return ctx.messages.buildComplete(ctx.getFiles().length);
1897
+ }
1898
+
1899
+ // src/parse-dependency.ts
1900
+ init_cjs_shims();
2259
1901
  var import_is_glob = __toESM(require("is-glob"));
2260
- var import_path3 = require("path");
1902
+ var import_path2 = require("path");
1903
+
1904
+ // src/parse-glob.ts
1905
+ init_cjs_shims();
1906
+ var import_glob_parent = __toESM(require("glob-parent"));
2261
1907
  function parseGlob(pattern) {
2262
1908
  let glob2 = pattern;
2263
1909
  const base = (0, import_glob_parent.default)(pattern);
@@ -2275,6 +1921,8 @@ function parseGlob(pattern) {
2275
1921
  }
2276
1922
  return { base, glob: glob2 };
2277
1923
  }
1924
+
1925
+ // src/parse-dependency.ts
2278
1926
  function parseDependency(fileOrGlob) {
2279
1927
  if (fileOrGlob.startsWith("!")) {
2280
1928
  return null;
@@ -2282,9 +1930,9 @@ function parseDependency(fileOrGlob) {
2282
1930
  let message = null;
2283
1931
  if ((0, import_is_glob.default)(fileOrGlob)) {
2284
1932
  const { base, glob: glob2 } = parseGlob(fileOrGlob);
2285
- message = { type: "dir-dependency", dir: (0, import_path3.resolve)(base), glob: glob2 };
1933
+ message = { type: "dir-dependency", dir: (0, import_path2.resolve)(base), glob: glob2 };
2286
1934
  } else {
2287
- message = { type: "dependency", file: (0, import_path3.resolve)(fileOrGlob) };
1935
+ message = { type: "dependency", file: (0, import_path2.resolve)(fileOrGlob) };
2288
1936
  }
2289
1937
  if (message.type === "dir-dependency" && process.env.ROLLUP_WATCH === "true") {
2290
1938
  message = { type: "dependency", file: message.dir };
@@ -2300,7 +1948,7 @@ function getConfigHash() {
2300
1948
  if (!file) {
2301
1949
  throw new import_error.ConfigNotFoundError();
2302
1950
  }
2303
- return (0, import_shared5.toHash)((0, import_fs4.readFileSync)(file, "utf-8"));
1951
+ return (0, import_shared.toHash)((0, import_fs.readFileSync)(file, "utf-8"));
2304
1952
  }
2305
1953
  var setupCount = 0;
2306
1954
  var Builder = class {
@@ -2308,9 +1956,9 @@ var Builder = class {
2308
1956
  fileCssMap = /* @__PURE__ */ new Map();
2309
1957
  context;
2310
1958
  configChanged = true;
2311
- updateFile(file, css3) {
1959
+ writeFile(file, css) {
2312
1960
  const oldCss = this.fileCssMap?.get(file) ?? "";
2313
- const newCss = (0, import_core4.mergeCss)(oldCss, css3);
1961
+ const newCss = (0, import_core2.mergeCss)(oldCss, css);
2314
1962
  this.fileCssMap?.set(file, newCss);
2315
1963
  }
2316
1964
  async setup() {
@@ -2326,7 +1974,7 @@ var Builder = class {
2326
1974
  if (setupCount > 0) {
2327
1975
  emitArtifacts(this.context);
2328
1976
  }
2329
- this.fileCssMap = /* @__PURE__ */ new Map([["base.css", getBaseCss(this.context)]]);
1977
+ this.fileCssMap = /* @__PURE__ */ new Map();
2330
1978
  this.fileModifiedMap = /* @__PURE__ */ new Map();
2331
1979
  contextCache.set(configHash, this.context);
2332
1980
  builderCache.set(this.context, { fileCssMap: this.fileCssMap, fileModifiedMap: this.fileModifiedMap });
@@ -2340,27 +1988,29 @@ var Builder = class {
2340
1988
  }
2341
1989
  async extract() {
2342
1990
  const ctx = this.ensure();
2343
- const done = import_logger5.logger.time.info("Extracted in");
2344
- await ctx.extract(async (file) => {
2345
- const mtime = (0, import_fs4.existsSync)(file) ? (0, import_fs_extra3.statSync)(file).mtimeMs : -Infinity;
2346
- const isUnchanged = this.fileModifiedMap.has(file) && mtime === this.fileModifiedMap.get(file);
2347
- if (isUnchanged)
2348
- return;
2349
- const result = extractFile(ctx, file);
2350
- if (!result)
2351
- return;
2352
- this.fileModifiedMap.set(file, mtime);
2353
- this.updateFile(file, result.css);
2354
- return result;
2355
- });
1991
+ const done = import_logger3.logger.time.info("Extracted in");
1992
+ await Promise.all(
1993
+ ctx.getFiles().map(async (file) => {
1994
+ const mtime = (0, import_fs.existsSync)(file) ? (0, import_fs_extra2.statSync)(file).mtimeMs : -Infinity;
1995
+ const isUnchanged = this.fileModifiedMap.has(file) && mtime === this.fileModifiedMap.get(file);
1996
+ if (isUnchanged)
1997
+ return;
1998
+ const css = extractFile(ctx, file);
1999
+ if (!css)
2000
+ return;
2001
+ this.fileModifiedMap.set(file, mtime);
2002
+ this.writeFile(file, css);
2003
+ return css;
2004
+ })
2005
+ );
2356
2006
  done();
2357
2007
  }
2358
2008
  toString() {
2359
2009
  const ctx = this.ensure();
2360
- const sheet = new import_core4.Stylesheet(ctx.context());
2361
- const css3 = Array.from(this.fileCssMap.values()).join("\n\n");
2362
- sheet.append(css3);
2363
- return sheet.toCss({ minify: ctx.minify });
2010
+ return ctx.getCss({
2011
+ files: Array.from(this.fileCssMap.values()),
2012
+ resolve: true
2013
+ });
2364
2014
  }
2365
2015
  isValidRoot(root) {
2366
2016
  const params = "reset, base, tokens, recipes, utilities";
@@ -2376,7 +2026,7 @@ var Builder = class {
2376
2026
  const rootCssContent = root.toString();
2377
2027
  root.removeAll();
2378
2028
  root.append(
2379
- (0, import_core4.discardDuplicate)(`
2029
+ (0, import_core2.discardDuplicate)(`
2380
2030
  ${rootCssContent}
2381
2031
  ${this.toString()}
2382
2032
  `)
@@ -2390,14 +2040,15 @@ var Builder = class {
2390
2040
  fn(dependency);
2391
2041
  }
2392
2042
  }
2393
- for (const file of ctx.conf.dependencies) {
2394
- fn({ type: "dependency", file: (0, import_path4.resolve)(file) });
2043
+ for (const file of ctx.dependencies) {
2044
+ fn({ type: "dependency", file: (0, import_path3.resolve)(file) });
2395
2045
  }
2396
2046
  }
2397
2047
  };
2398
2048
 
2399
- // src/exec.ts
2400
- var import_logger6 = require("@pandacss/logger");
2049
+ // src/exec-command.ts
2050
+ init_cjs_shims();
2051
+ var import_logger4 = require("@pandacss/logger");
2401
2052
  var import_child_process = require("child_process");
2402
2053
  var import_preferred_pm = __toESM(require("preferred-pm"));
2403
2054
  async function execCommand(cmd, cwd) {
@@ -2409,80 +2060,17 @@ async function execCommand(cmd, cwd) {
2409
2060
  }
2410
2061
  const check = (0, import_child_process.spawnSync)(pm, args, { cwd, stdio: "pipe" });
2411
2062
  if (check.status !== 0) {
2412
- import_logger6.logger.error("exec", check.stderr.toString());
2063
+ import_logger4.logger.error("exec", check.stderr.toString());
2413
2064
  }
2414
2065
  }
2415
2066
 
2416
2067
  // src/generate.ts
2417
- var import_logger8 = require("@pandacss/logger");
2418
-
2419
- // src/watch.ts
2420
- var import_logger7 = require("@pandacss/logger");
2421
- var import_chokidar = __toESM(require("chokidar"));
2422
- var import_ts_pattern6 = require("ts-pattern");
2423
- function createWatcher(files, options = {}) {
2424
- const { ignore, cwd = process.cwd(), poll } = options;
2425
- const coalesce = poll || process.platform === "win32";
2426
- const watcher = import_chokidar.default.watch(files, {
2427
- usePolling: poll,
2428
- cwd,
2429
- ignoreInitial: true,
2430
- ignorePermissionErrors: true,
2431
- ignored: ignore,
2432
- awaitWriteFinish: coalesce ? { stabilityThreshold: 50, pollInterval: 10 } : false
2433
- });
2434
- import_logger7.logger.debug("watch:file", `watching [${files}]`);
2435
- process.once("SIGINT", async () => {
2436
- await watcher.close();
2437
- });
2438
- return watcher;
2439
- }
2440
- async function createConfigWatcher(conf) {
2441
- return createWatcher(conf.dependencies);
2442
- }
2443
- async function createContentWatcher(ctx, callback) {
2444
- const { include, cwd, exclude } = ctx;
2445
- const watcher = createWatcher(include, {
2446
- cwd,
2447
- ignore: exclude
2448
- });
2449
- watcher.on("all", async (event, file) => {
2450
- import_logger7.logger.debug(`file:${event}`, file);
2451
- (0, import_ts_pattern6.match)(event).with("unlink", () => {
2452
- ctx.project.removeSourceFile(ctx.absPath(file));
2453
- ctx.chunks.rm(file);
2454
- }).with("change", async () => {
2455
- ctx.project.reloadSourceFile(file);
2456
- await callback(file);
2457
- }).with("add", async () => {
2458
- ctx.project.createSourceFile(file);
2459
- await callback(file);
2460
- }).otherwise(() => {
2461
- });
2462
- });
2463
- return watcher;
2464
- }
2465
- process.setMaxListeners(Infinity);
2466
- async function watch(ctx, options) {
2467
- await createContentWatcher(ctx, options.onContentChange);
2468
- const configWatcher = await createConfigWatcher(ctx.conf);
2469
- configWatcher.on("change", async () => {
2470
- import_logger7.logger.info("watch:config", "Config changed, restarting...");
2471
- await options.onConfigChange();
2472
- });
2473
- }
2474
- process.on("unhandledRejection", (reason) => {
2475
- import_logger7.logger.error("watch:unhandledRejection", reason);
2476
- });
2477
- process.on("uncaughtException", (reason) => {
2478
- import_logger7.logger.error("watch:uncaughtException", reason);
2479
- });
2068
+ init_cjs_shims();
2069
+ var import_logger5 = require("@pandacss/logger");
2070
+ var import_ts_pattern = require("ts-pattern");
2480
2071
 
2481
- // src/generate.ts
2482
- async function build(ctx) {
2483
- const msg = await emitAndExtract(ctx);
2484
- import_logger8.logger.info("css:emit", msg);
2485
- }
2072
+ // src/load-context.ts
2073
+ init_cjs_shims();
2486
2074
  var loadContext = async (config, configPath) => {
2487
2075
  const ctxRef = { current: void 0 };
2488
2076
  const load = async () => {
@@ -2492,50 +2080,75 @@ var loadContext = async (config, configPath) => {
2492
2080
  await load();
2493
2081
  return [ctxRef, load];
2494
2082
  };
2495
- async function generate5(config, configPath) {
2083
+
2084
+ // src/generate.ts
2085
+ async function build(ctx) {
2086
+ const msg = await emitAndExtract(ctx);
2087
+ import_logger5.logger.info("css:emit", msg);
2088
+ }
2089
+ async function generate(config, configPath) {
2496
2090
  const [ctxRef, loadCtx] = await loadContext(config, configPath);
2497
- const initialCtx = ctxRef.current;
2498
- await build(initialCtx);
2499
- if (initialCtx.watch) {
2500
- await watch(initialCtx, {
2501
- onConfigChange: async () => {
2502
- await loadCtx();
2503
- return build(ctxRef.current);
2504
- },
2505
- onContentChange: async (file) => {
2091
+ const ctx = ctxRef.current;
2092
+ await build(ctx);
2093
+ const {
2094
+ runtime: { fs, path },
2095
+ dependencies,
2096
+ config: { cwd }
2097
+ } = ctx;
2098
+ if (ctx.config.watch) {
2099
+ const configWatcher = fs.watch({ include: dependencies });
2100
+ configWatcher.on("change", async () => {
2101
+ import_logger5.logger.info("config:change", "Config changed, restarting...");
2102
+ await loadCtx();
2103
+ return build(ctxRef.current);
2104
+ });
2105
+ const contentWatcher = fs.watch(ctx.config);
2106
+ contentWatcher.on("all", async (event, file) => {
2107
+ import_logger5.logger.info(`file:${event}`, file);
2108
+ (0, import_ts_pattern.match)(event).with("unlink", () => {
2109
+ ctx.project.removeSourceFile(path.abs(cwd, file));
2110
+ ctx.chunks.rm(file);
2111
+ }).with("change", async () => {
2112
+ ctx.project.reloadSourceFile(file);
2506
2113
  await writeFileChunk(ctxRef.current, file);
2114
+ }).with("add", async () => {
2115
+ ctx.project.createSourceFile(file);
2507
2116
  return bundleChunks(ctxRef.current);
2508
- }
2117
+ }).otherwise(() => {
2118
+ });
2509
2119
  });
2510
- import_logger8.logger.info("ctx:watch", watchMessage());
2120
+ import_logger5.logger.info("ctx:watch", ctx.messages.watch());
2511
2121
  }
2512
2122
  }
2513
2123
 
2514
2124
  // src/git-ignore.ts
2515
- var import_fs5 = require("fs");
2125
+ init_cjs_shims();
2126
+ var import_fs2 = require("fs");
2516
2127
  var import_look_it_up2 = require("look-it-up");
2517
- var import_outdent26 = __toESM(require("outdent"));
2518
- function setupGitIgnore(ctx) {
2519
- const txt = import_outdent26.default`## CSS Panda
2520
- ${ctx.outdir}
2521
- ${ctx.outdir}-static
2128
+ var import_outdent = __toESM(require("outdent"));
2129
+ function setupGitIgnore({ config: { outdir } }) {
2130
+ const txt = import_outdent.default`## CSS Panda
2131
+ ${outdir}
2132
+ ${outdir}-static
2522
2133
  `;
2523
2134
  const file = (0, import_look_it_up2.lookItUpSync)(".gitignore");
2524
2135
  if (!file) {
2525
- return (0, import_fs5.writeFileSync)(".gitignore", txt);
2136
+ return (0, import_fs2.writeFileSync)(".gitignore", txt);
2526
2137
  }
2527
- const content = (0, import_fs5.readFileSync)(file, "utf-8");
2528
- if (!content.includes(ctx.outdir)) {
2529
- (0, import_fs5.appendFileSync)(file, txt);
2138
+ const content = (0, import_fs2.readFileSync)(file, "utf-8");
2139
+ if (!content.includes(outdir)) {
2140
+ (0, import_fs2.appendFileSync)(file, txt);
2530
2141
  }
2531
2142
  }
2532
2143
 
2533
- // src/scaffold.ts
2534
- var import_logger9 = require("@pandacss/logger");
2535
- var import_fs_extra4 = require("fs-extra");
2144
+ // src/setup-config.ts
2145
+ init_cjs_shims();
2146
+ var import_logger6 = require("@pandacss/logger");
2147
+ var import_generator2 = require("@pandacss/generator");
2148
+ var import_fs_extra3 = require("fs-extra");
2536
2149
  var import_look_it_up3 = require("look-it-up");
2537
- var import_outdent27 = require("outdent");
2538
- var import_path5 = require("path");
2150
+ var import_outdent2 = require("outdent");
2151
+ var import_path4 = require("path");
2539
2152
  var import_preferred_pm2 = __toESM(require("preferred-pm"));
2540
2153
  async function setupConfig(cwd, { force }) {
2541
2154
  const configFile = findConfig();
@@ -2544,20 +2157,17 @@ async function setupConfig(cwd, { force }) {
2544
2157
  const cmd = pm === "npm" ? "npm run" : pm;
2545
2158
  const isTs = (0, import_look_it_up3.lookItUpSync)("tsconfig.json", cwd);
2546
2159
  const file = isTs ? "panda.config.ts" : "panda.config.mjs";
2547
- import_logger9.logger.info("init:config", `creating panda config file: ${(0, import_logger9.quote)(file)}`);
2160
+ import_logger6.logger.info("init:config", `creating panda config file: ${(0, import_logger6.quote)(file)}`);
2548
2161
  if (!force && configFile) {
2549
- import_logger9.logger.warn("init:config", configExistsMessage(cmd));
2162
+ import_logger6.logger.warn("init:config", import_generator2.messages.configExists(cmd));
2550
2163
  } else {
2551
- const content = import_outdent27.outdent`
2164
+ const content = import_outdent2.outdent`
2552
2165
  import { defineConfig } from "css-panda"
2553
2166
 
2554
2167
  export default defineConfig({
2555
2168
  // Whether to use css reset
2556
2169
  preflight: true,
2557
2170
 
2558
- // Default preset to use
2559
- presets: ["css-panda/presets"],
2560
-
2561
2171
  // Where to look for your css declarations
2562
2172
  include: ["./src/**/*.{tsx,jsx}", "./pages/**/*.{jsx,tsx}"],
2563
2173
 
@@ -2568,20 +2178,20 @@ async function setupConfig(cwd, { force }) {
2568
2178
  outdir: "design-system",
2569
2179
  })
2570
2180
  `;
2571
- await (0, import_fs_extra4.writeFile)((0, import_path5.join)(cwd, file), content);
2572
- import_logger9.logger.log(thankYouMessage());
2181
+ await (0, import_fs_extra3.writeFile)((0, import_path4.join)(cwd, file), content);
2182
+ import_logger6.logger.log(import_generator2.messages.thankYou());
2573
2183
  }
2574
2184
  }
2575
2185
  async function setupPostcss(cwd) {
2576
- import_logger9.logger.info("init:postcss", `creating postcss config file: ${(0, import_logger9.quote)("postcss.config.cjs")}`);
2577
- const content = import_outdent27.outdent`
2186
+ import_logger6.logger.info("init:postcss", `creating postcss config file: ${(0, import_logger6.quote)("postcss.config.cjs")}`);
2187
+ const content = import_outdent2.outdent`
2578
2188
  module.exports = {
2579
2189
  plugins: {
2580
2190
  'css-panda/postcss': {},
2581
2191
  },
2582
2192
  }
2583
2193
  `;
2584
- await (0, import_fs_extra4.writeFile)((0, import_path5.join)(cwd, "postcss.config.cjs"), content);
2194
+ await (0, import_fs_extra3.writeFile)((0, import_path4.join)(cwd, "postcss.config.cjs"), content);
2585
2195
  }
2586
2196
  // Annotate the CommonJS export names for ESM import in node:
2587
2197
  0 && (module.exports = {