Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@flourish/layout

Package Overview
Dependencies
Maintainers
23
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flourish/layout - npm Package Compare versions

Comparing version
8.7.2
to
8.7.3
+3
-3
package.json
{
"name": "@flourish/layout",
"type": "module",
"version": "8.7.2",
"version": "8.7.3",
"private": false,

@@ -48,6 +48,6 @@ "description": "Flourish module to control layouts",

"file-saver-es": "^2.0.5",
"@flourish/interpreter": "^9.2.0",
"@flourish/formatters": "^2.3.0",
"@flourish/interpreter": "^9.2.0",
"@flourish/pocket-knife": "^2.3.0",
"@flourish/number-formatter": "^2.0.0",
"@flourish/pocket-knife": "^2.3.0",
"@flourish/utils-color": "^2.0.0"

@@ -54,0 +54,0 @@ },

@@ -0,1 +1,4 @@

# 8.7.3
* Font loading should now work with relative as well as absolute URLs
# 8.7.2

@@ -2,0 +5,0 @@ * Bump to v8.7.1 of layout module

@@ -14,2 +14,10 @@ import { state } from "../core/init.js";

function toAbsoluteURL(url) {
try {
return new URL(url, document.baseURI).href;
} catch {
// if malformed, fall back without throwing
return url;
}
}
function appendFontSample(font) {

@@ -67,2 +75,3 @@ if (!document.body.querySelector(".font-samples")) {

var font_already_loaded = false;
var font_url_absolute = toAbsoluteURL(font.url);

@@ -72,3 +81,3 @@ var layout_fonts = document.head.querySelectorAll("link.layout-font");

var font_el = layout_fonts[i];
if (font_el.href == font.url) font_already_loaded = true;
if (font_el.href === font_url_absolute) font_already_loaded = true;
}

@@ -92,3 +101,3 @@

fonts.forEach(function (font) {
if (font && font.url == font_el.href) font_needed = true;
if (font && toAbsoluteURL(font.url) === font_el.href) font_needed = true;
});

@@ -95,0 +104,0 @@ if (!font_needed) font_el.parentElement.removeChild(font_el);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display