{"id":18582981,"url":"https://github.com/astahmer/pandabox","last_synced_at":"2025-04-10T11:36:43.209Z","repository":{"id":217966842,"uuid":"745241106","full_name":"astahmer/pandabox","owner":"astahmer","description":"a toolbox for Panda CSS","archived":false,"fork":false,"pushed_at":"2024-05-29T08:41:52.000Z","size":1582,"stargazers_count":34,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-29T21:09:53.387Z","etag":null,"topics":["css","panda","pandacss","recipes","theme","toolbox","typesafe","unplugin","vite"],"latest_commit_sha":null,"homepage":"https://pandabox.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astahmer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-18T23:07:04.000Z","updated_at":"2024-05-29T08:40:40.000Z","dependencies_parsed_at":"2024-04-08T22:37:49.625Z","dependency_job_id":"c6c6049f-87bd-4826-b4c4-74f514663bbf","html_url":"https://github.com/astahmer/pandabox","commit_stats":null,"previous_names":["astahmer/pandabox","astahmer/pandakit"],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astahmer%2Fpandabox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astahmer%2Fpandabox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astahmer%2Fpandabox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astahmer%2Fpandabox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astahmer","download_url":"https://codeload.github.com/astahmer/pandabox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761052,"owners_count":20991532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","panda","pandacss","recipes","theme","toolbox","typesafe","unplugin","vite"],"created_at":"2024-11-07T00:18:18.287Z","updated_at":"2025-04-10T11:36:38.189Z","avatar_url":"https://github.com/astahmer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @pandabox\n\nThis will be the home for utilities around Panda CSS.\n\n# @pandabox/prettier-plugin\n\nPrettier plugin for Panda CSS.\n\nWill sort style props based on your local `panda.config.ts`:\n\n- in any Panda function like `css({ ... })` or `stack({ ... })`\n- in the `css` prop of any JSX component\n- etc...\n\n## Installation\n\n```bash\npnpm add -D prettier @pandabox/prettier-plugin\n```\n\n```json\n{\n  \"plugins\": [\"@pandabox/prettier-plugin\"]\n}\n```\n\n# @pandabox/panda-plugins\n\n- `missing-css-warnings` - Logs a warning message when a CSS rule was used at runtime but couldn't be statically\n  extracted\n- `strict-tokens-scope` - Enforce `strictTokens` only for a set of `TokenCategory` or style props\n- `strict-tokens-runtime` - Enforce `strictTokens` at runtime, optionally scope this behaviour to a set of\n  `TokenCategory` or style props\n  - `restrict-styled-props` - Adds a `props` on the `styled` JSX Factory to restrict the props that can be passed to the\n    component\n- `remove-negative-spacing` - Removes negative spacing tokens\n- `remove-features` - Removes features from the `styled-system`\n- `minimal-setup` - Removes the built-in presets and allow removing features from the `styled-system`\n\n## Installation\n\n```bash\npnpm add -D @pandabox/panda-plugins\n```\n\n## Usage\n\n```tsx\nimport { defineConfig } from '@pandacss/dev'\nimport { pluginStrictTokensScope, pluginRemoveNegativeSpacing, pluginRemoveFeatures } from '@pandabox/panda-plugins'\n\nexport default defineConfig({\n  // ...\n  strictTokens: true,\n  // can also be used together with\n  // strictPropertyValues: true,\n  //\n  plugins: [\n    pluginStrictTokensScope({ categories: ['colors', 'spacing'] }),\n    pluginRemoveFeatures({ features: ['no-jsx', 'no-cva'] }),\n    pluginRemoveNegativeSpacing({ spacingTokenType: true, tokenType: true }),\n  ],\n})\n```\n\n# @pandabox/unplugin\n\nAlternative distribution entrypoint for Panda CSS (other than the [CLI](https://panda-css.com/docs/installation/cli) and\n[PostCSS plugin](https://panda-css.com/docs/installation/postcss)).\n\nOptionally inline your `styled-system` functions and components results as class names (`atomic` or `grouped`) (with\n`optimizeJs` option).\n\n```bash\npnpm i @pandabox/unplugin\n```\n\n## Usage\n\n```ts\nimport { defineConfig } from 'vite'\nimport pandabox from '@pandabox/unplugin'\n\nexport default defineConfig({\n  plugins: [\n    pandabox.vite({\n      /* options */\n    }),\n  ],\n})\n```\n\n## `optimizeJs` option\n\nFrom:\n\n```tsx\nimport { css } from '../styled-system/css'\n\nexport const App = () =\u003e {\n  return (\n    \u003c\u003e\n      \u003cdiv\n        className={css({\n          display: 'flex',\n          flexDirection: 'column',\n          fontWeight: 'semibold',\n          color: 'green.300',\n          textAlign: 'center',\n          textStyle: '4xl',\n        })}\n      \u003e\n        \u003cspan\u003eHello from Panda\u003c/span\u003e\n      \u003c/div\u003e\n      \u003cstyled.div\n        display=\"flex\"\n        flexDirection=\"column\"\n        fontWeight=\"semibold\"\n        color=\"green.300\"\n        textAlign=\"center\"\n        textStyle=\"4xl\"\n        onClick={() =\u003e console.log('hello')}\n        unresolvable={something}\n      \u003e\n        \u003cspan\u003eHello from Panda\u003c/span\u003e\n      \u003c/styled.div\u003e\n    \u003c/\u003e\n  )\n}\n```\n\nTo (`atomic`):\n\n```tsx\nimport { css } from '../styled-system/css'\n\nexport const App = () =\u003e {\n  return (\n    \u003c\u003e\n      \u003cdiv className={'d_flex flex_column font_semibold text_green.300 text_center textStyle_4xl'}\u003e\n        \u003cspan\u003eHello from Panda\u003c/span\u003e\n      \u003c/div\u003e\n      \u003cdiv\n        className=\"d_flex flex_column font_semibold text_green.300 text_center textStyle_4xl\"\n        onClick={() =\u003e console.log('hello')}\n        unresolvable={something}\n      \u003e\n        \u003cspan\u003eHello from Panda\u003c/span\u003e\n      \u003c/div\u003e\n    \u003c/\u003e\n  )\n}\n```\n\n# @pandabox/utils\n\n- `assignInlineVars` is like\n  [the one from vanilla-extract](https://vanilla-extract.style/documentation/packages/dynamic/#assigninlinevars) but\n  type-safe with typings using your own panda.config tokens\n- `cssVar` allows creating creating css vars as JS objects so you can reference them in your panda config or at runtime\n- `wrapValue` will wrap every objects inside the first argument with a { value: xxx }, mostly meant to easily migrate\n  from a chakra theme tokens object to a panda.config tokens object\n\n# @pandabox/postcss-plugins\n\n```bash\npnpm i @pandabox/postcss-plugins\n```\n\n- `removeUnusedCssVars`\n- `removeUnusedKeyframes`\n\n## @pandabox/define-recipe\n\n```bash\npnpm i @pandabox/define-recipe\n```\n\nThe `defineRecipe` method will now return a `RecipeBuilder` object instead of a `RecipeConfig` object. The\n`RecipeBuilder` object has the following methods:\n\n- `extend`: add additional variants to or override variants of a recipe.\n\n```ts\nconst button = defineRecipe({\n  className: 'btn',\n  variants: {\n    variant: { primary: { color: 'red' } },\n  },\n}).extend({\n  variant: {\n    primary: { px: 2 },\n    secondary: { color: 'blue' },\n  },\n})\n```\n\nresulting in:\n\n```json\n{\n  \"className\": \"btn\",\n  \"variants\": {\n    \"variant\": {\n      \"primary\": { \"color\": \"red\", \"px\": 2 },\n      \"secondary\": { \"color\": \"blue\" }\n    }\n  }\n}\n```\n\nMore methods are available on the `RecipeBuilder` object, see the [README](./packages/define-recipe/README.md) for more\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastahmer%2Fpandabox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastahmer%2Fpandabox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastahmer%2Fpandabox/lists"}