@xo-union/dist-typography
Advanced tools
Comparing version 7.1.1 to 7.1.2
"use strict"; | ||
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property"); | ||
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault"); | ||
_Object$defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.locals = exports.default = void 0; | ||
var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/for-each")); | ||
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/keys")); | ||
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/json/stringify")); | ||
var _fonts = _interopRequireDefault(require("@xo-union/dist-typography/fonts")); | ||
/** | ||
@@ -27,3 +19,2 @@ * Wrap font urls in CSS `url` function. This helps us avoid using the pattern `url(font-url-css-variable)` | ||
var _context; | ||
const newObj = {}; | ||
@@ -35,3 +26,2 @@ (0, _forEach.default)(_context = (0, _keys.default)(obj)).call(_context, k => { | ||
} | ||
newObj[k] = `url(${(0, _stringify.default)(obj[k])})`; | ||
@@ -41,7 +31,6 @@ }); | ||
}; | ||
const locals = addUrlFunction(_fonts.default); // Allow imports from webpack's css-loader | ||
const locals = addUrlFunction(_fonts.default); | ||
// Allow imports from webpack's css-loader | ||
exports.locals = locals; | ||
var _default = locals; | ||
exports.default = _default; |
@@ -9,8 +9,5 @@ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js/instance/for-each"; | ||
*/ | ||
const addUrlFunction = obj => { | ||
var _context; | ||
const newObj = {}; | ||
_forEachInstanceProperty(_context = _Object$keys(obj)).call(_context, k => { | ||
@@ -21,11 +18,8 @@ // Skip webpack's locals variable | ||
} | ||
newObj[k] = `url(${_JSON$stringify(obj[k])})`; | ||
}); | ||
return newObj; | ||
}; | ||
export const locals = addUrlFunction(fonts); // Allow imports from webpack's css-loader | ||
export const locals = addUrlFunction(fonts); | ||
// Allow imports from webpack's css-loader | ||
export default locals; |
"use strict"; | ||
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property"); | ||
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault"); | ||
_Object$defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.fontSecondaryRegular2 = exports.fontSecondaryRegular = exports.fontPrimaryRegular2 = exports.fontPrimaryRegular = exports.fontPrimaryExtraBold2 = exports.fontPrimaryExtraBold = exports.fontPrimaryBold2 = exports.fontPrimaryBold = void 0; | ||
var _typographyDistUrlCjs = _interopRequireDefault(require("../typographyDistUrl.cjs.js")); | ||
const fontSecondaryRegular = (0, _typographyDistUrlCjs.default)('font-secondary-regular.woff'); | ||
@@ -16,0 +11,0 @@ exports.fontSecondaryRegular = fontSecondaryRegular; |
"use strict"; | ||
var _WeakMap = require("@babel/runtime-corejs3/core-js/weak-map"); | ||
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property"); | ||
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js/object/get-own-property-descriptor"); | ||
_Object$defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.locals = exports.default = void 0; | ||
var urls = _interopRequireWildcard(require("./hosted-urls.cjs.js")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const createTypographyData = _ref => { | ||
@@ -43,8 +35,6 @@ let { | ||
}; | ||
const typographyData = createTypographyData(urls); | ||
var _default = typographyData; // Allow imports from webpack's css-loader | ||
exports.default = _default; | ||
const locals = typographyData; | ||
exports.locals = locals; |
import * as urls from "./hosted-urls.js"; | ||
const createTypographyData = _ref => { | ||
@@ -25,6 +24,5 @@ let { | ||
}; | ||
const typographyData = createTypographyData(urls); | ||
export default typographyData; // Allow imports from webpack's css-loader | ||
export default typographyData; | ||
// Allow imports from webpack's css-loader | ||
export const locals = typographyData; |
"use strict"; | ||
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property"); | ||
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault"); | ||
_Object$defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.unionFonts = exports.default = void 0; | ||
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/map")); | ||
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/json/stringify")); | ||
var _fonts = _interopRequireDefault(require("@xo-union/dist-typography/fonts")); | ||
var _utilSnippetGenerator = _interopRequireDefault(require("@xo-union/util-snippet-generator")); | ||
const generatePreloadLinks = fonts => { | ||
@@ -30,3 +22,2 @@ const links = (0, _map.default)(fonts).call(fonts, _ref => { | ||
}; | ||
const omitUrls = fonts => (0, _map.default)(fonts).call(fonts, _ref2 => { | ||
@@ -39,3 +30,2 @@ let { | ||
}); | ||
const unionFonts = { | ||
@@ -56,3 +46,2 @@ primary: { | ||
exports.unionFonts = unionFonts; | ||
var _default = function _default() { | ||
@@ -72,3 +61,2 @@ let { | ||
}; | ||
exports.default = _default; |
@@ -5,3 +5,2 @@ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map"; | ||
import createSnippetGenerator from "@xo-union/util-snippet-generator"; | ||
const generatePreloadLinks = fonts => { | ||
@@ -14,6 +13,4 @@ const links = _mapInstanceProperty(fonts).call(fonts, _ref => { | ||
}); | ||
return links.join('\n'); | ||
}; | ||
const omitUrls = fonts => _mapInstanceProperty(fonts).call(fonts, _ref2 => { | ||
@@ -26,3 +23,2 @@ let { | ||
}); | ||
export const unionFonts = { | ||
@@ -29,0 +25,0 @@ primary: { |
"use strict"; | ||
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property"); | ||
_Object$defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _distUrl = require("@xo-union/dist-url"); | ||
const typographyDistUrl = path => (0, _distUrl.getUrl)({ | ||
@@ -21,4 +17,3 @@ urlTemplate: process.env.UNION_DISTRIBUTION_TYPOGRAPHY_URL_TEMPLATE, | ||
}).toString(); | ||
var _default = typographyDistUrl; | ||
exports.default = _default; |
import { getUrl } from "@xo-union/dist-url"; | ||
const typographyDistUrl = path => getUrl({ | ||
@@ -11,3 +10,2 @@ urlTemplate: process.env.UNION_DISTRIBUTION_TYPOGRAPHY_URL_TEMPLATE, | ||
}).toString(); | ||
export default typographyDistUrl; |
{ | ||
"name": "@xo-union/dist-typography", | ||
"version": "7.1.1", | ||
"version": "7.1.2", | ||
"sideEffects": false, | ||
@@ -18,8 +18,8 @@ "scripts": { | ||
"@babel/runtime-corejs3": "^7.15.4", | ||
"@xo-union/dist-url": "^3.0.4", | ||
"@xo-union/util-snippet-generator": "^1.3.16" | ||
"@xo-union/dist-url": "^3.0.5", | ||
"@xo-union/util-snippet-generator": "^1.3.17" | ||
}, | ||
"devDependencies": { | ||
"@xo-union/deploy": "^2.2.18", | ||
"@xo-union/packager": "^6.1.3", | ||
"@xo-union/deploy": "^2.2.19", | ||
"@xo-union/packager": "^6.1.4", | ||
"@xo-union/pkg-validator": "^3.2.2" | ||
@@ -35,3 +35,3 @@ }, | ||
}, | ||
"gitHead": "f32e1fa39baa025d36505f5d9f361009e6bf2df6" | ||
"gitHead": "607f1f1a860a43541901729546ad8300b3d8f4d3" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
287
24312