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

@zag-js/anatomy

Package Overview
Dependencies
Maintainers
1
Versions
680
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/anatomy - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

dist/chunk-JKTBQDTH.mjs

13

dist/index.d.ts

@@ -1,12 +0,1 @@

type Part = {
selector: string;
attrs: Record<"data-scope" | "data-part", string>;
};
type Anatomy<T extends string> = {
parts: <U extends string>(...parts: U[]) => Omit<Anatomy<U>, "parts">;
extendWith: <V extends string>(...parts: V[]) => Omit<Anatomy<T | V>, "parts">;
build: () => Record<T, Part>;
};
declare const createAnatomy: <T extends string>(name: string, parts?: T[]) => Anatomy<T>;
export { createAnatomy };
export { Anatomy, AnatomyInstance, AnatomyPart, AnatomyPartName, createAnatomy } from './create-anatomy.js';

@@ -33,3 +33,3 @@ "use strict";

}
throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extend(...) ?");
throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?");
},

@@ -40,3 +40,6 @@ extendWith: (...values) => createAnatomy(name, [...parts, ...values]),

[part]: {
selector: `[data-scope="${toKebabCase(name)}"][data-part="${toKebabCase(part)}"]`,
selector: [
`&[data-scope="${toKebabCase(name)}"][data-part="${toKebabCase(part)}"]`,
`& [data-scope="${toKebabCase(name)}"][data-part="${toKebabCase(part)}"]`
].join(", "),
attrs: { "data-scope": toKebabCase(name), "data-part": toKebabCase(part) }

@@ -43,0 +46,0 @@ }

{
"name": "@zag-js/anatomy",
"version": "0.1.2",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"version": "0.1.3",
"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

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