Socket
Socket
Sign inDemoInstall

font-picker

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-picker - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

dist/font-manager/font-manager/FontManager.d.ts

@@ -15,4 +15,4 @@ import { Font, FontList, Options } from "../shared/types";

getActiveFont(): Font;
setActiveFont(fontFamily: string): void;
setActiveFont(fontFamily: string, runOnChange?: boolean): void;
}
//# sourceMappingURL=FontManager.d.ts.map

@@ -296,3 +296,3 @@ (function (global, factory) {

this.addFont(defaultFamily, false);
this.setActiveFont(defaultFamily);
this.setActiveFont(defaultFamily, false);
}

@@ -356,4 +356,5 @@ FontManager.prototype.init = function () {

};
FontManager.prototype.setActiveFont = function (fontFamily) {
FontManager.prototype.setActiveFont = function (fontFamily, runOnChange) {
var _this = this;
if (runOnChange === void 0) { runOnChange = true; }
if (!this.fonts.has(fontFamily)) {

@@ -366,3 +367,7 @@ console.error("Cannot update active font: \"" + fontFamily + "\" is not in the font list");

this.activeFontFamily = fontFamily;
loadActiveFont(activeFont, previousFontFamily, this.options.scripts, this.options.variants, this.selectorSuffix).then(function () { return _this.onChange(activeFont); });
loadActiveFont(activeFont, previousFontFamily, this.options.scripts, this.options.variants, this.selectorSuffix).then(function () {
if (runOnChange) {
_this.onChange(activeFont);
}
});
};

@@ -369,0 +374,0 @@ return FontManager;

@@ -15,4 +15,4 @@ import { Font, FontList, Options } from "../shared/types";

getActiveFont(): Font;
setActiveFont(fontFamily: string): void;
setActiveFont(fontFamily: string, runOnChange?: boolean): void;
}
//# sourceMappingURL=FontManager.d.ts.map

@@ -296,3 +296,3 @@ (function (global, factory) {

this.addFont(defaultFamily, false);
this.setActiveFont(defaultFamily);
this.setActiveFont(defaultFamily, false);
}

@@ -356,4 +356,5 @@ FontManager.prototype.init = function () {

};
FontManager.prototype.setActiveFont = function (fontFamily) {
FontManager.prototype.setActiveFont = function (fontFamily, runOnChange) {
var _this = this;
if (runOnChange === void 0) { runOnChange = true; }
if (!this.fonts.has(fontFamily)) {

@@ -366,3 +367,7 @@ console.error("Cannot update active font: \"" + fontFamily + "\" is not in the font list");

this.activeFontFamily = fontFamily;
loadActiveFont(activeFont, previousFontFamily, this.options.scripts, this.options.variants, this.selectorSuffix).then(function () { return _this.onChange(activeFont); });
loadActiveFont(activeFont, previousFontFamily, this.options.scripts, this.options.variants, this.selectorSuffix).then(function () {
if (runOnChange) {
_this.onChange(activeFont);
}
});
};

@@ -369,0 +374,0 @@ return FontManager;

{
"name": "font-picker",
"version": "3.0.1",
"version": "3.0.2",
"description": "Font selector component for Google Fonts",

@@ -5,0 +5,0 @@ "author": "Samuel Meuli <me@samuelmeuli.com>",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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