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

@zag-js/carousel

Package Overview
Dependencies
Maintainers
1
Versions
714
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/carousel - npm Package Compare versions

Comparing version 0.0.0-dev-20230222120620 to 0.0.0-dev-20230222181847

dist/chunk-RELW2VBF.mjs

30

dist/carousel.connect.d.ts

@@ -6,12 +6,33 @@ import { PropTypes, NormalizeProps } from '@zag-js/types';

declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
/**
* The current index of the carousel
*/
index: number;
/**
* Whether the carousel is currently auto-playing
*/
isAutoplay: boolean;
/**
* Whether the carousel is can scroll to the next slide
*/
canScrollNext: boolean;
/**
* Whether the carousel is can scroll to the previous slide
*/
canScrollPrevious: boolean;
/**
* Function to scroll to a specific slide index
*/
scrollTo(index: number): void;
/**
* Function to scroll to the next slide
*/
scrollToNext(): void;
/**
* Function to scroll to the previous slide
*/
scrollToPrevious(): void;
rootProps: T["element"];
viewportProps: T["element"];
slideGroupProps: T["element"];
/**
* Returns the state of a specific slide
*/
getSlideState: (props: SlideProps) => {

@@ -23,2 +44,5 @@ valueText: string;

};
rootProps: T["element"];
viewportProps: T["element"];
slideGroupProps: T["element"];
getSlideProps(props: SlideProps): T["element"];

@@ -25,0 +49,0 @@ previousTriggerProps: T["button"];

@@ -71,15 +71,40 @@ "use strict";

return {
/**
* The current index of the carousel
*/
index: state.context.index,
/**
* Whether the carousel is currently auto-playing
*/
isAutoplay,
/**
* Whether the carousel is can scroll to the next slide
*/
canScrollNext,
/**
* Whether the carousel is can scroll to the previous slide
*/
canScrollPrevious,
/**
* Function to scroll to a specific slide index
*/
scrollTo(index) {
send({ type: "GOTO", index });
},
/**
* Function to scroll to the next slide
*/
scrollToNext() {
send("NEXT");
},
/**
* Function to scroll to the previous slide
*/
scrollToPrevious() {
send("PREV");
},
/**
* Returns the state of a specific slide
*/
getSlideState,
rootProps: normalize.element({

@@ -118,3 +143,2 @@ ...parts.root.attrs,

}),
getSlideState,
getSlideProps(props) {

@@ -121,0 +145,0 @@ const { index } = props;

@@ -74,15 +74,40 @@ "use strict";

return {
/**
* The current index of the carousel
*/
index: state.context.index,
/**
* Whether the carousel is currently auto-playing
*/
isAutoplay,
/**
* Whether the carousel is can scroll to the next slide
*/
canScrollNext,
/**
* Whether the carousel is can scroll to the previous slide
*/
canScrollPrevious,
/**
* Function to scroll to a specific slide index
*/
scrollTo(index) {
send({ type: "GOTO", index });
},
/**
* Function to scroll to the next slide
*/
scrollToNext() {
send("NEXT");
},
/**
* Function to scroll to the previous slide
*/
scrollToPrevious() {
send("PREV");
},
/**
* Returns the state of a specific slide
*/
getSlideState,
rootProps: normalize.element({

@@ -121,3 +146,2 @@ ...parts.root.attrs,

}),
getSlideState,
getSlideProps(props) {

@@ -124,0 +148,0 @@ const { index } = props;

6

package.json
{
"name": "@zag-js/carousel",
"version": "0.0.0-dev-20230222120620",
"version": "0.0.0-dev-20230222181847",
"description": "Core logic for the carousel widget implemented as a state machine",

@@ -31,5 +31,5 @@ "keywords": [

"@zag-js/anatomy": "0.1.4",
"@zag-js/core": "0.0.0-dev-20230222120620",
"@zag-js/core": "0.0.0-dev-20230222181847",
"@zag-js/types": "0.3.4",
"@zag-js/dom-query": "0.0.0-dev-20230222120620",
"@zag-js/dom-query": "0.0.0-dev-20230222181847",
"@zag-js/utils": "0.3.3"

@@ -36,0 +36,0 @@ },

Sorry, the diff of this file is not supported yet

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