@pandacss/node 0.0.0-dev-20230710141442 → 0.0.0-dev-20230710184443
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +42 -27
- package/dist/index.mjs +42 -27
- package/package.json +18 -18
package/dist/index.js
CHANGED
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.25_typescript@5.1.6/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.
|
|
38
|
+
"../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.25_typescript@5.1.6/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -1007,7 +1007,7 @@ var import_lil_fp2 = require("lil-fp");
|
|
|
1007
1007
|
// src/cli-box.ts
|
|
1008
1008
|
init_cjs_shims();
|
|
1009
1009
|
|
|
1010
|
-
// ../../node_modules/.pnpm/boxen@7.1.
|
|
1010
|
+
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
1011
1011
|
init_cjs_shims();
|
|
1012
1012
|
var import_node_process2 = __toESM(require("process"), 1);
|
|
1013
1013
|
|
|
@@ -1583,7 +1583,7 @@ function widestLine(string) {
|
|
|
1583
1583
|
return lineWidth;
|
|
1584
1584
|
}
|
|
1585
1585
|
|
|
1586
|
-
// ../../node_modules/.pnpm/boxen@7.1.
|
|
1586
|
+
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
1587
1587
|
var import_cli_boxes = __toESM(require_cli_boxes(), 1);
|
|
1588
1588
|
|
|
1589
1589
|
// ../../node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
|
|
@@ -1669,7 +1669,7 @@ function camelCase(input, options) {
|
|
|
1669
1669
|
return postProcess(input, toUpperCase);
|
|
1670
1670
|
}
|
|
1671
1671
|
|
|
1672
|
-
// ../../node_modules/.pnpm/boxen@7.1.
|
|
1672
|
+
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
1673
1673
|
var import_ansi_align = __toESM(require_ansi_align(), 1);
|
|
1674
1674
|
|
|
1675
1675
|
// ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
|
|
@@ -2013,11 +2013,11 @@ function wrapAnsi(string, columns, options) {
|
|
|
2013
2013
|
return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
|
|
2014
2014
|
}
|
|
2015
2015
|
|
|
2016
|
-
// ../../node_modules/.pnpm/boxen@7.1.
|
|
2016
|
+
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
2017
2017
|
var import_cli_boxes2 = __toESM(require_cli_boxes(), 1);
|
|
2018
2018
|
var NEWLINE = "\n";
|
|
2019
2019
|
var PAD = " ";
|
|
2020
|
-
var
|
|
2020
|
+
var NONE = "none";
|
|
2021
2021
|
var terminalColumns = () => {
|
|
2022
2022
|
const { env: env2, stdout, stderr } = import_node_process2.default;
|
|
2023
2023
|
if (stdout?.columns) {
|
|
@@ -2043,6 +2043,7 @@ var getObject = (detail) => typeof detail === "number" ? {
|
|
|
2043
2043
|
left: 0,
|
|
2044
2044
|
...detail
|
|
2045
2045
|
};
|
|
2046
|
+
var getBorderWidth = (borderStyle) => borderStyle === NONE ? 0 : 2;
|
|
2046
2047
|
var getBorderChars = (borderStyle) => {
|
|
2047
2048
|
const sides = [
|
|
2048
2049
|
"topLeft",
|
|
@@ -2055,7 +2056,7 @@ var getBorderChars = (borderStyle) => {
|
|
|
2055
2056
|
"bottom"
|
|
2056
2057
|
];
|
|
2057
2058
|
let characters;
|
|
2058
|
-
if (borderStyle ===
|
|
2059
|
+
if (borderStyle === NONE) {
|
|
2059
2060
|
borderStyle = {};
|
|
2060
2061
|
for (const side of sides) {
|
|
2061
2062
|
borderStyle[side] = "";
|
|
@@ -2084,10 +2085,10 @@ var getBorderChars = (borderStyle) => {
|
|
|
2084
2085
|
}
|
|
2085
2086
|
return characters;
|
|
2086
2087
|
};
|
|
2087
|
-
var makeTitle = (text, horizontal,
|
|
2088
|
+
var makeTitle = (text, horizontal, alignment) => {
|
|
2088
2089
|
let title = "";
|
|
2089
2090
|
const textWidth = stringWidth(text);
|
|
2090
|
-
switch (
|
|
2091
|
+
switch (alignment) {
|
|
2091
2092
|
case "left": {
|
|
2092
2093
|
title = text + horizontal.slice(textWidth);
|
|
2093
2094
|
break;
|
|
@@ -2190,17 +2191,28 @@ var boxContent = (content, contentWidth, options) => {
|
|
|
2190
2191
|
const columns = terminalColumns();
|
|
2191
2192
|
let marginLeft = PAD.repeat(options.margin.left);
|
|
2192
2193
|
if (options.float === "center") {
|
|
2193
|
-
const marginWidth = Math.max((columns - contentWidth -
|
|
2194
|
+
const marginWidth = Math.max((columns - contentWidth - getBorderWidth(options.borderStyle)) / 2, 0);
|
|
2194
2195
|
marginLeft = PAD.repeat(marginWidth);
|
|
2195
2196
|
} else if (options.float === "right") {
|
|
2196
|
-
const marginWidth = Math.max(columns - contentWidth - options.margin.right -
|
|
2197
|
+
const marginWidth = Math.max(columns - contentWidth - options.margin.right - getBorderWidth(options.borderStyle), 0);
|
|
2197
2198
|
marginLeft = PAD.repeat(marginWidth);
|
|
2198
2199
|
}
|
|
2199
|
-
|
|
2200
|
-
|
|
2200
|
+
let result = "";
|
|
2201
|
+
if (options.margin.top) {
|
|
2202
|
+
result += NEWLINE.repeat(options.margin.top);
|
|
2203
|
+
}
|
|
2204
|
+
if (options.borderStyle !== NONE || options.title) {
|
|
2205
|
+
result += colorizeBorder(marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight) + NEWLINE;
|
|
2206
|
+
}
|
|
2201
2207
|
const lines = content.split(NEWLINE);
|
|
2202
|
-
|
|
2203
|
-
|
|
2208
|
+
result += lines.map((line) => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(NEWLINE);
|
|
2209
|
+
if (options.borderStyle !== NONE) {
|
|
2210
|
+
result += NEWLINE + colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight);
|
|
2211
|
+
}
|
|
2212
|
+
if (options.margin.bottom) {
|
|
2213
|
+
result += NEWLINE.repeat(options.margin.bottom);
|
|
2214
|
+
}
|
|
2215
|
+
return result;
|
|
2204
2216
|
};
|
|
2205
2217
|
var sanitizeOptions = (options) => {
|
|
2206
2218
|
if (options.fullscreen && import_node_process2.default?.stdout) {
|
|
@@ -2216,28 +2228,30 @@ var sanitizeOptions = (options) => {
|
|
|
2216
2228
|
}
|
|
2217
2229
|
}
|
|
2218
2230
|
if (options.width) {
|
|
2219
|
-
options.width = Math.max(1, options.width -
|
|
2231
|
+
options.width = Math.max(1, options.width - getBorderWidth(options.borderStyle));
|
|
2220
2232
|
}
|
|
2221
2233
|
if (options.height) {
|
|
2222
|
-
options.height = Math.max(1, options.height -
|
|
2234
|
+
options.height = Math.max(1, options.height - getBorderWidth(options.borderStyle));
|
|
2223
2235
|
}
|
|
2224
2236
|
return options;
|
|
2225
2237
|
};
|
|
2238
|
+
var formatTitle = (title, borderStyle) => borderStyle === NONE ? title : ` ${title} `;
|
|
2226
2239
|
var determineDimensions = (text, options) => {
|
|
2227
2240
|
options = sanitizeOptions(options);
|
|
2228
2241
|
const widthOverride = options.width !== void 0;
|
|
2229
2242
|
const columns = terminalColumns();
|
|
2230
|
-
const
|
|
2231
|
-
const
|
|
2243
|
+
const borderWidth = getBorderWidth(options.borderStyle);
|
|
2244
|
+
const maxWidth = columns - options.margin.left - options.margin.right - borderWidth;
|
|
2245
|
+
const widest = widestLine(wrapAnsi(text, columns - borderWidth, { hard: true, trim: false })) + options.padding.left + options.padding.right;
|
|
2232
2246
|
if (options.title && widthOverride) {
|
|
2233
2247
|
options.title = options.title.slice(0, Math.max(0, options.width - 2));
|
|
2234
2248
|
if (options.title) {
|
|
2235
|
-
options.title =
|
|
2249
|
+
options.title = formatTitle(options.title, options.borderStyle);
|
|
2236
2250
|
}
|
|
2237
2251
|
} else if (options.title) {
|
|
2238
2252
|
options.title = options.title.slice(0, Math.max(0, maxWidth - 2));
|
|
2239
2253
|
if (options.title) {
|
|
2240
|
-
options.title =
|
|
2254
|
+
options.title = formatTitle(options.title, options.borderStyle);
|
|
2241
2255
|
if (stringWidth(options.title) > widest) {
|
|
2242
2256
|
options.width = stringWidth(options.title);
|
|
2243
2257
|
}
|
|
@@ -2246,12 +2260,12 @@ var determineDimensions = (text, options) => {
|
|
|
2246
2260
|
options.width = options.width ? options.width : widest;
|
|
2247
2261
|
if (!widthOverride) {
|
|
2248
2262
|
if (options.margin.left && options.margin.right && options.width > maxWidth) {
|
|
2249
|
-
const spaceForMargins = columns - options.width -
|
|
2263
|
+
const spaceForMargins = columns - options.width - borderWidth;
|
|
2250
2264
|
const multiplier = spaceForMargins / (options.margin.left + options.margin.right);
|
|
2251
2265
|
options.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));
|
|
2252
2266
|
options.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));
|
|
2253
2267
|
}
|
|
2254
|
-
options.width = Math.min(options.width, columns -
|
|
2268
|
+
options.width = Math.min(options.width, columns - borderWidth - options.margin.left - options.margin.right);
|
|
2255
2269
|
}
|
|
2256
2270
|
if (options.width - (options.padding.left + options.padding.right) <= 0) {
|
|
2257
2271
|
options.padding.left = 0;
|
|
@@ -2426,6 +2440,7 @@ function parseDependency(fileOrGlob) {
|
|
|
2426
2440
|
var configCache = /* @__PURE__ */ new Map();
|
|
2427
2441
|
var contentFilesCache = /* @__PURE__ */ new WeakMap();
|
|
2428
2442
|
var setupCount = 0;
|
|
2443
|
+
var layersName = ["reset", "base", "tokens", "recipes", "utilities"];
|
|
2429
2444
|
var Builder = class {
|
|
2430
2445
|
/**
|
|
2431
2446
|
* The current panda context
|
|
@@ -2556,12 +2571,12 @@ var Builder = class {
|
|
|
2556
2571
|
resolve: true
|
|
2557
2572
|
});
|
|
2558
2573
|
}
|
|
2559
|
-
// ASSUMPTION: Layer structure is an exact match (no extra layers)
|
|
2560
2574
|
isValidRoot(root) {
|
|
2561
|
-
const params = "reset, base, tokens, recipes, utilities";
|
|
2562
2575
|
let found = false;
|
|
2563
2576
|
root.walkAtRules("layer", (rule) => {
|
|
2564
|
-
|
|
2577
|
+
const foundLayers = /* @__PURE__ */ new Set();
|
|
2578
|
+
rule.params.split(",").forEach((name) => foundLayers.add(name.trim()));
|
|
2579
|
+
if (foundLayers.size >= 5 && layersName.every((name) => foundLayers.has(name))) {
|
|
2565
2580
|
found = true;
|
|
2566
2581
|
}
|
|
2567
2582
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -34,9 +34,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
mod
|
|
35
35
|
));
|
|
36
36
|
|
|
37
|
-
// ../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.
|
|
37
|
+
// ../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.25_typescript@5.1.6/node_modules/tsup/assets/esm_shims.js
|
|
38
38
|
var init_esm_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.
|
|
39
|
+
"../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.25_typescript@5.1.6/node_modules/tsup/assets/esm_shims.js"() {
|
|
40
40
|
"use strict";
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -993,7 +993,7 @@ import { Obj as Obj2, pipe as pipe2, tap as tap2, tryCatch } from "lil-fp";
|
|
|
993
993
|
// src/cli-box.ts
|
|
994
994
|
init_esm_shims();
|
|
995
995
|
|
|
996
|
-
// ../../node_modules/.pnpm/boxen@7.1.
|
|
996
|
+
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
997
997
|
init_esm_shims();
|
|
998
998
|
import process3 from "node:process";
|
|
999
999
|
|
|
@@ -1569,7 +1569,7 @@ function widestLine(string) {
|
|
|
1569
1569
|
return lineWidth;
|
|
1570
1570
|
}
|
|
1571
1571
|
|
|
1572
|
-
// ../../node_modules/.pnpm/boxen@7.1.
|
|
1572
|
+
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
1573
1573
|
var import_cli_boxes = __toESM(require_cli_boxes(), 1);
|
|
1574
1574
|
|
|
1575
1575
|
// ../../node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
|
|
@@ -1655,7 +1655,7 @@ function camelCase(input, options) {
|
|
|
1655
1655
|
return postProcess(input, toUpperCase);
|
|
1656
1656
|
}
|
|
1657
1657
|
|
|
1658
|
-
// ../../node_modules/.pnpm/boxen@7.1.
|
|
1658
|
+
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
1659
1659
|
var import_ansi_align = __toESM(require_ansi_align(), 1);
|
|
1660
1660
|
|
|
1661
1661
|
// ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
|
|
@@ -1999,11 +1999,11 @@ function wrapAnsi(string, columns, options) {
|
|
|
1999
1999
|
return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
|
|
2000
2000
|
}
|
|
2001
2001
|
|
|
2002
|
-
// ../../node_modules/.pnpm/boxen@7.1.
|
|
2002
|
+
// ../../node_modules/.pnpm/boxen@7.1.1/node_modules/boxen/index.js
|
|
2003
2003
|
var import_cli_boxes2 = __toESM(require_cli_boxes(), 1);
|
|
2004
2004
|
var NEWLINE = "\n";
|
|
2005
2005
|
var PAD = " ";
|
|
2006
|
-
var
|
|
2006
|
+
var NONE = "none";
|
|
2007
2007
|
var terminalColumns = () => {
|
|
2008
2008
|
const { env: env2, stdout, stderr } = process3;
|
|
2009
2009
|
if (stdout?.columns) {
|
|
@@ -2029,6 +2029,7 @@ var getObject = (detail) => typeof detail === "number" ? {
|
|
|
2029
2029
|
left: 0,
|
|
2030
2030
|
...detail
|
|
2031
2031
|
};
|
|
2032
|
+
var getBorderWidth = (borderStyle) => borderStyle === NONE ? 0 : 2;
|
|
2032
2033
|
var getBorderChars = (borderStyle) => {
|
|
2033
2034
|
const sides = [
|
|
2034
2035
|
"topLeft",
|
|
@@ -2041,7 +2042,7 @@ var getBorderChars = (borderStyle) => {
|
|
|
2041
2042
|
"bottom"
|
|
2042
2043
|
];
|
|
2043
2044
|
let characters;
|
|
2044
|
-
if (borderStyle ===
|
|
2045
|
+
if (borderStyle === NONE) {
|
|
2045
2046
|
borderStyle = {};
|
|
2046
2047
|
for (const side of sides) {
|
|
2047
2048
|
borderStyle[side] = "";
|
|
@@ -2070,10 +2071,10 @@ var getBorderChars = (borderStyle) => {
|
|
|
2070
2071
|
}
|
|
2071
2072
|
return characters;
|
|
2072
2073
|
};
|
|
2073
|
-
var makeTitle = (text, horizontal,
|
|
2074
|
+
var makeTitle = (text, horizontal, alignment) => {
|
|
2074
2075
|
let title = "";
|
|
2075
2076
|
const textWidth = stringWidth(text);
|
|
2076
|
-
switch (
|
|
2077
|
+
switch (alignment) {
|
|
2077
2078
|
case "left": {
|
|
2078
2079
|
title = text + horizontal.slice(textWidth);
|
|
2079
2080
|
break;
|
|
@@ -2176,17 +2177,28 @@ var boxContent = (content, contentWidth, options) => {
|
|
|
2176
2177
|
const columns = terminalColumns();
|
|
2177
2178
|
let marginLeft = PAD.repeat(options.margin.left);
|
|
2178
2179
|
if (options.float === "center") {
|
|
2179
|
-
const marginWidth = Math.max((columns - contentWidth -
|
|
2180
|
+
const marginWidth = Math.max((columns - contentWidth - getBorderWidth(options.borderStyle)) / 2, 0);
|
|
2180
2181
|
marginLeft = PAD.repeat(marginWidth);
|
|
2181
2182
|
} else if (options.float === "right") {
|
|
2182
|
-
const marginWidth = Math.max(columns - contentWidth - options.margin.right -
|
|
2183
|
+
const marginWidth = Math.max(columns - contentWidth - options.margin.right - getBorderWidth(options.borderStyle), 0);
|
|
2183
2184
|
marginLeft = PAD.repeat(marginWidth);
|
|
2184
2185
|
}
|
|
2185
|
-
|
|
2186
|
-
|
|
2186
|
+
let result = "";
|
|
2187
|
+
if (options.margin.top) {
|
|
2188
|
+
result += NEWLINE.repeat(options.margin.top);
|
|
2189
|
+
}
|
|
2190
|
+
if (options.borderStyle !== NONE || options.title) {
|
|
2191
|
+
result += colorizeBorder(marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight) + NEWLINE;
|
|
2192
|
+
}
|
|
2187
2193
|
const lines = content.split(NEWLINE);
|
|
2188
|
-
|
|
2189
|
-
|
|
2194
|
+
result += lines.map((line) => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(NEWLINE);
|
|
2195
|
+
if (options.borderStyle !== NONE) {
|
|
2196
|
+
result += NEWLINE + colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight);
|
|
2197
|
+
}
|
|
2198
|
+
if (options.margin.bottom) {
|
|
2199
|
+
result += NEWLINE.repeat(options.margin.bottom);
|
|
2200
|
+
}
|
|
2201
|
+
return result;
|
|
2190
2202
|
};
|
|
2191
2203
|
var sanitizeOptions = (options) => {
|
|
2192
2204
|
if (options.fullscreen && process3?.stdout) {
|
|
@@ -2202,28 +2214,30 @@ var sanitizeOptions = (options) => {
|
|
|
2202
2214
|
}
|
|
2203
2215
|
}
|
|
2204
2216
|
if (options.width) {
|
|
2205
|
-
options.width = Math.max(1, options.width -
|
|
2217
|
+
options.width = Math.max(1, options.width - getBorderWidth(options.borderStyle));
|
|
2206
2218
|
}
|
|
2207
2219
|
if (options.height) {
|
|
2208
|
-
options.height = Math.max(1, options.height -
|
|
2220
|
+
options.height = Math.max(1, options.height - getBorderWidth(options.borderStyle));
|
|
2209
2221
|
}
|
|
2210
2222
|
return options;
|
|
2211
2223
|
};
|
|
2224
|
+
var formatTitle = (title, borderStyle) => borderStyle === NONE ? title : ` ${title} `;
|
|
2212
2225
|
var determineDimensions = (text, options) => {
|
|
2213
2226
|
options = sanitizeOptions(options);
|
|
2214
2227
|
const widthOverride = options.width !== void 0;
|
|
2215
2228
|
const columns = terminalColumns();
|
|
2216
|
-
const
|
|
2217
|
-
const
|
|
2229
|
+
const borderWidth = getBorderWidth(options.borderStyle);
|
|
2230
|
+
const maxWidth = columns - options.margin.left - options.margin.right - borderWidth;
|
|
2231
|
+
const widest = widestLine(wrapAnsi(text, columns - borderWidth, { hard: true, trim: false })) + options.padding.left + options.padding.right;
|
|
2218
2232
|
if (options.title && widthOverride) {
|
|
2219
2233
|
options.title = options.title.slice(0, Math.max(0, options.width - 2));
|
|
2220
2234
|
if (options.title) {
|
|
2221
|
-
options.title =
|
|
2235
|
+
options.title = formatTitle(options.title, options.borderStyle);
|
|
2222
2236
|
}
|
|
2223
2237
|
} else if (options.title) {
|
|
2224
2238
|
options.title = options.title.slice(0, Math.max(0, maxWidth - 2));
|
|
2225
2239
|
if (options.title) {
|
|
2226
|
-
options.title =
|
|
2240
|
+
options.title = formatTitle(options.title, options.borderStyle);
|
|
2227
2241
|
if (stringWidth(options.title) > widest) {
|
|
2228
2242
|
options.width = stringWidth(options.title);
|
|
2229
2243
|
}
|
|
@@ -2232,12 +2246,12 @@ var determineDimensions = (text, options) => {
|
|
|
2232
2246
|
options.width = options.width ? options.width : widest;
|
|
2233
2247
|
if (!widthOverride) {
|
|
2234
2248
|
if (options.margin.left && options.margin.right && options.width > maxWidth) {
|
|
2235
|
-
const spaceForMargins = columns - options.width -
|
|
2249
|
+
const spaceForMargins = columns - options.width - borderWidth;
|
|
2236
2250
|
const multiplier = spaceForMargins / (options.margin.left + options.margin.right);
|
|
2237
2251
|
options.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));
|
|
2238
2252
|
options.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));
|
|
2239
2253
|
}
|
|
2240
|
-
options.width = Math.min(options.width, columns -
|
|
2254
|
+
options.width = Math.min(options.width, columns - borderWidth - options.margin.left - options.margin.right);
|
|
2241
2255
|
}
|
|
2242
2256
|
if (options.width - (options.padding.left + options.padding.right) <= 0) {
|
|
2243
2257
|
options.padding.left = 0;
|
|
@@ -2412,6 +2426,7 @@ function parseDependency(fileOrGlob) {
|
|
|
2412
2426
|
var configCache = /* @__PURE__ */ new Map();
|
|
2413
2427
|
var contentFilesCache = /* @__PURE__ */ new WeakMap();
|
|
2414
2428
|
var setupCount = 0;
|
|
2429
|
+
var layersName = ["reset", "base", "tokens", "recipes", "utilities"];
|
|
2415
2430
|
var Builder = class {
|
|
2416
2431
|
/**
|
|
2417
2432
|
* The current panda context
|
|
@@ -2542,12 +2557,12 @@ var Builder = class {
|
|
|
2542
2557
|
resolve: true
|
|
2543
2558
|
});
|
|
2544
2559
|
}
|
|
2545
|
-
// ASSUMPTION: Layer structure is an exact match (no extra layers)
|
|
2546
2560
|
isValidRoot(root) {
|
|
2547
|
-
const params = "reset, base, tokens, recipes, utilities";
|
|
2548
2561
|
let found = false;
|
|
2549
2562
|
root.walkAtRules("layer", (rule) => {
|
|
2550
|
-
|
|
2563
|
+
const foundLayers = /* @__PURE__ */ new Set();
|
|
2564
|
+
rule.params.split(",").forEach((name) => foundLayers.add(name.trim()));
|
|
2565
|
+
if (foundLayers.size >= 5 && layersName.every((name) => foundLayers.has(name))) {
|
|
2551
2566
|
found = true;
|
|
2552
2567
|
}
|
|
2553
2568
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/node",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230710184443",
|
|
4
4
|
"description": "The core css panda library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"chokidar": "^3.5.3",
|
|
18
|
-
"fast-glob": "^3.
|
|
18
|
+
"fast-glob": "^3.3.0",
|
|
19
19
|
"file-size": "^1.0.0",
|
|
20
20
|
"filesize": "^10.0.7",
|
|
21
21
|
"fs-extra": "11.1.1",
|
|
@@ -29,31 +29,31 @@
|
|
|
29
29
|
"pathe": "^1.1.1",
|
|
30
30
|
"pkg-types": "1.0.3",
|
|
31
31
|
"pluralize": "8.0.0",
|
|
32
|
-
"postcss": "8.4.
|
|
32
|
+
"postcss": "8.4.25",
|
|
33
33
|
"preferred-pm": "^3.0.3",
|
|
34
34
|
"ts-morph": "18.0.0",
|
|
35
|
-
"ts-pattern": "
|
|
35
|
+
"ts-pattern": "5.0.1",
|
|
36
36
|
"tsconfck": "^2.1.1",
|
|
37
|
-
"@pandacss/config": "0.0.0-dev-
|
|
38
|
-
"@pandacss/core": "0.0.0-dev-
|
|
39
|
-
"@pandacss/error": "0.0.0-dev-
|
|
40
|
-
"@pandacss/extractor": "0.0.0-dev-
|
|
41
|
-
"@pandacss/generator": "0.0.0-dev-
|
|
42
|
-
"@pandacss/is-valid-prop": "0.0.0-dev-
|
|
43
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
44
|
-
"@pandacss/parser": "0.0.0-dev-
|
|
45
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
46
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
47
|
-
"@pandacss/types": "0.0.0-dev-
|
|
37
|
+
"@pandacss/config": "0.0.0-dev-20230710184443",
|
|
38
|
+
"@pandacss/core": "0.0.0-dev-20230710184443",
|
|
39
|
+
"@pandacss/error": "0.0.0-dev-20230710184443",
|
|
40
|
+
"@pandacss/extractor": "0.0.0-dev-20230710184443",
|
|
41
|
+
"@pandacss/generator": "0.0.0-dev-20230710184443",
|
|
42
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20230710184443",
|
|
43
|
+
"@pandacss/logger": "0.0.0-dev-20230710184443",
|
|
44
|
+
"@pandacss/parser": "0.0.0-dev-20230710184443",
|
|
45
|
+
"@pandacss/shared": "0.0.0-dev-20230710184443",
|
|
46
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230710184443",
|
|
47
|
+
"@pandacss/types": "0.0.0-dev-20230710184443"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/fs-extra": "11.0.1",
|
|
51
51
|
"@types/glob-parent": "^5.1.1",
|
|
52
52
|
"@types/is-glob": "^4.0.2",
|
|
53
53
|
"@types/lodash.merge": "4.6.7",
|
|
54
|
-
"@types/pluralize": "0.0.
|
|
55
|
-
"boxen": "^7.1.
|
|
56
|
-
"@pandacss/fixture": "0.0.0-dev-
|
|
54
|
+
"@types/pluralize": "0.0.30",
|
|
55
|
+
"boxen": "^7.1.1",
|
|
56
|
+
"@pandacss/fixture": "0.0.0-dev-20230710184443"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|