@yak/solid 0.0.0

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.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -0
  3. package/dist/context/baseContext.d.ts +7 -0
  4. package/dist/context/baseContext.js +8 -0
  5. package/dist/context/baseContext.js.map +1 -0
  6. package/dist/context/index.d.ts +29 -0
  7. package/dist/context/index.js +17 -0
  8. package/dist/context/index.js.map +1 -0
  9. package/dist/index.d.ts +352 -0
  10. package/dist/index.js +2 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/internal.d.ts +473 -0
  13. package/dist/internal.js +382 -0
  14. package/dist/internal.js.map +1 -0
  15. package/dist/isolated-source-eval/index.d.ts +30 -0
  16. package/dist/isolated-source-eval/index.js +315 -0
  17. package/dist/isolated-source-eval/index.js.map +1 -0
  18. package/dist/isolated-source-eval/worker.js +59 -0
  19. package/dist/isolated-source-eval/worker.js.map +1 -0
  20. package/dist/loaders/vite-plugin.d.ts +116 -0
  21. package/dist/loaders/vite-plugin.js +862 -0
  22. package/dist/loaders/vite-plugin.js.map +1 -0
  23. package/loaders/vite-plugin.ts +29 -0
  24. package/package.json +108 -0
  25. package/runtime/__tests__/mergeClasses.test.ts +22 -0
  26. package/runtime/__tests__/reactivity.test.tsx +157 -0
  27. package/runtime/__tests__/styled.test.tsx +270 -0
  28. package/runtime/__tests__/testUtils.tsx +25 -0
  29. package/runtime/__tests__/tsconfig.json +9 -0
  30. package/runtime/__tests__/typeTest.tsx +62 -0
  31. package/runtime/atoms.ts +44 -0
  32. package/runtime/context/baseContext.ts +5 -0
  33. package/runtime/context/index.ts +37 -0
  34. package/runtime/cssLiteral.ts +215 -0
  35. package/runtime/cssProp.ts +26 -0
  36. package/runtime/globalStyle.ts +54 -0
  37. package/runtime/index.ts +39 -0
  38. package/runtime/internal.ts +41 -0
  39. package/runtime/internals/mergeClasses.ts +36 -0
  40. package/runtime/internals/mergeCssProp.ts +54 -0
  41. package/runtime/internals/unitPostFix.ts +34 -0
  42. package/runtime/keyframes.ts +30 -0
  43. package/runtime/mocks/cssLiteral.ts +74 -0
  44. package/runtime/mocks/globalStyle.ts +14 -0
  45. package/runtime/mocks/keyframes.ts +29 -0
  46. package/runtime/mocks/styled.ts +8 -0
  47. package/runtime/publicStyledApi.ts +177 -0
  48. package/runtime/styled.ts +393 -0
  49. package/runtime/styledDom.ts +139 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["css","css","styled","css","useTheme","StyledFactory"],"sources":["../runtime/cssLiteral.ts","../runtime/atoms.ts","../runtime/mocks/cssLiteral.ts","../runtime/mocks/keyframes.ts","../runtime/internals/mergeClasses.ts","../runtime/styled.ts","../runtime/mocks/styled.ts","../runtime/mocks/globalStyle.ts"],"sourcesContent":["import type { YakTheme } from \"./index.ts\";\nimport type { Accessor } from \"solid-js\";\nimport { ClassCollector, RuntimeStyleProcessor, StyleObject } from \"./publicStyledApi.js\";\n\nexport const yakComponentSymbol = Symbol(\"yak\");\n\n/**\n * Collects class names as a single space-separated string.\n *\n * `add` is the render hot path and stays a plain string append;\n * `has`/`delete` keep a Set-like contract for the rare runtime\n * functions that remove classes again (e.g. atoms).\n */\nexport class Classes implements ClassCollector {\n value: string;\n constructor(initial?: string) {\n this.value = initial || \"\";\n }\n add(name: string) {\n if (!this.value) {\n this.value = name;\n } else if (!this.has(name)) {\n this.value += \" \" + name;\n }\n }\n has(name: string) {\n return (\" \" + this.value + \" \").includes(\" \" + name + \" \");\n }\n delete(name: string) {\n if (this.has(name)) {\n this.value = this.value\n .split(\" \")\n .filter((existing) => existing !== name)\n .join(\" \");\n }\n }\n}\n\nexport type ComponentStyles<TProps> = (props: TProps) => {\n class: 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: Accessor<YakTheme> }>[]\n) => ComponentStyles<TProps>;\n\nexport type NestedRuntimeStyleProcessor = (\n props: unknown,\n classes: ClassCollector,\n style: StyleObject,\n) =>\n | {\n class?: string;\n style?: StyleObject;\n }\n | void\n | NestedRuntimeStyleProcessor;\n\n/**\n * css() runtime factory of css``\n *\n * /!\\ @yak/solid transpiles css`` and styled``\n *\n * This changes the typings of the css`` and styled`` functions.\n * During development the user of @yak/solid 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, classes, and style object as arguments\n * and operate directly on the classes and style objects.\n */\nexport function css<TProps>(\n styles: TemplateStringsArray,\n ...values: CSSInterpolation<NoInfer<TProps> & { theme: Accessor<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 staticClass: 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 staticClass = 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 style[key as keyof StyleObject] = 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 ) as never;\n } else {\n style[key as keyof StyleObject] = String(value) as never;\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, classes: ClassCollector) => {\n if (staticClass) {\n classes.add(staticClass);\n }\n },\n { $dynamic: false },\n );\n }\n\n return Object.assign(\n (props: TProps, classes: ClassCollector, allStyles: StyleObject) => {\n if (staticClass) {\n classes.add(staticClass);\n }\n for (let i = 0; i < dynamicCssFunctions.length; i++) {\n unwrapProps(props, dynamicCssFunctions[i], classes, allStyles);\n }\n },\n { $dynamic: true },\n );\n}\n\n// Dynamic CSS with runtime logic\nconst unwrapProps = (\n props: unknown,\n fn: NestedRuntimeStyleProcessor,\n classes: ClassCollector,\n style: StyleObject,\n) => {\n let result = fn(props, classes, style);\n while (result) {\n if (typeof result === \"function\") {\n result = result(props, classes, style);\n continue;\n } else if (typeof result === \"object\") {\n const resultClass = \"class\" in result ? result.class : undefined;\n if (resultClass) {\n classes.add(resultClass);\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 StyleObject] = result.style[key as keyof StyleObject] 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 // typeof guards first: the `process.env` lookup is a real per-call cost\n // for unbundled Node consumers, so it must only run 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","import { 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 \"@yak/solid\";\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: string[] = [];\n const dynamicFunctions: RuntimeStyleProcessor<T>[] = [];\n\n for (const atom of atoms) {\n if (typeof atom === \"string\") {\n staticClasses.push(...atom.split(\" \"));\n } else if (typeof atom === \"function\") {\n dynamicFunctions.push(atom);\n }\n }\n\n const runtimeFunctions: RuntimeStyleProcessor<T>[] =\n staticClasses.length > 0\n ? [\n (_, classes) => {\n staticClasses.forEach((cls) => classes.add(cls));\n },\n ...dynamicFunctions,\n ]\n : dynamicFunctions;\n\n // @ts-expect-error the internal implementation of css is not typed\n return css(...runtimeFunctions);\n};\n","import type { css as cssInternal, NestedRuntimeStyleProcessor } from \"../cssLiteral.js\";\n\nexport type { ComponentStyles, CSSInterpolation } from \"../cssLiteral.js\";\n\n/**\n * Allows to use CSS styles in a styled or css block\n *\n * e.g.\n *\n * ```tsx\n * const Component = styled.div`\n * color: black;\n * ${({$active}) => $active && css`color: red;`}\n * `;\n * ```\n */\nexport const css: typeof cssInternal = (styles: TemplateStringsArray, ...args: unknown[]) => {\n // When called in yak files as a template tag (without SWC transformation),\n // return { __yak: rawCss } so the cross-file resolver can\n // extract the mixin value from evaluated .yak files.\n if (Array.isArray(styles) && \"raw\" in styles) {\n let rawCss = styles[0];\n for (let i = 0; i < args.length; i++) {\n const interpolation = args[i];\n rawCss +=\n interpolation && typeof interpolation === \"object\" && \"__yak\" in interpolation\n ? (interpolation as { __yak: string }).__yak\n : String(interpolation);\n rawCss += styles[i + 1];\n }\n return { __yak: rawCss } as any;\n }\n\n const dynamicCssFunctions: NestedRuntimeStyleProcessor[] = [];\n for (const arg of args as Array<string | Function | object>) {\n // Dynamic CSS e.g.\n // css`${props => props.active && css`color: red;`}`\n // compiled -> css((props: { active: boolean }) => props.active && css(\"yak31e4\"))\n if (typeof arg === \"function\") {\n dynamicCssFunctions.push(arg as unknown as NestedRuntimeStyleProcessor);\n }\n }\n if (dynamicCssFunctions.length === 0) {\n return {\n class: \"\",\n style: undefined,\n };\n }\n return ((props: unknown) => {\n for (let i = 0; i < dynamicCssFunctions.length; i++) {\n // run the dynamic expressions and ignore the return value\n // the execution is important to ensure that the user code is executed\n // the same way as in the real runtime\n executeDynamicExpressionRecursively(props, dynamicCssFunctions[i]);\n }\n return {\n class: \"\",\n style: undefined,\n };\n }) as any;\n};\n\nfunction executeDynamicExpressionRecursively(\n props: unknown,\n expression: NestedRuntimeStyleProcessor,\n) {\n const classes = new Set<string>();\n const style = {};\n let result = expression(props, classes, style);\n while (typeof result === \"function\") {\n result = result(props, classes, style);\n }\n return result;\n}\n","import type { keyframes as keyframesInternal } from \"../keyframes.js\";\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 \"@yak/solid\";\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: typeof keyframesInternal = (_styles, ..._dynamic) => {\n // the keyframes function is a no-op in the mock\n // as it has no dynamic runtime behavior but only css\n return \"\";\n};\n","/**\n * Normalize Solid `class` values for string merging.\n * Solid 2 allows strings, arrays and object syntax on the class attribute.\n */\nexport const normalizeClass = (value: unknown): string => {\n if (!value) return \"\";\n if (typeof value === \"string\") return value;\n if (Array.isArray(value)) return value.map(normalizeClass).filter(Boolean).join(\" \");\n if (typeof value === \"object\") {\n return Object.keys(value)\n .filter((key) => (value as Record<string, unknown>)[key])\n .join(\" \");\n }\n return String(value);\n};\n\n/**\n * Merges the folded yak class name with a user `class` value.\n *\n * Injected by the compiler (as `__yak_mergeClassNames`) when it replaces a JSX\n * usage of a fully static styled component with a plain element:\n * ```tsx\n * const Card = styled.div`color: red;`;\n * <Card class={active() && \"active\"} />\n * ```\n * becomes\n * ```tsx\n * <div class={__yak_mergeClassNames(\"yX\", active() && \"active\")} />\n * ```\n */\nexport const mergeClasses = (yakClass: string, userClass: unknown): string | undefined => {\n const user = normalizeClass(userClass);\n if (!yakClass) return user || undefined;\n if (!user) return yakClass;\n return yakClass + \" \" + user;\n};\n","import { css, CSSInterpolation, Classes, yakComponentSymbol } from \"./cssLiteral.js\";\nimport type {\n AnyComponent,\n Attrs,\n AttrsMerged,\n Styled,\n YakComponent,\n AttrsFunction,\n StyledFn,\n HtmlTags,\n Substitute,\n StyledLiteral,\n RuntimeStyleProcessor,\n StyleObject,\n} from \"./publicStyledApi.js\";\nimport { createMemo, merge } from \"solid-js\";\nimport { createComponent, Dynamic, type JSX } from \"@solidjs/web\";\nimport { normalizeClass } from \"./internals/mergeClasses.js\";\n// the following import is not relative but the package-level \"@yak/solid/context\"\n// export: it keeps a single context instance shared between the bundled runtime\n// and user code (and lets the vite plugin alias the user's theme context)\nimport { useTheme } from \"@yak/solid/context\";\nimport type { YakTheme } from \"./context/index.js\";\nimport type { Accessor } from \"solid-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//\n/**\n * Renders `props.component` (a tag name or component) with the remaining\n * props. Loosely typed on purpose: the runtime passes lazily-merged Proxy\n * props that no concrete component type can describe.\n */\nconst renderDynamic = (props: Record<PropertyKey, unknown>): JSX.Element =>\n createComponent(Dynamic as (props: Record<PropertyKey, unknown>) => JSX.Element, props);\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 `class` 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\ntype PropsWithClassAndStyle = {\n class?: string;\n style?: StyleObject | string;\n theme?: Accessor<YakTheme>;\n} & Record<string, unknown>;\n\nconst yakStyled: StyledInternal = (Component, attrs) => {\n // Probe with a property read, not the `in` operator: in dev, solid-refresh\n // wraps registered components in a Proxy that forwards `get` to the live\n // implementation but has no `has` trap, so `in` would miss the symbol and\n // silently skip chain flattening (breaking attrs override order).\n const isYakComponent =\n typeof Component === \"function\" &&\n (Component as Partial<YakComponent<unknown>>)[yakComponentSymbol] !== undefined;\n\n // if the component that is wrapped is a yak component, we can extract the attrs function\n // and the dynamic style function to merge it with the current attrs function (or dynamic\n // style function) so that the sequence of the attrs functions is preserved\n const [, parentAttrsFn, parentRuntimeStylesFn, parentTarget] = isYakComponent\n ? ((Component as YakComponent<unknown>)[yakComponentSymbol] as unknown as [\n YakComponent<unknown>,\n ExtractAttrsFunction<typeof attrs>,\n RuntimeStyleProcessor<unknown>,\n AnyComponent<any> | 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 component instead\n // of re-entering every parent wrapper per element\n const targetComponent = (isYakComponent ? parentTarget : Component) as AnyComponent<any> | string;\n\n const mergedAttrsFn = buildRuntimeAttrsProcessor(attrs, parentAttrsFn);\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\n // decided once per styled component: tag names render through Dynamic\n // (which needs a `component` prop), component targets are called\n // directly so a user prop named `component` reaches them (Dynamic\n // would consume it). `targetProps` is merged BEFORE filterDomProps -\n // the filter proxy must stay the outermost layer (see filterDomProps)\n const isTag = typeof targetComponent === \"string\";\n const targetProps = isTag ? { component: targetComponent } : {};\n const renderTarget = isTag\n ? renderDynamic\n : (finalProps: Record<PropertyKey, unknown>) =>\n createComponent(\n targetComponent as (props: Record<PropertyKey, unknown>) => JSX.Element,\n finalProps,\n );\n\n // fast path for fully static components (no attrs, no dynamic styles;\n // the most common case): contribute the chain's class names through a\n // single reactive `class` getter and strip $-props; skips theme lookup,\n // memo creation and style handling entirely\n const Yak: AnyComponent<PropsWithClassAndStyle> =\n !mergedAttrsFn && !runtimeStyleProcessor.$dynamic\n ? (props) =>\n renderTarget(\n filterDomProps(\n merge(props, targetProps, {\n // reading props.class inside the getter keeps the class\n // binding reactive without re-creating the element\n get class(): string | undefined {\n const classes = new Classes(normalizeClass(props.class));\n runtimeStyleProcessor(props, classes, undefined as unknown as StyleObject);\n return classes.value || undefined;\n },\n }),\n ),\n )\n : (props) => {\n // the component body runs ONCE in Solid: all per-update work\n // lives in memos/getters so only the affected DOM bindings update\n\n // attrs functions and dynamic style functions receive the theme;\n // fully static components take the fast path above and never\n // subscribe to the theme context\n const theme = useTheme();\n\n // getter-preserving merge: compiled prop functions like\n // `({ $bottom }) => ...` destructure this proxy INSIDE the memo\n // below, so every read is tracked at its use-site\n const propsWithTheme = merge({ theme }, props) as PropsWithClassAndStyle & {\n theme: Accessor<YakTheme>;\n };\n\n // The first component which is not wrapped in a yak component executes all attrs\n // functions starting from the innermost yak component to the outermost (itself)\n const attrsProps = mergedAttrsFn\n ? createMemo(() => mergedAttrsFn(propsWithTheme as any) as PropsWithClassAndStyle)\n : undefined;\n\n // input for the style processor: props + theme + attrs output\n const styleInput = attrsProps ? merge(propsWithTheme, attrsProps) : propsWithTheme;\n\n // execute all functions inside the style literal\n // e.g. styled.button`color: ${props => props.color};`\n // only reads inside this memo re-run it; the element itself is\n // never re-created, only its class/style bindings update\n const computed = createMemo(() => {\n const attrsResult = attrsProps?.();\n const classes = new Classes(normalizeClass(props.class));\n const attrsClass = normalizeClass(attrsResult?.class);\n if (attrsClass) {\n classes.add(attrsClass);\n }\n // static processors never write style values, so the incoming\n // style object can be passed through without a defensive copy\n const style =\n runtimeStyleProcessor.$dynamic || attrsResult?.style\n ? { ...unwrapStyle(props.style), ...unwrapStyle(attrsResult?.style) }\n : unwrapStyle(props.style);\n runtimeStyleProcessor(styleInput, classes, style as StyleObject);\n return {\n class: classes.value || undefined,\n style: style && Object.keys(style).length > 0 ? style : undefined,\n };\n });\n\n const merged = merge(props, attrsProps ?? {}, {\n get class(): string | undefined {\n return computed().class;\n },\n get style(): StyleObject | undefined {\n return computed().style;\n },\n });\n\n // keep the theme prop only if an attrs function intentionally\n // replaced it; the context theme itself never reaches the target\n const allowTheme = () => {\n const attrsResult = attrsProps?.();\n return !!attrsResult && \"theme\" in attrsResult && attrsResult.theme !== theme;\n };\n\n // render the chain's target directly; parent wrappers contribute\n // only their (already merged) attrs and style processors\n return renderTarget(filterDomProps(merge(merged, targetProps), allowTheme));\n };\n\n return Object.assign(Yak, {\n [yakComponentSymbol]: [Yak, mergedAttrsFn, runtimeStyleProcessor, targetComponent] as [\n unknown,\n unknown,\n unknown,\n unknown,\n ],\n });\n };\n};\n\n/**\n * Normalize a Solid style prop to an object the style processor can extend.\n * Solid allows string styles on elements; they are converted here so CSS custom\n * properties from dynamic values can be merged in (prefer object styles).\n */\nconst unwrapStyle = (style: StyleObject | string | undefined): StyleObject | undefined => {\n if (typeof style !== \"string\") {\n return style;\n }\n const result: Record<string, string> = {};\n for (const declaration of style.split(\";\")) {\n const colonIndex = declaration.indexOf(\":\");\n if (colonIndex === -1) continue;\n const property = declaration.slice(0, colonIndex).trim();\n const value = declaration.slice(colonIndex + 1).trim();\n if (property && value) {\n result[property] = value;\n }\n }\n return result as StyleObject;\n};\n\nconst isBlockedProp = (key: PropertyKey, allowTheme?: () => boolean): boolean =>\n typeof key === \"string\" &&\n (key.startsWith(\"$\") || (key === \"theme\" && !(allowTheme && allowTheme())));\n\n/**\n * Remove all props that start with a $ sign (plus the internal theme) so\n * they reach neither DOM elements nor custom components.\n *\n * Implemented as a lazy Proxy instead of an eager copy: Solid's compiled\n * spread reads props through getters, and copying would read every prop\n * exactly once and freeze its value, killing reactivity.\n */\nconst filterDomProps = <T extends object>(props: T, allowTheme?: () => boolean): T =>\n new Proxy(props, {\n get: (target, key) => (isBlockedProp(key, allowTheme) ? undefined : Reflect.get(target, key)),\n has: (target, key) => !isBlockedProp(key, allowTheme) && Reflect.has(target, key),\n ownKeys: (target) => Reflect.ownKeys(target).filter((key) => !isBlockedProp(key, allowTheme)),\n getOwnPropertyDescriptor: (target, key) =>\n isBlockedProp(key, allowTheme) ? undefined : Reflect.getOwnPropertyDescriptor(target, key),\n });\n\n// util function to merge class names, as they are concatenated with a space\nconst mergeClasses = (a?: string, b?: string) => {\n if (!a && !b) return undefined;\n if (!a) return b;\n if (!b) return a;\n return a + \" \" + b;\n};\n\n/**\n * merge props and processed props (including class names and styles)\n * e.g.:\\\n * `{ class: \"a\", foo: 1 }` and `{ class: \"b\", bar: 2 }` \\\n * => `{ class: \"a b\", foo: 1, bar: 2 }`\n */\nconst combineProps = <\n T extends {\n class?: string;\n style?: StyleObject | string;\n },\n TOther extends\n | {\n class?: string;\n style?: StyleObject | string;\n }\n | null\n | undefined,\n>(\n props: T,\n newProps: TOther,\n) =>\n newProps\n ? (props.class === newProps.class || !newProps.class) &&\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 class: mergeClasses(props.class, newProps.class),\n style: { ...unwrapStyle(props.style), ...unwrapStyle(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(\n parentProps as any,\n ownAttrsFn(combineProps(props as any, parentProps as any) as any),\n ) as any;\n };\n }\n\n return ownAttrsFn || parentAttrsFn;\n};\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 (props: T, classes: Parameters<RuntimeStyleProcessor<T>>[1], style: StyleObject) => {\n parentRuntimeStylesFn(props, classes, style);\n runtimeStylesFn(props, classes, 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: AnyComponent<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 type { JSX } from \"@solidjs/web\";\nimport { styled as StyledFactory } from \"../styled.js\";\n\nexport const styled = /* @__PURE__ */ new Proxy(StyledFactory, {\n get(target, TagName: keyof JSX.IntrinsicElements) {\n return target(TagName);\n },\n}) as typeof StyledFactory;\n","import type { globalStyle as globalStyleInternal } from \"../globalStyle.js\";\n\nexport type { GlobalStyleInterpolation } from \"../globalStyle.js\";\n\n/**\n * Test-friendly mock of `globalStyle`.\n *\n * `globalStyle` has no runtime behaviour: the SWC plugin extracts its CSS at\n * build time and replaces the call with a no-op. The mock mirrors that: it does\n * nothing so yak files can be imported in Jest/Vitest without the compiler.\n */\nexport const globalStyle: typeof globalStyleInternal = (_styles, ..._values) => {\n // no-op in the mock\n};\n"],"mappings":"oNAIA,MAAa,EAAqB,OAAO,KAAK,EAS9C,IAAa,EAAb,KAA+C,CAC7C,MACA,YAAY,EAAkB,CAC5B,KAAK,MAAQ,GAAW,EAC1B,CACA,IAAI,EAAc,CACX,KAAK,MAEE,KAAK,IAAI,CAAI,IACvB,KAAK,OAAS,IAAM,GAFpB,KAAK,MAAQ,CAIjB,CACA,IAAI,EAAc,CAChB,OAAQ,IAAM,KAAK,MAAQ,IAAA,CAAK,SAAS,IAAM,EAAO,GAAG,CAC3D,CACA,OAAO,EAAc,CACf,KAAK,IAAI,CAAI,IACf,KAAK,MAAQ,KAAK,MACf,MAAM,GAAG,CAAC,CACV,OAAQ,GAAa,IAAa,CAAI,CAAC,CACvC,KAAK,GAAG,EAEf,CACF,EAgEA,SAAgBA,EAAY,GAAG,EAAiD,CAG9E,IAAI,EACE,EAAqD,CAAC,EAC5D,IAAK,IAAM,KAAO,EAIZ,OAAO,GAAQ,SACjB,EAAc,EAKP,OAAO,GAAQ,WACtB,EAAoB,KAAK,CAA6C,EAK/D,OAAO,GAAQ,UAAY,UAAW,GAC7C,EAAoB,MAAM,EAAO,EAAG,IAAU,CAC5C,IAAK,IAAM,KAAO,EAAI,MAAO,CAC3B,IAAM,EAAQ,EAAI,MAAM,GACpB,OAAO,GAAU,WACnB,EAAM,GAA4B,OAKhC,EAAuB,EAAO,CAAK,CACrC,EAEA,EAAM,GAA4B,OAAO,CAAK,CAElD,CACF,CAAC,EAmBL,OAXI,EAAoB,SAAW,EAC1B,OAAO,QACX,EAAY,IAA4B,CACnC,GACF,EAAQ,IAAI,CAAW,CAE3B,EACA,CAAE,SAAU,EAAM,CACpB,EAGK,OAAO,QACX,EAAe,EAAyB,IAA2B,CAC9D,GACF,EAAQ,IAAI,CAAW,EAEzB,IAAK,IAAI,EAAI,E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EAAc,EAAK,CAAU,CAAC,EAC5F,0BAA2B,EAAQ,IACjC,EAAc,EAAK,CAAU,EAAI,IAAA,GAAY,QAAQ,yBAAyB,EAAQ,CAAG,CAC7F,CAAC,EAGG,GAAgB,EAAY,IAAe,CAC3C,MAAC,GAAK,CAAC,GAGX,OAFK,EACA,EACE,EAAI,IAAM,EADF,EADA,CAGjB,EAQM,GAaJ,EACA,IAEA,GACK,EAAM,QAAU,EAAS,OAAS,CAAC,EAAS,SAC5C,EAAM,QAAU,EAAS,OAAS,CAAC,EAAS,OAE3C,CACE,GAAG,EACH,GAAG,CACL,EAEA,CACE,GAAG,EACH,GAAG,EACH,MAAO,EAAa,EAAM,MAAO,EAAS,KAAK,EAC/C,MAAO,CAAE,GAAG,EAAY,EAAM,KAAK,EAAG,GAAG,EAAY,EAAS,KAAK,CAAE,CACvE,EAEF,EAWA,GAKJ,EACA,IACsD,CACtD,IAAM,EAAa,IAAU,OAAO,GAAU,WAAa,MAAc,GAkBzE,OAhBI,GAAc,EACR,GAAU,CAChB,IAAM,EAAc,EAAc,CAAK,EAOvC,OAAO,EACL,EACA,EAAW,EAAa,EAAc,CAAkB,CAAQ,CAClE,CACF,EAGK,GAAc,CACvB,EASM,GACJ,EACA,IAEI,GAAmB,EACsB,OAAO,QAC/C,EAAU,EAAkD,IAAuB,CAClF,EAAsB,EAAO,EAAS,CAAK,EAC3C,EAAgB,EAAO,EAAS,CAAK,CACvC,EAEA,CAAE,SAAU,EAAgB,UAAY,EAAsB,QAAS,CAE3D,EAET,GAAmB,ECnXf,EAAyB,IAAI,MAAMC,EAAe,CAC7D,IAAI,EAAQ,EAAsC,CAChD,OAAO,EAAO,CAAO,CACvB,CACF,CAAC,ECIY,GAA2C,EAAS,GAAG,IAAY,CAEhF"}
@@ -0,0 +1,473 @@
1
+ import { Accessor } from "solid-js";
2
+ import { JSX } from "@solidjs/web";
3
+ import { YakThemeContext, YakThemeProvider, useTheme } from "@yak/solid/context";
4
+
5
+ //#region runtime/cssProp.d.ts
6
+ declare module "@solidjs/web" {
7
+ namespace JSX {
8
+ interface ElementAttributes<T> {
9
+ css?: ComponentStyles<{}>;
10
+ }
11
+ }
12
+ }
13
+ //#endregion
14
+ //#region runtime/context/index.d.ts
15
+ interface YakTheme {}
16
+ //#endregion
17
+ //#region runtime/publicStyledApi.d.ts
18
+ /**
19
+ * Component signature accepted and produced by `styled`.
20
+ *
21
+ * Intentionally NOT Solid 2's `Component` type: that alias constrains props
22
+ * to `Record<string, any>` which does not compose with the `object`-based
23
+ * generics of the styled API (kept in sync with the React runtime).
24
+ */
25
+ type AnyComponent<T> = (props: T) => JSX.Element;
26
+ /**
27
+ * Style object the runtime writes CSS custom properties into.
28
+ * Solid also allows string styles on elements; the runtime normalizes
29
+ * those to objects before processing (see `unwrapStyle` in styled.ts).
30
+ */
31
+ type StyleObject = JSX.CSSProperties & Record<`--${string}`, string | number | undefined>;
32
+ /**
33
+ * Main styled interface that combines HTML tag mappings with the styled function.
34
+ * This is the primary entry point for creating styled components.
35
+ */
36
+ interface Styled extends MappedHtmlTags, StyledFn {}
37
+ /**
38
+ * Function interface for creating styled components from any component or HTML tag.
39
+ * Supports Solid components, HTML tags, and custom web components.
40
+ */
41
+ interface StyledFn {
42
+ <TProps extends object = JSX.ElementAttributes<Element>>(Component: HtmlTags | AnyComponent<TProps> | CustomWebComponentTag): LiteralWithAttrs<TProps>;
43
+ }
44
+ /**
45
+ * A yak component with a special symbol that allows component targeting
46
+ * and proper attrs function handling.
47
+ * @example styled.svg`${Button}:hover & { fill: red; }` or styled(Button)`color: red;`
48
+ */
49
+ interface YakComponent<T> extends AnyComponent<T> {
50
+ [yakComponentSymbol]: [unknown, unknown, unknown, unknown];
51
+ }
52
+ /**
53
+ * Styled component with attrs method for adding default props.
54
+ * Extends StyledLiteral with the ability to specify default attributes.
55
+ */
56
+ interface LiteralWithAttrs<T extends object> extends StyledLiteral<T> {
57
+ attrs: <TAttrsIn extends object = {}, TAttrsOut extends AttrsMerged<T, TAttrsIn> = AttrsMerged<T, TAttrsIn>>(attrs: Attrs<T, TAttrsIn, TAttrsOut>) => StyledLiteral<Substitute<T, TAttrsIn>>;
58
+ }
59
+ /**
60
+ * Template literal function for defining CSS styles with interpolation support.
61
+ * Accepts CSS template strings and interpolated values with proper typing.
62
+ */
63
+ interface StyledLiteral<T> {
64
+ <TCSSProps>(styles: TemplateStringsArray, ...values: Array<CSSInterpolation<T & NoInfer<TCSSProps> & {
65
+ theme: Accessor<YakTheme>;
66
+ }>>): YakComponent<TCSSProps & T>;
67
+ }
68
+ /**
69
+ * Function variant of attrs that receives current props and returns additional props.
70
+ * Allows for dynamic prop generation based on component state.
71
+ */
72
+ interface AttrsFunction<TBaseProps, TIn extends object = {}, TOut extends AttrsMerged<TBaseProps, TIn> = AttrsMerged<TBaseProps, TIn>> {
73
+ (p: Substitute<TBaseProps & {
74
+ theme: Accessor<YakTheme>;
75
+ }, TIn>): Partial<TOut>;
76
+ }
77
+ /**
78
+ * Merges provided props with initial props, making specified props optional.
79
+ * Includes theme support for styled components.
80
+ */
81
+ type AttrsMerged<TBaseProps, TIn extends object = {}> = Substitute<TBaseProps & {
82
+ theme?: Accessor<YakTheme>;
83
+ }, TIn>;
84
+ /**
85
+ * Maps all HTML tag names to their corresponding styled component types with attributes support.
86
+ * Provides typed access to all standard HTML elements through the styled interface.
87
+ */
88
+ type MappedHtmlTags = { [Tag in HtmlTags]: LiteralWithAttrs<JSX.IntrinsicElements[Tag]> };
89
+ /**
90
+ * The attrs function allows adding additional props to a styled component.
91
+ * Props can be specified as an object or as a function that receives current props.
92
+ */
93
+ type Attrs<TBaseProps, TIn extends object = {}, TOut extends AttrsMerged<TBaseProps, TIn> = AttrsMerged<TBaseProps, TIn>> = Partial<TOut> | AttrsFunction<TBaseProps, TIn, TOut>;
94
+ /**
95
+ * Utility type to merge two object types, with properties from B taking precedence.
96
+ * If a property exists in both A and B, the property from B is used.
97
+ */
98
+ type Substitute<A extends object, B extends object> = FastOmit<A, keyof B> & B;
99
+ /**
100
+ * Union type of all valid HTML element tag names.
101
+ * Derived from Solid's JSX intrinsic elements.
102
+ */
103
+ type HtmlTags = keyof JSX.IntrinsicElements;
104
+ /**
105
+ * Custom web component tag pattern that must contain at least one hyphen.
106
+ * Follows the web component naming convention.
107
+ */
108
+ type CustomWebComponentTag = `${string}-${string}`;
109
+ /**
110
+ * Utility type to efficiently remove properties from an object type.
111
+ * More performant than the built-in Omit type for large object types.
112
+ */
113
+ type FastOmit<T extends object, U extends string | number | symbol> = { [K in keyof T as K extends U ? never : K]: T[K] };
114
+ /**
115
+ * Set-like collector for class names.
116
+ *
117
+ * Implemented as a string builder in the runtime (a Set<string>
118
+ * split → Set → Array.from → join round-trip dominates render cost);
119
+ * a real Set<string> also satisfies this interface.
120
+ */
121
+ type ClassCollector = {
122
+ add(name: string): void;
123
+ has(name: string): boolean;
124
+ delete(name: string): void;
125
+ };
126
+ /**
127
+ * Type of all functions that can be passed to manipulate styles
128
+ *
129
+ * `$dynamic` marks processors that execute user functions or write style
130
+ * values at render time; purely static processors (class names only) can
131
+ * skip theme lookup and style-object allocation.
132
+ */
133
+ type RuntimeStyleProcessor<T> = ((props: T, classes: ClassCollector, style: StyleObject) => void) & {
134
+ $dynamic?: boolean;
135
+ };
136
+ //#endregion
137
+ //#region runtime/atoms.d.ts
138
+ /**
139
+ * Allows to use atomic CSS classes in a styled or css block
140
+ *
141
+ * @usage
142
+ *
143
+ * ```tsx
144
+ * import { styled, atoms } from "@yak/solid";
145
+ *
146
+ * const Button = styled.button<{ $primary?: boolean }>`
147
+ * ${atoms("text-teal-600", "text-base", "rounded-md")}
148
+ * ${props => props.$primary && atoms("shadow-md")}
149
+ * `;
150
+ * ```
151
+ */
152
+ declare const atoms: <T>(...atoms: (string | RuntimeStyleProcessor<T> | false)[]) => ComponentStyles<T>;
153
+ //#endregion
154
+ //#region runtime/keyframes.d.ts
155
+ /**
156
+ * Allows to use CSS keyframe animations in a styled or css block
157
+ *
158
+ * @usage
159
+ *
160
+ * ```tsx
161
+ * import { styled, keyframes } from "@yak/solid";
162
+ *
163
+ * const rotate = keyframes`
164
+ * from {
165
+ * transform: rotate(0deg);
166
+ * }
167
+ * to {
168
+ * transform: rotate(360deg);
169
+ * }
170
+ * `;
171
+ *
172
+ * const Spinner = styled.div`
173
+ * animation: ${rotate} 1s linear infinite;
174
+ * `;
175
+ * ```
176
+ */
177
+ declare const keyframes: <T extends (string | number | bigint)[] = never>(styles: TemplateStringsArray, ..._dynamic: T) => string;
178
+ //#endregion
179
+ //#region runtime/styled.d.ts
180
+ /**
181
+ * The `styled` method works perfectly on all of your own or any third-party component,
182
+ * as long as they attach the passed `class` prop to a DOM element.
183
+ *
184
+ * @usage
185
+ *
186
+ * ```tsx
187
+ * const StyledLink = styled(Link)`
188
+ * color: #BF4F74;
189
+ * font-weight: bold;
190
+ * `;
191
+ * ```
192
+ */
193
+ declare const styled: Styled;
194
+ //#endregion
195
+ //#region runtime/globalStyle.d.ts
196
+ /**
197
+ * Values that may be interpolated into a `globalStyle` template.
198
+ *
199
+ * Only build-time values are allowed: constants, `keyframes` animation names,
200
+ * static `css` mixins and styled-component selectors. Runtime functions
201
+ * (`${(props) => ...}`) are intentionally excluded: a global rule has no element
202
+ * to attach a CSS variable to. Declare a CSS custom property instead and toggle
203
+ * it via an attribute/class on the root element.
204
+ */
205
+ type GlobalStyleInterpolation = string | number | ComponentStyles<{}> | YakComponent<any>;
206
+ /**
207
+ * Declares global, unscoped styles that ride the same zero-runtime extraction
208
+ * pipeline as `styled` and `keyframes`.
209
+ *
210
+ * Global styles are **part of the stylesheet, not part of the render tree**.
211
+ * They apply exactly when the module declaring them is included in the bundle,
212
+ * typically by importing it from a layout or entry point. They cannot be
213
+ * conditionally mounted; express conditions in CSS (`@media`, `@supports`,
214
+ * `:root[data-theme]`, `:has()`) or through CSS custom properties.
215
+ *
216
+ * @usage
217
+ *
218
+ * ```tsx
219
+ * import { globalStyle, keyframes } from "@yak/solid";
220
+ *
221
+ * const fadeIn = keyframes`
222
+ * from { opacity: 0; }
223
+ * `;
224
+ *
225
+ * globalStyle`
226
+ * :root {
227
+ * --spacing: 4px;
228
+ * }
229
+ *
230
+ * body {
231
+ * margin: 0;
232
+ * }
233
+ *
234
+ * ::view-transition-new(root) {
235
+ * animation: ${fadeIn} 200ms ease;
236
+ * }
237
+ * `;
238
+ * ```
239
+ */
240
+ declare const globalStyle: (_styles: TemplateStringsArray, ..._values: Array<GlobalStyleInterpolation>) => void;
241
+ //#endregion
242
+ //#region runtime/cssLiteral.d.ts
243
+ declare const yakComponentSymbol: unique symbol;
244
+ type ComponentStyles<TProps> = (props: TProps) => {
245
+ class: string;
246
+ style?: {
247
+ [key: string]: string;
248
+ };
249
+ };
250
+ type CSSInterpolation<TProps> = string | number | undefined | null | false | ComponentStyles<TProps> | {
251
+ [yakComponentSymbol]: any;
252
+ } | ((props: TProps) => CSSInterpolation<TProps>);
253
+ /**
254
+ * css() runtime factory of css``
255
+ *
256
+ * /!\ @yak/solid transpiles css`` and styled``
257
+ *
258
+ * This changes the typings of the css`` and styled`` functions.
259
+ * During development the user of @yak/solid wants to work with the
260
+ * typings BEFORE compilation.
261
+ *
262
+ * Therefore this is only an internal function only and it must be cast to any
263
+ * before exported to the user.
264
+ *
265
+ * The internal functioning of css`` is to return a single callback function that runs all functions
266
+ * (or creates new ones if needed) that are passed as arguments. These functions receive the props, classes, and style object as arguments
267
+ * and operate directly on the classes and style objects.
268
+ */
269
+ declare function css<TProps>(styles: TemplateStringsArray, ...values: CSSInterpolation<NoInfer<TProps> & {
270
+ theme: Accessor<YakTheme>;
271
+ }>[]): ComponentStyles<TProps>;
272
+ //#endregion
273
+ //#region runtime/internals/unitPostFix.d.ts
274
+ /**
275
+ * Internal helper called by transformed code. Do not use directly.
276
+ *
277
+ * Takes a function and a css unit and returns the result of the function concatenated with the unit
278
+ *
279
+ * ```tsx
280
+ * import { styled } from "@yak/solid";
281
+ *
282
+ * const Button = styled.button<{ $width?: boolean }>`
283
+ * width: ${({ $width }) => $width}px;
284
+ * `;
285
+ * ```
286
+ *
287
+ * Which will be transformed to:
288
+ * ```tsx
289
+ * import { styled } from "@yak/solid/internal";
290
+ *
291
+ * const Button = styled.button<{ $width?: boolean }>(
292
+ * "button", {
293
+ * width: unitPostFix({ $width }) => $width, "px")
294
+ * });
295
+ */
296
+ declare const unitPostFix: (arg: unknown, unit: string) => string | ((props: any) => string | /*elided*/any | undefined) | undefined;
297
+ //#endregion
298
+ //#region runtime/internals/mergeCssProp.d.ts
299
+ /**
300
+ * This is an internal helper function to merge relevant props of a native element with a css prop.
301
+ * It's automatically added when using the `css` prop in a JSX element.
302
+ * e.g.:
303
+ * ```tsx
304
+ * <p
305
+ * class="foo"
306
+ * css={css`
307
+ * color: green;
308
+ * `}
309
+ * {...{ style: { padding: "30px" }}}
310
+ * />
311
+ */
312
+ declare const mergeCssProp: (relevantProps: {
313
+ class?: string;
314
+ style?: Record<string, string>;
315
+ } & Record<string, unknown>, cssProp: RuntimeStyleProcessor<unknown> | false | null | undefined) => Record<string, unknown> & {
316
+ class?: string;
317
+ style?: Record<string, string>;
318
+ };
319
+ //#endregion
320
+ //#region runtime/internals/mergeClasses.d.ts
321
+ /**
322
+ * Merges the folded yak class name with a user `class` value.
323
+ *
324
+ * Injected by the compiler (as `__yak_mergeClassNames`) when it replaces a JSX
325
+ * usage of a fully static styled component with a plain element:
326
+ * ```tsx
327
+ * const Card = styled.div`color: red;`;
328
+ * <Card class={active() && "active"} />
329
+ * ```
330
+ * becomes
331
+ * ```tsx
332
+ * <div class={__yak_mergeClassNames("yX", active() && "active")} />
333
+ * ```
334
+ */
335
+ declare const mergeClasses: (yakClass: string, userClass: unknown) => string | undefined;
336
+ //#endregion
337
+ //#region runtime/styledDom.d.ts
338
+ declare const __yak_a: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
339
+ declare const __yak_abbr: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
340
+ declare const __yak_address: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
341
+ declare const __yak_area: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
342
+ declare const __yak_article: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
343
+ declare const __yak_aside: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
344
+ declare const __yak_audio: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
345
+ declare const __yak_b: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
346
+ declare const __yak_base: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
347
+ declare const __yak_bdi: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
348
+ declare const __yak_bdo: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
349
+ declare const __yak_big: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
350
+ declare const __yak_blockquote: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
351
+ declare const __yak_body: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
352
+ declare const __yak_br: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
353
+ declare const __yak_button: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
354
+ declare const __yak_canvas: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
355
+ declare const __yak_caption: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
356
+ declare const __yak_cite: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
357
+ declare const __yak_code: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
358
+ declare const __yak_col: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
359
+ declare const __yak_colgroup: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
360
+ declare const __yak_data: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
361
+ declare const __yak_datalist: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
362
+ declare const __yak_dd: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
363
+ declare const __yak_del: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
364
+ declare const __yak_details: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
365
+ declare const __yak_dfn: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
366
+ declare const __yak_dialog: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
367
+ declare const __yak_div: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
368
+ declare const __yak_dl: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
369
+ declare const __yak_dt: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
370
+ declare const __yak_em: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
371
+ declare const __yak_embed: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
372
+ declare const __yak_fieldset: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
373
+ declare const __yak_figcaption: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
374
+ declare const __yak_figure: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
375
+ declare const __yak_footer: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
376
+ declare const __yak_form: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
377
+ declare const __yak_h1: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
378
+ declare const __yak_h2: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
379
+ declare const __yak_h3: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
380
+ declare const __yak_h4: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
381
+ declare const __yak_h5: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
382
+ declare const __yak_h6: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
383
+ declare const __yak_header: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
384
+ declare const __yak_hgroup: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
385
+ declare const __yak_hr: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
386
+ declare const __yak_html: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
387
+ declare const __yak_i: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
388
+ declare const __yak_iframe: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
389
+ declare const __yak_img: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
390
+ declare const __yak_input: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
391
+ declare const __yak_ins: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
392
+ declare const __yak_kbd: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
393
+ declare const __yak_keygen: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
394
+ declare const __yak_label: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
395
+ declare const __yak_legend: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
396
+ declare const __yak_li: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
397
+ declare const __yak_link: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
398
+ declare const __yak_main: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
399
+ declare const __yak_map: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
400
+ declare const __yak_mark: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
401
+ declare const __yak_menu: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
402
+ declare const __yak_menuitem: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
403
+ declare const __yak_meta: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
404
+ declare const __yak_meter: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
405
+ declare const __yak_nav: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
406
+ declare const __yak_noscript: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
407
+ declare const __yak_object: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
408
+ declare const __yak_ol: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
409
+ declare const __yak_optgroup: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
410
+ declare const __yak_option: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
411
+ declare const __yak_output: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
412
+ declare const __yak_p: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
413
+ declare const __yak_param: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
414
+ declare const __yak_picture: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
415
+ declare const __yak_pre: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
416
+ declare const __yak_progress: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
417
+ declare const __yak_q: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
418
+ declare const __yak_rp: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
419
+ declare const __yak_rt: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
420
+ declare const __yak_ruby: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
421
+ declare const __yak_s: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
422
+ declare const __yak_samp: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
423
+ declare const __yak_script: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
424
+ declare const __yak_section: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
425
+ declare const __yak_select: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
426
+ declare const __yak_small: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
427
+ declare const __yak_source: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
428
+ declare const __yak_span: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
429
+ declare const __yak_strong: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
430
+ declare const __yak_style: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
431
+ declare const __yak_sub: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
432
+ declare const __yak_summary: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
433
+ declare const __yak_sup: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
434
+ declare const __yak_table: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
435
+ declare const __yak_tbody: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
436
+ declare const __yak_td: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
437
+ declare const __yak_textarea: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
438
+ declare const __yak_tfoot: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
439
+ declare const __yak_th: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
440
+ declare const __yak_thead: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
441
+ declare const __yak_time: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
442
+ declare const __yak_tr: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
443
+ declare const __yak_track: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
444
+ declare const __yak_u: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
445
+ declare const __yak_ul: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
446
+ declare const __yak_use: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
447
+ declare const __yak_var: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
448
+ declare const __yak_video: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
449
+ declare const __yak_wbr: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
450
+ declare const __yak_circle: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
451
+ declare const __yak_clipPath: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
452
+ declare const __yak_defs: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
453
+ declare const __yak_ellipse: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
454
+ declare const __yak_foreignObject: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
455
+ declare const __yak_g: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
456
+ declare const __yak_image: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
457
+ declare const __yak_line: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
458
+ declare const __yak_linearGradient: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
459
+ declare const __yak_marker: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
460
+ declare const __yak_mask: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
461
+ declare const __yak_path: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
462
+ declare const __yak_pattern: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
463
+ declare const __yak_polygon: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
464
+ declare const __yak_polyline: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
465
+ declare const __yak_radialGradient: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
466
+ declare const __yak_rect: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
467
+ declare const __yak_stop: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
468
+ declare const __yak_svg: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
469
+ declare const __yak_text: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
470
+ declare const __yak_tspan: LiteralWithAttrs<import("@solidjs/web").JSX.ElementAttributes<Element>>;
471
+ //#endregion
472
+ export { YakThemeContext, YakThemeProvider, __yak_a, __yak_abbr, __yak_address, __yak_area, __yak_article, __yak_aside, __yak_audio, __yak_b, __yak_base, __yak_bdi, __yak_bdo, __yak_big, __yak_blockquote, __yak_body, __yak_br, __yak_button, __yak_canvas, __yak_caption, __yak_circle, __yak_cite, __yak_clipPath, __yak_code, __yak_col, __yak_colgroup, __yak_data, __yak_datalist, __yak_dd, __yak_defs, __yak_del, __yak_details, __yak_dfn, __yak_dialog, __yak_div, __yak_dl, __yak_dt, __yak_ellipse, __yak_em, __yak_embed, __yak_fieldset, __yak_figcaption, __yak_figure, __yak_footer, __yak_foreignObject, __yak_form, __yak_g, __yak_h1, __yak_h2, __yak_h3, __yak_h4, __yak_h5, __yak_h6, __yak_header, __yak_hgroup, __yak_hr, __yak_html, __yak_i, __yak_iframe, __yak_image, __yak_img, __yak_input, __yak_ins, __yak_kbd, __yak_keygen, __yak_label, __yak_legend, __yak_li, __yak_line, __yak_linearGradient, __yak_link, __yak_main, __yak_map, __yak_mark, __yak_marker, __yak_mask, __yak_menu, __yak_menuitem, mergeClasses as __yak_mergeClassNames, mergeCssProp as __yak_mergeCssProp, __yak_meta, __yak_meter, __yak_nav, __yak_noscript, __yak_object, __yak_ol, __yak_optgroup, __yak_option, __yak_output, __yak_p, __yak_param, __yak_path, __yak_pattern, __yak_picture, __yak_polygon, __yak_polyline, __yak_pre, __yak_progress, __yak_q, __yak_radialGradient, __yak_rect, __yak_rp, __yak_rt, __yak_ruby, __yak_s, __yak_samp, __yak_script, __yak_section, __yak_select, __yak_small, __yak_source, __yak_span, __yak_stop, __yak_strong, __yak_style, __yak_sub, __yak_summary, __yak_sup, __yak_svg, __yak_table, __yak_tbody, __yak_td, __yak_text, __yak_textarea, __yak_tfoot, __yak_th, __yak_thead, __yak_time, __yak_tr, __yak_track, __yak_tspan, __yak_u, __yak_ul, unitPostFix as __yak_unitPostFix, __yak_use, __yak_var, __yak_video, __yak_wbr, atoms, css, globalStyle, keyframes, styled, useTheme };
473
+ //# sourceMappingURL=internal.d.ts.map