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

@next/font

Package Overview
Dependencies
Maintainers
5
Versions
1038
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@next/font - npm Package Compare versions

Comparing version 12.3.2-canary.16 to 12.3.2-canary.17

6

dist/google/loader.js

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

}
const { fontFamily, weight, style, display, preload, selectedVariableAxes, fallback, adjustFontFallback, } = (0, utils_1.validateData)(functionName, data);
const { fontFamily, weight, style, display, preload, selectedVariableAxes, fallback, adjustFontFallback, variable, } = (0, utils_1.validateData)(functionName, data);
const fontAxes = (0, utils_1.getFontAxes)(fontFamily, weight, style, selectedVariableAxes);

@@ -82,5 +82,5 @@ const url = (0, utils_1.getUrl)(fontFamily, fontAxes, display);

fallbackFonts: fallback,
weight: weight === 'variable' ? undefined : weight,
weight: weight === 'variable' ? undefined : Number(weight),
style,
variable: `--next-font-${fontFamily.toLowerCase().replace(/ /g, '-')}${weight !== 'variable' ? `-${weight}` : ''}${style === 'italic' ? `-italic` : ''}`,
variable,
adjustFontFallback: adjustFontFallbackMetrics,

@@ -87,0 +87,0 @@ };

@@ -10,2 +10,3 @@ declare type FontOptions = {

adjustFontFallback: boolean;
variable?: string;
};

@@ -12,0 +13,0 @@ export declare function validateData(functionName: string, data: any): FontOptions;

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

var _a;
let { variant, display = 'optional', preload = true, axes, fallback, adjustFontFallback = true, } = data[0] || {};
let { variant, display = 'optional', preload = true, axes, fallback, adjustFontFallback = true, variable, } = data[0] || {};
if (functionName === '') {

@@ -52,2 +52,3 @@ throw new Error(`@next/font/google has no default export`);

adjustFontFallback,
variable,
};

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

import type { AdjustFontFallback, FontModule } from 'next/font';
declare type Display = 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
declare type CssVariable = `--${string}`;
declare type LocalFont = {

@@ -9,7 +10,7 @@ src: string | Array<{

display?: Display;
weight?: string;
weight?: number;
style?: string;
fallback?: string[];
preload?: boolean;
variable?: string;
variable?: CssVariable;
fontStretch?: string;

@@ -16,0 +17,0 @@ fontVariant?: string;

@@ -11,3 +11,3 @@ import { AdjustFontFallback } from 'next/font';

display: string;
weight?: string;
weight?: number;
style?: string;

@@ -14,0 +14,0 @@ fallback?: string[];

{
"name": "@next/font",
"version": "12.3.2-canary.16",
"version": "12.3.2-canary.17",
"repository": {

@@ -5,0 +5,0 @@ "url": "vercel/next.js",

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

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

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