New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@convoy/dapper

Package Overview
Dependencies
Maintainers
17
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@convoy/dapper - npm Package Compare versions

Comparing version 1.0.48 to 2.0.56

dist/src/compile.d.ts

1

dist/src/configure.d.ts

@@ -5,4 +5,5 @@ export interface Configuration {

friendlyClassNames: boolean;
useInsertRule: boolean;
}
export declare let config: Configuration;
export default function configure(cfg: Partial<Configuration>): void;

6

dist/src/configure.js
"use strict";
var _ = require("lodash");
exports.config = Object.freeze({
node: null,
classNamePrefix: process.env.NODE_ENV === 'production' ? 'd-' : 'dapper-',
friendlyClassNames: process.env.NODE_ENV !== 'production',
classNamePrefix: _.get(process, 'env.NODE_ENV') === 'production' ? 'd-' : 'dapper-',
friendlyClassNames: _.get(process, 'env.NODE_ENV') !== 'production',
useInsertRule: _.get(process, 'env.NODE_ENV') === 'production',
});

@@ -7,0 +9,0 @@ function configure(cfg) {

import reactTo from './reactTo';
import { Configuration } from './configure';
import create from './create';
import compute from './compute';
import configure, { Configuration } from './configure';
import compile, { createSimple } from './compile';
import keyframes from './keyframes';
import renderStatic from './renderStatic';
import { StyleRule } from './types';
export { Configuration, StyleRule, create as compile, reactTo };
declare var _default: {
compute: <TKeys extends string, State>(compiledStyles: {
[Key in TKeys]: string | ((modes: {
[key: string]: boolean;
}) => string);
}, modeDeclarations: {
[key: string]: (state: State) => boolean;
}, state: State) => {
[Key in TKeys]: string;
};
configure: (cfg: Partial<Configuration>) => void;
create: <StyleSet extends {
[key: string]: StyleRule;
}>(styles: StyleSet) => {
[Key in keyof StyleSet]: string | ((modes: {
[key: string]: boolean;
}) => string);
};
createSimple: <StyleSet extends {
[key: string]: StyleRule;
}>(styles: StyleSet) => {
[Key in keyof StyleSet]: string;
};
keyframes: (keyframe: {
[key: string]: StyleRule;
}) => string;
renderStatic: (styles: {
[key: string]: StyleRule;
}) => void;
};
export default _default;
export { Configuration, StyleRule, compute, configure, compile, createSimple, keyframes, reactTo, renderStatic };

@@ -5,16 +5,12 @@ "use strict";

var compute_1 = require("./compute");
exports.compute = compute_1.default;
var configure_1 = require("./configure");
var create_1 = require("./create");
exports.compile = create_1.default;
exports.configure = configure_1.default;
var compile_1 = require("./compile");
exports.compile = compile_1.default;
exports.createSimple = compile_1.createSimple;
var keyframes_1 = require("./keyframes");
exports.keyframes = keyframes_1.default;
var renderStatic_1 = require("./renderStatic");
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
compute: compute_1.default,
configure: configure_1.default,
create: create_1.default,
createSimple: create_1.createSimple,
keyframes: keyframes_1.default,
renderStatic: renderStatic_1.default,
};
exports.renderStatic = renderStatic_1.default;
//# sourceMappingURL=index.js.map

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

_.forEach(styles, function (style, key) {
if (!(style instanceof Object)) {
if (typeof style !== 'object') {
throw new Error("No CSS selector provided, just property " + key + " with value " + JSON.stringify(style));

@@ -27,3 +27,3 @@ }

var path = keys.concat(key);
if (value instanceof Object && !Array.isArray(value)) {
if (typeof value === 'object' && !Array.isArray(value)) {
valueAndPaths.push.apply(valueAndPaths, valueAndPathForStyle(value, path));

@@ -30,0 +30,0 @@ }

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

}
if (process.env.NODE_ENV === 'production') {
if (configure_1.config.useInsertRule) {
var sheet_1 = node.sheet;

@@ -13,0 +13,0 @@ cssTexts.forEach(function (cssText) {

"use strict";
function horizontalVertical(style) {
for (var property in style) {
if (property === 'paddingHorizontal') {
var cssValue = style[property];
if (typeof cssValue === 'object' && !Array.isArray(cssValue)) {
style[property] = horizontalVertical(cssValue);
}
else if (property === 'paddingHorizontal') {
style['paddingLeft'] = style[property];

@@ -6,0 +10,0 @@ style['paddingRight'] = style[property];

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

}
else if (cssValue instanceof Object) {
else if (typeof cssValue === 'object') {
style[property] = addUnit(cssValue, unit);

@@ -15,0 +15,0 @@ }

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

var classnames = require("classnames");
var src_1 = require("../../src");
var fadeOut = src_1.default.keyframes({
var dapper = require("../../src");
var fadeOut = dapper.keyframes({
'0%': {

@@ -15,3 +15,3 @@ opacity: 0,

});
src_1.default.renderStatic({
dapper.renderStatic({
'html, body': {

@@ -24,3 +24,3 @@ backgroundColor: '#CCFFFF',

});
var STYLES = src_1.default.create({
var STYLES = dapper.compile({
root: {

@@ -87,3 +87,3 @@ display: 'flex',

};
_this.styles = src_1.reactTo(_this, STYLES, MODES);
_this.styles = dapper.reactTo(_this, STYLES, MODES);
_this._onMouseEnter = function () {

@@ -90,0 +90,0 @@ _this.setState({ hovered: true });

"use strict";
var tslib_1 = require("tslib");
var React = require("react");
var src_1 = require("../../src");
var STYLES = src_1.default.createSimple({
var dapper = require("../../src");
var STYLES = dapper.createSimple({
root: {

@@ -7,0 +7,0 @@ display: 'inline-flex',

@@ -5,4 +5,3 @@ "use strict";

var dapper = require("../../src");
var src_1 = require("../../src");
var BASE_STYLES = src_1.default.create({
var BASE_STYLES = dapper.compile({
root: {

@@ -56,3 +55,3 @@ display: 'inline-block',

exports.BaseComponent = BaseComponent;
var STYLES = src_1.default.create({
var STYLES = dapper.compile({
content: {

@@ -59,0 +58,0 @@ '$hovered': {

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

var generateClassName_1 = require("../../src/libs/generateClassName");
var src_1 = require("../../src");
var dapper = require("../../src");
proxyquire.noCallThru();
var stub = { default: null };
var sandbox = sinon.sandbox.create();
var create = proxyquire('../../src/create', {
var compile = proxyquire('../../src/compile', {
'./libs/renderCSSText': stub,

@@ -27,3 +27,3 @@ }).default;

it("handles mode declarations", function () {
var className = create({
var className = compile({
root: {

@@ -35,3 +35,3 @@ $ghost: {

});
var styles = src_1.default.compute(className, {
var styles = dapper.compute(className, {
ghost: function () { return true; },

@@ -45,3 +45,3 @@ }, null);

it("allows modes as children of property", function () {
var className = create({
var className = compile({
root: {

@@ -54,3 +54,3 @@ color: {

});
var styles = src_1.default.compute(className, {
var styles = dapper.compute(className, {
red: function () { return false; },

@@ -57,0 +57,0 @@ blue: function () { return true; },

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

var sandbox = sinon.sandbox.create();
var create = proxyquire('../../src/create', {
var compile = proxyquire('../../src/compile', {
'./libs/renderCSSText': stub,

@@ -24,3 +24,3 @@ }).default;

configure_1.default({ friendlyClassNames: false });
var className = create({
var className = compile({
root: {

@@ -27,0 +27,0 @@ backgroundColor: 'red',

{
"name": "@convoy/dapper",
"version": "1.0.48",
"version": "2.0.56",
"description": "Styling library",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -125,3 +125,3 @@ # Dapper

const STYLES = StyleSheet.create({
const STYLES = StyleSheet.compile({
root: {

@@ -227,3 +227,3 @@ display: 'flex',

const STYLES = StyleSheet.create({
const STYLES = StyleSheet.compile({
root: {

@@ -230,0 +230,0 @@ animation: `5s ${fadeOut} linear`,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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