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

@lion/core

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/core - npm Package Compare versions

Comparing version 0.12.0 to 0.13.0

src/closestPolyfill.d.ts

20

CHANGELOG.md
# Change Log
## 0.13.0
### Minor Changes
- 01a798e5: Combobox package
## Features
- combobox: new combobox package
- core: expanded browsers detection utils
- core: closest() polyfill for IE
- overlays: allow OverlayMixin to specify reference node (when invokerNode should not be positioned against)
- form-core: add `_onLabelClick` to FormControlMixin. Subclassers should override this
## Patches
- form-core: make ChoiceGroupMixin a suite
- listbox: move generic tests from combobox to listbox
- select-rich: enhance tests
## 0.12.0

@@ -4,0 +24,0 @@

2

package.json
{
"name": "@lion/core",
"version": "0.12.0",
"version": "0.13.0",
"description": "Core functionality that is shared across all Lion Web Components",

@@ -5,0 +5,0 @@ "license": "MIT",

export namespace browserDetection {
export { isIE11 };
export const isIE11: boolean;
export const isChrome: any;
export const isIOSChrome: any;
export const isChromium: any;
export const isMac: boolean;
}
declare const isIE11: boolean;
export {};

@@ -1,5 +0,41 @@

const isIE11 = /Trident/.test(window.navigator.userAgent);
/**
* From https://stackoverflow.com/questions/4565112/javascript-how-to-find-out-if-the-user-browser-is-chrome
* @param {string} [flavor]
*/
function checkChrome(flavor = 'google-chrome') {
// @ts-ignore
const isChromium = window.chrome;
if (flavor === 'chromium') {
return isChromium;
}
const winNav = window.navigator;
const vendorName = winNav.vendor;
// @ts-ignore
const isOpera = typeof window.opr !== 'undefined';
const isIEedge = winNav.userAgent.indexOf('Edge') > -1;
const isIOSChrome = winNav.userAgent.match('CriOS');
if (flavor === 'ios') {
return isIOSChrome;
}
if (flavor === 'google-chrome') {
return (
isChromium !== null &&
typeof isChromium !== 'undefined' &&
vendorName === 'Google Inc.' &&
isOpera === false &&
isIEedge === false
);
}
return undefined;
}
export const browserDetection = {
isIE11,
isIE11: /Trident/.test(window.navigator.userAgent),
isChrome: checkChrome(),
isIOSChrome: checkChrome('ios'),
isChromium: checkChrome('chromium'),
isMac: navigator.appVersion.indexOf('Mac') !== -1,
};
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