Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pandacss/types

Package Overview
Dependencies
Maintainers
1
Versions
1133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pandacss/types - npm Package Compare versions

Comparing version 0.41.0 to 0.42.0

220

dist/analyze-report.d.ts

@@ -1,43 +0,69 @@

import type { BoxNodeEmptyInitializer, BoxNodeLiteral, BoxNodeMap } from '@pandacss/extractor'
import type { Config } from './config'
export type ReportItemType = 'object' | 'cva' | 'pattern' | 'recipe' | 'jsx' | 'jsx-factory'
export interface ReportItem {
id: number
from: string
type: ReportItemType
filepath: string
kind: 'function' | 'component'
export type ReportItemType =
| 'css'
| 'cva'
| 'sva'
| 'pattern'
| 'recipe'
| 'jsx-factory'
| 'jsx-pattern'
| 'jsx-recipe'
| 'jsx'
type ComponentKind = 'component' | 'function'
type Range = {
startPosition: number
startLineNumber: number
startColumn: number
endPosition: number
endLineNumber: number
endColumn: number
}
export interface PropertyReportItem {
index: string
componentIndex: ComponentReportItem['componentIndex']
componentName: ComponentReportItem['componentName']
reportItemKind: 'token' | 'utility'
path: string[]
conditionName?: string | undefined
propName: string
conditionName?: string | undefined
value: string | number | true
category: string
isKnown: boolean
box: BoxNodeLiteral | BoxNodeEmptyInitializer
value: string | number | boolean
tokenType?: string
isKnownValue: boolean
range: Range
filepath: string
}
/**
* An instance is either a component usage or a function usage
* @example an instance name could be 'Button', 'css', 'panda.div', 'vstack', ...
* An component is either a component usage or a function usage
* @example an component name could be 'Button', 'css', 'panda.div', 'vstack', ...
*/
export interface ReportInstanceItem extends Pick<ReportItem, 'from' | 'type' | 'kind' | 'filepath'> {
instanceId: number
contains: Array<ReportItem['id']>
export interface ComponentReportItem extends Pick<PropertyReportItem, 'filepath'> {
componentIndex: string
componentName: string
reportItemType: ReportItemType
kind: ComponentKind
contains: Array<PropertyReportItem['index']>
value: Record<string, any>
box: BoxNodeMap
range: Range
}
export interface ReportMaps {
byInstanceOfKind: Map<'function' | 'component', Set<ReportInstanceItem['instanceId']>>
byPropertyName: Map<string, Set<ReportItem['id']>>
byCategory: Map<string, Set<ReportItem['id']>>
byConditionName: Map<string, Set<ReportItem['id']>>
byShorthand: Map<string, Set<ReportItem['id']>>
byTokenName: Map<string, Set<ReportItem['id']>>
byPropertyPath: Map<string, Set<ReportItem['id']>>
fromKind: Map<'function' | 'component', Set<ReportItem['id']>>
byType: Map<string, Set<ReportItem['id']>>
byInstanceName: Map<string, Set<ReportItem['id']>>
colorsUsed: Map<string, Set<ReportItem['id']>>
export interface ReportDerivedMaps {
byComponentOfKind: Map<ComponentKind, Set<ComponentReportItem['componentIndex']>>
byPropertyName: Map<string, Set<PropertyReportItem['index']>>
byTokenType: Map<string, Set<PropertyReportItem['index']>>
byConditionName: Map<string, Set<PropertyReportItem['index']>>
byShorthand: Map<string, Set<PropertyReportItem['index']>>
byTokenName: Map<string, Set<PropertyReportItem['index']>>
byPropertyPath: Map<string, Set<PropertyReportItem['index']>>
fromKind: Map<ComponentKind, Set<PropertyReportItem['index']>>
byType: Map<string, Set<PropertyReportItem['index']>>
byComponentName: Map<string, Set<PropertyReportItem['index']>>
colorsUsed: Map<string, Set<PropertyReportItem['index']>>
}

@@ -52,5 +78,5 @@

typeUsed: number
instanceNameUsed: number
componentNameUsed: number
kindUsed: number
instanceOfKindUsed: number
componentOfKindUsed: number
colorsUsed: number

@@ -64,4 +90,3 @@ }

export interface ReportStats {
filesWithMostInstance: Record<string, number>
filesWithMostPropValueCombinations: Record<string, number>
filesWithMostComponent: Record<string, number>
mostUseds: {

@@ -75,5 +100,5 @@ propNames: Array<MostUsedItem>

types: Array<MostUsedItem>
instanceNames: Array<MostUsedItem>
componentNames: Array<MostUsedItem>
fromKinds: Array<MostUsedItem>
instanceOfKinds: Array<MostUsedItem>
componentOfKinds: Array<MostUsedItem>
colors: Array<MostUsedItem>

@@ -86,9 +111,11 @@ }

stats: ReportStats
details: {
byId: Map<ReportItem['id'], ReportItem>
byInstanceId: Map<ReportInstanceItem['instanceId'], ReportInstanceItem>
byFilepath: Map<string, Set<ReportItem['id']>>
byInstanceInFilepath: Map<string, Set<ReportInstanceItem['instanceId']>>
globalMaps: ReportMaps
byFilePathMaps: Map<string, ReportMaps>
fileSizes: FileSizes
duration: {
classify: number
cssMs: number
cssMinifyMs: number
extractTotal: number
extractTimeByFiles: Record<string, number>
lightningCssMs?: number
lightningCssMinifiedMs?: number
}

@@ -104,81 +131,48 @@ }

}
lightningCss?: {
normal: string
minified: string
}
}
export interface AnalysisReport extends ReportDetails {
fileSizes: FileSizes
}
export interface ReportSnapshot {
schemaVersion: string
details: ReportDetails
config: Omit<Config, 'globalCss'>
interface ReportMapsJSON {
byInstanceOfKind: Record<'function' | 'component', Array<ReportInstanceItem['instanceId']>>
byPropertyName: Record<string, Array<ReportItem['id']>>
byCategory: Record<string, Array<ReportItem['id']>>
byConditionName: Record<string, Array<ReportItem['id']>>
byShorthand: Record<string, Array<ReportItem['id']>>
byTokenName: Record<string, Array<ReportItem['id']>>
byPropertyPath: Record<string, Array<ReportItem['id']>>
fromKind: Record<'function' | 'component', Array<ReportItem['id']>>
byType: Record<string, Array<ReportItem['id']>>
byInstanceName: Record<string, Array<ReportItem['id']>>
colorsUsed: Record<string, Array<ReportItem['id']>>
}
propByIndex: Map<PropertyReportItem['index'], PropertyReportItem>
componentByIndex: Map<ComponentReportItem['componentIndex'], ComponentReportItem>
export interface ReportItemJSON {
id: number
from: string
type: ReportItemType
filepath: string
kind: 'function' | 'component'
path: string[]
propName: string
conditionName?: string | undefined
value: string | number | true
category: string
isKnown: boolean
box: {
type: 'literal' | 'empty-initializer'
value: string | number | boolean | undefined | null
node: string
stack: string[]
line: number
column: number
derived: {
byFilepath: Map<string, Set<PropertyReportItem['index']>>
byComponentInFilepath: Map<string, Set<ComponentReportItem['componentIndex']>>
globalMaps: ReportDerivedMaps
byFilePathMaps: Map<string, ReportDerivedMaps>
}
}
export interface ReportInstanceItemJSON extends Pick<ReportItem, 'from' | 'type' | 'kind' | 'filepath'> {
instanceId: number
contains: Array<ReportItem['id']>
value: Record<string, any>
box: { type: 'map'; value: Record<string, any>; node: string; stack: string[]; line: number; column: number }
interface ReportDerivedMapsJSON {
byComponentOfKind: Record<ComponentKind, Array<ComponentReportItem['componentIndex']>>
byPropertyName: Record<string, Array<PropertyReportItem['index']>>
byTokenType: Record<string, Array<PropertyReportItem['index']>>
byConditionName: Record<string, Array<PropertyReportItem['index']>>
byShorthand: Record<string, Array<PropertyReportItem['index']>>
byTokenName: Record<string, Array<PropertyReportItem['index']>>
byPropertyPath: Record<string, Array<PropertyReportItem['index']>>
fromKind: Record<ComponentKind, Array<PropertyReportItem['index']>>
byType: Record<string, Array<PropertyReportItem['index']>>
byComponentName: Record<string, Array<PropertyReportItem['index']>>
colorsUsed: Record<string, Array<PropertyReportItem['index']>>
}
export interface AnalysisReportJSON {
counts: ReportCounts
stats: ReportStats
details: {
byId: Record<ReportItemJSON['id'], ReportItemJSON>
byInstanceId: Record<ReportInstanceItemJSON['instanceId'], ReportInstanceItemJSON>
byFilepath: Record<string, Array<ReportItemJSON['id']>>
byInstanceInFilepath: Record<string, Array<ReportInstanceItemJSON['instanceId']>>
globalMaps: ReportMapsJSON
byFilePathMaps: Record<string, ReportMapsJSON>
export interface ReportSnapshotJSON extends Omit<ReportSnapshot, 'propByIndex' | 'componentByIndex' | 'derived'> {
propByIndex: Record<PropertyReportItem['index'], PropertyReportItem>
componentByIndex: Record<ComponentReportItem['componentIndex'], ComponentReportItem>
derived: {
byFilepath: Record<string, Array<PropertyReportItem['index']>>
byComponentInFilepath: Record<string, Array<ComponentReportItem['componentIndex']>>
globalMaps: ReportDerivedMapsJSON
byFilePathMaps: Record<string, ReportDerivedMapsJSON>
}
fileSizes: FileSizes
cwd: Config['cwd']
theme: Config['theme']
utilities: Config['utilities']
conditions: Config['conditions']
shorthands: Record<string, string>
// Generator["parserOptions""]
parserOptions: {
importMap: {
css: string
recipe: string
pattern: string
jsx: string
}
jsx: {
factory: string
nodes: Array<{ type: 'string'; name: string; props: string[]; baseName: string }>
}
}
}

@@ -315,7 +315,2 @@ import type { TSConfig } from 'pkg-types'

/**
* Whether to optimize the generated css.
* @default true
*/
optimize?: boolean
/**
* Whether to minify the generated css.

@@ -360,18 +355,2 @@ * @default false

/**
* Whether to emit the artifacts to `node_modules` as a package.
* @default false
* @deprecated `emitPackage` is deprecated, it's known for causing several issues:
* - bundlers sometimes eagerly cache the `node_modules`, leading to `panda codegen` updates to the `styled-system` not visible in the browser
* - auto-imports are not suggested in your IDE.
* - in some IDE the typings are not always reflected properly
*
* As alternatives, you can use:
* - relative paths instead of absolute paths (e.g. `../styled-system/css` instead of `styled-system/css`)
* - use package.json #imports and/or tsconfig path aliases (prefer package.json#imports when possible, TS 5.4 supports them by default) like `#styled-system/css` instead of `styled-system/css`
* @see https://nodejs.org/api/packages.html#subpath-imports
* - for a component library, use a dedicated workspace package (e.g. `@acme/styled-system`) and use `importMap: "@acme/styled-system"` so that Panda knows which entrypoint to extract, e.g. `import { css } from '@acme/styled-system/css'`
* @see https://panda-css.com/docs/guides/component-library
*/
emitPackage?: boolean
/**
* Whether to only emit the `tokens` directory

@@ -378,0 +357,0 @@ * @default false

@@ -74,29 +74,30 @@ import type { LiteralUnion } from './shared'

export type CssSemanticGroup =
| 'System'
| 'Animation'
| 'Background Gradient'
| 'Background'
| 'Border Radius'
| 'Border'
| 'Color'
| 'Container'
| 'Display'
| 'Visibility'
| 'Position'
| 'Transform'
| 'Effect'
| 'Flex Layout'
| 'Grid Layout'
| 'Height'
| 'Interactivity'
| 'Layout'
| 'Border'
| 'Border Radius'
| 'Width'
| 'Height'
| 'List'
| 'Margin'
| 'Other'
| 'Padding'
| 'Color'
| 'Typography'
| 'Background'
| 'Background Gradient'
| 'Position'
| 'Scroll'
| 'Shadow'
| 'System'
| 'Table'
| 'List'
| 'Scroll'
| 'Interactivity'
| 'Transform'
| 'Transition'
| 'Effect'
| 'Other'
| 'Typography'
| 'Visibility'
| 'Width'

@@ -103,0 +104,0 @@ export type UtilityConfig = {

{
"name": "@pandacss/types",
"version": "0.41.0",
"version": "0.42.0",
"description": "The types for css panda",

@@ -34,3 +34,3 @@ "main": "dist/index.d.ts",

"ts-morph": "21.0.1",
"@pandacss/extractor": "0.41.0"
"@pandacss/extractor": "0.42.0"
},

@@ -37,0 +37,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc