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

aesthetic-react

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aesthetic-react - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

10

CHANGELOG.md

@@ -0,1 +1,11 @@

### 1.1.2 - 2019-09-15
#### 📦 Dependencies
- Updated all to latest.
#### ⚙️ Types
- Refine types and replace `any` with `unknown`.
### 1.1.1 - 2019-07-24

@@ -2,0 +12,0 @@

5

esm/useStylesFactory.js

@@ -1,5 +0,6 @@

import React, { useContext, useRef, useLayoutEffect } from 'react';
import React, { useContext, useRef, useEffect, useLayoutEffect } from 'react';
import uuid from 'uuid/v4';
import DirectionContext from './DirectionContext';
import ThemeContext from './ThemeContext';
var useSideEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect;
export default function useStylesFactory(aesthetic) {

@@ -32,3 +33,3 @@ return function useStyles(styleSheet, options) {

var sheet = aesthetic.createStyleSheet(styleName, params);
useLayoutEffect(function () {
useSideEffect(function () {
aesthetic.flushStyles(styleName);

@@ -35,0 +36,0 @@ }, [dir, styleName, themeName]);

8

lib/types.d.ts

@@ -26,7 +26,7 @@ import React from 'react';

/** Gain a reference to the wrapped component. Provided by `withTheme`. */
wrappedRef?: React.Ref<any>;
wrappedRef?: React.Ref<unknown>;
}
export interface WithThemeWrappedProps<Theme> {
/** The ref passed by the `wrappedRef` prop. Provided by `withTheme`. */
ref?: React.Ref<any>;
ref?: React.Ref<unknown>;
/** The theme object. Provided by `withTheme`. */

@@ -41,3 +41,3 @@ theme: Theme;

/** Gain a reference to the wrapped component. Provided by `withStyles`. */
wrappedRef?: React.Ref<any>;
wrappedRef?: React.Ref<unknown>;
}

@@ -48,3 +48,3 @@ export interface WithStylesWrappedProps<Theme, NativeBlock extends object, ParsedBlock extends object | string = NativeBlock> {

/** The ref passed by the `wrappedRef` prop. Provided by `withStyles`. */
ref?: React.Ref<any>;
ref?: React.Ref<unknown>;
/** The parsed component style sheet in which rulesets can be transformed to class names. Provided by `withStyles`. */

@@ -51,0 +51,0 @@ styles: SheetMap<ParsedBlock>;

@@ -16,4 +16,8 @@ "use strict";

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
var useSideEffect = typeof window === 'undefined' ? _react.useEffect : _react.useLayoutEffect;
function useStylesFactory(aesthetic) {

@@ -46,3 +50,3 @@ return function useStyles(styleSheet, options) {

var sheet = aesthetic.createStyleSheet(styleName, params);
(0, _react.useLayoutEffect)(function () {
useSideEffect(function () {
aesthetic.flushStyles(styleName);

@@ -49,0 +53,0 @@ }, [dir, styleName, themeName]);

@@ -12,4 +12,6 @@ "use strict";

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
function useThemeFactory(aesthetic) {

@@ -16,0 +18,0 @@ return function useTheme() {

@@ -18,4 +18,6 @@ "use strict";

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -22,0 +24,0 @@

@@ -14,4 +14,6 @@ "use strict";

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -18,0 +20,0 @@

{
"name": "aesthetic-react",
"version": "1.1.1",
"version": "1.1.2",
"description": "React hooks, composers, and more for styling components with Aesthetic.",

@@ -24,3 +24,3 @@ "keywords": [

"@types/react": "*",
"aesthetic-utils": "^2.0.0",
"aesthetic-utils": "^2.0.1",
"direction": "^1.0.3",

@@ -30,3 +30,3 @@ "hoist-non-react-statics": "^3.3.0",

"utility-types": "^3.7.0",
"uuid": "^3.3.2"
"uuid": "^3.3.3"
},

@@ -38,9 +38,9 @@ "peerDependencies": {

"devDependencies": {
"@types/hoist-non-react-statics": "*",
"@types/prop-types": "*",
"@types/uuid": "*",
"react": "^16.8.6",
"react-dom": "^16.8.6"
"@types/hoist-non-react-statics": "^3.3.1",
"@types/prop-types": "^15.7.2",
"@types/uuid": "^3.4.5",
"react": "^16.9.0",
"react-dom": "^16.9.0"
},
"gitHead": "d2fac6b3854e7c12e60c0fca8e33e35027f395d2"
"gitHead": "9e25a97050daf05f81b04815c301f93cdc1d3b56"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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