@pigment-css/react
Advanced tools
Comparing version 0.0.16 to 0.0.17
'use strict'; | ||
var chunkDTOCB3OU_js = require('./chunk-DTOCB3OU.js'); | ||
var chunkCUKO2AN5_js = require('./chunk-CUKO2AN5.js'); | ||
var React = require('react'); | ||
@@ -32,3 +32,3 @@ var PropTypes = require('prop-types'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -48,3 +48,3 @@ * @license MIT | ||
style | ||
} = _b, rest = chunkDTOCB3OU_js.__objRest(_b, [ | ||
} = _b, rest = chunkCUKO2AN5_js.__objRest(_b, [ | ||
"as", | ||
@@ -80,4 +80,4 @@ // Added to support compatibility with @mui/system | ||
} | ||
const styles = chunkDTOCB3OU_js.__spreadValues(chunkDTOCB3OU_js.__spreadValues({}, style), varStyles); | ||
return /* @__PURE__ */ jsxRuntime.jsx(Component, chunkDTOCB3OU_js.__spreadValues({ ref, className: classes, style: styles }, rest)); | ||
const styles = chunkCUKO2AN5_js.__spreadValues(chunkCUKO2AN5_js.__spreadValues({}, style), varStyles); | ||
return /* @__PURE__ */ jsxRuntime.jsx(Component, chunkCUKO2AN5_js.__spreadValues({ ref, className: classes, style: styles }, rest)); | ||
} | ||
@@ -84,0 +84,0 @@ ); |
'use strict'; | ||
var chunk2GIN4FKF_js = require('./chunk-2GIN4FKF.js'); | ||
var chunkDTOCB3OU_js = require('./chunk-DTOCB3OU.js'); | ||
var chunkKOS75ATE_js = require('./chunk-KOS75ATE.js'); | ||
var chunkCUKO2AN5_js = require('./chunk-CUKO2AN5.js'); | ||
var React = require('react'); | ||
@@ -33,3 +33,3 @@ var PropTypes = require('prop-types'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -41,3 +41,3 @@ * @license MIT | ||
var ContainerRoot = chunk2GIN4FKF_js.styled("div", { | ||
var ContainerRoot = chunkKOS75ATE_js.styled("div", { | ||
name: "MuiContainer", | ||
@@ -109,3 +109,3 @@ slot: "Root" | ||
maxWidth = "lg" | ||
} = _a, other = chunkDTOCB3OU_js.__objRest(_a, [ | ||
} = _a, other = chunkCUKO2AN5_js.__objRest(_a, [ | ||
"className", | ||
@@ -117,3 +117,3 @@ "component", | ||
]); | ||
const ownerState = chunkDTOCB3OU_js.__spreadProps(chunkDTOCB3OU_js.__spreadValues({}, props), { | ||
const ownerState = chunkCUKO2AN5_js.__spreadProps(chunkCUKO2AN5_js.__spreadValues({}, props), { | ||
component, | ||
@@ -128,3 +128,3 @@ disableGutters, | ||
ContainerRoot, | ||
chunkDTOCB3OU_js.__spreadValues({ | ||
chunkCUKO2AN5_js.__spreadValues({ | ||
as: component, | ||
@@ -131,0 +131,0 @@ ownerState, |
'use strict'; | ||
var chunk2GIN4FKF_js = require('./chunk-2GIN4FKF.js'); | ||
var chunkNPAPNZ7L_js = require('./chunk-NPAPNZ7L.js'); | ||
var chunkDTOCB3OU_js = require('./chunk-DTOCB3OU.js'); | ||
var chunkKOS75ATE_js = require('./chunk-KOS75ATE.js'); | ||
var chunkBP7N5YZU_js = require('./chunk-BP7N5YZU.js'); | ||
var chunkCUKO2AN5_js = require('./chunk-CUKO2AN5.js'); | ||
var clsx = require('clsx'); | ||
@@ -36,3 +36,3 @@ var PropTypes = require('prop-types'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -48,3 +48,3 @@ * @license MIT | ||
} | ||
var gridAtomics = chunkNPAPNZ7L_js.generateAtomics(({ theme }) => { | ||
var gridAtomics = chunkBP7N5YZU_js.generateAtomics(({ theme }) => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; | ||
@@ -117,3 +117,3 @@ const conditions = {}; | ||
}); | ||
var GridComponent = chunk2GIN4FKF_js.styled("div")({ | ||
var GridComponent = chunkKOS75ATE_js.styled("div")({ | ||
"--Grid-fixed-width": "calc(100% * var(--Grid-self-column-span) / var(--Grid-parent-column-count) - (var(--Grid-parent-column-count) - var(--Grid-self-column-span)) * var(--Grid-parent-column-spacing) / var(--Grid-parent-column-count))", | ||
@@ -169,3 +169,3 @@ "--Grid-fixed-offset": "calc(100% * var(--Grid-self-offset) / var(--Grid-parent-column-count) + var(--Grid-parent-column-spacing) * var(--Grid-self-offset) / var(--Grid-parent-column-count))", | ||
wrap = "wrap" | ||
} = _b, rest = chunkDTOCB3OU_js.__objRest(_b, [ | ||
} = _b, rest = chunkCUKO2AN5_js.__objRest(_b, [ | ||
"children", | ||
@@ -226,7 +226,7 @@ "columns", | ||
GridComponent, | ||
chunkDTOCB3OU_js.__spreadProps(chunkDTOCB3OU_js.__spreadValues({ | ||
chunkCUKO2AN5_js.__spreadProps(chunkCUKO2AN5_js.__spreadValues({ | ||
as: component, | ||
ref, | ||
className: clsx__default.default(gridClasses.className, className), | ||
style: chunkDTOCB3OU_js.__spreadValues(chunkDTOCB3OU_js.__spreadValues({}, style), gridClasses.style) | ||
style: chunkCUKO2AN5_js.__spreadValues(chunkCUKO2AN5_js.__spreadValues({}, style), gridClasses.style) | ||
}, rest), { | ||
@@ -233,0 +233,0 @@ ownerState, |
'use strict'; | ||
var chunkNPAPNZ7L_js = require('./chunk-NPAPNZ7L.js'); | ||
var chunkDTOCB3OU_js = require('./chunk-DTOCB3OU.js'); | ||
var chunkBP7N5YZU_js = require('./chunk-BP7N5YZU.js'); | ||
var chunkCUKO2AN5_js = require('./chunk-CUKO2AN5.js'); | ||
var React = require('react'); | ||
@@ -35,3 +35,3 @@ var clsx = require('clsx'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -43,3 +43,3 @@ * @license MIT | ||
var hiddenAtomics = chunkNPAPNZ7L_js.generateAtomics(({ theme }) => { | ||
var hiddenAtomics = chunkBP7N5YZU_js.generateAtomics(({ theme }) => { | ||
const conditions = {}; | ||
@@ -60,3 +60,3 @@ for (let i = 0; i < theme.breakpoints.keys.length; i += 1) { | ||
var Hidden = React__namespace.forwardRef(function Hidden2(_a, ref) { | ||
var _b = _a, { className, component = "div", style } = _b, props = chunkDTOCB3OU_js.__objRest(_b, ["className", "component", "style"]); | ||
var _b = _a, { className, component = "div", style } = _b, props = chunkCUKO2AN5_js.__objRest(_b, ["className", "component", "style"]); | ||
const rest = {}; | ||
@@ -84,6 +84,6 @@ const breakpointProps = {}; | ||
Component, | ||
chunkDTOCB3OU_js.__spreadValues({ | ||
chunkCUKO2AN5_js.__spreadValues({ | ||
ref, | ||
className: clsx__default.default(stackClasses.className, className), | ||
style: chunkDTOCB3OU_js.__spreadValues(chunkDTOCB3OU_js.__spreadValues({}, style), stackClasses.style) | ||
style: chunkCUKO2AN5_js.__spreadValues(chunkCUKO2AN5_js.__spreadValues({}, style), stackClasses.style) | ||
}, rest) | ||
@@ -90,0 +90,0 @@ ); |
'use strict'; | ||
var chunkJSC45DTX_js = require('./chunk-JSC45DTX.js'); | ||
var chunk2GIN4FKF_js = require('./chunk-2GIN4FKF.js'); | ||
var chunkNPAPNZ7L_js = require('./chunk-NPAPNZ7L.js'); | ||
var chunkDTOCB3OU_js = require('./chunk-DTOCB3OU.js'); | ||
var chunkHCRNIBVK_js = require('./chunk-HCRNIBVK.js'); | ||
var chunkKOS75ATE_js = require('./chunk-KOS75ATE.js'); | ||
var chunkBP7N5YZU_js = require('./chunk-BP7N5YZU.js'); | ||
var chunkCUKO2AN5_js = require('./chunk-CUKO2AN5.js'); | ||
var utils = require('@mui/utils'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -25,3 +25,3 @@ * @license MIT | ||
sxClass += `${typeof element === "string" ? element : element.className} `; | ||
sxVars = chunkDTOCB3OU_js.__spreadValues(chunkDTOCB3OU_js.__spreadValues({}, sxVars), element && typeof element !== "string" ? element.vars : void 0); | ||
sxVars = chunkCUKO2AN5_js.__spreadValues(chunkCUKO2AN5_js.__spreadValues({}, sxVars), element && typeof element !== "string" ? element.vars : void 0); | ||
} | ||
@@ -48,3 +48,3 @@ } | ||
className: `${sxClass.trim()}${className ? ` ${className}` : ""}`, | ||
style: chunkDTOCB3OU_js.__spreadValues(chunkDTOCB3OU_js.__spreadValues({}, varStyles), style) | ||
style: chunkCUKO2AN5_js.__spreadValues(chunkCUKO2AN5_js.__spreadValues({}, varStyles), style) | ||
}; | ||
@@ -65,6 +65,6 @@ } | ||
const defaultProps = nameOrDefaultProps; | ||
const output = chunkDTOCB3OU_js.__spreadValues({}, props); | ||
const output = chunkCUKO2AN5_js.__spreadValues({}, props); | ||
Object.keys(defaultProps).forEach((propName) => { | ||
if (propName.toString().match(/^(components|slots)$/)) { | ||
output[propName] = chunkDTOCB3OU_js.__spreadValues(chunkDTOCB3OU_js.__spreadValues({}, defaultProps[propName]), output[propName]); | ||
output[propName] = chunkCUKO2AN5_js.__spreadValues(chunkCUKO2AN5_js.__spreadValues({}, defaultProps[propName]), output[propName]); | ||
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) { | ||
@@ -79,3 +79,3 @@ const defaultSlotProps = defaultProps[propName] || {}; | ||
} else { | ||
output[propName] = chunkDTOCB3OU_js.__spreadValues({}, slotProps); | ||
output[propName] = chunkCUKO2AN5_js.__spreadValues({}, slotProps); | ||
Object.keys(defaultSlotProps).forEach((slotPropName) => { | ||
@@ -98,3 +98,3 @@ output[propName][slotPropName] = utils.internal_resolveProps( | ||
function extendSxProp(props) { | ||
return chunkDTOCB3OU_js.__spreadValues({}, props); | ||
return chunkCUKO2AN5_js.__spreadValues({}, props); | ||
} | ||
@@ -121,15 +121,15 @@ function createExtendSxProp() { | ||
enumerable: true, | ||
get: function () { return chunkJSC45DTX_js.css; } | ||
get: function () { return chunkHCRNIBVK_js.css; } | ||
}); | ||
Object.defineProperty(exports, "styled", { | ||
enumerable: true, | ||
get: function () { return chunk2GIN4FKF_js.styled; } | ||
get: function () { return chunkKOS75ATE_js.styled; } | ||
}); | ||
Object.defineProperty(exports, "atomics", { | ||
enumerable: true, | ||
get: function () { return chunkNPAPNZ7L_js.atomics; } | ||
get: function () { return chunkBP7N5YZU_js.atomics; } | ||
}); | ||
Object.defineProperty(exports, "generateAtomics", { | ||
enumerable: true, | ||
get: function () { return chunkNPAPNZ7L_js.generateAtomics; } | ||
get: function () { return chunkBP7N5YZU_js.generateAtomics; } | ||
}); | ||
@@ -136,0 +136,0 @@ exports.createUseThemeProps = createUseThemeProps; |
'use strict'; | ||
var chunkJSC45DTX_js = require('./chunk-JSC45DTX.js'); | ||
var chunkNPAPNZ7L_js = require('./chunk-NPAPNZ7L.js'); | ||
var chunkDTOCB3OU_js = require('./chunk-DTOCB3OU.js'); | ||
var chunkHCRNIBVK_js = require('./chunk-HCRNIBVK.js'); | ||
var chunkBP7N5YZU_js = require('./chunk-BP7N5YZU.js'); | ||
var chunkCUKO2AN5_js = require('./chunk-CUKO2AN5.js'); | ||
var clsx = require('clsx'); | ||
@@ -36,3 +36,3 @@ var PropTypes = require('prop-types'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -44,3 +44,3 @@ * @license MIT | ||
var stackAtomics = chunkNPAPNZ7L_js.generateAtomics(({ theme }) => { | ||
var stackAtomics = chunkBP7N5YZU_js.generateAtomics(({ theme }) => { | ||
var _a, _b, _c, _d; | ||
@@ -87,3 +87,3 @@ const conditions = {}; | ||
direction = "column" | ||
} = _b, rest = chunkDTOCB3OU_js.__objRest(_b, [ | ||
} = _b, rest = chunkCUKO2AN5_js.__objRest(_b, [ | ||
"children", | ||
@@ -105,6 +105,6 @@ "spacing", | ||
Component, | ||
chunkDTOCB3OU_js.__spreadProps(chunkDTOCB3OU_js.__spreadValues({ | ||
chunkCUKO2AN5_js.__spreadProps(chunkCUKO2AN5_js.__spreadValues({ | ||
ref, | ||
className: clsx__default.default( | ||
chunkJSC45DTX_js.css({ | ||
chunkHCRNIBVK_js.css({ | ||
display: "flex" | ||
@@ -115,3 +115,3 @@ }), | ||
), | ||
style: chunkDTOCB3OU_js.__spreadValues(chunkDTOCB3OU_js.__spreadValues({}, style), stackClasses.style) | ||
style: chunkCUKO2AN5_js.__spreadValues(chunkCUKO2AN5_js.__spreadValues({}, style), stackClasses.style) | ||
}, rest), { | ||
@@ -118,0 +118,0 @@ children: divider ? joinChildren(children, divider) : children |
{ | ||
"name": "@pigment-css/react", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"main": "build/index.js", | ||
@@ -58,3 +58,3 @@ "module": "build/index.mjs", | ||
"@types/prop-types": "^15.7.12", | ||
"@types/react": "^18.2.55", | ||
"@types/react": "^18.3.3", | ||
"@types/stylis": "^4.2.5", | ||
@@ -61,0 +61,0 @@ "chai": "^4.4.1", |
import { Params, TailProcessorParams, Expression } from '@wyw-in-js/processor-utils'; | ||
import { B as BaseProcessor } from './base-processor-C9d_kFM7.js'; | ||
import { B as BaseProcessor } from './base-processor-FyHksda3.js'; | ||
import '@wyw-in-js/shared'; | ||
@@ -4,0 +4,0 @@ |
'use strict'; | ||
var chunkCGVSEX2M_js = require('./chunk-CGVSEX2M.js'); | ||
var chunkBLLQREZQ_js = require('./chunk-BLLQREZQ.js'); | ||
var processorUtils = require('@wyw-in-js/processor-utils'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -14,3 +14,3 @@ * @license MIT | ||
var CreateExtendSxPropProcessor = class extends chunkCGVSEX2M_js.BaseProcessor { | ||
var CreateExtendSxPropProcessor = class extends chunkBLLQREZQ_js.BaseProcessor { | ||
constructor(params, ...args) { | ||
@@ -33,3 +33,3 @@ super([params[0]], ...args); | ||
this.tagSource.imported, | ||
"@pigment-css/react" | ||
this.getImportPath() | ||
); | ||
@@ -36,0 +36,0 @@ this.replacer(t.callExpression(extendSxPropImportIdentifier, []), true); |
import { Params, TailProcessorParams, Expression } from '@wyw-in-js/processor-utils'; | ||
import { B as BaseProcessor } from './base-processor-C9d_kFM7.js'; | ||
import { B as BaseProcessor } from './base-processor-FyHksda3.js'; | ||
import '@wyw-in-js/shared'; | ||
@@ -4,0 +4,0 @@ |
'use strict'; | ||
var chunkNFYVBJPF_js = require('./chunk-NFYVBJPF.js'); | ||
var chunkCGVSEX2M_js = require('./chunk-CGVSEX2M.js'); | ||
var chunkBPKSG7XE_js = require('./chunk-BPKSG7XE.js'); | ||
var chunkBLLQREZQ_js = require('./chunk-BLLQREZQ.js'); | ||
var processorUtils = require('@wyw-in-js/processor-utils'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -15,6 +15,6 @@ * @license MIT | ||
var CreateUseThemePropsProcessor = class extends chunkCGVSEX2M_js.BaseProcessor { | ||
var CreateUseThemePropsProcessor = class extends chunkBLLQREZQ_js.BaseProcessor { | ||
constructor(params, ...args) { | ||
if (params.length > 2) { | ||
throw chunkCGVSEX2M_js.BaseProcessor.SKIP; | ||
throw chunkBLLQREZQ_js.BaseProcessor.SKIP; | ||
} | ||
@@ -47,7 +47,7 @@ processorUtils.validateParams(params, ["callee", "call"], "Invalid use of createUseThemeProps tag."); | ||
this.tagSource.imported, | ||
"@pigment-css/react" | ||
this.getImportPath() | ||
); | ||
let replacement = t.stringLiteral(this.componentName); | ||
if ((_b = (_a = theme == null ? void 0 : theme.components) == null ? void 0 : _a[this.componentName]) == null ? void 0 : _b.defaultProps) { | ||
replacement = chunkNFYVBJPF_js.valueToLiteral(theme.components[this.componentName].defaultProps); | ||
replacement = chunkBPKSG7XE_js.valueToLiteral(theme.components[this.componentName].defaultProps); | ||
} | ||
@@ -54,0 +54,0 @@ this.replacer(t.callExpression(useThemePropsImportIdentifier, [replacement]), true); |
import { Expression } from '@babel/types'; | ||
import { CallParam, TemplateParam, Params, TailProcessorParams, ValueCache } from '@wyw-in-js/processor-utils'; | ||
import { CSSInterpolation } from '@emotion/css'; | ||
import { B as BaseProcessor } from './base-processor-C9d_kFM7.js'; | ||
import { B as BaseProcessor } from './base-processor-FyHksda3.js'; | ||
import { Primitive } from './keyframes.js'; | ||
@@ -6,0 +6,0 @@ import '@wyw-in-js/shared'; |
'use strict'; | ||
var chunkKBBIGICS_js = require('./chunk-KBBIGICS.js'); | ||
var chunkCGVSEX2M_js = require('./chunk-CGVSEX2M.js'); | ||
var chunkXJLFTDCP_js = require('./chunk-XJLFTDCP.js'); | ||
var chunkBLLQREZQ_js = require('./chunk-BLLQREZQ.js'); | ||
var processorUtils = require('@wyw-in-js/processor-utils'); | ||
@@ -14,3 +14,3 @@ var shared = require('@wyw-in-js/shared'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -22,6 +22,6 @@ * @license MIT | ||
var CssProcessor = class extends chunkCGVSEX2M_js.BaseProcessor { | ||
var CssProcessor = class extends chunkBLLQREZQ_js.BaseProcessor { | ||
constructor(params, ...args) { | ||
if (params.length < 2) { | ||
throw chunkCGVSEX2M_js.BaseProcessor.SKIP; | ||
throw chunkBLLQREZQ_js.BaseProcessor.SKIP; | ||
} | ||
@@ -93,4 +93,4 @@ super([params[0]], ...args); | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; | ||
const cssClassName = chunkKBBIGICS_js.css(styleObjOrTaggged, ...args); | ||
const cssText = chunkKBBIGICS_js.cache.registered[cssClassName]; | ||
const cssClassName = chunkXJLFTDCP_js.css(styleObjOrTaggged, ...args); | ||
const cssText = chunkXJLFTDCP_js.cache.registered[cssClassName]; | ||
const rules = { | ||
@@ -97,0 +97,0 @@ [this.asSelector]: { |
import { Expression } from '@babel/types'; | ||
import { Params, TailProcessorParams, ValueCache } from '@wyw-in-js/processor-utils'; | ||
import { ExpressionValue } from '@wyw-in-js/shared'; | ||
import { B as BaseProcessor } from './base-processor-C9d_kFM7.js'; | ||
import { B as BaseProcessor } from './base-processor-FyHksda3.js'; | ||
@@ -6,0 +6,0 @@ type Atomics = { |
'use strict'; | ||
var chunkNFYVBJPF_js = require('./chunk-NFYVBJPF.js'); | ||
var chunkKBBIGICS_js = require('./chunk-KBBIGICS.js'); | ||
var chunkCGVSEX2M_js = require('./chunk-CGVSEX2M.js'); | ||
var chunkBPKSG7XE_js = require('./chunk-BPKSG7XE.js'); | ||
var chunkXJLFTDCP_js = require('./chunk-XJLFTDCP.js'); | ||
var chunkBLLQREZQ_js = require('./chunk-BLLQREZQ.js'); | ||
var processorUtils = require('@wyw-in-js/processor-utils'); | ||
@@ -15,3 +15,3 @@ var shared = require('@wyw-in-js/shared'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -96,7 +96,7 @@ * @license MIT | ||
// src/processors/generateAtomics.ts | ||
var GenerateAtomicsProcessor = class extends chunkCGVSEX2M_js.BaseProcessor { | ||
var GenerateAtomicsProcessor = class extends chunkBLLQREZQ_js.BaseProcessor { | ||
constructor(params, ...args) { | ||
super([params[0]], ...args); | ||
if (params.length <= 1) { | ||
throw chunkCGVSEX2M_js.BaseProcessor.SKIP; | ||
throw chunkBLLQREZQ_js.BaseProcessor.SKIP; | ||
} | ||
@@ -134,4 +134,4 @@ processorUtils.validateParams(params, ["callee", ["call"]], `Invalid use of ${this.tagSource.imported} tag.`); | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; | ||
const emotionClass = chunkKBBIGICS_js.css(cssObject); | ||
const cssText = chunkKBBIGICS_js.cache.registered[emotionClass]; | ||
const emotionClass = chunkXJLFTDCP_js.css(cssObject); | ||
const cssText = chunkXJLFTDCP_js.cache.registered[emotionClass]; | ||
const rules = { | ||
@@ -170,4 +170,4 @@ [`.${className}`]: { | ||
const { astService: t } = this; | ||
const importName = t.addNamedImport("atomics", "@pigment-css/react"); | ||
this.replacer(t.callExpression(importName, [chunkNFYVBJPF_js.valueToLiteral(this.runtimeConfig)]), true); | ||
const importName = t.addNamedImport("atomics", this.getImportPath()); | ||
this.replacer(t.callExpression(importName, [chunkBPKSG7XE_js.valueToLiteral(this.runtimeConfig)]), true); | ||
} | ||
@@ -174,0 +174,0 @@ }; |
import { Expression } from '@babel/types'; | ||
import { CallParam, TemplateParam, Params, TailProcessorParams, ValueCache } from '@wyw-in-js/processor-utils'; | ||
import { CSSInterpolation } from '@emotion/css'; | ||
import { B as BaseProcessor } from './base-processor-C9d_kFM7.js'; | ||
import { B as BaseProcessor } from './base-processor-FyHksda3.js'; | ||
import '@wyw-in-js/shared'; | ||
@@ -6,0 +6,0 @@ |
'use strict'; | ||
var chunkKBBIGICS_js = require('./chunk-KBBIGICS.js'); | ||
var chunkCGVSEX2M_js = require('./chunk-CGVSEX2M.js'); | ||
var chunkXJLFTDCP_js = require('./chunk-XJLFTDCP.js'); | ||
var chunkBLLQREZQ_js = require('./chunk-BLLQREZQ.js'); | ||
var serialize = require('@emotion/serialize'); | ||
@@ -16,3 +16,3 @@ var shared = require('@wyw-in-js/shared'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -50,7 +50,7 @@ * @license MIT | ||
// src/processors/globalCss.ts | ||
var GlobalCssProcessor = class extends chunkCGVSEX2M_js.BaseProcessor { | ||
var GlobalCssProcessor = class extends chunkBLLQREZQ_js.BaseProcessor { | ||
constructor(params, ...args) { | ||
super([params[0]], ...args); | ||
if (params.length < 2) { | ||
throw chunkCGVSEX2M_js.BaseProcessor.SKIP; | ||
throw chunkBLLQREZQ_js.BaseProcessor.SKIP; | ||
} | ||
@@ -122,3 +122,3 @@ processorUtils.validateParams( | ||
args.length > 0 ? [styleObjOrTaggged, ...args] : [styleObjOrTaggged], | ||
chunkKBBIGICS_js.cache.registered | ||
chunkXJLFTDCP_js.cache.registered | ||
); | ||
@@ -125,0 +125,0 @@ const rules = { |
import { Expression } from '@babel/types'; | ||
import { CallParam, TemplateParam, Params, TailProcessorParams, ValueCache } from '@wyw-in-js/processor-utils'; | ||
import { CSSInterpolation } from '@emotion/css'; | ||
import { B as BaseProcessor } from './base-processor-C9d_kFM7.js'; | ||
import { B as BaseProcessor } from './base-processor-FyHksda3.js'; | ||
import '@wyw-in-js/shared'; | ||
@@ -6,0 +6,0 @@ |
'use strict'; | ||
var chunkKBBIGICS_js = require('./chunk-KBBIGICS.js'); | ||
var chunkCGVSEX2M_js = require('./chunk-CGVSEX2M.js'); | ||
var chunkXJLFTDCP_js = require('./chunk-XJLFTDCP.js'); | ||
var chunkBLLQREZQ_js = require('./chunk-BLLQREZQ.js'); | ||
var serialize = require('@emotion/serialize'); | ||
@@ -10,3 +10,3 @@ var shared = require('@wyw-in-js/shared'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -18,7 +18,7 @@ * @license MIT | ||
var KeyframesProcessor = class extends chunkCGVSEX2M_js.BaseProcessor { | ||
var KeyframesProcessor = class extends chunkBLLQREZQ_js.BaseProcessor { | ||
constructor(params, ...args) { | ||
super([params[0]], ...args); | ||
if (params.length < 2) { | ||
throw chunkCGVSEX2M_js.BaseProcessor.SKIP; | ||
throw chunkBLLQREZQ_js.BaseProcessor.SKIP; | ||
} | ||
@@ -90,3 +90,3 @@ processorUtils.validateParams( | ||
args.length > 0 ? [styleObjOrTaggged, ...args] : [styleObjOrTaggged], | ||
chunkKBBIGICS_js.cache.registered | ||
chunkXJLFTDCP_js.cache.registered | ||
); | ||
@@ -93,0 +93,0 @@ const cssText = `@keyframes {${styles}}`; |
import { Identifier, TemplateElement, Expression, SourceLocation } from '@babel/types'; | ||
import { IOptions as IOptions$1, Params, TailProcessorParams, ValueCache } from '@wyw-in-js/processor-utils'; | ||
import { LazyValue, ExpressionValue, ConstValue } from '@wyw-in-js/shared'; | ||
import { B as BaseProcessor } from './base-processor-C9d_kFM7.js'; | ||
import { B as BaseProcessor } from './base-processor-FyHksda3.js'; | ||
@@ -37,2 +37,27 @@ type Theme = Record<string, any>; | ||
}; | ||
/** | ||
* Customize the replacement package name that should be added in-place of | ||
* the actually imported package name, ie, | ||
* | ||
* ```js | ||
* import { styled } from '@pigment-css/react'; | ||
* ``` | ||
* | ||
* will turn into | ||
* | ||
* ```js | ||
* import { styled } from '@mui/material-pigment-css'; | ||
* ``` | ||
* | ||
* if packageMap has this | ||
* | ||
* ```js | ||
* { | ||
* packageMap: { | ||
* '@pigment-css/react': '@mui/material-pigment-css', | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
packageMap?: Record<string, string>; | ||
}; | ||
@@ -39,0 +64,0 @@ |
'use strict'; | ||
var chunk7HGM3EXL_js = require('./chunk-7HGM3EXL.js'); | ||
var chunkNFYVBJPF_js = require('./chunk-NFYVBJPF.js'); | ||
var chunkKBBIGICS_js = require('./chunk-KBBIGICS.js'); | ||
var chunkCGVSEX2M_js = require('./chunk-CGVSEX2M.js'); | ||
var chunk7Y55UNXU_js = require('./chunk-7Y55UNXU.js'); | ||
var chunkBPKSG7XE_js = require('./chunk-BPKSG7XE.js'); | ||
var chunkXJLFTDCP_js = require('./chunk-XJLFTDCP.js'); | ||
var chunkBLLQREZQ_js = require('./chunk-BLLQREZQ.js'); | ||
var parser = require('@babel/parser'); | ||
@@ -12,3 +12,3 @@ var processorUtils = require('@wyw-in-js/processor-utils'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -30,7 +30,7 @@ * @license MIT | ||
// src/processors/styled.ts | ||
var StyledProcessor = class extends chunkCGVSEX2M_js.BaseProcessor { | ||
var StyledProcessor = class extends chunkBLLQREZQ_js.BaseProcessor { | ||
constructor(params, ...args) { | ||
var _a; | ||
if (params.length <= 2) { | ||
throw chunkCGVSEX2M_js.BaseProcessor.SKIP; | ||
throw chunkBLLQREZQ_js.BaseProcessor.SKIP; | ||
} | ||
@@ -163,4 +163,4 @@ super([params[0]], ...args); | ||
}); | ||
const cssClassName = chunkKBBIGICS_js.css(templateStrs, ...templateExpressions); | ||
const cssText = chunkKBBIGICS_js.cache.registered[cssClassName]; | ||
const cssClassName = chunkXJLFTDCP_js.css(templateStrs, ...templateExpressions); | ||
const cssText = chunkXJLFTDCP_js.cache.registered[cssClassName]; | ||
const baseClass = this.getClassName(); | ||
@@ -207,3 +207,3 @@ this.baseClasses.push(baseClass); | ||
const themeImportIdentifier = this.astService.addDefaultImport( | ||
`${"@pigment-css/react"}/theme`, | ||
`${this.getImportPath()}/theme`, | ||
"theme" | ||
@@ -282,3 +282,3 @@ ); | ||
argProperties.push( | ||
t.objectProperty(t.identifier("variants"), chunkNFYVBJPF_js.valueToLiteral(this.collectedVariants)) | ||
t.objectProperty(t.identifier("variants"), chunkBPKSG7XE_js.valueToLiteral(this.collectedVariants)) | ||
); | ||
@@ -293,3 +293,3 @@ } | ||
} | ||
const styledImportIdentifier = t.addNamedImport("styled", "@pigment-css/react"); | ||
const styledImportIdentifier = t.addNamedImport("styled", this.getImportPath()); | ||
const styledCall = t.callExpression( | ||
@@ -385,3 +385,3 @@ styledImportIdentifier, | ||
variantsAccumulator == null ? void 0 : variantsAccumulator.push( | ||
...styleObj.variants.map((variant) => chunkCGVSEX2M_js.__spreadProps(chunkCGVSEX2M_js.__spreadValues({}, variant), { | ||
...styleObj.variants.map((variant) => chunkBLLQREZQ_js.__spreadProps(chunkBLLQREZQ_js.__spreadValues({}, variant), { | ||
originalExpression: styleArg | ||
@@ -392,3 +392,3 @@ })) | ||
delete styleObj.variants; | ||
const res = chunk7HGM3EXL_js.cssFnValueToVariable({ | ||
const res = chunk7Y55UNXU_js.cssFnValueToVariable({ | ||
styleObj, | ||
@@ -405,3 +405,3 @@ expressionValue: styleArg, | ||
} | ||
return chunk7HGM3EXL_js.processCssObject(styleObj, themeArgs); | ||
return chunk7Y55UNXU_js.processCssObject(styleObj, themeArgs); | ||
} | ||
@@ -408,0 +408,0 @@ get asSelector() { |
import { Expression } from '@babel/types'; | ||
import { Params, TailProcessorParams, ValueCache } from '@wyw-in-js/processor-utils'; | ||
import { ExpressionValue } from '@wyw-in-js/shared'; | ||
import { B as BaseProcessor } from './base-processor-C9d_kFM7.js'; | ||
import { B as BaseProcessor } from './base-processor-FyHksda3.js'; | ||
@@ -6,0 +6,0 @@ declare class SxProcessor extends BaseProcessor { |
'use strict'; | ||
var chunk7HGM3EXL_js = require('./chunk-7HGM3EXL.js'); | ||
require('./chunk-KBBIGICS.js'); | ||
var chunkCGVSEX2M_js = require('./chunk-CGVSEX2M.js'); | ||
var chunk7Y55UNXU_js = require('./chunk-7Y55UNXU.js'); | ||
require('./chunk-XJLFTDCP.js'); | ||
var chunkBLLQREZQ_js = require('./chunk-BLLQREZQ.js'); | ||
var processorUtils = require('@wyw-in-js/processor-utils'); | ||
@@ -11,3 +11,3 @@ var shared = require('@wyw-in-js/shared'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -131,3 +131,3 @@ * @license MIT | ||
// src/processors/sx.ts | ||
var SxProcessor = class extends chunkCGVSEX2M_js.BaseProcessor { | ||
var SxProcessor = class extends chunkBLLQREZQ_js.BaseProcessor { | ||
constructor(params, ...args) { | ||
@@ -263,3 +263,3 @@ super([params[0]], ...args); | ||
const styleObj = typeof styleObjOrFn === "function" ? styleObjOrFn(themeArgs == null ? void 0 : themeArgs.theme) : styleObjOrFn; | ||
const res = chunk7HGM3EXL_js.cssFnValueToVariable({ | ||
const res = chunk7Y55UNXU_js.cssFnValueToVariable({ | ||
styleObj, | ||
@@ -274,3 +274,3 @@ expressionValue, | ||
} | ||
return chunk7HGM3EXL_js.processCssObject(styleObj, themeArgs, false); | ||
return chunk7Y55UNXU_js.processCssObject(styleObj, themeArgs, false); | ||
} | ||
@@ -277,0 +277,0 @@ }; |
import { Expression } from '@babel/types'; | ||
import { Params, TailProcessorParams } from '@wyw-in-js/processor-utils'; | ||
import { B as BaseProcessor } from './base-processor-C9d_kFM7.js'; | ||
import { B as BaseProcessor } from './base-processor-FyHksda3.js'; | ||
import '@wyw-in-js/shared'; | ||
@@ -5,0 +5,0 @@ |
'use strict'; | ||
var chunkCGVSEX2M_js = require('./chunk-CGVSEX2M.js'); | ||
var chunkBLLQREZQ_js = require('./chunk-BLLQREZQ.js'); | ||
var processorUtils = require('@wyw-in-js/processor-utils'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -14,7 +14,7 @@ * @license MIT | ||
var UseThemeProcessor = class extends chunkCGVSEX2M_js.BaseProcessor { | ||
var UseThemeProcessor = class extends chunkBLLQREZQ_js.BaseProcessor { | ||
constructor(params, ...args) { | ||
super([params[0]], ...args); | ||
if (params.length === 1) { | ||
throw chunkCGVSEX2M_js.BaseProcessor.SKIP; | ||
throw chunkBLLQREZQ_js.BaseProcessor.SKIP; | ||
} | ||
@@ -56,3 +56,3 @@ processorUtils.validateParams(params, ["callee", ["call"]], `Invalid use of ${this.tagSource.imported} tag.`); | ||
const t = this.astService; | ||
const themeIdentifier = t.addDefaultImport(`${"@pigment-css/react"}/theme`); | ||
const themeIdentifier = t.addDefaultImport(`${this.getImportPath()}/theme`); | ||
this.replacer(themeIdentifier, false); | ||
@@ -59,0 +59,0 @@ } |
@@ -119,2 +119,27 @@ import * as CSS from 'csstype'; | ||
}; | ||
/** | ||
* Customize the replacement package name that should be added in-place of | ||
* the actually imported package name, ie, | ||
* | ||
* ```js | ||
* import { styled } from '@pigment-css/react'; | ||
* ``` | ||
* | ||
* will turn into | ||
* | ||
* ```js | ||
* import { styled } from '@mui/material-pigment-css'; | ||
* ``` | ||
* | ||
* if packageMap has this | ||
* | ||
* ```js | ||
* { | ||
* packageMap: { | ||
* '@pigment-css/react': '@mui/material-pigment-css', | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
packageMap?: Record<string, string>; | ||
}; | ||
@@ -121,0 +146,0 @@ |
'use strict'; | ||
var chunkDTOCB3OU_js = require('./chunk-DTOCB3OU.js'); | ||
var chunkCUKO2AN5_js = require('./chunk-CUKO2AN5.js'); | ||
var stylis$1 = require('stylis'); | ||
@@ -14,3 +14,3 @@ var rtlPlugin = require('stylis-plugin-rtl'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -94,3 +94,3 @@ * @license MIT | ||
defaultColorScheme = "light" | ||
} = _a, otherTheme = chunkDTOCB3OU_js.__objRest(_a, [ | ||
} = _a, otherTheme = chunkCUKO2AN5_js.__objRest(_a, [ | ||
"cssVarPrefix", | ||
@@ -131,3 +131,3 @@ "shouldSkipGeneratingVar", | ||
const { generateThemeVars, generateStyleSheets } = cssVars.prepareCssVars(otherTheme, parserConfig); | ||
const finalTheme = chunkDTOCB3OU_js.__spreadProps(chunkDTOCB3OU_js.__spreadValues({}, theme), { | ||
const finalTheme = chunkCUKO2AN5_js.__spreadProps(chunkCUKO2AN5_js.__spreadValues({}, theme), { | ||
defaultColorScheme, | ||
@@ -134,0 +134,0 @@ vars: generateThemeVars(), |
'use strict'; | ||
require('./chunk-DTOCB3OU.js'); | ||
require('./chunk-CUKO2AN5.js'); | ||
var helperPluginUtils = require('@babel/helper-plugin-utils'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -9,0 +9,0 @@ * @license MIT |
'use strict'; | ||
require('./chunk-DTOCB3OU.js'); | ||
require('./chunk-CUKO2AN5.js'); | ||
var helperModuleImports = require('@babel/helper-module-imports'); | ||
@@ -10,3 +10,3 @@ var helperPluginUtils = require('@babel/helper-plugin-utils'); | ||
/** | ||
* @pigment-css/react v0.0.16 | ||
* @pigment-css/react v0.0.17 | ||
* | ||
@@ -13,0 +13,0 @@ * @license MIT |
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
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
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
749148
8249