@pandacss/node 0.0.0-dev-20221130100250 → 0.0.0-dev-20221130173625

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 CHANGED
@@ -134,8 +134,14 @@ function generateConditions(ctx) {
134
134
 
135
135
  export function finalizeConditions(paths){
136
136
  return paths.map((path) => {
137
- if (conditions.has(path)) return path
138
- if (/&|@/.test(path)) return \`[\${withoutSpace(path.trim())}]\`
137
+ if (conditions.has(path)){
138
+ return path.replace(/^_/, '')
139
+ }
140
+
141
+ if (/&|@/.test(path)){
142
+ return \`[\${withoutSpace(path.trim())}]\`
143
+ }
144
+
139
145
  return path
140
146
  })}
141
147
 
@@ -922,7 +928,7 @@ function generate4(name, pattern) {
922
928
  }
923
929
 
924
930
  ${strict ? import_outdent15.outdent`export declare function ${name}(options: ${upperName}Properties): string` : import_outdent15.outdent`
925
- type Merge<T> = Omit<SystemStyleObject, keyof T> & T
931
+ type Merge<T extends Record<string, any>> = SystemStyleObject | T
926
932
 
927
933
  ${description ? `/** ${description} */` : ""}
928
934
  export declare function ${name}(options: Merge<${upperName}Properties>): string
@@ -2097,16 +2103,19 @@ var Builder = class {
2097
2103
  done();
2098
2104
  }
2099
2105
  toString() {
2100
- return Array.from(this.fileCssMap.values()).join("");
2106
+ const ctx = this.ensure();
2107
+ const sheet = new import_core4.Stylesheet(ctx.context());
2108
+ const css2 = Array.from(this.fileCssMap.values()).join("\n\n");
2109
+ sheet.append(css2);
2110
+ return sheet.toCss({ minify: ctx.minify });
2101
2111
  }
2102
2112
  write(root) {
2103
2113
  const rootCssContent = root.toString();
2104
2114
  root.removeAll();
2105
- const css2 = (0, import_core4.discardDuplicate)(`
2115
+ root.append(`
2106
2116
  ${rootCssContent}
2107
2117
  ${this.toString()}
2108
2118
  `);
2109
- root.append(css2);
2110
2119
  }
2111
2120
  registerDependency(fn) {
2112
2121
  const ctx = this.ensure();
package/dist/index.mjs CHANGED
@@ -89,8 +89,14 @@ function generateConditions(ctx) {
89
89
 
90
90
  export function finalizeConditions(paths){
91
91
  return paths.map((path) => {
92
- if (conditions.has(path)) return path
93
- if (/&|@/.test(path)) return \`[\${withoutSpace(path.trim())}]\`
92
+ if (conditions.has(path)){
93
+ return path.replace(/^_/, '')
94
+ }
95
+
96
+ if (/&|@/.test(path)){
97
+ return \`[\${withoutSpace(path.trim())}]\`
98
+ }
99
+
94
100
  return path
95
101
  })}
96
102
 
@@ -877,7 +883,7 @@ function generate4(name, pattern) {
877
883
  }
878
884
 
879
885
  ${strict ? outdent15`export declare function ${name}(options: ${upperName}Properties): string` : outdent15`
880
- type Merge<T> = Omit<SystemStyleObject, keyof T> & T
886
+ type Merge<T extends Record<string, any>> = SystemStyleObject | T
881
887
 
882
888
  ${description ? `/** ${description} */` : ""}
883
889
  export declare function ${name}(options: Merge<${upperName}Properties>): string
@@ -1546,7 +1552,7 @@ function getBaseCss(ctx) {
1546
1552
  }
1547
1553
 
1548
1554
  // src/builder.ts
1549
- import { discardDuplicate as discardDuplicate2 } from "@pandacss/core";
1555
+ import { discardDuplicate as discardDuplicate2, Stylesheet as Stylesheet3 } from "@pandacss/core";
1550
1556
  import { ConfigNotFoundError } from "@pandacss/error";
1551
1557
  import { logger as logger5 } from "@pandacss/logger";
1552
1558
  import { toHash } from "@pandacss/shared";
@@ -2058,16 +2064,19 @@ var Builder = class {
2058
2064
  done();
2059
2065
  }
2060
2066
  toString() {
2061
- return Array.from(this.fileCssMap.values()).join("");
2067
+ const ctx = this.ensure();
2068
+ const sheet = new Stylesheet3(ctx.context());
2069
+ const css2 = Array.from(this.fileCssMap.values()).join("\n\n");
2070
+ sheet.append(css2);
2071
+ return sheet.toCss({ minify: ctx.minify });
2062
2072
  }
2063
2073
  write(root) {
2064
2074
  const rootCssContent = root.toString();
2065
2075
  root.removeAll();
2066
- const css2 = discardDuplicate2(`
2076
+ root.append(`
2067
2077
  ${rootCssContent}
2068
2078
  ${this.toString()}
2069
2079
  `);
2070
- root.append(css2);
2071
2080
  }
2072
2081
  registerDependency(fn) {
2073
2082
  const ctx = this.ensure();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20221130100250",
3
+ "version": "0.0.0-dev-20221130173625",
4
4
  "description": "The core css panda library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -30,15 +30,15 @@
30
30
  "telejson": "7.0.3",
31
31
  "ts-pattern": "4.0.6",
32
32
  "ts-morph": "17.0.1",
33
- "@pandacss/types": "0.0.0-dev-20221130100250",
34
- "@pandacss/is-valid-prop": "0.0.0-dev-20221130100250",
35
- "@pandacss/error": "0.0.0-dev-20221130100250",
36
- "@pandacss/parser": "0.0.0-dev-20221130100250",
37
- "@pandacss/shared": "0.0.0-dev-20221130100250",
38
- "@pandacss/token-dictionary": "0.0.0-dev-20221130100250",
39
- "@pandacss/logger": "0.0.0-dev-20221130100250",
40
- "@pandacss/core": "0.0.0-dev-20221130100250",
41
- "@pandacss/config": "0.0.0-dev-20221130100250"
33
+ "@pandacss/types": "0.0.0-dev-20221130173625",
34
+ "@pandacss/is-valid-prop": "0.0.0-dev-20221130173625",
35
+ "@pandacss/error": "0.0.0-dev-20221130173625",
36
+ "@pandacss/parser": "0.0.0-dev-20221130173625",
37
+ "@pandacss/shared": "0.0.0-dev-20221130173625",
38
+ "@pandacss/token-dictionary": "0.0.0-dev-20221130173625",
39
+ "@pandacss/logger": "0.0.0-dev-20221130173625",
40
+ "@pandacss/core": "0.0.0-dev-20221130173625",
41
+ "@pandacss/config": "0.0.0-dev-20221130173625"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/fs-extra": "9.0.13",
@@ -46,7 +46,7 @@
46
46
  "@types/glob-parent": "^5.1.1",
47
47
  "@types/pluralize": "0.0.29",
48
48
  "@types/lodash.merge": "4.6.7",
49
- "@pandacss/fixture": "0.0.0-dev-20221130100250"
49
+ "@pandacss/fixture": "0.0.0-dev-20221130173625"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",