jsxstyle-utils
Advanced tools
Comparing version 2.1.4 to 2.1.5
@@ -1,2 +0,2 @@ | ||
export default function addStyleToHead(rule: string): void; | ||
export declare function addStyleToHead(rule: string): void; | ||
//# sourceMappingURL=addStyleToHead.d.ts.map |
@@ -18,7 +18,7 @@ declare type CSSProperties = import('./types').CSSProperties; | ||
| 'TableRow'; | ||
declare const componentStyles: Record< | ||
export declare const componentStyles: Record< | ||
JsxstyleComponentName | DeprecatedJsxstyleComponentName, | ||
Pick<CSSProperties, 'display' | 'flexDirection'> | null | ||
>; | ||
export default componentStyles; | ||
export {}; | ||
//# sourceMappingURL=componentStyles.d.ts.map |
@@ -10,3 +10,3 @@ /** | ||
*/ | ||
export default function dangerousStyleValue(name: any, value: any): string; | ||
export declare function dangerousStyleValue(name: any, value: any): string; | ||
//# sourceMappingURL=dangerousStyleValue.d.ts.map |
declare type InsertRuleCallback = (rule: string, props?: {}) => boolean | void; | ||
export default function getStyleCache(): { | ||
export declare function getStyleCache(): { | ||
reset(): void; | ||
@@ -4,0 +4,0 @@ injectOptions( |
@@ -1,2 +0,1 @@ | ||
import { CSSProperties } from './types'; | ||
export declare const pseudoelements: { | ||
@@ -17,2 +16,3 @@ after: boolean; | ||
invalid: boolean; | ||
link: boolean; | ||
required: boolean; | ||
@@ -33,4 +33,4 @@ target: boolean; | ||
}; | ||
export default function getStyleKeysForProps( | ||
props: CSSProperties & { | ||
export declare function getStyleKeysForProps( | ||
props: Record<string, any> & { | ||
mediaQueries?: Record<string, string>; | ||
@@ -37,0 +37,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
export default function hyphenateStyleName(styleName: string): string; | ||
export declare function hyphenateStyleName(styleName: string): string; | ||
//# sourceMappingURL=hyphenateStyleName.d.ts.map |
@@ -197,2 +197,3 @@ 'use strict'; | ||
invalid: true, | ||
link: true, | ||
required: true, | ||
@@ -199,0 +200,0 @@ target: true, |
@@ -1,14 +0,14 @@ | ||
export { default as addStyleToHead } from './addStyleToHead'; | ||
export { addStyleToHead } from './addStyleToHead'; | ||
export { | ||
default as componentStyles, | ||
componentStyles, | ||
JsxstyleComponentName, | ||
DeprecatedJsxstyleComponentName, | ||
} from './componentStyles'; | ||
export { default as dangerousStyleValue } from './dangerousStyleValue'; | ||
export { default as getStyleCache } from './getStyleCache'; | ||
export { default as getStyleKeysForProps } from './getStyleKeysForProps'; | ||
export { dangerousStyleValue } from './dangerousStyleValue'; | ||
export { getStyleCache } from './getStyleCache'; | ||
export { getStyleKeysForProps } from './getStyleKeysForProps'; | ||
export { pseudoelements, pseudoclasses } from './getStyleKeysForProps'; | ||
export { default as hyphenateStyleName } from './hyphenateStyleName'; | ||
export { default as stringHash } from './stringHash'; | ||
export { CSSProperties, ExactCSSProperties } from './types'; | ||
export { hyphenateStyleName } from './hyphenateStyleName'; | ||
export { stringHash } from './stringHash'; | ||
export { CSSProperties } from './types'; | ||
//# sourceMappingURL=jsxstyle-utils.d.ts.map |
@@ -193,2 +193,3 @@ var canUseDOM = !!( | ||
invalid: true, | ||
link: true, | ||
required: true, | ||
@@ -195,0 +196,0 @@ target: true, |
@@ -196,2 +196,3 @@ define('jsxstyle-utils', ['exports'], function(exports) { | ||
invalid: true, | ||
link: true, | ||
required: true, | ||
@@ -198,0 +199,0 @@ target: true, |
@@ -1,2 +0,2 @@ | ||
export default function stringHash(str: string): number; | ||
export declare function stringHash(str: string): number; | ||
//# sourceMappingURL=stringHash.d.ts.map |
import { Properties } from 'csstype'; | ||
/** Make all properties in T potentially falsey */ | ||
export declare type Falsey<T> = { [P in keyof T]?: T[P] | false | null }; | ||
/** | ||
* jsxstyle-compatible CSS properties provided by csstype. | ||
* Make all properties in `T` potentially `null` or `false`. | ||
* | ||
* Use this type instead of `CSSProperties` if you don't use pseudoelement, pseudoclass, or media query props with jsxstyle. | ||
* Note: `Falsey` is not the best name, as jsxstyle considers zero values are considered valid. | ||
*/ | ||
export interface ExactCSSProperties | ||
extends Falsey<Properties<string | number>> {} | ||
export declare type Falsey<T> = { [P in keyof T]?: T[P] | false | null }; | ||
/** | ||
* jsxstyle-compatible CSS properties provided by csstype with an additional string index signature. | ||
* jsxstyle-compatible CSS properties interface provided by `csstype`. | ||
* | ||
* Use this type instead of `ExactCSSProperties` if you use pseudoelement, pseudoclass, or media query props with jsxstyle. | ||
* Note: this interface does not support prefixed style props (media query or pseudoclass/pseudoelement). | ||
* Support for these props can be added as needed with module augmentation. Example: | ||
* | ||
```typescript | ||
import { CSSProperties } from 'jsxstyle'; | ||
declare module 'jsxstyle' { | ||
interface CSSProperties { | ||
hoverBackgroundColor: CSSProperties['backgroundColor']; | ||
} | ||
} | ||
``` | ||
* or if you’re feeling adventurous: | ||
```typescript | ||
import { CSSProperties } from 'jsxstyle'; | ||
declare module 'jsxstyle' { | ||
interface CSSProperties { | ||
[key: string]: any; | ||
} | ||
} | ||
``` | ||
* For further reading, see the TypeScript docs: https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation | ||
*/ | ||
export interface CSSProperties | ||
extends ExactCSSProperties, | ||
Record<string, any> {} | ||
export interface CSSProperties extends Falsey<Properties<string | number>> {} | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "jsxstyle-utils", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"description": "Utilities used by jsxstyle and tooling built for jsxstyle", | ||
@@ -17,3 +17,3 @@ "author": "Pete Hunt", | ||
}, | ||
"gitHead": "d8b16c7e34aa33727407a311e5cfc6d6cc5d036d" | ||
"gitHead": "561c5da9dd60ccbce84ee35e99671ed355dfd9e0" | ||
} |
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
53753
1436