@m13v/seo-components 0.8.3 → 0.8.5
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.
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const cssPath = path.join(here, "..", "..", "dist", "styles.css");
|
|
7
|
+
|
|
8
|
+
let cachedCss: string | null = null;
|
|
9
|
+
function loadCss(): string {
|
|
10
|
+
if (cachedCss !== null) return cachedCss;
|
|
11
|
+
cachedCss = fs.readFileSync(cssPath, "utf8");
|
|
12
|
+
return cachedCss;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function SeoComponentsStyles() {
|
|
16
|
+
const css = loadCss();
|
|
17
|
+
return <style dangerouslySetInnerHTML={{ __html: css }} />;
|
|
18
|
+
}
|
package/src/server.ts
CHANGED
|
@@ -19,3 +19,8 @@ export { getGuideContext, buildGuideIndex, buildSystemPrompt } from "./lib/guide
|
|
|
19
19
|
export type { GuideContext, BuildSystemPromptOptions } from "./lib/guide-context";
|
|
20
20
|
|
|
21
21
|
export { getSupabaseAdmin } from "./lib/supabase-admin";
|
|
22
|
+
|
|
23
|
+
// Style injector — server-only component that inlines the prebuilt Tailwind
|
|
24
|
+
// CSS for the sidebar/chat/heading components as a <style> tag.
|
|
25
|
+
// Use in your root layout <head> to avoid consumer-side PostCSS conflicts.
|
|
26
|
+
export { SeoComponentsStyles } from "./components/SeoComponentsStyles";
|