Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@pandacss/node
Advanced tools
.panda
tokens
(index.js, index.d.ts, index.css)styled-system
(index.js, index.d.ts)package.json
const tokens = {
'colors.red.400': { value: '...', variable: '...' },
}
const tokenMap = {
colors: [{ group: 'red', key: 'red.400', value: '...' }],
fonts: [],
}
function getToken(path) {
const { value } = tokens[path] || {}
return value
}
function getTokenVar(path) {
const { variable } = tokens[path] || {}
return variable
}
import { generateCssVar, generateDts, generateJs } from '@pandacss/generator'
import { createTokenMap } from '@pandacss/token-dictionary'
const conf = new Conf()
const dict = createTokenMap(config)
const cssVars = generateCssVar(dict, { root: ':root' })
const dts = generateDts(dict)
const files = generateJs(dict, { formats: ['esm', 'cjs'] })
{
"name": "dot-panda",
"description": "...",
"exports": {
"./tokens": {
"import": "./generated/tokens/index.mjs"
},
"./css": {
"import": "./generated/css/index.mjs"
}
},
"typeVersions": {
"*": {
"tokens": ["./generated/tokens"],
"css": ["./generated/css"]
}
}
}
import { definePackage, writePackage } from '@pandacss/generators'
const pkg = setupPackage({
name: 'dot-panda',
description: '...',
dir: 'generated',
exports: ['tokens', 'css'],
})
writePackage(pkg)
updateTsConfig({
compilerOptions: {
paths: {
'design-system': ['./.panda'],
},
},
})
updateGitIgnore({ comment: '# Panda', path: '.@pandacss/dev' })
type ConditionType =
| 'color-scheme'
| 'resolution'
| 'writing-mode'
| 'pseudo'
| 'selector'
| 'viewport'
| 'interaction-media'
| 'reduced-motion'
| 'reduced-data'
| 'reduced-transparent'
| 'contrast'
const conditions = {
dark: {
type: 'color-scheme',
value: '[data-theme=dark]',
colorScheme: 'dark',
},
darkDimmed: {
type: 'color-scheme',
value: '[data-theme=dark_dimmed]',
colorScheme: 'dark',
},
ltr: {
type: 'dir',
value: '[dir=rtl]',
},
rtl: {
type: 'dir',
value: '[dir=rtl]',
},
hover: {
type: 'pseudo',
value: '&:hover',
},
focus: {
type: 'pseudo',
value: '&:focus',
},
sm: {
type: 'viewport',
value: '@media (min-width: 480px)',
},
}
const defaults = {
className: ({ prop, value }) => `${prop}-${esc(value)}`,
}
const tt = defineConfig({
utilities: [
{
properties: {
display: {
className: ({ value }) => `d-${value}`,
transform(value) {
return { display: value }
},
values: {
fl: 'flex',
ib: 'inline-block',
},
},
background: {
className: ({ prop, value }) => `bg-${value}`,
values: ({ tokens }) => ({
...tokens.colors,
inherit: 'inherit',
}),
},
color: {
className: ({ prop, value }) => `text-${value}`,
values: (tokens) => ({ ...tokens.colors }),
},
fill: { values: 'colors' },
lineClamp: {
className: ({ prop, value }) => `clamp-${value}`,
values: {
'1': {
'--line-clamp': '1',
},
},
},
},
shorthands: {
bg: 'background',
},
},
{
properties: {
strokeWidth: {
values: { '1': '1px', 2: '2px' },
},
},
},
{
properties: {
paddingLeft: { values: 'space', className: 'pl' },
paddingRight: { values: 'space', className: 'pr' },
paddingX: {
className: 'px',
values({ theme, map }) {
return map(theme.space, (value) => ({
paddingLeft: value,
paddingRight: value,
}))
},
},
},
shorthands: {
pl: 'paddingLeft',
px: 'paddingX',
},
},
],
})
FAQs
The core css panda library
The npm package @pandacss/node receives a total of 64,855 weekly downloads. As such, @pandacss/node popularity was classified as popular.
We found that @pandacss/node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.