@zag-js/anatomy
Advanced tools
Comparing version 0.0.0-dev-20221228102655 to 0.0.0-dev-20221228121448
@@ -1,14 +0,1 @@ | ||
interface AnatomyPart { | ||
selector: string; | ||
attrs: Record<"data-scope" | "data-part", string>; | ||
} | ||
type AnatomyInstance<T extends string> = Omit<Anatomy<T>, "parts">; | ||
type AnatomyPartName<T> = T extends AnatomyInstance<infer U> ? U : never; | ||
interface Anatomy<T extends string> { | ||
parts: <U extends string>(...parts: U[]) => AnatomyInstance<U>; | ||
extendWith: <V extends string>(...parts: V[]) => AnatomyInstance<T | V>; | ||
build: () => Record<T, AnatomyPart>; | ||
} | ||
declare const createAnatomy: <T extends string>(name: string, parts?: T[]) => Anatomy<T>; | ||
export { Anatomy, AnatomyInstance, AnatomyPart, AnatomyPartName, createAnatomy }; | ||
export { Anatomy, AnatomyInstance, AnatomyPart, AnatomyPartName, createAnatomy } from './create-anatomy.js'; |
{ | ||
"name": "@zag-js/anatomy", | ||
"version": "0.0.0-dev-20221228102655", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"version": "0.0.0-dev-20221228121448", | ||
"keywords": [ | ||
@@ -29,6 +26,21 @@ "ui-machines", | ||
}, | ||
"clean-package": "../../clean-package.config.json", | ||
"main": "dist/index.js", | ||
"devDependencies": { | ||
"clean-package": "2.2.0" | ||
}, | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"scripts": { | ||
"build-fast": "tsup src/index.ts --format=esm,cjs", | ||
"build-fast": "tsup src", | ||
"start": "pnpm build --watch", | ||
"build": "tsup src/index.ts --format=esm,cjs --dts", | ||
"build": "tsup src --dts", | ||
"test": "jest --config ../../jest.config.js --rootDir . --passWithNoTests", | ||
@@ -35,0 +47,0 @@ "lint": "eslint src --ext .ts,.tsx", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16713
12
390
1
1