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

@compiled/react

Package Overview
Dependencies
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compiled/react - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

dist/browser/class-names/index.js.flow

7

CHANGELOG.md
# @compiled/react
## 0.8.0
### Minor Changes
- 4210ff6: Add flow types support
- 53935b3: Add `ObjectExpression` support to `css`
## 0.7.0

@@ -4,0 +11,0 @@

4

dist/browser/class-names/index.d.ts

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

import { ReactNode } from 'react';
import { CssFunction, BasicTemplateInterpolations } from '../types';
import type { ReactNode } from 'react';
import type { CssFunction, BasicTemplateInterpolations } from '../types';
export declare type Interpolations = (BasicTemplateInterpolations | CssFunction | CssFunction[])[];

@@ -4,0 +4,0 @@ export interface ClassNamesProps {

import type { CSSProps } from '../types';
/**
* Create styles that can be re-used between components.
* Create styles that can be re-used between components with a template literal.
*

@@ -16,1 +16,14 @@ * ```

export default function css(_css: TemplateStringsArray, ..._values: (string | number)[]): CSSProps;
/**
* Create styles that can be re-used between components with an object
*
* ```
* css({ color: 'red' });
* ```
*
* For more help, read the docs:
* https://compiledcssinjs.com/docs/api-css
*
* @param css
*/
export default function css(_css: CSSProps): CSSProps;
import { createSetupError } from '../utils/error';
/**
* Create styles that can be re-used between components.
*
* ```
* css`color: red;`;
* ```
*
* For more help, read the docs:
* https://compiledcssinjs.com/docs/api-css
*
* @param css
* @param values
*/
export default function css(_css) {

@@ -16,0 +3,0 @@ var _values = [];

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

import type { CssFunction, CSSProps } from './types';
export { keyframes } from './keyframes';

@@ -5,3 +6,4 @@ export { styled } from './styled';

export { default as css } from './css';
import { CssFunction } from './types';
export type { CssFunction, CSSProps };
export type { CssObject } from './styled';
declare module 'react' {

@@ -8,0 +10,0 @@ interface DOMAttributes<T> {

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

import { StyleSheetOpts, Bucket } from './types';
import type { StyleSheetOpts, Bucket } from './types';
/**

@@ -3,0 +3,0 @@ * Ordered style buckets using their short psuedo name.

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

import { ProviderComponent, UseCacheHook } from './types';
import type { ProviderComponent, UseCacheHook } from './types';
/**

@@ -3,0 +3,0 @@ * Hook using the cache created on the server or client.

/// <reference types="react" />
import { StyleSheetOpts } from './types';
import type { StyleSheetOpts } from './types';
interface StyleProps extends StyleSheetOpts {

@@ -4,0 +4,0 @@ /**

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

import { ComponentType } from 'react';
import { BasicTemplateInterpolations, CssFunction, CSSProps } from '../types';
import type { ComponentType } from 'react';
import type { BasicTemplateInterpolations, CssFunction, CSSProps } from '../types';
export interface FunctionIterpolation<TProps> {

@@ -23,6 +23,6 @@ (props: TProps): CSSProps | string | number | boolean | undefined;

export interface StyledFunctionFromTag<TTag extends keyof JSX.IntrinsicElements> {
<TProps extends unknown>(css: CssObject<TProps> | CssObject<TProps>[], ...interpoltations: Interpolations<TProps>): React.ComponentType<TProps & JSX.IntrinsicElements[TTag] & StyledProps>;
<TProps extends unknown>(css: CssObject<TProps> | CssObject<TProps>[], ...interpolations: Interpolations<TProps>): React.ComponentType<TProps & JSX.IntrinsicElements[TTag] & StyledProps>;
}
export interface StyledFunctionFromComponent<TInheritedProps extends unknown> {
<TProps extends unknown>(css: CssObject<TProps> | TemplateStringsArray, ...interpoltations: Interpolations<TProps>): React.ComponentType<TProps & StyledProps & TInheritedProps>;
<TProps extends unknown>(css: CssObject<TProps> | TemplateStringsArray, ...interpolations: Interpolations<TProps>): React.ComponentType<TProps & StyledProps & TInheritedProps>;
}

@@ -29,0 +29,0 @@ export declare type StyledComponentMap = {

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

import * as CSS from 'csstype';
import type * as CSS from 'csstype';
/**

@@ -3,0 +3,0 @@ * Typing for the interpolations.

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

import { ReactNode } from 'react';
import { CssFunction, BasicTemplateInterpolations } from '../types';
import type { ReactNode } from 'react';
import type { CssFunction, BasicTemplateInterpolations } from '../types';
export declare type Interpolations = (BasicTemplateInterpolations | CssFunction | CssFunction[])[];

@@ -4,0 +4,0 @@ export interface ClassNamesProps {

import type { CSSProps } from '../types';
/**
* Create styles that can be re-used between components.
* Create styles that can be re-used between components with a template literal.
*

@@ -16,1 +16,14 @@ * ```

export default function css(_css: TemplateStringsArray, ..._values: (string | number)[]): CSSProps;
/**
* Create styles that can be re-used between components with an object
*
* ```
* css({ color: 'red' });
* ```
*
* For more help, read the docs:
* https://compiledcssinjs.com/docs/api-css
*
* @param css
*/
export default function css(_css: CSSProps): CSSProps;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var error_1 = require("../utils/error");
/**
* Create styles that can be re-used between components.
*
* ```
* css`color: red;`;
* ```
*
* For more help, read the docs:
* https://compiledcssinjs.com/docs/api-css
*
* @param css
* @param values
*/
function css(_css) {

@@ -18,0 +5,0 @@ var _values = [];

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

import type { CssFunction, CSSProps } from './types';
export { keyframes } from './keyframes';

@@ -5,3 +6,4 @@ export { styled } from './styled';

export { default as css } from './css';
import { CssFunction } from './types';
export type { CssFunction, CSSProps };
export type { CssObject } from './styled';
declare module 'react' {

@@ -8,0 +10,0 @@ interface DOMAttributes<T> {

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

import { StyleSheetOpts, Bucket } from './types';
import type { StyleSheetOpts, Bucket } from './types';
/**

@@ -3,0 +3,0 @@ * Ordered style buckets using their short psuedo name.

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

import { ProviderComponent, UseCacheHook } from './types';
import type { ProviderComponent, UseCacheHook } from './types';
/**

@@ -3,0 +3,0 @@ * Hook using the cache created on the server or client.

/// <reference types="react" />
import { StyleSheetOpts } from './types';
import type { StyleSheetOpts } from './types';
interface StyleProps extends StyleSheetOpts {

@@ -4,0 +4,0 @@ /**

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

import { ComponentType } from 'react';
import { BasicTemplateInterpolations, CssFunction, CSSProps } from '../types';
import type { ComponentType } from 'react';
import type { BasicTemplateInterpolations, CssFunction, CSSProps } from '../types';
export interface FunctionIterpolation<TProps> {

@@ -23,6 +23,6 @@ (props: TProps): CSSProps | string | number | boolean | undefined;

export interface StyledFunctionFromTag<TTag extends keyof JSX.IntrinsicElements> {
<TProps extends unknown>(css: CssObject<TProps> | CssObject<TProps>[], ...interpoltations: Interpolations<TProps>): React.ComponentType<TProps & JSX.IntrinsicElements[TTag] & StyledProps>;
<TProps extends unknown>(css: CssObject<TProps> | CssObject<TProps>[], ...interpolations: Interpolations<TProps>): React.ComponentType<TProps & JSX.IntrinsicElements[TTag] & StyledProps>;
}
export interface StyledFunctionFromComponent<TInheritedProps extends unknown> {
<TProps extends unknown>(css: CssObject<TProps> | TemplateStringsArray, ...interpoltations: Interpolations<TProps>): React.ComponentType<TProps & StyledProps & TInheritedProps>;
<TProps extends unknown>(css: CssObject<TProps> | TemplateStringsArray, ...interpolations: Interpolations<TProps>): React.ComponentType<TProps & StyledProps & TInheritedProps>;
}

@@ -29,0 +29,0 @@ export declare type StyledComponentMap = {

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

import * as CSS from 'csstype';
import type * as CSS from 'csstype';
/**

@@ -3,0 +3,0 @@ * Typing for the interpolations.

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

import { ReactNode } from 'react';
import { CssFunction, BasicTemplateInterpolations } from '../types';
import type { ReactNode } from 'react';
import type { CssFunction, BasicTemplateInterpolations } from '../types';
export declare type Interpolations = (BasicTemplateInterpolations | CssFunction | CssFunction[])[];

@@ -4,0 +4,0 @@ export interface ClassNamesProps {

import type { CSSProps } from '../types';
/**
* Create styles that can be re-used between components.
* Create styles that can be re-used between components with a template literal.
*

@@ -16,1 +16,14 @@ * ```

export default function css(_css: TemplateStringsArray, ..._values: (string | number)[]): CSSProps;
/**
* Create styles that can be re-used between components with an object
*
* ```
* css({ color: 'red' });
* ```
*
* For more help, read the docs:
* https://compiledcssinjs.com/docs/api-css
*
* @param css
*/
export default function css(_css: CSSProps): CSSProps;
import { createSetupError } from '../utils/error';
/**
* Create styles that can be re-used between components.
*
* ```
* css`color: red;`;
* ```
*
* For more help, read the docs:
* https://compiledcssinjs.com/docs/api-css
*
* @param css
* @param values
*/
export default function css(_css) {

@@ -16,0 +3,0 @@ var _values = [];

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

import type { CssFunction, CSSProps } from './types';
export { keyframes } from './keyframes';

@@ -5,3 +6,4 @@ export { styled } from './styled';

export { default as css } from './css';
import { CssFunction } from './types';
export type { CssFunction, CSSProps };
export type { CssObject } from './styled';
declare module 'react' {

@@ -8,0 +10,0 @@ interface DOMAttributes<T> {

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

import { StyleSheetOpts, Bucket } from './types';
import type { StyleSheetOpts, Bucket } from './types';
/**

@@ -3,0 +3,0 @@ * Ordered style buckets using their short psuedo name.

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

import { ProviderComponent, UseCacheHook } from './types';
import type { ProviderComponent, UseCacheHook } from './types';
/**

@@ -3,0 +3,0 @@ * Hook using the cache created on the server or client.

/// <reference types="react" />
import { StyleSheetOpts } from './types';
import type { StyleSheetOpts } from './types';
interface StyleProps extends StyleSheetOpts {

@@ -4,0 +4,0 @@ /**

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

import { ComponentType } from 'react';
import { BasicTemplateInterpolations, CssFunction, CSSProps } from '../types';
import type { ComponentType } from 'react';
import type { BasicTemplateInterpolations, CssFunction, CSSProps } from '../types';
export interface FunctionIterpolation<TProps> {

@@ -23,6 +23,6 @@ (props: TProps): CSSProps | string | number | boolean | undefined;

export interface StyledFunctionFromTag<TTag extends keyof JSX.IntrinsicElements> {
<TProps extends unknown>(css: CssObject<TProps> | CssObject<TProps>[], ...interpoltations: Interpolations<TProps>): React.ComponentType<TProps & JSX.IntrinsicElements[TTag] & StyledProps>;
<TProps extends unknown>(css: CssObject<TProps> | CssObject<TProps>[], ...interpolations: Interpolations<TProps>): React.ComponentType<TProps & JSX.IntrinsicElements[TTag] & StyledProps>;
}
export interface StyledFunctionFromComponent<TInheritedProps extends unknown> {
<TProps extends unknown>(css: CssObject<TProps> | TemplateStringsArray, ...interpoltations: Interpolations<TProps>): React.ComponentType<TProps & StyledProps & TInheritedProps>;
<TProps extends unknown>(css: CssObject<TProps> | TemplateStringsArray, ...interpolations: Interpolations<TProps>): React.ComponentType<TProps & StyledProps & TInheritedProps>;
}

@@ -29,0 +29,0 @@ export declare type StyledComponentMap = {

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

import * as CSS from 'csstype';
import type * as CSS from 'csstype';
/**

@@ -3,0 +3,0 @@ * Typing for the interpolations.

{
"name": "@compiled/react",
"version": "0.7.0",
"version": "0.8.0",
"description": "A familiar and performant compile time CSS-in-JS library for React.",

@@ -48,8 +48,6 @@ "keywords": [

"dependencies": {
"csstype": "^3.0.8"
"csstype": "^3.0.9"
},
"devDependencies": {
"@testing-library/react": "^11.2.7",
"@types/jscodeshift": "^0.11.2",
"jscodeshift": "^0.12.0",
"react": "^17.0.2",

@@ -56,0 +54,0 @@ "react-dom": "^17.0.2"

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

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