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

@zag-js/live-region

Package Overview
Dependencies
Maintainers
1
Versions
699
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/live-region - npm Package Compare versions

Comparing version 0.0.0-dev-20220714012600 to 0.0.0-dev-20220714091855

LICENSE

8

dist/index.d.ts

@@ -1,2 +0,2 @@

export declare type LiveRegionOptions = {
declare type LiveRegionOptions = {
level: "polite" | "assertive";

@@ -7,4 +7,4 @@ document?: Document;

};
export declare type LiveRegion = ReturnType<typeof createLiveRegion>;
export declare function createLiveRegion(opts?: Partial<LiveRegionOptions>): {
declare type LiveRegion = ReturnType<typeof createLiveRegion>;
declare function createLiveRegion(opts?: Partial<LiveRegionOptions>): {
announce: (message: string, delay?: number) => void;

@@ -14,1 +14,3 @@ destroy: () => void;

};
export { LiveRegion, LiveRegionOptions, createLiveRegion };

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

// ../dom/src/visually-hidden.ts
// ../dom/dist/index.mjs
var visuallyHiddenStyle = {

@@ -48,10 +48,9 @@ border: "0",

function createLiveRegion(opts = {}) {
var _a;
const { level = "polite", document: doc = document, root, delay: _delay = 0 } = opts;
const win = (_a = doc.defaultView) != null ? _a : window;
const parent = root != null ? root : doc.body;
const win = doc.defaultView ?? window;
const parent = root ?? doc.body;
function announce(message, delay) {
const oldRegion = doc.getElementById(ID);
oldRegion == null ? void 0 : oldRegion.remove();
delay = delay != null ? delay : _delay;
delay = delay ?? _delay;
const region = doc.createElement("span");

@@ -81,1 +80,5 @@ region.id = ID;

}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
createLiveRegion
});
{
"name": "@zag-js/live-region",
"version": "0.0.0-dev-20220714012600",
"version": "0.0.0-dev-20220714091855",
"description": "Implementing live region for screen readers",

@@ -21,10 +21,4 @@ "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"
"devDependencies": {
"@zag-js/dom-utils": "0.0.0-dev-20220714091855"
},

@@ -36,3 +30,12 @@ "publishConfig": {

"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"
}
}
}

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