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
1144
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.0.0-dev-20240615092954 to 0.0.0-dev-20240619215959

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 }>
}
}
}
{
"name": "@pandacss/types",
"version": "0.0.0-dev-20240615092954",
"version": "0.0.0-dev-20240619215959",
"description": "The types for css panda",

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

"ts-morph": "21.0.1",
"@pandacss/extractor": "0.0.0-dev-20240615092954"
"@pandacss/extractor": "0.0.0-dev-20240619215959"
},

@@ -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