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

@ant-design/cssinjs

Package Overview
Dependencies
Maintainers
10
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ant-design/cssinjs - npm Package Compare versions

Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1

es/Cache.d.ts.map

4

es/hooks/useCacheToken.js

@@ -91,3 +91,3 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";

var cachedToken = useGlobalCache(TOKEN_PREFIX, [salt, theme.id, tokenStr, overrideTokenStr, cssVarStr], function () {
var _cssVar$key;
var _cssVar$key, _cssVar$prefix;
var mergedDerivativeToken = compute ? compute(mergedToken, override, theme) : getComputedToken(mergedToken, override, theme, formatToken);

@@ -116,3 +116,3 @@

recordCleanToken(themeKey);
var hashId = cssVar ? "".concat(hashPrefix, "-").concat(hash(salt)) : "".concat(hashPrefix, "-").concat(hash(tokenKey));
var hashId = cssVar ? "".concat(hashPrefix, "-").concat(hash("".concat(salt).concat((_cssVar$prefix = cssVar.prefix) !== null && _cssVar$prefix !== void 0 ? _cssVar$prefix : ''))) : "".concat(hashPrefix, "-").concat(hash(tokenKey));
mergedDerivativeToken._hashId = hashId; // Not used

@@ -119,0 +119,0 @@

@@ -21,7 +21,6 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";

instanceId = _useContext.cache.instanceId,
container = _useContext.container,
autoClear = _useContext.autoClear;
container = _useContext.container;
var tokenKey = token._tokenKey;
var stylePath = [].concat(_toConsumableArray(config.path), [key, scope]);
var cache = useGlobalCache(CSS_VAR_PREFIX, [].concat(_toConsumableArray(stylePath), [tokenKey]), function () {
var stylePath = [].concat(_toConsumableArray(config.path), [key, scope, tokenKey]);
var cache = useGlobalCache(CSS_VAR_PREFIX, stylePath, function () {
var originToken = fn();

@@ -39,6 +38,6 @@ var _transformToken = transformToken(originToken, key, {

return [mergedToken, cssVarsStr, styleId, key];
}, function (_ref, fromHMR) {
}, function (_ref) {
var _ref2 = _slicedToArray(_ref, 3),
styleId = _ref2[2];
if ((fromHMR || autoClear) && isClientSide) {
if (isClientSide) {
removeCSS(styleId, {

@@ -45,0 +44,0 @@ mark: ATTR_MARK

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

var cachedToken = (0, _useGlobalCache.default)(TOKEN_PREFIX, [salt, theme.id, tokenStr, overrideTokenStr, cssVarStr], function () {
var _cssVar$key;
var _cssVar$key, _cssVar$prefix;
var mergedDerivativeToken = compute ? compute(mergedToken, override, theme) : getComputedToken(mergedToken, override, theme, formatToken);

@@ -128,3 +128,3 @@

recordCleanToken(themeKey);
var hashId = cssVar ? "".concat(hashPrefix, "-").concat((0, _hash.default)(salt)) : "".concat(hashPrefix, "-").concat((0, _hash.default)(tokenKey));
var hashId = cssVar ? "".concat(hashPrefix, "-").concat((0, _hash.default)("".concat(salt).concat((_cssVar$prefix = cssVar.prefix) !== null && _cssVar$prefix !== void 0 ? _cssVar$prefix : ''))) : "".concat(hashPrefix, "-").concat((0, _hash.default)(tokenKey));
mergedDerivativeToken._hashId = hashId; // Not used

@@ -131,0 +131,0 @@

@@ -31,7 +31,6 @@ "use strict";

instanceId = _useContext.cache.instanceId,
container = _useContext.container,
autoClear = _useContext.autoClear;
container = _useContext.container;
var tokenKey = token._tokenKey;
var stylePath = [].concat((0, _toConsumableArray2.default)(config.path), [key, scope]);
var cache = (0, _useGlobalCache.default)(CSS_VAR_PREFIX, [].concat((0, _toConsumableArray2.default)(stylePath), [tokenKey]), function () {
var stylePath = [].concat((0, _toConsumableArray2.default)(config.path), [key, scope, tokenKey]);
var cache = (0, _useGlobalCache.default)(CSS_VAR_PREFIX, stylePath, function () {
var originToken = fn();

@@ -49,6 +48,6 @@ var _transformToken = (0, _cssVariables.transformToken)(originToken, key, {

return [mergedToken, cssVarsStr, styleId, key];
}, function (_ref, fromHMR) {
}, function (_ref) {
var _ref2 = (0, _slicedToArray2.default)(_ref, 3),
styleId = _ref2[2];
if ((fromHMR || autoClear) && _util.isClientSide) {
if (_util.isClientSide) {
(0, _dynamicCSS.removeCSS)(styleId, {

@@ -55,0 +54,0 @@ mark: _StyleContext.ATTR_MARK

{
"name": "@ant-design/cssinjs",
"version": "2.0.0-alpha.0",
"version": "2.0.0-alpha.1",
"description": "Component level cssinjs resolution for antd",

@@ -5,0 +5,0 @@ "keywords": [

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