Huge News!Announcing our $40M Series B led by Abstract Ventures.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.38 to 1.0.40

4

dist/src/compute.d.ts

@@ -1,2 +0,2 @@

import { ModeResolver, ComputedStyleSheet } from './types';
export default function compute<Styles extends Object, State>(compiledStyles: Styles, modeResolver: ModeResolver<State>, state: State): ComputedStyleSheet<keyof Styles>;
import { ModeDeclarations, ComputedStyleSheet } from './types';
export default function compute<Styles extends Object, State>(compiledStyles: Styles, modeDeclarations: ModeDeclarations<State>, state: State): ComputedStyleSheet<keyof Styles>;
"use strict";
var _ = require("lodash");
function compute(compiledStyles, modeResolver, state) {
var modes = _.mapValues(modeResolver, function (resolver) { return resolver(state); });
function compute(compiledStyles, modeDeclarations, state) {
var modes = _.mapValues(modeDeclarations, function (resolver) { return resolver(state); });
return _.mapValues(compiledStyles, function (style) {

@@ -6,0 +6,0 @@ if (typeof style === 'string') {

@@ -1,3 +0,3 @@

import { CompiledSimpleStyleSheet, CompiledStyleSheet, Styles } from './types';
export default function create<StyleSet extends Styles>(styles: StyleSet): CompiledStyleSheet<keyof StyleSet>;
export declare function createSimple<StyleSet extends Styles>(styles: StyleSet): CompiledSimpleStyleSheet<keyof StyleSet>;
import { CompiledStyleSheet, ComputedStyleSheet, StyleDeclaration } from './types';
export default function create<StyleSet extends StyleDeclaration>(styles: StyleSet): CompiledStyleSheet<keyof StyleSet>;
export declare function createSimple<StyleSet extends StyleDeclaration>(styles: StyleSet): ComputedStyleSheet<keyof StyleSet>;
import { Configuration } from './configure';
import { Style } from './types';
export { Style, Configuration };
import { StyleRule } from './types';
export { StyleRule, Configuration };
declare var _default: {
compute: <Styles extends Object, State>(compiledStyles: Styles, modeResolver: {
compute: <Styles extends Object, State>(compiledStyles: Styles, modeDeclarations: {
[key: string]: (state: State) => boolean;

@@ -12,3 +12,3 @@ }, state: State) => {

create: <StyleSet extends {
[key: string]: Style;
[key: string]: StyleRule;
}>(styles: StyleSet) => {

@@ -20,3 +20,3 @@ [Key in keyof StyleSet]: string | ((modes: {

createSimple: <StyleSet extends {
[key: string]: Style;
[key: string]: StyleRule;
}>(styles: StyleSet) => {

@@ -26,8 +26,8 @@ [Key in keyof StyleSet]: string;

keyframes: (keyframe: {
[key: string]: Style;
[key: string]: StyleRule;
}) => string;
renderStatic: (styles: {
[key: string]: Style;
[key: string]: StyleRule;
}) => void;
};
export default _default;

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

import { Style } from './types';
import { StyleRule } from './types';
export declare type KeyFrames = {
[key: string]: Style;
[key: string]: StyleRule;
};
export default function keyframes(keyframe: KeyFrames): string;
export declare function resetUniqueId(): void;

@@ -1,2 +0,2 @@

import { Styles } from '../types';
export default function cssTextForStyles(styles: Styles): string[];
import { StyleDeclaration } from '../types';
export default function cssTextForStyles(styles: StyleDeclaration): string[];

@@ -1,2 +0,2 @@

import { Style } from '../types';
export default function horizontalVertical(style: Style): Style;
import { StyleRule } from '../types';
export default function horizontalVertical(style: StyleRule): StyleRule;

@@ -1,2 +0,2 @@

import { Style } from '../types';
export default function apply(style: Style): Style;
import { StyleRule } from '../types';
export default function apply(style: StyleRule): StyleRule;

@@ -1,2 +0,2 @@

import { Style } from '../types';
export default function prefixer(style: Style): Style;
import { StyleRule } from '../types';
export default function prefixer(style: StyleRule): StyleRule;

@@ -1,2 +0,2 @@

import { Style } from '../types';
export default function addUnit(style: Style, unit?: string): Style;
import { StyleRule } from '../types';
export default function addUnit(style: StyleRule, unit?: string): StyleRule;

@@ -1,2 +0,2 @@

import { Styles } from './types';
export default function renderStatic(styles: Styles): void;
import { StyleDeclaration } from './types';
export default function renderStatic(styles: StyleDeclaration): void;

@@ -1,24 +0,67 @@

export declare type CompiledSimpleStyleSheet<Keys extends string> = {
[Key in Keys]: string;
/**
* Either a CSS value (as a string), or a numeric value that will be coerced
* into a context-appropriate value.
*
* Typically, this means we append a CSS unit of 'px' to the number. Some
* properties (such as `lineHeight`) can be unitless, and will not gain a unit.
*/
export declare type StyleValue = number | string;
/**
* An individual style rule, containing CSS property declarations (with JS-style
* property names), as well as other nested rules.
*/
export declare type StyleRule = {
[key: string]: StyleValue | StyleValue[] | StyleRule;
};
export declare type CompiledStyleSheet<Keys extends string> = {
[Key in Keys]: CompiledStyle;
/**
* A collection of style rules represented by JavaScript Objects, which are
* eventually flattened, and compiled down into actual CSS rules.
*/
export declare type StyleDeclaration = {
[key: string]: StyleRule;
};
export declare type CompiledStyle = string | StyleReducer;
export declare type ModeResolver<S> = {
[key: string]: (state: S) => boolean;
/**
* A map of predicate functions that declare the modes that should be made
* available to a dynamic stylesheet.
*
* Each predicate returns whether a given mode (identified by `key`) should be
* enabled given `state`.
*/
export declare type ModeDeclarations<TState> = {
[key: string]: (state: TState) => boolean;
};
export declare type ClassNameResolver = {
/**
* Evaluates which CSS classes should be enabled given the set of active modes.
*/
export declare type StyleReducer = (modes: ActiveModes) => CSSClassName;
/**
* A compiled style rule; may either be a static class name expression, or one
* that requires dynamic computation based on active modes.
*/
export declare type CompiledStyle = CSSClassName | StyleReducer;
/**
* A map of rule names to their compiled rules.
*/
export declare type CompiledStyleSheet<TKeys extends string> = {
[Key in TKeys]: CompiledStyle;
};
/**
* A set of modes that are considered active, represented as an object so that
* consumers don't have to polyfill Set.
*/
export declare type ActiveModes = {
[key: string]: boolean;
};
export declare type StyleReducer = (modes: ClassNameResolver) => string;
export declare type Style = {
[key: string]: number | string | string[] | Style;
};
export declare type Styles = {
[key: string]: Style;
};
/**
* A CSS class name express that is associated with a computed style rule. May
* be a combination of multiple CSS class names.
*/
export declare type CSSClassName = string;
/**
* A map of rule names to the CSS class name that represents them.
*
* This is the result of computing a compiled style declaration.
*/
export declare type ComputedStyleSheet<Keys extends string> = {
[Key in Keys]: ComputedStyle;
[Key in Keys]: CSSClassName;
};
export declare type ComputedStyle = string;

@@ -0,2 +1,3 @@

// Inputs
"use strict";
//# sourceMappingURL=types.js.map
{
"name": "@convoy/dapper",
"version": "1.0.38",
"version": "1.0.40",
"description": "Styling library",

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

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