Socket
Socket
Sign inDemoInstall

@zag-js/anatomy

Package Overview
Dependencies
Maintainers
1
Versions
662
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.0-dev-20221215180455 to 0.0.0-dev-20221221173409

18

dist/index.d.ts

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

type Part = {
interface AnatomyPart {
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>;
};
}
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 { createAnatomy };
export { Anatomy, AnatomyInstance, AnatomyPart, AnatomyPartName, createAnatomy };

@@ -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(...) ?");
},

@@ -36,0 +36,0 @@ extendWith: (...values) => createAnatomy(name, [...parts, ...values]),

{
"name": "@zag-js/anatomy",
"version": "0.0.0-dev-20221215180455",
"version": "0.0.0-dev-20221221173409",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "module": "dist/index.mjs",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc