@pandacss/node 0.0.0-dev-20240128131310 → 0.0.0-dev-20240128182812

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.d.mts CHANGED
@@ -4,7 +4,6 @@ import { StyleEncoder, Stylesheet } from '@pandacss/core';
4
4
  import { Generator } from '@pandacss/generator';
5
5
  import * as _pandacss_parser from '@pandacss/parser';
6
6
  import { Project, ParserResult } from '@pandacss/parser';
7
- import * as _pandacss_config from '@pandacss/config';
8
7
  import { Root, Message } from 'postcss';
9
8
 
10
9
  declare class DiffEngine {
@@ -14,13 +13,13 @@ declare class DiffEngine {
14
13
  /**
15
14
  * Reload config from disk and refresh the context
16
15
  */
17
- reloadConfigAndRefreshContext(fn?: (conf: LoadConfigResult) => void): Promise<_pandacss_config.DiffConfigResult>;
16
+ reloadConfigAndRefreshContext(fn?: (conf: LoadConfigResult) => void): Promise<_pandacss_types.DiffConfigResult>;
18
17
  /**
19
18
  * Update the context from the refreshed config
20
19
  * then persist the changes on each affected engines
21
20
  * Returns the list of affected artifacts/engines
22
21
  */
23
- refresh(conf: LoadConfigResult, fn?: (conf: LoadConfigResult) => void): _pandacss_config.DiffConfigResult;
22
+ refresh(conf: LoadConfigResult, fn?: (conf: LoadConfigResult) => void): _pandacss_types.DiffConfigResult;
24
23
  }
25
24
 
26
25
  interface OutputEngineOptions extends Generator {
@@ -208,7 +207,6 @@ declare class Builder {
208
207
  private filesMeta;
209
208
  private affecteds;
210
209
  private configDependencies;
211
- getConfigPath: (cwd?: string) => string;
212
210
  setConfigDependencies(options: SetupContextOptions): void;
213
211
  setup: (options?: {
214
212
  configPath?: string;
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ import { StyleEncoder, Stylesheet } from '@pandacss/core';
4
4
  import { Generator } from '@pandacss/generator';
5
5
  import * as _pandacss_parser from '@pandacss/parser';
6
6
  import { Project, ParserResult } from '@pandacss/parser';
7
- import * as _pandacss_config from '@pandacss/config';
8
7
  import { Root, Message } from 'postcss';
9
8
 
10
9
  declare class DiffEngine {
@@ -14,13 +13,13 @@ declare class DiffEngine {
14
13
  /**
15
14
  * Reload config from disk and refresh the context
16
15
  */
17
- reloadConfigAndRefreshContext(fn?: (conf: LoadConfigResult) => void): Promise<_pandacss_config.DiffConfigResult>;
16
+ reloadConfigAndRefreshContext(fn?: (conf: LoadConfigResult) => void): Promise<_pandacss_types.DiffConfigResult>;
18
17
  /**
19
18
  * Update the context from the refreshed config
20
19
  * then persist the changes on each affected engines
21
20
  * Returns the list of affected artifacts/engines
22
21
  */
23
- refresh(conf: LoadConfigResult, fn?: (conf: LoadConfigResult) => void): _pandacss_config.DiffConfigResult;
22
+ refresh(conf: LoadConfigResult, fn?: (conf: LoadConfigResult) => void): _pandacss_types.DiffConfigResult;
24
23
  }
25
24
 
26
25
  interface OutputEngineOptions extends Generator {
@@ -208,7 +207,6 @@ declare class Builder {
208
207
  private filesMeta;
209
208
  private affecteds;
210
209
  private configDependencies;
211
- getConfigPath: (cwd?: string) => string;
212
210
  setConfigDependencies(options: SetupContextOptions): void;
213
211
  setup: (options?: {
214
212
  configPath?: string;
package/dist/index.js CHANGED
@@ -789,8 +789,8 @@ async function buildInfo(ctx, outfile) {
789
789
  init_cjs_shims();
790
790
  var import_config4 = require("@pandacss/config");
791
791
  var import_core = require("@pandacss/core");
792
- var import_error = require("@pandacss/error");
793
792
  var import_logger6 = require("@pandacss/logger");
793
+ var import_shared = require("@pandacss/shared");
794
794
  var import_fs = require("fs");
795
795
  var import_path3 = require("path");
796
796
 
@@ -2609,13 +2609,6 @@ var Builder = class {
2609
2609
  filesMeta;
2610
2610
  affecteds;
2611
2611
  configDependencies = /* @__PURE__ */ new Set();
2612
- getConfigPath = (cwd) => {
2613
- const configPath = (0, import_config4.findConfig)({ cwd });
2614
- if (!configPath) {
2615
- throw new import_error.ConfigNotFoundError();
2616
- }
2617
- return configPath;
2618
- };
2619
2612
  setConfigDependencies(options) {
2620
2613
  const tsOptions = this.context?.conf.tsOptions ?? { baseUrl: void 0, pathMappings: [] };
2621
2614
  const compilerOptions = this.context?.conf.tsconfig?.compilerOptions ?? {};
@@ -2631,7 +2624,7 @@ var Builder = class {
2631
2624
  }
2632
2625
  setup = async (options = {}) => {
2633
2626
  import_logger6.logger.debug("builder", "\u{1F6A7} Setup");
2634
- const configPath = options.configPath ?? this.getConfigPath(options.cwd);
2627
+ const configPath = options.configPath ?? (0, import_config4.findConfig)({ cwd: options.cwd });
2635
2628
  this.setConfigDependencies({ configPath, cwd: options.cwd });
2636
2629
  if (!this.context) {
2637
2630
  return this.setupContext({ configPath, cwd: options.cwd });
@@ -2667,7 +2660,7 @@ var Builder = class {
2667
2660
  };
2668
2661
  getContextOrThrow = () => {
2669
2662
  if (!this.context) {
2670
- throw new Error("context not loaded");
2663
+ throw new import_shared.PandaError("NO_CONTEXT", "context not loaded");
2671
2664
  }
2672
2665
  return this.context;
2673
2666
  };
package/dist/index.mjs CHANGED
@@ -764,8 +764,8 @@ async function buildInfo(ctx, outfile) {
764
764
  init_esm_shims();
765
765
  import { findConfig, getConfigDependencies } from "@pandacss/config";
766
766
  import { optimizeCss } from "@pandacss/core";
767
- import { ConfigNotFoundError } from "@pandacss/error";
768
767
  import { logger as logger6 } from "@pandacss/logger";
768
+ import { PandaError } from "@pandacss/shared";
769
769
  import { existsSync, statSync } from "fs";
770
770
  import { normalize as normalize2, resolve as resolve3 } from "path";
771
771
 
@@ -2584,13 +2584,6 @@ var Builder = class {
2584
2584
  filesMeta;
2585
2585
  affecteds;
2586
2586
  configDependencies = /* @__PURE__ */ new Set();
2587
- getConfigPath = (cwd) => {
2588
- const configPath = findConfig({ cwd });
2589
- if (!configPath) {
2590
- throw new ConfigNotFoundError();
2591
- }
2592
- return configPath;
2593
- };
2594
2587
  setConfigDependencies(options) {
2595
2588
  const tsOptions = this.context?.conf.tsOptions ?? { baseUrl: void 0, pathMappings: [] };
2596
2589
  const compilerOptions = this.context?.conf.tsconfig?.compilerOptions ?? {};
@@ -2606,7 +2599,7 @@ var Builder = class {
2606
2599
  }
2607
2600
  setup = async (options = {}) => {
2608
2601
  logger6.debug("builder", "\u{1F6A7} Setup");
2609
- const configPath = options.configPath ?? this.getConfigPath(options.cwd);
2602
+ const configPath = options.configPath ?? findConfig({ cwd: options.cwd });
2610
2603
  this.setConfigDependencies({ configPath, cwd: options.cwd });
2611
2604
  if (!this.context) {
2612
2605
  return this.setupContext({ configPath, cwd: options.cwd });
@@ -2642,7 +2635,7 @@ var Builder = class {
2642
2635
  };
2643
2636
  getContextOrThrow = () => {
2644
2637
  if (!this.context) {
2645
- throw new Error("context not loaded");
2638
+ throw new PandaError("NO_CONTEXT", "context not loaded");
2646
2639
  }
2647
2640
  return this.context;
2648
2641
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20240128131310",
3
+ "version": "0.0.0-dev-20240128182812",
4
4
  "description": "The core css panda library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -53,16 +53,15 @@
53
53
  "ts-pattern": "5.0.5",
54
54
  "tsconfck": "^2.1.2",
55
55
  "v8-profiler-next": "^1.10.0",
56
- "@pandacss/config": "0.0.0-dev-20240128131310",
57
- "@pandacss/core": "0.0.0-dev-20240128131310",
58
- "@pandacss/error": "0.0.0-dev-20240128131310",
59
- "@pandacss/extractor": "0.0.0-dev-20240128131310",
60
- "@pandacss/generator": "0.0.0-dev-20240128131310",
61
- "@pandacss/logger": "0.0.0-dev-20240128131310",
62
- "@pandacss/parser": "0.0.0-dev-20240128131310",
63
- "@pandacss/shared": "0.0.0-dev-20240128131310",
64
- "@pandacss/token-dictionary": "0.0.0-dev-20240128131310",
65
- "@pandacss/types": "0.0.0-dev-20240128131310"
56
+ "@pandacss/config": "0.0.0-dev-20240128182812",
57
+ "@pandacss/core": "0.0.0-dev-20240128182812",
58
+ "@pandacss/extractor": "0.0.0-dev-20240128182812",
59
+ "@pandacss/generator": "0.0.0-dev-20240128182812",
60
+ "@pandacss/logger": "0.0.0-dev-20240128182812",
61
+ "@pandacss/parser": "0.0.0-dev-20240128182812",
62
+ "@pandacss/shared": "0.0.0-dev-20240128182812",
63
+ "@pandacss/token-dictionary": "0.0.0-dev-20240128182812",
64
+ "@pandacss/types": "0.0.0-dev-20240128182812"
66
65
  },
67
66
  "devDependencies": {
68
67
  "@types/fs-extra": "11.0.4",