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

aesthetic-adapter-typestyle

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aesthetic-adapter-typestyle - npm Package Compare versions

Comparing version 2.4.0 to 3.0.0-alpha.0

16

esm/TypeStyleAesthetic.js

@@ -7,3 +7,3 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

import Aesthetic from 'aesthetic';
import Aesthetic, { purgeStyles as _purgeStyles } from 'aesthetic';

@@ -59,3 +59,3 @@ var TypeStyleAesthetic = function (_Aesthetic) {

_defineProperty(_assertThisInitialized(_this), "handleNested", function (ruleset, selector, value) {
var nest = ruleset.nested.$nest || ruleset.createRuleset('$nest');
var nest = ruleset.nested.get('$nest') || ruleset.createRuleset('$nest');
nest.addNested(selector.startsWith('@') ? selector : "&" + selector, value);

@@ -86,2 +86,14 @@ ruleset.addNested('$nest', nest);

_proto.flushStyles = function flushStyles() {
this.typeStyle.forceRenderStyles();
};
_proto.purgeStyles = function purgeStyles() {
var element = this.typeStyle._tag;
if (element) {
_purgeStyles(element);
}
};
_proto.transformToClassName = function transformToClassName(styles) {

@@ -88,0 +100,0 @@ var _this$typeStyle;

4

lib/TypeStyleAesthetic.d.ts

@@ -10,3 +10,5 @@ import Aesthetic, { AestheticOptions, ClassName } from 'aesthetic';

constructor(typeStyle: TypeStyle, options?: Partial<AestheticOptions>);
protected transformToClassName(styles: (NativeBlock | ParsedBlock)[]): ClassName;
flushStyles(): void;
purgeStyles(): void;
transformToClassName(styles: ParsedBlock[]): ClassName;
private handleCss;

@@ -13,0 +15,0 @@ private handleFallback;

@@ -6,5 +6,5 @@ "use strict";

var _aesthetic = _interopRequireDefault(require("aesthetic"));
var _aesthetic = _interopRequireWildcard(require("aesthetic"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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; } }

@@ -66,3 +66,3 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

_defineProperty(_assertThisInitialized(_this), "handleNested", function (ruleset, selector, value) {
var nest = ruleset.nested.$nest || ruleset.createRuleset('$nest');
var nest = ruleset.nested.get('$nest') || ruleset.createRuleset('$nest');
nest.addNested(selector.startsWith('@') ? selector : "&" + selector, value);

@@ -93,2 +93,14 @@ ruleset.addNested('$nest', nest);

_proto.flushStyles = function flushStyles() {
this.typeStyle.forceRenderStyles();
};
_proto.purgeStyles = function purgeStyles() {
var element = this.typeStyle._tag;
if (element) {
(0, _aesthetic.purgeStyles)(element);
}
};
_proto.transformToClassName = function transformToClassName(styles) {

@@ -95,0 +107,0 @@ var _this$typeStyle;

{
"name": "aesthetic-adapter-typestyle",
"version": "2.4.0",
"version": "3.0.0-alpha.0",
"description": "TypeStyle support for Aesthetic.",
"keywords": [
"aesthetic",
"react",
"styles",

@@ -27,3 +26,3 @@ "typestyle"

},
"gitHead": "434a809cfa4d5d25086b39c334b1c8089221f1b1"
"gitHead": "3d52f6bc0eceb9e53cf3196e38967730bfbf4f11"
}

@@ -20,3 +20,2 @@ # Aesthetic with TypeStyle

- React 16.3+
- Aesthetic

@@ -32,1 +31,5 @@ - TypeStyle

```
## Documentation
[https://milesj.gitbook.io/aesthetic/adapters/typestyle](https://milesj.gitbook.io/aesthetic/adapters/typestyle)

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