{"version":3,"file":"css.cjs","sources":["../src/css.js"],"sourcesContent":["import StyleSheet from './StyleSheet.js';\n\n/**\n * Creates and attaches a new StyleSheet instance to the DOM.\n * \n * @module\n * @function\n * @param {Object} styles - An object containing CSS rules. Keys represent selectors, and values represent style objects.\n * An at-rule key may also hold a statement prelude string, rendered as `@rule prelude;`; an array value emits one\n * statement per element, so a name can repeat (e.g. several `@import` rules) and properties can carry fallback values.\n * @param {Object} [options] - Optional configuration for the StyleSheet instance. Includes options like `prefix`, `renderers`, and more.\n * @returns {StyleSheet} The created and attached StyleSheet instance. Its `classes` property maps\n * class name selectors to their generated unique class name.\n * \n * @example\n * // Create styles for a link component.\n * const { classes } = css({\n *     link : {\n *         color : 'blue',\n *         '&:hover' : {\n *             textDecoration : 'underline'\n *         }\n *     }\n * });\n * \n * // Use the generated `link` class in a component.\n * const Link = ({ label, href }) => <a className={classes.link} href={href}>{label}</a>;\n * \n * @example\n * // Declare the layer order and define the classes inside layer blocks.\n * const { classes } = css({\n *     '@layer' : 'base, theme',\n *     '@layer base' : {\n *         button : {\n *             color : 'black'\n *         }\n *     },\n *     '@layer theme' : {\n *         button : {\n *             color : 'blue'\n *         }\n *     }\n * });\n * \n * // Both blocks share the same generated `button` class.\n * const Button = ({ label }) => <button className={classes.button}>{label}</button>;\n */\nconst css = (styles, options) => new StyleSheet(styles, options).attach();\n\nexport default css;\n"],"names":[],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACK,MAAC,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM;;;;"}