@jsxstyle/react
Advanced tools
Comparing version 0.0.0-canary-20241218000126 to 0.0.0-canary-20241218033435
@@ -1,4 +0,3 @@ | ||
import { componentStyles } from '@jsxstyle/core'; | ||
import { componentStyles, cacheSingleton, } from '@jsxstyle/core'; | ||
import { createElement } from 'react'; | ||
import { styleCache } from './styleCache.js'; | ||
export const classNamePropKey = 'className'; | ||
@@ -11,3 +10,3 @@ export function componentFactory(displayName) { | ||
const Component = mergedProps.component || tagName; | ||
const extractedProps = styleCache.getComponentProps(mergedProps, classNamePropKey); | ||
const extractedProps = cacheSingleton.getComponentProps(mergedProps, classNamePropKey); | ||
return createElement(Component, extractedProps); | ||
@@ -14,0 +13,0 @@ }; |
@@ -1,5 +0,5 @@ | ||
import { styleCache } from './styleCache.js'; | ||
import { cacheSingleton } from '@jsxstyle/core'; | ||
export type { CSSProperties } from '@jsxstyle/core'; | ||
export type { StylableComponentProps } from './types.js'; | ||
export { styleCache as cache }; | ||
export { cacheSingleton as cache }; | ||
export { useMatchMedia } from './useMatchMedia.js'; | ||
@@ -6,0 +6,0 @@ export declare const makeCustomProperties: <KPropKeys extends string>(props: Record<KPropKeys, string | number>) => import("@jsxstyle/core").MakeCustomPropertiesFunction<KPropKeys, "default">; |
@@ -1,9 +0,8 @@ | ||
import { getCustomPropertiesFunction, makeCssFunction } from '@jsxstyle/core'; | ||
import { getCustomPropertiesFunction, makeCssFunction, cacheSingleton, } from '@jsxstyle/core'; | ||
import { classNamePropKey, componentFactory } from './componentFactory.js'; | ||
import { styleCache } from './styleCache.js'; | ||
export { styleCache as cache }; | ||
export { cacheSingleton as cache }; | ||
export { useMatchMedia } from './useMatchMedia.js'; | ||
export const makeCustomProperties = | ||
/*#__PURE__*/ getCustomPropertiesFunction(styleCache); | ||
export const css = /*#__PURE__*/ makeCssFunction(classNamePropKey, styleCache); | ||
/*#__PURE__*/ getCustomPropertiesFunction(cacheSingleton); | ||
export const css = /*#__PURE__*/ makeCssFunction(classNamePropKey, cacheSingleton); | ||
export const Box = /*#__PURE__*/ componentFactory('Box'); | ||
@@ -10,0 +9,0 @@ export const Block = /*#__PURE__*/ componentFactory('Block'); |
{ | ||
"name": "@jsxstyle/react", | ||
"version": "0.0.0-canary-20241218000126", | ||
"version": "0.0.0-canary-20241218033435", | ||
"type": "module", | ||
@@ -12,5 +12,5 @@ "files": [ | ||
"peerDependencies": { | ||
"@jsxstyle/core": "0.0.0-canary-20241218000126", | ||
"@jsxstyle/core": "0.0.0-canary-20241218033435", | ||
"@types/react": "^18.0.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
14812
17
146