UNPKG

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 1.11 kB
{"version":3,"sources":["../../runtime/context/index.server.tsx"],"sourcesContent":["//\n// This file is the react-server component version of index.tsx\n//\n\n// @ts-ignore - in the current @types/react \"cache\" is not typed\nimport React, { ReactNode, cache } from \"react\";\nimport { YakThemeProvider as YakThemeClientProvider } from \"./index.js\";\n\n// the following import might be changed by\n// the user config in withYak to point to their own\n// context\nimport { getYakThemeContext } from \"next-yak/context/baseContext\";\n\nexport const useTheme = cache(() => getYakThemeContext());\nexport const YakThemeProvider = ({ children }: { children: ReactNode }) => {\n return (\n <YakThemeClientProvider theme={useTheme()}>\n {children}\n </YakThemeClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,mBAAwC;AACxC,mBAA2D;AAK3D,yBAAmC;AAE5B,IAAM,eAAW,oBAAM,UAAM,uCAAmB,CAAC;AACjD,IAAM,mBAAmB,CAAC,EAAE,SAAS,MAA+B;AACzE,SACE,6BAAAA,QAAA,cAAC,aAAAC,kBAAA,EAAuB,OAAO,SAAS,KACrC,QACH;AAEJ;","names":["React","YakThemeClientProvider"]}