Skip to content

Commit

Permalink
refactor: annotate token creator fns
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Oct 27, 2023
1 parent 529a262 commit ba10b41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/shiny-schools-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@pandacss/dev': patch
---

Mark `defineTokens` and `defineSemanticTokens` with pure annotation to treeshake from bundle when using within component
library.
4 changes: 2 additions & 2 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ function createProxy<T>(): ProxyValue<T> {
})
}

export const defineTokens = createProxy<Tokens>()
export const defineSemanticTokens = createProxy<SemanticTokens>()
export const defineTokens = /* @__PURE__ */ createProxy<Tokens>()
export const defineSemanticTokens = /* @__PURE__ */ createProxy<SemanticTokens>()

export function defineTextStyles(definition: CompositionStyles['textStyles']) {
return definition
Expand Down

3 comments on commit ba10b41

@vercel
Copy link

@vercel vercel bot commented on ba10b41 Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on ba10b41 Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

panda-studio – ./

panda-studio-git-main-chakra-ui.vercel.app
panda-studio-chakra-ui.vercel.app
panda-app.vercel.app

@vercel
Copy link

@vercel vercel bot commented on ba10b41 Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

panda-docs – ./website

panda-docs-git-main-chakra-ui.vercel.app
panda-docs.vercel.app
panda-docs-chakra-ui.vercel.app
panda-css.com

Please sign in to comment.