@pandacss/node 0.0.0-dev-20221222091824 → 0.0.0-dev-20221228072806

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
@@ -1816,7 +1816,7 @@ function createContext(conf, io = fileSystem) {
1816
1816
  async write(file, css2) {
1817
1817
  const fileName = chunks.format(file);
1818
1818
  const oldCss = await chunks.readFile(file);
1819
- const newCss = (0, import_core3.discardDuplicate)([oldCss.trim(), css2.trim()].filter(Boolean).join("\n\n"));
1819
+ const newCss = (0, import_core3.mergeCss)(oldCss, css2);
1820
1820
  import_logger4.logger.debug({ type: "chunk:write", file, path: fileName });
1821
1821
  return write(paths.chunk, [{ file: fileName, code: newCss }]);
1822
1822
  },
@@ -2098,7 +2098,7 @@ var Builder = class {
2098
2098
  configChanged = true;
2099
2099
  updateFile(file, css2) {
2100
2100
  const oldCss = this.fileCssMap?.get(file) ?? "";
2101
- const newCss = (0, import_core4.discardDuplicate)([oldCss, css2].join("\n\n"));
2101
+ const newCss = (0, import_core4.mergeCss)(oldCss, css2);
2102
2102
  this.fileCssMap?.set(file, newCss);
2103
2103
  }
2104
2104
  async setup() {
@@ -2255,15 +2255,10 @@ async function createAssetWatcher(ctx, callback) {
2255
2255
  }
2256
2256
  process.setMaxListeners(Infinity);
2257
2257
  async function watch(ctx, options) {
2258
- const chunkDirWatcher = await createAssetWatcher(ctx, options.onAssetChange);
2259
- const contentWatcher = await createContentWatcher(ctx, options.onContentChange);
2258
+ await createAssetWatcher(ctx, options.onAssetChange);
2259
+ await createContentWatcher(ctx, options.onContentChange);
2260
2260
  const configWatcher = await createConfigWatcher(ctx.conf);
2261
- async function close() {
2262
- await chunkDirWatcher.close();
2263
- await contentWatcher.close();
2264
- }
2265
2261
  configWatcher.on("change", async () => {
2266
- await close();
2267
2262
  import_logger7.logger.info("Config changed, restarting...");
2268
2263
  await options.onConfigChange();
2269
2264
  });
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- import { discardDuplicate as discardDuplicate3 } from "@pandacss/core";
2
+ import { discardDuplicate as discardDuplicate2 } from "@pandacss/core";
3
3
 
4
4
  // src/chunks.ts
5
5
  import { Stylesheet } from "@pandacss/core";
@@ -1550,7 +1550,7 @@ function getBaseCss(ctx) {
1550
1550
  }
1551
1551
 
1552
1552
  // src/builder.ts
1553
- import { discardDuplicate as discardDuplicate2, Stylesheet as Stylesheet3 } from "@pandacss/core";
1553
+ import { discardDuplicate, mergeCss as mergeCss2, Stylesheet as Stylesheet3 } from "@pandacss/core";
1554
1554
  import { ConfigNotFoundError } from "@pandacss/error";
1555
1555
  import { logger as logger5 } from "@pandacss/logger";
1556
1556
  import { toHash } from "@pandacss/shared";
@@ -1566,8 +1566,8 @@ import { lookItUpSync } from "look-it-up";
1566
1566
  import {
1567
1567
  assignCompositions,
1568
1568
  Conditions,
1569
- discardDuplicate,
1570
1569
  getStaticCss as getStaticCssCore,
1570
+ mergeCss,
1571
1571
  Stylesheet as Stylesheet2,
1572
1572
  Utility
1573
1573
  } from "@pandacss/core";
@@ -1777,7 +1777,7 @@ function createContext(conf, io = fileSystem) {
1777
1777
  async write(file, css2) {
1778
1778
  const fileName = chunks.format(file);
1779
1779
  const oldCss = await chunks.readFile(file);
1780
- const newCss = discardDuplicate([oldCss.trim(), css2.trim()].filter(Boolean).join("\n\n"));
1780
+ const newCss = mergeCss(oldCss, css2);
1781
1781
  logger4.debug({ type: "chunk:write", file, path: fileName });
1782
1782
  return write(paths.chunk, [{ file: fileName, code: newCss }]);
1783
1783
  },
@@ -2059,7 +2059,7 @@ var Builder = class {
2059
2059
  configChanged = true;
2060
2060
  updateFile(file, css2) {
2061
2061
  const oldCss = this.fileCssMap?.get(file) ?? "";
2062
- const newCss = discardDuplicate2([oldCss, css2].join("\n\n"));
2062
+ const newCss = mergeCss2(oldCss, css2);
2063
2063
  this.fileCssMap?.set(file, newCss);
2064
2064
  }
2065
2065
  async setup() {
@@ -2115,7 +2115,7 @@ var Builder = class {
2115
2115
  const rootCssContent = root.toString();
2116
2116
  root.removeAll();
2117
2117
  root.append(
2118
- discardDuplicate2(`
2118
+ discardDuplicate(`
2119
2119
  ${rootCssContent}
2120
2120
  ${this.toString()}
2121
2121
  `)
@@ -2216,15 +2216,10 @@ async function createAssetWatcher(ctx, callback) {
2216
2216
  }
2217
2217
  process.setMaxListeners(Infinity);
2218
2218
  async function watch(ctx, options) {
2219
- const chunkDirWatcher = await createAssetWatcher(ctx, options.onAssetChange);
2220
- const contentWatcher = await createContentWatcher(ctx, options.onContentChange);
2219
+ await createAssetWatcher(ctx, options.onAssetChange);
2220
+ await createContentWatcher(ctx, options.onContentChange);
2221
2221
  const configWatcher = await createConfigWatcher(ctx.conf);
2222
- async function close() {
2223
- await chunkDirWatcher.close();
2224
- await contentWatcher.close();
2225
- }
2226
2222
  configWatcher.on("change", async () => {
2227
- await close();
2228
2223
  logger7.info("Config changed, restarting...");
2229
2224
  await options.onConfigChange();
2230
2225
  });
@@ -2336,7 +2331,7 @@ async function setupPostcss(cwd) {
2336
2331
  export {
2337
2332
  Builder,
2338
2333
  createContext,
2339
- discardDuplicate3 as discardDuplicate,
2334
+ discardDuplicate2 as discardDuplicate,
2340
2335
  emitAndExtract,
2341
2336
  emitArtifacts,
2342
2337
  execCommand,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20221222091824",
3
+ "version": "0.0.0-dev-20221228072806",
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.4",
31
31
  "ts-pattern": "4.0.6",
32
32
  "ts-morph": "17.0.1",
33
- "@pandacss/types": "0.0.0-dev-20221222091824",
34
- "@pandacss/is-valid-prop": "0.0.0-dev-20221222091824",
35
- "@pandacss/error": "0.0.0-dev-20221222091824",
36
- "@pandacss/parser": "0.0.0-dev-20221222091824",
37
- "@pandacss/shared": "0.0.0-dev-20221222091824",
38
- "@pandacss/token-dictionary": "0.0.0-dev-20221222091824",
39
- "@pandacss/logger": "0.0.0-dev-20221222091824",
40
- "@pandacss/core": "0.0.0-dev-20221222091824",
41
- "@pandacss/config": "0.0.0-dev-20221222091824"
33
+ "@pandacss/types": "0.0.0-dev-20221228072806",
34
+ "@pandacss/is-valid-prop": "0.0.0-dev-20221228072806",
35
+ "@pandacss/error": "0.0.0-dev-20221228072806",
36
+ "@pandacss/parser": "0.0.0-dev-20221228072806",
37
+ "@pandacss/shared": "0.0.0-dev-20221228072806",
38
+ "@pandacss/token-dictionary": "0.0.0-dev-20221228072806",
39
+ "@pandacss/logger": "0.0.0-dev-20221228072806",
40
+ "@pandacss/core": "0.0.0-dev-20221228072806",
41
+ "@pandacss/config": "0.0.0-dev-20221228072806"
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-20221222091824"
49
+ "@pandacss/fixture": "0.0.0-dev-20221228072806"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",