UNPKG

1.15 kBSource Map (JSON)View Raw
1{"version":3,"file":"server.js","sourceRoot":"../src/","sources":["server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEzD;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,QAAsB,EAAE,SAAkB;IACrE,IAAM,UAAU,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;IAE5C,UAAU,CAAC,SAAS,CAAC;QACnB,aAAa,EAAE,aAAa,CAAC,IAAI;QACjC,SAAS,WAAA;KACV,CAAC,CAAC;IACH,UAAU,CAAC,KAAK,EAAE,CAAC;IAEnB,OAAO;QACL,IAAI,EAAE,QAAQ,EAAE;QAChB,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;KAC/B,CAAC;AACJ,CAAC","sourcesContent":["import { InjectionMode, Stylesheet } from './Stylesheet';\n\n/**\n * Renders a given string and returns both html and css needed for the html.\n * @param onRender - Function that returns a string.\n * @param namespace - Optional namespace to prepend to css classnames to avoid collisions.\n */\nexport function renderStatic(onRender: () => string, namespace?: string): { html: string; css: string } {\n const stylesheet = Stylesheet.getInstance();\n\n stylesheet.setConfig({\n injectionMode: InjectionMode.none,\n namespace,\n });\n stylesheet.reset();\n\n return {\n html: onRender(),\n css: stylesheet.getRules(true),\n };\n}\n"]}
\No newline at end of file