@zag-js/focus-visible
Advanced tools
Comparing version 0.1.2 to 0.1.3
declare type Modality = "keyboard" | "pointer" | "virtual"; | ||
declare type FocusVisibleCallback = (isFocusVisible: boolean) => void; | ||
export declare function trackFocusVisible(fn: FocusVisibleCallback): () => void; | ||
export declare function trackInteractionModality(fn: (value: Modality | null) => void): () => void; | ||
export declare function setInteractionModality(value: Modality): void; | ||
export declare function getInteractionModality(): Modality; | ||
export {}; | ||
declare function trackFocusVisible(fn: FocusVisibleCallback): () => void; | ||
declare function trackInteractionModality(fn: (value: Modality | null) => void): () => void; | ||
declare function setInteractionModality(value: Modality): void; | ||
declare function getInteractionModality(): Modality | null; | ||
export { getInteractionModality, setInteractionModality, trackFocusVisible, trackInteractionModality }; |
@@ -137,1 +137,8 @@ "use strict"; | ||
} | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
getInteractionModality, | ||
setInteractionModality, | ||
trackFocusVisible, | ||
trackInteractionModality | ||
}); |
{ | ||
"name": "@zag-js/focus-visible", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Focus visible polyfill utility based on WICG", | ||
@@ -22,11 +22,2 @@ "keywords": [ | ||
], | ||
"scripts": { | ||
"build:fast": "yarn zag build", | ||
"start": "yarn zag build --watch", | ||
"build": "yarn zag build --prod", | ||
"test": "jest --config ../../../jest.config.js --rootDir tests", | ||
"lint": "eslint src --ext .ts,.tsx", | ||
"test:ci": "yarn test --ci --runInBand --updateSnapshot", | ||
"test:watch": "yarn test --watchAll" | ||
}, | ||
"publishConfig": { | ||
@@ -37,3 +28,12 @@ "access": "public" | ||
"url": "https://github.com/chakra-ui/zag/issues" | ||
}, | ||
"scripts": { | ||
"build-fast": "tsup src/index.ts --format=esm,cjs", | ||
"start": "pnpm build --watch", | ||
"build": "tsup src/index.ts --format=esm,cjs --dts", | ||
"test": "jest --config ../../../jest.config.js --rootDir tests", | ||
"lint": "eslint src --ext .ts,.tsx", | ||
"test-ci": "pnpm test --ci --runInBand -u", | ||
"test-watch": "pnpm test --watchAll" | ||
} | ||
} | ||
} |
# @zag-js/focus-visible | ||
## Installation | ||
@@ -15,9 +13,6 @@ | ||
Yes please! See the | ||
[contributing guidelines](https://github.com/chakra-ui/zag/blob/main/CONTRIBUTING.md) | ||
for details. | ||
Yes please! See the [contributing guidelines](https://github.com/chakra-ui/zag/blob/main/CONTRIBUTING.md) for details. | ||
## Licence | ||
This project is licensed under the terms of the | ||
[MIT license](https://github.com/chakra-ui/zag/blob/main/LICENSE). | ||
This project is licensed under the terms of the [MIT license](https://github.com/chakra-ui/zag/blob/main/LICENSE). |
11170
6
264
18