@pandacss/studio 0.5.1 → 0.6.0

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/studio.js CHANGED
@@ -34,9 +34,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
36
  // ../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.24_typescript@5.1.3/node_modules/tsup/assets/cjs_shims.js
37
+ var getImportMetaUrl, importMetaUrl;
37
38
  var init_cjs_shims = __esm({
38
39
  "../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.24_typescript@5.1.3/node_modules/tsup/assets/cjs_shims.js"() {
39
40
  "use strict";
41
+ getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
42
+ importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
40
43
  }
41
44
  });
42
45
 
@@ -2059,17 +2062,22 @@ function create$(options) {
2059
2062
  var $ = create$();
2060
2063
 
2061
2064
  // scripts/studio.ts
2062
- var import_path = require("path");
2063
- var astroBin = (0, import_path.join)(__dirname, "../node_modules/.bin/astro");
2064
- var appPath = (0, import_path.join)(__dirname, "..");
2065
+ var import_node_path3 = require("path");
2066
+ var import_node_module = require("module");
2067
+ var require2 = (0, import_node_module.createRequire)(importMetaUrl);
2068
+ var astroBin = require2.resolve("astro");
2069
+ var appPath = (0, import_node_path3.join)(__dirname, "..");
2065
2070
  async function buildStudio({ outDir }) {
2066
2071
  process.env.ASTRO_OUT_DIR = outDir;
2067
- const { stdout } = await execa(astroBin, ["build", "--root", appPath]);
2072
+ const { stdout } = await execa(astroBin, ["build", "--root", appPath], {
2073
+ cwd: appPath
2074
+ });
2068
2075
  import_logger.logger.log(stdout);
2069
2076
  }
2070
2077
  async function serveStudio() {
2071
2078
  const result = execa(astroBin, ["dev", "--root", appPath], {
2072
- stdio: "inherit"
2079
+ stdio: "inherit",
2080
+ cwd: appPath
2073
2081
  });
2074
2082
  result.stdout?.pipe(process.stdout);
2075
2083
  result.stderr?.pipe(process.stderr);
@@ -2077,7 +2085,8 @@ async function serveStudio() {
2077
2085
  async function previewStudio({ outDir }) {
2078
2086
  process.env.ASTRO_OUT_DIR = outDir;
2079
2087
  const result = execa(astroBin, ["preview", "--root", appPath], {
2080
- stdio: "inherit"
2088
+ stdio: "inherit",
2089
+ cwd: appPath
2081
2090
  });
2082
2091
  result.stdout?.pipe(process.stdout);
2083
2092
  result.stderr?.pipe(process.stderr);
package/dist/studio.mjs CHANGED
@@ -2058,17 +2058,22 @@ function create$(options) {
2058
2058
  var $ = create$();
2059
2059
 
2060
2060
  // scripts/studio.ts
2061
- import { join } from "path";
2062
- var astroBin = join(__dirname, "../node_modules/.bin/astro");
2061
+ import { join } from "node:path";
2062
+ import { createRequire } from "node:module";
2063
+ var require2 = createRequire(import.meta.url);
2064
+ var astroBin = require2.resolve("astro");
2063
2065
  var appPath = join(__dirname, "..");
2064
2066
  async function buildStudio({ outDir }) {
2065
2067
  process.env.ASTRO_OUT_DIR = outDir;
2066
- const { stdout } = await execa(astroBin, ["build", "--root", appPath]);
2068
+ const { stdout } = await execa(astroBin, ["build", "--root", appPath], {
2069
+ cwd: appPath
2070
+ });
2067
2071
  logger.log(stdout);
2068
2072
  }
2069
2073
  async function serveStudio() {
2070
2074
  const result = execa(astroBin, ["dev", "--root", appPath], {
2071
- stdio: "inherit"
2075
+ stdio: "inherit",
2076
+ cwd: appPath
2072
2077
  });
2073
2078
  result.stdout?.pipe(process.stdout);
2074
2079
  result.stderr?.pipe(process.stderr);
@@ -2076,7 +2081,8 @@ async function serveStudio() {
2076
2081
  async function previewStudio({ outDir }) {
2077
2082
  process.env.ASTRO_OUT_DIR = outDir;
2078
2083
  const result = execa(astroBin, ["preview", "--root", appPath], {
2079
- stdio: "inherit"
2084
+ stdio: "inherit",
2085
+ cwd: appPath
2080
2086
  });
2081
2087
  result.stdout?.pipe(process.stdout);
2082
2088
  result.stderr?.pipe(process.stderr);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/studio",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "The automated token documentation for Panda CSS",
5
5
  "main": "dist/studio.js",
6
6
  "module": "dist/studio.mjs",
@@ -33,19 +33,19 @@
33
33
  "react": "18.2.0",
34
34
  "react-dom": "18.2.0",
35
35
  "vite": "4.3.9",
36
- "@pandacss/types": "0.5.1",
37
- "@pandacss/config": "0.5.1",
38
- "@pandacss/shared": "0.5.1",
39
- "@pandacss/token-dictionary": "0.5.1",
40
- "@pandacss/logger": "0.5.1",
41
- "@pandacss/node": "0.5.1"
36
+ "@pandacss/types": "0.6.0",
37
+ "@pandacss/config": "0.6.0",
38
+ "@pandacss/shared": "0.6.0",
39
+ "@pandacss/token-dictionary": "0.6.0",
40
+ "@pandacss/logger": "0.6.0",
41
+ "@pandacss/node": "0.6.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/react": "18.2.14",
45
45
  "@types/react-dom": "18.2.6",
46
46
  "@vitejs/plugin-react": "4.0.1",
47
47
  "execa": "7.1.1",
48
- "@pandacss/dev": "0.5.1"
48
+ "@pandacss/dev": "0.6.0"
49
49
  },
50
50
  "scripts": {
51
51
  "codegen": "panda",
@@ -78,12 +78,14 @@ export const ByCategory = ({ byCategory }: { byCategory: Record<string, number[]
78
78
  {keys.map((category) => (
79
79
  <CategoryUtilities key={category} category={category} byCategory={byCategory} sortedBy={sortedBy} />
80
80
  ))}
81
- <CategoryUtilities
82
- className={gridItem({ colSpan: 2 })}
83
- category="unknown"
84
- byCategory={byCategory}
85
- sortedBy={sortedBy}
86
- />
81
+ {unknown ? (
82
+ <CategoryUtilities
83
+ className={gridItem({ colSpan: 2 })}
84
+ category="unknown"
85
+ byCategory={byCategory}
86
+ sortedBy={sortedBy}
87
+ />
88
+ ) : null}
87
89
  </Grid>
88
90
  </Section>
89
91
  )
@@ -36,7 +36,7 @@ const classNameMap = {
36
36
  flexGrow: 'grow',
37
37
  flexShrink: 'shrink',
38
38
  gridTemplateColumns: 'grid-cols',
39
- gridTemplateRows: 'grid-cols',
39
+ gridTemplateRows: 'grid-rows',
40
40
  gridColumn: 'col-span',
41
41
  gridRow: 'row-span',
42
42
  gridColumnStart: 'col-start',
@@ -206,11 +206,12 @@ var memo = (fn) => {
206
206
  return get
207
207
  }
208
208
 
209
- // src/hypenate.ts
210
- var dashCaseRegex = /[A-Z]/g
209
+ // src/hypenate-property.ts
210
+ var wordRegex = /([A-Z])/g
211
+ var msRegex = /^ms-/
211
212
  var hypenateProperty = memo((property) => {
212
213
  if (property.startsWith('--')) return property
213
- return property.replace(dashCaseRegex, (match) => `-${match.toLowerCase()}`)
214
+ return property.replace(wordRegex, '-$1').replace(msRegex, '-ms-').toLowerCase()
214
215
  })
215
216
 
216
217
  // src/normalize-html.ts
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable */
2
2
  export * from './factory'
3
+ export * from './is-valid-prop'
3
4
  export * from './box'
4
5
  export * from './flex'
5
6
  export * from './stack'
@@ -1,4 +1,5 @@
1
1
  export * from './factory.mjs'
2
+ export * from './is-valid-prop.mjs'
2
3
  export * from './box.mjs'
3
4
  export * from './flex.mjs'
4
5
  export * from './stack.mjs'
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ declare const isCssProperty: (value: string) => boolean;
3
+
4
+ export { isCssProperty };
@@ -8,7 +8,9 @@ const gridItemConfig = {
8
8
  return {
9
9
  gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
10
10
  gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
11
+ gridColumnStart: colStart,
11
12
  gridColumnEnd: colEnd,
13
+ gridRowStart: rowStart,
12
14
  gridRowEnd: rowEnd,
13
15
  ...rest,
14
16
  }
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable */
2
2
  import type { RecipeVariantRecord, RecipeConfig } from './recipe'
3
3
  import type { Parts } from './parts'
4
- import type { PatternConfig } from './pattern'
4
+ import type { PatternConfig, PatternProperties } from './pattern'
5
5
  import type { GlobalStyleObject, SystemStyleObject } from './system-types'
6
6
  import type { CompositionStyles } from './composition'
7
7
 
@@ -11,6 +11,6 @@ declare module '@pandacss/dev' {
11
11
  export function defineGlobalStyles(definition: GlobalStyleObject): GlobalStyleObject
12
12
  export function defineTextStyles(definition: CompositionStyles['textStyles']): CompositionStyles['textStyles']
13
13
  export function defineLayerStyles(definition: CompositionStyles['layerStyles']): CompositionStyles['layerStyles']
14
- export function definePattern<T>(config: PatternConfig<T>): PatternConfig
14
+ export function definePattern<T extends PatternProperties>(config: PatternConfig<T>): PatternConfig
15
15
  export function defineParts<T extends Parts>(parts: T): (config: Partial<Record<keyof T, SystemStyleObject>>) => Partial<Record<keyof T, SystemStyleObject>>;
16
16
  }
@@ -15,7 +15,7 @@ export type PatternHelpers = {
15
15
  map: (value: any, fn: (value: string) => string | undefined) => any
16
16
  }
17
17
 
18
- type PatternProperties = Record<string, PatternProperty>
18
+ export type PatternProperties = Record<string, PatternProperty>
19
19
 
20
20
  type Props<T> = Record<LiteralUnion<keyof T>, any>
21
21
 
@@ -155,8 +155,8 @@ type PropertyValueTypes = {
155
155
  animationDelay: Tokens["durations"];
156
156
  scale: "auto" | CssProperties["scale"];
157
157
  translate: "auto" | CssProperties["translate"];
158
- translateX: Tokens["spacing"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "full";
159
- translateY: Tokens["spacing"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "full";
158
+ translateX: Tokens["spacing"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "full" | "-1/2" | "-1/3" | "-2/3" | "-1/4" | "-2/4" | "-3/4" | "-full";
159
+ translateY: Tokens["spacing"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "full" | "-1/2" | "-1/3" | "-2/3" | "-1/4" | "-2/4" | "-3/4" | "-full";
160
160
  accentColor: Tokens["colors"];
161
161
  caretColor: Tokens["colors"];
162
162
  scrollbar: "visible" | "hidden";