@pandacss/node 0.0.0-dev-20230509145254 → 0.0.0-dev-20230509145753

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 (3) hide show
  1. package/dist/index.js +37 -20
  2. package/dist/index.mjs +37 -20
  3. package/package.json +15 -15
package/dist/index.js CHANGED
@@ -1081,7 +1081,7 @@ var import_lil_fp2 = require("lil-fp");
1081
1081
  // src/cli-box.ts
1082
1082
  init_cjs_shims();
1083
1083
 
1084
- // ../../node_modules/.pnpm/boxen@7.0.2/node_modules/boxen/index.js
1084
+ // ../../node_modules/.pnpm/boxen@7.1.0/node_modules/boxen/index.js
1085
1085
  init_cjs_shims();
1086
1086
  var import_node_process2 = __toESM(require("process"), 1);
1087
1087
 
@@ -1656,10 +1656,10 @@ function widestLine(string) {
1656
1656
  return lineWidth;
1657
1657
  }
1658
1658
 
1659
- // ../../node_modules/.pnpm/boxen@7.0.2/node_modules/boxen/index.js
1659
+ // ../../node_modules/.pnpm/boxen@7.1.0/node_modules/boxen/index.js
1660
1660
  var import_cli_boxes = __toESM(require_cli_boxes(), 1);
1661
1661
 
1662
- // ../../node_modules/.pnpm/camelcase@7.0.0/node_modules/camelcase/index.js
1662
+ // ../../node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
1663
1663
  init_cjs_shims();
1664
1664
  var UPPERCASE = /[\p{Lu}]/u;
1665
1665
  var LOWERCASE = /[\p{Ll}]/u;
@@ -1669,19 +1669,21 @@ var SEPARATORS = /[_.\- ]+/;
1669
1669
  var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
1670
1670
  var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
1671
1671
  var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
1672
- var preserveCamelCase = (string, toLowerCase, toUpperCase) => {
1672
+ var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
1673
1673
  let isLastCharLower = false;
1674
1674
  let isLastCharUpper = false;
1675
1675
  let isLastLastCharUpper = false;
1676
+ let isLastLastCharPreserved = false;
1676
1677
  for (let index = 0; index < string.length; index++) {
1677
1678
  const character = string[index];
1679
+ isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true;
1678
1680
  if (isLastCharLower && UPPERCASE.test(character)) {
1679
1681
  string = string.slice(0, index) + "-" + string.slice(index);
1680
1682
  isLastCharLower = false;
1681
1683
  isLastLastCharUpper = isLastCharUpper;
1682
1684
  isLastCharUpper = true;
1683
1685
  index++;
1684
- } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
1686
+ } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) {
1685
1687
  string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
1686
1688
  isLastLastCharUpper = isLastCharUpper;
1687
1689
  isLastCharUpper = false;
@@ -1730,7 +1732,7 @@ function camelCase(input, options) {
1730
1732
  }
1731
1733
  const hasUpperCase = input !== toLowerCase(input);
1732
1734
  if (hasUpperCase) {
1733
- input = preserveCamelCase(input, toLowerCase, toUpperCase);
1735
+ input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
1734
1736
  }
1735
1737
  input = input.replace(LEADING_SEPARATORS, "");
1736
1738
  input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
@@ -1740,10 +1742,10 @@ function camelCase(input, options) {
1740
1742
  return postProcess(input, toUpperCase);
1741
1743
  }
1742
1744
 
1743
- // ../../node_modules/.pnpm/boxen@7.0.2/node_modules/boxen/index.js
1745
+ // ../../node_modules/.pnpm/boxen@7.1.0/node_modules/boxen/index.js
1744
1746
  var import_ansi_align = __toESM(require_ansi_align(), 1);
1745
1747
 
1746
- // ../../node_modules/.pnpm/wrap-ansi@8.0.1/node_modules/wrap-ansi/index.js
1748
+ // ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
1747
1749
  init_cjs_shims();
1748
1750
 
1749
1751
  // ../../node_modules/.pnpm/ansi-styles@6.1.1/node_modules/ansi-styles/index.js
@@ -1925,7 +1927,7 @@ function assembleStyles2() {
1925
1927
  var ansiStyles2 = assembleStyles2();
1926
1928
  var ansi_styles_default2 = ansiStyles2;
1927
1929
 
1928
- // ../../node_modules/.pnpm/wrap-ansi@8.0.1/node_modules/wrap-ansi/index.js
1930
+ // ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
1929
1931
  var ESCAPES = /* @__PURE__ */ new Set([
1930
1932
  "\x1B",
1931
1933
  "\x9B"
@@ -2076,7 +2078,7 @@ function wrapAnsi(string, columns, options) {
2076
2078
  return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
2077
2079
  }
2078
2080
 
2079
- // ../../node_modules/.pnpm/boxen@7.0.2/node_modules/boxen/index.js
2081
+ // ../../node_modules/.pnpm/boxen@7.1.0/node_modules/boxen/index.js
2080
2082
  var import_cli_boxes2 = __toESM(require_cli_boxes(), 1);
2081
2083
  var NEWLINE = "\n";
2082
2084
  var PAD = " ";
@@ -2118,6 +2120,12 @@ var getBorderChars = (borderStyle) => {
2118
2120
  "bottom"
2119
2121
  ];
2120
2122
  let characters;
2123
+ if (borderStyle === "none") {
2124
+ borderStyle = {};
2125
+ for (const side of sides) {
2126
+ borderStyle[side] = "";
2127
+ }
2128
+ }
2121
2129
  if (typeof borderStyle === "string") {
2122
2130
  characters = import_cli_boxes.default[borderStyle];
2123
2131
  if (!characters) {
@@ -2133,7 +2141,7 @@ var getBorderChars = (borderStyle) => {
2133
2141
  borderStyle.bottom = borderStyle.horizontal;
2134
2142
  }
2135
2143
  for (const side of sides) {
2136
- if (!borderStyle[side] || typeof borderStyle[side] !== "string") {
2144
+ if (borderStyle[side] === null || typeof borderStyle[side] !== "string") {
2137
2145
  throw new TypeError(`Invalid border style: ${side}`);
2138
2146
  }
2139
2147
  }
@@ -2145,13 +2153,15 @@ var makeTitle = (text, horizontal, alignement) => {
2145
2153
  let title = "";
2146
2154
  const textWidth = stringWidth(text);
2147
2155
  switch (alignement) {
2148
- case "left":
2156
+ case "left": {
2149
2157
  title = text + horizontal.slice(textWidth);
2150
2158
  break;
2151
- case "right":
2159
+ }
2160
+ case "right": {
2152
2161
  title = horizontal.slice(textWidth) + text;
2153
2162
  break;
2154
- default:
2163
+ }
2164
+ default: {
2155
2165
  horizontal = horizontal.slice(textWidth);
2156
2166
  if (horizontal.length % 2 === 1) {
2157
2167
  horizontal = horizontal.slice(Math.floor(horizontal.length / 2));
@@ -2161,6 +2171,7 @@ var makeTitle = (text, horizontal, alignement) => {
2161
2171
  title = horizontal + text + horizontal;
2162
2172
  }
2163
2173
  break;
2174
+ }
2164
2175
  }
2165
2176
  return title;
2166
2177
  };
@@ -2179,15 +2190,18 @@ var makeContentText = (text, { padding, width, textAlignment, height }) => {
2179
2190
  for (const alignedLine of alignedLinesArray) {
2180
2191
  let paddedLine;
2181
2192
  switch (textAlignment) {
2182
- case "center":
2193
+ case "center": {
2183
2194
  paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;
2184
2195
  break;
2185
- case "right":
2196
+ }
2197
+ case "right": {
2186
2198
  paddedLine = PAD.repeat(max - longestLength) + alignedLine;
2187
2199
  break;
2188
- default:
2200
+ }
2201
+ default: {
2189
2202
  paddedLine = alignedLine;
2190
2203
  break;
2204
+ }
2191
2205
  }
2192
2206
  newLines.push(paddedLine);
2193
2207
  }
@@ -2205,12 +2219,15 @@ var makeContentText = (text, { padding, width, textAlignment, height }) => {
2205
2219
  lines = lines.map((line) => {
2206
2220
  if (width - stringWidth(line) > 0) {
2207
2221
  switch (textAlignment) {
2208
- case "center":
2222
+ case "center": {
2209
2223
  return line + PAD.repeat(width - stringWidth(line));
2210
- case "right":
2224
+ }
2225
+ case "right": {
2211
2226
  return line + PAD.repeat(width - stringWidth(line));
2212
- default:
2227
+ }
2228
+ default: {
2213
2229
  return line + PAD.repeat(width - stringWidth(line));
2230
+ }
2214
2231
  }
2215
2232
  }
2216
2233
  return line;
package/dist/index.mjs CHANGED
@@ -1070,7 +1070,7 @@ import { Obj as Obj2, pipe as pipe2, tap as tap2, tryCatch } from "lil-fp";
1070
1070
  // src/cli-box.ts
1071
1071
  init_esm_shims();
1072
1072
 
1073
- // ../../node_modules/.pnpm/boxen@7.0.2/node_modules/boxen/index.js
1073
+ // ../../node_modules/.pnpm/boxen@7.1.0/node_modules/boxen/index.js
1074
1074
  init_esm_shims();
1075
1075
  import process3 from "node:process";
1076
1076
 
@@ -1645,10 +1645,10 @@ function widestLine(string) {
1645
1645
  return lineWidth;
1646
1646
  }
1647
1647
 
1648
- // ../../node_modules/.pnpm/boxen@7.0.2/node_modules/boxen/index.js
1648
+ // ../../node_modules/.pnpm/boxen@7.1.0/node_modules/boxen/index.js
1649
1649
  var import_cli_boxes = __toESM(require_cli_boxes(), 1);
1650
1650
 
1651
- // ../../node_modules/.pnpm/camelcase@7.0.0/node_modules/camelcase/index.js
1651
+ // ../../node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
1652
1652
  init_esm_shims();
1653
1653
  var UPPERCASE = /[\p{Lu}]/u;
1654
1654
  var LOWERCASE = /[\p{Ll}]/u;
@@ -1658,19 +1658,21 @@ var SEPARATORS = /[_.\- ]+/;
1658
1658
  var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
1659
1659
  var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
1660
1660
  var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
1661
- var preserveCamelCase = (string, toLowerCase, toUpperCase) => {
1661
+ var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
1662
1662
  let isLastCharLower = false;
1663
1663
  let isLastCharUpper = false;
1664
1664
  let isLastLastCharUpper = false;
1665
+ let isLastLastCharPreserved = false;
1665
1666
  for (let index = 0; index < string.length; index++) {
1666
1667
  const character = string[index];
1668
+ isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true;
1667
1669
  if (isLastCharLower && UPPERCASE.test(character)) {
1668
1670
  string = string.slice(0, index) + "-" + string.slice(index);
1669
1671
  isLastCharLower = false;
1670
1672
  isLastLastCharUpper = isLastCharUpper;
1671
1673
  isLastCharUpper = true;
1672
1674
  index++;
1673
- } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
1675
+ } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) {
1674
1676
  string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
1675
1677
  isLastLastCharUpper = isLastCharUpper;
1676
1678
  isLastCharUpper = false;
@@ -1719,7 +1721,7 @@ function camelCase(input, options) {
1719
1721
  }
1720
1722
  const hasUpperCase = input !== toLowerCase(input);
1721
1723
  if (hasUpperCase) {
1722
- input = preserveCamelCase(input, toLowerCase, toUpperCase);
1724
+ input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
1723
1725
  }
1724
1726
  input = input.replace(LEADING_SEPARATORS, "");
1725
1727
  input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
@@ -1729,10 +1731,10 @@ function camelCase(input, options) {
1729
1731
  return postProcess(input, toUpperCase);
1730
1732
  }
1731
1733
 
1732
- // ../../node_modules/.pnpm/boxen@7.0.2/node_modules/boxen/index.js
1734
+ // ../../node_modules/.pnpm/boxen@7.1.0/node_modules/boxen/index.js
1733
1735
  var import_ansi_align = __toESM(require_ansi_align(), 1);
1734
1736
 
1735
- // ../../node_modules/.pnpm/wrap-ansi@8.0.1/node_modules/wrap-ansi/index.js
1737
+ // ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
1736
1738
  init_esm_shims();
1737
1739
 
1738
1740
  // ../../node_modules/.pnpm/ansi-styles@6.1.1/node_modules/ansi-styles/index.js
@@ -1914,7 +1916,7 @@ function assembleStyles2() {
1914
1916
  var ansiStyles2 = assembleStyles2();
1915
1917
  var ansi_styles_default2 = ansiStyles2;
1916
1918
 
1917
- // ../../node_modules/.pnpm/wrap-ansi@8.0.1/node_modules/wrap-ansi/index.js
1919
+ // ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
1918
1920
  var ESCAPES = /* @__PURE__ */ new Set([
1919
1921
  "\x1B",
1920
1922
  "\x9B"
@@ -2065,7 +2067,7 @@ function wrapAnsi(string, columns, options) {
2065
2067
  return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
2066
2068
  }
2067
2069
 
2068
- // ../../node_modules/.pnpm/boxen@7.0.2/node_modules/boxen/index.js
2070
+ // ../../node_modules/.pnpm/boxen@7.1.0/node_modules/boxen/index.js
2069
2071
  var import_cli_boxes2 = __toESM(require_cli_boxes(), 1);
2070
2072
  var NEWLINE = "\n";
2071
2073
  var PAD = " ";
@@ -2107,6 +2109,12 @@ var getBorderChars = (borderStyle) => {
2107
2109
  "bottom"
2108
2110
  ];
2109
2111
  let characters;
2112
+ if (borderStyle === "none") {
2113
+ borderStyle = {};
2114
+ for (const side of sides) {
2115
+ borderStyle[side] = "";
2116
+ }
2117
+ }
2110
2118
  if (typeof borderStyle === "string") {
2111
2119
  characters = import_cli_boxes.default[borderStyle];
2112
2120
  if (!characters) {
@@ -2122,7 +2130,7 @@ var getBorderChars = (borderStyle) => {
2122
2130
  borderStyle.bottom = borderStyle.horizontal;
2123
2131
  }
2124
2132
  for (const side of sides) {
2125
- if (!borderStyle[side] || typeof borderStyle[side] !== "string") {
2133
+ if (borderStyle[side] === null || typeof borderStyle[side] !== "string") {
2126
2134
  throw new TypeError(`Invalid border style: ${side}`);
2127
2135
  }
2128
2136
  }
@@ -2134,13 +2142,15 @@ var makeTitle = (text, horizontal, alignement) => {
2134
2142
  let title = "";
2135
2143
  const textWidth = stringWidth(text);
2136
2144
  switch (alignement) {
2137
- case "left":
2145
+ case "left": {
2138
2146
  title = text + horizontal.slice(textWidth);
2139
2147
  break;
2140
- case "right":
2148
+ }
2149
+ case "right": {
2141
2150
  title = horizontal.slice(textWidth) + text;
2142
2151
  break;
2143
- default:
2152
+ }
2153
+ default: {
2144
2154
  horizontal = horizontal.slice(textWidth);
2145
2155
  if (horizontal.length % 2 === 1) {
2146
2156
  horizontal = horizontal.slice(Math.floor(horizontal.length / 2));
@@ -2150,6 +2160,7 @@ var makeTitle = (text, horizontal, alignement) => {
2150
2160
  title = horizontal + text + horizontal;
2151
2161
  }
2152
2162
  break;
2163
+ }
2153
2164
  }
2154
2165
  return title;
2155
2166
  };
@@ -2168,15 +2179,18 @@ var makeContentText = (text, { padding, width, textAlignment, height }) => {
2168
2179
  for (const alignedLine of alignedLinesArray) {
2169
2180
  let paddedLine;
2170
2181
  switch (textAlignment) {
2171
- case "center":
2182
+ case "center": {
2172
2183
  paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;
2173
2184
  break;
2174
- case "right":
2185
+ }
2186
+ case "right": {
2175
2187
  paddedLine = PAD.repeat(max - longestLength) + alignedLine;
2176
2188
  break;
2177
- default:
2189
+ }
2190
+ default: {
2178
2191
  paddedLine = alignedLine;
2179
2192
  break;
2193
+ }
2180
2194
  }
2181
2195
  newLines.push(paddedLine);
2182
2196
  }
@@ -2194,12 +2208,15 @@ var makeContentText = (text, { padding, width, textAlignment, height }) => {
2194
2208
  lines = lines.map((line) => {
2195
2209
  if (width - stringWidth(line) > 0) {
2196
2210
  switch (textAlignment) {
2197
- case "center":
2211
+ case "center": {
2198
2212
  return line + PAD.repeat(width - stringWidth(line));
2199
- case "right":
2213
+ }
2214
+ case "right": {
2200
2215
  return line + PAD.repeat(width - stringWidth(line));
2201
- default:
2216
+ }
2217
+ default: {
2202
2218
  return line + PAD.repeat(width - stringWidth(line));
2219
+ }
2203
2220
  }
2204
2221
  }
2205
2222
  return line;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20230509145254",
3
+ "version": "0.0.0-dev-20230509145753",
4
4
  "description": "The core css panda library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -32,18 +32,18 @@
32
32
  "postcss": "8.4.23",
33
33
  "preferred-pm": "^3.0.3",
34
34
  "ts-morph": "18.0.0",
35
- "ts-pattern": "4.2.2",
36
- "@pandacss/config": "0.0.0-dev-20230509145254",
37
- "@pandacss/core": "0.0.0-dev-20230509145254",
38
- "@pandacss/error": "0.0.0-dev-20230509145254",
39
- "@pandacss/generator": "0.0.0-dev-20230509145254",
40
- "@pandacss/is-valid-prop": "0.0.0-dev-20230509145254",
41
- "@pandacss/logger": "0.0.0-dev-20230509145254",
42
- "@pandacss/parser": "0.0.0-dev-20230509145254",
43
- "@pandacss/extractor": "0.0.0-dev-20230509145254",
44
- "@pandacss/shared": "0.0.0-dev-20230509145254",
45
- "@pandacss/token-dictionary": "0.0.0-dev-20230509145254",
46
- "@pandacss/types": "0.0.0-dev-20230509145254"
35
+ "ts-pattern": "4.3.0",
36
+ "@pandacss/config": "0.0.0-dev-20230509145753",
37
+ "@pandacss/core": "0.0.0-dev-20230509145753",
38
+ "@pandacss/error": "0.0.0-dev-20230509145753",
39
+ "@pandacss/generator": "0.0.0-dev-20230509145753",
40
+ "@pandacss/is-valid-prop": "0.0.0-dev-20230509145753",
41
+ "@pandacss/logger": "0.0.0-dev-20230509145753",
42
+ "@pandacss/parser": "0.0.0-dev-20230509145753",
43
+ "@pandacss/extractor": "0.0.0-dev-20230509145753",
44
+ "@pandacss/shared": "0.0.0-dev-20230509145753",
45
+ "@pandacss/token-dictionary": "0.0.0-dev-20230509145753",
46
+ "@pandacss/types": "0.0.0-dev-20230509145753"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/fs-extra": "11.0.1",
@@ -51,9 +51,9 @@
51
51
  "@types/is-glob": "^4.0.2",
52
52
  "@types/lodash.merge": "4.6.7",
53
53
  "@types/pluralize": "0.0.29",
54
- "boxen": "^7.0.2",
54
+ "boxen": "^7.1.0",
55
55
  "gzip-size": "^7.0.0",
56
- "@pandacss/fixture": "0.0.0-dev-20230509145254"
56
+ "@pandacss/fixture": "0.0.0-dev-20230509145753"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",