next-yak
Version:
next-yak is a CSS-in-JS solution tailored for Next.js that seamlessly combines the expressive power of styled-components syntax with efficient build-time extraction of CSS using Next.js's built-in CSS configuration
1 lines • 48.1 kB
Source Map (JSON)
{"version":3,"file":"internal.cjs","names":["INTERNAL.ATTRS_MERGED","INTERNAL.RUNTIME_STYLES_DONE"],"sources":["../runtime/cssLiteral.tsx","../runtime/internals/propMarkers.ts","../runtime/internals/mergeClassNames.ts","../runtime/styled.tsx","../runtime/atoms.tsx","../runtime/keyframes.tsx","../runtime/globalStyle.tsx","../runtime/internals/unitPostFix.ts","../runtime/internals/mergeCssProp.ts","../runtime/styledDom.tsx"],"sourcesContent":["import type { YakTheme } from \"./index.ts\";\nimport { ClassNameCollector, RuntimeStyleProcessor } from \"./publicStyledApi.js\";\n\nexport const yakComponentSymbol = Symbol(\"yak\");\n\n/**\n * String-backed ClassNameCollector used by the render path\n *\n * `add` is a plain string append and does not deduplicate, so the collector is\n * a multiset - the same class may appear twice, e.g. `atoms(\"a b\", \"a\")` → `\"a b a\"`.\n * `has`/`delete` cover the rare path where a runtime function inspects or\n * removes classes; `delete` removes every occurrence\n */\nexport class ClassNames implements ClassNameCollector {\n value: string;\n constructor(initial?: string) {\n this.value = initial || \"\";\n }\n add(className: string) {\n this.value += (this.value && \" \") + className;\n }\n has(className: string) {\n return (\" \" + this.value + \" \").includes(\" \" + className + \" \");\n }\n delete(className: string) {\n if (this.has(className)) {\n this.value = this.value\n .split(\" \")\n .filter((existing) => existing !== className)\n .join(\" \");\n }\n }\n}\n\nexport type ComponentStyles<TProps> = (props: TProps) => {\n className: string;\n style?: {\n [key: string]: string;\n };\n};\n\nexport type CSSInterpolation<TProps> =\n | string\n | number\n | undefined\n | null\n | false\n | ComponentStyles<TProps>\n | {\n // type only identifier to allow targeting components\n // e.g. styled.svg`${Button}:hover & { fill: red; }`\n [yakComponentSymbol]: any;\n }\n | ((props: TProps) => CSSInterpolation<TProps>);\n\ntype CSSStyles<TProps = {}> = {\n style: { [key: string]: string | ((props: TProps) => string) };\n};\n\ntype CSSFunction = <TProps = {}>(\n styles: TemplateStringsArray,\n ...values: CSSInterpolation<TProps & { theme: YakTheme }>[]\n) => ComponentStyles<TProps>;\n\nexport type NestedRuntimeStyleProcessor = (\n props: unknown,\n classNames: ClassNameCollector,\n style: React.CSSProperties,\n) =>\n | {\n className?: string;\n style?: React.CSSProperties;\n }\n | void\n | NestedRuntimeStyleProcessor;\n\n/**\n * css() runtime factory of css``\n *\n * /!\\ next-yak transpiles css`` and styled``\n *\n * This changes the typings of the css`` and styled`` functions.\n * During development the user of next-yak wants to work with the\n * typings BEFORE compilation.\n *\n * Therefore this is only an internal function only and it must be cast to any\n * before exported to the user.\n *\n * The internal functioning of css`` is to return a single callback function that runs all functions\n * (or creates new ones if needed) that are passed as arguments. These functions receive the props, classNames, and style object as arguments\n * and operate directly on the classNames and style objects.\n */\nexport function css<TProps>(\n styles: TemplateStringsArray,\n ...values: CSSInterpolation<NoInfer<TProps> & { theme: YakTheme }>[]\n): ComponentStyles<TProps>;\nexport function css<TProps>(...args: Array<any>): RuntimeStyleProcessor<TProps> {\n // Normally this could be an array of strings passed, but as we transpile the usage of css`` ourselves, we control the arguments\n // and ensure that only the first argument is a string (class name of the non-dynamic styles)\n let className: string | undefined;\n const dynamicCssFunctions: NestedRuntimeStyleProcessor[] = [];\n for (const arg of args as Array<string | CSSFunction | CSSStyles<any>>) {\n // A CSS-module class name which got auto generated during build from static css\n // e.g. css`color: red;`\n // compiled -> css(\"yak31e4\")\n if (typeof arg === \"string\") {\n className = arg;\n }\n // Dynamic CSS e.g.\n // css`${props => props.active && css`color: red;`}`\n // compiled -> css((props: { active: boolean }) => props.active && css(\"yak31e4\"))\n else if (typeof arg === \"function\") {\n dynamicCssFunctions.push(arg as unknown as NestedRuntimeStyleProcessor);\n }\n // Dynamic CSS with css variables e.g.\n // css`transform: translate(${props => props.x}, ${props => props.y});`\n // compiled -> css(\"yak31e4\", { style: { \"--yakVarX\": props => props.x }, \"--yakVarY\": props => props.y }})\n else if (typeof arg === \"object\" && \"style\" in arg) {\n dynamicCssFunctions.push((props, _, style) => {\n for (const key in arg.style) {\n const value = arg.style[key];\n if (typeof value === \"function\") {\n // @ts-expect-error CSSProperties don't allow css variables\n style[key] = String(\n // The value for a css value can be a theme dependent function e.g.:\n // const borderColor = (props: { theme: { mode: \"dark\" | \"light\" } }) => props.theme === \"dark\" ? \"black\" : \"white\";\n // css`border-color: ${borderColor};`\n // Therefore the value has to be extracted recursively\n recursivePropExecution(props, value),\n );\n } else {\n // @ts-expect-error CSSProperties don't allow css variables\n style[key] = String(value);\n }\n }\n });\n }\n }\n\n // Non Dynamic CSS\n // This is just an optimization for the common case where there are no dynamic css functions\n // `$dynamic: false` lets the styled runtime skip theme lookup and\n // style-object allocation entirely for static components\n if (dynamicCssFunctions.length === 0) {\n return Object.assign(\n (_: unknown, classNames: ClassNameCollector) => {\n if (className) {\n classNames.add(className);\n }\n },\n { $dynamic: false },\n );\n }\n\n return Object.assign(\n (props: TProps, classNames: ClassNameCollector, allStyles: React.CSSProperties) => {\n if (className) {\n classNames.add(className);\n }\n for (let i = 0; i < dynamicCssFunctions.length; i++) {\n unwrapProps(props, dynamicCssFunctions[i], classNames, allStyles);\n }\n },\n { $dynamic: true },\n );\n}\n\n// Dynamic CSS with runtime logic\nconst unwrapProps = (\n props: unknown,\n fn: NestedRuntimeStyleProcessor,\n classNames: ClassNameCollector,\n style: React.CSSProperties,\n) => {\n let result = fn(props, classNames, style);\n while (result) {\n if (typeof result === \"function\") {\n result = result(props, classNames, style);\n continue;\n } else if (typeof result === \"object\") {\n if (\"className\" in result && result.className) {\n classNames.add(result.className);\n }\n if (\"style\" in result && result.style) {\n for (const key in result.style) {\n // This is hard for typescript to infer\n style[key as keyof React.CSSProperties] = result.style[\n key as keyof React.CSSProperties\n ] as any;\n }\n }\n }\n break;\n }\n};\n\nconst recursivePropExecution = (props: unknown, fn: (props: unknown) => any): string | number => {\n const result = fn(props);\n if (typeof result === \"function\") {\n return recursivePropExecution(props, result);\n }\n // the `process.env` lookup is a real per-call cost for unbundled Node\n // consumers, so it must stay behind the typeof guards on the invalid path\n if (typeof result !== \"string\" && typeof result !== \"number\" && !(result instanceof String)) {\n if (process.env.NODE_ENV === \"development\") {\n throw new Error(\n `Dynamic CSS functions must return a string or number but returned ${JSON.stringify(\n result,\n )}\\n\\nDynamic CSS function: ${fn.toString()}\\n`,\n );\n }\n }\n return result;\n};\n","/** Internal markers used by the render path */\n\n/**\n * Set on props once the attrs functions have been folded in, so a nested yak\n * wrapper further out the chain does not merge the same attrs twice\n */\nexport const ATTRS_MERGED = \"$__a\" as const;\n\n/**\n * Set on props once the runtime style processor has run, so an outer yak\n * component that receives already-processed props skips the collector entirely\n */\nexport const RUNTIME_STYLES_DONE = \"$__r\" as const;\n\n/**\n * Carries the constant `.attrs({...})` object on the merged attrs function,\n * marking it theme-independent so the fast render path can apply it without\n * executing anything. Lives on the function, never on props\n */\nexport const STATIC_ATTRS = \"$sa\" as const;\n","/**\n * Merges two optional class name values with a space.\n *\n * Used by the styled runtime to combine incoming and generated class names,\n * and injected by the compiler (as `__yak_mergeClassNames`) when it replaces\n * a JSX usage of a fully static styled component with a plain DOM element:\n * ```tsx\n * const Card = styled.div`color: red;`;\n * <Card className={active && \"active\"} />\n * ```\n * becomes\n * ```tsx\n * <div className={__yak_mergeClassNames(\"yX\", active && \"active\")} />\n * ```\n */\nexport const mergeClassNames = (\n a: string | false | null | undefined,\n b: string | false | null | undefined,\n) => {\n if (!a) return b || undefined;\n if (!b) return a;\n return a + \" \" + b;\n};\n","import { css, CSSInterpolation, ClassNames, yakComponentSymbol } from \"./cssLiteral.js\";\nimport * as INTERNAL from \"./internals/propMarkers.js\";\nimport React from \"react\";\nimport type {\n Attrs,\n AttrsMerged,\n Styled,\n YakComponent,\n AttrsFunction,\n StyledFn,\n HtmlTags,\n Substitute,\n StyledLiteral,\n RuntimeStyleProcessor,\n} from \"./publicStyledApi.js\";\n\n// the following export is not relative as \"next-yak/context\"\n// links to one file for react server components and\n// to another file for classic react components\nimport { useTheme } from \"next-yak/context\";\nimport type { YakTheme } from \"./context/index.tsx\";\nimport { mergeClassNames } from \"./internals/mergeClassNames.js\";\n\n//\n// The `styled()` API without `styled.` syntax\n//\n// The API design is inspired by styled-components:\n// https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/constructors/styled.tsx\n// https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/models/StyledComponent.ts\n//\nconst styledFactory: StyledFn = (Component) =>\n Object.assign(yakStyled(Component), {\n attrs: (attrs: Attrs<any>) => yakStyled(Component, attrs),\n });\n\n/**\n * The `styled` method works perfectly on all of your own or any third-party component,\n * as long as they attach the passed className prop to a DOM element.\n *\n * @usage\n *\n * ```tsx\n * const StyledLink = styled(Link)`\n * color: #BF4F74;\n * font-weight: bold;\n * `;\n * ```\n */\nexport const styled = styledFactory as Styled;\n\n/**\n * Real shape of the yakComponentSymbol tuple, which the public `YakComponent`\n * keeps opaque as `[unknown, ...]`\n */\ntype YakComponentInternals = [\n self: React.FunctionComponent,\n attrsFn: AttrsFunction<any, any, any> | undefined,\n styleProcessor: RuntimeStyleProcessor<unknown>,\n target: React.FunctionComponent | string,\n];\n\nconst yakStyled: StyledInternal = (Component, attrs) => {\n const isYakComponent = typeof Component !== \"string\" && yakComponentSymbol in Component;\n\n // if the component that is wrapped is a yak component, we can extract it to render the underlying component directly\n // and we can also extract the attrs function and the dynamic style function to merge it with the current attrs function (or dynamic style function)\n // so that the sequence of the attrs functions is preserved\n const [, parentAttrsFn, parentRuntimeStylesFn, parentTarget] = isYakComponent\n ? (Component[yakComponentSymbol] as [\n YakComponent<unknown>,\n ExtractAttrsFunction<typeof attrs>,\n RuntimeStyleProcessor<unknown>,\n React.FunctionComponent | string,\n ])\n : [];\n\n // the ultimate render target of the whole styled(styled(...)) chain:\n // attrs and style processors are already merged at construction time, so\n // a chain of N levels renders the target directly in ONE wrapper instead\n // of re-entering every parent wrapper per element per render\n const targetComponent = (isYakComponent ? parentTarget : Component) as\n | React.FunctionComponent\n | string;\n\n const mergedAttrsFn = buildRuntimeAttrsProcessor(attrs, parentAttrsFn);\n const staticAttrs = (mergedAttrsFn as StaticAttrsCarrier | undefined)?.[INTERNAL.STATIC_ATTRS];\n\n return (styles, ...values) => {\n // combine all interpolated logic into a single function\n // e.g. styled.button`color: ${props => props.color}; margin: ${props => props.margin};`\n const runtimeStylesFn = css(\n styles,\n ...(values as CSSInterpolation<unknown>[]),\n ) as RuntimeStyleProcessor<unknown>;\n const runtimeStyleProcessor = buildRuntimeStylesProcessor(\n runtimeStylesFn,\n parentRuntimeStylesFn,\n );\n const Yak: React.FunctionComponent = (props) => {\n // fast path for components that contribute the same thing on every\n // render — no attrs at all, or a constant `.attrs({...})` which cannot\n // read the theme — and no dynamic styles. Contributes the chain's class\n // names and strips $-props; skips theme lookup, prop spreading and style\n // cloning entirely (this is NOT against the rule of hooks — the condition\n // is constant for the lifetime of the component)\n if ((!mergedAttrsFn || staticAttrs) && !runtimeStyleProcessor.$dynamic) {\n // props that already went through a yak wrapper keep their processed\n // className, and `source` then aliases `props` — so the class names are\n // written to the fresh, filtered object rather than back into props\n const source = (\n staticAttrs && !(INTERNAL.ATTRS_MERGED in props)\n ? combineProps(\n {\n ...(props as { className?: string; style?: React.CSSProperties }),\n // mark the props as processed\n [INTERNAL.ATTRS_MERGED]: true,\n },\n staticAttrs,\n )\n : props\n ) as { className?: string; style?: React.CSSProperties };\n const filteredProps = removeNonDomProperties(source) as {\n className?: string;\n };\n if (!(INTERNAL.RUNTIME_STYLES_DONE in source)) {\n const classNames = new ClassNames(source.className);\n runtimeStyleProcessor(source, classNames, undefined as unknown as React.CSSProperties);\n filteredProps.className = classNames.value || undefined;\n }\n const Target = targetComponent as React.ElementType;\n return <Target {...(filteredProps as React.ComponentProps<typeof Target>)} />;\n }\n\n // attrs functions and dynamic style functions receive the theme —\n // fully static components take the fast path above and never read the\n // theme context\n const theme = useTheme();\n\n // The first components which is not wrapped in a yak component will execute all attrs functions\n // starting from the innermost yak component to the outermost yak component (itself)\n const combinedProps =\n INTERNAL.ATTRS_MERGED in props\n ? ({\n theme,\n ...props,\n } as {\n theme: YakTheme;\n className?: string;\n style?: React.CSSProperties;\n })\n : // overwrite and merge the current props with the processed attrs\n combineProps(\n {\n theme,\n ...(props as {\n className?: string;\n style?: React.CSSProperties;\n }),\n // mark the props as processed\n [INTERNAL.ATTRS_MERGED]: true,\n },\n mergedAttrsFn?.({ theme, ...(props as any) }),\n );\n\n // execute all functions inside the style literal if not already executed\n // e.g. styled.button`color: ${props => props.color};`\n //\n // inner levels of a styled(Component) chain receive already-processed\n // props and skip this entirely — no collector, no style clone\n if (!(INTERNAL.RUNTIME_STYLES_DONE in combinedProps)) {\n const classNames = new ClassNames(combinedProps.className);\n // static processors never write style values, so the incoming style\n // object can be passed through without a defensive copy\n const styles = runtimeStyleProcessor.$dynamic\n ? { ...combinedProps.style }\n : combinedProps.style;\n runtimeStyleProcessor(combinedProps, classNames, styles as React.CSSProperties);\n // @ts-expect-error this is not typed correctly\n combinedProps[INTERNAL.RUNTIME_STYLES_DONE] = true;\n\n combinedProps.className = classNames.value || undefined;\n if (styles !== combinedProps.style) {\n combinedProps.style = styles;\n }\n }\n\n // delete the yak theme from the props\n // this must happen after the runtimeStyles are calculated\n // prevents passing the theme prop to the DOM element of a styled component\n const { theme: themeAfterAttr, ...combinedPropsWithoutTheme } = combinedProps;\n const propsBeforeFiltering =\n themeAfterAttr === theme ? combinedPropsWithoutTheme : combinedProps;\n\n // remove all props that start with a $ sign so they reach neither DOM\n // elements nor custom components — this also strips the internal\n // INTERNAL.ATTRS_MERGED/INTERNAL.RUNTIME_STYLES_DONE markers, which must not cross a\n // custom component boundary (a custom component may render another yak\n // component that has to process its own attrs/styles)\n const filteredProps = removeNonDomProperties(propsBeforeFiltering);\n\n // render the chain's target directly — parent wrappers contribute only\n // their (already merged) attrs and style processors\n const Target = targetComponent as React.ElementType;\n return <Target {...(filteredProps as React.ComponentProps<typeof Target>)} />;\n };\n\n // Direct write instead of Object.assign (faster & smaller)\n const taggedYak = Yak as React.FunctionComponent & {\n [yakComponentSymbol]: YakComponentInternals;\n };\n taggedYak[yakComponentSymbol] = [Yak, mergedAttrsFn, runtimeStyleProcessor, targetComponent];\n return taggedYak;\n };\n};\n\n/**\n * Remove all entries that start with a $ sign\n *\n * This allows to have props that are used for internal styling purposes\n * but are not be passed to the DOM element\n */\nconst removeNonDomProperties = <T extends Record<string, unknown>>(obj: T): T => {\n const result = {} as T;\n for (const key in obj) {\n if (!key.startsWith(\"$\") && obj[key] !== undefined) {\n result[key] = obj[key];\n }\n }\n return result;\n};\n\n/**\n * merge props and processed props (including class names and styles)\n * e.g.:\\\n * `{ className: \"a\", foo: 1 }` and `{ className: \"b\", bar: 2 }` \\\n * => `{ className: \"a b\", foo: 1, bar: 2 }`\n */\nconst combineProps = <\n T extends {\n className?: string;\n style?: React.CSSProperties;\n },\n TOther extends\n | {\n className?: string;\n style?: React.CSSProperties;\n }\n | null\n | undefined,\n>(\n props: T,\n newProps: TOther,\n) =>\n newProps\n ? (props.className === newProps.className || !newProps.className) &&\n (props.style === newProps.style || !newProps.style)\n ? // shortcut if no style and class merging is necessary\n {\n ...props,\n ...newProps,\n }\n : // merge class names and styles\n {\n ...props,\n ...newProps,\n className: mergeClassNames(props.className, newProps.className),\n style: { ...props.style, ...newProps.style },\n }\n : // if no new props are provided, no merging is necessary\n props;\n\n/**\n * Merges the attrs function of the current component with the attrs function of the parent component\n * in order to preserve the sequence of the attrs functions.\n * Note: In theory, the parentAttrsFn can have different types for TAttrsIn and TAttrsOut\n * but as this is only used internally, we can ignore and simplify this case\n * @param attrs The attrs object or function of the current component (if any)\n * @param parentAttrsFn The attrs function of the parent/wrapped component (if any)\n * @returns A function that receives the props and returns the transformed props\n */\nconst buildRuntimeAttrsProcessor = <\n T,\n TAttrsIn extends object,\n TAttrsOut extends AttrsMerged<T, TAttrsIn>,\n>(\n attrs?: Attrs<T, TAttrsIn, TAttrsOut>,\n parentAttrsFn?: AttrsFunction<T, TAttrsIn, TAttrsOut>,\n): AttrsFunction<T, TAttrsIn, TAttrsOut> | undefined => {\n const ownAttrsFn = attrs && (typeof attrs === \"function\" ? attrs : () => attrs);\n\n if (ownAttrsFn && parentAttrsFn) {\n return (props) => {\n const parentProps = parentAttrsFn(props);\n\n // overwrite and merge the parent props with the props received from the attrs function\n // after they went through the parent attrs function.\n //\n // This makes sure the linearity of the attrs functions is preserved and all attrs function receive\n // the whole props object calculated from the previous attrs functions\n return combineProps(parentProps, ownAttrsFn(combineProps(props, parentProps)));\n };\n }\n\n // A constant `.attrs({...})` is wrapped into `() => attrs`, which makes it\n // indistinguishable from `.attrs(props => ...)` at render time — so record the\n // object it will always return. Only the wrapper closure is tagged, never a\n // user-supplied attrs function.\n //\n // A `styled(StyledWithAttrs).attrs({...})` chain merges its levels per render\n // and is not tagged, which keeps a mutation of an attrs object observable\n if (ownAttrsFn && typeof attrs !== \"function\") {\n return Object.assign(ownAttrsFn, {\n [INTERNAL.STATIC_ATTRS]: attrs,\n } as StaticAttrsCarrier);\n }\n\n return ownAttrsFn || parentAttrsFn;\n};\n\n/**\n * The constant object a `.attrs({...})` processor always returns\n *\n * Kept local to this module — like the `yakComponentSymbol` tuple, it is an\n * implementation detail and must not reach the public `AttrsFunction` type\n */\ntype StaticAttrsCarrier = { [K in typeof INTERNAL.STATIC_ATTRS]?: object };\n\n/**\n * Merges the runtime style function of the current component with the runtime style function of the parent component\n * in order to preserve the sequence of the attrs functions.\n * @param runtimeStylesFn The current runtime styles function\n * @param parentRuntimeStylesFn The parent runtime styles function\n * @returns The merged runtime styles function\n */\nconst buildRuntimeStylesProcessor = <T,>(\n runtimeStylesFn: RuntimeStyleProcessor<T>,\n parentRuntimeStylesFn?: RuntimeStyleProcessor<T>,\n) => {\n if (runtimeStylesFn && parentRuntimeStylesFn) {\n const combined: RuntimeStyleProcessor<T> = Object.assign(\n (\n props: T,\n classNames: Parameters<RuntimeStyleProcessor<T>>[1],\n style: React.CSSProperties,\n ) => {\n parentRuntimeStylesFn(props, classNames, style);\n runtimeStylesFn(props, classNames, style);\n },\n // the chain is dynamic if any level is dynamic\n { $dynamic: runtimeStylesFn.$dynamic || parentRuntimeStylesFn.$dynamic },\n );\n return combined;\n }\n return runtimeStylesFn || parentRuntimeStylesFn;\n};\n\n/**\n * Internal function where attrs are passed to be processed\n */\nexport type StyledInternal = <\n T extends object,\n TAttrsIn extends object = {},\n TAttrsOut extends AttrsMerged<T, TAttrsIn> = AttrsMerged<T, TAttrsIn>,\n>(\n Component: React.FunctionComponent<T> | YakComponent<T> | HtmlTags | string,\n attrs?: Attrs<T, TAttrsIn, TAttrsOut>,\n) => StyledLiteral<Substitute<T, TAttrsIn>>;\n\n/**\n * Utility type to extract the AttrsFunction from the Attrs type\n */\nexport type ExtractAttrsFunction<T> = T extends (p: any) => any ? T : never;\n","import { ClassNames, ComponentStyles, css } from \"./cssLiteral.js\";\nimport { RuntimeStyleProcessor } from \"./publicStyledApi.js\";\n\n/**\n * Allows to use atomic CSS classes in a styled or css block\n *\n * @usage\n *\n * ```tsx\n * import { styled, atoms } from \"next-yak\";\n *\n * const Button = styled.button<{ $primary?: boolean }>`\n * ${atoms(\"text-teal-600\", \"text-base\", \"rounded-md\")}\n * ${props => props.$primary && atoms(\"shadow-md\")}\n * `;\n * ```\n */\nexport const atoms = <T,>(\n ...atoms: (string | RuntimeStyleProcessor<T> | false)[]\n): ComponentStyles<T> => {\n const staticClasses = new ClassNames();\n const dynamicFunctions: RuntimeStyleProcessor<T>[] = [];\n\n for (const atom of atoms) {\n if (typeof atom === \"string\") {\n staticClasses.add(atom);\n } else if (typeof atom === \"function\") {\n dynamicFunctions.push(atom);\n }\n }\n\n // the collected classes are passed as css()'s static class name,\n // only the dynamic atoms stay functions\n // @ts-expect-error the internal implementation of css is not typed\n return css(staticClasses.value, ...dynamicFunctions);\n};\n","/**\n * Allows to use CSS keyframe animations in a styled or css block\n *\n * @usage\n *\n * ```tsx\n * import { styled, keyframes } from \"next-yak\";\n *\n * const rotate = keyframes`\n * from {\n * transform: rotate(0deg);\n * }\n * to {\n * transform: rotate(360deg);\n * }\n * `;\n *\n * const Spinner = styled.div`\n * animation: ${rotate} 1s linear infinite;\n * `;\n * ```\n */\nexport const keyframes = <T extends (string | number | bigint)[] = never>(\n styles: TemplateStringsArray,\n ..._dynamic: T\n): string => {\n // during compilation all args of keyframe are compiled\n // to a string which references the animation name\n return styles as any as string;\n};\n","import type { ComponentStyles } from \"./cssLiteral.js\";\nimport type { YakComponent } from \"./publicStyledApi.js\";\n\n/**\n * Values that may be interpolated into a `globalStyle` template.\n *\n * Only build-time values are allowed — constants, `keyframes` animation names,\n * static `css` mixins and styled-component selectors. Runtime functions\n * (`${(props) => ...}`) are intentionally excluded: a global rule has no element\n * to attach a CSS variable to. Declare a CSS custom property instead and toggle\n * it via an attribute/class on the root element.\n */\nexport type GlobalStyleInterpolation = string | number | ComponentStyles<{}> | YakComponent<any>;\n\n/**\n * Declares global, unscoped styles that ride the same zero-runtime extraction\n * pipeline as `styled` and `keyframes`.\n *\n * Global styles are **part of the stylesheet, not part of the render tree**.\n * They apply exactly when the module declaring them is included in the bundle —\n * typically by importing it from a layout or entry point. They cannot be\n * conditionally mounted; express conditions in CSS (`@media`, `@supports`,\n * `:root[data-theme]`, `:has()`) or through CSS custom properties.\n *\n * @usage\n *\n * ```tsx\n * import { globalStyle, keyframes } from \"next-yak\";\n *\n * const fadeIn = keyframes`\n * from { opacity: 0; }\n * `;\n *\n * globalStyle`\n * :root {\n * --spacing: 4px;\n * }\n *\n * body {\n * margin: 0;\n * }\n *\n * ::view-transition-new(root) {\n * animation: ${fadeIn} 200ms ease;\n * }\n * `;\n * ```\n */\nexport const globalStyle = (\n _styles: TemplateStringsArray,\n ..._values: Array<GlobalStyleInterpolation>\n): void => {\n return undefined;\n};\n","/**\n * Internal helper called by transformed code - Do not use directly\n *\n * Takes a function and a css unit and returns the result of the function concatenated with the unit\n *\n * ```tsx\n * import { styled } from \"next-yak\";\n *\n * const Button = styled.button<{ $width?: boolean }>`\n * width: ${({ $width }) => $width}px;\n * `;\n * ```\n *\n * Which will be transformed to:\n * ```tsx\n * import { styled } from \"next-yak/internals\";\n *\n * const Button = styled.button<{ $width?: boolean }>(\n * \"button\", {\n * width: unitPostFix({ $width }) => $width, \"px\")\n * });\n */\nexport const unitPostFix = (arg: unknown, unit: string) => {\n switch (typeof arg) {\n case \"function\":\n return (props: any) => unitPostFix(arg(props), unit);\n case \"number\":\n case \"string\":\n return `${arg}${unit}`;\n // Ignore falsy values\n default:\n return undefined;\n }\n};\n","import { ClassNames } from \"../cssLiteral.js\";\nimport { RuntimeStyleProcessor } from \"../publicStyledApi.js\";\n\n/**\n * This is an internal helper function to merge relevant props of a native element with a css prop.\n * It's automatically added when using the `css` prop in a JSX element.\n * e.g.:\n * ```tsx\n * <p\n * className=\"foo\"\n * css={css`\n * color: green;\n * `}\n * {...{ style: { padding: \"30px\" }}}\n * />\n */\nexport const mergeCssProp = (\n relevantProps: {\n className?: string;\n style?: Record<string, string>;\n } & Record<string, unknown>,\n cssProp: RuntimeStyleProcessor<unknown> | false | null | undefined,\n) => {\n const classNames = new ClassNames(relevantProps.className);\n\n const existingStyle = relevantProps.style;\n const style = existingStyle ? { ...existingStyle } : {};\n\n // a falsy css prop applies no styles, e.g. `css={on && css`...`}` with `on` false\n if (cssProp) {\n cssProp({}, classNames, style);\n }\n\n // Forward all other props (onClick, aria-*, id, …) untouched and only\n // override className/style with the merged result — the transform already\n // built `relevantProps` in JSX attribute order, so this preserves overrides.\n const result: Record<string, unknown> & {\n className?: string;\n style?: Record<string, string>;\n } = { ...relevantProps };\n\n if (Object.keys(style).length > 0) {\n result.style = style;\n } else {\n delete result.style;\n }\n if (classNames.value) {\n result.className = classNames.value;\n } else {\n delete result.className;\n }\n\n return result;\n};\n","import { styled } from \"./styled.js\";\n/// Internal API to create styled components\n/// Optimization for faster rendering and smaller bundle size in production\n/// thanks to better minification and dead code elimination\n///\n/// List taken from https://github.com/styled-components/styled-components/blob/e0019ba666fab4b5aaa2bff71ba6ad0005a299fd/packages/styled-components/src/utils/domElements.ts#L90\nexport const __yak_a = /*#__PURE__*/ styled(\"a\");\nexport const __yak_abbr = /*#__PURE__*/ styled(\"abbr\");\nexport const __yak_address = /*#__PURE__*/ styled(\"address\");\nexport const __yak_area = /*#__PURE__*/ styled(\"area\");\nexport const __yak_article = /*#__PURE__*/ styled(\"article\");\nexport const __yak_aside = /*#__PURE__*/ styled(\"aside\");\nexport const __yak_audio = /*#__PURE__*/ styled(\"audio\");\nexport const __yak_b = /*#__PURE__*/ styled(\"b\");\nexport const __yak_base = /*#__PURE__*/ styled(\"base\");\nexport const __yak_bdi = /*#__PURE__*/ styled(\"bdi\");\nexport const __yak_bdo = /*#__PURE__*/ styled(\"bdo\");\nexport const __yak_big = /*#__PURE__*/ styled(\"big\");\nexport const __yak_blockquote = /*#__PURE__*/ styled(\"blockquote\");\nexport const __yak_body = /*#__PURE__*/ styled(\"body\");\nexport const __yak_br = /*#__PURE__*/ styled(\"br\");\nexport const __yak_button = /*#__PURE__*/ styled(\"button\");\nexport const __yak_canvas = /*#__PURE__*/ styled(\"canvas\");\nexport const __yak_caption = /*#__PURE__*/ styled(\"caption\");\nexport const __yak_cite = /*#__PURE__*/ styled(\"cite\");\nexport const __yak_code = /*#__PURE__*/ styled(\"code\");\nexport const __yak_col = /*#__PURE__*/ styled(\"col\");\nexport const __yak_colgroup = /*#__PURE__*/ styled(\"colgroup\");\nexport const __yak_data = /*#__PURE__*/ styled(\"data\");\nexport const __yak_datalist = /*#__PURE__*/ styled(\"datalist\");\nexport const __yak_dd = /*#__PURE__*/ styled(\"dd\");\nexport const __yak_del = /*#__PURE__*/ styled(\"del\");\nexport const __yak_details = /*#__PURE__*/ styled(\"details\");\nexport const __yak_dfn = /*#__PURE__*/ styled(\"dfn\");\nexport const __yak_dialog = /*#__PURE__*/ styled(\"dialog\");\nexport const __yak_div = /*#__PURE__*/ styled(\"div\");\nexport const __yak_dl = /*#__PURE__*/ styled(\"dl\");\nexport const __yak_dt = /*#__PURE__*/ styled(\"dt\");\nexport const __yak_em = /*#__PURE__*/ styled(\"em\");\nexport const __yak_embed = /*#__PURE__*/ styled(\"embed\");\nexport const __yak_fieldset = /*#__PURE__*/ styled(\"fieldset\");\nexport const __yak_figcaption = /*#__PURE__*/ styled(\"figcaption\");\nexport const __yak_figure = /*#__PURE__*/ styled(\"figure\");\nexport const __yak_footer = /*#__PURE__*/ styled(\"footer\");\nexport const __yak_form = /*#__PURE__*/ styled(\"form\");\nexport const __yak_h1 = /*#__PURE__*/ styled(\"h1\");\nexport const __yak_h2 = /*#__PURE__*/ styled(\"h2\");\nexport const __yak_h3 = /*#__PURE__*/ styled(\"h3\");\nexport const __yak_h4 = /*#__PURE__*/ styled(\"h4\");\nexport const __yak_h5 = /*#__PURE__*/ styled(\"h5\");\nexport const __yak_h6 = /*#__PURE__*/ styled(\"h6\");\nexport const __yak_header = /*#__PURE__*/ styled(\"header\");\nexport const __yak_hgroup = /*#__PURE__*/ styled(\"hgroup\");\nexport const __yak_hr = /*#__PURE__*/ styled(\"hr\");\nexport const __yak_html = /*#__PURE__*/ styled(\"html\");\nexport const __yak_i = /*#__PURE__*/ styled(\"i\");\nexport const __yak_iframe = /*#__PURE__*/ styled(\"iframe\");\nexport const __yak_img = /*#__PURE__*/ styled(\"img\");\nexport const __yak_input = /*#__PURE__*/ styled(\"input\");\nexport const __yak_ins = /*#__PURE__*/ styled(\"ins\");\nexport const __yak_kbd = /*#__PURE__*/ styled(\"kbd\");\nexport const __yak_keygen = /*#__PURE__*/ styled(\"keygen\");\nexport const __yak_label = /*#__PURE__*/ styled(\"label\");\nexport const __yak_legend = /*#__PURE__*/ styled(\"legend\");\nexport const __yak_li = /*#__PURE__*/ styled(\"li\");\nexport const __yak_link = /*#__PURE__*/ styled(\"link\");\nexport const __yak_main = /*#__PURE__*/ styled(\"main\");\nexport const __yak_map = /*#__PURE__*/ styled(\"map\");\nexport const __yak_mark = /*#__PURE__*/ styled(\"mark\");\nexport const __yak_menu = /*#__PURE__*/ styled(\"menu\");\nexport const __yak_menuitem = /*#__PURE__*/ styled(\"menuitem\");\nexport const __yak_meta = /*#__PURE__*/ styled(\"meta\");\nexport const __yak_meter = /*#__PURE__*/ styled(\"meter\");\nexport const __yak_nav = /*#__PURE__*/ styled(\"nav\");\nexport const __yak_noscript = /*#__PURE__*/ styled(\"noscript\");\nexport const __yak_object = /*#__PURE__*/ styled(\"object\");\nexport const __yak_ol = /*#__PURE__*/ styled(\"ol\");\nexport const __yak_optgroup = /*#__PURE__*/ styled(\"optgroup\");\nexport const __yak_option = /*#__PURE__*/ styled(\"option\");\nexport const __yak_output = /*#__PURE__*/ styled(\"output\");\nexport const __yak_p = /*#__PURE__*/ styled(\"p\");\nexport const __yak_param = /*#__PURE__*/ styled(\"param\");\nexport const __yak_picture = /*#__PURE__*/ styled(\"picture\");\nexport const __yak_pre = /*#__PURE__*/ styled(\"pre\");\nexport const __yak_progress = /*#__PURE__*/ styled(\"progress\");\nexport const __yak_q = /*#__PURE__*/ styled(\"q\");\nexport const __yak_rp = /*#__PURE__*/ styled(\"rp\");\nexport const __yak_rt = /*#__PURE__*/ styled(\"rt\");\nexport const __yak_ruby = /*#__PURE__*/ styled(\"ruby\");\nexport const __yak_s = /*#__PURE__*/ styled(\"s\");\nexport const __yak_samp = /*#__PURE__*/ styled(\"samp\");\nexport const __yak_script = /*#__PURE__*/ styled(\"script\");\nexport const __yak_section = /*#__PURE__*/ styled(\"section\");\nexport const __yak_select = /*#__PURE__*/ styled(\"select\");\nexport const __yak_small = /*#__PURE__*/ styled(\"small\");\nexport const __yak_source = /*#__PURE__*/ styled(\"source\");\nexport const __yak_span = /*#__PURE__*/ styled(\"span\");\nexport const __yak_strong = /*#__PURE__*/ styled(\"strong\");\nexport const __yak_style = /*#__PURE__*/ styled(\"style\");\nexport const __yak_sub = /*#__PURE__*/ styled(\"sub\");\nexport const __yak_summary = /*#__PURE__*/ styled(\"summary\");\nexport const __yak_sup = /*#__PURE__*/ styled(\"sup\");\nexport const __yak_table = /*#__PURE__*/ styled(\"table\");\nexport const __yak_tbody = /*#__PURE__*/ styled(\"tbody\");\nexport const __yak_td = /*#__PURE__*/ styled(\"td\");\nexport const __yak_textarea = /*#__PURE__*/ styled(\"textarea\");\nexport const __yak_tfoot = /*#__PURE__*/ styled(\"tfoot\");\nexport const __yak_th = /*#__PURE__*/ styled(\"th\");\nexport const __yak_thead = /*#__PURE__*/ styled(\"thead\");\nexport const __yak_time = /*#__PURE__*/ styled(\"time\");\nexport const __yak_tr = /*#__PURE__*/ styled(\"tr\");\nexport const __yak_track = /*#__PURE__*/ styled(\"track\");\nexport const __yak_u = /*#__PURE__*/ styled(\"u\");\nexport const __yak_ul = /*#__PURE__*/ styled(\"ul\");\nexport const __yak_use = /*#__PURE__*/ styled(\"use\");\nexport const __yak_var = /*#__PURE__*/ styled(\"var\");\nexport const __yak_video = /*#__PURE__*/ styled(\"video\");\nexport const __yak_wbr = /*#__PURE__*/ styled(\"wbr\");\nexport const __yak_circle = /*#__PURE__*/ styled(\"circle\");\nexport const __yak_clipPath = /*#__PURE__*/ styled(\"clipPath\");\nexport const __yak_defs = /*#__PURE__*/ styled(\"defs\");\nexport const __yak_ellipse = /*#__PURE__*/ styled(\"ellipse\");\nexport const __yak_foreignObject = /*#__PURE__*/ styled(\"foreignObject\");\nexport const __yak_g = /*#__PURE__*/ styled(\"g\");\nexport const __yak_image = /*#__PURE__*/ styled(\"image\");\nexport const __yak_line = /*#__PURE__*/ styled(\"line\");\nexport const __yak_linearGradient = /*#__PURE__*/ styled(\"linearGradient\");\nexport const __yak_marker = /*#__PURE__*/ styled(\"marker\");\nexport const __yak_mask = /*#__PURE__*/ styled(\"mask\");\nexport const __yak_path = /*#__PURE__*/ styled(\"path\");\nexport const __yak_pattern = /*#__PURE__*/ styled(\"pattern\");\nexport const __yak_polygon = /*#__PURE__*/ styled(\"polygon\");\nexport const __yak_polyline = /*#__PURE__*/ styled(\"polyline\");\nexport const __yak_radialGradient = /*#__PURE__*/ styled(\"radialGradient\");\nexport const __yak_rect = /*#__PURE__*/ styled(\"rect\");\nexport const __yak_stop = /*#__PURE__*/ styled(\"stop\");\nexport const __yak_svg = /*#__PURE__*/ styled(\"svg\");\nexport const __yak_text = /*#__PURE__*/ styled(\"text\");\nexport const __yak_tspan = /*#__PURE__*/ styled(\"tspan\");\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAa,qBAAqB,OAAO,KAAK;AAU9C,IAAa,aAAb,MAAsD;CAEpD,YAAY,SAAkB;EAC5B,KAAK,QAAQ,WAAW;CAC1B;CACA,IAAI,WAAmB;EACrB,KAAK,UAAU,KAAK,SAAS,OAAO;CACtC;CACA,IAAI,WAAmB;EACrB,QAAQ,MAAM,KAAK,QAAQ,IAAG,CAAE,SAAS,MAAM,YAAY,GAAG;CAChE;CACA,OAAO,WAAmB;EACxB,IAAI,KAAK,IAAI,SAAS,GACpB,KAAK,QAAQ,KAAK,MACf,MAAM,GAAG,CAAC,CACV,QAAQ,aAAa,aAAa,SAAS,CAAC,CAC5C,KAAK,GAAG;CAEf;AACF;AAgEA,SAAgB,IAAY,GAAG,MAAiD;CAG9E,IAAI;CACJ,MAAM,sBAAqD,CAAC;CAC5D,KAAK,MAAM,OAAO,MAIhB,IAAI,OAAO,QAAQ,UACjB,YAAY;MAKT,IAAI,OAAO,QAAQ,YACtB,oBAAoB,KAAK,GAA6C;MAKnE,IAAI,OAAO,QAAQ,YAAY,WAAW,KAC7C,oBAAoB,MAAM,OAAO,GAAG,UAAU;EAC5C,KAAK,MAAM,OAAO,IAAI,OAAO;GAC3B,MAAM,QAAQ,IAAI,MAAM;GACxB,IAAI,OAAO,UAAU,YAEnB,MAAM,OAAO,OAKX,uBAAuB,OAAO,KAAK,CACrC;QAGA,MAAM,OAAO,OAA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