@stylix/core 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;ACAA;AAEO,SAAS,0CAAc,KAAU,EAAE,UAAkC,EAAc;IACxF,MAAM,SAAS,CAAC;IAChB,MAAM,QAAQ,CAAC;IAEf,IAAK,MAAM,QAAQ,MACjB,6DAA6D;IAC7D,IAAI,CAAC,0CAAe,SAAU,0CAAY,MAAM,eAAe,0CAAa,KAAK,CAAC,KAAK,GACrF,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;SAE1B,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;IAI7B,OAAO;QAAC;QAAQ;KAAM;AACxB;AAEO,SAAS,yCAAiB,KAAU,EAAE;IAC3C,MAAM,MAAM,CAAA,GAAA,yCAAgB,AAAD;IAC3B,MAAM,CAAC,QAAQ,MAAM,GAAG,0CAAc,OAAO,IAAI,UAAU;IAC3D,OAAO;QAAC;QAAQ;KAAM;AACxB;AAKO,SAAS,0CAAY,IAAY,EAAE,UAAkC,EAAW;IACrF,OAAO,0CAAe,SAAS,0CAAsB,SAAS;AAChE;AAEO,SAAS,0CAAe,KAAa,EAAW;IACrD,iEAAiE;IACjE,OAAO,uBAAuB,IAAI,CAAC;AACrC;AAEO,SAAS,0CAAsB,KAAa,EAAE;IACnD,OAAO,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY;AACjD;AASO,SAAS,0CAAa,KAAU,EAAW;IAChD,OACE,OAAO,UAAU,cACjB,OAAO,UAAU,YACjB,OAAO,UAAU,YACjB,OAAO,UAAU,aACjB,OAAO,UAAU,eACjB,MAAM,OAAO,CAAC,UACd,gIAAgI;IAC/H,OAAO,UAAU,YAAY,MAAM,WAAW,KAAK,UAAU,CAAE,CAAA,cAAc,KAAI;AAEtF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mGAAmG;IACnG,MAAM,MAAM,CAAA,GAAA,gEAAQ,AAAD,CAAC,CAAC,EAAE;IACvB,CAAA,GAAA,wCAAM,AAAD,CAAC,CAAC,IAAI,GAAG,CAAA,GAAA,yCAAM,AAAD,EAAE;AACvB;","sources":["core/src/index.ts","core/src/StylixProvider.tsx","core/src/classifyProps.ts","core/src/css-props.json","core/src/plugins/index.ts","core/src/plugins/cleanStyles.ts","core/src/util/isPlainObject.ts","core/src/plugins/defaultUnits.ts","core/src/util/mapObjectRecursive.ts","core/src/plugins/flattenNestedStyles.ts","core/src/plugins/mediaArrays.ts","core/src/plugins/merge$css.ts","core/src/util/flatten.ts","core/src/plugins/propCasing.ts","core/src/plugins/replace$$class.ts","core/src/plugins/themeFunctions.ts","core/src/plugins/customProps.ts","core/src/util/walkRecursive.ts","core/src/util/cloneDeep.ts","core/src/styleCollector.tsx","core/src/util/merge.ts","core/src/util/useIsoLayoutEffect.ts","core/src/useStyles.ts","core/src/applyRules.ts","core/src/stylesToRuleArray.ts","core/src/util/hashString.ts","core/src/styled.tsx","core/src/Stylix.tsx","core/src/elements.ts","core/src/html-tags.json"],"sourcesContent":["export {\n type StylixProps,\n type StylixPropsExtensions,\n type Stylix$Component,\n type Stylix$elProp,\n type Stylix$elPropOptional,\n type Extends,\n} from './types';\nexport { useStylixContext, useStylixTheme, StylixProvider, StylixTheme } from './StylixProvider';\nimport { StylixPublicContext } from './StylixProvider';\nexport type StylixContext = StylixPublicContext;\nexport { useStyles, useKeyframes, useGlobalStyles } from './useStyles';\nexport {\n defaultPlugins,\n customProps,\n type StylixPlugin,\n type StylixPluginFunctionContext,\n} from './plugins';\nexport { mapObjectRecursive } from './util/mapObjectRecursive';\nexport { walkRecursive } from './util/walkRecursive';\nexport { createStyleCollector, styleCollectorContext, type StyleCollector } from './styleCollector';\nexport { classifyProps, useClassifyProps } from './classifyProps';\nexport { styled } from './styled';\nimport './elements';\nexport { default } from './Stylix';\n","import React, { createContext, useContext, useRef, useState } from 'react';\n\nimport { simplifyStylePropName } from './classifyProps';\nimport cssProps from './css-props.json';\nimport { applyPlugins, defaultPlugins, StylixPlugin } from './plugins';\nimport { styleCollectorContext } from './styleCollector';\nimport { flatten } from './util/flatten';\nimport { merge } from './util/merge';\nimport useIsoLayoutEffect from './util/useIsoLayoutEffect';\n\n/**\n * Stylix context\n *\n * The <StylixProvider> wrapper represents an \"instance\" of Stylix - a configuration, set of plugins, and reference to\n * the <style> element where css is output. All nodes contained within a <StylixProvider> element will share this\n * Stylix instance's configuration.\n *\n * A StylixProvider internally contains a <StylixTheme>, so you can conveniently provide a theme object and media query\n * array with a single element.\n *\n * See the README for more details.\n */\n\n// StylixProvider component props\ntype StylixProviderProps<Theme = any> = StylixThemeProps<Theme> & {\n id?: string;\n devMode?: boolean;\n plugins?: StylixPlugin[] | StylixPlugin[][];\n styleElement?: HTMLStyleElement;\n children: any;\n};\n\ntype StylixThemeProps<Theme = any> = {\n theme?: Theme;\n media?: string[];\n children: any;\n};\n\n// StylixContext object interface\nexport type StylixContext<Theme = any> = {\n id: string;\n devMode: boolean;\n theme: Theme;\n media: string[];\n plugins: StylixPlugin[];\n stylesheet: CSSStyleSheet;\n styleElement: HTMLStyleElement;\n styleCollector?: string[];\n rules: {\n [key: string]: {\n hash: string;\n rules: string[];\n refs: number;\n };\n };\n styleProps: Record<string, string>;\n cleanupRequest?: number;\n requestApply: boolean;\n};\n\nexport type StylixPublicContext = Pick<\n StylixContext,\n 'id' | 'devMode' | 'theme' | 'media' | 'stylesheet' | 'styleElement' | 'styleProps'\n>;\n\nconst defaultStyleProps: Record<string, string> = {};\nfor (const value of cssProps) {\n defaultStyleProps[simplifyStylePropName(value)] = value;\n}\n\nfunction createStylixContext(userValues = {} as Partial<StylixProviderProps>) {\n const ctx = {\n id: userValues.id || Math.round(Math.random() * 10000).toString(10),\n devMode: userValues.devMode,\n styleProps: defaultStyleProps,\n theme: userValues.theme || null,\n media: userValues.media || null,\n styleElement: userValues.styleElement,\n plugins: flatten<StylixPlugin>(Object.values(defaultPlugins)),\n rules: {},\n cleanupRequest: undefined,\n } as StylixContext;\n\n if (!ctx.styleElement && typeof document !== 'undefined') {\n ctx.styleElement = document.createElement('style');\n if (ctx.id) ctx.styleElement.id = 'stylix-' + ctx.id;\n ctx.styleElement.className = 'stylix';\n document.head.appendChild(ctx.styleElement);\n }\n\n if (ctx.styleElement) ctx.stylesheet = ctx.styleElement.sheet as CSSStyleSheet;\n\n if (userValues.plugins?.length) {\n const flatPlugins = flatten<StylixPlugin>(userValues.plugins);\n for (const i in flatPlugins) {\n const plugin = flatPlugins[i];\n let pluginIndex = -1;\n if (plugin.before && ctx.plugins.includes(plugin.before))\n pluginIndex = ctx.plugins.indexOf(plugin.before);\n if (plugin.after && ctx.plugins.includes(plugin.after))\n pluginIndex = ctx.plugins.indexOf(plugin.after) + 1;\n if (plugin.atIndex !== undefined) pluginIndex = plugin.atIndex;\n if (pluginIndex === -1) ctx.plugins.push(plugin);\n else ctx.plugins.splice(pluginIndex, 0, plugin);\n }\n }\n applyPlugins('initialize', null, null, ctx);\n\n return ctx;\n}\n\n// The React context object\nconst stylixContext = createContext(createStylixContext());\n\n// Convenience wrapper hook that returns the current Stylix context\nexport function useStylixContext<Theme = any>(): StylixContext<Theme> {\n return useContext(stylixContext);\n}\n\n// Convenience wrapper hook that returns just the current Stylix theme\nexport function useStylixTheme<Theme = any>(): Theme {\n return useContext(stylixContext).theme;\n}\n\nexport function StylixProvider({\n id,\n devMode,\n plugins,\n styleElement,\n children,\n ...themeProps\n}: StylixProviderProps): React.ReactElement {\n const ctx = useRef<StylixContext>();\n if (!ctx.current) ctx.current = createStylixContext({ id, devMode, plugins, styleElement });\n\n ctx.current.styleCollector = useContext(styleCollectorContext);\n\n return (\n <stylixContext.Provider value={ctx.current}>\n <StylixTheme {...themeProps}>{children}</StylixTheme>\n </stylixContext.Provider>\n );\n}\n\nfunction mergeContexts(contextA: any, contextB: any) {\n const obj = { ...contextA };\n const themeB = contextB.theme;\n if (contextB) {\n for (const key in contextB) {\n const value = contextB[key];\n if (typeof value !== 'undefined') obj[key] = value;\n }\n }\n obj.theme = merge(contextA.theme || {}, themeB);\n return obj;\n}\n\nexport function StylixTheme({ children, media, theme }: StylixThemeProps) {\n const parentCtx = useContext(stylixContext);\n const [contextValue, setContextValue] = useState(() =>\n mergeContexts(parentCtx, { media, theme }),\n );\n\n // contextValue should only update (and cause re-renders) when relevant properties change.\n // `media` is treated as special because providing an array of strings is easier to do inline,\n // but we don't want to cause descendent re-renders if the values don't change.\n\n useIsoLayoutEffect(\n () => {\n setContextValue(mergeContexts(parentCtx, { media, theme }));\n },\n [parentCtx, media?.join('|') || '', theme],\n false,\n );\n\n return <stylixContext.Provider value={contextValue}>{children}</stylixContext.Provider>;\n}\n","import { useStylixContext } from './StylixProvider';\n\nexport function classifyProps(props: any, knownProps: Record<string, string>): [any, any] {\n const styles = {} as any;\n const other = {} as any;\n\n for (const prop in props) {\n // If prop is not a valid JSX prop, it must be a CSS selector\n if (!isValidJSXProp(prop) || (isStyleProp(prop, knownProps) && isStyleValue(props[prop]))) {\n styles[prop] = props[prop];\n } else {\n other[prop] = props[prop];\n }\n }\n\n return [styles, other];\n}\n\nexport function useClassifyProps(props: any) {\n const ctx = useStylixContext();\n const [styles, other] = classifyProps(props, ctx.styleProps);\n return [styles, other];\n}\n\n/**\n * Determines if `value` is a recognized CSS property (can be standard CSS or custom Stylix prop).\n */\nexport function isStyleProp(prop: string, knownProps: Record<string, string>): boolean {\n return isValidJSXProp(prop) && simplifyStylePropName(prop) in knownProps;\n}\n\nexport function isValidJSXProp(value: string): boolean {\n // Not an exact check, but mostly rules out complex css selectors\n return /^[a-z$][a-z0-9_-]*$/i.test(value);\n}\n\nexport function simplifyStylePropName(value: string) {\n return value.toLowerCase().replace(/[^a-z]/gi, '');\n}\n\n/**\n * Tries to determine if `value` is likely to be a valid CSS property value.\n * We can't be 100% sure, but this should catch most cases.\n * There is a check here to make sure React elements do not pass the test, as this\n * has turned out to be a common case where a property like 'content' means something\n * to a component, but is also a valid CSS property.\n */\nexport function isStyleValue(value: any): boolean {\n return (\n typeof value === 'function' ||\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n Array.isArray(value) ||\n // Check for plain objects, and make sure it doesn't have the $$typeof property (react elements are never valid as style values)\n (typeof value === 'object' && value.constructor === Object && !('$$typeof' in value))\n );\n}\n","[\n \"align-content\",\n \"align-items\",\n \"align-self\",\n \"align-tracks\",\n \"all\",\n \"animation\",\n \"animation-delay\",\n \"animation-direction\",\n \"animation-duration\",\n \"animation-fill-mode\",\n \"animation-iteration-count\",\n \"animation-name\",\n \"animation-play-state\",\n \"animation-timing-function\",\n \"appearance\",\n \"aspect-ratio\",\n \"azimuth\",\n \"backdrop-filter\",\n \"backface-visibility\",\n \"background\",\n \"background-attachment\",\n \"background-blend-mode\",\n \"background-clip\",\n \"background-color\",\n \"background-image\",\n \"background-origin\",\n \"background-position\",\n \"background-position-x\",\n \"background-position-y\",\n \"background-repeat\",\n \"background-size\",\n \"block-overflow\",\n \"block-size\",\n \"border\",\n \"border-block\",\n \"border-block-color\",\n \"border-block-style\",\n \"border-block-width\",\n \"border-block-end\",\n \"border-block-end-color\",\n \"border-block-end-style\",\n \"border-block-end-width\",\n \"border-block-start\",\n \"border-block-start-color\",\n \"border-block-start-style\",\n \"border-block-start-width\",\n \"border-bottom\",\n \"border-bottom-color\",\n \"border-bottom-left-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-style\",\n \"border-bottom-width\",\n \"border-collapse\",\n \"border-color\",\n \"border-end-end-radius\",\n \"border-end-start-radius\",\n \"border-image\",\n \"border-image-outset\",\n \"border-image-repeat\",\n \"border-image-slice\",\n \"border-image-source\",\n \"border-image-width\",\n \"border-inline\",\n \"border-inline-end\",\n \"border-inline-color\",\n \"border-inline-style\",\n \"border-inline-width\",\n \"border-inline-end-color\",\n \"border-inline-end-style\",\n \"border-inline-end-width\",\n \"border-inline-start\",\n \"border-inline-start-color\",\n \"border-inline-start-style\",\n \"border-inline-start-width\",\n \"border-left\",\n \"border-left-color\",\n \"border-left-style\",\n \"border-left-width\",\n \"border-radius\",\n \"border-right\",\n \"border-right-color\",\n \"border-right-style\",\n \"border-right-width\",\n \"border-spacing\",\n \"border-start-end-radius\",\n \"border-start-start-radius\",\n \"border-style\",\n \"border-top\",\n \"border-top-color\",\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-top-style\",\n \"border-top-width\",\n \"border-width\",\n \"bottom\",\n \"box-align\",\n \"box-decoration-break\",\n \"box-direction\",\n \"box-flex\",\n \"box-flex-group\",\n \"box-lines\",\n \"box-ordinal-group\",\n \"box-orient\",\n \"box-pack\",\n \"box-shadow\",\n \"box-sizing\",\n \"break-after\",\n \"break-before\",\n \"break-inside\",\n \"caption-side\",\n \"caret-color\",\n \"clear\",\n \"clip\",\n \"clip-path\",\n \"color\",\n \"color-adjust\",\n \"color-scheme\",\n \"column-count\",\n \"column-fill\",\n \"column-gap\",\n \"column-rule\",\n \"column-rule-color\",\n \"column-rule-style\",\n \"column-rule-width\",\n \"column-span\",\n \"column-width\",\n \"columns\",\n \"contain\",\n \"content\",\n \"content-visibility\",\n \"counter-increment\",\n \"counter-reset\",\n \"counter-set\",\n \"cursor\",\n \"direction\",\n \"display\",\n \"empty-cells\",\n \"filter\",\n \"flex\",\n \"flex-basis\",\n \"flex-direction\",\n \"flex-flow\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"float\",\n \"font\",\n \"font-family\",\n \"font-feature-settings\",\n \"font-kerning\",\n \"font-language-override\",\n \"font-optical-sizing\",\n \"font-variation-settings\",\n \"font-size\",\n \"font-size-adjust\",\n \"font-smooth\",\n \"font-stretch\",\n \"font-style\",\n \"font-synthesis\",\n \"font-variant\",\n \"font-variant-alternates\",\n \"font-variant-caps\",\n \"font-variant-east-asian\",\n \"font-variant-ligatures\",\n \"font-variant-numeric\",\n \"font-variant-position\",\n \"font-weight\",\n \"forced-color-adjust\",\n \"gap\",\n \"grid\",\n \"grid-area\",\n \"grid-auto-columns\",\n \"grid-auto-flow\",\n \"grid-auto-rows\",\n \"grid-column\",\n \"grid-column-end\",\n \"grid-column-gap\",\n \"grid-column-start\",\n \"grid-gap\",\n \"grid-row\",\n \"grid-row-end\",\n \"grid-row-gap\",\n \"grid-row-start\",\n \"grid-template\",\n \"grid-template-areas\",\n \"grid-template-columns\",\n \"grid-template-rows\",\n \"hanging-punctuation\",\n \"height\",\n \"hyphens\",\n \"image-orientation\",\n \"image-rendering\",\n \"image-resolution\",\n \"ime-mode\",\n \"initial-letter\",\n \"initial-letter-align\",\n \"inline-size\",\n \"inset\",\n \"inset-block\",\n \"inset-block-end\",\n \"inset-block-start\",\n \"inset-inline\",\n \"inset-inline-end\",\n \"inset-inline-start\",\n \"isolation\",\n \"justify-content\",\n \"justify-items\",\n \"justify-self\",\n \"justify-tracks\",\n \"left\",\n \"letter-spacing\",\n \"line-break\",\n \"line-clamp\",\n \"line-height\",\n \"line-height-step\",\n \"list-style\",\n \"list-style-image\",\n \"list-style-position\",\n \"list-style-type\",\n \"margin\",\n \"margin-block\",\n \"margin-block-end\",\n \"margin-block-start\",\n \"margin-bottom\",\n \"margin-inline\",\n \"margin-inline-end\",\n \"margin-inline-start\",\n \"margin-left\",\n \"margin-right\",\n \"margin-top\",\n \"margin-trim\",\n \"mask\",\n \"mask-border\",\n \"mask-border-mode\",\n \"mask-border-outset\",\n \"mask-border-repeat\",\n \"mask-border-slice\",\n \"mask-border-source\",\n \"mask-border-width\",\n \"mask-clip\",\n \"mask-composite\",\n \"mask-image\",\n \"mask-mode\",\n \"mask-origin\",\n \"mask-position\",\n \"mask-repeat\",\n \"mask-size\",\n \"mask-type\",\n \"masonry-auto-flow\",\n \"math-style\",\n \"max-block-size\",\n \"max-height\",\n \"max-inline-size\",\n \"max-lines\",\n \"max-width\",\n \"min-block-size\",\n \"min-height\",\n \"min-inline-size\",\n \"min-width\",\n \"mix-blend-mode\",\n \"object-fit\",\n \"object-position\",\n \"offset\",\n \"offset-anchor\",\n \"offset-distance\",\n \"offset-path\",\n \"offset-position\",\n \"offset-rotate\",\n \"opacity\",\n \"order\",\n \"orphans\",\n \"outline\",\n \"outline-color\",\n \"outline-offset\",\n \"outline-style\",\n \"outline-width\",\n \"overflow\",\n \"overflow-anchor\",\n \"overflow-block\",\n \"overflow-clip-box\",\n \"overflow-clip-margin\",\n \"overflow-inline\",\n \"overflow-wrap\",\n \"overflow-x\",\n \"overflow-y\",\n \"overscroll-behavior\",\n \"overscroll-behavior-block\",\n \"overscroll-behavior-inline\",\n \"overscroll-behavior-x\",\n \"overscroll-behavior-y\",\n \"padding\",\n \"padding-block\",\n \"padding-block-end\",\n \"padding-block-start\",\n \"padding-bottom\",\n \"padding-inline\",\n \"padding-inline-end\",\n \"padding-inline-start\",\n \"padding-left\",\n \"padding-right\",\n \"padding-top\",\n \"page-break-after\",\n \"page-break-before\",\n \"page-break-inside\",\n \"paint-order\",\n \"perspective\",\n \"perspective-origin\",\n \"place-content\",\n \"place-items\",\n \"place-self\",\n \"pointer-events\",\n \"position\",\n \"quotes\",\n \"resize\",\n \"right\",\n \"rotate\",\n \"row-gap\",\n \"ruby-align\",\n \"ruby-merge\",\n \"ruby-position\",\n \"scale\",\n \"scrollbar-color\",\n \"scrollbar-gutter\",\n \"scrollbar-width\",\n \"scroll-behavior\",\n \"scroll-margin\",\n \"scroll-margin-block\",\n \"scroll-margin-block-start\",\n \"scroll-margin-block-end\",\n \"scroll-margin-bottom\",\n \"scroll-margin-inline\",\n \"scroll-margin-inline-start\",\n \"scroll-margin-inline-end\",\n \"scroll-margin-left\",\n \"scroll-margin-right\",\n \"scroll-margin-top\",\n \"scroll-padding\",\n \"scroll-padding-block\",\n \"scroll-padding-block-start\",\n \"scroll-padding-block-end\",\n \"scroll-padding-bottom\",\n \"scroll-padding-inline\",\n \"scroll-padding-inline-start\",\n \"scroll-padding-inline-end\",\n \"scroll-padding-left\",\n \"scroll-padding-right\",\n \"scroll-padding-top\",\n \"scroll-snap-align\",\n \"scroll-snap-coordinate\",\n \"scroll-snap-destination\",\n \"scroll-snap-points-x\",\n \"scroll-snap-points-y\",\n \"scroll-snap-stop\",\n \"scroll-snap-type\",\n \"scroll-snap-type-x\",\n \"scroll-snap-type-y\",\n \"shape-image-threshold\",\n \"shape-margin\",\n \"shape-outside\",\n \"tab-size\",\n \"table-layout\",\n \"text-align\",\n \"text-align-last\",\n \"text-combine-upright\",\n \"text-decoration\",\n \"text-decoration-color\",\n \"text-decoration-line\",\n \"text-decoration-skip\",\n \"text-decoration-skip-ink\",\n \"text-decoration-style\",\n \"text-decoration-thickness\",\n \"text-emphasis\",\n \"text-emphasis-color\",\n \"text-emphasis-position\",\n \"text-emphasis-style\",\n \"text-indent\",\n \"text-justify\",\n \"text-orientation\",\n \"text-overflow\",\n \"text-rendering\",\n \"text-shadow\",\n \"text-size-adjust\",\n \"text-transform\",\n \"text-underline-offset\",\n \"text-underline-position\",\n \"top\",\n \"touch-action\",\n \"transform\",\n \"transform-box\",\n \"transform-origin\",\n \"transform-style\",\n \"transition\",\n \"transition-delay\",\n \"transition-duration\",\n \"transition-property\",\n \"transition-timing-function\",\n \"translate\",\n \"unicode-bidi\",\n \"user-select\",\n \"vertical-align\",\n \"visibility\",\n \"white-space\",\n \"widows\",\n \"width\",\n \"will-change\",\n \"word-break\",\n \"word-spacing\",\n \"word-wrap\",\n \"writing-mode\",\n \"z-index\",\n \"zoom\"\n]\n","import { StylixContext, StylixPublicContext } from '../StylixProvider';\nimport { cleanStyles } from './cleanStyles';\nimport { defaultPixelUnits } from './defaultUnits';\nimport { flattenNestedStyles } from './flattenNestedStyles';\nimport { mediaArrays } from './mediaArrays';\nimport { merge$css } from './merge$css';\nimport { propCasing } from './propCasing';\nimport { replace$$class } from './replace$$class';\nimport { themeFunctions } from './themeFunctions';\n\n/**\n * Stylix plugin function context object\n */\nexport type StylixPluginFunctionContext = StylixPublicContext & { hash: string | null };\n\n/**\n * Stylix plugin interface\n */\nexport interface StylixPlugin {\n name: string;\n type: 'initialize' | 'processStyles' | 'preprocessStyles';\n plugin(ctx: StylixPluginFunctionContext, styles: any): any;\n before?: StylixPlugin;\n after?: StylixPlugin;\n atIndex?: number;\n}\n\nexport function applyPlugins(\n type: StylixPlugin['type'],\n styles: any,\n hash: string | null,\n context: StylixContext,\n) {\n const pluginContext = {\n id: context.id,\n devMode: context.devMode,\n theme: context.theme,\n media: context.media,\n stylesheet: context.stylesheet,\n styleElement: context.styleElement,\n styleProps: context.styleProps,\n hash,\n };\n\n let processedStyles = styles;\n for (const i in context.plugins) {\n const plugin = context.plugins[i];\n if (plugin.type === type) processedStyles = plugin.plugin(pluginContext, processedStyles);\n }\n return processedStyles;\n}\n\nexport { customProps } from './customProps';\n\nexport const defaultPlugins = {\n themeFunctions,\n merge$css,\n mediaArrays,\n propCasing,\n flattenNestedStyles,\n replace$$class,\n defaultPixelUnits,\n cleanStyles,\n};\n","import { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\nfunction cleanObject(object: any): any {\n for (const key in object) {\n const value = object[key];\n if (value === null || value === undefined || value === '') delete object[key];\n else if (isPlainObject(value) || Array.isArray(value)) {\n cleanObject(value);\n if (!Object.keys(value).length) delete object[key];\n }\n }\n return object;\n}\n\n/**\n * Fixes casing and hyphenation on known style props\n */\nexport const cleanStyles: StylixPlugin = {\n name: 'cleanStyles',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return cleanObject(styles);\n },\n};\n","/**\n * Indicates that an object is most likely just an object literal.\n */\nexport function isPlainObject(obj: any): obj is Record<string, any> {\n return typeof obj === 'object' && obj?.constructor === Object;\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin } from './index';\n\nexport const defaultIgnoreUnits = [\n 'columns',\n 'column-count',\n 'fill-opacity',\n 'flex',\n 'flex-grow',\n 'flex-shrink',\n 'font-weight',\n 'line-height',\n 'opacity',\n 'orphans',\n 'stroke-opacity',\n 'widows',\n 'z-index',\n 'zoom',\n 'order',\n];\n\n/**\n * Adds unit (px, em, etc) to numeric values for any style properties not included in `ignoreProps`..\n */\nexport const defaultUnits = (unit = 'px', ignoreProps = defaultIgnoreUnits): StylixPlugin => {\n return {\n name: 'defaultUnits',\n type: 'processStyles',\n plugin(ctx, styles: any) {\n return mapObjectRecursive(styles, defaultUnitsMap, { unit, ignoreProps });\n },\n };\n};\n\nconst defaultUnitsMap = (key: string | number, value: any, object :any, ctx:any) => {\n if (typeof value === 'number' && !ctx.ignoreProps.includes(key as string)) {\n return { [key]: String(value) + ctx.unit };\n }\n};\n\nexport const defaultPixelUnits = defaultUnits();\n","import { isPlainObject } from './isPlainObject';\n\n/**\n * Invokes `map` on each key/value pair in `object`. The key/value pair is deleted from the object and replaced by\n * merging in the object returned from `map`. Recursively descends into all object and array values.\n * The `map` function will receive the key, the value, the current object being mapped, and a context object.\n * The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to\n * `map` on child properties of `value`.\n */\nexport function mapObjectRecursive(\n object: any,\n map: (\n key: string | number,\n value: any,\n object: any,\n context: any,\n ) => Record<string | number, any> | undefined,\n context: any = {},\n) {\n const clone: any = Array.isArray(object) ? [] : {};\n\n for (const k of Object.keys(object)) {\n let key: string | number = k;\n const value = object[key];\n\n if (Array.isArray(object)) key = +key;\n const contextClone = { ...context };\n let result = map(key, value, object, contextClone);\n if (typeof result !== 'undefined' && typeof result !== 'object' && !Array.isArray(result))\n throw new Error(\n 'mapObjectRecursive: return value of map function must be undefined, object, or array!',\n );\n if (typeof result === 'undefined') {\n result = { [key]: value };\n }\n for (const kk in result) {\n let value = result[kk];\n if (isPlainObject(value) || Array.isArray(value))\n value = mapObjectRecursive(value, map, contextClone);\n if (typeof value !== 'undefined') clone[kk] = value;\n }\n }\n\n return clone;\n}\n","import { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\nfunction flatten(styles: any, parent: any, selector: string, root: any, mediaRoot: any) {\n for (let key in styles) {\n const value = styles[key];\n if (key.startsWith('@media')) {\n // Flatten media queries, but nest them under the root object\n root[key] = root[key] || {};\n flatten(value, root[key], selector, root, root[key]);\n } else if (key.startsWith('@keyframes')) {\n // Add keyframe rules as-is directly to mediaRoot object\n mediaRoot[key] = value;\n } else if (isPlainObject(styles[key])) {\n // Concatenate or replace & in selectors and then continue flattening styles\n if (key.includes('&')) {\n key = key.replace(/&/g, selector);\n } else {\n key = (selector + ' ' + key).trim();\n }\n parent[key] = parent[key] || {};\n flatten(value, parent, key, root, mediaRoot);\n } else {\n // Selector is just a css property\n parent[selector] = parent[selector] || {};\n parent[selector][key] = styles[key];\n }\n }\n}\n\n/**\n * Flattens nested style objects that use `&` to reference parent class.\n */\nexport const flattenNestedStyles: StylixPlugin = {\n name: 'flattenNestedStyles',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n const flattened = {};\n flatten(styles, flattened, '', flattened, flattened);\n return flattened;\n },\n};\n","import { isPlainObject } from '../util/isPlainObject';\nimport { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Expands arrays as media queries.\n */\nexport const mediaArrays: StylixPlugin = {\n name: 'mediaArrays',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n // Fill out ditto values\n styles = mapObjectRecursive(styles, mapDittoValues);\n const mediaStyles: any = {};\n let nonMediaStyles = styles;\n for (const i in ctx.media) {\n const mediaQuery = ctx.media[i];\n if (!mediaQuery) {\n nonMediaStyles = mapObjectRecursive(styles, mapNonMedia, { i });\n } else {\n mediaStyles[`@media ${mediaQuery}`] = mapObjectRecursive(styles, mapMediaStyles, { i });\n }\n }\n return { ...nonMediaStyles, ...mediaStyles };\n },\n};\n\nfunction mapDittoValues(key: string | number, value: any) {\n if (Array.isArray(value)) {\n for (const i in value) {\n const v = value[i];\n if (v === '@') value[i] = value[+i - 1];\n }\n return { [key]: value };\n }\n}\n\nfunction mapNonMedia(key: string| number, value: any, object: any, context: any) {\n if (Array.isArray(value)) {\n return { [key]: value[context.i] };\n }\n}\n\nfunction mapMediaStyles(key: string | number, value: any, object: any, context: any) {\n if (typeof key === 'number') return; // Not possible, but here for TS\n if (key.startsWith('@keyframes')) context.keyframes = true;\n if (Array.isArray(value)) {\n return { [key]: value[context.i] };\n }\n if (isPlainObject(value) || context.keyframes) {\n return;\n }\n // delete key/value pair if primitive\n return { [key]: undefined };\n}\n","import { flatten } from '../util/flatten';\nimport { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Merges $css property into parent styles\n */\nexport const merge$css: StylixPlugin = {\n name: 'merge$css',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n const result = {};\n _merge$css(styles, result);\n return result;\n },\n};\n\nexport function _merge$css(obj: any, ctx: any) {\n if (!isPlainObject(obj)) return;\n for (const key in obj) {\n if (key === '$css') {\n const $css = obj[key];\n if (Array.isArray($css)) {\n const flat$css = flatten($css);\n for (const val of flat$css) {\n _merge$css(val, ctx);\n }\n } else {\n _merge$css($css, ctx);\n }\n } else {\n let value = obj[key];\n if (isPlainObject(value)) {\n value = ctx[key] || {};\n _merge$css(obj[key], value);\n }\n ctx[key] = value;\n }\n }\n}\n","/**\n * Flatten an array recursively.\n */\nexport function flatten<TEntryType>(array: unknown[]): TEntryType[] {\n const result: unknown[] = [];\n _flatten(array, result);\n return result as TEntryType[];\n}\n\nfunction _flatten(array: unknown[], result: unknown[]): void {\n for (let i = 0; i < array.length; i++) {\n const value = array[i];\n Array.isArray(value) ? _flatten(value as any, result) : result.push(value);\n }\n}\n","import { simplifyStylePropName } from '../classifyProps';\nimport { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Fixes casing and hyphenation on known style props\n */\nexport const propCasing: StylixPlugin = {\n name: 'normalizeStyleProps',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, propCasingMap, { ctx });\n },\n};\n\nfunction propCasingMap(key: string | number, value: any, object: any, context: any) {\n if (typeof key === 'string' && context.ctx.styleProps[simplifyStylePropName(key)]) {\n return { [context.ctx.styleProps[simplifyStylePropName(key)]]: value };\n }\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Replaces $$class with hash in string values\n */\nexport const replace$$class: StylixPlugin = {\n name: 'replace$$class',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, replace$$classMap, { ctx });\n },\n};\n\nfunction replace$$classMap(key: string | number, value: any, object: any, context: any) {\n value = typeof value === 'string' ? value.replace('$$class', context.ctx.hash) : value;\n key = typeof key === 'string' ? key.replace('$$class', context.ctx.hash) : key;\n return { [key]: value };\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Evaluates functions in style objects, providing the theme and media from the current Stylix context.\n */\nexport const themeFunctions: StylixPlugin = {\n name: 'themeFunctions',\n type: 'preprocessStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, themeFunctionsMap, { ctx });\n },\n};\n\nfunction themeFunctionsMap(key: string | number, value: any, object: any, context: any) {\n if (typeof value === 'function') {\n return { [key]: value(context.ctx.theme, context.ctx) };\n }\n}\n","import { isValidJSXProp, simplifyStylePropName } from '../classifyProps';\nimport { isPlainObject } from '../util/isPlainObject';\nimport { walkRecursive } from '../util/walkRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\nimport { mediaArrays } from './mediaArrays';\n\nexport const customProps = (customProps: Record<string, any>): StylixPlugin[] => {\n for (const key in customProps) {\n customProps[simplifyStylePropName(key)] = customProps[key];\n }\n\n return [\n {\n name: 'customPropsInit',\n type: 'initialize',\n plugin(ctx: StylixPluginFunctionContext) {\n for (const key in customProps) {\n ctx.styleProps[simplifyStylePropName(key)] = key;\n }\n },\n },\n {\n name: 'customPropsProcess',\n type: 'processStyles',\n before: mediaArrays,\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return walkRecursive(styles, (key, value, object) => {\n if (!isValidJSXProp(key) || isPlainObject(value)) return;\n\n const simpleKey = simplifyStylePropName(key);\n const propValue = customProps[simpleKey];\n if (!propValue) return;\n\n const objectClone = { ...object };\n const keys = Object.keys(object);\n const afterKeys = keys.slice(keys.indexOf(key) + 1);\n\n const newStyles: any = {};\n if (typeof propValue === 'object') {\n if (value) Object.assign(newStyles, propValue);\n } else if (typeof propValue === 'string') {\n newStyles[propValue] = value;\n } else if (typeof propValue === 'function') {\n Object.assign(newStyles, propValue(value));\n }\n delete object[key];\n Object.assign(object, newStyles);\n for (const k of afterKeys) {\n const val = objectClone[k];\n delete object[k];\n object[k] = val;\n }\n });\n },\n },\n ];\n};\n","import { cloneDeep } from './cloneDeep';\nimport { isPlainObject } from './isPlainObject';\n\n/**\n * Invokes a callback for each key/value pair in `object`, and continues recursively on each value that is an array or a\n * plain object. Returns `object`.\n * The `cb` function will receive the key, the value, the current object being mapped, and a context object.\n * The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to\n * `map` on child properties of `value`.\n */\nexport function walkRecursive<T extends Record<string, any> = any>(\n object: T,\n cb: (key: string, value: any, currentObject: any, context: any) => void,\n context?: any,\n): T {\n const keys = Object.keys(object);\n for (const key of keys) {\n const value = object[key];\n cb(key, value, object, context);\n if (Array.isArray(value) || isPlainObject(value)) {\n const contextClone = cloneDeep(context);\n walkRecursive(value, cb, contextClone);\n }\n }\n return object;\n}\n","import { isPlainObject } from './isPlainObject';\n\n/**\n * Deeply clones a value.\n */\nexport function cloneDeep<T>(value: T): T {\n if (!value || typeof value !== 'object') return value;\n if (Array.isArray(value)) {\n const clone: any = [];\n for (let index = 0; index < value.length; ++index) {\n clone.push(cloneDeep(value[index]));\n }\n return clone;\n }\n if (isPlainObject(value)) {\n const clone: any = {};\n for (const key in value) {\n clone[key] = cloneDeep(value[key]);\n }\n return clone;\n }\n return value;\n}\n","import React, { createContext } from 'react';\n\nexport interface StyleCollector {\n collect: (element: React.ReactElement) => React.ReactElement;\n render: React.FC<React.ComponentProps<'style'>>;\n styles: string[];\n}\n\nexport const styleCollectorContext = createContext<string[]>(null);\n\nexport function createStyleCollector() {\n const styles: string[] = [];\n const collector: StyleCollector = {\n collect: (element) => (\n <styleCollectorContext.Provider value={styles}>{element}</styleCollectorContext.Provider>\n ),\n render: (props: React.ComponentProps<'style'>) => (\n <style\n type=\"text/css\"\n key={props.id || 'stylix'}\n {...props}\n dangerouslySetInnerHTML={{ __html: collector.styles.join(' ') }}\n />\n ),\n styles,\n };\n collector.render.displayName = 'StylixStyleCollectorRenderer';\n return collector;\n}\n","import { isPlainObject } from './isPlainObject';\n\nexport function merge<A>(a?: A): A;\nexport function merge<A, B>(a: A, b: B): A & B;\nexport function merge<A, B, C>(a: A, b: B, c: C): A & B & C;\nexport function merge<A, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;\nexport function merge<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E;\n\nexport function merge(...items: unknown[]) {\n items = items.filter((item) => typeof item !== 'undefined' && item !== null);\n if (!items?.length) return undefined;\n\n if (items.length === 1) return items[0];\n\n // If items are not all objects/arrays, return the last object/array if possible, otherwise last non-undefined value\n if (!items.every((item) => Array.isArray(item) || isPlainObject(item))) {\n items.reverse();\n return (\n items.find((item) => Array.isArray(item) || isPlainObject(item)) ||\n items.find((item) => typeof item !== 'undefined')\n );\n }\n\n const merged: any = Array.isArray(items[0]) ? [] : {};\n for (const item of items) {\n if (!Array.isArray(item) && !isPlainObject(item)) return merged;\n\n const keys: any[] = [...Object.keys(item), ...Object.getOwnPropertySymbols(item)];\n for (const key of keys) {\n const result = merge(merged[key], item[key]);\n if (typeof result !== 'undefined') merged[key] = result;\n }\n }\n return merged;\n}\n","import { useLayoutEffect } from 'react';\n\nconst useIsoLayoutEffect =\n typeof window !== 'undefined' && 'document' in window\n ? (fn: () => void | (() => void), deps?: unknown[], _runOnSsr?: boolean) => useLayoutEffect(fn, deps)\n : (fn: () => void | (() => void), _deps?: unknown[], runOnSsr?: boolean) => (runOnSsr ? fn() : null);\n\nexport default useIsoLayoutEffect;\n","import { useRef } from 'react';\n\nimport applyRules from './applyRules';\nimport { applyPlugins } from './plugins';\nimport stylesToRuleArray from './stylesToRuleArray';\nimport { StylixContext, useStylixContext } from './StylixProvider';\nimport { StylixStyles } from './types';\nimport { hashString } from './util/hashString';\nimport useIsoLayoutEffect from './util/useIsoLayoutEffect';\n\nfunction cleanup(ctx: StylixContext): void {\n if (typeof ctx.cleanupRequest !== 'undefined') return;\n\n ctx.cleanupRequest = setTimeout(() => {\n let deleted = false;\n\n for (const i in ctx.rules) {\n const rule = ctx.rules[i];\n if (!rule.refs) {\n delete ctx.rules[rule.hash];\n deleted = true;\n }\n }\n deleted && applyRules(ctx);\n\n delete ctx.cleanupRequest;\n }, 100) as any;\n}\n\nfunction compare(a: any, b: any): any {\n if (a === b) return true;\n if (typeof a !== typeof b) return false;\n if (typeof a === 'object') {\n if (Array.isArray(a) && Array.isArray(b) && a.length !== b.length) return false;\n else if (Object.keys(a).length !== Object.keys(b).length) return false;\n for (const key in b) {\n if (!compare(a[key], b[key])) return false;\n }\n }\n return a === b;\n}\n\n/**\n * Accepts a Stylix CSS object and returns a unique className based on the styles' hash.\n * The styles are registered with the Stylix context and will be applied to the document.\n * If `global` is false, provided styles will be nested within the generated classname.\n * Returns the className hash if enabled, or an empty string.\n */\nexport function useStyles(\n styles: Record<string, any>,\n options: { global?: boolean; disabled?: boolean } = { global: false, disabled: false },\n): string {\n const stylixCtx = useStylixContext();\n\n const prevRef = useRef({ styles: {}, hash: '' } as any);\n\n const changed = !compare(styles, prevRef.current.styles);\n\n prevRef.current.styles = styles;\n\n if (changed) {\n // Preprocess styles with plugins\n if (!options.disabled && styles)\n styles = applyPlugins('preprocessStyles', styles, null, stylixCtx);\n\n // Serialize value and generate hash\n const json = !options.disabled && styles && JSON.stringify(styles);\n prevRef.current.hash =\n json && json !== '{}' && json !== '[]'\n ? hashString(JSON.stringify(stylixCtx.media || []) + json)\n : '';\n }\n\n const { hash } = prevRef.current;\n\n if (hash && changed && !stylixCtx.rules[hash]) {\n // If not global styles, wrap original styles with classname\n if (!options.global) styles = { ['.' + hash]: styles };\n stylixCtx.rules[hash] = {\n hash,\n rules: stylesToRuleArray(styles, hash, stylixCtx),\n refs: 1,\n };\n stylixCtx.requestApply = true;\n }\n\n // Apply styles if requested.\n // This runs on every render. We utilize useLayoutEffect so that it runs *after* all the other\n // renders have completed. stylixCtx.requestApply guards against multiple runs. This reduces the number of calls\n // to applyRules(), but prevents styles potentially being added to the DOM after other components force the\n // browser to compute styles.\n useIsoLayoutEffect(\n () => {\n if (!stylixCtx.requestApply) return;\n stylixCtx.requestApply = false;\n applyRules(stylixCtx);\n },\n undefined,\n true,\n );\n\n // When hash changes, add/remove ref count\n useIsoLayoutEffect(\n () => {\n if (!hash || !changed) return;\n\n if (stylixCtx.rules[hash]) {\n stylixCtx.rules[hash].refs++;\n }\n\n return () => {\n stylixCtx.rules[hash].refs--;\n cleanup(stylixCtx);\n };\n },\n [hash],\n false,\n );\n\n return hash;\n}\n\nexport function useKeyframes(\n keyframes: any,\n options: { disabled?: boolean } = { disabled: false },\n) {\n return useStyles({ '@keyframes $$class': keyframes }, { global: true, ...options });\n}\n\nexport function useGlobalStyles(\n styles: StylixStyles,\n options: { disabled?: boolean } = { disabled: false },\n) {\n return useStyles(styles, { ...options, global: true });\n}\n","import { StylixContext } from './StylixProvider';\n\n/**\n * Applies rules from given StylixContext to the <style> element.\n */\nexport default function applyRules(ctx: StylixContext): void {\n const flattenedRules: string[] = [];\n\n for (const key in ctx.rules) {\n const val = ctx.rules[key];\n flattenedRules.push(...val.rules);\n }\n\n if (ctx.styleCollector) {\n ctx.styleCollector.length = 0;\n ctx.styleCollector.push(...flattenedRules);\n return;\n }\n\n if (ctx.devMode) {\n ctx.styleElement.innerHTML = flattenedRules.join('\\n');\n } else {\n const container = ctx.stylesheet;\n if (container.cssRules)\n while (container.cssRules.length) {\n container.deleteRule(0);\n }\n for (const i in flattenedRules) container.insertRule(flattenedRules[i], +i);\n }\n}\n","import { applyPlugins } from './plugins';\nimport { StylixContext } from './StylixProvider';\nimport { StylixObject } from './types';\nimport { isPlainObject } from './util/isPlainObject';\n\n/**\n * Converts a Stylix CSS object to an array of rules, suitable for passing to StyleSheet#insertRule.\n */\nexport default function stylesToRuleArray(\n styles: StylixObject,\n hash: string,\n context: StylixContext,\n): string[] {\n try {\n const processedStyles = applyPlugins('processStyles', styles, hash, context);\n\n // serialize to css rules array\n const serialize = function serialize(selector: string, styles: StylixObject) {\n const lines: string[] = [];\n for (const key in styles) {\n const value = styles[key];\n if (isPlainObject(value)) lines.push(serialize(key, value));\n else lines.push(` ${key}: ${value};`);\n }\n return `${selector} {\\n${lines.join('\\n')} }`;\n };\n\n const result: string[] = [];\n for (const key in processedStyles) {\n const value = processedStyles[key];\n result.push(serialize(key, value));\n }\n return result;\n } catch (e) {\n if (e.name && e.reason) {\n console.error(\n `${e.name}: ${e.reason}\\n`,\n e.source.replace('\\n', ' ').substr(Math.max(0, e.column - 20), 100) + '\\n',\n ' '.repeat(20) + '^',\n );\n } else {\n console.error(e);\n }\n return [];\n }\n}\n","/**\n * Cheap string hashing, suitable for generating css class names\n */\nexport function hashString(str: string): string {\n let hash = 5381;\n let i = str.length;\n while (i) hash = (hash * 33) ^ str.charCodeAt(--i);\n return 'stylix-' + (hash >>> 0).toString(36);\n}\n","import React from 'react';\n\nimport { _Stylix } from './Stylix';\nimport { Extends, StylixComponentMeta, StylixStyleProps } from './types';\n\nexport type StylixStyledComponent<TProps> = React.FC<Extends<StylixStyleProps, TProps>> &\n StylixComponentMeta;\n\nexport type HtmlOrComponent =\n | keyof JSX.IntrinsicElements\n | React.ForwardRefRenderFunction<any, any>;\n\nexport type HtmlOrComponentProps<TComponent extends HtmlOrComponent> =\n TComponent extends keyof JSX.IntrinsicElements\n ? React.ComponentPropsWithRef<TComponent>\n : TComponent extends React.ForwardRefRenderFunction<infer R, infer P>\n ? P & React.RefAttributes<R>\n : never;\n\nexport function styled<\n TComponent extends HtmlOrComponent,\n TPropMap extends Record<string, string> = Record<string, never>,\n>(\n $el: TComponent,\n addProps?: Partial<HtmlOrComponentProps<TComponent>>,\n conflictingPropMapping?: TPropMap,\n): StylixStyledComponent<HtmlOrComponentProps<TComponent>> {\n const Element: any = typeof $el === 'string' ? ($el as any) : React.forwardRef($el);\n const r: any = React.forwardRef((props: Record<string, any>, ref: React.Ref<unknown>) => {\n if (conflictingPropMapping) {\n for (const k in conflictingPropMapping) {\n props[conflictingPropMapping[k]] = (props as any)[k];\n delete props[k];\n }\n }\n return _Stylix(\n {\n $el: Element,\n ...addProps,\n ...props,\n $css: [addProps?.$css, props?.$css],\n },\n ref as any,\n );\n });\n r.displayName = `$.${\n ($el as React.FC).displayName ||\n ($el as React.FC).name ||\n ($el as string).toString?.() ||\n 'Unnamed'\n }`;\n r.__isStylix = true;\n return r;\n}\n","import React from 'react';\n\nimport { classifyProps } from './classifyProps';\nimport { useStylixContext } from './StylixProvider';\nimport { Stylix$Component, Stylix$Props } from './types';\nimport { useStyles } from './useStyles';\n\nexport function _Stylix<ElType extends React.ElementType>(\n props: Stylix$Props<ElType>,\n ref: React.Ref<ElType>,\n) {\n const { $el, $css, $disabled, className, children, ...rest } = props as any;\n\n const ctx = useStylixContext();\n const [styleProps, otherProps] = classifyProps(rest, ctx.styleProps);\n if ($css) styleProps.$css = $css;\n const hash = useStyles(styleProps, { disabled: $disabled });\n\n const allProps = {\n className: `${hash} ${className || ''}`.trim(),\n ref: ref,\n ...otherProps,\n };\n\n if (React.isValidElement($el)) {\n const $elProps = { ...($el.props as any) };\n allProps.className += ' ' + ($elProps.className || '');\n delete $elProps.className;\n return React.cloneElement(\n $el,\n { ...allProps, ...$elProps },\n ...(React.Children.toArray(children) || []),\n );\n }\n\n return <$el {...allProps}>{children}</$el>;\n}\n\nconst Stylix = React.forwardRef(_Stylix) as unknown as Stylix$Component;\nStylix.displayName = 'Stylix';\nStylix.__isStylix = true;\n\nexport default Stylix;\n","import htmlTags from './html-tags.json';\nimport { styled } from './styled';\nimport Stylix from './Stylix';\n\nfor (const i in htmlTags) {\n // Types are specified in ./types.ts, so we don't care what they type of htmlTags[i] is.\n // JSX.IntrinsicElements is a union of all HTML tags, so it is too complex for TypeScript to infer.\n const tag = htmlTags[i] as any;\n Stylix[tag] = styled(tag);\n}\n","[\n \"a\",\n \"abbr\",\n \"address\",\n \"area\",\n \"article\",\n \"aside\",\n \"audio\",\n \"b\",\n \"base\",\n \"bdi\",\n \"bdo\",\n \"blockquote\",\n \"body\",\n \"br\",\n \"button\",\n \"canvas\",\n \"caption\",\n \"cite\",\n \"code\",\n \"col\",\n \"colgroup\",\n \"data\",\n \"datalist\",\n \"dd\",\n \"del\",\n \"details\",\n \"dfn\",\n \"dialog\",\n \"div\",\n \"dl\",\n \"dt\",\n \"em\",\n \"embed\",\n \"fieldset\",\n \"figcaption\",\n \"figure\",\n \"footer\",\n \"form\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"head\",\n \"header\",\n \"hgroup\",\n \"hr\",\n \"html\",\n \"i\",\n \"iframe\",\n \"img\",\n \"input\",\n \"ins\",\n \"kbd\",\n \"label\",\n \"legend\",\n \"li\",\n \"link\",\n \"main\",\n \"map\",\n \"mark\",\n \"math\",\n \"menu\",\n \"menuitem\",\n \"meta\",\n \"meter\",\n \"nav\",\n \"noscript\",\n \"object\",\n \"ol\",\n \"optgroup\",\n \"option\",\n \"output\",\n \"p\",\n \"param\",\n \"picture\",\n \"pre\",\n \"progress\",\n \"q\",\n \"rb\",\n \"rp\",\n \"rt\",\n \"rtc\",\n \"ruby\",\n \"s\",\n \"samp\",\n \"script\",\n \"section\",\n \"select\",\n \"slot\",\n \"small\",\n \"source\",\n \"span\",\n \"strong\",\n \"style\",\n \"sub\",\n \"summary\",\n \"sup\",\n \"svg\",\n \"table\",\n \"tbody\",\n \"td\",\n \"template\",\n \"textarea\",\n \"tfoot\",\n \"th\",\n \"thead\",\n \"time\",\n \"title\",\n \"tr\",\n \"track\",\n \"u\",\n \"ul\",\n \"var\",\n \"video\",\n \"wbr\"\n]\n"],"names":[],"version":3,"file":"index.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;ACAA;AAEO,SAAS,0CAAc,KAAU,EAAE,UAAkC,EAAc;IACxF,MAAM,SAAS,CAAC;IAChB,MAAM,QAAQ,CAAC;IAEf,IAAK,MAAM,QAAQ,MACjB,6DAA6D;IAC7D,IAAI,CAAC,0CAAe,SAAU,0CAAY,MAAM,eAAe,0CAAa,KAAK,CAAC,KAAK,GACrF,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;SAE1B,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;IAI7B,OAAO;QAAC;QAAQ;KAAM;AACxB;AAEO,SAAS,yCAAiB,KAAU,EAAE;IAC3C,MAAM,MAAM,CAAA,GAAA,yCAAgB,AAAD;IAC3B,MAAM,CAAC,QAAQ,MAAM,GAAG,0CAAc,OAAO,IAAI,UAAU;IAC3D,OAAO;QAAC;QAAQ;KAAM;AACxB;AAKO,SAAS,0CAAY,IAAY,EAAE,UAAkC,EAAW;IACrF,OAAO,0CAAe,SAAS,0CAAsB,SAAS;AAChE;AAEO,SAAS,0CAAe,KAAa,EAAW;IACrD,iEAAiE;IACjE,OAAO,uBAAuB,IAAI,CAAC;AACrC;AAEO,SAAS,0CAAsB,KAAa,EAAE;IACnD,OAAO,MAAM,WAAW,GAAG,OAAO,CA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AE,EACjB,AAAC,IAAiB,WAAW,IAC7B,AAAC,IAAiB,IAAI,IACtB,AAAC,IAAe,QAAQ,QACxB,UACD,CAAC;IACF,EAAE,UAAU,GAAG,IAAI;IACnB,OAAO;AACT;;;;AGxDA,4BAAiB,KAAK,KAAK,CAAC;;ADA5B;;;AAIA,IAAK,MAAM,KAAK,GAAA,gEAAQ,CAAE;IACxB,wFAAwF;IACxF,mGAAmG;IACnG,MAAM,MAAM,CAAA,GAAA,gEAAQ,AAAD,CAAC,CAAC,EAAE;IACvB,CAAA,GAAA,wCAAM,AAAD,CAAC,CAAC,IAAI,GAAG,CAAA,GAAA,yCAAM,AAAD,EAAE;AACvB;","sources":["core/src/index.ts","core/src/StylixProvider.tsx","core/src/classifyProps.ts","core/src/css-props.json","core/src/plugins/index.ts","core/src/plugins/cleanStyles.ts","core/src/util/isPlainObject.ts","core/src/plugins/defaultUnits.ts","core/src/util/mapObjectRecursive.ts","core/src/plugins/flattenNestedStyles.ts","core/src/plugins/mediaArrays.ts","core/src/plugins/merge$css.ts","core/src/util/flatten.ts","core/src/plugins/propCasing.ts","core/src/plugins/replace$$class.ts","core/src/plugins/themeFunctions.ts","core/src/plugins/customProps.ts","core/src/util/walkRecursive.ts","core/src/util/cloneDeep.ts","core/src/styleCollector.tsx","core/src/util/merge.ts","core/src/util/useIsoLayoutEffect.ts","core/src/useStyles.ts","core/src/applyRules.ts","core/src/stylesToRuleArray.ts","core/src/util/hashString.ts","core/src/styled.tsx","core/src/Stylix.tsx","core/src/elements.ts","core/src/html-tags.json"],"sourcesContent":["export {\n type StylixProps,\n type StylixPropsExtensions,\n type Stylix$Component,\n type Stylix$elProp,\n type Stylix$elPropOptional,\n type Extends,\n type StylixStyleProps,\n} from './types';\nexport { useStylixContext, useStylixTheme, StylixProvider, StylixTheme } from './StylixProvider';\nimport { StylixPublicContext } from './StylixProvider';\nexport type StylixContext = StylixPublicContext;\nexport { useStyles, useKeyframes, useGlobalStyles } from './useStyles';\nexport {\n defaultPlugins,\n customProps,\n type StylixPlugin,\n type StylixPluginFunctionContext,\n} from './plugins';\nexport { mapObjectRecursive } from './util/mapObjectRecursive';\nexport { walkRecursive } from './util/walkRecursive';\nexport { createStyleCollector, styleCollectorContext, type StyleCollector } from './styleCollector';\nexport { classifyProps, useClassifyProps } from './classifyProps';\nexport { styled, type StylixStyledComponentWithProps, type StylixStyledComponent } from './styled';\nimport './elements';\nexport { default } from './Stylix';\n","import React, { createContext, useContext, useRef, useState } from 'react';\n\nimport { simplifyStylePropName } from './classifyProps';\nimport cssProps from './css-props.json';\nimport { applyPlugins, defaultPlugins, StylixPlugin } from './plugins';\nimport { styleCollectorContext } from './styleCollector';\nimport { flatten } from './util/flatten';\nimport { merge } from './util/merge';\nimport useIsoLayoutEffect from './util/useIsoLayoutEffect';\n\n/**\n * Stylix context\n *\n * The <StylixProvider> wrapper represents an \"instance\" of Stylix - a configuration, set of plugins, and reference to\n * the <style> element where css is output. All nodes contained within a <StylixProvider> element will share this\n * Stylix instance's configuration.\n *\n * A StylixProvider internally contains a <StylixTheme>, so you can conveniently provide a theme object and media query\n * array with a single element.\n *\n * See the README for more details.\n */\n\n// StylixProvider component props\ntype StylixProviderProps<Theme = any> = StylixThemeProps<Theme> & {\n id?: string;\n devMode?: boolean;\n plugins?: StylixPlugin[] | StylixPlugin[][];\n styleElement?: HTMLStyleElement;\n children: any;\n};\n\ntype StylixThemeProps<Theme = any> = {\n theme?: Theme;\n media?: string[];\n children: any;\n};\n\n// StylixContext object interface\nexport type StylixContext<Theme = any> = {\n id: string;\n devMode: boolean;\n theme: Theme;\n media: string[];\n plugins: StylixPlugin[];\n stylesheet: CSSStyleSheet;\n styleElement: HTMLStyleElement;\n styleCollector?: string[];\n rules: {\n [key: string]: {\n hash: string;\n rules: string[];\n refs: number;\n };\n };\n styleProps: Record<string, string>;\n cleanupRequest?: number;\n requestApply: boolean;\n};\n\nexport type StylixPublicContext = Pick<\n StylixContext,\n 'id' | 'devMode' | 'theme' | 'media' | 'stylesheet' | 'styleElement' | 'styleProps'\n>;\n\nconst defaultStyleProps: Record<string, string> = {};\nfor (const value of cssProps) {\n defaultStyleProps[simplifyStylePropName(value)] = value;\n}\n\nfunction createStylixContext(userValues = {} as Partial<StylixProviderProps>) {\n const ctx = {\n id: userValues.id || Math.round(Math.random() * 10000).toString(10),\n devMode: userValues.devMode,\n styleProps: defaultStyleProps,\n theme: userValues.theme || null,\n media: userValues.media || null,\n styleElement: userValues.styleElement,\n plugins: flatten<StylixPlugin>(Object.values(defaultPlugins)),\n rules: {},\n cleanupRequest: undefined,\n } as StylixContext;\n\n if (!ctx.styleElement && typeof document !== 'undefined') {\n ctx.styleElement = document.createElement('style');\n if (ctx.id) ctx.styleElement.id = 'stylix-' + ctx.id;\n ctx.styleElement.className = 'stylix';\n document.head.appendChild(ctx.styleElement);\n }\n\n if (ctx.styleElement) ctx.stylesheet = ctx.styleElement.sheet as CSSStyleSheet;\n\n if (userValues.plugins?.length) {\n const flatPlugins = flatten<StylixPlugin>(userValues.plugins);\n for (const i in flatPlugins) {\n const plugin = flatPlugins[i];\n let pluginIndex = -1;\n if (plugin.before && ctx.plugins.includes(plugin.before))\n pluginIndex = ctx.plugins.indexOf(plugin.before);\n if (plugin.after && ctx.plugins.includes(plugin.after))\n pluginIndex = ctx.plugins.indexOf(plugin.after) + 1;\n if (plugin.atIndex !== undefined) pluginIndex = plugin.atIndex;\n if (pluginIndex === -1) ctx.plugins.push(plugin);\n else ctx.plugins.splice(pluginIndex, 0, plugin);\n }\n }\n applyPlugins('initialize', null, null, ctx);\n\n return ctx;\n}\n\n// The React context object\nconst stylixContext = createContext(createStylixContext());\n\n// Convenience wrapper hook that returns the current Stylix context\nexport function useStylixContext<Theme = any>(): StylixContext<Theme> {\n return useContext(stylixContext);\n}\n\n// Convenience wrapper hook that returns just the current Stylix theme\nexport function useStylixTheme<Theme = any>(): Theme {\n return useContext(stylixContext).theme;\n}\n\nexport function StylixProvider({\n id,\n devMode,\n plugins,\n styleElement,\n children,\n ...themeProps\n}: StylixProviderProps): React.ReactElement {\n const ctx = useRef<StylixContext>();\n if (!ctx.current) ctx.current = createStylixContext({ id, devMode, plugins, styleElement });\n\n ctx.current.styleCollector = useContext(styleCollectorContext);\n\n return (\n <stylixContext.Provider value={ctx.current}>\n <StylixTheme {...themeProps}>{children}</StylixTheme>\n </stylixContext.Provider>\n );\n}\n\nfunction mergeContexts(contextA: any, contextB: any) {\n const obj = { ...contextA };\n const themeB = contextB.theme;\n if (contextB) {\n for (const key in contextB) {\n const value = contextB[key];\n if (typeof value !== 'undefined') obj[key] = value;\n }\n }\n obj.theme = merge(contextA.theme || {}, themeB);\n return obj;\n}\n\nexport function StylixTheme({ children, media, theme }: StylixThemeProps) {\n const parentCtx = useContext(stylixContext);\n const [contextValue, setContextValue] = useState(() =>\n mergeContexts(parentCtx, { media, theme }),\n );\n\n // contextValue should only update (and cause re-renders) when relevant properties change.\n // `media` is treated as special because providing an array of strings is easier to do inline,\n // but we don't want to cause descendent re-renders if the values don't change.\n\n useIsoLayoutEffect(\n () => {\n setContextValue(mergeContexts(parentCtx, { media, theme }));\n },\n [parentCtx, media?.join('|') || '', theme],\n false,\n );\n\n return <stylixContext.Provider value={contextValue}>{children}</stylixContext.Provider>;\n}\n","import { useStylixContext } from './StylixProvider';\n\nexport function classifyProps(props: any, knownProps: Record<string, string>): [any, any] {\n const styles = {} as any;\n const other = {} as any;\n\n for (const prop in props) {\n // If prop is not a valid JSX prop, it must be a CSS selector\n if (!isValidJSXProp(prop) || (isStyleProp(prop, knownProps) && isStyleValue(props[prop]))) {\n styles[prop] = props[prop];\n } else {\n other[prop] = props[prop];\n }\n }\n\n return [styles, other];\n}\n\nexport function useClassifyProps(props: any) {\n const ctx = useStylixContext();\n const [styles, other] = classifyProps(props, ctx.styleProps);\n return [styles, other];\n}\n\n/**\n * Determines if `value` is a recognized CSS property (can be standard CSS or custom Stylix prop).\n */\nexport function isStyleProp(prop: string, knownProps: Record<string, string>): boolean {\n return isValidJSXProp(prop) && simplifyStylePropName(prop) in knownProps;\n}\n\nexport function isValidJSXProp(value: string): boolean {\n // Not an exact check, but mostly rules out complex css selectors\n return /^[a-z$][a-z0-9_-]*$/i.test(value);\n}\n\nexport function simplifyStylePropName(value: string) {\n return value.toLowerCase().replace(/[^a-z]/gi, '');\n}\n\n/**\n * Tries to determine if `value` is likely to be a valid CSS property value.\n * We can't be 100% sure, but this should catch most cases.\n * There is a check here to make sure React elements do not pass the test, as this\n * has turned out to be a common case where a property like 'content' means something\n * to a component, but is also a valid CSS property.\n */\nexport function isStyleValue(value: any): boolean {\n return (\n typeof value === 'function' ||\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n Array.isArray(value) ||\n // Check for plain objects, and make sure it doesn't have the $$typeof property (react elements are never valid as style values)\n (typeof value === 'object' && value.constructor === Object && !('$$typeof' in value))\n );\n}\n","[\n \"align-content\",\n \"align-items\",\n \"align-self\",\n \"align-tracks\",\n \"all\",\n \"animation\",\n \"animation-delay\",\n \"animation-direction\",\n \"animation-duration\",\n \"animation-fill-mode\",\n \"animation-iteration-count\",\n \"animation-name\",\n \"animation-play-state\",\n \"animation-timing-function\",\n \"appearance\",\n \"aspect-ratio\",\n \"azimuth\",\n \"backdrop-filter\",\n \"backface-visibility\",\n \"background\",\n \"background-attachment\",\n \"background-blend-mode\",\n \"background-clip\",\n \"background-color\",\n \"background-image\",\n \"background-origin\",\n \"background-position\",\n \"background-position-x\",\n \"background-position-y\",\n \"background-repeat\",\n \"background-size\",\n \"block-overflow\",\n \"block-size\",\n \"border\",\n \"border-block\",\n \"border-block-color\",\n \"border-block-style\",\n \"border-block-width\",\n \"border-block-end\",\n \"border-block-end-color\",\n \"border-block-end-style\",\n \"border-block-end-width\",\n \"border-block-start\",\n \"border-block-start-color\",\n \"border-block-start-style\",\n \"border-block-start-width\",\n \"border-bottom\",\n \"border-bottom-color\",\n \"border-bottom-left-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-style\",\n \"border-bottom-width\",\n \"border-collapse\",\n \"border-color\",\n \"border-end-end-radius\",\n \"border-end-start-radius\",\n \"border-image\",\n \"border-image-outset\",\n \"border-image-repeat\",\n \"border-image-slice\",\n \"border-image-source\",\n \"border-image-width\",\n \"border-inline\",\n \"border-inline-end\",\n \"border-inline-color\",\n \"border-inline-style\",\n \"border-inline-width\",\n \"border-inline-end-color\",\n \"border-inline-end-style\",\n \"border-inline-end-width\",\n \"border-inline-start\",\n \"border-inline-start-color\",\n \"border-inline-start-style\",\n \"border-inline-start-width\",\n \"border-left\",\n \"border-left-color\",\n \"border-left-style\",\n \"border-left-width\",\n \"border-radius\",\n \"border-right\",\n \"border-right-color\",\n \"border-right-style\",\n \"border-right-width\",\n \"border-spacing\",\n \"border-start-end-radius\",\n \"border-start-start-radius\",\n \"border-style\",\n \"border-top\",\n \"border-top-color\",\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-top-style\",\n \"border-top-width\",\n \"border-width\",\n \"bottom\",\n \"box-align\",\n \"box-decoration-break\",\n \"box-direction\",\n \"box-flex\",\n \"box-flex-group\",\n \"box-lines\",\n \"box-ordinal-group\",\n \"box-orient\",\n \"box-pack\",\n \"box-shadow\",\n \"box-sizing\",\n \"break-after\",\n \"break-before\",\n \"break-inside\",\n \"caption-side\",\n \"caret-color\",\n \"clear\",\n \"clip\",\n \"clip-path\",\n \"color\",\n \"color-adjust\",\n \"color-scheme\",\n \"column-count\",\n \"column-fill\",\n \"column-gap\",\n \"column-rule\",\n \"column-rule-color\",\n \"column-rule-style\",\n \"column-rule-width\",\n \"column-span\",\n \"column-width\",\n \"columns\",\n \"contain\",\n \"content\",\n \"content-visibility\",\n \"counter-increment\",\n \"counter-reset\",\n \"counter-set\",\n \"cursor\",\n \"direction\",\n \"display\",\n \"empty-cells\",\n \"filter\",\n \"flex\",\n \"flex-basis\",\n \"flex-direction\",\n \"flex-flow\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"float\",\n \"font\",\n \"font-family\",\n \"font-feature-settings\",\n \"font-kerning\",\n \"font-language-override\",\n \"font-optical-sizing\",\n \"font-variation-settings\",\n \"font-size\",\n \"font-size-adjust\",\n \"font-smooth\",\n \"font-stretch\",\n \"font-style\",\n \"font-synthesis\",\n \"font-variant\",\n \"font-variant-alternates\",\n \"font-variant-caps\",\n \"font-variant-east-asian\",\n \"font-variant-ligatures\",\n \"font-variant-numeric\",\n \"font-variant-position\",\n \"font-weight\",\n \"forced-color-adjust\",\n \"gap\",\n \"grid\",\n \"grid-area\",\n \"grid-auto-columns\",\n \"grid-auto-flow\",\n \"grid-auto-rows\",\n \"grid-column\",\n \"grid-column-end\",\n \"grid-column-gap\",\n \"grid-column-start\",\n \"grid-gap\",\n \"grid-row\",\n \"grid-row-end\",\n \"grid-row-gap\",\n \"grid-row-start\",\n \"grid-template\",\n \"grid-template-areas\",\n \"grid-template-columns\",\n \"grid-template-rows\",\n \"hanging-punctuation\",\n \"height\",\n \"hyphens\",\n \"image-orientation\",\n \"image-rendering\",\n \"image-resolution\",\n \"ime-mode\",\n \"initial-letter\",\n \"initial-letter-align\",\n \"inline-size\",\n \"inset\",\n \"inset-block\",\n \"inset-block-end\",\n \"inset-block-start\",\n \"inset-inline\",\n \"inset-inline-end\",\n \"inset-inline-start\",\n \"isolation\",\n \"justify-content\",\n \"justify-items\",\n \"justify-self\",\n \"justify-tracks\",\n \"left\",\n \"letter-spacing\",\n \"line-break\",\n \"line-clamp\",\n \"line-height\",\n \"line-height-step\",\n \"list-style\",\n \"list-style-image\",\n \"list-style-position\",\n \"list-style-type\",\n \"margin\",\n \"margin-block\",\n \"margin-block-end\",\n \"margin-block-start\",\n \"margin-bottom\",\n \"margin-inline\",\n \"margin-inline-end\",\n \"margin-inline-start\",\n \"margin-left\",\n \"margin-right\",\n \"margin-top\",\n \"margin-trim\",\n \"mask\",\n \"mask-border\",\n \"mask-border-mode\",\n \"mask-border-outset\",\n \"mask-border-repeat\",\n \"mask-border-slice\",\n \"mask-border-source\",\n \"mask-border-width\",\n \"mask-clip\",\n \"mask-composite\",\n \"mask-image\",\n \"mask-mode\",\n \"mask-origin\",\n \"mask-position\",\n \"mask-repeat\",\n \"mask-size\",\n \"mask-type\",\n \"masonry-auto-flow\",\n \"math-style\",\n \"max-block-size\",\n \"max-height\",\n \"max-inline-size\",\n \"max-lines\",\n \"max-width\",\n \"min-block-size\",\n \"min-height\",\n \"min-inline-size\",\n \"min-width\",\n \"mix-blend-mode\",\n \"object-fit\",\n \"object-position\",\n \"offset\",\n \"offset-anchor\",\n \"offset-distance\",\n \"offset-path\",\n \"offset-position\",\n \"offset-rotate\",\n \"opacity\",\n \"order\",\n \"orphans\",\n \"outline\",\n \"outline-color\",\n \"outline-offset\",\n \"outline-style\",\n \"outline-width\",\n \"overflow\",\n \"overflow-anchor\",\n \"overflow-block\",\n \"overflow-clip-box\",\n \"overflow-clip-margin\",\n \"overflow-inline\",\n \"overflow-wrap\",\n \"overflow-x\",\n \"overflow-y\",\n \"overscroll-behavior\",\n \"overscroll-behavior-block\",\n \"overscroll-behavior-inline\",\n \"overscroll-behavior-x\",\n \"overscroll-behavior-y\",\n \"padding\",\n \"padding-block\",\n \"padding-block-end\",\n \"padding-block-start\",\n \"padding-bottom\",\n \"padding-inline\",\n \"padding-inline-end\",\n \"padding-inline-start\",\n \"padding-left\",\n \"padding-right\",\n \"padding-top\",\n \"page-break-after\",\n \"page-break-before\",\n \"page-break-inside\",\n \"paint-order\",\n \"perspective\",\n \"perspective-origin\",\n \"place-content\",\n \"place-items\",\n \"place-self\",\n \"pointer-events\",\n \"position\",\n \"quotes\",\n \"resize\",\n \"right\",\n \"rotate\",\n \"row-gap\",\n \"ruby-align\",\n \"ruby-merge\",\n \"ruby-position\",\n \"scale\",\n \"scrollbar-color\",\n \"scrollbar-gutter\",\n \"scrollbar-width\",\n \"scroll-behavior\",\n \"scroll-margin\",\n \"scroll-margin-block\",\n \"scroll-margin-block-start\",\n \"scroll-margin-block-end\",\n \"scroll-margin-bottom\",\n \"scroll-margin-inline\",\n \"scroll-margin-inline-start\",\n \"scroll-margin-inline-end\",\n \"scroll-margin-left\",\n \"scroll-margin-right\",\n \"scroll-margin-top\",\n \"scroll-padding\",\n \"scroll-padding-block\",\n \"scroll-padding-block-start\",\n \"scroll-padding-block-end\",\n \"scroll-padding-bottom\",\n \"scroll-padding-inline\",\n \"scroll-padding-inline-start\",\n \"scroll-padding-inline-end\",\n \"scroll-padding-left\",\n \"scroll-padding-right\",\n \"scroll-padding-top\",\n \"scroll-snap-align\",\n \"scroll-snap-coordinate\",\n \"scroll-snap-destination\",\n \"scroll-snap-points-x\",\n \"scroll-snap-points-y\",\n \"scroll-snap-stop\",\n \"scroll-snap-type\",\n \"scroll-snap-type-x\",\n \"scroll-snap-type-y\",\n \"shape-image-threshold\",\n \"shape-margin\",\n \"shape-outside\",\n \"tab-size\",\n \"table-layout\",\n \"text-align\",\n \"text-align-last\",\n \"text-combine-upright\",\n \"text-decoration\",\n \"text-decoration-color\",\n \"text-decoration-line\",\n \"text-decoration-skip\",\n \"text-decoration-skip-ink\",\n \"text-decoration-style\",\n \"text-decoration-thickness\",\n \"text-emphasis\",\n \"text-emphasis-color\",\n \"text-emphasis-position\",\n \"text-emphasis-style\",\n \"text-indent\",\n \"text-justify\",\n \"text-orientation\",\n \"text-overflow\",\n \"text-rendering\",\n \"text-shadow\",\n \"text-size-adjust\",\n \"text-transform\",\n \"text-underline-offset\",\n \"text-underline-position\",\n \"top\",\n \"touch-action\",\n \"transform\",\n \"transform-box\",\n \"transform-origin\",\n \"transform-style\",\n \"transition\",\n \"transition-delay\",\n \"transition-duration\",\n \"transition-property\",\n \"transition-timing-function\",\n \"translate\",\n \"unicode-bidi\",\n \"user-select\",\n \"vertical-align\",\n \"visibility\",\n \"white-space\",\n \"widows\",\n \"width\",\n \"will-change\",\n \"word-break\",\n \"word-spacing\",\n \"word-wrap\",\n \"writing-mode\",\n \"z-index\",\n \"zoom\"\n]\n","import { StylixContext, StylixPublicContext } from '../StylixProvider';\nimport { cleanStyles } from './cleanStyles';\nimport { defaultPixelUnits } from './defaultUnits';\nimport { flattenNestedStyles } from './flattenNestedStyles';\nimport { mediaArrays } from './mediaArrays';\nimport { merge$css } from './merge$css';\nimport { propCasing } from './propCasing';\nimport { replace$$class } from './replace$$class';\nimport { themeFunctions } from './themeFunctions';\n\n/**\n * Stylix plugin function context object\n */\nexport type StylixPluginFunctionContext = StylixPublicContext & { hash: string | null };\n\n/**\n * Stylix plugin interface\n */\nexport interface StylixPlugin {\n name: string;\n type: 'initialize' | 'processStyles' | 'preprocessStyles';\n plugin(ctx: StylixPluginFunctionContext, styles: any): any;\n before?: StylixPlugin;\n after?: StylixPlugin;\n atIndex?: number;\n}\n\nexport function applyPlugins(\n type: StylixPlugin['type'],\n styles: any,\n hash: string | null,\n context: StylixContext,\n) {\n const pluginContext = {\n id: context.id,\n devMode: context.devMode,\n theme: context.theme,\n media: context.media,\n stylesheet: context.stylesheet,\n styleElement: context.styleElement,\n styleProps: context.styleProps,\n hash,\n };\n\n let processedStyles = styles;\n for (const i in context.plugins) {\n const plugin = context.plugins[i];\n if (plugin.type === type) processedStyles = plugin.plugin(pluginContext, processedStyles);\n }\n return processedStyles;\n}\n\nexport { customProps } from './customProps';\n\nexport const defaultPlugins = {\n themeFunctions,\n merge$css,\n mediaArrays,\n propCasing,\n flattenNestedStyles,\n replace$$class,\n defaultPixelUnits,\n cleanStyles,\n};\n","import { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\nfunction cleanObject(object: any): any {\n for (const key in object) {\n const value = object[key];\n if (value === null || value === undefined || value === '') delete object[key];\n else if (isPlainObject(value) || Array.isArray(value)) {\n cleanObject(value);\n if (!Object.keys(value).length) delete object[key];\n }\n }\n return object;\n}\n\n/**\n * Fixes casing and hyphenation on known style props\n */\nexport const cleanStyles: StylixPlugin = {\n name: 'cleanStyles',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return cleanObject(styles);\n },\n};\n","/**\n * Indicates that an object is most likely just an object literal.\n */\nexport function isPlainObject(obj: any): obj is Record<string, any> {\n return typeof obj === 'object' && obj?.constructor === Object;\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin } from './index';\n\nexport const defaultIgnoreUnits = [\n 'columns',\n 'column-count',\n 'fill-opacity',\n 'flex',\n 'flex-grow',\n 'flex-shrink',\n 'font-weight',\n 'line-height',\n 'opacity',\n 'orphans',\n 'stroke-opacity',\n 'widows',\n 'z-index',\n 'zoom',\n 'order',\n];\n\n/**\n * Adds unit (px, em, etc) to numeric values for any style properties not included in `ignoreProps`..\n */\nexport const defaultUnits = (unit = 'px', ignoreProps = defaultIgnoreUnits): StylixPlugin => {\n return {\n name: 'defaultUnits',\n type: 'processStyles',\n plugin(ctx, styles: any) {\n return mapObjectRecursive(styles, defaultUnitsMap, { unit, ignoreProps });\n },\n };\n};\n\nconst defaultUnitsMap = (key: string | number, value: any, object :any, ctx:any) => {\n if (typeof value === 'number' && !ctx.ignoreProps.includes(key as string)) {\n return { [key]: String(value) + ctx.unit };\n }\n};\n\nexport const defaultPixelUnits = defaultUnits();\n","import { isPlainObject } from './isPlainObject';\n\n/**\n * Invokes `map` on each key/value pair in `object`. The key/value pair is deleted from the object and replaced by\n * merging in the object returned from `map`. Recursively descends into all object and array values.\n * The `map` function will receive the key, the value, the current object being mapped, and a context object.\n * The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to\n * `map` on child properties of `value`.\n */\nexport function mapObjectRecursive(\n object: any,\n map: (\n key: string | number,\n value: any,\n object: any,\n context: any,\n ) => Record<string | number, any> | undefined,\n context: any = {},\n) {\n const clone: any = Array.isArray(object) ? [] : {};\n\n for (const k of Object.keys(object)) {\n let key: string | number = k;\n const value = object[key];\n\n if (Array.isArray(object)) key = +key;\n const contextClone = { ...context };\n let result = map(key, value, object, contextClone);\n if (typeof result !== 'undefined' && typeof result !== 'object' && !Array.isArray(result))\n throw new Error(\n 'mapObjectRecursive: return value of map function must be undefined, object, or array!',\n );\n if (typeof result === 'undefined') {\n result = { [key]: value };\n }\n for (const kk in result) {\n let value = result[kk];\n if (isPlainObject(value) || Array.isArray(value))\n value = mapObjectRecursive(value, map, contextClone);\n if (typeof value !== 'undefined') clone[kk] = value;\n }\n }\n\n return clone;\n}\n","import { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\nfunction flatten(styles: any, parent: any, selector: string, root: any, mediaRoot: any) {\n for (let key in styles) {\n const value = styles[key];\n if (key.startsWith('@media')) {\n // Flatten media queries, but nest them under the root object\n root[key] = root[key] || {};\n flatten(value, root[key], selector, root, root[key]);\n } else if (key.startsWith('@keyframes')) {\n // Add keyframe rules as-is directly to mediaRoot object\n mediaRoot[key] = value;\n } else if (isPlainObject(styles[key])) {\n // Concatenate or replace & in selectors and then continue flattening styles\n if (key.includes('&')) {\n key = key.replace(/&/g, selector);\n } else {\n key = (selector + ' ' + key).trim();\n }\n parent[key] = parent[key] || {};\n flatten(value, parent, key, root, mediaRoot);\n } else {\n // Selector is just a css property\n parent[selector] = parent[selector] || {};\n parent[selector][key] = styles[key];\n }\n }\n}\n\n/**\n * Flattens nested style objects that use `&` to reference parent class.\n */\nexport const flattenNestedStyles: StylixPlugin = {\n name: 'flattenNestedStyles',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n const flattened = {};\n flatten(styles, flattened, '', flattened, flattened);\n return flattened;\n },\n};\n","import { isPlainObject } from '../util/isPlainObject';\nimport { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Expands arrays as media queries.\n */\nexport const mediaArrays: StylixPlugin = {\n name: 'mediaArrays',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n // Fill out ditto values\n styles = mapObjectRecursive(styles, mapDittoValues);\n const mediaStyles: any = {};\n let nonMediaStyles = styles;\n for (const i in ctx.media) {\n const mediaQuery = ctx.media[i];\n if (!mediaQuery) {\n nonMediaStyles = mapObjectRecursive(styles, mapNonMedia, { i });\n } else {\n mediaStyles[`@media ${mediaQuery}`] = mapObjectRecursive(styles, mapMediaStyles, { i });\n }\n }\n return { ...nonMediaStyles, ...mediaStyles };\n },\n};\n\nfunction mapDittoValues(key: string | number, value: any) {\n if (Array.isArray(value)) {\n for (const i in value) {\n const v = value[i];\n if (v === '@') value[i] = value[+i - 1];\n }\n return { [key]: value };\n }\n}\n\nfunction mapNonMedia(key: string| number, value: any, object: any, context: any) {\n if (Array.isArray(value)) {\n return { [key]: value[context.i] };\n }\n}\n\nfunction mapMediaStyles(key: string | number, value: any, object: any, context: any) {\n if (typeof key === 'number') return; // Not possible, but here for TS\n if (key.startsWith('@keyframes')) context.keyframes = true;\n if (Array.isArray(value)) {\n return { [key]: value[context.i] };\n }\n if (isPlainObject(value) || context.keyframes) {\n return;\n }\n // delete key/value pair if primitive\n return { [key]: undefined };\n}\n","import { flatten } from '../util/flatten';\nimport { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Merges $css property into parent styles\n */\nexport const merge$css: StylixPlugin = {\n name: 'merge$css',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n const result = {};\n _merge$css(styles, result);\n return result;\n },\n};\n\nexport function _merge$css(obj: any, ctx: any) {\n if (!isPlainObject(obj)) return;\n for (const key in obj) {\n if (key === '$css') {\n const $css = obj[key];\n if (Array.isArray($css)) {\n const flat$css = flatten($css);\n for (const val of flat$css) {\n _merge$css(val, ctx);\n }\n } else {\n _merge$css($css, ctx);\n }\n } else {\n let value = obj[key];\n if (isPlainObject(value)) {\n value = ctx[key] || {};\n _merge$css(obj[key], value);\n }\n ctx[key] = value;\n }\n }\n}\n","/**\n * Flatten an array recursively.\n */\nexport function flatten<TEntryType>(array: unknown[]): TEntryType[] {\n const result: unknown[] = [];\n _flatten(array, result);\n return result as TEntryType[];\n}\n\nfunction _flatten(array: unknown[], result: unknown[]): void {\n for (let i = 0; i < array.length; i++) {\n const value = array[i];\n Array.isArray(value) ? _flatten(value as any, result) : result.push(value);\n }\n}\n","import { simplifyStylePropName } from '../classifyProps';\nimport { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Fixes casing and hyphenation on known style props\n */\nexport const propCasing: StylixPlugin = {\n name: 'normalizeStyleProps',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, propCasingMap, { ctx });\n },\n};\n\nfunction propCasingMap(key: string | number, value: any, object: any, context: any) {\n if (typeof key === 'string' && context.ctx.styleProps[simplifyStylePropName(key)]) {\n return { [context.ctx.styleProps[simplifyStylePropName(key)]]: value };\n }\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Replaces $$class with hash in string values\n */\nexport const replace$$class: StylixPlugin = {\n name: 'replace$$class',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, replace$$classMap, { ctx });\n },\n};\n\nfunction replace$$classMap(key: string | number, value: any, object: any, context: any) {\n value = typeof value === 'string' ? value.replace('$$class', context.ctx.hash) : value;\n key = typeof key === 'string' ? key.replace('$$class', context.ctx.hash) : key;\n return { [key]: value };\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Evaluates functions in style objects, providing the theme and media from the current Stylix context.\n */\nexport const themeFunctions: StylixPlugin = {\n name: 'themeFunctions',\n type: 'preprocessStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, themeFunctionsMap, { ctx });\n },\n};\n\nfunction themeFunctionsMap(key: string | number, value: any, object: any, context: any) {\n if (typeof value === 'function') {\n return { [key]: value(context.ctx.theme, context.ctx) };\n }\n}\n","import { isValidJSXProp, simplifyStylePropName } from '../classifyProps';\nimport { isPlainObject } from '../util/isPlainObject';\nimport { walkRecursive } from '../util/walkRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\nimport { mediaArrays } from './mediaArrays';\n\nexport const customProps = (customProps: Record<string, any>): StylixPlugin[] => {\n for (const key in customProps) {\n customProps[simplifyStylePropName(key)] = customProps[key];\n }\n\n return [\n {\n name: 'customPropsInit',\n type: 'initialize',\n plugin(ctx: StylixPluginFunctionContext) {\n for (const key in customProps) {\n ctx.styleProps[simplifyStylePropName(key)] = key;\n }\n },\n },\n {\n name: 'customPropsProcess',\n type: 'processStyles',\n before: mediaArrays,\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return walkRecursive(styles, (key, value, object) => {\n if (!isValidJSXProp(key) || isPlainObject(value)) return;\n\n const simpleKey = simplifyStylePropName(key);\n const propValue = customProps[simpleKey];\n if (!propValue) return;\n\n const objectClone = { ...object };\n const keys = Object.keys(object);\n const afterKeys = keys.slice(keys.indexOf(key) + 1);\n\n const newStyles: any = {};\n if (typeof propValue === 'object') {\n if (value) Object.assign(newStyles, propValue);\n } else if (typeof propValue === 'string') {\n newStyles[propValue] = value;\n } else if (typeof propValue === 'function') {\n Object.assign(newStyles, propValue(value));\n }\n delete object[key];\n Object.assign(object, newStyles);\n for (const k of afterKeys) {\n const val = objectClone[k];\n delete object[k];\n object[k] = val;\n }\n });\n },\n },\n ];\n};\n","import { cloneDeep } from './cloneDeep';\nimport { isPlainObject } from './isPlainObject';\n\n/**\n * Invokes a callback for each key/value pair in `object`, and continues recursively on each value that is an array or a\n * plain object. Returns `object`.\n * The `cb` function will receive the key, the value, the current object being mapped, and a context object.\n * The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to\n * `map` on child properties of `value`.\n */\nexport function walkRecursive<T extends Record<string, any> = any>(\n object: T,\n cb: (key: string, value: any, currentObject: any, context: any) => void,\n context?: any,\n): T {\n const keys = Object.keys(object);\n for (const key of keys) {\n const value = object[key];\n cb(key, value, object, context);\n if (Array.isArray(value) || isPlainObject(value)) {\n const contextClone = cloneDeep(context);\n walkRecursive(value, cb, contextClone);\n }\n }\n return object;\n}\n","import { isPlainObject } from './isPlainObject';\n\n/**\n * Deeply clones a value.\n */\nexport function cloneDeep<T>(value: T): T {\n if (!value || typeof value !== 'object') return value;\n if (Array.isArray(value)) {\n const clone: any = [];\n for (let index = 0; index < value.length; ++index) {\n clone.push(cloneDeep(value[index]));\n }\n return clone;\n }\n if (isPlainObject(value)) {\n const clone: any = {};\n for (const key in value) {\n clone[key] = cloneDeep(value[key]);\n }\n return clone;\n }\n return value;\n}\n","import React, { createContext } from 'react';\n\nexport interface StyleCollector {\n collect: (element: React.ReactElement) => React.ReactElement;\n render: React.FC<React.ComponentProps<'style'>>;\n styles: string[];\n}\n\nexport const styleCollectorContext = createContext<string[]>(null);\n\nexport function createStyleCollector() {\n const styles: string[] = [];\n const collector: StyleCollector = {\n collect: (element) => (\n <styleCollectorContext.Provider value={styles}>{element}</styleCollectorContext.Provider>\n ),\n render: (props: React.ComponentProps<'style'>) => (\n <style\n type=\"text/css\"\n key={props.id || 'stylix'}\n {...props}\n dangerouslySetInnerHTML={{ __html: collector.styles.join(' ') }}\n />\n ),\n styles,\n };\n collector.render.displayName = 'StylixStyleCollectorRenderer';\n return collector;\n}\n","import { isPlainObject } from './isPlainObject';\n\nexport function merge<A>(a?: A): A;\nexport function merge<A, B>(a: A, b: B): A & B;\nexport function merge<A, B, C>(a: A, b: B, c: C): A & B & C;\nexport function merge<A, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;\nexport function merge<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E;\n\nexport function merge(...items: unknown[]) {\n items = items.filter((item) => typeof item !== 'undefined' && item !== null);\n if (!items?.length) return undefined;\n\n if (items.length === 1) return items[0];\n\n // If items are not all objects/arrays, return the last object/array if possible, otherwise last non-undefined value\n if (!items.every((item) => Array.isArray(item) || isPlainObject(item))) {\n items.reverse();\n return (\n items.find((item) => Array.isArray(item) || isPlainObject(item)) ||\n items.find((item) => typeof item !== 'undefined')\n );\n }\n\n const merged: any = Array.isArray(items[0]) ? [] : {};\n for (const item of items) {\n if (!Array.isArray(item) && !isPlainObject(item)) return merged;\n\n const keys: any[] = [...Object.keys(item), ...Object.getOwnPropertySymbols(item)];\n for (const key of keys) {\n const result = merge(merged[key], item[key]);\n if (typeof result !== 'undefined') merged[key] = result;\n }\n }\n return merged;\n}\n","import { useLayoutEffect } from 'react';\n\nconst useIsoLayoutEffect =\n typeof window !== 'undefined' && 'document' in window\n ? (fn: () => void | (() => void), deps?: unknown[], _runOnSsr?: boolean) => useLayoutEffect(fn, deps)\n : (fn: () => void | (() => void), _deps?: unknown[], runOnSsr?: boolean) => (runOnSsr ? fn() : null);\n\nexport default useIsoLayoutEffect;\n","import { useRef } from 'react';\n\nimport applyRules from './applyRules';\nimport { applyPlugins } from './plugins';\nimport stylesToRuleArray from './stylesToRuleArray';\nimport { StylixContext, useStylixContext } from './StylixProvider';\nimport { StylixStyles } from './types';\nimport { hashString } from './util/hashString';\nimport useIsoLayoutEffect from './util/useIsoLayoutEffect';\n\nfunction cleanup(ctx: StylixContext): void {\n if (typeof ctx.cleanupRequest !== 'undefined') return;\n\n ctx.cleanupRequest = setTimeout(() => {\n let deleted = false;\n\n for (const i in ctx.rules) {\n const rule = ctx.rules[i];\n if (!rule.refs) {\n delete ctx.rules[rule.hash];\n deleted = true;\n }\n }\n deleted && applyRules(ctx);\n\n delete ctx.cleanupRequest;\n }, 100) as any;\n}\n\nfunction compare(a: any, b: any): any {\n if (a === b) return true;\n if (typeof a !== typeof b) return false;\n if (typeof a === 'object') {\n if (Array.isArray(a) && Array.isArray(b) && a.length !== b.length) return false;\n else if (Object.keys(a).length !== Object.keys(b).length) return false;\n for (const key in b) {\n if (!compare(a[key], b[key])) return false;\n }\n }\n return a === b;\n}\n\n/**\n * Accepts a Stylix CSS object and returns a unique className based on the styles' hash.\n * The styles are registered with the Stylix context and will be applied to the document.\n * If `global` is false, provided styles will be nested within the generated classname.\n * Returns the className hash if enabled, or an empty string.\n */\nexport function useStyles(\n styles: Record<string, any> | undefined,\n options: { global?: boolean; disabled?: boolean } = { global: false, disabled: false },\n): string {\n const stylixCtx = useStylixContext();\n\n const prevRef = useRef({ styles: {}, hash: '' } as any);\n\n const changed = !compare(styles, prevRef.current.styles);\n\n prevRef.current.styles = styles;\n\n if (changed) {\n // Preprocess styles with plugins\n if (!options.disabled && styles)\n styles = applyPlugins('preprocessStyles', styles, null, stylixCtx);\n\n // Serialize value and generate hash\n const json = !options.disabled && styles && JSON.stringify(styles);\n prevRef.current.hash =\n json && json !== '{}' && json !== '[]'\n ? hashString(JSON.stringify(stylixCtx.media || []) + json)\n : '';\n }\n\n const { hash } = prevRef.current;\n\n if (hash && changed && !stylixCtx.rules[hash]) {\n // If not global styles, wrap original styles with classname\n if (!options.global) styles = { ['.' + hash]: styles };\n stylixCtx.rules[hash] = {\n hash,\n rules: stylesToRuleArray(styles, hash, stylixCtx),\n refs: 1,\n };\n stylixCtx.requestApply = true;\n }\n\n // Apply styles if requested.\n // This runs on every render. We utilize useLayoutEffect so that it runs *after* all the other\n // renders have completed. stylixCtx.requestApply guards against multiple runs. This reduces the number of calls\n // to applyRules(), but prevents styles potentially being added to the DOM after other components force the\n // browser to compute styles.\n useIsoLayoutEffect(\n () => {\n if (!stylixCtx.requestApply) return;\n stylixCtx.requestApply = false;\n applyRules(stylixCtx);\n },\n undefined,\n true,\n );\n\n // When hash changes, add/remove ref count\n useIsoLayoutEffect(\n () => {\n if (!hash || !changed) return;\n\n if (stylixCtx.rules[hash]) {\n stylixCtx.rules[hash].refs++;\n }\n\n return () => {\n stylixCtx.rules[hash].refs--;\n cleanup(stylixCtx);\n };\n },\n [hash],\n false,\n );\n\n return hash;\n}\n\nexport function useKeyframes(\n keyframes: any,\n options: { disabled?: boolean } = { disabled: false },\n) {\n return useStyles({ '@keyframes $$class': keyframes }, { global: true, ...options });\n}\n\nexport function useGlobalStyles(\n styles: StylixStyles,\n options: { disabled?: boolean } = { disabled: false },\n) {\n return useStyles(styles, { ...options, global: true });\n}\n","import { StylixContext } from './StylixProvider';\n\n/**\n * Applies rules from given StylixContext to the <style> element.\n */\nexport default function applyRules(ctx: StylixContext): void {\n const flattenedRules: string[] = [];\n\n for (const key in ctx.rules) {\n const val = ctx.rules[key];\n flattenedRules.push(...val.rules);\n }\n\n if (ctx.styleCollector) {\n ctx.styleCollector.length = 0;\n ctx.styleCollector.push(...flattenedRules);\n return;\n }\n\n if (ctx.devMode) {\n ctx.styleElement.innerHTML = flattenedRules.join('\\n');\n } else {\n const container = ctx.stylesheet;\n if (container.cssRules)\n while (container.cssRules.length) {\n container.deleteRule(0);\n }\n for (const i in flattenedRules) container.insertRule(flattenedRules[i], +i);\n }\n}\n","import { applyPlugins } from './plugins';\nimport { StylixContext } from './StylixProvider';\nimport { StylixObject } from './types';\nimport { isPlainObject } from './util/isPlainObject';\n\n/**\n * Converts a Stylix CSS object to an array of rules, suitable for passing to StyleSheet#insertRule.\n */\nexport default function stylesToRuleArray(\n styles: StylixObject,\n hash: string,\n context: StylixContext,\n): string[] {\n try {\n const processedStyles = applyPlugins('processStyles', styles, hash, context);\n\n // serialize to css rules array\n const serialize = function serialize(selector: string, styles: StylixObject) {\n const lines: string[] = [];\n for (const key in styles) {\n const value = styles[key];\n if (isPlainObject(value)) lines.push(serialize(key, value));\n else lines.push(` ${key}: ${value};`);\n }\n return `${selector} {\\n${lines.join('\\n')} }`;\n };\n\n const result: string[] = [];\n for (const key in processedStyles) {\n const value = processedStyles[key];\n result.push(serialize(key, value));\n }\n return result;\n } catch (e) {\n if (e.name && e.reason) {\n console.error(\n `${e.name}: ${e.reason}\\n`,\n e.source.replace('\\n', ' ').substr(Math.max(0, e.column - 20), 100) + '\\n',\n ' '.repeat(20) + '^',\n );\n } else {\n console.error(e);\n }\n return [];\n }\n}\n","/**\n * Cheap string hashing, suitable for generating css class names\n */\nexport function hashString(str: string): string {\n let hash = 5381;\n let i = str.length;\n while (i) hash = (hash * 33) ^ str.charCodeAt(--i);\n return 'stylix-' + (hash >>> 0).toString(36);\n}\n","import React from 'react';\n\nimport { _Stylix } from './Stylix';\nimport { Extends, StylixComponentMeta, StylixStyleProps } from './types';\n\nexport type StylixStyledComponentWithProps<TProps> = React.FC<Extends<TProps, StylixStyleProps>> &\n StylixComponentMeta;\n\nexport type StylixStyledComponent<TComponent extends HtmlOrComponent> =\n StylixStyledComponentWithProps<HtmlOrComponentProps<TComponent>>;\n\nexport type HtmlOrComponent =\n | keyof JSX.IntrinsicElements\n | React.ForwardRefRenderFunction<any, any>;\n\nexport type HtmlOrComponentProps<TComponent extends HtmlOrComponent> =\n TComponent extends keyof JSX.IntrinsicElements\n ? React.ComponentPropsWithRef<TComponent>\n : TComponent extends React.ForwardRefRenderFunction<infer R, infer P>\n ? P & React.RefAttributes<R>\n : never;\n\nexport function styled<\n TComponent extends HtmlOrComponent,\n TPropMap extends Record<string, string> = Record<string, never>,\n>(\n $el: TComponent,\n addProps?: Extends<StylixStyleProps, Partial<HtmlOrComponentProps<TComponent>>>,\n conflictingPropMapping?: TPropMap,\n): StylixStyledComponent<TComponent> {\n const Element: any = typeof $el === 'string' ? ($el as any) : React.forwardRef($el);\n const r: any = React.forwardRef((props: Record<string, any>, ref: React.Ref<unknown>) => {\n if (conflictingPropMapping) {\n for (const k in conflictingPropMapping) {\n props[conflictingPropMapping[k]] = (props as any)[k];\n delete props[k];\n }\n }\n return _Stylix(\n {\n $el: Element,\n ...addProps,\n ...props,\n $css: [addProps?.$css, props?.$css],\n },\n ref as any,\n );\n });\n r.displayName = `$.${\n ($el as React.FC).displayName ||\n ($el as React.FC).name ||\n ($el as string).toString?.() ||\n 'Unnamed'\n }`;\n r.__isStylix = true;\n return r;\n}\n","import React from 'react';\n\nimport { classifyProps } from './classifyProps';\nimport { useStylixContext } from './StylixProvider';\nimport { Stylix$Component, Stylix$Props } from './types';\nimport { useStyles } from './useStyles';\n\nexport function _Stylix<ElType extends React.ElementType>(\n props: Stylix$Props<ElType>,\n ref: React.Ref<ElType>,\n) {\n const { $el, $css, $disabled, className, children, ...rest } = props as any;\n\n const ctx = useStylixContext();\n const [styleProps, otherProps] = classifyProps(rest, ctx.styleProps);\n if ($css) styleProps.$css = $css;\n const hash = useStyles(styleProps, { disabled: $disabled });\n\n const allProps = {\n className: `${hash} ${className || ''}`.trim(),\n ref: ref,\n ...otherProps,\n };\n\n if (React.isValidElement($el)) {\n const $elProps = { ...($el.props as any) };\n allProps.className += ' ' + ($elProps.className || '');\n delete $elProps.className;\n return React.cloneElement(\n $el,\n { ...allProps, ...$elProps },\n ...(React.Children.toArray(children) || []),\n );\n }\n\n return <$el {...allProps}>{children}</$el>;\n}\n\nconst Stylix = React.forwardRef(_Stylix) as unknown as Stylix$Component;\nStylix.displayName = 'Stylix';\nStylix.__isStylix = true;\n\nexport default Stylix;\n","import htmlTags from './html-tags.json';\nimport { styled } from './styled';\nimport Stylix from './Stylix';\n\nfor (const i in htmlTags) {\n // Types are specified in ./types.ts, so we don't care what they type of htmlTags[i] is.\n // JSX.IntrinsicElements is a union of all HTML tags, so it is too complex for TypeScript to infer.\n const tag = htmlTags[i] as any;\n Stylix[tag] = styled(tag);\n}\n","[\n \"a\",\n \"abbr\",\n \"address\",\n \"area\",\n \"article\",\n \"aside\",\n \"audio\",\n \"b\",\n \"base\",\n \"bdi\",\n \"bdo\",\n \"blockquote\",\n \"body\",\n \"br\",\n \"button\",\n \"canvas\",\n \"caption\",\n \"cite\",\n \"code\",\n \"col\",\n \"colgroup\",\n \"data\",\n \"datalist\",\n \"dd\",\n \"del\",\n \"details\",\n \"dfn\",\n \"dialog\",\n \"div\",\n \"dl\",\n \"dt\",\n \"em\",\n \"embed\",\n \"fieldset\",\n \"figcaption\",\n \"figure\",\n \"footer\",\n \"form\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"head\",\n \"header\",\n \"hgroup\",\n \"hr\",\n \"html\",\n \"i\",\n \"iframe\",\n \"img\",\n \"input\",\n \"ins\",\n \"kbd\",\n \"label\",\n \"legend\",\n \"li\",\n \"link\",\n \"main\",\n \"map\",\n \"mark\",\n \"math\",\n \"menu\",\n \"menuitem\",\n \"meta\",\n \"meter\",\n \"nav\",\n \"noscript\",\n \"object\",\n \"ol\",\n \"optgroup\",\n \"option\",\n \"output\",\n \"p\",\n \"param\",\n \"picture\",\n \"pre\",\n \"progress\",\n \"q\",\n \"rb\",\n \"rp\",\n \"rt\",\n \"rtc\",\n \"ruby\",\n \"s\",\n \"samp\",\n \"script\",\n \"section\",\n \"select\",\n \"slot\",\n \"small\",\n \"source\",\n \"span\",\n \"strong\",\n \"style\",\n \"sub\",\n \"summary\",\n \"sup\",\n \"svg\",\n \"table\",\n \"tbody\",\n \"td\",\n \"template\",\n \"textarea\",\n \"tfoot\",\n \"th\",\n \"thead\",\n \"time\",\n \"title\",\n \"tr\",\n \"track\",\n \"u\",\n \"ul\",\n \"var\",\n \"video\",\n \"wbr\"\n]\n"],"names":[],"version":3,"file":"index.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;ACAA;ACAA;AAEO,SAAS,0CAAc,KAAU,EAAE,UAAkC,EAAc;IACxF,MAAM,SAAS,CAAC;IAChB,MAAM,QAAQ,CAAC;IAEf,IAAK,MAAM,QAAQ,MACjB,6DAA6D;IAC7D,IAAI,CAAC,0CAAe,SAAU,0CAAY,MAAM,eAAe,0CAAa,KAAK,CAAC,KAAK,GACrF,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;SAE1B,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;IAI7B,OAAO;QAAC;QAAQ;KAAM;AACxB;AAEO,SAAS,yCAAiB,KAAU,EAAE;IAC3C,MAAM,MA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EAAE,UAAU,CAAC,CAAC,OAA4B,MAA4B;QACvF,IAAI,wBACF,IAAK,MAAM,KAAK,uBAAwB;YACtC,KAAK,CAAC,sBAAsB,CAAC,EAAE,CAAC,GAAG,AAAC,KAAa,CAAC,EAAE;YACpD,OAAO,KAAK,CAAC,EAAE;QACjB;QAEF,OAAO,CAAA,GAAA,yCAAM,EACX;YACE,KAAK;YACL,GAAG,QAAQ;YACX,GAAG,KAAK;YACR,MAAM;gBAAC,UAAU;gBAAM,OAAO;aAAK;QACrC,GACA;IAEJ;IACA,EAAE,WAAW,GAAG,CAAC,EAAE,EACjB,AAAC,IAAiB,WAAW,IAC7B,AAAC,IAAiB,IAAI,IACtB,AAAC,IAAe,QAAQ,QACxB,UACD,CAAC;IACF,EAAE,UAAU,GAAG,IAAI;IACnB,OAAO;AACT;;;;AGrDA,4BAAiB,KAAK,KAAK,CAAC;;ADA5B;;;AAIA,IAAK,MAAM,KAAK,GAAA,gEAAQ,CAAE;IACxB,wFAAwF;IACxF,mGAAmG;IACnG,MAAM,MAAM,CAAA,GAAA,gEAAQ,AAAD,CAAC,CAAC,EAAE;IACvB,CAAA,GAAA,wCAAM,AAAD,CAAC,CAAC,IAAI,GAAG,CAAA,GAAA,yCAAM,AAAD,EAAE;AACvB;","sources":["core/src/index.ts","core/src/StylixProvider.tsx","core/src/classifyProps.ts","core/src/css-props.json","core/src/plugins/index.ts","core/src/plugins/cleanStyles.ts","core/src/util/isPlainObject.ts","core/src/plugins/defaultUnits.ts","core/src/util/mapObjectRecursive.ts","core/src/plugins/flattenNestedStyles.ts","core/src/plugins/mediaArrays.ts","core/src/plugins/merge$css.ts","core/src/util/flatten.ts","core/src/plugins/propCasing.ts","core/src/plugins/replace$$class.ts","core/src/plugins/themeFunctions.ts","core/src/plugins/customProps.ts","core/src/util/walkRecursive.ts","core/src/util/cloneDeep.ts","core/src/styleCollector.tsx","core/src/util/merge.ts","core/src/util/useIsoLayoutEffect.ts","core/src/useStyles.ts","core/src/applyRules.ts","core/src/stylesToRuleArray.ts","core/src/util/hashString.ts","core/src/styled.tsx","core/src/Stylix.tsx","core/src/elements.ts","core/src/html-tags.json"],"sourcesContent":["export {\n type StylixProps,\n type StylixPropsExtensions,\n type Stylix$Component,\n type Stylix$elProp,\n type Stylix$elPropOptional,\n type Extends,\n} from './types';\nexport { useStylixContext, useStylixTheme, StylixProvider, StylixTheme } from './StylixProvider';\nimport { StylixPublicContext } from './StylixProvider';\nexport type StylixContext = StylixPublicContext;\nexport { useStyles, useKeyframes, useGlobalStyles } from './useStyles';\nexport {\n defaultPlugins,\n customProps,\n type StylixPlugin,\n type StylixPluginFunctionContext,\n} from './plugins';\nexport { mapObjectRecursive } from './util/mapObjectRecursive';\nexport { walkRecursive } from './util/walkRecursive';\nexport { createStyleCollector, styleCollectorContext, type StyleCollector } from './styleCollector';\nexport { classifyProps, useClassifyProps } from './classifyProps';\nexport { styled } from './styled';\nimport './elements';\nexport { default } from './Stylix';\n","import React, { createContext, useContext, useRef, useState } from 'react';\n\nimport { simplifyStylePropName } from './classifyProps';\nimport cssProps from './css-props.json';\nimport { applyPlugins, defaultPlugins, StylixPlugin } from './plugins';\nimport { styleCollectorContext } from './styleCollector';\nimport { flatten } from './util/flatten';\nimport { merge } from './util/merge';\nimport useIsoLayoutEffect from './util/useIsoLayoutEffect';\n\n/**\n * Stylix context\n *\n * The <StylixProvider> wrapper represents an \"instance\" of Stylix - a configuration, set of plugins, and reference to\n * the <style> element where css is output. All nodes contained within a <StylixProvider> element will share this\n * Stylix instance's configuration.\n *\n * A StylixProvider internally contains a <StylixTheme>, so you can conveniently provide a theme object and media query\n * array with a single element.\n *\n * See the README for more details.\n */\n\n// StylixProvider component props\ntype StylixProviderProps<Theme = any> = StylixThemeProps<Theme> & {\n id?: string;\n devMode?: boolean;\n plugins?: StylixPlugin[] | StylixPlugin[][];\n styleElement?: HTMLStyleElement;\n children: any;\n};\n\ntype StylixThemeProps<Theme = any> = {\n theme?: Theme;\n media?: string[];\n children: any;\n};\n\n// StylixContext object interface\nexport type StylixContext<Theme = any> = {\n id: string;\n devMode: boolean;\n theme: Theme;\n media: string[];\n plugins: StylixPlugin[];\n stylesheet: CSSStyleSheet;\n styleElement: HTMLStyleElement;\n styleCollector?: string[];\n rules: {\n [key: string]: {\n hash: string;\n rules: string[];\n refs: number;\n };\n };\n styleProps: Record<string, string>;\n cleanupRequest?: number;\n requestApply: boolean;\n};\n\nexport type StylixPublicContext = Pick<\n StylixContext,\n 'id' | 'devMode' | 'theme' | 'media' | 'stylesheet' | 'styleElement' | 'styleProps'\n>;\n\nconst defaultStyleProps: Record<string, string> = {};\nfor (const value of cssProps) {\n defaultStyleProps[simplifyStylePropName(value)] = value;\n}\n\nfunction createStylixContext(userValues = {} as Partial<StylixProviderProps>) {\n const ctx = {\n id: userValues.id || Math.round(Math.random() * 10000).toString(10),\n devMode: userValues.devMode,\n styleProps: defaultStyleProps,\n theme: userValues.theme || null,\n media: userValues.media || null,\n styleElement: userValues.styleElement,\n plugins: flatten<StylixPlugin>(Object.values(defaultPlugins)),\n rules: {},\n cleanupRequest: undefined,\n } as StylixContext;\n\n if (!ctx.styleElement && typeof document !== 'undefined') {\n ctx.styleElement = document.createElement('style');\n if (ctx.id) ctx.styleElement.id = 'stylix-' + ctx.id;\n ctx.styleElement.className = 'stylix';\n document.head.appendChild(ctx.styleElement);\n }\n\n if (ctx.styleElement) ctx.stylesheet = ctx.styleElement.sheet as CSSStyleSheet;\n\n if (userValues.plugins?.length) {\n const flatPlugins = flatten<StylixPlugin>(userValues.plugins);\n for (const i in flatPlugins) {\n const plugin = flatPlugins[i];\n let pluginIndex = -1;\n if (plugin.before && ctx.plugins.includes(plugin.before))\n pluginIndex = ctx.plugins.indexOf(plugin.before);\n if (plugin.after && ctx.plugins.includes(plugin.after))\n pluginIndex = ctx.plugins.indexOf(plugin.after) + 1;\n if (plugin.atIndex !== undefined) pluginIndex = plugin.atIndex;\n if (pluginIndex === -1) ctx.plugins.push(plugin);\n else ctx.plugins.splice(pluginIndex, 0, plugin);\n }\n }\n applyPlugins('initialize', null, null, ctx);\n\n return ctx;\n}\n\n// The React context object\nconst stylixContext = createContext(createStylixContext());\n\n// Convenience wrapper hook that returns the current Stylix context\nexport function useStylixContext<Theme = any>(): StylixContext<Theme> {\n return useContext(stylixContext);\n}\n\n// Convenience wrapper hook that returns just the current Stylix theme\nexport function useStylixTheme<Theme = any>(): Theme {\n return useContext(stylixContext).theme;\n}\n\nexport function StylixProvider({\n id,\n devMode,\n plugins,\n styleElement,\n children,\n ...themeProps\n}: StylixProviderProps): React.ReactElement {\n const ctx = useRef<StylixContext>();\n if (!ctx.current) ctx.current = createStylixContext({ id, devMode, plugins, styleElement });\n\n ctx.current.styleCollector = useContext(styleCollectorContext);\n\n return (\n <stylixContext.Provider value={ctx.current}>\n <StylixTheme {...themeProps}>{children}</StylixTheme>\n </stylixContext.Provider>\n );\n}\n\nfunction mergeContexts(contextA: any, contextB: any) {\n const obj = { ...contextA };\n const themeB = contextB.theme;\n if (contextB) {\n for (const key in contextB) {\n const value = contextB[key];\n if (typeof value !== 'undefined') obj[key] = value;\n }\n }\n obj.theme = merge(contextA.theme || {}, themeB);\n return obj;\n}\n\nexport function StylixTheme({ children, media, theme }: StylixThemeProps) {\n const parentCtx = useContext(stylixContext);\n const [contextValue, setContextValue] = useState(() =>\n mergeContexts(parentCtx, { media, theme }),\n );\n\n // contextValue should only update (and cause re-renders) when relevant properties change.\n // `media` is treated as special because providing an array of strings is easier to do inline,\n // but we don't want to cause descendent re-renders if the values don't change.\n\n useIsoLayoutEffect(\n () => {\n setContextValue(mergeContexts(parentCtx, { media, theme }));\n },\n [parentCtx, media?.join('|') || '', theme],\n false,\n );\n\n return <stylixContext.Provider value={contextValue}>{children}</stylixContext.Provider>;\n}\n","import { useStylixContext } from './StylixProvider';\n\nexport function classifyProps(props: any, knownProps: Record<string, string>): [any, any] {\n const styles = {} as any;\n const other = {} as any;\n\n for (const prop in props) {\n // If prop is not a valid JSX prop, it must be a CSS selector\n if (!isValidJSXProp(prop) || (isStyleProp(prop, knownProps) && isStyleValue(props[prop]))) {\n styles[prop] = props[prop];\n } else {\n other[prop] = props[prop];\n }\n }\n\n return [styles, other];\n}\n\nexport function useClassifyProps(props: any) {\n const ctx = useStylixContext();\n const [styles, other] = classifyProps(props, ctx.styleProps);\n return [styles, other];\n}\n\n/**\n * Determines if `value` is a recognized CSS property (can be standard CSS or custom Stylix prop).\n */\nexport function isStyleProp(prop: string, knownProps: Record<string, string>): boolean {\n return isValidJSXProp(prop) && simplifyStylePropName(prop) in knownProps;\n}\n\nexport function isValidJSXProp(value: string): boolean {\n // Not an exact check, but mostly rules out complex css selectors\n return /^[a-z$][a-z0-9_-]*$/i.test(value);\n}\n\nexport function simplifyStylePropName(value: string) {\n return value.toLowerCase().replace(/[^a-z]/gi, '');\n}\n\n/**\n * Tries to determine if `value` is likely to be a valid CSS property value.\n * We can't be 100% sure, but this should catch most cases.\n * There is a check here to make sure React elements do not pass the test, as this\n * has turned out to be a common case where a property like 'content' means something\n * to a component, but is also a valid CSS property.\n */\nexport function isStyleValue(value: any): boolean {\n return (\n typeof value === 'function' ||\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n Array.isArray(value) ||\n // Check for plain objects, and make sure it doesn't have the $$typeof property (react elements are never valid as style values)\n (typeof value === 'object' && value.constructor === Object && !('$$typeof' in value))\n );\n}\n","[\n \"align-content\",\n \"align-items\",\n \"align-self\",\n \"align-tracks\",\n \"all\",\n \"animation\",\n \"animation-delay\",\n \"animation-direction\",\n \"animation-duration\",\n \"animation-fill-mode\",\n \"animation-iteration-count\",\n \"animation-name\",\n \"animation-play-state\",\n \"animation-timing-function\",\n \"appearance\",\n \"aspect-ratio\",\n \"azimuth\",\n \"backdrop-filter\",\n \"backface-visibility\",\n \"background\",\n \"background-attachment\",\n \"background-blend-mode\",\n \"background-clip\",\n \"background-color\",\n \"background-image\",\n \"background-origin\",\n \"background-position\",\n \"background-position-x\",\n \"background-position-y\",\n \"background-repeat\",\n \"background-size\",\n \"block-overflow\",\n \"block-size\",\n \"border\",\n \"border-block\",\n \"border-block-color\",\n \"border-block-style\",\n \"border-block-width\",\n \"border-block-end\",\n \"border-block-end-color\",\n \"border-block-end-style\",\n \"border-block-end-width\",\n \"border-block-start\",\n \"border-block-start-color\",\n \"border-block-start-style\",\n \"border-block-start-width\",\n \"border-bottom\",\n \"border-bottom-color\",\n \"border-bottom-left-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-style\",\n \"border-bottom-width\",\n \"border-collapse\",\n \"border-color\",\n \"border-end-end-radius\",\n \"border-end-start-radius\",\n \"border-image\",\n \"border-image-outset\",\n \"border-image-repeat\",\n \"border-image-slice\",\n \"border-image-source\",\n \"border-image-width\",\n \"border-inline\",\n \"border-inline-end\",\n \"border-inline-color\",\n \"border-inline-style\",\n \"border-inline-width\",\n \"border-inline-end-color\",\n \"border-inline-end-style\",\n \"border-inline-end-width\",\n \"border-inline-start\",\n \"border-inline-start-color\",\n \"border-inline-start-style\",\n \"border-inline-start-width\",\n \"border-left\",\n \"border-left-color\",\n \"border-left-style\",\n \"border-left-width\",\n \"border-radius\",\n \"border-right\",\n \"border-right-color\",\n \"border-right-style\",\n \"border-right-width\",\n \"border-spacing\",\n \"border-start-end-radius\",\n \"border-start-start-radius\",\n \"border-style\",\n \"border-top\",\n \"border-top-color\",\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-top-style\",\n \"border-top-width\",\n \"border-width\",\n \"bottom\",\n \"box-align\",\n \"box-decoration-break\",\n \"box-direction\",\n \"box-flex\",\n \"box-flex-group\",\n \"box-lines\",\n \"box-ordinal-group\",\n \"box-orient\",\n \"box-pack\",\n \"box-shadow\",\n \"box-sizing\",\n \"break-after\",\n \"break-before\",\n \"break-inside\",\n \"caption-side\",\n \"caret-color\",\n \"clear\",\n \"clip\",\n \"clip-path\",\n \"color\",\n \"color-adjust\",\n \"color-scheme\",\n \"column-count\",\n \"column-fill\",\n \"column-gap\",\n \"column-rule\",\n \"column-rule-color\",\n \"column-rule-style\",\n \"column-rule-width\",\n \"column-span\",\n \"column-width\",\n \"columns\",\n \"contain\",\n \"content\",\n \"content-visibility\",\n \"counter-increment\",\n \"counter-reset\",\n \"counter-set\",\n \"cursor\",\n \"direction\",\n \"display\",\n \"empty-cells\",\n \"filter\",\n \"flex\",\n \"flex-basis\",\n \"flex-direction\",\n \"flex-flow\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"float\",\n \"font\",\n \"font-family\",\n \"font-feature-settings\",\n \"font-kerning\",\n \"font-language-override\",\n \"font-optical-sizing\",\n \"font-variation-settings\",\n \"font-size\",\n \"font-size-adjust\",\n \"font-smooth\",\n \"font-stretch\",\n \"font-style\",\n \"font-synthesis\",\n \"font-variant\",\n \"font-variant-alternates\",\n \"font-variant-caps\",\n \"font-variant-east-asian\",\n \"font-variant-ligatures\",\n \"font-variant-numeric\",\n \"font-variant-position\",\n \"font-weight\",\n \"forced-color-adjust\",\n \"gap\",\n \"grid\",\n \"grid-area\",\n \"grid-auto-columns\",\n \"grid-auto-flow\",\n \"grid-auto-rows\",\n \"grid-column\",\n \"grid-column-end\",\n \"grid-column-gap\",\n \"grid-column-start\",\n \"grid-gap\",\n \"grid-row\",\n \"grid-row-end\",\n \"grid-row-gap\",\n \"grid-row-start\",\n \"grid-template\",\n \"grid-template-areas\",\n \"grid-template-columns\",\n \"grid-template-rows\",\n \"hanging-punctuation\",\n \"height\",\n \"hyphens\",\n \"image-orientation\",\n \"image-rendering\",\n \"image-resolution\",\n \"ime-mode\",\n \"initial-letter\",\n \"initial-letter-align\",\n \"inline-size\",\n \"inset\",\n \"inset-block\",\n \"inset-block-end\",\n \"inset-block-start\",\n \"inset-inline\",\n \"inset-inline-end\",\n \"inset-inline-start\",\n \"isolation\",\n \"justify-content\",\n \"justify-items\",\n \"justify-self\",\n \"justify-tracks\",\n \"left\",\n \"letter-spacing\",\n \"line-break\",\n \"line-clamp\",\n \"line-height\",\n \"line-height-step\",\n \"list-style\",\n \"list-style-image\",\n \"list-style-position\",\n \"list-style-type\",\n \"margin\",\n \"margin-block\",\n \"margin-block-end\",\n \"margin-block-start\",\n \"margin-bottom\",\n \"margin-inline\",\n \"margin-inline-end\",\n \"margin-inline-start\",\n \"margin-left\",\n \"margin-right\",\n \"margin-top\",\n \"margin-trim\",\n \"mask\",\n \"mask-border\",\n \"mask-border-mode\",\n \"mask-border-outset\",\n \"mask-border-repeat\",\n \"mask-border-slice\",\n \"mask-border-source\",\n \"mask-border-width\",\n \"mask-clip\",\n \"mask-composite\",\n \"mask-image\",\n \"mask-mode\",\n \"mask-origin\",\n \"mask-position\",\n \"mask-repeat\",\n \"mask-size\",\n \"mask-type\",\n \"masonry-auto-flow\",\n \"math-style\",\n \"max-block-size\",\n \"max-height\",\n \"max-inline-size\",\n \"max-lines\",\n \"max-width\",\n \"min-block-size\",\n \"min-height\",\n \"min-inline-size\",\n \"min-width\",\n \"mix-blend-mode\",\n \"object-fit\",\n \"object-position\",\n \"offset\",\n \"offset-anchor\",\n \"offset-distance\",\n \"offset-path\",\n \"offset-position\",\n \"offset-rotate\",\n \"opacity\",\n \"order\",\n \"orphans\",\n \"outline\",\n \"outline-color\",\n \"outline-offset\",\n \"outline-style\",\n \"outline-width\",\n \"overflow\",\n \"overflow-anchor\",\n \"overflow-block\",\n \"overflow-clip-box\",\n \"overflow-clip-margin\",\n \"overflow-inline\",\n \"overflow-wrap\",\n \"overflow-x\",\n \"overflow-y\",\n \"overscroll-behavior\",\n \"overscroll-behavior-block\",\n \"overscroll-behavior-inline\",\n \"overscroll-behavior-x\",\n \"overscroll-behavior-y\",\n \"padding\",\n \"padding-block\",\n \"padding-block-end\",\n \"padding-block-start\",\n \"padding-bottom\",\n \"padding-inline\",\n \"padding-inline-end\",\n \"padding-inline-start\",\n \"padding-left\",\n \"padding-right\",\n \"padding-top\",\n \"page-break-after\",\n \"page-break-before\",\n \"page-break-inside\",\n \"paint-order\",\n \"perspective\",\n \"perspective-origin\",\n \"place-content\",\n \"place-items\",\n \"place-self\",\n \"pointer-events\",\n \"position\",\n \"quotes\",\n \"resize\",\n \"right\",\n \"rotate\",\n \"row-gap\",\n \"ruby-align\",\n \"ruby-merge\",\n \"ruby-position\",\n \"scale\",\n \"scrollbar-color\",\n \"scrollbar-gutter\",\n \"scrollbar-width\",\n \"scroll-behavior\",\n \"scroll-margin\",\n \"scroll-margin-block\",\n \"scroll-margin-block-start\",\n \"scroll-margin-block-end\",\n \"scroll-margin-bottom\",\n \"scroll-margin-inline\",\n \"scroll-margin-inline-start\",\n \"scroll-margin-inline-end\",\n \"scroll-margin-left\",\n \"scroll-margin-right\",\n \"scroll-margin-top\",\n \"scroll-padding\",\n \"scroll-padding-block\",\n \"scroll-padding-block-start\",\n \"scroll-padding-block-end\",\n \"scroll-padding-bottom\",\n \"scroll-padding-inline\",\n \"scroll-padding-inline-start\",\n \"scroll-padding-inline-end\",\n \"scroll-padding-left\",\n \"scroll-padding-right\",\n \"scroll-padding-top\",\n \"scroll-snap-align\",\n \"scroll-snap-coordinate\",\n \"scroll-snap-destination\",\n \"scroll-snap-points-x\",\n \"scroll-snap-points-y\",\n \"scroll-snap-stop\",\n \"scroll-snap-type\",\n \"scroll-snap-type-x\",\n \"scroll-snap-type-y\",\n \"shape-image-threshold\",\n \"shape-margin\",\n \"shape-outside\",\n \"tab-size\",\n \"table-layout\",\n \"text-align\",\n \"text-align-last\",\n \"text-combine-upright\",\n \"text-decoration\",\n \"text-decoration-color\",\n \"text-decoration-line\",\n \"text-decoration-skip\",\n \"text-decoration-skip-ink\",\n \"text-decoration-style\",\n \"text-decoration-thickness\",\n \"text-emphasis\",\n \"text-emphasis-color\",\n \"text-emphasis-position\",\n \"text-emphasis-style\",\n \"text-indent\",\n \"text-justify\",\n \"text-orientation\",\n \"text-overflow\",\n \"text-rendering\",\n \"text-shadow\",\n \"text-size-adjust\",\n \"text-transform\",\n \"text-underline-offset\",\n \"text-underline-position\",\n \"top\",\n \"touch-action\",\n \"transform\",\n \"transform-box\",\n \"transform-origin\",\n \"transform-style\",\n \"transition\",\n \"transition-delay\",\n \"transition-duration\",\n \"transition-property\",\n \"transition-timing-function\",\n \"translate\",\n \"unicode-bidi\",\n \"user-select\",\n \"vertical-align\",\n \"visibility\",\n \"white-space\",\n \"widows\",\n \"width\",\n \"will-change\",\n \"word-break\",\n \"word-spacing\",\n \"word-wrap\",\n \"writing-mode\",\n \"z-index\",\n \"zoom\"\n]\n","import { StylixContext, StylixPublicContext } from '../StylixProvider';\nimport { cleanStyles } from './cleanStyles';\nimport { defaultPixelUnits } from './defaultUnits';\nimport { flattenNestedStyles } from './flattenNestedStyles';\nimport { mediaArrays } from './mediaArrays';\nimport { merge$css } from './merge$css';\nimport { propCasing } from './propCasing';\nimport { replace$$class } from './replace$$class';\nimport { themeFunctions } from './themeFunctions';\n\n/**\n * Stylix plugin function context object\n */\nexport type StylixPluginFunctionContext = StylixPublicContext & { hash: string | null };\n\n/**\n * Stylix plugin interface\n */\nexport interface StylixPlugin {\n name: string;\n type: 'initialize' | 'processStyles' | 'preprocessStyles';\n plugin(ctx: StylixPluginFunctionContext, styles: any): any;\n before?: StylixPlugin;\n after?: StylixPlugin;\n atIndex?: number;\n}\n\nexport function applyPlugins(\n type: StylixPlugin['type'],\n styles: any,\n hash: string | null,\n context: StylixContext,\n) {\n const pluginContext = {\n id: context.id,\n devMode: context.devMode,\n theme: context.theme,\n media: context.media,\n stylesheet: context.stylesheet,\n styleElement: context.styleElement,\n styleProps: context.styleProps,\n hash,\n };\n\n let processedStyles = styles;\n for (const i in context.plugins) {\n const plugin = context.plugins[i];\n if (plugin.type === type) processedStyles = plugin.plugin(pluginContext, processedStyles);\n }\n return processedStyles;\n}\n\nexport { customProps } from './customProps';\n\nexport const defaultPlugins = {\n themeFunctions,\n merge$css,\n mediaArrays,\n propCasing,\n flattenNestedStyles,\n replace$$class,\n defaultPixelUnits,\n cleanStyles,\n};\n","import { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\nfunction cleanObject(object: any): any {\n for (const key in object) {\n const value = object[key];\n if (value === null || value === undefined || value === '') delete object[key];\n else if (isPlainObject(value) || Array.isArray(value)) {\n cleanObject(value);\n if (!Object.keys(value).length) delete object[key];\n }\n }\n return object;\n}\n\n/**\n * Fixes casing and hyphenation on known style props\n */\nexport const cleanStyles: StylixPlugin = {\n name: 'cleanStyles',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return cleanObject(styles);\n },\n};\n","/**\n * Indicates that an object is most likely just an object literal.\n */\nexport function isPlainObject(obj: any): obj is Record<string, any> {\n return typeof obj === 'object' && obj?.constructor === Object;\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin } from './index';\n\nexport const defaultIgnoreUnits = [\n 'columns',\n 'column-count',\n 'fill-opacity',\n 'flex',\n 'flex-grow',\n 'flex-shrink',\n 'font-weight',\n 'line-height',\n 'opacity',\n 'orphans',\n 'stroke-opacity',\n 'widows',\n 'z-index',\n 'zoom',\n 'order',\n];\n\n/**\n * Adds unit (px, em, etc) to numeric values for any style properties not included in `ignoreProps`..\n */\nexport const defaultUnits = (unit = 'px', ignoreProps = defaultIgnoreUnits): StylixPlugin => {\n return {\n name: 'defaultUnits',\n type: 'processStyles',\n plugin(ctx, styles: any) {\n return mapObjectRecursive(styles, defaultUnitsMap, { unit, ignoreProps });\n },\n };\n};\n\nconst defaultUnitsMap = (key: string | number, value: any, object :any, ctx:any) => {\n if (typeof value === 'number' && !ctx.ignoreProps.includes(key as string)) {\n return { [key]: String(value) + ctx.unit };\n }\n};\n\nexport const defaultPixelUnits = defaultUnits();\n","import { isPlainObject } from './isPlainObject';\n\n/**\n * Invokes `map` on each key/value pair in `object`. The key/value pair is deleted from the object and replaced by\n * merging in the object returned from `map`. Recursively descends into all object and array values.\n * The `map` function will receive the key, the value, the current object being mapped, and a context object.\n * The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to\n * `map` on child properties of `value`.\n */\nexport function mapObjectRecursive(\n object: any,\n map: (\n key: string | number,\n value: any,\n object: any,\n context: any,\n ) => Record<string | number, any> | undefined,\n context: any = {},\n) {\n const clone: any = Array.isArray(object) ? [] : {};\n\n for (const k of Object.keys(object)) {\n let key: string | number = k;\n const value = object[key];\n\n if (Array.isArray(object)) key = +key;\n const contextClone = { ...context };\n let result = map(key, value, object, contextClone);\n if (typeof result !== 'undefined' && typeof result !== 'object' && !Array.isArray(result))\n throw new Error(\n 'mapObjectRecursive: return value of map function must be undefined, object, or array!',\n );\n if (typeof result === 'undefined') {\n result = { [key]: value };\n }\n for (const kk in result) {\n let value = result[kk];\n if (isPlainObject(value) || Array.isArray(value))\n value = mapObjectRecursive(value, map, contextClone);\n if (typeof value !== 'undefined') clone[kk] = value;\n }\n }\n\n return clone;\n}\n","import { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\nfunction flatten(styles: any, parent: any, selector: string, root: any, mediaRoot: any) {\n for (let key in styles) {\n const value = styles[key];\n if (key.startsWith('@media')) {\n // Flatten media queries, but nest them under the root object\n root[key] = root[key] || {};\n flatten(value, root[key], selector, root, root[key]);\n } else if (key.startsWith('@keyframes')) {\n // Add keyframe rules as-is directly to mediaRoot object\n mediaRoot[key] = value;\n } else if (isPlainObject(styles[key])) {\n // Concatenate or replace & in selectors and then continue flattening styles\n if (key.includes('&')) {\n key = key.replace(/&/g, selector);\n } else {\n key = (selector + ' ' + key).trim();\n }\n parent[key] = parent[key] || {};\n flatten(value, parent, key, root, mediaRoot);\n } else {\n // Selector is just a css property\n parent[selector] = parent[selector] || {};\n parent[selector][key] = styles[key];\n }\n }\n}\n\n/**\n * Flattens nested style objects that use `&` to reference parent class.\n */\nexport const flattenNestedStyles: StylixPlugin = {\n name: 'flattenNestedStyles',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n const flattened = {};\n flatten(styles, flattened, '', flattened, flattened);\n return flattened;\n },\n};\n","import { isPlainObject } from '../util/isPlainObject';\nimport { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Expands arrays as media queries.\n */\nexport const mediaArrays: StylixPlugin = {\n name: 'mediaArrays',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n // Fill out ditto values\n styles = mapObjectRecursive(styles, mapDittoValues);\n const mediaStyles: any = {};\n let nonMediaStyles = styles;\n for (const i in ctx.media) {\n const mediaQuery = ctx.media[i];\n if (!mediaQuery) {\n nonMediaStyles = mapObjectRecursive(styles, mapNonMedia, { i });\n } else {\n mediaStyles[`@media ${mediaQuery}`] = mapObjectRecursive(styles, mapMediaStyles, { i });\n }\n }\n return { ...nonMediaStyles, ...mediaStyles };\n },\n};\n\nfunction mapDittoValues(key: string | number, value: any) {\n if (Array.isArray(value)) {\n for (const i in value) {\n const v = value[i];\n if (v === '@') value[i] = value[+i - 1];\n }\n return { [key]: value };\n }\n}\n\nfunction mapNonMedia(key: string| number, value: any, object: any, context: any) {\n if (Array.isArray(value)) {\n return { [key]: value[context.i] };\n }\n}\n\nfunction mapMediaStyles(key: string | number, value: any, object: any, context: any) {\n if (typeof key === 'number') return; // Not possible, but here for TS\n if (key.startsWith('@keyframes')) context.keyframes = true;\n if (Array.isArray(value)) {\n return { [key]: value[context.i] };\n }\n if (isPlainObject(value) || context.keyframes) {\n return;\n }\n // delete key/value pair if primitive\n return { [key]: undefined };\n}\n","import { flatten } from '../util/flatten';\nimport { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Merges $css property into parent styles\n */\nexport const merge$css: StylixPlugin = {\n name: 'merge$css',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n const result = {};\n _merge$css(styles, result);\n return result;\n },\n};\n\nexport function _merge$css(obj: any, ctx: any) {\n if (!isPlainObject(obj)) return;\n for (const key in obj) {\n if (key === '$css') {\n const $css = obj[key];\n if (Array.isArray($css)) {\n const flat$css = flatten($css);\n for (const val of flat$css) {\n _merge$css(val, ctx);\n }\n } else {\n _merge$css($css, ctx);\n }\n } else {\n let value = obj[key];\n if (isPlainObject(value)) {\n value = ctx[key] || {};\n _merge$css(obj[key], value);\n }\n ctx[key] = value;\n }\n }\n}\n","/**\n * Flatten an array recursively.\n */\nexport function flatten<TEntryType>(array: unknown[]): TEntryType[] {\n const result: unknown[] = [];\n _flatten(array, result);\n return result as TEntryType[];\n}\n\nfunction _flatten(array: unknown[], result: unknown[]): void {\n for (let i = 0; i < array.length; i++) {\n const value = array[i];\n Array.isArray(value) ? _flatten(value as any, result) : result.push(value);\n }\n}\n","import { simplifyStylePropName } from '../classifyProps';\nimport { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Fixes casing and hyphenation on known style props\n */\nexport const propCasing: StylixPlugin = {\n name: 'normalizeStyleProps',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, propCasingMap, { ctx });\n },\n};\n\nfunction propCasingMap(key: string | number, value: any, object: any, context: any) {\n if (typeof key === 'string' && context.ctx.styleProps[simplifyStylePropName(key)]) {\n return { [context.ctx.styleProps[simplifyStylePropName(key)]]: value };\n }\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Replaces $$class with hash in string values\n */\nexport const replace$$class: StylixPlugin = {\n name: 'replace$$class',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, replace$$classMap, { ctx });\n },\n};\n\nfunction replace$$classMap(key: string | number, value: any, object: any, context: any) {\n value = typeof value === 'string' ? value.replace('$$class', context.ctx.hash) : value;\n key = typeof key === 'string' ? key.replace('$$class', context.ctx.hash) : key;\n return { [key]: value };\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Evaluates functions in style objects, providing the theme and media from the current Stylix context.\n */\nexport const themeFunctions: StylixPlugin = {\n name: 'themeFunctions',\n type: 'preprocessStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, themeFunctionsMap, { ctx });\n },\n};\n\nfunction themeFunctionsMap(key: string | number, value: any, object: any, context: any) {\n if (typeof value === 'function') {\n return { [key]: value(context.ctx.theme, context.ctx) };\n }\n}\n","import { isValidJSXProp, simplifyStylePropName } from '../classifyProps';\nimport { isPlainObject } from '../util/isPlainObject';\nimport { walkRecursive } from '../util/walkRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\nimport { mediaArrays } from './mediaArrays';\n\nexport const customProps = (customProps: Record<string, any>): StylixPlugin[] => {\n for (const key in customProps) {\n customProps[simplifyStylePropName(key)] = customProps[key];\n }\n\n return [\n {\n name: 'customPropsInit',\n type: 'initialize',\n plugin(ctx: StylixPluginFunctionContext) {\n for (const key in customProps) {\n ctx.styleProps[simplifyStylePropName(key)] = key;\n }\n },\n },\n {\n name: 'customPropsProcess',\n type: 'processStyles',\n before: mediaArrays,\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return walkRecursive(styles, (key, value, object) => {\n if (!isValidJSXProp(key) || isPlainObject(value)) return;\n\n const simpleKey = simplifyStylePropName(key);\n const propValue = customProps[simpleKey];\n if (!propValue) return;\n\n const objectClone = { ...object };\n const keys = Object.keys(object);\n const afterKeys = keys.slice(keys.indexOf(key) + 1);\n\n const newStyles: any = {};\n if (typeof propValue === 'object') {\n if (value) Object.assign(newStyles, propValue);\n } else if (typeof propValue === 'string') {\n newStyles[propValue] = value;\n } else if (typeof propValue === 'function') {\n Object.assign(newStyles, propValue(value));\n }\n delete object[key];\n Object.assign(object, newStyles);\n for (const k of afterKeys) {\n const val = objectClone[k];\n delete object[k];\n object[k] = val;\n }\n });\n },\n },\n ];\n};\n","import { cloneDeep } from './cloneDeep';\nimport { isPlainObject } from './isPlainObject';\n\n/**\n * Invokes a callback for each key/value pair in `object`, and continues recursively on each value that is an array or a\n * plain object. Returns `object`.\n * The `cb` function will receive the key, the value, the current object being mapped, and a context object.\n * The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to\n * `map` on child properties of `value`.\n */\nexport function walkRecursive<T extends Record<string, any> = any>(\n object: T,\n cb: (key: string, value: any, currentObject: any, context: any) => void,\n context?: any,\n): T {\n const keys = Object.keys(object);\n for (const key of keys) {\n const value = object[key];\n cb(key, value, object, context);\n if (Array.isArray(value) || isPlainObject(value)) {\n const contextClone = cloneDeep(context);\n walkRecursive(value, cb, contextClone);\n }\n }\n return object;\n}\n","import { isPlainObject } from './isPlainObject';\n\n/**\n * Deeply clones a value.\n */\nexport function cloneDeep<T>(value: T): T {\n if (!value || typeof value !== 'object') return value;\n if (Array.isArray(value)) {\n const clone: any = [];\n for (let index = 0; index < value.length; ++index) {\n clone.push(cloneDeep(value[index]));\n }\n return clone;\n }\n if (isPlainObject(value)) {\n const clone: any = {};\n for (const key in value) {\n clone[key] = cloneDeep(value[key]);\n }\n return clone;\n }\n return value;\n}\n","import React, { createContext } from 'react';\n\nexport interface StyleCollector {\n collect: (element: React.ReactElement) => React.ReactElement;\n render: React.FC<React.ComponentProps<'style'>>;\n styles: string[];\n}\n\nexport const styleCollectorContext = createContext<string[]>(null);\n\nexport function createStyleCollector() {\n const styles: string[] = [];\n const collector: StyleCollector = {\n collect: (element) => (\n <styleCollectorContext.Provider value={styles}>{element}</styleCollectorContext.Provider>\n ),\n render: (props: React.ComponentProps<'style'>) => (\n <style\n type=\"text/css\"\n key={props.id || 'stylix'}\n {...props}\n dangerouslySetInnerHTML={{ __html: collector.styles.join(' ') }}\n />\n ),\n styles,\n };\n collector.render.displayName = 'StylixStyleCollectorRenderer';\n return collector;\n}\n","import { isPlainObject } from './isPlainObject';\n\nexport function merge<A>(a?: A): A;\nexport function merge<A, B>(a: A, b: B): A & B;\nexport function merge<A, B, C>(a: A, b: B, c: C): A & B & C;\nexport function merge<A, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;\nexport function merge<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E;\n\nexport function merge(...items: unknown[]) {\n items = items.filter((item) => typeof item !== 'undefined' && item !== null);\n if (!items?.length) return undefined;\n\n if (items.length === 1) return items[0];\n\n // If items are not all objects/arrays, return the last object/array if possible, otherwise last non-undefined value\n if (!items.every((item) => Array.isArray(item) || isPlainObject(item))) {\n items.reverse();\n return (\n items.find((item) => Array.isArray(item) || isPlainObject(item)) ||\n items.find((item) => typeof item !== 'undefined')\n );\n }\n\n const merged: any = Array.isArray(items[0]) ? [] : {};\n for (const item of items) {\n if (!Array.isArray(item) && !isPlainObject(item)) return merged;\n\n const keys: any[] = [...Object.keys(item), ...Object.getOwnPropertySymbols(item)];\n for (const key of keys) {\n const result = merge(merged[key], item[key]);\n if (typeof result !== 'undefined') merged[key] = result;\n }\n }\n return merged;\n}\n","import { useLayoutEffect } from 'react';\n\nconst useIsoLayoutEffect =\n typeof window !== 'undefined' && 'document' in window\n ? (fn: () => void | (() => void), deps?: unknown[], _runOnSsr?: boolean) => useLayoutEffect(fn, deps)\n : (fn: () => void | (() => void), _deps?: unknown[], runOnSsr?: boolean) => (runOnSsr ? fn() : null);\n\nexport default useIsoLayoutEffect;\n","import { useRef } from 'react';\n\nimport applyRules from './applyRules';\nimport { applyPlugins } from './plugins';\nimport stylesToRuleArray from './stylesToRuleArray';\nimport { StylixContext, useStylixContext } from './StylixProvider';\nimport { StylixStyles } from './types';\nimport { hashString } from './util/hashString';\nimport useIsoLayoutEffect from './util/useIsoLayoutEffect';\n\nfunction cleanup(ctx: StylixContext): void {\n if (typeof ctx.cleanupRequest !== 'undefined') return;\n\n ctx.cleanupRequest = setTimeout(() => {\n let deleted = false;\n\n for (const i in ctx.rules) {\n const rule = ctx.rules[i];\n if (!rule.refs) {\n delete ctx.rules[rule.hash];\n deleted = true;\n }\n }\n deleted && applyRules(ctx);\n\n delete ctx.cleanupRequest;\n }, 100) as any;\n}\n\nfunction compare(a: any, b: any): any {\n if (a === b) return true;\n if (typeof a !== typeof b) return false;\n if (typeof a === 'object') {\n if (Array.isArray(a) && Array.isArray(b) && a.length !== b.length) return false;\n else if (Object.keys(a).length !== Object.keys(b).length) return false;\n for (const key in b) {\n if (!compare(a[key], b[key])) return false;\n }\n }\n return a === b;\n}\n\n/**\n * Accepts a Stylix CSS object and returns a unique className based on the styles' hash.\n * The styles are registered with the Stylix context and will be applied to the document.\n * If `global` is false, provided styles will be nested within the generated classname.\n * Returns the className hash if enabled, or an empty string.\n */\nexport function useStyles(\n styles: Record<string, any>,\n options: { global?: boolean; disabled?: boolean } = { global: false, disabled: false },\n): string {\n const stylixCtx = useStylixContext();\n\n const prevRef = useRef({ styles: {}, hash: '' } as any);\n\n const changed = !compare(styles, prevRef.current.styles);\n\n prevRef.current.styles = styles;\n\n if (changed) {\n // Preprocess styles with plugins\n if (!options.disabled && styles)\n styles = applyPlugins('preprocessStyles', styles, null, stylixCtx);\n\n // Serialize value and generate hash\n const json = !options.disabled && styles && JSON.stringify(styles);\n prevRef.current.hash =\n json && json !== '{}' && json !== '[]'\n ? hashString(JSON.stringify(stylixCtx.media || []) + json)\n : '';\n }\n\n const { hash } = prevRef.current;\n\n if (hash && changed && !stylixCtx.rules[hash]) {\n // If not global styles, wrap original styles with classname\n if (!options.global) styles = { ['.' + hash]: styles };\n stylixCtx.rules[hash] = {\n hash,\n rules: stylesToRuleArray(styles, hash, stylixCtx),\n refs: 1,\n };\n stylixCtx.requestApply = true;\n }\n\n // Apply styles if requested.\n // This runs on every render. We utilize useLayoutEffect so that it runs *after* all the other\n // renders have completed. stylixCtx.requestApply guards against multiple runs. This reduces the number of calls\n // to applyRules(), but prevents styles potentially being added to the DOM after other components force the\n // browser to compute styles.\n useIsoLayoutEffect(\n () => {\n if (!stylixCtx.requestApply) return;\n stylixCtx.requestApply = false;\n applyRules(stylixCtx);\n },\n undefined,\n true,\n );\n\n // When hash changes, add/remove ref count\n useIsoLayoutEffect(\n () => {\n if (!hash || !changed) return;\n\n if (stylixCtx.rules[hash]) {\n stylixCtx.rules[hash].refs++;\n }\n\n return () => {\n stylixCtx.rules[hash].refs--;\n cleanup(stylixCtx);\n };\n },\n [hash],\n false,\n );\n\n return hash;\n}\n\nexport function useKeyframes(\n keyframes: any,\n options: { disabled?: boolean } = { disabled: false },\n) {\n return useStyles({ '@keyframes $$class': keyframes }, { global: true, ...options });\n}\n\nexport function useGlobalStyles(\n styles: StylixStyles,\n options: { disabled?: boolean } = { disabled: false },\n) {\n return useStyles(styles, { ...options, global: true });\n}\n","import { StylixContext } from './StylixProvider';\n\n/**\n * Applies rules from given StylixContext to the <style> element.\n */\nexport default function applyRules(ctx: StylixContext): void {\n const flattenedRules: string[] = [];\n\n for (const key in ctx.rules) {\n const val = ctx.rules[key];\n flattenedRules.push(...val.rules);\n }\n\n if (ctx.styleCollector) {\n ctx.styleCollector.length = 0;\n ctx.styleCollector.push(...flattenedRules);\n return;\n }\n\n if (ctx.devMode) {\n ctx.styleElement.innerHTML = flattenedRules.join('\\n');\n } else {\n const container = ctx.stylesheet;\n if (container.cssRules)\n while (container.cssRules.length) {\n container.deleteRule(0);\n }\n for (const i in flattenedRules) container.insertRule(flattenedRules[i], +i);\n }\n}\n","import { applyPlugins } from './plugins';\nimport { StylixContext } from './StylixProvider';\nimport { StylixObject } from './types';\nimport { isPlainObject } from './util/isPlainObject';\n\n/**\n * Converts a Stylix CSS object to an array of rules, suitable for passing to StyleSheet#insertRule.\n */\nexport default function stylesToRuleArray(\n styles: StylixObject,\n hash: string,\n context: StylixContext,\n): string[] {\n try {\n const processedStyles = applyPlugins('processStyles', styles, hash, context);\n\n // serialize to css rules array\n const serialize = function serialize(selector: string, styles: StylixObject) {\n const lines: string[] = [];\n for (const key in styles) {\n const value = styles[key];\n if (isPlainObject(value)) lines.push(serialize(key, value));\n else lines.push(` ${key}: ${value};`);\n }\n return `${selector} {\\n${lines.join('\\n')} }`;\n };\n\n const result: string[] = [];\n for (const key in processedStyles) {\n const value = processedStyles[key];\n result.push(serialize(key, value));\n }\n return result;\n } catch (e) {\n if (e.name && e.reason) {\n console.error(\n `${e.name}: ${e.reason}\\n`,\n e.source.replace('\\n', ' ').substr(Math.max(0, e.column - 20), 100) + '\\n',\n ' '.repeat(20) + '^',\n );\n } else {\n console.error(e);\n }\n return [];\n }\n}\n","/**\n * Cheap string hashing, suitable for generating css class names\n */\nexport function hashString(str: string): string {\n let hash = 5381;\n let i = str.length;\n while (i) hash = (hash * 33) ^ str.charCodeAt(--i);\n return 'stylix-' + (hash >>> 0).toString(36);\n}\n","import React from 'react';\n\nimport { _Stylix } from './Stylix';\nimport { Extends, StylixComponentMeta, StylixStyleProps } from './types';\n\nexport type StylixStyledComponent<TProps> = React.FC<Extends<StylixStyleProps, TProps>> &\n StylixComponentMeta;\n\nexport type HtmlOrComponent =\n | keyof JSX.IntrinsicElements\n | React.ForwardRefRenderFunction<any, any>;\n\nexport type HtmlOrComponentProps<TComponent extends HtmlOrComponent> =\n TComponent extends keyof JSX.IntrinsicElements\n ? React.ComponentPropsWithRef<TComponent>\n : TComponent extends React.ForwardRefRenderFunction<infer R, infer P>\n ? P & React.RefAttributes<R>\n : never;\n\nexport function styled<\n TComponent extends HtmlOrComponent,\n TPropMap extends Record<string, string> = Record<string, never>,\n>(\n $el: TComponent,\n addProps?: Partial<HtmlOrComponentProps<TComponent>>,\n conflictingPropMapping?: TPropMap,\n): StylixStyledComponent<HtmlOrComponentProps<TComponent>> {\n const Element: any = typeof $el === 'string' ? ($el as any) : React.forwardRef($el);\n const r: any = React.forwardRef((props: Record<string, any>, ref: React.Ref<unknown>) => {\n if (conflictingPropMapping) {\n for (const k in conflictingPropMapping) {\n props[conflictingPropMapping[k]] = (props as any)[k];\n delete props[k];\n }\n }\n return _Stylix(\n {\n $el: Element,\n ...addProps,\n ...props,\n $css: [addProps?.$css, props?.$css],\n },\n ref as any,\n );\n });\n r.displayName = `$.${\n ($el as React.FC).displayName ||\n ($el as React.FC).name ||\n ($el as string).toString?.() ||\n 'Unnamed'\n }`;\n r.__isStylix = true;\n return r;\n}\n","import React from 'react';\n\nimport { classifyProps } from './classifyProps';\nimport { useStylixContext } from './StylixProvider';\nimport { Stylix$Component, Stylix$Props } from './types';\nimport { useStyles } from './useStyles';\n\nexport function _Stylix<ElType extends React.ElementType>(\n props: Stylix$Props<ElType>,\n ref: React.Ref<ElType>,\n) {\n const { $el, $css, $disabled, className, children, ...rest } = props as any;\n\n const ctx = useStylixContext();\n const [styleProps, otherProps] = classifyProps(rest, ctx.styleProps);\n if ($css) styleProps.$css = $css;\n const hash = useStyles(styleProps, { disabled: $disabled });\n\n const allProps = {\n className: `${hash} ${className || ''}`.trim(),\n ref: ref,\n ...otherProps,\n };\n\n if (React.isValidElement($el)) {\n const $elProps = { ...($el.props as any) };\n allProps.className += ' ' + ($elProps.className || '');\n delete $elProps.className;\n return React.cloneElement(\n $el,\n { ...allProps, ...$elProps },\n ...(React.Children.toArray(children) || []),\n );\n }\n\n return <$el {...allProps}>{children}</$el>;\n}\n\nconst Stylix = React.forwardRef(_Stylix) as unknown as Stylix$Component;\nStylix.displayName = 'Stylix';\nStylix.__isStylix = true;\n\nexport default Stylix;\n","import htmlTags from './html-tags.json';\nimport { styled } from './styled';\nimport Stylix from './Stylix';\n\nfor (const i in htmlTags) {\n // Types are specified in ./types.ts, so we don't care what they type of htmlTags[i] is.\n // JSX.IntrinsicElements is a union of all HTML tags, so it is too complex for TypeScript to infer.\n const tag = htmlTags[i] as any;\n Stylix[tag] = styled(tag);\n}\n","[\n \"a\",\n \"abbr\",\n \"address\",\n \"area\",\n \"article\",\n \"aside\",\n \"audio\",\n \"b\",\n \"base\",\n \"bdi\",\n \"bdo\",\n \"blockquote\",\n \"body\",\n \"br\",\n \"button\",\n \"canvas\",\n \"caption\",\n \"cite\",\n \"code\",\n \"col\",\n \"colgroup\",\n \"data\",\n \"datalist\",\n \"dd\",\n \"del\",\n \"details\",\n \"dfn\",\n \"dialog\",\n \"div\",\n \"dl\",\n \"dt\",\n \"em\",\n \"embed\",\n \"fieldset\",\n \"figcaption\",\n \"figure\",\n \"footer\",\n \"form\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"head\",\n \"header\",\n \"hgroup\",\n \"hr\",\n \"html\",\n \"i\",\n \"iframe\",\n \"img\",\n \"input\",\n \"ins\",\n \"kbd\",\n \"label\",\n \"legend\",\n \"li\",\n \"link\",\n \"main\",\n \"map\",\n \"mark\",\n \"math\",\n \"menu\",\n \"menuitem\",\n \"meta\",\n \"meter\",\n \"nav\",\n \"noscript\",\n \"object\",\n \"ol\",\n \"optgroup\",\n \"option\",\n \"output\",\n \"p\",\n \"param\",\n \"picture\",\n \"pre\",\n \"progress\",\n \"q\",\n \"rb\",\n \"rp\",\n \"rt\",\n \"rtc\",\n \"ruby\",\n \"s\",\n \"samp\",\n \"script\",\n \"section\",\n \"select\",\n \"slot\",\n \"small\",\n \"source\",\n \"span\",\n \"strong\",\n \"style\",\n \"sub\",\n \"summary\",\n \"sup\",\n \"svg\",\n \"table\",\n \"tbody\",\n \"td\",\n \"template\",\n \"textarea\",\n \"tfoot\",\n \"th\",\n \"thead\",\n \"time\",\n \"title\",\n \"tr\",\n \"track\",\n \"u\",\n \"ul\",\n \"var\",\n \"video\",\n \"wbr\"\n]\n"],"names":[],"version":3,"file":"module.mjs.map"}
1
+ {"mappings":";;;;;ACAA;ACAA;AAEO,SAAS,0CAAc,KAAU,EAAE,UAAkC,EAAc;IACxF,MAAM,SAAS,CAAC;IAChB,MAAM,QAAQ,CAAC;IAEf,IAAK,MAAM,QAAQ,MACjB,6DAA6D;IAC7D,IAAI,CAAC,0CAAe,SAAU,0CAAY,MAA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,GAAG,IAAI;IAExB,2CAAe;;;ADpBR,SAAS,0CAId,GAAe,EACf,QAA+E,EAC/E,sBAAiC,EACE;IACnC,MAAM,UAAe,OAAO,QAAQ,WAAY,oBAAc,CAAA,GAAA,YAAK,AAAD,EAAE,UAAU,CAAC,IAAI;IACnF,MAAM,kBAAS,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,CAAC,OAA4B,MAA4B;QACvF,IAAI,wBACF,IAAK,MAAM,KAAK,uBAAwB;YACtC,KAAK,CAAC,sBAAsB,CAAC,EAAE,CAAC,GAAG,AAAC,KAAa,CAAC,EAAE;YACpD,OAAO,KAAK,CAAC,EAAE;QACjB;QAEF,OAAO,CAAA,GAAA,yCAAM,EACX;YACE,KAAK;YACL,GAAG,QAAQ;YACX,GAAG,KAAK;YACR,MAAM;gBAAC,UAAU;gBAAM,OAAO;aAAK;QACrC,GACA;IAEJ;IACA,EAAE,WAAW,GAAG,CAAC,EAAE,EACjB,AAAC,IAAiB,WAAW,IAC7B,AAAC,IAAiB,IAAI,IACtB,AAAC,IAAe,QAAQ,QACxB,UACD,CAAC;IACF,EAAE,UAAU,GAAG,IAAI;IACnB,OAAO;AACT;;;;AGxDA,4BAAiB,KAAK,KAAK,CAAC;;ADA5B;;;AAIA,IAAK,MAAM,KAAK,GAAA,gEAAQ,CAAE;IACxB,wFAAwF;IACxF,mGAAmG;IACnG,MAAM,MAAM,CAAA,GAAA,gEAAQ,AAAD,CAAC,CAAC,EAAE;IACvB,CAAA,GAAA,wCAAM,AAAD,CAAC,CAAC,IAAI,GAAG,CAAA,GAAA,yCAAM,AAAD,EAAE;AACvB;","sources":["core/src/index.ts","core/src/StylixProvider.tsx","core/src/classifyProps.ts","core/src/css-props.json","core/src/plugins/index.ts","core/src/plugins/cleanStyles.ts","core/src/util/isPlainObject.ts","core/src/plugins/defaultUnits.ts","core/src/util/mapObjectRecursive.ts","core/src/plugins/flattenNestedStyles.ts","core/src/plugins/mediaArrays.ts","core/src/plugins/merge$css.ts","core/src/util/flatten.ts","core/src/plugins/propCasing.ts","core/src/plugins/replace$$class.ts","core/src/plugins/themeFunctions.ts","core/src/plugins/customProps.ts","core/src/util/walkRecursive.ts","core/src/util/cloneDeep.ts","core/src/styleCollector.tsx","core/src/util/merge.ts","core/src/util/useIsoLayoutEffect.ts","core/src/useStyles.ts","core/src/applyRules.ts","core/src/stylesToRuleArray.ts","core/src/util/hashString.ts","core/src/styled.tsx","core/src/Stylix.tsx","core/src/elements.ts","core/src/html-tags.json"],"sourcesContent":["export {\n type StylixProps,\n type StylixPropsExtensions,\n type Stylix$Component,\n type Stylix$elProp,\n type Stylix$elPropOptional,\n type Extends,\n type StylixStyleProps,\n} from './types';\nexport { useStylixContext, useStylixTheme, StylixProvider, StylixTheme } from './StylixProvider';\nimport { StylixPublicContext } from './StylixProvider';\nexport type StylixContext = StylixPublicContext;\nexport { useStyles, useKeyframes, useGlobalStyles } from './useStyles';\nexport {\n defaultPlugins,\n customProps,\n type StylixPlugin,\n type StylixPluginFunctionContext,\n} from './plugins';\nexport { mapObjectRecursive } from './util/mapObjectRecursive';\nexport { walkRecursive } from './util/walkRecursive';\nexport { createStyleCollector, styleCollectorContext, type StyleCollector } from './styleCollector';\nexport { classifyProps, useClassifyProps } from './classifyProps';\nexport { styled, type StylixStyledComponentWithProps, type StylixStyledComponent } from './styled';\nimport './elements';\nexport { default } from './Stylix';\n","import React, { createContext, useContext, useRef, useState } from 'react';\n\nimport { simplifyStylePropName } from './classifyProps';\nimport cssProps from './css-props.json';\nimport { applyPlugins, defaultPlugins, StylixPlugin } from './plugins';\nimport { styleCollectorContext } from './styleCollector';\nimport { flatten } from './util/flatten';\nimport { merge } from './util/merge';\nimport useIsoLayoutEffect from './util/useIsoLayoutEffect';\n\n/**\n * Stylix context\n *\n * The <StylixProvider> wrapper represents an \"instance\" of Stylix - a configuration, set of plugins, and reference to\n * the <style> element where css is output. All nodes contained within a <StylixProvider> element will share this\n * Stylix instance's configuration.\n *\n * A StylixProvider internally contains a <StylixTheme>, so you can conveniently provide a theme object and media query\n * array with a single element.\n *\n * See the README for more details.\n */\n\n// StylixProvider component props\ntype StylixProviderProps<Theme = any> = StylixThemeProps<Theme> & {\n id?: string;\n devMode?: boolean;\n plugins?: StylixPlugin[] | StylixPlugin[][];\n styleElement?: HTMLStyleElement;\n children: any;\n};\n\ntype StylixThemeProps<Theme = any> = {\n theme?: Theme;\n media?: string[];\n children: any;\n};\n\n// StylixContext object interface\nexport type StylixContext<Theme = any> = {\n id: string;\n devMode: boolean;\n theme: Theme;\n media: string[];\n plugins: StylixPlugin[];\n stylesheet: CSSStyleSheet;\n styleElement: HTMLStyleElement;\n styleCollector?: string[];\n rules: {\n [key: string]: {\n hash: string;\n rules: string[];\n refs: number;\n };\n };\n styleProps: Record<string, string>;\n cleanupRequest?: number;\n requestApply: boolean;\n};\n\nexport type StylixPublicContext = Pick<\n StylixContext,\n 'id' | 'devMode' | 'theme' | 'media' | 'stylesheet' | 'styleElement' | 'styleProps'\n>;\n\nconst defaultStyleProps: Record<string, string> = {};\nfor (const value of cssProps) {\n defaultStyleProps[simplifyStylePropName(value)] = value;\n}\n\nfunction createStylixContext(userValues = {} as Partial<StylixProviderProps>) {\n const ctx = {\n id: userValues.id || Math.round(Math.random() * 10000).toString(10),\n devMode: userValues.devMode,\n styleProps: defaultStyleProps,\n theme: userValues.theme || null,\n media: userValues.media || null,\n styleElement: userValues.styleElement,\n plugins: flatten<StylixPlugin>(Object.values(defaultPlugins)),\n rules: {},\n cleanupRequest: undefined,\n } as StylixContext;\n\n if (!ctx.styleElement && typeof document !== 'undefined') {\n ctx.styleElement = document.createElement('style');\n if (ctx.id) ctx.styleElement.id = 'stylix-' + ctx.id;\n ctx.styleElement.className = 'stylix';\n document.head.appendChild(ctx.styleElement);\n }\n\n if (ctx.styleElement) ctx.stylesheet = ctx.styleElement.sheet as CSSStyleSheet;\n\n if (userValues.plugins?.length) {\n const flatPlugins = flatten<StylixPlugin>(userValues.plugins);\n for (const i in flatPlugins) {\n const plugin = flatPlugins[i];\n let pluginIndex = -1;\n if (plugin.before && ctx.plugins.includes(plugin.before))\n pluginIndex = ctx.plugins.indexOf(plugin.before);\n if (plugin.after && ctx.plugins.includes(plugin.after))\n pluginIndex = ctx.plugins.indexOf(plugin.after) + 1;\n if (plugin.atIndex !== undefined) pluginIndex = plugin.atIndex;\n if (pluginIndex === -1) ctx.plugins.push(plugin);\n else ctx.plugins.splice(pluginIndex, 0, plugin);\n }\n }\n applyPlugins('initialize', null, null, ctx);\n\n return ctx;\n}\n\n// The React context object\nconst stylixContext = createContext(createStylixContext());\n\n// Convenience wrapper hook that returns the current Stylix context\nexport function useStylixContext<Theme = any>(): StylixContext<Theme> {\n return useContext(stylixContext);\n}\n\n// Convenience wrapper hook that returns just the current Stylix theme\nexport function useStylixTheme<Theme = any>(): Theme {\n return useContext(stylixContext).theme;\n}\n\nexport function StylixProvider({\n id,\n devMode,\n plugins,\n styleElement,\n children,\n ...themeProps\n}: StylixProviderProps): React.ReactElement {\n const ctx = useRef<StylixContext>();\n if (!ctx.current) ctx.current = createStylixContext({ id, devMode, plugins, styleElement });\n\n ctx.current.styleCollector = useContext(styleCollectorContext);\n\n return (\n <stylixContext.Provider value={ctx.current}>\n <StylixTheme {...themeProps}>{children}</StylixTheme>\n </stylixContext.Provider>\n );\n}\n\nfunction mergeContexts(contextA: any, contextB: any) {\n const obj = { ...contextA };\n const themeB = contextB.theme;\n if (contextB) {\n for (const key in contextB) {\n const value = contextB[key];\n if (typeof value !== 'undefined') obj[key] = value;\n }\n }\n obj.theme = merge(contextA.theme || {}, themeB);\n return obj;\n}\n\nexport function StylixTheme({ children, media, theme }: StylixThemeProps) {\n const parentCtx = useContext(stylixContext);\n const [contextValue, setContextValue] = useState(() =>\n mergeContexts(parentCtx, { media, theme }),\n );\n\n // contextValue should only update (and cause re-renders) when relevant properties change.\n // `media` is treated as special because providing an array of strings is easier to do inline,\n // but we don't want to cause descendent re-renders if the values don't change.\n\n useIsoLayoutEffect(\n () => {\n setContextValue(mergeContexts(parentCtx, { media, theme }));\n },\n [parentCtx, media?.join('|') || '', theme],\n false,\n );\n\n return <stylixContext.Provider value={contextValue}>{children}</stylixContext.Provider>;\n}\n","import { useStylixContext } from './StylixProvider';\n\nexport function classifyProps(props: any, knownProps: Record<string, string>): [any, any] {\n const styles = {} as any;\n const other = {} as any;\n\n for (const prop in props) {\n // If prop is not a valid JSX prop, it must be a CSS selector\n if (!isValidJSXProp(prop) || (isStyleProp(prop, knownProps) && isStyleValue(props[prop]))) {\n styles[prop] = props[prop];\n } else {\n other[prop] = props[prop];\n }\n }\n\n return [styles, other];\n}\n\nexport function useClassifyProps(props: any) {\n const ctx = useStylixContext();\n const [styles, other] = classifyProps(props, ctx.styleProps);\n return [styles, other];\n}\n\n/**\n * Determines if `value` is a recognized CSS property (can be standard CSS or custom Stylix prop).\n */\nexport function isStyleProp(prop: string, knownProps: Record<string, string>): boolean {\n return isValidJSXProp(prop) && simplifyStylePropName(prop) in knownProps;\n}\n\nexport function isValidJSXProp(value: string): boolean {\n // Not an exact check, but mostly rules out complex css selectors\n return /^[a-z$][a-z0-9_-]*$/i.test(value);\n}\n\nexport function simplifyStylePropName(value: string) {\n return value.toLowerCase().replace(/[^a-z]/gi, '');\n}\n\n/**\n * Tries to determine if `value` is likely to be a valid CSS property value.\n * We can't be 100% sure, but this should catch most cases.\n * There is a check here to make sure React elements do not pass the test, as this\n * has turned out to be a common case where a property like 'content' means something\n * to a component, but is also a valid CSS property.\n */\nexport function isStyleValue(value: any): boolean {\n return (\n typeof value === 'function' ||\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n Array.isArray(value) ||\n // Check for plain objects, and make sure it doesn't have the $$typeof property (react elements are never valid as style values)\n (typeof value === 'object' && value.constructor === Object && !('$$typeof' in value))\n );\n}\n","[\n \"align-content\",\n \"align-items\",\n \"align-self\",\n \"align-tracks\",\n \"all\",\n \"animation\",\n \"animation-delay\",\n \"animation-direction\",\n \"animation-duration\",\n \"animation-fill-mode\",\n \"animation-iteration-count\",\n \"animation-name\",\n \"animation-play-state\",\n \"animation-timing-function\",\n \"appearance\",\n \"aspect-ratio\",\n \"azimuth\",\n \"backdrop-filter\",\n \"backface-visibility\",\n \"background\",\n \"background-attachment\",\n \"background-blend-mode\",\n \"background-clip\",\n \"background-color\",\n \"background-image\",\n \"background-origin\",\n \"background-position\",\n \"background-position-x\",\n \"background-position-y\",\n \"background-repeat\",\n \"background-size\",\n \"block-overflow\",\n \"block-size\",\n \"border\",\n \"border-block\",\n \"border-block-color\",\n \"border-block-style\",\n \"border-block-width\",\n \"border-block-end\",\n \"border-block-end-color\",\n \"border-block-end-style\",\n \"border-block-end-width\",\n \"border-block-start\",\n \"border-block-start-color\",\n \"border-block-start-style\",\n \"border-block-start-width\",\n \"border-bottom\",\n \"border-bottom-color\",\n \"border-bottom-left-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-style\",\n \"border-bottom-width\",\n \"border-collapse\",\n \"border-color\",\n \"border-end-end-radius\",\n \"border-end-start-radius\",\n \"border-image\",\n \"border-image-outset\",\n \"border-image-repeat\",\n \"border-image-slice\",\n \"border-image-source\",\n \"border-image-width\",\n \"border-inline\",\n \"border-inline-end\",\n \"border-inline-color\",\n \"border-inline-style\",\n \"border-inline-width\",\n \"border-inline-end-color\",\n \"border-inline-end-style\",\n \"border-inline-end-width\",\n \"border-inline-start\",\n \"border-inline-start-color\",\n \"border-inline-start-style\",\n \"border-inline-start-width\",\n \"border-left\",\n \"border-left-color\",\n \"border-left-style\",\n \"border-left-width\",\n \"border-radius\",\n \"border-right\",\n \"border-right-color\",\n \"border-right-style\",\n \"border-right-width\",\n \"border-spacing\",\n \"border-start-end-radius\",\n \"border-start-start-radius\",\n \"border-style\",\n \"border-top\",\n \"border-top-color\",\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-top-style\",\n \"border-top-width\",\n \"border-width\",\n \"bottom\",\n \"box-align\",\n \"box-decoration-break\",\n \"box-direction\",\n \"box-flex\",\n \"box-flex-group\",\n \"box-lines\",\n \"box-ordinal-group\",\n \"box-orient\",\n \"box-pack\",\n \"box-shadow\",\n \"box-sizing\",\n \"break-after\",\n \"break-before\",\n \"break-inside\",\n \"caption-side\",\n \"caret-color\",\n \"clear\",\n \"clip\",\n \"clip-path\",\n \"color\",\n \"color-adjust\",\n \"color-scheme\",\n \"column-count\",\n \"column-fill\",\n \"column-gap\",\n \"column-rule\",\n \"column-rule-color\",\n \"column-rule-style\",\n \"column-rule-width\",\n \"column-span\",\n \"column-width\",\n \"columns\",\n \"contain\",\n \"content\",\n \"content-visibility\",\n \"counter-increment\",\n \"counter-reset\",\n \"counter-set\",\n \"cursor\",\n \"direction\",\n \"display\",\n \"empty-cells\",\n \"filter\",\n \"flex\",\n \"flex-basis\",\n \"flex-direction\",\n \"flex-flow\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"float\",\n \"font\",\n \"font-family\",\n \"font-feature-settings\",\n \"font-kerning\",\n \"font-language-override\",\n \"font-optical-sizing\",\n \"font-variation-settings\",\n \"font-size\",\n \"font-size-adjust\",\n \"font-smooth\",\n \"font-stretch\",\n \"font-style\",\n \"font-synthesis\",\n \"font-variant\",\n \"font-variant-alternates\",\n \"font-variant-caps\",\n \"font-variant-east-asian\",\n \"font-variant-ligatures\",\n \"font-variant-numeric\",\n \"font-variant-position\",\n \"font-weight\",\n \"forced-color-adjust\",\n \"gap\",\n \"grid\",\n \"grid-area\",\n \"grid-auto-columns\",\n \"grid-auto-flow\",\n \"grid-auto-rows\",\n \"grid-column\",\n \"grid-column-end\",\n \"grid-column-gap\",\n \"grid-column-start\",\n \"grid-gap\",\n \"grid-row\",\n \"grid-row-end\",\n \"grid-row-gap\",\n \"grid-row-start\",\n \"grid-template\",\n \"grid-template-areas\",\n \"grid-template-columns\",\n \"grid-template-rows\",\n \"hanging-punctuation\",\n \"height\",\n \"hyphens\",\n \"image-orientation\",\n \"image-rendering\",\n \"image-resolution\",\n \"ime-mode\",\n \"initial-letter\",\n \"initial-letter-align\",\n \"inline-size\",\n \"inset\",\n \"inset-block\",\n \"inset-block-end\",\n \"inset-block-start\",\n \"inset-inline\",\n \"inset-inline-end\",\n \"inset-inline-start\",\n \"isolation\",\n \"justify-content\",\n \"justify-items\",\n \"justify-self\",\n \"justify-tracks\",\n \"left\",\n \"letter-spacing\",\n \"line-break\",\n \"line-clamp\",\n \"line-height\",\n \"line-height-step\",\n \"list-style\",\n \"list-style-image\",\n \"list-style-position\",\n \"list-style-type\",\n \"margin\",\n \"margin-block\",\n \"margin-block-end\",\n \"margin-block-start\",\n \"margin-bottom\",\n \"margin-inline\",\n \"margin-inline-end\",\n \"margin-inline-start\",\n \"margin-left\",\n \"margin-right\",\n \"margin-top\",\n \"margin-trim\",\n \"mask\",\n \"mask-border\",\n \"mask-border-mode\",\n \"mask-border-outset\",\n \"mask-border-repeat\",\n \"mask-border-slice\",\n \"mask-border-source\",\n \"mask-border-width\",\n \"mask-clip\",\n \"mask-composite\",\n \"mask-image\",\n \"mask-mode\",\n \"mask-origin\",\n \"mask-position\",\n \"mask-repeat\",\n \"mask-size\",\n \"mask-type\",\n \"masonry-auto-flow\",\n \"math-style\",\n \"max-block-size\",\n \"max-height\",\n \"max-inline-size\",\n \"max-lines\",\n \"max-width\",\n \"min-block-size\",\n \"min-height\",\n \"min-inline-size\",\n \"min-width\",\n \"mix-blend-mode\",\n \"object-fit\",\n \"object-position\",\n \"offset\",\n \"offset-anchor\",\n \"offset-distance\",\n \"offset-path\",\n \"offset-position\",\n \"offset-rotate\",\n \"opacity\",\n \"order\",\n \"orphans\",\n \"outline\",\n \"outline-color\",\n \"outline-offset\",\n \"outline-style\",\n \"outline-width\",\n \"overflow\",\n \"overflow-anchor\",\n \"overflow-block\",\n \"overflow-clip-box\",\n \"overflow-clip-margin\",\n \"overflow-inline\",\n \"overflow-wrap\",\n \"overflow-x\",\n \"overflow-y\",\n \"overscroll-behavior\",\n \"overscroll-behavior-block\",\n \"overscroll-behavior-inline\",\n \"overscroll-behavior-x\",\n \"overscroll-behavior-y\",\n \"padding\",\n \"padding-block\",\n \"padding-block-end\",\n \"padding-block-start\",\n \"padding-bottom\",\n \"padding-inline\",\n \"padding-inline-end\",\n \"padding-inline-start\",\n \"padding-left\",\n \"padding-right\",\n \"padding-top\",\n \"page-break-after\",\n \"page-break-before\",\n \"page-break-inside\",\n \"paint-order\",\n \"perspective\",\n \"perspective-origin\",\n \"place-content\",\n \"place-items\",\n \"place-self\",\n \"pointer-events\",\n \"position\",\n \"quotes\",\n \"resize\",\n \"right\",\n \"rotate\",\n \"row-gap\",\n \"ruby-align\",\n \"ruby-merge\",\n \"ruby-position\",\n \"scale\",\n \"scrollbar-color\",\n \"scrollbar-gutter\",\n \"scrollbar-width\",\n \"scroll-behavior\",\n \"scroll-margin\",\n \"scroll-margin-block\",\n \"scroll-margin-block-start\",\n \"scroll-margin-block-end\",\n \"scroll-margin-bottom\",\n \"scroll-margin-inline\",\n \"scroll-margin-inline-start\",\n \"scroll-margin-inline-end\",\n \"scroll-margin-left\",\n \"scroll-margin-right\",\n \"scroll-margin-top\",\n \"scroll-padding\",\n \"scroll-padding-block\",\n \"scroll-padding-block-start\",\n \"scroll-padding-block-end\",\n \"scroll-padding-bottom\",\n \"scroll-padding-inline\",\n \"scroll-padding-inline-start\",\n \"scroll-padding-inline-end\",\n \"scroll-padding-left\",\n \"scroll-padding-right\",\n \"scroll-padding-top\",\n \"scroll-snap-align\",\n \"scroll-snap-coordinate\",\n \"scroll-snap-destination\",\n \"scroll-snap-points-x\",\n \"scroll-snap-points-y\",\n \"scroll-snap-stop\",\n \"scroll-snap-type\",\n \"scroll-snap-type-x\",\n \"scroll-snap-type-y\",\n \"shape-image-threshold\",\n \"shape-margin\",\n \"shape-outside\",\n \"tab-size\",\n \"table-layout\",\n \"text-align\",\n \"text-align-last\",\n \"text-combine-upright\",\n \"text-decoration\",\n \"text-decoration-color\",\n \"text-decoration-line\",\n \"text-decoration-skip\",\n \"text-decoration-skip-ink\",\n \"text-decoration-style\",\n \"text-decoration-thickness\",\n \"text-emphasis\",\n \"text-emphasis-color\",\n \"text-emphasis-position\",\n \"text-emphasis-style\",\n \"text-indent\",\n \"text-justify\",\n \"text-orientation\",\n \"text-overflow\",\n \"text-rendering\",\n \"text-shadow\",\n \"text-size-adjust\",\n \"text-transform\",\n \"text-underline-offset\",\n \"text-underline-position\",\n \"top\",\n \"touch-action\",\n \"transform\",\n \"transform-box\",\n \"transform-origin\",\n \"transform-style\",\n \"transition\",\n \"transition-delay\",\n \"transition-duration\",\n \"transition-property\",\n \"transition-timing-function\",\n \"translate\",\n \"unicode-bidi\",\n \"user-select\",\n \"vertical-align\",\n \"visibility\",\n \"white-space\",\n \"widows\",\n \"width\",\n \"will-change\",\n \"word-break\",\n \"word-spacing\",\n \"word-wrap\",\n \"writing-mode\",\n \"z-index\",\n \"zoom\"\n]\n","import { StylixContext, StylixPublicContext } from '../StylixProvider';\nimport { cleanStyles } from './cleanStyles';\nimport { defaultPixelUnits } from './defaultUnits';\nimport { flattenNestedStyles } from './flattenNestedStyles';\nimport { mediaArrays } from './mediaArrays';\nimport { merge$css } from './merge$css';\nimport { propCasing } from './propCasing';\nimport { replace$$class } from './replace$$class';\nimport { themeFunctions } from './themeFunctions';\n\n/**\n * Stylix plugin function context object\n */\nexport type StylixPluginFunctionContext = StylixPublicContext & { hash: string | null };\n\n/**\n * Stylix plugin interface\n */\nexport interface StylixPlugin {\n name: string;\n type: 'initialize' | 'processStyles' | 'preprocessStyles';\n plugin(ctx: StylixPluginFunctionContext, styles: any): any;\n before?: StylixPlugin;\n after?: StylixPlugin;\n atIndex?: number;\n}\n\nexport function applyPlugins(\n type: StylixPlugin['type'],\n styles: any,\n hash: string | null,\n context: StylixContext,\n) {\n const pluginContext = {\n id: context.id,\n devMode: context.devMode,\n theme: context.theme,\n media: context.media,\n stylesheet: context.stylesheet,\n styleElement: context.styleElement,\n styleProps: context.styleProps,\n hash,\n };\n\n let processedStyles = styles;\n for (const i in context.plugins) {\n const plugin = context.plugins[i];\n if (plugin.type === type) processedStyles = plugin.plugin(pluginContext, processedStyles);\n }\n return processedStyles;\n}\n\nexport { customProps } from './customProps';\n\nexport const defaultPlugins = {\n themeFunctions,\n merge$css,\n mediaArrays,\n propCasing,\n flattenNestedStyles,\n replace$$class,\n defaultPixelUnits,\n cleanStyles,\n};\n","import { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\nfunction cleanObject(object: any): any {\n for (const key in object) {\n const value = object[key];\n if (value === null || value === undefined || value === '') delete object[key];\n else if (isPlainObject(value) || Array.isArray(value)) {\n cleanObject(value);\n if (!Object.keys(value).length) delete object[key];\n }\n }\n return object;\n}\n\n/**\n * Fixes casing and hyphenation on known style props\n */\nexport const cleanStyles: StylixPlugin = {\n name: 'cleanStyles',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return cleanObject(styles);\n },\n};\n","/**\n * Indicates that an object is most likely just an object literal.\n */\nexport function isPlainObject(obj: any): obj is Record<string, any> {\n return typeof obj === 'object' && obj?.constructor === Object;\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin } from './index';\n\nexport const defaultIgnoreUnits = [\n 'columns',\n 'column-count',\n 'fill-opacity',\n 'flex',\n 'flex-grow',\n 'flex-shrink',\n 'font-weight',\n 'line-height',\n 'opacity',\n 'orphans',\n 'stroke-opacity',\n 'widows',\n 'z-index',\n 'zoom',\n 'order',\n];\n\n/**\n * Adds unit (px, em, etc) to numeric values for any style properties not included in `ignoreProps`..\n */\nexport const defaultUnits = (unit = 'px', ignoreProps = defaultIgnoreUnits): StylixPlugin => {\n return {\n name: 'defaultUnits',\n type: 'processStyles',\n plugin(ctx, styles: any) {\n return mapObjectRecursive(styles, defaultUnitsMap, { unit, ignoreProps });\n },\n };\n};\n\nconst defaultUnitsMap = (key: string | number, value: any, object :any, ctx:any) => {\n if (typeof value === 'number' && !ctx.ignoreProps.includes(key as string)) {\n return { [key]: String(value) + ctx.unit };\n }\n};\n\nexport const defaultPixelUnits = defaultUnits();\n","import { isPlainObject } from './isPlainObject';\n\n/**\n * Invokes `map` on each key/value pair in `object`. The key/value pair is deleted from the object and replaced by\n * merging in the object returned from `map`. Recursively descends into all object and array values.\n * The `map` function will receive the key, the value, the current object being mapped, and a context object.\n * The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to\n * `map` on child properties of `value`.\n */\nexport function mapObjectRecursive(\n object: any,\n map: (\n key: string | number,\n value: any,\n object: any,\n context: any,\n ) => Record<string | number, any> | undefined,\n context: any = {},\n) {\n const clone: any = Array.isArray(object) ? [] : {};\n\n for (const k of Object.keys(object)) {\n let key: string | number = k;\n const value = object[key];\n\n if (Array.isArray(object)) key = +key;\n const contextClone = { ...context };\n let result = map(key, value, object, contextClone);\n if (typeof result !== 'undefined' && typeof result !== 'object' && !Array.isArray(result))\n throw new Error(\n 'mapObjectRecursive: return value of map function must be undefined, object, or array!',\n );\n if (typeof result === 'undefined') {\n result = { [key]: value };\n }\n for (const kk in result) {\n let value = result[kk];\n if (isPlainObject(value) || Array.isArray(value))\n value = mapObjectRecursive(value, map, contextClone);\n if (typeof value !== 'undefined') clone[kk] = value;\n }\n }\n\n return clone;\n}\n","import { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\nfunction flatten(styles: any, parent: any, selector: string, root: any, mediaRoot: any) {\n for (let key in styles) {\n const value = styles[key];\n if (key.startsWith('@media')) {\n // Flatten media queries, but nest them under the root object\n root[key] = root[key] || {};\n flatten(value, root[key], selector, root, root[key]);\n } else if (key.startsWith('@keyframes')) {\n // Add keyframe rules as-is directly to mediaRoot object\n mediaRoot[key] = value;\n } else if (isPlainObject(styles[key])) {\n // Concatenate or replace & in selectors and then continue flattening styles\n if (key.includes('&')) {\n key = key.replace(/&/g, selector);\n } else {\n key = (selector + ' ' + key).trim();\n }\n parent[key] = parent[key] || {};\n flatten(value, parent, key, root, mediaRoot);\n } else {\n // Selector is just a css property\n parent[selector] = parent[selector] || {};\n parent[selector][key] = styles[key];\n }\n }\n}\n\n/**\n * Flattens nested style objects that use `&` to reference parent class.\n */\nexport const flattenNestedStyles: StylixPlugin = {\n name: 'flattenNestedStyles',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n const flattened = {};\n flatten(styles, flattened, '', flattened, flattened);\n return flattened;\n },\n};\n","import { isPlainObject } from '../util/isPlainObject';\nimport { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Expands arrays as media queries.\n */\nexport const mediaArrays: StylixPlugin = {\n name: 'mediaArrays',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n // Fill out ditto values\n styles = mapObjectRecursive(styles, mapDittoValues);\n const mediaStyles: any = {};\n let nonMediaStyles = styles;\n for (const i in ctx.media) {\n const mediaQuery = ctx.media[i];\n if (!mediaQuery) {\n nonMediaStyles = mapObjectRecursive(styles, mapNonMedia, { i });\n } else {\n mediaStyles[`@media ${mediaQuery}`] = mapObjectRecursive(styles, mapMediaStyles, { i });\n }\n }\n return { ...nonMediaStyles, ...mediaStyles };\n },\n};\n\nfunction mapDittoValues(key: string | number, value: any) {\n if (Array.isArray(value)) {\n for (const i in value) {\n const v = value[i];\n if (v === '@') value[i] = value[+i - 1];\n }\n return { [key]: value };\n }\n}\n\nfunction mapNonMedia(key: string| number, value: any, object: any, context: any) {\n if (Array.isArray(value)) {\n return { [key]: value[context.i] };\n }\n}\n\nfunction mapMediaStyles(key: string | number, value: any, object: any, context: any) {\n if (typeof key === 'number') return; // Not possible, but here for TS\n if (key.startsWith('@keyframes')) context.keyframes = true;\n if (Array.isArray(value)) {\n return { [key]: value[context.i] };\n }\n if (isPlainObject(value) || context.keyframes) {\n return;\n }\n // delete key/value pair if primitive\n return { [key]: undefined };\n}\n","import { flatten } from '../util/flatten';\nimport { isPlainObject } from '../util/isPlainObject';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Merges $css property into parent styles\n */\nexport const merge$css: StylixPlugin = {\n name: 'merge$css',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n const result = {};\n _merge$css(styles, result);\n return result;\n },\n};\n\nexport function _merge$css(obj: any, ctx: any) {\n if (!isPlainObject(obj)) return;\n for (const key in obj) {\n if (key === '$css') {\n const $css = obj[key];\n if (Array.isArray($css)) {\n const flat$css = flatten($css);\n for (const val of flat$css) {\n _merge$css(val, ctx);\n }\n } else {\n _merge$css($css, ctx);\n }\n } else {\n let value = obj[key];\n if (isPlainObject(value)) {\n value = ctx[key] || {};\n _merge$css(obj[key], value);\n }\n ctx[key] = value;\n }\n }\n}\n","/**\n * Flatten an array recursively.\n */\nexport function flatten<TEntryType>(array: unknown[]): TEntryType[] {\n const result: unknown[] = [];\n _flatten(array, result);\n return result as TEntryType[];\n}\n\nfunction _flatten(array: unknown[], result: unknown[]): void {\n for (let i = 0; i < array.length; i++) {\n const value = array[i];\n Array.isArray(value) ? _flatten(value as any, result) : result.push(value);\n }\n}\n","import { simplifyStylePropName } from '../classifyProps';\nimport { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Fixes casing and hyphenation on known style props\n */\nexport const propCasing: StylixPlugin = {\n name: 'normalizeStyleProps',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, propCasingMap, { ctx });\n },\n};\n\nfunction propCasingMap(key: string | number, value: any, object: any, context: any) {\n if (typeof key === 'string' && context.ctx.styleProps[simplifyStylePropName(key)]) {\n return { [context.ctx.styleProps[simplifyStylePropName(key)]]: value };\n }\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Replaces $$class with hash in string values\n */\nexport const replace$$class: StylixPlugin = {\n name: 'replace$$class',\n type: 'processStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, replace$$classMap, { ctx });\n },\n};\n\nfunction replace$$classMap(key: string | number, value: any, object: any, context: any) {\n value = typeof value === 'string' ? value.replace('$$class', context.ctx.hash) : value;\n key = typeof key === 'string' ? key.replace('$$class', context.ctx.hash) : key;\n return { [key]: value };\n}\n","import { mapObjectRecursive } from '../util/mapObjectRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\n\n/**\n * Evaluates functions in style objects, providing the theme and media from the current Stylix context.\n */\nexport const themeFunctions: StylixPlugin = {\n name: 'themeFunctions',\n type: 'preprocessStyles',\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return mapObjectRecursive(styles, themeFunctionsMap, { ctx });\n },\n};\n\nfunction themeFunctionsMap(key: string | number, value: any, object: any, context: any) {\n if (typeof value === 'function') {\n return { [key]: value(context.ctx.theme, context.ctx) };\n }\n}\n","import { isValidJSXProp, simplifyStylePropName } from '../classifyProps';\nimport { isPlainObject } from '../util/isPlainObject';\nimport { walkRecursive } from '../util/walkRecursive';\nimport { StylixPlugin, StylixPluginFunctionContext } from './index';\nimport { mediaArrays } from './mediaArrays';\n\nexport const customProps = (customProps: Record<string, any>): StylixPlugin[] => {\n for (const key in customProps) {\n customProps[simplifyStylePropName(key)] = customProps[key];\n }\n\n return [\n {\n name: 'customPropsInit',\n type: 'initialize',\n plugin(ctx: StylixPluginFunctionContext) {\n for (const key in customProps) {\n ctx.styleProps[simplifyStylePropName(key)] = key;\n }\n },\n },\n {\n name: 'customPropsProcess',\n type: 'processStyles',\n before: mediaArrays,\n plugin(ctx: StylixPluginFunctionContext, styles: any) {\n return walkRecursive(styles, (key, value, object) => {\n if (!isValidJSXProp(key) || isPlainObject(value)) return;\n\n const simpleKey = simplifyStylePropName(key);\n const propValue = customProps[simpleKey];\n if (!propValue) return;\n\n const objectClone = { ...object };\n const keys = Object.keys(object);\n const afterKeys = keys.slice(keys.indexOf(key) + 1);\n\n const newStyles: any = {};\n if (typeof propValue === 'object') {\n if (value) Object.assign(newStyles, propValue);\n } else if (typeof propValue === 'string') {\n newStyles[propValue] = value;\n } else if (typeof propValue === 'function') {\n Object.assign(newStyles, propValue(value));\n }\n delete object[key];\n Object.assign(object, newStyles);\n for (const k of afterKeys) {\n const val = objectClone[k];\n delete object[k];\n object[k] = val;\n }\n });\n },\n },\n ];\n};\n","import { cloneDeep } from './cloneDeep';\nimport { isPlainObject } from './isPlainObject';\n\n/**\n * Invokes a callback for each key/value pair in `object`, and continues recursively on each value that is an array or a\n * plain object. Returns `object`.\n * The `cb` function will receive the key, the value, the current object being mapped, and a context object.\n * The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to\n * `map` on child properties of `value`.\n */\nexport function walkRecursive<T extends Record<string, any> = any>(\n object: T,\n cb: (key: string, value: any, currentObject: any, context: any) => void,\n context?: any,\n): T {\n const keys = Object.keys(object);\n for (const key of keys) {\n const value = object[key];\n cb(key, value, object, context);\n if (Array.isArray(value) || isPlainObject(value)) {\n const contextClone = cloneDeep(context);\n walkRecursive(value, cb, contextClone);\n }\n }\n return object;\n}\n","import { isPlainObject } from './isPlainObject';\n\n/**\n * Deeply clones a value.\n */\nexport function cloneDeep<T>(value: T): T {\n if (!value || typeof value !== 'object') return value;\n if (Array.isArray(value)) {\n const clone: any = [];\n for (let index = 0; index < value.length; ++index) {\n clone.push(cloneDeep(value[index]));\n }\n return clone;\n }\n if (isPlainObject(value)) {\n const clone: any = {};\n for (const key in value) {\n clone[key] = cloneDeep(value[key]);\n }\n return clone;\n }\n return value;\n}\n","import React, { createContext } from 'react';\n\nexport interface StyleCollector {\n collect: (element: React.ReactElement) => React.ReactElement;\n render: React.FC<React.ComponentProps<'style'>>;\n styles: string[];\n}\n\nexport const styleCollectorContext = createContext<string[]>(null);\n\nexport function createStyleCollector() {\n const styles: string[] = [];\n const collector: StyleCollector = {\n collect: (element) => (\n <styleCollectorContext.Provider value={styles}>{element}</styleCollectorContext.Provider>\n ),\n render: (props: React.ComponentProps<'style'>) => (\n <style\n type=\"text/css\"\n key={props.id || 'stylix'}\n {...props}\n dangerouslySetInnerHTML={{ __html: collector.styles.join(' ') }}\n />\n ),\n styles,\n };\n collector.render.displayName = 'StylixStyleCollectorRenderer';\n return collector;\n}\n","import { isPlainObject } from './isPlainObject';\n\nexport function merge<A>(a?: A): A;\nexport function merge<A, B>(a: A, b: B): A & B;\nexport function merge<A, B, C>(a: A, b: B, c: C): A & B & C;\nexport function merge<A, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;\nexport function merge<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E;\n\nexport function merge(...items: unknown[]) {\n items = items.filter((item) => typeof item !== 'undefined' && item !== null);\n if (!items?.length) return undefined;\n\n if (items.length === 1) return items[0];\n\n // If items are not all objects/arrays, return the last object/array if possible, otherwise last non-undefined value\n if (!items.every((item) => Array.isArray(item) || isPlainObject(item))) {\n items.reverse();\n return (\n items.find((item) => Array.isArray(item) || isPlainObject(item)) ||\n items.find((item) => typeof item !== 'undefined')\n );\n }\n\n const merged: any = Array.isArray(items[0]) ? [] : {};\n for (const item of items) {\n if (!Array.isArray(item) && !isPlainObject(item)) return merged;\n\n const keys: any[] = [...Object.keys(item), ...Object.getOwnPropertySymbols(item)];\n for (const key of keys) {\n const result = merge(merged[key], item[key]);\n if (typeof result !== 'undefined') merged[key] = result;\n }\n }\n return merged;\n}\n","import { useLayoutEffect } from 'react';\n\nconst useIsoLayoutEffect =\n typeof window !== 'undefined' && 'document' in window\n ? (fn: () => void | (() => void), deps?: unknown[], _runOnSsr?: boolean) => useLayoutEffect(fn, deps)\n : (fn: () => void | (() => void), _deps?: unknown[], runOnSsr?: boolean) => (runOnSsr ? fn() : null);\n\nexport default useIsoLayoutEffect;\n","import { useRef } from 'react';\n\nimport applyRules from './applyRules';\nimport { applyPlugins } from './plugins';\nimport stylesToRuleArray from './stylesToRuleArray';\nimport { StylixContext, useStylixContext } from './StylixProvider';\nimport { StylixStyles } from './types';\nimport { hashString } from './util/hashString';\nimport useIsoLayoutEffect from './util/useIsoLayoutEffect';\n\nfunction cleanup(ctx: StylixContext): void {\n if (typeof ctx.cleanupRequest !== 'undefined') return;\n\n ctx.cleanupRequest = setTimeout(() => {\n let deleted = false;\n\n for (const i in ctx.rules) {\n const rule = ctx.rules[i];\n if (!rule.refs) {\n delete ctx.rules[rule.hash];\n deleted = true;\n }\n }\n deleted && applyRules(ctx);\n\n delete ctx.cleanupRequest;\n }, 100) as any;\n}\n\nfunction compare(a: any, b: any): any {\n if (a === b) return true;\n if (typeof a !== typeof b) return false;\n if (typeof a === 'object') {\n if (Array.isArray(a) && Array.isArray(b) && a.length !== b.length) return false;\n else if (Object.keys(a).length !== Object.keys(b).length) return false;\n for (const key in b) {\n if (!compare(a[key], b[key])) return false;\n }\n }\n return a === b;\n}\n\n/**\n * Accepts a Stylix CSS object and returns a unique className based on the styles' hash.\n * The styles are registered with the Stylix context and will be applied to the document.\n * If `global` is false, provided styles will be nested within the generated classname.\n * Returns the className hash if enabled, or an empty string.\n */\nexport function useStyles(\n styles: Record<string, any> | undefined,\n options: { global?: boolean; disabled?: boolean } = { global: false, disabled: false },\n): string {\n const stylixCtx = useStylixContext();\n\n const prevRef = useRef({ styles: {}, hash: '' } as any);\n\n const changed = !compare(styles, prevRef.current.styles);\n\n prevRef.current.styles = styles;\n\n if (changed) {\n // Preprocess styles with plugins\n if (!options.disabled && styles)\n styles = applyPlugins('preprocessStyles', styles, null, stylixCtx);\n\n // Serialize value and generate hash\n const json = !options.disabled && styles && JSON.stringify(styles);\n prevRef.current.hash =\n json && json !== '{}' && json !== '[]'\n ? hashString(JSON.stringify(stylixCtx.media || []) + json)\n : '';\n }\n\n const { hash } = prevRef.current;\n\n if (hash && changed && !stylixCtx.rules[hash]) {\n // If not global styles, wrap original styles with classname\n if (!options.global) styles = { ['.' + hash]: styles };\n stylixCtx.rules[hash] = {\n hash,\n rules: stylesToRuleArray(styles, hash, stylixCtx),\n refs: 1,\n };\n stylixCtx.requestApply = true;\n }\n\n // Apply styles if requested.\n // This runs on every render. We utilize useLayoutEffect so that it runs *after* all the other\n // renders have completed. stylixCtx.requestApply guards against multiple runs. This reduces the number of calls\n // to applyRules(), but prevents styles potentially being added to the DOM after other components force the\n // browser to compute styles.\n useIsoLayoutEffect(\n () => {\n if (!stylixCtx.requestApply) return;\n stylixCtx.requestApply = false;\n applyRules(stylixCtx);\n },\n undefined,\n true,\n );\n\n // When hash changes, add/remove ref count\n useIsoLayoutEffect(\n () => {\n if (!hash || !changed) return;\n\n if (stylixCtx.rules[hash]) {\n stylixCtx.rules[hash].refs++;\n }\n\n return () => {\n stylixCtx.rules[hash].refs--;\n cleanup(stylixCtx);\n };\n },\n [hash],\n false,\n );\n\n return hash;\n}\n\nexport function useKeyframes(\n keyframes: any,\n options: { disabled?: boolean } = { disabled: false },\n) {\n return useStyles({ '@keyframes $$class': keyframes }, { global: true, ...options });\n}\n\nexport function useGlobalStyles(\n styles: StylixStyles,\n options: { disabled?: boolean } = { disabled: false },\n) {\n return useStyles(styles, { ...options, global: true });\n}\n","import { StylixContext } from './StylixProvider';\n\n/**\n * Applies rules from given StylixContext to the <style> element.\n */\nexport default function applyRules(ctx: StylixContext): void {\n const flattenedRules: string[] = [];\n\n for (const key in ctx.rules) {\n const val = ctx.rules[key];\n flattenedRules.push(...val.rules);\n }\n\n if (ctx.styleCollector) {\n ctx.styleCollector.length = 0;\n ctx.styleCollector.push(...flattenedRules);\n return;\n }\n\n if (ctx.devMode) {\n ctx.styleElement.innerHTML = flattenedRules.join('\\n');\n } else {\n const container = ctx.stylesheet;\n if (container.cssRules)\n while (container.cssRules.length) {\n container.deleteRule(0);\n }\n for (const i in flattenedRules) container.insertRule(flattenedRules[i], +i);\n }\n}\n","import { applyPlugins } from './plugins';\nimport { StylixContext } from './StylixProvider';\nimport { StylixObject } from './types';\nimport { isPlainObject } from './util/isPlainObject';\n\n/**\n * Converts a Stylix CSS object to an array of rules, suitable for passing to StyleSheet#insertRule.\n */\nexport default function stylesToRuleArray(\n styles: StylixObject,\n hash: string,\n context: StylixContext,\n): string[] {\n try {\n const processedStyles = applyPlugins('processStyles', styles, hash, context);\n\n // serialize to css rules array\n const serialize = function serialize(selector: string, styles: StylixObject) {\n const lines: string[] = [];\n for (const key in styles) {\n const value = styles[key];\n if (isPlainObject(value)) lines.push(serialize(key, value));\n else lines.push(` ${key}: ${value};`);\n }\n return `${selector} {\\n${lines.join('\\n')} }`;\n };\n\n const result: string[] = [];\n for (const key in processedStyles) {\n const value = processedStyles[key];\n result.push(serialize(key, value));\n }\n return result;\n } catch (e) {\n if (e.name && e.reason) {\n console.error(\n `${e.name}: ${e.reason}\\n`,\n e.source.replace('\\n', ' ').substr(Math.max(0, e.column - 20), 100) + '\\n',\n ' '.repeat(20) + '^',\n );\n } else {\n console.error(e);\n }\n return [];\n }\n}\n","/**\n * Cheap string hashing, suitable for generating css class names\n */\nexport function hashString(str: string): string {\n let hash = 5381;\n let i = str.length;\n while (i) hash = (hash * 33) ^ str.charCodeAt(--i);\n return 'stylix-' + (hash >>> 0).toString(36);\n}\n","import React from 'react';\n\nimport { _Stylix } from './Stylix';\nimport { Extends, StylixComponentMeta, StylixStyleProps } from './types';\n\nexport type StylixStyledComponentWithProps<TProps> = React.FC<Extends<TProps, StylixStyleProps>> &\n StylixComponentMeta;\n\nexport type StylixStyledComponent<TComponent extends HtmlOrComponent> =\n StylixStyledComponentWithProps<HtmlOrComponentProps<TComponent>>;\n\nexport type HtmlOrComponent =\n | keyof JSX.IntrinsicElements\n | React.ForwardRefRenderFunction<any, any>;\n\nexport type HtmlOrComponentProps<TComponent extends HtmlOrComponent> =\n TComponent extends keyof JSX.IntrinsicElements\n ? React.ComponentPropsWithRef<TComponent>\n : TComponent extends React.ForwardRefRenderFunction<infer R, infer P>\n ? P & React.RefAttributes<R>\n : never;\n\nexport function styled<\n TComponent extends HtmlOrComponent,\n TPropMap extends Record<string, string> = Record<string, never>,\n>(\n $el: TComponent,\n addProps?: Extends<StylixStyleProps, Partial<HtmlOrComponentProps<TComponent>>>,\n conflictingPropMapping?: TPropMap,\n): StylixStyledComponent<TComponent> {\n const Element: any = typeof $el === 'string' ? ($el as any) : React.forwardRef($el);\n const r: any = React.forwardRef((props: Record<string, any>, ref: React.Ref<unknown>) => {\n if (conflictingPropMapping) {\n for (const k in conflictingPropMapping) {\n props[conflictingPropMapping[k]] = (props as any)[k];\n delete props[k];\n }\n }\n return _Stylix(\n {\n $el: Element,\n ...addProps,\n ...props,\n $css: [addProps?.$css, props?.$css],\n },\n ref as any,\n );\n });\n r.displayName = `$.${\n ($el as React.FC).displayName ||\n ($el as React.FC).name ||\n ($el as string).toString?.() ||\n 'Unnamed'\n }`;\n r.__isStylix = true;\n return r;\n}\n","import React from 'react';\n\nimport { classifyProps } from './classifyProps';\nimport { useStylixContext } from './StylixProvider';\nimport { Stylix$Component, Stylix$Props } from './types';\nimport { useStyles } from './useStyles';\n\nexport function _Stylix<ElType extends React.ElementType>(\n props: Stylix$Props<ElType>,\n ref: React.Ref<ElType>,\n) {\n const { $el, $css, $disabled, className, children, ...rest } = props as any;\n\n const ctx = useStylixContext();\n const [styleProps, otherProps] = classifyProps(rest, ctx.styleProps);\n if ($css) styleProps.$css = $css;\n const hash = useStyles(styleProps, { disabled: $disabled });\n\n const allProps = {\n className: `${hash} ${className || ''}`.trim(),\n ref: ref,\n ...otherProps,\n };\n\n if (React.isValidElement($el)) {\n const $elProps = { ...($el.props as any) };\n allProps.className += ' ' + ($elProps.className || '');\n delete $elProps.className;\n return React.cloneElement(\n $el,\n { ...allProps, ...$elProps },\n ...(React.Children.toArray(children) || []),\n );\n }\n\n return <$el {...allProps}>{children}</$el>;\n}\n\nconst Stylix = React.forwardRef(_Stylix) as unknown as Stylix$Component;\nStylix.displayName = 'Stylix';\nStylix.__isStylix = true;\n\nexport default Stylix;\n","import htmlTags from './html-tags.json';\nimport { styled } from './styled';\nimport Stylix from './Stylix';\n\nfor (const i in htmlTags) {\n // Types are specified in ./types.ts, so we don't care what they type of htmlTags[i] is.\n // JSX.IntrinsicElements is a union of all HTML tags, so it is too complex for TypeScript to infer.\n const tag = htmlTags[i] as any;\n Stylix[tag] = styled(tag);\n}\n","[\n \"a\",\n \"abbr\",\n \"address\",\n \"area\",\n \"article\",\n \"aside\",\n \"audio\",\n \"b\",\n \"base\",\n \"bdi\",\n \"bdo\",\n \"blockquote\",\n \"body\",\n \"br\",\n \"button\",\n \"canvas\",\n \"caption\",\n \"cite\",\n \"code\",\n \"col\",\n \"colgroup\",\n \"data\",\n \"datalist\",\n \"dd\",\n \"del\",\n \"details\",\n \"dfn\",\n \"dialog\",\n \"div\",\n \"dl\",\n \"dt\",\n \"em\",\n \"embed\",\n \"fieldset\",\n \"figcaption\",\n \"figure\",\n \"footer\",\n \"form\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"head\",\n \"header\",\n \"hgroup\",\n \"hr\",\n \"html\",\n \"i\",\n \"iframe\",\n \"img\",\n \"input\",\n \"ins\",\n \"kbd\",\n \"label\",\n \"legend\",\n \"li\",\n \"link\",\n \"main\",\n \"map\",\n \"mark\",\n \"math\",\n \"menu\",\n \"menuitem\",\n \"meta\",\n \"meter\",\n \"nav\",\n \"noscript\",\n \"object\",\n \"ol\",\n \"optgroup\",\n \"option\",\n \"output\",\n \"p\",\n \"param\",\n \"picture\",\n \"pre\",\n \"progress\",\n \"q\",\n \"rb\",\n \"rp\",\n \"rt\",\n \"rtc\",\n \"ruby\",\n \"s\",\n \"samp\",\n \"script\",\n \"section\",\n \"select\",\n \"slot\",\n \"small\",\n \"source\",\n \"span\",\n \"strong\",\n \"style\",\n \"sub\",\n \"summary\",\n \"sup\",\n \"svg\",\n \"table\",\n \"tbody\",\n \"td\",\n \"template\",\n \"textarea\",\n \"tfoot\",\n \"th\",\n \"thead\",\n \"time\",\n \"title\",\n \"tr\",\n \"track\",\n \"u\",\n \"ul\",\n \"var\",\n \"video\",\n \"wbr\"\n]\n"],"names":[],"version":3,"file":"module.mjs.map"}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import React, { CSSProperties } from "react";
1
+ import * as CSS from "csstype";
2
+ import React from "react";
3
+ type CSSProperties = CSS.StandardProperties<number | string> & CSS.VendorProperties<number | string>;
2
4
  /**
3
5
  * Utility type that extends T with U, overriding any properties that are already defined in T.
4
6
  */
@@ -9,7 +11,7 @@ type StylixValue<T> = T | Array<T | '@'> | ((theme: any, media: string[]) => T |
9
11
  /**
10
12
  * All standard CSS properties, custom style props, and the $css prop.
11
13
  */
12
- type StylixStyleProps = {
14
+ export type StylixStyleProps = {
13
15
  /**
14
16
  * Additional styles.
15
17
  */
@@ -45,7 +47,7 @@ export interface StylixPropsExtensions {
45
47
  * return <$.div {...props} />;
46
48
  * }
47
49
  */
48
- export type StylixProps<TComponent extends React.ElementType = any, TExtends = object> = Extends<Extends<StylixStyleProps, React.ComponentPropsWithRef<TComponent>>, TExtends>;
50
+ export type StylixProps<TComponent extends React.ElementType = any, TExtends = object, TForceStyles extends keyof CSSProperties = never> = Extends<Extends<StylixStyleProps, Omit<React.ComponentPropsWithRef<TComponent>, TForceStyles>>, TExtends>;
49
51
  /**
50
52
  * Additional properties on the Stylix ($) component and its built-in html components.
51
53
  */
@@ -65,7 +67,7 @@ export type Stylix$elPropOptional<TComponent extends React.ElementType | React.R
65
67
  * `TComponent` is determined automatically by the type of $el.
66
68
  * <$ $el={...}>...</$>
67
69
  */
68
- type Stylix$Props<TComponent extends React.ElementType | React.ReactElement> = Stylix$elProp<TComponent> & (TComponent extends React.ElementType<infer P> ? Extends<StylixStyleProps, P> : StylixStyleProps & Record<string, any>);
70
+ type Stylix$Props<TComponent extends React.ElementType | React.ReactElement> = Stylix$elProp<TComponent> & (TComponent extends React.ElementType<infer P> ? Extends<P, StylixStyleProps> : StylixStyleProps & Record<string, any>);
69
71
  type Stylix$ComponentExtras = StylixComponentMeta & {
70
72
  [key in keyof JSX.IntrinsicElements]: React.FC<StylixProps<key>>;
71
73
  };
@@ -188,7 +190,7 @@ export function StylixTheme({ children, media, theme }: StylixThemeProps): JSX.E
188
190
  * If `global` is false, provided styles will be nested within the generated classname.
189
191
  * Returns the className hash if enabled, or an empty string.
190
192
  */
191
- export function useStyles(styles: Record<string, any>, options?: {
193
+ export function useStyles(styles: Record<string, any> | undefined, options?: {
192
194
  global?: boolean;
193
195
  disabled?: boolean;
194
196
  }): string;
@@ -200,10 +202,11 @@ export function useGlobalStyles(styles: StylixStyles, options?: {
200
202
  }): string;
201
203
  declare const Stylix: Stylix$Component;
202
204
  export default Stylix;
203
- type StylixStyledComponent<TProps> = React.FC<Extends<StylixStyleProps, TProps>> & StylixComponentMeta;
205
+ export type StylixStyledComponentWithProps<TProps> = React.FC<Extends<TProps, StylixStyleProps>> & StylixComponentMeta;
206
+ export type StylixStyledComponent<TComponent extends HtmlOrComponent> = StylixStyledComponentWithProps<HtmlOrComponentProps<TComponent>>;
204
207
  type HtmlOrComponent = keyof JSX.IntrinsicElements | React.ForwardRefRenderFunction<any, any>;
205
208
  type HtmlOrComponentProps<TComponent extends HtmlOrComponent> = TComponent extends keyof JSX.IntrinsicElements ? React.ComponentPropsWithRef<TComponent> : TComponent extends React.ForwardRefRenderFunction<infer R, infer P> ? P & React.RefAttributes<R> : never;
206
- export function styled<TComponent extends HtmlOrComponent, TPropMap extends Record<string, string> = Record<string, never>>($el: TComponent, addProps?: Partial<HtmlOrComponentProps<TComponent>>, conflictingPropMapping?: TPropMap): StylixStyledComponent<HtmlOrComponentProps<TComponent>>;
209
+ export function styled<TComponent extends HtmlOrComponent, TPropMap extends Record<string, string> = Record<string, never>>($el: TComponent, addProps?: Extends<StylixStyleProps, Partial<HtmlOrComponentProps<TComponent>>>, conflictingPropMapping?: TPropMap): StylixStyledComponent<T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CAAC,EAE/D,GAAG,EAAE,UAAU,EACf,QAAQ,CAAC,EAAE,OAAO,CAAC,qBAAqB,UAAU,CAAC,CAAC,EACpD,sBAAsB,CAAC,EAAE,QAAQ,GAChC,sBAAsB,qBAAqB,UAAU,CAAC,CAAC,CA2BzD;AE3CD,4BAA4B,mBAAmB,CAAC","sources":["core/src/src/types.ts","core/src/src/classifyProps.ts","core/src/src/util/isPlainObject.ts","core/src/src/plugins/cleanStyles.ts","core/src/src/util/mapObjectRecursive.ts","core/src/src/plugins/defaultUnits.ts","core/src/src/plugins/flattenNestedStyles.ts","core/src/src/plugins/mediaArrays.ts","core/src/src/util/flatten.ts","core/src/src/plugins/merge$css.ts","core/src/src/plugins/propCasing.ts","core/src/src/plugins/replace$$class.ts","core/src/src/plugins/themeFunctions.ts","core/src/src/util/cloneDeep.ts","core/src/src/util/walkRecursive.ts","core/src/src/plugins/customProps.ts","core/src/src/plugins/index.ts","core/src/src/styleCollector.tsx","core/src/src/util/merge.ts","core/src/src/util/useIsoLayoutEffect.ts","core/src/src/StylixProvider.tsx","core/src/src/applyRules.ts","core/src/src/stylesToRuleArray.ts","core/src/src/util/hashString.ts","core/src/src/useStyles.ts","core/src/src/Stylix.tsx","core/src/src/styled.tsx","core/src/src/elements.ts","core/src/src/index.ts","core/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export {\n type StylixProps,\n type StylixPropsExtensions,\n type Stylix$Component,\n type Stylix$elProp,\n type Stylix$elPropOptional,\n type Extends,\n} from './types';\nexport { useStylixContext, useStylixTheme, StylixProvider, StylixTheme } from './StylixProvider';\nimport { StylixPublicContext } from './StylixProvider';\nexport type StylixContext = StylixPublicContext;\nexport { useStyles, useKeyframes, useGlobalStyles } from './useStyles';\nexport {\n defaultPlugins,\n customProps,\n type StylixPlugin,\n type StylixPluginFunctionContext,\n} from './plugins';\nexport { mapObjectRecursive } from './util/mapObjectRecursive';\nexport { walkRecursive } from './util/walkRecursive';\nexport { createStyleCollector, styleCollectorContext, type StyleCollector } from './styleCollector';\nexport { classifyProps, useClassifyProps } from './classifyProps';\nexport { styled } from './styled';\nimport './elements';\nexport { default } from './Stylix';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;AAIA,qBAAqB,IAAI,kBAAkB,CAAC,MAAM,GAAG,MAAM,CAAC,GAC1D,IAAI,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;AAExC;;GAEG;AACH,oBAAoB,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;AAEjD,oBAA2B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnD,oBAA2B,YAAY,GAAG,YAAY,EAAE,CAAC;AAEzD,iBAAwB,CAAC,IACrB,CAAC,GACD,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,GACd,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;AAE1D;;GAEG;AACH,+BAA+B;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG;KACD,GAAG,IAAI,MAAM,aAAa,CAAC,CAAC,EAAE,YAAY,aAAa,CAAC,GAAG,CAAC,CAAC;CAC/D,GAAG;KACD,GAAG,IAAI,MAAM,qBAAqB,CAAC,CAAC,EAAE,YACrC,GAAG,SAAS,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,GAAG,CAAC,GAAG,KAAK,CAC7E;CACF,CAAC;AAEF;;;;;;;;GAQG;AACH;CAAyC;AAEzC;;;;;;;;;;GAUG;AACH,wBACE,UAAU,SAAS,MAAM,WAAW,GAAG,GAAG,EAC1C,QAAQ,GAA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AC;AAE7C,0BAAiC,UAAU,SAAS,eAAe,IACjE,UAAU,SAAS,MAAM,IAAI,iBAAiB,GAC1C,MAAM,qBAAqB,CAAC,UAAU,CAAC,GACvC,UAAU,SAAS,MAAM,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GACnE,CAAC,GAAG,MAAM,aAAa,CAAC,CAAC,CAAC,GAC1B,KAAK,CAAC;AAEZ,uBACE,UAAU,SAAS,eAAe,EAClC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAE/D,GAAG,EAAE,UAAU,EACf,QAAQ,CAAC,EAAE,QAAQ,gBAAgB,EAAE,OAAO,CAAC,qBAAqB,UAAU,CAAC,CAAC,CAAC,EAC/E,sBAAsB,CAAC,EAAE,QAAQ,GAChC,sBAAsB,UAAU,CAAC,CA2BnC;AE7CD,4BAA4B,mBAAmB,CAAC","sources":["core/src/src/types.ts","core/src/src/classifyProps.ts","core/src/src/util/isPlainObject.ts","core/src/src/plugins/cleanStyles.ts","core/src/src/util/mapObjectRecursive.ts","core/src/src/plugins/defaultUnits.ts","core/src/src/plugins/flattenNestedStyles.ts","core/src/src/plugins/mediaArrays.ts","core/src/src/util/flatten.ts","core/src/src/plugins/merge$css.ts","core/src/src/plugins/propCasing.ts","core/src/src/plugins/replace$$class.ts","core/src/src/plugins/themeFunctions.ts","core/src/src/util/cloneDeep.ts","core/src/src/util/walkRecursive.ts","core/src/src/plugins/customProps.ts","core/src/src/plugins/index.ts","core/src/src/styleCollector.tsx","core/src/src/util/merge.ts","core/src/src/util/useIsoLayoutEffect.ts","core/src/src/StylixProvider.tsx","core/src/src/applyRules.ts","core/src/src/stylesToRuleArray.ts","core/src/src/util/hashString.ts","core/src/src/useStyles.ts","core/src/src/Stylix.tsx","core/src/src/styled.tsx","core/src/src/elements.ts","core/src/src/index.ts","core/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export {\n type StylixProps,\n type StylixPropsExtensions,\n type Stylix$Component,\n type Stylix$elProp,\n type Stylix$elPropOptional,\n type Extends,\n type StylixStyleProps,\n} from './types';\nexport { useStylixContext, useStylixTheme, StylixProvider, StylixTheme } from './StylixProvider';\nimport { StylixPublicContext } from './StylixProvider';\nexport type StylixContext = StylixPublicContext;\nexport { useStyles, useKeyframes, useGlobalStyles } from './useStyles';\nexport {\n defaultPlugins,\n customProps,\n type StylixPlugin,\n type StylixPluginFunctionContext,\n} from './plugins';\nexport { mapObjectRecursive } from './util/mapObjectRecursive';\nexport { walkRecursive } from './util/walkRecursive';\nexport { createStyleCollector, styleCollectorContext, type StyleCollector } from './styleCollector';\nexport { classifyProps, useClassifyProps } from './classifyProps';\nexport { styled, type StylixStyledComponentWithProps, type StylixStyledComponent } from './styled';\nimport './elements';\nexport { default } from './Stylix';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stylix/core",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "React, with style. Add styles to your React apps with props: the easy, natural, and low learning curve approach.",
5
5
  "keywords": [
6
6
  "react",