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

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
@@ -1235,7 +1235,7 @@ function generateTokenCss(ctx, varRoot) {
1235
1235
  // src/generators/token-dts.ts
1236
1236
  var import_shared10 = require("@pandacss/shared");
1237
1237
  var import_outdent19 = require("outdent");
1238
- var import_pluralize = require("pluralize");
1238
+ var import_pluralize = __toESM(require("pluralize"));
1239
1239
  function generateTokenDts(dict) {
1240
1240
  const set = /* @__PURE__ */ new Set();
1241
1241
  set.add(`export type Token = ${dict.isEmpty ? "string" : (0, import_shared10.unionType)(dict.allNames)}`);
@@ -1244,7 +1244,7 @@ function generateTokenDts(dict) {
1244
1244
  interfaceSet.add("[token: string]: string");
1245
1245
  } else {
1246
1246
  for (const [key, value] of dict.categoryMap.entries()) {
1247
- const typeName = (0, import_shared10.capitalize)((0, import_pluralize.singular)(key));
1247
+ const typeName = (0, import_shared10.capitalize)(import_pluralize.default.singular(key));
1248
1248
  set.add(`export type ${typeName} = ${(0, import_shared10.unionType)(value.keys())}`);
1249
1249
  set.add(`export type ColorPalette = ${(0, import_shared10.unionType)(Object.keys(dict.colorPalettes))}`);
1250
1250
  interfaceSet.add(` ${key}: ${typeName}`);
@@ -2259,7 +2259,6 @@ async function watch(ctx, options) {
2259
2259
  const contentWatcher = await createContentWatcher(ctx, options.onContentChange);
2260
2260
  const configWatcher = await createConfigWatcher(ctx.conf);
2261
2261
  async function close() {
2262
- await configWatcher.close();
2263
2262
  await chunkDirWatcher.close();
2264
2263
  await contentWatcher.close();
2265
2264
  }
@@ -2277,15 +2276,18 @@ process.on("uncaughtException", (err) => {
2277
2276
  });
2278
2277
 
2279
2278
  // src/generate.ts
2280
- async function generate5(config, configPath) {
2279
+ async function build(config, configPath) {
2281
2280
  const ctx = await loadConfigAndCreateContext({ config, configPath });
2282
2281
  await emitAndExtract(ctx);
2283
2282
  import_logger8.logger.info(buildCompleteMessage(ctx));
2283
+ return ctx;
2284
+ }
2285
+ async function generate5(config, configPath) {
2286
+ const ctx = await build(config, configPath);
2284
2287
  if (ctx.watch) {
2285
- process.stdin.on("end", () => process.exit());
2286
2288
  await watch(ctx, {
2287
2289
  onConfigChange: () => {
2288
- return generate5(config, configPath);
2290
+ return build(config, configPath);
2289
2291
  },
2290
2292
  onAssetChange() {
2291
2293
  return bundleChunks(ctx);
package/dist/index.mjs CHANGED
@@ -1189,7 +1189,7 @@ function generateTokenCss(ctx, varRoot) {
1189
1189
  // src/generators/token-dts.ts
1190
1190
  import { unionType as unionType4, capitalize as capitalize9 } from "@pandacss/shared";
1191
1191
  import { outdent as outdent19 } from "outdent";
1192
- import { singular } from "pluralize";
1192
+ import pluralize from "pluralize";
1193
1193
  function generateTokenDts(dict) {
1194
1194
  const set = /* @__PURE__ */ new Set();
1195
1195
  set.add(`export type Token = ${dict.isEmpty ? "string" : unionType4(dict.allNames)}`);
@@ -1198,7 +1198,7 @@ function generateTokenDts(dict) {
1198
1198
  interfaceSet.add("[token: string]: string");
1199
1199
  } else {
1200
1200
  for (const [key, value] of dict.categoryMap.entries()) {
1201
- const typeName = capitalize9(singular(key));
1201
+ const typeName = capitalize9(pluralize.singular(key));
1202
1202
  set.add(`export type ${typeName} = ${unionType4(value.keys())}`);
1203
1203
  set.add(`export type ColorPalette = ${unionType4(Object.keys(dict.colorPalettes))}`);
1204
1204
  interfaceSet.add(` ${key}: ${typeName}`);
@@ -2220,7 +2220,6 @@ async function watch(ctx, options) {
2220
2220
  const contentWatcher = await createContentWatcher(ctx, options.onContentChange);
2221
2221
  const configWatcher = await createConfigWatcher(ctx.conf);
2222
2222
  async function close() {
2223
- await configWatcher.close();
2224
2223
  await chunkDirWatcher.close();
2225
2224
  await contentWatcher.close();
2226
2225
  }
@@ -2238,15 +2237,18 @@ process.on("uncaughtException", (err) => {
2238
2237
  });
2239
2238
 
2240
2239
  // src/generate.ts
2241
- async function generate5(config, configPath) {
2240
+ async function build(config, configPath) {
2242
2241
  const ctx = await loadConfigAndCreateContext({ config, configPath });
2243
2242
  await emitAndExtract(ctx);
2244
2243
  logger8.info(buildCompleteMessage(ctx));
2244
+ return ctx;
2245
+ }
2246
+ async function generate5(config, configPath) {
2247
+ const ctx = await build(config, configPath);
2245
2248
  if (ctx.watch) {
2246
- process.stdin.on("end", () => process.exit());
2247
2249
  await watch(ctx, {
2248
2250
  onConfigChange: () => {
2249
- return generate5(config, configPath);
2251
+ return build(config, configPath);
2250
2252
  },
2251
2253
  onAssetChange() {
2252
2254
  return bundleChunks(ctx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20221220144042",
3
+ "version": "0.0.0-dev-20221222091824",
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.2.11",
18
+ "fast-glob": "^3.2.12",
19
19
  "fs-extra": "11.1.0",
20
20
  "is-glob": "^4.0.3",
21
21
  "glob-parent": "^6.0.2",
@@ -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-20221220144042",
34
- "@pandacss/is-valid-prop": "0.0.0-dev-20221220144042",
35
- "@pandacss/error": "0.0.0-dev-20221220144042",
36
- "@pandacss/parser": "0.0.0-dev-20221220144042",
37
- "@pandacss/shared": "0.0.0-dev-20221220144042",
38
- "@pandacss/token-dictionary": "0.0.0-dev-20221220144042",
39
- "@pandacss/logger": "0.0.0-dev-20221220144042",
40
- "@pandacss/core": "0.0.0-dev-20221220144042",
41
- "@pandacss/config": "0.0.0-dev-20221220144042"
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"
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-20221220144042"
49
+ "@pandacss/fixture": "0.0.0-dev-20221222091824"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",