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.8.0
to
8.8.1
+27
src/lib/utils.test.js
import { addHttp } from "./utils.js";
import { expect } from "chai";
describe("addHttp", () => {
it("passes through http:// URLs unchanged", () => {
expect(addHttp("http://example.com/image.png")).eq(
"http://example.com/image.png",
);
});
it("passes through https:// URLs unchanged", () => {
expect(addHttp("https://example.com/image.png")).eq(
"https://example.com/image.png",
);
});
it("passes through cached-assets/ paths unchanged", () => {
expect(addHttp("cached-assets/abc123.png")).eq("cached-assets/abc123.png");
expect(addHttp("cached-assets/abc123.woff2")).eq(
"cached-assets/abc123.woff2",
);
});
it("prepends http:// to bare URLs", () => {
expect(addHttp("example.com/image.png")).eq("http://example.com/image.png");
});
});
+3
-3
{
"name": "@flourish/layout",
"type": "module",
"version": "8.8.0",
"version": "8.8.1",
"private": false,

@@ -50,5 +50,5 @@ "description": "Flourish module to control layouts",

"@flourish/number-formatter": "^2.0.0",
"@flourish/interpreter": "^9.3.0",
"@flourish/utils-color": "^2.0.0",
"@flourish/interpreter": "^9.3.0",
"@flourish/pocket-knife": "^2.3.0"
"@flourish/pocket-knife": "^2.3.1"
},

@@ -55,0 +55,0 @@ "exports": "./src/index.js",

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

# 8.8.1
* Fix logo images not rendering in standalone downloads
# 8.8.0

@@ -2,0 +5,0 @@ * Change the default formatting for floating point numbers to remove non-significant trailing zeros while keeping two-decimal rounding

@@ -5,2 +5,3 @@ - Layout

type: font
cacheable_for_standalone_downloads: true
width: three quarters

@@ -343,2 +344,3 @@ description: This font will apply to the whole graphic by default. You can optionally change the font for the title, subtitle, footer, etc in the Header and Footer settings panels.

type: font
cacheable_for_standalone_downloads: true
show_if: title_styling

@@ -435,2 +437,3 @@ optional: true

type: font
cacheable_for_standalone_downloads: true
show_if: subtitle_styling

@@ -755,2 +758,3 @@ optional: true

type: font
cacheable_for_standalone_downloads: true
name: Font

@@ -757,0 +761,0 @@ optional: true

@@ -28,7 +28,11 @@ var window_width, base_size;

function addHttp(url) {
if (url.indexOf("http://") !== 0 && url.indexOf("https://") !== 0)
return "http://" + url;
else return url;
if (
url.startsWith("http://") ||
url.startsWith("https://") ||
url.startsWith("cached-assets/")
)
return url;
return "http://" + url;
}
export { remToPx, getJustifyContent, getTextAlign, addHttp };

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

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